Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
c51262d
feat(permission): auto-deny unanswered prompts after a countdown
Oct 6, 2026
394b7f9
fix(permission): never separate a claim from settling its request
Oct 6, 2026
355b8d0
fix(permission): run the countdown on its deadline, not on publication
Oct 6, 2026
f46abbf
fix(acp): let go of permission prompts the server settled itself
Oct 6, 2026
2517982
fix(tui): follow the permission deadline without waiting for a tick
Oct 6, 2026
533a455
fix(opencode): satisfy the OpenCode Zen free-tier client contract
mdev34-lab Oct 6, 2026
2ede033
test(opencode): cover explicit stream:false translation for Zen
mdev34-lab Oct 6, 2026
24aeb81
fix(opencode): harden the Zen adapter request and stream handling
mdev34-lab Oct 6, 2026
a5beaf7
fix(opencode): narrow the Zen request URL for the type checker
mdev34-lab Oct 6, 2026
474f0e9
fix(opencode): key Zen free-tier by wire id and honor fetch overrides
mdev34-lab Oct 6, 2026
807f1cf
fix(config): bound the permission countdown to what one timer can exp…
mdev34-lab Oct 6, 2026
2488bc0
fix(acp): close the editor dialog and re-check settled prompts before…
mdev34-lab Oct 6, 2026
b5035b5
test(tui): accept either of the first two countdown seconds
mdev34-lab Oct 6, 2026
d6029ae
fix(opencode): include the over-200K cost tier in Zen free-tier checks
mdev34-lab Oct 6, 2026
45e084e
test(acp): pin the early exit for a settled prompt nobody can ask about
mdev34-lab Oct 6, 2026
4f3199e
fix(opencode): drop a stale content-length on rewritten Zen requests
mdev34-lab Oct 6, 2026
a2c2a6c
test(review): lock #171 stagnation recovery at the loop seam
mdev34-lab Oct 6, 2026
c25383e
feat(tui): render review finish reports as a structured block
mdev34-lab Oct 6, 2026
9b4e693
fix(tui): make review finish block reactive and drop bare line locators
mdev34-lab Oct 6, 2026
44be1dd
fix(opencode): give requests without a session their own Zen session id
mdev34-lab Oct 6, 2026
5ff6eea
fix(opencode): strip webfetch page boilerplate and document API endpo…
Oct 6, 2026
c2c7702
feat(finish): yield a turn while background subagents run
mdev34-lab Oct 6, 2026
c0cd7c3
test(finish): cover waiting for a background subagent
mdev34-lab Oct 6, 2026
a5f00d0
fix(tui): address Kilo review nits on the review finish block
mdev34-lab Oct 6, 2026
7e6de27
fix(acp): keep an answered dialog out of the cancel path
mdev34-lab Oct 6, 2026
8997d0f
refactor(acp): share one signal helper
mdev34-lab Oct 6, 2026
d95c7bd
test(permission): anchor the countdown assertions
mdev34-lab Oct 6, 2026
7904ea6
fix(tui): stop the countdown interval at zero
mdev34-lab Oct 6, 2026
fee37ea
style(session): format the model change check
mdev34-lab Oct 6, 2026
be1673f
Merge remote-tracking branch 'origin/dev' into arena/ef329607-alphacode
mdev34-lab Oct 6, 2026
f563eb2
test(review): name the reviewer-nudge test by what it actually drives
mdev34-lab Oct 6, 2026
03d46e5
test(flags): restore the reviewStagnationRepeats parse table
mdev34-lab Oct 6, 2026
d4b68d4
fix(finish): correct the wait contract for yielded subagents
mdev34-lab Oct 6, 2026
6c0b999
fix(opencode): scope Zen chat rewrite and harden tier pricing and hea…
mdev34-lab Oct 7, 2026
29b5ab3
Merge pull request #215 from mdev34-lab/arena/1db0727b-alphacode
mdev34-lab Oct 7, 2026
ba50e2f
Merge pull request #218 from mdev34-lab/arena/a015480d-alphacode
mdev34-lab Oct 7, 2026
b0d95d8
fix(finish): refuse a wait from a session that is itself a subagent
mdev34-lab Oct 7, 2026
de7a2ba
fix(opencode): merge configured model cost tiers and document Zen con…
mdev34-lab Oct 7, 2026
b9f5dba
chore(ci): retrigger checks after the Kilo review hit its output limit
Oct 7, 2026
77a6fef
test(config): pin that the countdown bound ignores `enabled`
mdev34-lab Oct 7, 2026
dd00604
fix(task): drop waiting_for_subagent from the child terminal envelope
mdev34-lab Oct 7, 2026
b710406
fix(provider): harden cost tier validation and merge catalog tiers
mdev34-lab Oct 7, 2026
9e00c26
Merge pull request #220 from mdev34-lab/arena/ef329607-alphacode
mdev34-lab Oct 7, 2026
c255e0d
fix(provider): support v2 model cost array format and harden tier mig…
mdev34-lab Oct 7, 2026
5b5bbf6
refactor(acp): read permission request ids off the wire
mdev34-lab Oct 7, 2026
583edcd
Merge pull request #216 from mdev34-lab/arena/c816013d-alphacode
mdev34-lab Oct 7, 2026
4bd2523
fix(provider): reject extra untiered paid cost entries and invalid pr…
mdev34-lab Oct 7, 2026
8466650
fix(provider): preserve valid zero-cost tiers when invalid pricing is…
mdev34-lab Oct 7, 2026
a8c633b
fix(provider): satisfy zen tool quartet wiregate and preserve catalog…
mdev34-lab Oct 7, 2026
c8b77fc
Merge pull request #219 from mdev34-lab/arena/c27e983e-alphacode
mdev34-lab Oct 7, 2026
cbb2b5a
fix(provider): guard injected-only Zen tool calls and preserve tool c…
mdev34-lab Oct 7, 2026
312b7fd
test(tui): use canonical review report tag in raw-output test
mdev34-lab Oct 7, 2026
ceee727
fix(provider): fail required Zen tool_choice explicitly and harden re…
mdev34-lab Oct 8, 2026
b464e6a
fix(desktop): expose OS-resolved path to agent context
mdev34-lab Oct 8, 2026
58ba402
Merge pull request #228 from mdev34-lab/arena/5b9713b9-alphacode
mdev34-lab Oct 8, 2026
e2d5da1
Merge pull request #227 from mdev34-lab/arena/1a513c5c-alphacode
agenteinstinct1-max Oct 9, 2026
a71ab99
Merge pull request #225 from mdev34-lab/arena/196911c7-alphacode
agenteinstinct1-max Oct 9, 2026
66b5655
fix(review): require explicit Review before finish
agenteinstinct1-max Oct 9, 2026
f14df8f
fix(core): strip boilerplate from webfetch conversions
Oct 10, 2026
ade4d21
test(review): stage combined PR233 candidate for validation
Oct 10, 2026
e8541bf
fix(core): match webfetch chrome by explicit class tokens
Oct 10, 2026
04e1c7e
Merge pull request #234 from mdev34-lab/instinct/issue-190-core-webfetch
agenteinstinct1-max Oct 10, 2026
1d74810
fix(review): preserve concurrent write evidence and review handoff
Oct 10, 2026
2253700
test(qwen): stage exact candidate for independent review
Oct 10, 2026
782c359
fix(test): preserve error channel in processor wait helper
Oct 10, 2026
2adf976
fix(qwen): persist stale recovery and restore historical attachments
Oct 10, 2026
8aa14d3
fix(review): keep handed-off child writes unreviewed under approved r…
Oct 10, 2026
2a03274
fix(qwen): constrain stale recovery and clean up empty turns
Oct 10, 2026
93e5d7c
Merge PR #233: require explicit review before finish
agenteinstinct1-max Oct 10, 2026
21480c1
Merge pull request #237 from mdev34-lab/instinct/issue-232-qwen-recovery
agenteinstinct1-max Oct 10, 2026
6df9b6b
fix(tui): show unknown context usage with an empty bar
agenteinstinct1-max Oct 10, 2026
7b1692f
fix(cli): refuse daemon replacement when active work is unknown
agenteinstinct1-max Oct 11, 2026
2225f76
Merge pull request #249 from mdev34-lab/instinct/issue-242-daemon-guard
agenteinstinct1-max Oct 11, 2026
26a1044
ci: remove PR duplicate-check job; bound HttpApi gate step with progr…
agenteinstinct1-max Oct 11, 2026
5bd9db7
feat(agent): add fast medium and thorough effort modes
agenteinstinct1-max Oct 11, 2026
e698a07
Merge pull request #252 from mdev34-lab/arena/5818de20-alphacode
agenteinstinct1-max Oct 11, 2026
0e31860
feat(release): establish validated AlphaCode version and release life…
agenteinstinct1-max Oct 11, 2026
b38adf1
feat(release): publish exact tagged lifecycle workflow
agenteinstinct1-max Oct 11, 2026
bb6986c
fix(release): make fixtures Windows portable and address review findings
agenteinstinct1-max Oct 11, 2026
b179b7a
fix(release): reject version field lookalikes and bound git tests
agenteinstinct1-max Oct 11, 2026
57263b2
ci: run full typecheck on integration branches
agenteinstinct1-max Oct 11, 2026
1147480
test(script): give baseline git subprocess test a 30s budget
agenteinstinct1-max Oct 11, 2026
5f05ad1
fix(ci): bound selected HttpApi cleanup waits and enable tracing
agenteinstinct1-max Oct 11, 2026
a593bab
test(core): add snapshot timeout budget and phase markers
agenteinstinct1-max Oct 11, 2026
51138fd
test(core): harden linked worktree timeout and log phases
agenteinstinct1-max Oct 11, 2026
809d99d
Merge pull request #256 from mdev34-lab/instinct/ci-full-typecheck-in…
agenteinstinct1-max Oct 12, 2026
845017e
Merge verified integration base for current CI gates
agenteinstinct1-max Oct 12, 2026
06b7277
Merge pull request #260 from mdev34-lab/instinct/snapshot-location-ci…
agenteinstinct1-max Oct 12, 2026
10d3c2a
Merge verified integration base for partial cleanup checks
agenteinstinct1-max Oct 12, 2026
bf7e37b
Merge verified integration base for current context-bar checks
agenteinstinct1-max Oct 12, 2026
2a25ae6
Merge verified integration with worker-preserved release fixtures
agenteinstinct1-max Oct 12, 2026
e64b33c
test(server): isolate plugin reuse fixture from config dependency ins…
agenteinstinct1-max Oct 12, 2026
6ce0d18
Merge pull request #255 from mdev34-lab/instinct/issue-192-release-pi…
agenteinstinct1-max Oct 12, 2026
485838d
fix(review): preserve completion during reverse-order child write pro…
agenteinstinct1-max Oct 12, 2026
3762a2f
test(core): give git-dense fixtures explicit timeout budgets
agenteinstinct1-max Oct 12, 2026
72d21f4
Merge pull request #268 from mdev34-lab/instinct/core-git-fixture-tim…
agenteinstinct1-max Oct 12, 2026
cccc253
Merge verified integration release and fixture timeout changes
agenteinstinct1-max Oct 12, 2026
1abf928
Merge verified integration release and fixture timeout changes
agenteinstinct1-max Oct 12, 2026
7275190
Merge verified integration release and fixture timeout changes
agenteinstinct1-max Oct 12, 2026
ad11972
fix(review): snapshot projection metadata and isolate race-test gates
agenteinstinct1-max Oct 12, 2026
1c4490e
test(httpapi): disable real config dependency installs in exerciser
agenteinstinct1-max Oct 12, 2026
5b269b4
test(core): give real PTY fixtures explicit load budgets
agenteinstinct1-max Oct 12, 2026
90a21d8
Merge pull request #273 from mdev34-lab/instinct/pty-fixture-load-bud…
agenteinstinct1-max Oct 12, 2026
18f31b6
Merge current integration PTY fixture budgets
agenteinstinct1-max Oct 12, 2026
5ae5963
Merge current integration PTY fixture budgets
agenteinstinct1-max Oct 12, 2026
3995f30
docs: explain config dependency install test escape hatch
agenteinstinct1-max Oct 12, 2026
8628704
Merge current integration PTY fixture budgets
agenteinstinct1-max Oct 12, 2026
cf0aecc
Merge current integration fixture budgets
agenteinstinct1-max Oct 12, 2026
c0ebbe0
test(pty): observe exit state when event waits time out
agenteinstinct1-max Oct 12, 2026
d5c5fe2
test(httpapi): keep best-effort cleanup from masking scenario failures
agenteinstinct1-max Oct 12, 2026
7a03d78
Merge pull request #264 from mdev34-lab/instinct/httpapi-plugin-test-…
agenteinstinct1-max Oct 12, 2026
cb107a4
Merge current integration hermetic HTTP API fixtures
agenteinstinct1-max Oct 12, 2026
288d39b
Merge current integration hermetic HTTP API fixtures
agenteinstinct1-max Oct 12, 2026
abb0b2a
Merge current integration hermetic HTTP API fixtures
agenteinstinct1-max Oct 12, 2026
7003211
test(review): preserve typed Session node in reverse-order fixture
agenteinstinct1-max Oct 12, 2026
3dd7b96
Merge current integration hermetic HTTP API fixtures
agenteinstinct1-max Oct 12, 2026
08b636b
fix(tui): count zero-output context usage and cover sidebar rendering
agenteinstinct1-max Oct 12, 2026
edbbbc9
test(review): await observable part-lock cleanup
agenteinstinct1-max Oct 12, 2026
8bdf976
test(httpapi): name cleanup bound and return only completion
agenteinstinct1-max Oct 12, 2026
ccd01dd
test(tui): use valid internal plugin metadata without a cast
agenteinstinct1-max Oct 12, 2026
4e9b028
refactor(tui): derive context limit contract from SDK Model
agenteinstinct1-max Oct 12, 2026
c3455f0
test(httpapi): use cancelable timer race for bounded cleanup
agenteinstinct1-max Oct 12, 2026
98ad488
Merge pull request #245 from mdev34-lab/instinct/issue-241-unknown-co…
agenteinstinct1-max Oct 12, 2026
b182d55
Merge current integration context usage fixes
agenteinstinct1-max Oct 12, 2026
a5d7037
Merge current integration context usage fixes
agenteinstinct1-max Oct 12, 2026
584d852
Merge current integration context usage fixes
agenteinstinct1-max Oct 12, 2026
e76351e
Make cleanup timer rejection handling explicit
agenteinstinct1-max Oct 12, 2026
420666f
Merge pull request #258 from mdev34-lab/instinct/httpapi-cleanup-bounds
agenteinstinct1-max Oct 12, 2026
332df85
Merge current integration cleanup bounds
agenteinstinct1-max Oct 12, 2026
14801ba
Merge current integration cleanup bounds
agenteinstinct1-max Oct 12, 2026
3997ea3
Fix repository targets in maintenance scripts
agenteinstinct1-max Oct 12, 2026
62586fa
Make native timeout probe an explicit synchronous Effect
agenteinstinct1-max Oct 12, 2026
2db7d7b
Instrument bun-pty exit delivery and read-loop termination
agenteinstinct1-max Oct 12, 2026
665e828
Merge pull request #281 from mdev34-lab/instinct/issue-274-native-exi…
agenteinstinct1-max Oct 12, 2026
d255518
Update cleanup branding and verified automation exclusions
agenteinstinct1-max Oct 12, 2026
3d74c22
Harden timeout probe parsing and bound diagnostic queue drains
agenteinstinct1-max Oct 12, 2026
1c785c6
Replay early bun-pty exits once after listener registration
agenteinstinct1-max Oct 12, 2026
f9b112d
Merge pull request #280 from mdev34-lab/instinct/issue-279-maintenanc…
agenteinstinct1-max Oct 12, 2026
450563b
Merge integration PTY instrumentation into timeout diagnostics
agenteinstinct1-max Oct 12, 2026
09c690b
Reuse healthy compatible daemons when active-run probing is unknown
agenteinstinct1-max Oct 12, 2026
d4ee262
Serialize effort metadata writes and retain overlays until settled
agenteinstinct1-max Oct 12, 2026
e160708
Merge commit 'f9b112dd096f1df6f2b10db90fc2b90afc90fbfc' into HEAD
agenteinstinct1-max Oct 12, 2026
ddf5375
Merge pull request #275 from mdev34-lab/instinct/pty-exit-timeout-obs…
agenteinstinct1-max Oct 12, 2026
2a0b1d2
Widen daemon failure-only test outcome generics
agenteinstinct1-max Oct 12, 2026
01ff5db
Propagate finish storage defects and use typed depth handoff
agenteinstinct1-max Oct 12, 2026
9707ca2
Merge commit 'ddf5375ffade3cc5c01637ff79011fa44df7a8ab' into HEAD
agenteinstinct1-max Oct 12, 2026
f8353d4
Share reviewer routing rule between task and finish
agenteinstinct1-max Oct 12, 2026
41db38d
Own exit listener accounting and remove PTY diagnostic logs
agenteinstinct1-max Oct 12, 2026
3d4f382
Merge pull request #283 from mdev34-lab/instinct/issue-248-compatible…
agenteinstinct1-max Oct 12, 2026
7c98a9f
Merge commit '3d4f382cea82fa44a7ce74967ecf6cbac40af5c9' into HEAD
agenteinstinct1-max Oct 12, 2026
911036a
Merge commit '3d4f382cea82fa44a7ce74967ecf6cbac40af5c9' into HEAD
agenteinstinct1-max Oct 12, 2026
79e8620
Merge pull request #282 from mdev34-lab/instinct/issue-274-exit-repla…
agenteinstinct1-max Oct 12, 2026
051ee75
Merge commit '79e86206b5def23f37b36d5575668e176a6c7022' into HEAD
agenteinstinct1-max Oct 12, 2026
e554b1c
fix(effort): match resolved reviewer dispatch availability
Oct 12, 2026
0f3b71f
Merge pull request #254 from mdev34-lab/instinct/issue-235-agent-effort
agenteinstinct1-max Oct 12, 2026
53a96bd
Merge current integration after effort dependency
Oct 12, 2026
55f0eba
Merge pull request #265 from mdev34-lab/instinct/reverse-child-write-…
agenteinstinct1-max Oct 12, 2026
44a1148
Merge dev into dev-vibecoded for SilverCode consolidation
agenteinstinct1-max Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 0 additions & 66 deletions .github/workflows/pr-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,72 +5,6 @@ on:
types: [opened]

