Skip to content

Commit f722334

Browse files
authored
Merge pull request #1 from runcycles/release/v0.1.0
Initial v0.1.0: LangChain agent middleware for Cycles
2 parents de7362b + a93f3d7 commit f722334

35 files changed

Lines changed: 3029 additions & 0 deletions

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# All changes require review from the repo owner.
2+
* @amavashev
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Bug Report
2+
description: Report a bug in any Runcycles repository
3+
labels: ["bug"]
4+
body:
5+
- type: dropdown
6+
id: repo
7+
attributes:
8+
label: Repository
9+
description: Which repository is affected?
10+
options:
11+
- cycles-server
12+
- cycles-server-admin
13+
- cycles-protocol
14+
- cycles-client-python
15+
- cycles-client-typescript
16+
- langchain-runcycles
17+
- cycles-spring-boot-starter
18+
- cycles-mcp-server
19+
- cycles-openai-agents
20+
- cycles-openclaw-budget-guard
21+
- cycles-runaway-demo
22+
- cycles-agent-action-authority-demo
23+
- docs
24+
validations:
25+
required: true
26+
27+
- type: input
28+
id: version
29+
attributes:
30+
label: Version
31+
description: Package/server version (e.g., 0.2.0)
32+
placeholder: "0.2.0"
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: description
38+
attributes:
39+
label: What happened?
40+
description: A clear description of the bug.
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: expected
46+
attributes:
47+
label: Expected behavior
48+
description: What did you expect to happen?
49+
validations:
50+
required: true
51+
52+
- type: textarea
53+
id: reproduce
54+
attributes:
55+
label: Steps to reproduce
56+
description: Minimal steps to reproduce the issue.
57+
placeholder: |
58+
1. Configure Cycles with...
59+
2. Call...
60+
3. Observe...
61+
validations:
62+
required: true
63+
64+
- type: textarea
65+
id: environment
66+
attributes:
67+
label: Environment
68+
description: Runtime details.
69+
placeholder: |
70+
- OS: Ubuntu 24.04
71+
- Runtime: Python 3.12 / Node 22 / Java 21
72+
- Redis: 7.x
73+
render: markdown
74+
75+
- type: textarea
76+
id: logs
77+
attributes:
78+
label: Relevant logs or error output
79+
description: Paste any error messages or stack traces.
80+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Documentation
4+
url: https://runcycles.io
5+
about: Check the docs — your question may already be answered.
6+
- name: Security Vulnerability
7+
url: https://github.com/runcycles/.github/blob/main/SECURITY.md
8+
about: Report security issues privately — do NOT open a public issue.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Feature Request
2+
description: Suggest an improvement or new feature
3+
labels: ["enhancement"]
4+
body:
5+
- type: dropdown
6+
id: repo
7+
attributes:
8+
label: Repository
9+
description: Which repository does this affect?
10+
options:
11+
- cycles-server
12+
- cycles-server-admin
13+
- cycles-protocol
14+
- cycles-client-python
15+
- cycles-client-typescript
16+
- langchain-runcycles
17+
- cycles-spring-boot-starter
18+
- cycles-mcp-server
19+
- cycles-openai-agents
20+
- cycles-openclaw-budget-guard
21+
- docs
22+
- other / unsure
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: problem
28+
attributes:
29+
label: Problem or use case
30+
description: What problem does this solve? What use case does it enable?
31+
validations:
32+
required: true
33+
34+
- type: textarea
35+
id: solution
36+
attributes:
37+
label: Proposed solution
38+
description: How should this work? Include API examples if relevant.
39+
40+
- type: textarea
41+
id: alternatives
42+
attributes:
43+
label: Alternatives considered
44+
description: Any workarounds or alternative approaches you've considered.
45+
46+
- type: dropdown
47+
id: scope
48+
attributes:
49+
label: Scope
50+
options:
51+
- Protocol change (requires spec update)
52+
- SDK feature (Python / TypeScript / Java)
53+
- Server feature
54+
- Documentation improvement
55+
- Integration / plugin
56+
- Other

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Summary
2+
3+
<!-- What does this PR do? Why? -->
4+
5+
## Checklist
6+
7+
- [ ] Tests added/updated for new behavior
8+
- [ ] `AUDIT.md` updated (if middleware contract or SDK surface consumed changed)
9+
- [ ] `README.md` updated (if public API changed)
10+
- [ ] Lint and test suite passes locally
11+
12+
## Test plan
13+
14+
<!-- How was this tested? What commands were run? -->

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
ci:
14+
uses: runcycles/.github/.github/workflows/ci-python.yml@main
15+
with:
16+
mypy-target: langchain_runcycles
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Dependabot auto-merge
2+
3+
on: pull_request
4+
5+
# Default to read-all at top level; the automerge job below escalates only the
6+
# narrow scopes it actually needs. Per OpenSSF Scorecard's Token-Permissions
7+
# criterion: avoid blanket write at the workflow level.
8+
permissions: read-all
9+
10+
jobs:
11+
automerge:
12+
runs-on: ubuntu-latest
13+
if: github.event.pull_request.user.login == 'dependabot[bot]'
14+
permissions:
15+
contents: write # required to enable auto-merge
16+
pull-requests: write # required to mark the PR as auto-merge
17+
steps:
18+
- name: Fetch Dependabot metadata
19+
id: meta
20+
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3
21+
- name: Enable auto-merge for patch updates
22+
if: steps.meta.outputs.update-type == 'version-update:semver-patch'
23+
run: gh pr merge --auto --merge "$PR_URL"
24+
env:
25+
PR_URL: ${{ github.event.pull_request.html_url }}
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: Publish Python package
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
inputs:
9+
target:
10+
description: "Where to publish"
11+
required: true
12+
default: "testpypi"
13+
type: choice
14+
options:
15+
- testpypi
16+
- pypi
17+
18+
# Default least-privilege; publish-* jobs override with id-token: write.
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
build:
24+
name: Build distributions
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Check out source
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
30+
- name: Set up Python
31+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
32+
with:
33+
python-version: "3.12"
34+
35+
- name: Install build tool
36+
run: python -m pip install --upgrade pip build
37+
38+
- name: Build sdist and wheel
39+
run: python -m build
40+
41+
- name: Upload distribution artifacts
42+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
43+
with:
44+
name: python-package-distributions
45+
path: dist/
46+
47+
publish-to-testpypi:
48+
name: Publish to TestPyPI
49+
needs: build
50+
runs-on: ubuntu-latest
51+
if: github.event_name == 'workflow_dispatch' && inputs.target == 'testpypi'
52+
environment:
53+
name: testpypi
54+
url: https://test.pypi.org/p/langchain-runcycles
55+
permissions:
56+
id-token: write
57+
contents: read
58+
59+
steps:
60+
- name: Download distribution artifacts
61+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
62+
with:
63+
name: python-package-distributions
64+
path: dist/
65+
66+
- name: Publish to TestPyPI
67+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
68+
with:
69+
repository-url: https://test.pypi.org/legacy/
70+
71+
publish-to-pypi:
72+
name: Publish to PyPI
73+
needs: build
74+
runs-on: ubuntu-latest
75+
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.target == 'pypi')
76+
environment:
77+
name: pypi
78+
url: https://pypi.org/p/langchain-runcycles
79+
permissions:
80+
id-token: write
81+
contents: read
82+
83+
steps:
84+
- name: Download distribution artifacts
85+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
86+
with:
87+
name: python-package-distributions
88+
path: dist/
89+
90+
- name: Publish to PyPI
91+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
92+
93+
create-release:
94+
name: Create GitHub Release
95+
needs: publish-to-pypi
96+
runs-on: ubuntu-latest
97+
if: startsWith(github.ref, 'refs/tags/v')
98+
permissions:
99+
contents: write
100+
101+
steps:
102+
- name: Check out source
103+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
104+
105+
- name: Extract release notes from CHANGELOG
106+
id: notes
107+
run: |
108+
version="${GITHUB_REF_NAME#v}"
109+
# Extract the section between this version's heading and the next "## [" heading.
110+
# Uses string functions instead of regex to stay portable across awk variants.
111+
notes=$(awk -v v="$version" '
112+
BEGIN { start = "## [" v "]"; flag = 0 }
113+
substr($0, 1, length(start)) == start { flag = 1; next }
114+
substr($0, 1, 4) == "## [" { flag = 0 }
115+
flag { print }
116+
' CHANGELOG.md)
117+
if [ -z "$(printf '%s' "$notes" | tr -d '[:space:]')" ]; then
118+
echo "::warning::No CHANGELOG entry found for v${version} — using fallback body"
119+
notes="Release v${version}. See commit history for changes."
120+
fi
121+
{
122+
echo "notes<<EOF_GH_OUTPUT"
123+
printf '%s\n' "$notes"
124+
echo "EOF_GH_OUTPUT"
125+
} >> "$GITHUB_OUTPUT"
126+
127+
- name: Create GitHub Release
128+
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
129+
with:
130+
name: ${{ github.ref_name }}
131+
body: ${{ steps.notes.outputs.notes }}
132+
draft: false
133+
prerelease: ${{ contains(github.ref_name, '-') }}

0 commit comments

Comments
 (0)