Repository navigation
Description
State (2026-10-18)
- fork
dev=1237acfb(feat(guardrails): add DeepSeek V4.1 Flash, retire V4 ids #337, 2026-10-01); upstreamanomalyco/opencodedev=da9d436c. origin/devvsupstream/dev: ahead 257 / behind 4846; merge-base95daf90(2026-09-11). The local build in use (~/.local/bin/opencode→packages/opencode/dist/opencode-darwin-arm64) is from 2026-09-12 (0.0.0-dev-202609120902).- A dry-run
git merge upstream/devon a throwaway worktree stops with 68 conflicting files; the merge was aborted and nothing was pushed.
Conflicts by directory
4 .github/workflows
3 packages/opencode/src/session
3 packages/opencode/src/cli/cmd/run
2 packages/opencode/test/provider
2 packages/opencode/test/cli/run
2 packages/opencode/src/tool
2 packages/opencode/src/provider
2 packages/opencode/src/cli/cmd
2 packages/core/test
2 packages/core/src/tool
2 packages/core/src
2 packages/app
1 turbo.json
1 script
1 patches
1 packages/tui/src/component/prompt
1 packages/tui/src/component
1 packages/tui/src
1 packages/tui
1 packages/storybook/.storybook/mocks
1 packages/session-ui
1 packages/sdk
1 packages/script/src
1 packages/plugin/src
1 packages/plugin
1 packages/opencode/test/tool
1 packages/opencode/test/session
1 packages/opencode/test/lib
1 packages/opencode/test/config
1 packages/opencode/test/cli/help/__snapshots__
1 packages/opencode/test/cli/help
1 packages/opencode/test/agent
1 packages/opencode/src/server/routes/instance/httpapi/handlers
1 packages/opencode/src/plugin/openai
1 packages/opencode/src/config
1 packages/opencode/src/agent
1 packages/opencode/src
1 packages/opencode/script
1 packages/opencode/bin
1 packages/opencode
1 packages/llm
1 packages/http-recorder
1 packages/effect-drizzle-sqlite
1 packages/core/test/plugin/fixtures
1 packages/core/test/plugin
1 packages/core/src/plugin
1 packages/core
1 packages/app/src/runtime/i18n
1 package.json
1 bun.lock
1 .gitignore
1 .github/actions/setup-bun
files
.github/actions/setup-bun/action.yml
.github/workflows/generate.yml
.github/workflows/publish.yml
.github/workflows/test.yml
.github/workflows/typecheck.yml
.gitignore
bun.lock
package.json
packages/app/package.json
packages/app/playwright.config.ts
packages/app/src/runtime/i18n/desktop-native.ts
packages/core/package.json
packages/core/src/event.ts
packages/core/src/models-dev.ts
packages/core/src/plugin/variant.ts
packages/core/src/tool/edit.ts
packages/core/src/tool/write.ts
packages/core/test/plugin/fixtures/models-dev.json
packages/core/test/plugin/variant.test.ts
packages/core/test/tool-edit.test.ts
packages/core/test/tool-write.test.ts
packages/effect-drizzle-sqlite/package.json
packages/http-recorder/package.json
packages/llm/package.json
packages/opencode/bin/opencode
packages/opencode/package.json
packages/opencode/script/build.ts
packages/opencode/src/agent/subagent-permissions.ts
packages/opencode/src/cli/cmd/attach.ts
packages/opencode/src/cli/cmd/run/footer.permission.tsx
packages/opencode/src/cli/cmd/run/footer.view.tsx
packages/opencode/src/cli/cmd/run/permission.shared.ts
packages/opencode/src/cli/cmd/session.ts
packages/opencode/src/config/config.ts
packages/opencode/src/index.ts
packages/opencode/src/plugin/openai/codex.ts
packages/opencode/src/provider/provider.ts
packages/opencode/src/provider/transform.ts
packages/opencode/src/server/routes/instance/httpapi/handlers/event.ts
packages/opencode/src/session/processor.ts
packages/opencode/src/session/prompt.ts
packages/opencode/src/session/session.ts
packages/opencode/src/tool/invalid.ts
packages/opencode/src/tool/task.ts
packages/opencode/test/agent/plan-mode-subagent-bypass.test.ts
packages/opencode/test/cli/help/__snapshots__/help-snapshots.test.ts.snap
packages/opencode/test/cli/help/help-snapshots.test.ts
packages/opencode/test/cli/run/permission.shared.test.ts
packages/opencode/test/cli/run/run-process.test.ts
packages/opencode/test/config/config.test.ts
packages/opencode/test/lib/cli-process.ts
packages/opencode/test/provider/provider.test.ts
packages/opencode/test/provider/transform.test.ts
packages/opencode/test/session/processor-effect.test.ts
packages/opencode/test/tool/task.test.ts
packages/plugin/package.json
packages/plugin/src/index.ts
packages/script/src/index.ts
packages/sdk/.gitignore
packages/session-ui/package.json
packages/storybook/.storybook/mocks/solid-router.tsx
packages/tui/package.json
packages/tui/src/component/prompt/index.tsx
packages/tui/src/component/spinner.tsx
packages/tui/src/runtime.tsx
patches/[email protected]
script/beta.ts
turbo.json
Why it matters
The H17 common control reaches OpenCode through ~/.config/opencode/plugins/aidd-cc.ts (claude-code-skills opencode/aidd-cc.ts), which relies on experimental.text.complete, session.idle, tool.execute.before/after and chat.message. Upstream plugin-API changes since September are not reflected in the fork or in the binary we run, so the live OpenCode lane is tested against a September build.
Proposal
A dedicated session: merge upstream/dev into a chore/sync-upstream-dev-<date> branch, resolve the 68 conflicts (guardrails package vs. core moves), run bun run local:check (note #338/#339 pre-existing failures), rebuild packages/opencode/dist/opencode-darwin-arm64, re-run the H17 OpenCode replay arm and one live lane, then PR to dev. Owner decision needed on whether fork-side core patches are kept or re-based as guardrails-only.
Opened by the H17 landing session (claude-code-skills anomalyco#420–anomalyco#424) while checking whether the fork reflects upstream; it does not.
Activity
terisuke commentedon Oct 18, 2026
Re-platform decision (owner, 2026-10-18) and what is in place
Merging upstream is not the path: upstream removed
packages/opencode(the fork's binary and 15,417 lines of fork patches) and replaced the plugin API — none of the five 1.x hook names exist in@opencode/plugin2.0.32. The fork is re-platformed on the upstream CLI instead.Done so far:
@opencode/[email protected]installed in a separate prefix (~/.opencode-2/pkg) with its own config/data/state (~/.opencode-2/{config,data,state}), launcher~/.local/bin/opencode2.opencode/aidd-cc-v2, loaded as a directory; mapping table in the PR). Driver test against the real oracle passes; a server-side spike showed the directory plugin loading andsession.promptfiring.Open:
Statusre-prompt) from the owner's terminal.packages/guardrails(fork, 95 files): its plugins are 1.x shape and import fork internals (packages/opencode/src/util/background) — needs the same kind of port (ctx.model.transformfor the whitelist,ctx.tool.hookfor gates,ctx.session.hook("prompt")for issue gates). Not started.devre-base: proposal = new branch fromupstream/devcarrying onlypackages/guardrails(ported) + docs; the 1.x binary stays available as the September build until the guardrails port lands.terisuke commentedon Oct 18, 2026
2026-10-18 23:05Z: H17 2.x plugin confirmed live on upstream @opencode/cli 2.0.32 from the owner's terminal via
opencode2(tool call →no status declared after tool useblock → re-prompt →Status: completewithout Evidence → block). Details on claude-code-skills anomalyco#426. Remaining: guardrails port and fork re-base.terisuke commentedon Oct 19, 2026
Re-platform progress (2026-10-19):
feat(guardrails): re-platform fork dev onto upstream 2.x— branchfeat/replatform-upstream-2x= upstreamanomalyco/opencodedevda9d436c36+packages/guardrailson the 2.x plugin API (bridge inprofile/src/v2/, entriesprofile/plugins/{guardrail,team}/index.ts, 1.x sources moved toprofile/src/because 2.x auto-discovers every top-level*.tsunderplugins/). Fork history kept as ancestor viamerge -s ours, so the PR merges without the 68 conflicts of a plain sync.bun test profile/src profile/plugins104 pass; live load with@opencode/cli2.0.32: three plugin directories load, 0 failed loads.aidd-cc-v2) +opencode2launcher; the guardrails launcher passes it throughOPENCODE_GUARDRAILS_EXTRA_PLUGINS.~/.local/bin/opencode→opencode2(2.x + guardrails profile + H17), the 1.x wrapper stays asopencode1.Not carried onto the new dev:
scripts/local-dev-deploy.sh(1.x dist pinning) and the fork's 1.x patches inside upstream packages. Open until #343 merges and the owner runs the real-key lane.terisuke commentedon Oct 19, 2026
クローズ条件 3 つがそろったので閉じます(2026-10-19)。
profile/src/v2/の橋渡しで、1.x のguardrail.ts/team.tsをそのまま 2.x プラグイン API に載せた。bun test profile/src profile/plugins117 pass。devを上流に載せ替え:feat(guardrails): re-platform fork dev onto upstream 2.x (guardrails on the 2.x plugin API) #343 を7cca54fdb1でマージ。上流 anomalyco/opencodedev(da9d436c36)+packages/guardrails。旧 dev はmerge -s oursで祖先として残した。opencodeを 2.x に切り替え:本機の~/.local/bin/opencode→opencode2(2.x+guardrails+H17)。1.x はopencode1。実キーでの確認(本人の端末、2026-10-19 12:46–12:50Z):H17 が Status なしの完了を block し、guardrails が保護ブランチへの push を実行前に拒否した。記録は aidd-governance#205(
h17-common-control.md§18.2)。持ち越さなかったもの:fork の 1.x コアへのパッチ、
scripts/local-dev-deploy.sh、artifacts/。上流のワークフローのうち test / check / storybook / nix-eval は上流専用のランナー(blacksmith-4vcpu-ubuntu-2404)を要求するため、この fork では起動しない(dev の必須チェックは gitleaks のみ)。