jobs:
check-duplicates:
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 1

- name: Check team membership
id: team-check
run: |
LOGIN="${{ github.event.pull_request.user.login }}"
if [ "$LOGIN" = "opencode-agent[bot]" ] || grep -qxF "$LOGIN" .github/TEAM_MEMBERS; then
echo "is_team=true" >> "$GITHUB_OUTPUT"
echo "Skipping: $LOGIN is a team member or bot"
else
echo "is_team=false" >> "$GITHUB_OUTPUT"
fi

- name: Setup Bun
if: steps.team-check.outputs.is_team != 'true'
uses: ./.github/actions/setup-bun

- name: Install dependencies
if: steps.team-check.outputs.is_team != 'true'
run: bun install

- name: Install opencode
if: steps.team-check.outputs.is_team != 'true'
run: curl -fsSL https://opencode.ai/install | bash

- name: Build prompt
if: steps.team-check.outputs.is_team != 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
{
echo "Check for duplicate PRs related to this new PR:"
echo ""
echo "CURRENT_PR_NUMBER: $PR_NUMBER"
echo ""
echo "Title: $(gh pr view "$PR_NUMBER" --json title --jq .title)"
echo ""
echo "Description:"
gh pr view "$PR_NUMBER" --json body --jq .body
} > pr_info.txt

