opencode-agent-orchestration-kit 1.0.44 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +0 -1
- package/NOTICE.md +1 -5
- package/README.md +37 -49
- package/compatibility.json +7 -0
- package/docs/cli.md +69 -1
- package/docs/commands.md +1 -1
- package/docs/comparison.md +3 -3
- package/docs/compatibility.md +33 -14
- package/docs/installation.md +2 -0
- package/docs/models.md +1 -1
- package/docs/open-design.md +2 -0
- package/docs/opencode-v2.md +190 -0
- package/docs/releases/v1.0.45.md +77 -0
- package/docs/releases/v1.1.0.md +91 -0
- package/docs/supply-chain.md +4 -7
- package/docs/threat-model.md +16 -6
- package/docs/troubleshooting.md +7 -4
- package/docs/workflows.md +27 -4
- package/opencode/AGENTS.md +18 -10
- package/opencode/agents/designer.md +1 -1
- package/opencode/agents/developer.md +60 -6
- package/opencode/agents/lead.md +59 -10
- package/opencode/agents/reviewer.md +7 -0
- package/opencode/agents/scoper.md +1 -0
- package/opencode/agents/specifier.md +1 -0
- package/opencode/commands/autonomous.md +175 -24
- package/opencode/docs/ai/evolution/README.md +5 -4
- package/opencode/docs/ai/evolution/benchmarks/adversarial-scenarios.jsonl +3 -0
- package/opencode/docs/ai/evolution/session-sources.md +12 -0
- package/opencode/docs/ai/harness/agents.md +23 -6
- package/opencode/docs/ai/harness/checks.md +3 -2
- package/opencode/docs/ai/harness/commands.md +7 -4
- package/opencode/docs/ai/harness/skill_registry.json +107 -1
- package/opencode/docs/ai/harness/skill_registry.md +5 -0
- package/opencode/docs/ai/specs/mission-runtime.md +9 -0
- package/opencode/opencode.json +0 -1
- package/opencode/plugins/mission-runtime.test.mjs +15 -3
- package/opencode/plugins/mission-runtime.ts +11 -39
- package/opencode/plugins/oak-tui/server.ts +8 -0
- package/opencode/plugins/oak-tui/tui.tsx +81 -0
- package/opencode/plugins/open-design.ts +12 -0
- package/opencode/plugins/shell-export-guard.ts +13 -23
- package/opencode/plugins/token-tree-usage.tsx +4 -1
- package/opencode/runtime/v1/mission-runtime.ts +73 -0
- package/opencode/runtime/v1/shell-export-guard.ts +9 -0
- package/opencode/runtime/v2/mission-events.d.mts +13 -0
- package/opencode/runtime/v2/mission-events.mjs +64 -0
- package/opencode/runtime/v2/mission-events.test.mjs +120 -0
- package/opencode/runtime/v2/mission-runtime.ts +26 -0
- package/opencode/runtime/v2/open-design.ts +17 -0
- package/opencode/runtime/v2/shell-export-guard.ts +8 -0
- package/opencode/runtime/v2/token-usage.d.mts +15 -0
- package/opencode/runtime/v2/token-usage.mjs +35 -0
- package/opencode/runtime/v2/token-usage.test.mjs +30 -0
- package/opencode/scripts/adversarial-harness.test.mjs +50 -1
- package/opencode/scripts/check-harness.mjs +150 -33
- package/opencode/scripts/check-harness.test.mjs +81 -8
- package/opencode/scripts/collect-session-evidence.mjs +57 -39
- package/opencode/scripts/collect-session-evidence.test.mjs +164 -0
- package/opencode/scripts/deliver.d.mts +37 -0
- package/opencode/scripts/deliver.mjs +204 -0
- package/opencode/scripts/deliver.test.mjs +245 -0
- package/opencode/scripts/loop-state.mjs +50 -1
- package/opencode/scripts/loop-state.test.mjs +33 -0
- package/opencode/scripts/mission-runtime.test.mjs +1 -1
- package/opencode/scripts/mission-status.test.mjs +2 -0
- package/opencode/scripts/runtime-permission-policy.mjs +1 -1
- package/opencode/scripts/runtime-permission-policy.test.mjs +3 -2
- package/opencode/scripts/session-sources.d.mts +6 -0
- package/opencode/scripts/session-sources.mjs +49 -0
- package/opencode/scripts/shell-export-guard-core.d.mts +2 -0
- package/opencode/scripts/shell-export-guard-core.mjs +21 -0
- package/opencode/scripts/shell-export-guard-core.test.mjs +43 -0
- package/opencode/scripts/task-run.d.mts +63 -0
- package/opencode/scripts/task-run.mjs +224 -0
- package/opencode/scripts/task-run.test.mjs +178 -0
- package/opencode/skills/debugging-and-error-recovery/SKILL.md +20 -0
- package/opencode/skills/oak-adversarial-review/SKILL.md +138 -0
- package/opencode/skills/oak-commit/SKILL.md +69 -0
- package/opencode/skills/oak-enrich-task/SKILL.md +109 -0
- package/opencode/skills/oak-runtime-verification/SKILL.md +103 -0
- package/opencode/skills/oak-update-docs/SKILL.md +54 -0
- package/opencode/tools/open-design-tools.d.mts +17 -0
- package/opencode/tools/open-design-tools.mjs +254 -0
- package/opencode/tools/open_design.ts +26 -259
- package/package.json +6 -3
- package/scripts/benchmark-tool-paths.mjs +1 -1
- package/scripts/check-compatibility.mjs +58 -4
- package/scripts/check-compatibility.test.mjs +159 -11
- package/scripts/check-public-boundary.mjs +3 -0
- package/scripts/check-supply-chain.mjs +26 -58
- package/scripts/check-supply-chain.test.mjs +39 -36
- package/scripts/check.sh +42 -7
- package/scripts/manage-installation.mjs +34 -20
- package/scripts/manage-installation.test.mjs +29 -0
- package/scripts/oak.mjs +72 -2
- package/scripts/oak.test.mjs +69 -1
- package/scripts/open-design-http.test.mjs +1 -1
- package/scripts/open-design-tools.test.mjs +49 -0
- package/scripts/opencode-compat-smoke.sh +45 -4
- package/scripts/opencode-v2-smoke.mjs +197 -0
- package/scripts/opencode-v2-smoke.test.mjs +59 -0
- package/scripts/package-smoke.mjs +14 -0
- package/scripts/package-smoke.test.mjs +45 -2
- package/scripts/version.test.mjs +2 -2
- package/supply-chain.json +0 -4
- package/docker/open-design/data/app.sqlite +0 -0
- package/docker/open-design/data/app.sqlite-shm +0 -0
- package/docker/open-design/data/app.sqlite-wal +0 -0
- package/docker/open-design/opencode-auth/log/2026-05-02T105802.log +0 -17
- package/docker/open-design/opencode-auth/log/2026-05-04T102127.log +0 -16
- package/docker/open-design/opencode-auth/opencode.db +0 -0
- package/docker/open-design/opencode-auth/opencode.db-shm +0 -0
- package/docker/open-design/opencode-auth/opencode.db-wal +0 -0
- package/docs/superpowers.md +0 -41
package/CONTRIBUTING.md
CHANGED
|
@@ -38,7 +38,6 @@ This repository is a starter kit, so changes should stay small, portable, and sa
|
|
|
38
38
|
## Project conventions
|
|
39
39
|
|
|
40
40
|
- `open-design` is the only skill wrapper bundled locally.
|
|
41
|
-
- Superpowers is referenced through the upstream OpenCode plugin, not vendored.
|
|
42
41
|
- Impeccable is optional and user-installed.
|
|
43
42
|
- Free-form messages should use direct developer mode for small changes.
|
|
44
43
|
- Slash commands are explicit workflow contracts.
|
package/NOTICE.md
CHANGED
|
@@ -15,9 +15,5 @@ This repository does not claim affiliation with the upstream projects listed bel
|
|
|
15
15
|
- Impeccable: https://github.com/pbakaus/impeccable
|
|
16
16
|
- License: Apache-2.0
|
|
17
17
|
- Referenced as an optional design-context skill for creating or improving PRODUCT.md and DESIGN.md.
|
|
18
|
-
- Superpowers: https://github.com/obra/superpowers
|
|
19
|
-
- License: MIT
|
|
20
|
-
- Copyright (c) 2025 Jesse Vincent
|
|
21
|
-
- Referenced as an optional OpenCode plugin for workflow discipline, planning, TDD, debugging, verification, and review.
|
|
22
18
|
|
|
23
|
-
This kit does not vendor the full source code of OpenCode, Open Design,
|
|
19
|
+
This kit does not vendor the full source code of OpenCode, Open Design, or Impeccable. Where installation is needed, documentation and configuration point to the upstream repositories so their original licenses, notices, and update paths remain intact.
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ This kit provides a documented OpenCode harness with:
|
|
|
52
52
|
- Local process skills and reusable engineering checklists.
|
|
53
53
|
- Safe installation and uninstall scripts.
|
|
54
54
|
- Local validation for configuration and harness contracts.
|
|
55
|
-
- Optional integrations for Open Design,
|
|
55
|
+
- Optional integrations for Open Design, Impeccable, and observability.
|
|
56
56
|
|
|
57
57
|
The goal is not to force every request through a heavy process. Small, clear, low-risk changes can go directly to implementation. Larger or ambiguous work can follow a structured flow with research, planning, review, and evidence.
|
|
58
58
|
|
|
@@ -64,6 +64,9 @@ The goal is not to force every request through a heavy process. Small, clear, lo
|
|
|
64
64
|
| Product-development workflows | Structured flows for features, plans, scoped research, bounded engineering loops, MVP specs, testing, simplification, and review |
|
|
65
65
|
| Bounded routing | A default `lead` agent that routes simple requests directly and escalates only when needed |
|
|
66
66
|
| Local skills | Practical checklists for testing, debugging, security, performance, documentation, APIs, code review, and more |
|
|
67
|
+
| Process skills | OAK's own skills for each phase: task enrichment, adversarial review, runtime verification, documentation updates, and commits. No external plugin is required |
|
|
68
|
+
| Task runs and delivery | `oak run` links the sessions of one change; `oak deliver` is the only path that pushes a branch and opens a pull request |
|
|
69
|
+
| OpenCode 1 and 2 | One installation loads on OpenCode 1 (supported) and OpenCode 2 (experimental) |
|
|
67
70
|
| Safe installation | Backup-aware install and uninstall scripts, plus a project-local test mode |
|
|
68
71
|
| Validation | Mechanical checks for JSON configuration, agent contracts, command contracts, and harness consistency |
|
|
69
72
|
| Adversarial safety | Portable fixtures for injection, unsafe paths, wrapper/network permissions, approval integrity, supply-chain pins, and corrupt events |
|
|
@@ -79,17 +82,19 @@ into unlimited or unattended execution:
|
|
|
79
82
|
- `/loop` requires an approved task contract before writes, allows at most
|
|
80
83
|
three iterations per invocation within a task-specific one-to-six iteration
|
|
81
84
|
budget, and can resume from durable state. Worktrees are explicit opt-in.
|
|
82
|
-
- `/autonomous`
|
|
83
|
-
iteration budget, runs deterministic validation in every iteration,
|
|
84
|
-
|
|
85
|
+
- `/autonomous` works on a feature branch, uses a task-specific one-to-six
|
|
86
|
+
iteration budget, runs deterministic validation in every iteration, stops
|
|
87
|
+
iterating as soon as an independent `reviewer` approves the result, and
|
|
88
|
+
ends at an open pull request through `oak deliver`.
|
|
85
89
|
- Both workflows use a schema-versioned JSON snapshot, append-only JSONL
|
|
86
90
|
history, an exclusive lock, contract hashing, idempotent action IDs, and
|
|
87
91
|
explicit recovery for interrupted writes.
|
|
88
92
|
|
|
89
|
-
The `/autonomous` contract
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
The `/autonomous` contract ends at an open pull request through `oak deliver`;
|
|
94
|
+
it never merges, deploys, releases or publishes, and it prohibits worktrees,
|
|
95
|
+
parallel execution, scheduling, write-enabled connectors, pushes to the default
|
|
96
|
+
branch, and force-pushes. Its seven stop reasons, including sensitive or
|
|
97
|
+
expanded scope, stop for human review. See the [`/loop`](opencode/commands/loop.md) and
|
|
93
98
|
[`/autonomous`](opencode/commands/autonomous.md) contracts for the exact
|
|
94
99
|
boundaries.
|
|
95
100
|
|
|
@@ -99,7 +104,6 @@ This kit builds on and integrates with the following projects:
|
|
|
99
104
|
|
|
100
105
|
- [OpenCode](https://opencode.ai/) — the coding-agent runtime and configuration surface.
|
|
101
106
|
- [Open Design](https://github.com/nexu-io/open-design) — optional local-first design workspace integration.
|
|
102
|
-
- [Superpowers](https://github.com/obra/Superpowers) — optional agentic skills and development methodology.
|
|
103
107
|
- [Impeccable](https://github.com/pbakaus/impeccable) — optional design guidance for AI-generated frontend work.
|
|
104
108
|
|
|
105
109
|
Each integration is optional. The core workflow can be used with OpenCode alone.
|
|
@@ -236,9 +240,10 @@ Use the smallest useful flow:
|
|
|
236
240
|
- `/feature` when the work deserves full orchestration.
|
|
237
241
|
- `/loop` when you want an approved, resumable implementation-review cycle with
|
|
238
242
|
crash-recoverable structured state and a three-iteration cap.
|
|
239
|
-
- `/autonomous` for one explicitly requested
|
|
243
|
+
- `/autonomous` for one explicitly requested task with a task-specific
|
|
240
244
|
one-to-six-iteration budget, a hard ceiling of six, durable state, and
|
|
241
|
-
reviewer-only closure. Final approval stops the cycle
|
|
245
|
+
reviewer-only closure. Final approval stops the cycle, and the run ends at an
|
|
246
|
+
open pull request.
|
|
242
247
|
|
|
243
248
|
### Small-gate fast path
|
|
244
249
|
|
|
@@ -420,7 +425,7 @@ After a tagged release is published, you can install the same CLI directly
|
|
|
420
425
|
from GitHub without keeping a checkout:
|
|
421
426
|
|
|
422
427
|
```bash
|
|
423
|
-
npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.0
|
|
428
|
+
npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.1.0"
|
|
424
429
|
oc-switch
|
|
425
430
|
```
|
|
426
431
|
|
|
@@ -669,6 +674,22 @@ These skills are available under:
|
|
|
669
674
|
opencode/skills/
|
|
670
675
|
```
|
|
671
676
|
|
|
677
|
+
### Process skills
|
|
678
|
+
|
|
679
|
+
OAK ships its own process skills, and each belongs to the agent that owns the
|
|
680
|
+
phase. The harness does not depend on any external plugin for its process.
|
|
681
|
+
|
|
682
|
+
| Skill | Agent | When |
|
|
683
|
+
|---|---|---|
|
|
684
|
+
| `oak-enrich-task` | `lead`, `scoper`, `specifier` | A vague request at intake becomes a specification with its open questions sorted |
|
|
685
|
+
| `oak-adversarial-review` | `reviewer` | Every final review, with a per-file coverage line |
|
|
686
|
+
| `oak-runtime-verification` | `developer` | Before the final review of a change with a runtime surface |
|
|
687
|
+
| `oak-update-docs` | `developer` | Before closeout, when the change made documentation stale |
|
|
688
|
+
| `oak-commit` | `developer` | Only when the human asks, or at `/autonomous` delivery |
|
|
689
|
+
|
|
690
|
+
Pushing and pull requests go through `oak deliver` only. See
|
|
691
|
+
[workflows](docs/workflows.md) and the [CLI reference](docs/cli.md).
|
|
692
|
+
|
|
672
693
|
They are designed to help agents make better engineering decisions without forcing every task through every checklist.
|
|
673
694
|
|
|
674
695
|
## Optional integrations
|
|
@@ -678,7 +699,6 @@ The integrations below are optional extensions. They are not required for the co
|
|
|
678
699
|
| Integration | What it adds | Setup |
|
|
679
700
|
|---|---|---|
|
|
680
701
|
| [Open Design](https://github.com/nexu-io/open-design) | Editable, local-first design workspace workflows | [Open Design guide](docs/open-design.md) |
|
|
681
|
-
| [Superpowers](https://github.com/obra/Superpowers) | Additional skills and software-development workflow discipline | [Superpowers guide](docs/superpowers.md) |
|
|
682
702
|
| [Impeccable](https://github.com/pbakaus/impeccable) | Design guidance and deterministic frontend-quality checks | [Impeccable guide](docs/impeccable.md) |
|
|
683
703
|
|
|
684
704
|
### [Open Design](https://github.com/nexu-io/open-design)
|
|
@@ -738,33 +758,6 @@ Then configure the Open Design base URL:
|
|
|
738
758
|
export OPEN_DESIGN_URL="http://192.168.1.50:7456"
|
|
739
759
|
```
|
|
740
760
|
|
|
741
|
-
### [Superpowers](https://github.com/obra/Superpowers)
|
|
742
|
-
|
|
743
|
-
Superpowers is not vendored into this repository.
|
|
744
|
-
|
|
745
|
-
When plugins are supported and network access is available, the kit can reference the upstream plugin:
|
|
746
|
-
|
|
747
|
-
```json
|
|
748
|
-
{
|
|
749
|
-
"plugin": [
|
|
750
|
-
"superpowers@git+https://github.com/obra/superpowers.git#d884ae04edebef577e82ff7c4e143debd0bbec99"
|
|
751
|
-
]
|
|
752
|
-
}
|
|
753
|
-
```
|
|
754
|
-
|
|
755
|
-
The human-readable upstream release is `v6.1.1`; the configuration uses the
|
|
756
|
-
full reviewed commit because the label alone is not immutable:
|
|
757
|
-
|
|
758
|
-
```json
|
|
759
|
-
{
|
|
760
|
-
"plugin": [
|
|
761
|
-
"superpowers@git+https://github.com/obra/superpowers.git#d884ae04edebef577e82ff7c4e143debd0bbec99"
|
|
762
|
-
]
|
|
763
|
-
}
|
|
764
|
-
```
|
|
765
|
-
|
|
766
|
-
If your existing `opencode.json` was preserved during installation, add the plugin manually.
|
|
767
|
-
|
|
768
761
|
### [Impeccable](https://github.com/pbakaus/impeccable)
|
|
769
762
|
|
|
770
763
|
Impeccable is optional and is not included in this repository.
|
|
@@ -849,7 +842,7 @@ Validate only the canonical identity and current release note with:
|
|
|
849
842
|
|
|
850
843
|
```bash
|
|
851
844
|
npm run check:version
|
|
852
|
-
node scripts/version.mjs --check-tag v1.0
|
|
845
|
+
node scripts/version.mjs --check-tag v1.1.0
|
|
853
846
|
```
|
|
854
847
|
|
|
855
848
|
Tag validation compares an explicitly supplied tag with the package identity.
|
|
@@ -900,7 +893,6 @@ node scripts/check-harness.mjs
|
|
|
900
893
|
│ ├── open-design.md
|
|
901
894
|
│ ├── quickstart.md
|
|
902
895
|
│ ├── security.md
|
|
903
|
-
│ ├── superpowers.md
|
|
904
896
|
│ ├── troubleshooting.md
|
|
905
897
|
│ └── workflows.md
|
|
906
898
|
├── opencode/
|
|
@@ -988,10 +980,6 @@ opencode auth login
|
|
|
988
980
|
|
|
989
981
|
Also verify that `opencode` is available on `PATH`.
|
|
990
982
|
|
|
991
|
-
### Superpowers skills do not load
|
|
992
|
-
|
|
993
|
-
Restart OpenCode and verify that the Superpowers plugin entry is present in `opencode.json`.
|
|
994
|
-
|
|
995
983
|
### Token usage does not appear in the TUI
|
|
996
984
|
|
|
997
985
|
Verify:
|
|
@@ -1030,7 +1018,6 @@ Detailed guides are available in [`docs/`](docs/):
|
|
|
1030
1018
|
- [Models](docs/models.md)
|
|
1031
1019
|
- [Open Design](docs/open-design.md)
|
|
1032
1020
|
- [Docker Open Design](docs/docker-open-design.md)
|
|
1033
|
-
- [Superpowers](docs/superpowers.md)
|
|
1034
1021
|
- [Impeccable](docs/impeccable.md)
|
|
1035
1022
|
- [Security](docs/security.md)
|
|
1036
1023
|
- [Threat model](docs/threat-model.md)
|
|
@@ -1042,8 +1029,9 @@ Detailed guides are available in [`docs/`](docs/):
|
|
|
1042
1029
|
|
|
1043
1030
|
- Node.js 22 and 24 are supported; the exact engine is `^22.9.0 || ^24.0.0`.
|
|
1044
1031
|
- OpenCode `>=1.14.41 <2.0.0` is supported through tested boundary versions.
|
|
1032
|
+
- OpenCode 2 (`>=2.0.18 <3.0.0`) is supported experimentally; see [docs/opencode-v2.md](docs/opencode-v2.md).
|
|
1045
1033
|
- WSL2 is experimental. Native Windows remains unsupported for lifecycle wrappers, which require Bash; direct `oak` commands are best-effort and do not provide POSIX-equivalent directory-entry fsync durability.
|
|
1046
|
-
- Open Design,
|
|
1034
|
+
- Open Design, Impeccable, Docker, and token-usage plugins remain optional.
|
|
1047
1035
|
|
|
1048
1036
|
See the [complete compatibility matrix](docs/compatibility.md) for status
|
|
1049
1037
|
definitions, exact pins, evidence, and scope.
|
|
@@ -1091,4 +1079,4 @@ See [NOTICE.md](NOTICE.md) for attribution notices.
|
|
|
1091
1079
|
|
|
1092
1080
|
## Disclaimer
|
|
1093
1081
|
|
|
1094
|
-
This repository is not affiliated with OpenCode, Open Design,
|
|
1082
|
+
This repository is not affiliated with OpenCode, Open Design, or Impeccable.
|
package/compatibility.json
CHANGED
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
"stable_tested": "1.18.4",
|
|
12
12
|
"canary": "latest"
|
|
13
13
|
},
|
|
14
|
+
"opencode_v2": {
|
|
15
|
+
"status": "experimental",
|
|
16
|
+
"supported_range": ">=2.0.18 <3.0.0",
|
|
17
|
+
"minimum_tested": "2.0.18",
|
|
18
|
+
"canary": "latest",
|
|
19
|
+
"plugin_sdk": "2.0.18"
|
|
20
|
+
},
|
|
14
21
|
"sdk": {
|
|
15
22
|
"opencode_plugin": "1.14.41",
|
|
16
23
|
"opentui_core": "0.2.5",
|
package/docs/cli.md
CHANGED
|
@@ -14,6 +14,8 @@ engines as the shell wrappers; it does not add a second implementation.
|
|
|
14
14
|
| `oak check` | Validate an installed harness with the checker shipped by this package |
|
|
15
15
|
| `oak replay` | Run the packaged deterministic routing corpus and fixtures |
|
|
16
16
|
| `oak state` | Run the packaged durable loop-state runtime against an explicit project root |
|
|
17
|
+
| `oak run` | Open, record, inspect, and close the task run context of an explicit project root |
|
|
18
|
+
| `oak deliver` | Push a reviewed feature branch and open its pull request, or read its CI checks |
|
|
17
19
|
| `oak uninstall` | Remove only unchanged files owned by the lifecycle manifest |
|
|
18
20
|
| `oak rollback` | Reverse the most recent committed lifecycle operation |
|
|
19
21
|
| `oak version` | Print the canonical package identity |
|
|
@@ -90,7 +92,73 @@ oak state attest-review --root /path/to/project --slug task-slug \
|
|
|
90
92
|
|
|
91
93
|
This stores `<slug>.review.json`, bound to the approved contract. Completion
|
|
92
94
|
fails closed unless the attestation identifies the `reviewer` subagent and an
|
|
93
|
-
`APPROVE` verdict.
|
|
95
|
+
`APPROVE` verdict. `migrate` keeps the status of a legacy loop, so a loop completed
|
|
96
|
+
before attestations existed stays `completed`; `oak deliver` still refuses it
|
|
97
|
+
without an attestation.
|
|
98
|
+
|
|
99
|
+
## Task run context
|
|
100
|
+
|
|
101
|
+
A task run spans the sessions, subagents, and reviews that deliver one change.
|
|
102
|
+
`oak run` keeps its identity in the working tree, next to the loop state:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
oak run start --root /path/to/project --slug task-slug [--kind production|benchmark]
|
|
106
|
+
oak run status --root /path/to/project
|
|
107
|
+
oak run event --root /path/to/project --type review blocking=0 verdict=safe_to_commit
|
|
108
|
+
oak run close --root /path/to/project --output docs/ai/runs/2026-09-27-task-slug/run-summary.json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- `start` writes `<root>/.opencode/runs/active.json` (schema `oak.run/1`) with
|
|
112
|
+
a `run_id` of the form `oak_<YYYYMMDDTHHMMSSZ>_<8 hex>`, the change slug, the
|
|
113
|
+
current branch, and the repository name. It is idempotent on the same branch
|
|
114
|
+
and refuses while a run for another branch or another change is open. The directory
|
|
115
|
+
carries its own `.gitignore`, so the context never shows up in `git status`.
|
|
116
|
+
- `event` appends one `oak.event/1` line to `active.events.jsonl`. The type
|
|
117
|
+
is one of `agent_session`, `review`, `runtime_verification`, `verify`,
|
|
118
|
+
`delivery`, or `ci`; keys are lowercase; integer values stay numbers and
|
|
119
|
+
control characters are stripped. Other values must be symbolic (ids, enums,
|
|
120
|
+
branch names), never prose or absolute paths. Without an open run it
|
|
121
|
+
succeeds and records nothing.
|
|
122
|
+
- `status` reports the run and its event count, and flags it as stale when it
|
|
123
|
+
belongs to another branch or is older than seven days.
|
|
124
|
+
- `close` writes an `oak.run.summary/1` file inside the root, which is meant to
|
|
125
|
+
be committed with the change, and removes the active context.
|
|
126
|
+
|
|
127
|
+
The run context is optional and gates nothing: a stale run is only reported. It
|
|
128
|
+
uses no network and no subprocess. Events carry counts and enums only, never
|
|
129
|
+
prose, prompts, output, secrets, or absolute paths; the words belong in the
|
|
130
|
+
task reports.
|
|
131
|
+
|
|
132
|
+
## Delivery
|
|
133
|
+
|
|
134
|
+
`oak deliver` is the only path from a finished loop to a remote. Agents are
|
|
135
|
+
denied `git push` and `gh`; this command runs them itself with `shell: false`.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
oak deliver pr --root /path/to/project --slug task-slug --title "feat: add x" --body-file pr-body.md
|
|
139
|
+
oak deliver checks --root /path/to/project --pr 7
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
`pr` refuses before touching the remote unless, in this order:
|
|
143
|
+
|
|
144
|
+
1. the loop `<slug>` is `completed`;
|
|
145
|
+
2. its `<slug>.review.json` attestation is a reviewer `APPROVE` bound to the
|
|
146
|
+
approved contract;
|
|
147
|
+
3. the current branch is a plain feature branch name (no leading `+` or `-`)
|
|
148
|
+
and not the default branch, `main`, `master`, or a detached `HEAD`;
|
|
149
|
+
4. the working tree is clean, apart from OAK's own `.opencode/loops` and
|
|
150
|
+
`.opencode/runs` state;
|
|
151
|
+
5. the branch has at least one commit ahead of `origin/<default>`;
|
|
152
|
+
6. the body file is a regular file inside the root with no absolute home path,
|
|
153
|
+
and the title has 1-200 characters.
|
|
154
|
+
|
|
155
|
+
It then runs `git push --set-upstream origin HEAD:refs/heads/<branch>`, never
|
|
156
|
+
forced, and `gh pr create` against the default branch with a private copy of
|
|
157
|
+
the validated body, or reuses the branch's open pull request when a later delivery (such as a CI fix) finds one. It records a
|
|
158
|
+
`delivery` event when a task run is open. `checks` returns `gh pr checks` as JSON and treats
|
|
159
|
+
the pending exit status 8 as success.
|
|
160
|
+
|
|
161
|
+
There is no merge, auto-merge, release, or deploy action, by design.
|
|
94
162
|
|
|
95
163
|
## Safety boundary
|
|
96
164
|
|
package/docs/commands.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
- `/plan`: research, implementation-ready spec, and reviewer pass with no implementation.
|
|
5
5
|
- `/scope`: research plus scoped spec, no implementation.
|
|
6
6
|
- `/loop`: explicitly approved, resumable developer-review loop with durable state and bounded iterations.
|
|
7
|
-
- `/autonomous`: explicitly requested
|
|
7
|
+
- `/autonomous`: explicitly requested developer-review cycle with deterministic validation and a one-to-six iteration budget that ends at an open pull request through `oak deliver`; it never merges, deploys, releases or publishes.
|
|
8
8
|
- `/mvp-spec`: strict MVP spec with small tasks and clear out of scope.
|
|
9
9
|
- `/design`: design via PRODUCT.md/DESIGN.md, optional Impeccable, and Open Design.
|
|
10
10
|
- `/research`: direct researcher task.
|
package/docs/comparison.md
CHANGED
|
@@ -32,9 +32,9 @@ Its bounded workflows deliberately constrain execution:
|
|
|
32
32
|
|
|
33
33
|
- `/loop` requires a human-approved contract before writes and allows a
|
|
34
34
|
worktree only through explicit opt-in.
|
|
35
|
-
- `/autonomous`
|
|
36
|
-
|
|
37
|
-
deployments, releases, and publication.
|
|
35
|
+
- `/autonomous` works on a feature branch and ends at an open pull request
|
|
36
|
+
through `oak deliver`; it prohibits worktrees, parallelism, write-enabled
|
|
37
|
+
connectors, merges, deployments, releases, and publication.
|
|
38
38
|
- Both use finite iteration budgets, deterministic validation, durable state,
|
|
39
39
|
and reviewer-only completion.
|
|
40
40
|
|
package/docs/compatibility.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Compatibility
|
|
2
2
|
|
|
3
3
|
This document is the public compatibility contract for the kit. The canonical
|
|
4
|
-
Node.js engine is `^22.9.0 || ^24.0.0
|
|
5
|
-
`>=1.14.41 <2.0.0
|
|
4
|
+
Node.js engine is `^22.9.0 || ^24.0.0`. The supported OpenCode range is
|
|
5
|
+
`>=1.14.41 <2.0.0`, and OpenCode 2 (`>=2.0.18 <3.0.0`) is supported
|
|
6
|
+
experimentally.
|
|
6
7
|
|
|
7
8
|
## Status definitions
|
|
8
9
|
|
|
@@ -26,8 +27,11 @@ while `supported` describes the maintained promise derived from that evidence.
|
|
|
26
27
|
| OpenCode 1.14.41 | tested | minimum boundary in the blocking core smoke |
|
|
27
28
|
| OpenCode 1.18.4 | tested | pinned stable boundary in the blocking core smoke |
|
|
28
29
|
| OpenCode >=1.14.41 <2.0.0 | supported | boundary-tested compatibility promise |
|
|
29
|
-
| OpenCode
|
|
30
|
+
| OpenCode 2.0.18 | tested | minimum OpenCode 2 boundary in the non-blocking OpenCode 2 workflow |
|
|
31
|
+
| OpenCode >=2.0.18 <3.0.0 | experimental | dual-runtime adapters; non-blocking CI; see docs/opencode-v2.md |
|
|
32
|
+
| OpenCode <1.14.41, >=2.0.0 <2.0.18, or >=3.0.0 | unsupported | requires a reviewed policy change |
|
|
30
33
|
| `@opencode-ai/plugin` 1.14.41 | tested | exact pin with install, import, and typecheck evidence |
|
|
34
|
+
| `@opencode/plugin` 2.0.18 | tested | type-only pin in typecheck/v2; never installed with the harness |
|
|
31
35
|
| OpenTUI core/solid 0.2.5 | tested | exact pins with install, import, and typecheck evidence |
|
|
32
36
|
| Ubuntu GitHub runner | tested | blocking Node 22 and 24 jobs |
|
|
33
37
|
| macOS GitHub runner | tested | blocking Node 24 job; runner details recorded |
|
|
@@ -36,17 +40,30 @@ while `supported` describes the maintained promise derived from that evidence.
|
|
|
36
40
|
| Native Windows | unsupported | Bash lifecycle wrappers have no native contract; direct `oak` commands are best-effort and do not provide POSIX-equivalent directory-entry fsync durability; the check harness accepts LF and CRLF Markdown frontmatter |
|
|
37
41
|
| Token usage plugin | experimental | compile/import is tested; runtime session-tree behavior is not stable API evidence |
|
|
38
42
|
| Open Design Docker adapter | experimental | optional pinned image inputs, no blocking integration smoke |
|
|
39
|
-
| Superpowers | experimental | optional upstream Git plugin, not part of core smoke |
|
|
40
43
|
| Impeccable | experimental | optional externally installed skill |
|
|
41
44
|
<!-- compatibility-matrix:end -->
|
|
42
45
|
|
|
43
|
-
The default-config smoke checks the
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
The default-config smoke checks that the starter declares no external plugins.
|
|
47
|
+
This does not change any integration status: Open Design, Impeccable, and the
|
|
48
|
+
token plugin remain experimental. The smaller supported core contract excludes
|
|
49
|
+
all three. Current immutable external
|
|
47
50
|
identifiers and their release labels live in
|
|
48
51
|
[the supply-chain policy](supply-chain.md).
|
|
49
52
|
|
|
53
|
+
## OpenCode 2
|
|
54
|
+
|
|
55
|
+
OpenCode 2 support is experimental: its CI is non-blocking and it is not a
|
|
56
|
+
release guarantee. The same installed harness serves both lines. Known
|
|
57
|
+
differences on OpenCode 2:
|
|
58
|
+
|
|
59
|
+
- Per-agent `temperature` is currently ignored.
|
|
60
|
+
- The CLI (TUI) plugin configuration moved from `tui.json` to the global
|
|
61
|
+
`cli.json`.
|
|
62
|
+
- OpenCode 1 and OpenCode 2 share the same config directory and database.
|
|
63
|
+
|
|
64
|
+
See [OpenCode 2 support](opencode-v2.md) for details and for the OpenCode 1
|
|
65
|
+
retirement checklist.
|
|
66
|
+
|
|
50
67
|
## Exact dependency pins
|
|
51
68
|
|
|
52
69
|
| Dependency | Exact pin |
|
|
@@ -71,15 +88,17 @@ job on Node.js 24, core OpenCode smokes at both `1.14.41` and `1.18.4`, and a
|
|
|
71
88
|
default-config smoke at `1.18.4`. Core evidence loads the working-tree harness
|
|
72
89
|
from an isolated copy with its external plugin list empty and its local token
|
|
73
90
|
plugin absent. It therefore covers the maintained OpenCode boundary without
|
|
74
|
-
|
|
91
|
+
Open Design service access, Impeccable, or the token plugin.
|
|
75
92
|
|
|
76
93
|
The default-config smoke instead packs the npm artifact, extracts that local
|
|
77
94
|
tarball, installs its frozen dependencies, and loads the unmodified starter
|
|
78
|
-
configuration. It proves that the
|
|
79
|
-
token plugin can load at the stable boundary.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
95
|
+
configuration. It proves that the starter, with no external plugins, and the
|
|
96
|
+
bundled token plugin can load at the stable boundary. It also imports every
|
|
97
|
+
server plugin file with the Bun runtime embedded in that OpenCode binary, fails
|
|
98
|
+
when a server hook throws, and requires the Open Design tools to register. This release-blocking
|
|
99
|
+
default check preserves the shipped starter behavior; it does not promote the
|
|
100
|
+
token plugin from `experimental` and does not extend the core compatibility
|
|
101
|
+
promise to it.
|
|
83
102
|
|
|
84
103
|
These combinations remain policy statements until their remote jobs record
|
|
85
104
|
results. This document does not claim that the remote matrix has passed.
|
package/docs/installation.md
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Prerequisites include Node.js `^22.9.0 || ^24.0.0` and npm. See the
|
|
4
4
|
[compatibility matrix](compatibility.md) for supported OpenCode versions,
|
|
5
5
|
platform status, exact integration pins, and evidence.
|
|
6
|
+
OpenCode 2 (`>=2.0.18 <3.0.0`) is supported experimentally; see
|
|
7
|
+
[OpenCode 2 support](opencode-v2.md).
|
|
6
8
|
|
|
7
9
|
## Install the published CLI package
|
|
8
10
|
|
package/docs/models.md
CHANGED
|
@@ -34,7 +34,7 @@ oc-switch
|
|
|
34
34
|
Once a release tag exists, a checkout is optional:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.0
|
|
37
|
+
npm install --global "git+https://github.com/jcarlosrodicio/opencode-agent-orchestration-kit.git#v1.1.0"
|
|
38
38
|
oc-switch
|
|
39
39
|
```
|
|
40
40
|
|
package/docs/open-design.md
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Open Design is an optional workbench for editable design projects and generated visual artifacts.
|
|
4
4
|
|
|
5
5
|
This kit integrates through `opencode/tools/open_design.ts` and `opencode/skills/open-design/SKILL.md`.
|
|
6
|
+
The tool definitions live in `opencode/tools/open-design-tools.mjs`. OpenCode 2
|
|
7
|
+
registers the same `open_design_*` tools from `opencode/plugins/open-design.ts`.
|
|
6
8
|
|
|
7
9
|
## OPEN_DESIGN_URL
|
|
8
10
|
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# OpenCode 2 support
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
OpenCode 2 support is **experimental**. The supported range is
|
|
6
|
+
`>=2.0.18 <3.0.0`, recorded as `opencode_v2` in `compatibility.json`. Its CI
|
|
7
|
+
runs in `.github/workflows/opencode-v2.yml` and is non-blocking: do not mark
|
|
8
|
+
it as a required status check while the status is `experimental`.
|
|
9
|
+
|
|
10
|
+
OpenCode 1 (`>=1.14.41 <2.0.0`) remains the supported, release-blocking line.
|
|
11
|
+
One repository and one installed payload serve both lines.
|
|
12
|
+
|
|
13
|
+
## What works
|
|
14
|
+
|
|
15
|
+
- Config, agents, commands and skills keep their OpenCode 1 shape. OpenCode 2
|
|
16
|
+
translates that shape in memory when it loads the config directory.
|
|
17
|
+
- The shell export guard, the Open Design tools and the task-run session
|
|
18
|
+
links run as OpenCode 2 core plugins.
|
|
19
|
+
- The mission toasts and the token sidebar run as the OpenCode 2 CLI plugin
|
|
20
|
+
in `opencode/plugins/oak-tui/`.
|
|
21
|
+
- The session evidence collector reads the OpenCode 2 tables `session_v2`
|
|
22
|
+
and `session_message`.
|
|
23
|
+
|
|
24
|
+
## Known differences
|
|
25
|
+
|
|
26
|
+
- OpenCode 2 does not send per-agent `temperature` to models yet.
|
|
27
|
+
- `compaction.prune` is ignored.
|
|
28
|
+
- `lsp`, `list` and `todowrite` are not OpenCode 2 tools.
|
|
29
|
+
- MCP tools default to Code Mode. Set `codemode: false` on a server to restore
|
|
30
|
+
its direct tools.
|
|
31
|
+
- `tui.json` is replaced by the global `cli.json`.
|
|
32
|
+
- The `instructions` array is accepted but not applied.
|
|
33
|
+
- Commands with `subtask: true` run as background child sessions.
|
|
34
|
+
- OpenCode 2 renames `task` to `subagent` and `bash` to `shell`.
|
|
35
|
+
`opencode/AGENTS.md` maps the names for every agent.
|
|
36
|
+
- The shell export guard checks calls to the `shell` tool, as it checks the
|
|
37
|
+
`bash` tool on OpenCode 1. It does not hook the OpenCode 2 shell service, so
|
|
38
|
+
a shell that does not come from the `shell` tool is not checked.
|
|
39
|
+
- One OpenCode 2 server can serve several projects, and its event stream
|
|
40
|
+
covers all of them. Task-run session links skip a session once an event
|
|
41
|
+
places it in another directory; a session whose events carried no location
|
|
42
|
+
before that can still be linked, for example one created before the plugin
|
|
43
|
+
subscribed. The CLI plugin shows mission toasts for every session its server
|
|
44
|
+
reports.
|
|
45
|
+
|
|
46
|
+
## Switching between OpenCode 1 and 2
|
|
47
|
+
|
|
48
|
+
- Both lines use the `opencode` binary, the same config directory and the same
|
|
49
|
+
database. The OpenCode 2 installer replaces OpenCode 1.
|
|
50
|
+
- Going from OpenCode 1 to OpenCode 2 and back works: on first start OpenCode 2
|
|
51
|
+
imports the OpenCode 1 sessions and leaves the OpenCode 1 tables in place.
|
|
52
|
+
OpenCode 1 cannot open a database that OpenCode 2 created from scratch; it
|
|
53
|
+
fails with `Database is not empty and has no session table`.
|
|
54
|
+
- Run `oak doctor` after switching. On an OpenCode 2 release inside the
|
|
55
|
+
supported range it reports `info` for `opencode-version` and
|
|
56
|
+
`compatibility`.
|
|
57
|
+
- To try OpenCode 2 without touching your setup, isolate it: point
|
|
58
|
+
`OPENCODE_CONFIG_DIR` and the XDG directories (`XDG_CONFIG_HOME`,
|
|
59
|
+
`XDG_DATA_HOME`, `XDG_STATE_HOME`, `XDG_CACHE_HOME`) at temporary
|
|
60
|
+
directories. `opencode api --standalone` answers before plugins activate,
|
|
61
|
+
so query plugins through `opencode plugin list` or a running server.
|
|
62
|
+
|
|
63
|
+
## Layout rules
|
|
64
|
+
|
|
65
|
+
Both runtimes scan the same `plugins/` folder. OpenCode 1 loads only
|
|
66
|
+
`plugins/*.{ts,js}` files; OpenCode 2 also loads plugin directories. Each
|
|
67
|
+
plugin entry file default-exports one object: OpenCode 1 calls `server`,
|
|
68
|
+
OpenCode 2 calls `setup`.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
opencode/
|
|
72
|
+
plugins/
|
|
73
|
+
shell-export-guard.ts entry: { id, server: v1, setup: v2 }
|
|
74
|
+
open-design.ts entry: { id, server: no-op (v1 uses tools/), setup: v2 }
|
|
75
|
+
mission-runtime.ts entry: { id, server: v1, setup: v2 }
|
|
76
|
+
token-tree-usage.tsx OpenCode 1 CLI plugin (loaded through tui.json); no-op setup
|
|
77
|
+
oak-tui/ OpenCode 2 CLI plugin package (OpenCode 1 ignores directories)
|
|
78
|
+
server.ts { id: "oak.tui", setup() {} }, required so OpenCode 2 loads the tui entry
|
|
79
|
+
tui.tsx token sidebar and mission toasts
|
|
80
|
+
runtime/
|
|
81
|
+
v1/ OpenCode 1 adapters only
|
|
82
|
+
shell-export-guard.ts
|
|
83
|
+
mission-runtime.ts
|
|
84
|
+
v2/ OpenCode 2 adapters and their runtime-neutral helpers
|
|
85
|
+
shell-export-guard.ts
|
|
86
|
+
open-design.ts
|
|
87
|
+
mission-runtime.ts
|
|
88
|
+
mission-events.mjs, token-usage.mjs (with .d.mts and .test.mjs)
|
|
89
|
+
scripts/
|
|
90
|
+
shell-export-guard-core.mjs shared shell export decision
|
|
91
|
+
session-sources.mjs OpenCode 1 and 2 session SQL
|
|
92
|
+
tools/
|
|
93
|
+
open_design.ts OpenCode 1 file-tool wrapper
|
|
94
|
+
open-design-tools.mjs shared Open Design tool definitions
|
|
95
|
+
typecheck/v2/ OpenCode 2 type workspace, never shipped
|
|
96
|
+
scripts/opencode-v2-smoke.mjs OpenCode 2 runtime smoke
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Rules:
|
|
100
|
+
|
|
101
|
+
- OpenCode-1-only code lives in `opencode/runtime/v1/`, or carries the marker
|
|
102
|
+
`oak:v1-only` on the line or at the top of the file.
|
|
103
|
+
- Unit-tested behavior lives in `.mjs` files with a sibling `.d.mts`. The
|
|
104
|
+
`.ts` and `.tsx` files stay thin adapters.
|
|
105
|
+
- The OpenCode 2 core adapters use `import type` only, so the harness ships no
|
|
106
|
+
OpenCode 2 dependency. The CLI plugin `oak-tui/tui.tsx` imports `solid-js`
|
|
107
|
+
and the `@opentui/solid` JSX runtime at runtime. They resolve from the
|
|
108
|
+
shipped `opencode/package.json`, which pins the OpenCode 1 versions today,
|
|
109
|
+
while `typecheck/v2/` checks the plugin against the OpenCode 2 versions.
|
|
110
|
+
- Types are checked in `typecheck/v2/` with `npm run typecheck:v2`.
|
|
111
|
+
|
|
112
|
+
## Retiring OpenCode 1 (checklist)
|
|
113
|
+
|
|
114
|
+
1. Delete `opencode/runtime/v1/`, `opencode/plugins/token-tree-usage.tsx`,
|
|
115
|
+
`opencode/tui.json` and `opencode/tools/open_design.ts`.
|
|
116
|
+
2. Remove every line marked `oak:v1-only`, and every block between
|
|
117
|
+
`oak:v1-only — start` and `oak:v1-only — end`: `rg -n "oak:v1-only"`. This
|
|
118
|
+
drops the `server` keys from the plugin entries, the OpenCode 1 branch in
|
|
119
|
+
`opencode/scripts/session-sources.mjs` and the OpenCode 1 line in the
|
|
120
|
+
doctor.
|
|
121
|
+
3. Remove the `opencode` key from `compatibility.json` and rename
|
|
122
|
+
`opencode_v2` to `opencode`. Fold the OpenCode 2 code of
|
|
123
|
+
`scripts/check-compatibility.mjs` into its main path, and point the doctor
|
|
124
|
+
in `scripts/manage-installation.mjs` (which reads `compatibility.opencode_v2`)
|
|
125
|
+
and its test fixtures at the renamed key.
|
|
126
|
+
4. In `opencode/package.json`, drop `@opencode-ai/plugin` and move
|
|
127
|
+
`@opentui/core` and `@opentui/solid` to the pins in `typecheck/v2`: the CLI
|
|
128
|
+
plugin `oak-tui/tui.tsx` imports them at runtime. Update the `sdk` pins in
|
|
129
|
+
`compatibility.json`, delete the root `typecheck` script and make
|
|
130
|
+
`typecheck:v2` the only type check.
|
|
131
|
+
5. Remove the deleted files from the contract checks: the required files and
|
|
132
|
+
the `tui.json` and `token-tree-usage.tsx` greps in `scripts/check.sh`,
|
|
133
|
+
`REQUIRED_FILES` in `scripts/check-public-boundary.mjs`, and the shell
|
|
134
|
+
export guard, Open Design and mission runtime surfaces in
|
|
135
|
+
`opencode/scripts/check-harness.mjs`.
|
|
136
|
+
6. Retire or port the tests built on OpenCode 1: the OpenCode 1 fixtures in
|
|
137
|
+
`opencode/scripts/collect-session-evidence.test.mjs`, the 1.x doctor cases,
|
|
138
|
+
the check-harness tests of the removed surfaces, and the mission runtime
|
|
139
|
+
tests that read `runtime/v1/mission-runtime.ts`.
|
|
140
|
+
7. Replace `scripts/opencode-compat-smoke.sh` with
|
|
141
|
+
`scripts/opencode-v2-smoke.mjs`, merge `.github/workflows/opencode-v2.yml`
|
|
142
|
+
into `check.yml` as blocking jobs, and move the workflow guards in
|
|
143
|
+
`scripts/check-compatibility.mjs` with them.
|
|
144
|
+
8. Rewrite the prompts to `subagent` and `shell`, update the pinned tokens in
|
|
145
|
+
`opencode/scripts/check-harness.mjs`, and delete the tool-name glossary in
|
|
146
|
+
`opencode/AGENTS.md`.
|
|
147
|
+
9. Convert `opencode.json` and the agent frontmatter to native OpenCode 2 keys
|
|
148
|
+
(`agents`, `permissions` arrays, `plugins`) only after OpenCode 1 is gone.
|
|
149
|
+
Never mix OpenCode 1 and OpenCode 2 keys inside one agent file.
|
|
150
|
+
|
|
151
|
+
## Evidence
|
|
152
|
+
|
|
153
|
+
Results recorded on 2026-09-27 on macOS (arm64) with Node.js 24.14.1.
|
|
154
|
+
|
|
155
|
+
- `bash scripts/opencode-compat-smoke.sh default 1.18.4` and
|
|
156
|
+
`bash scripts/opencode-compat-smoke.sh default 1.14.41`: ok. Every server
|
|
157
|
+
plugin file imported with the Bun runtime embedded in the OpenCode binary,
|
|
158
|
+
and the designer agent listed `open_design_health`. Negative controls
|
|
159
|
+
failed as expected: a plugin with a broken import (`an OAK plugin failed to
|
|
160
|
+
import`) and a plugin whose `server` hook throws (`an OAK or configured
|
|
161
|
+
plugin failed to load`).
|
|
162
|
+
- `node scripts/opencode-v2-smoke.mjs core 2.0.18` and
|
|
163
|
+
`node scripts/opencode-v2-smoke.mjs default 2.0.18`: ok, with
|
|
164
|
+
`oak.mission-runtime`, `oak.open-design`, `oak.shell-export-guard` and
|
|
165
|
+
`oak.tui` active. A plugin with a broken import failed the smoke.
|
|
166
|
+
- `node scripts/opencode-v2-smoke.mjs core latest`: ok (resolved 2.0.18).
|
|
167
|
+
- `bash scripts/opencode-compat-smoke.sh core 1.14.41` and `core 1.18.4`: ok.
|
|
168
|
+
|
|
169
|
+
Manual sessions ran in an isolated config installed with `oak install`, with
|
|
170
|
+
an OpenAI-compatible provider model, on OpenCode 2.0.18 and OpenCode 1.18.4:
|
|
171
|
+
|
|
172
|
+
| Check | OpenCode 2.0.18 | OpenCode 1.18.4 |
|
|
173
|
+
|---|---|---|
|
|
174
|
+
| Sidebar shows `Tokens` and `Lead … \| Total …`, and `Subagents +… \| 1` after a delegation | pass | partial: `Tokens` renders but the values stay 0 in a scripted terminal; release 1.0.45 behaves the same |
|
|
175
|
+
| A mission toast appears when a session starts (`running`) and finishes (`idle`) | pass | pass |
|
|
176
|
+
| `lead` delegates `export -p` to `developer`, and the guard blocks it with `[shell-export-guard:shell-export-environment-enumeration]` | pass (`shell`) | pass (`bash`) |
|
|
177
|
+
| `designer` calls `open_design_health` without `OPEN_DESIGN_URL` and gets `OPEN_DESIGN_URL is not set` | pass (through Code Mode) | pass |
|
|
178
|
+
| `lead` cannot create a file: it has no edit tool and its shell redirection is denied | pass | pass |
|
|
179
|
+
| An open task run records `agent_session` events for the root and child sessions | pass | pass |
|
|
180
|
+
| `collect-session-evidence.mjs --run` rebuilds the execution trees from the database | pass (`session_v2`) | covered by unit tests |
|
|
181
|
+
|
|
182
|
+
OpenCode 2 behavior that shaped the smoke:
|
|
183
|
+
|
|
184
|
+
- `opencode --version` prints `opencode v2.0.18`.
|
|
185
|
+
- `opencode api --standalone plugin.list` answers before plugins activate, so
|
|
186
|
+
it returns an empty list. The smoke therefore starts a private
|
|
187
|
+
`opencode serve` with `OPENCODE_PASSWORD` and queries it until the plugins
|
|
188
|
+
settle.
|
|
189
|
+
- A local plugin that fails to import is listed without an `id`, with
|
|
190
|
+
`state.status` set to `failed`.
|