- name: Check for duplicate PRs
if: steps.team-check.outputs.is_team != 'true'
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
COMMENT=$(bun script/duplicate-pr.ts -f pr_info.txt "Check the attached file for PR details and search for duplicates")

if [ "$COMMENT" != "No duplicate PRs found" ]; then
gh pr comment "$PR_NUMBER" --body "_The following comment was made by an LLM, it may be inaccurate:_

$COMMENT"
fi

add-contributor-label:
runs-on: ubuntu-latest
permissions:
Expand Down
38 changes: 17 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
name: publish
run-name: "${{ inputs.dry_run && 'dry-run ' || '' }}release ${{ inputs.version || inputs.bump }}"
run-name: "${{ inputs.dry_run && 'dry-run ' || '' }}release"

on:
workflow_dispatch:
inputs:
bump:
description: "auto = derive from conventional commits since last tag"
type: choice
default: auto
options: [auto, patch, minor, major]
version:
description: "Override version, e.g. 0.2.0 (required for the first release)"
required: false
type: string
dry_run:
description: "Compute version + notes only; create nothing"
type: boolean
Expand Down Expand Up @@ -43,11 +34,11 @@ jobs:
with:
fetch-depth: 0
- uses: ./.github/actions/setup-bun
- name: Check package metadata
run: ./script/release-check.ts
- id: version
run: ./script/version.ts
env:
OPENCODE_BUMP: ${{ inputs.bump }}
OPENCODE_VERSION: ${{ inputs.version }}
DRY_RUN: ${{ inputs.dry_run && '1' || '' }}
outputs:
version: ${{ steps.version.outputs.version }}
Expand All @@ -60,13 +51,19 @@ jobs:
if: ${{ !inputs.dry_run }}
runs-on: ubuntu-latest
steps:
# Build the exact tag, not the moving branch, so the artifacts are reproducible.
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: ${{ needs.version.outputs.tag }}
fetch-depth: 0
- uses: ./.github/actions/setup-bun
- name: Check tag against package metadata
run: ./script/release-check.ts --tag "${{ needs.version.outputs.tag }}"
- name: Build all targets and upload archives to the draft release
run: ./packages/opencode/script/build.ts
env:
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
OPENCODE_RELEASE_ID: ${{ needs.version.outputs.release_id }}
SILVERCODE_VERSION: ${{ needs.version.outputs.version }}
SILVERCODE_RELEASE: "1"
- name: Attach install script
run: gh release upload "${{ needs.version.outputs.tag }}" ./install --clobber

Expand All @@ -84,10 +81,9 @@ jobs:
if: ${{ always() && failure() && !inputs.dry_run && needs.version.outputs.tag != '' }}
runs-on: ubuntu-latest
steps:
- name: Delete leftover draft (never a published release)
env:
TAG: ${{ needs.version.outputs.tag }}
run: |
if [ "$(gh release view "$TAG" --json isDraft --jq .isDraft)" = "true" ]; then
gh release delete "$TAG" --yes
fi
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: ./.github/actions/setup-bun
# Removes a leftover draft release and its tag, or an orphan tag pushed
# before the draft existed. Never touches a published release.
- name: Delete leftover draft and orphan tag (never a published release)
run: ./script/release-cleanup.ts "${{ needs.version.outputs.tag }}"
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
run: bun run check:generated

- name: Run HttpApi exerciser gates
timeout-minutes: 20
if: runner.os == 'Linux'
working-directory: packages/opencode
run: bun run test:httpapi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: typecheck

on:
push:
branches: [dev]
branches: [dev, dev-vibecoded]
pull_request:
branches: [dev]
branches: [dev, dev-vibecoded]
workflow_dispatch:

jobs:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ bun install
```

> **Note:** the executable is now named `silvercode`. Config and data paths (`~/.opencode`) are unchanged.

## Documentation

- [Agent effort](specs/agent-effort.md) — the fast/medium/thorough dial: configuration, review passes, validation gates, and the `task()` override.
2 changes: 2 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

159 changes: 150 additions & 9 deletions docs/releasing.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,75 @@
# Releasing SilverCode

Releases are GitHub Releases built from tags. No package version file is edited and no bot commits back to `dev`.
Releases are GitHub Releases built from tags. The release version is committed to the
repository before the release is cut: no release step rewrites history and nothing
commits back to `dev` on your behalf.

## The version source

Root `package.json` holds the one authoritative version. Everything else derives from it
and is checked against it:

| Surface | Example | Enforced by |
| --- | --- | --- |
| `package.json` (root) | `0.1.0` | `./script/bump.ts` is the only writer |
| `packages/opencode/package.json` (executable) | `0.1.0` | `./script/bump.ts`, `./script/release-check.ts` |
| Build / runtime (`silvercode --version`) | `0.1.0` | release guard in `@opencode-ai/script`, `--version` smoke test in `script/build.ts` |
| Git tag | `v0.1.0` | `./script/release-check.ts --tag v0.1.0` (runs in the publish workflow) |

A release build is always built from the exact tag, so a clean checkout of `vX.Y.Z`
reports `X.Y.Z` both from package metadata and from `silvercode --version`.

`0.1.0` is the inherited baseline. Local-only builds that were never committed, tagged
or released stay that way - no historical releases are manufactured for them.

## Cut a release

Use **Actions → publish → Run workflow** and select `dev`. Normally run `script/release` (auto bump), or choose an explicit `patch`, `minor`, or `major` bump. To preview first, run `script/release minor --dry-run`; dry runs are allowed from any ref and create no release. You can also set `VERSION=1.2.3` to override the version.
From a clean `dev` checkout, in this exact order:

```bash
# 1. Bump the authoritative version (deterministic SemVer; rewrites both package.json files)
./script/bump.ts patch # or minor / major / auto / X.Y.Z

# 2. Commit and push - the release tag is created at this commit
git add package.json packages/opencode/package.json
git commit -m "chore(release): v<version>"
git push origin dev

# 3. Preview the release notes (allowed from any ref; creates nothing)
./script/release --dry-run

# 4. Cut the release (dev only): pushes the tag, creates the draft release, builds
# every target from that tag, attaches the archives, then publishes
./script/release
```

Step 4 is a `gh workflow run publish.yml --ref dev` dispatch. The workflow lifecycle is:

1. **version job** (`./script/version.ts`): validates the metadata, **pushes the tag to
origin**, then creates the draft release bound to that tag. The tag comes first on
purpose: a draft release creates no git ref until it is published, so without the
explicit push the build job would have no tag to check out. The job is idempotent -
a rerun adopts a tag it already pushed and a draft it already created, and rolls its
own tag back if the draft creation fails.
2. **build job** (`./packages/opencode/script/build.ts`): checks out the pushed tag and
builds from it, then uploads exactly the archives the build produced (a single-target
build uploads its own archive; nothing is globbed).
3. **finalize job**: publishes the draft and marks it latest.

A tag that already points at a different commit, and a release that is already
published, are both hard errors - bump the version instead. The workflow never moves or
reuses someone else's tag.

### Choosing the bump

- `patch` / `minor` / `major`: explicit SemVer bump of the committed version.
- `auto`: derives the bump from conventional commits on the first-parent history since
the last `vX.Y.Z` tag.
- `X.Y.Z`: explicit target version.

Auto bump examines conventional commits on the first-parent history since the last `vX.Y.Z` tag:
`auto` needs a previous tag, so the first SilverCode release must be an explicit
`patch`, `minor`, `major`, or `X.Y.Z`. `./script/bump.ts` refuses to move the version
backwards, to bump to a prerelease, or to reuse a version that already has a tag.

| Commit | Bump |
| --- | --- |
Expand All @@ -15,18 +78,96 @@ Auto bump examines conventional commits on the first-parent history since the la
| `type!:` or a `BREAKING CHANGE:` footer | minor while the current major is 0; major once it is at least 1 |
| Other types | no bump |

`auto` fails when there are no releasable commits. Auto bump never moves version 0 to 1; use an explicit `version=1.0.0` when making that transition.
`auto` fails when there are no releasable commits. It never moves version 0 to 1; use an
explicit version for that transition.

## First tracked release
## Version checks

The first release establishes the tag baseline. On `dev`, run the workflow once with `version=0.2.0` and `dry_run=true`; verify the summary, then repeat with `dry_run=false`. Do not create a tag or edit a `package.json` by hand.
```bash
./script/release-check.ts # package metadata (and the tag at HEAD, when there is one)
./script/release-check.ts --tag v0.1.1 # strict: HEAD must really be tagged v0.1.1, on a clean tree
./script/bump.ts patch --dry-run # print the bump, write nothing
```

The check exits non-zero and lists every disagreement (root vs executable package,
package vs tag, package vs runtime). It runs in both publish jobs, so a release whose
tag, package metadata and embedded version disagree cannot be built.

A clean checkout of a release tag is a release build on its own: `Script.channel` is
`latest` and the runtime reports the committed package version - but only when the tag
actually matches root `package.json`. A tag that disagrees with the package metadata
fails the build instead of silently lending it release semantics, and a checkout of a
tag with uncommitted changes reports `X.Y.Z+<sha>.dirty` (never the exact release
version), so a modified tree can never pass as the published artifact. Explicit
configuration (`SILVERCODE_CHANNEL`, `SILVERCODE_VERSION`, `SILVERCODE_BUMP`) keeps its own
semantics; the release guard still gates any actual publish.

`--tag` declares which release is being built; it never stands in for a missing one.
The strict form asks git directly (`git tag --points-at HEAD`) and refuses when HEAD is
untagged, when HEAD carries a different tag, or when tracked files have uncommitted
changes. `GITHUB_REF_NAME` and friends are never accepted as a substitute. The
metadata-only form is what the `version` job runs before any tag exists.

Unknown flags are errors, not fallbacks: `./script/bump.ts patch --dry-rnu` and
`./script/release-check.ts --tagg v0.1.1` both fail instead of quietly doing something
less strict - or, worse, a real write.

A development build can never publish a release: the build only uploads artifacts when
`SILVERCODE_RELEASE` is set, and `@opencode-ai/script` refuses to start a release build
whose version is not the exact, stable, committed package version, whose HEAD is not the
matching release tag, or whose tree is dirty. `./script/bump.ts` validates and rewrites
root `package.json` and `packages/opencode/package.json` together: both are read and
checked before either is written, so a half-bumped tree is impossible.

## Environment variables

| Variable | Meaning |
| --- | --- |
| `SILVERCODE_VERSION` | Version to build/embed; in a release build it must equal `package.json`. Implies the `latest` channel: combining it with an explicit non-`latest` channel is an error |
| `SILVERCODE_BUMP` | `auto`, `patch`, `minor` or `major`; forces the release channel |
| `SILVERCODE_CHANNEL` | `latest` for release builds; anything else is a development build |
| `SILVERCODE_RELEASE` | Truthy to attach build artifacts to the release |
| `SILVERCODE_RELEASE_ID` | Release database id; treated as a release signal |

The pre-rename `ALPHACODE_*` names and the inherited `OPENCODE_VERSION`, `OPENCODE_BUMP`,
`OPENCODE_CHANNEL` and `OPENCODE_RELEASE_ID` names are still accepted as compatibility
aliases (the nix derivation uses the `OPENCODE_*` ones), but setting an alias and its
`SILVERCODE_*` name to different
values is an error, not a silent choice. That includes release signals that contradict
each other: a new `SILVERCODE_RELEASE=false` beside an inherited `OPENCODE_RELEASE_ID`
fails the build instead of publishing on the strength of the inherited variable. Clear
one of them.

A release version is exactly `X.Y.Z`: no prerelease and no build metadata. `X.Y.Z+<sha>`
is a build artifact, never a release, and is rejected everywhere a release is expected.

## Reproduce a release

```bash
git checkout v<version> # detached HEAD: the exact tagged commit, clean tree
./script/release-check.ts --tag v<version>
cd packages/opencode && bun run script/build.ts --single
./dist/silvercode-ai-linux-x64/bin/silvercode --version # prints <version>
```

The first two commands are the same ones the `build` job runs, so a release that cannot
be reproduced locally by this sequence cannot be published either.

## Builds and updates

Non-release builds are versioned `X.Y.(Z+1)-dev.N+<sha7>[.dirty]` (`0.0.1-dev.N+<sha7>` before the first tag). Preview/local builds do not check for or install updates.
Non-release builds are versioned `X.Y.(Z+1)-dev.N+<sha7>[.dirty]` (`0.0.1-dev.N+<sha7>`
before the first tag). Preview/local builds do not check for or install updates.

Release builds check this repository's latest GitHub Release. Patch updates install automatically by default; major and minor updates notify instead. Set `autoupdate: "notify"` in the user config to notify for patch updates too.
Release builds check this repository's latest GitHub Release. Patch updates install
automatically by default; major and minor updates notify instead. Set
`autoupdate: "notify"` in the user config to notify for patch updates too.

## Failures and hotfixes

A failed build leaves no published release: the `cleanup` job deletes a leftover draft. A hotfix is an ordinary release from `dev`: merge or cherry-pick the fix into `dev`, then cut a normal patch release.
A failed build leaves no published release: the `cleanup` job (`./script/release-cleanup.ts`)
deletes a leftover draft release together with its tag, or an orphan tag pushed before the
draft existed. A published release and its tag are never touched. Once cleanup has run, the
same version can be released again by re-running the workflow.

A hotfix is an ordinary release from `dev`: merge or cherry-pick the fix into `dev`,
then cut a normal patch release.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"@types/node": "catalog:"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"@ff-labs/[email protected]": "patches/@ff-labs%[email protected]",
"@npmcli/[email protected]": "patches/@npmcli%[email protected]",
"@silvia-odwyer/[email protected]": "patches/@silvia-odwyer%[email protected]",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"scripts": {
"build": "bun run script/build.ts",
"dev": "bun run src/index.ts",
"test": "bun test --timeout 30000 --only-failures",
"typecheck": "tsgo --noEmit"
},
"dependencies": {
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/script/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ for (const item of targets) {
windows: {},
},
define: {
SILVERCODE_VERSION: `'${Script.version}'`,
SILVERCODE_CHANNEL: `'${Script.channel}'`,
ALPHACODE_VERSION: `'${Script.version}'`,
ALPHACODE_CHANNEL: `'${Script.channel}'`,
OPENCODE_VERSION: `'${Script.version}'`,
OPENCODE_CLI_NAME: `'${binary}'`,
OPENCODE_MODELS_DEV: modelsData,
Expand Down
Loading
Loading