harness-everything 0.58.0 → 1.0.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +8 -2
- package/CHANGELOG.md +17 -0
- package/README.md +4 -4
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md +40 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/edit-state-final.json +11 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/events-2026-11-24.jsonl +103 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/host-version.txt +3 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/live-event-trace-probe.js +11 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/plugin-load-lines.txt +2 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/reminder-excerpt.txt +1 -0
- package/ci/doc-capability-consistency.test.js +4 -2
- package/ci/lib/opencode-v2-driver.js +169 -0
- package/ci/mechanism-2n-opencode-plugin.test.js +387 -223
- package/ci/mechanism-2p-opencode-v2-entrypoint.test.js +24 -15
- package/ci/mechanism-2u-issue-42-regressions.test.js +41 -2
- package/ci/mechanism-2w-platform-compatibility.test.js +16 -3
- package/ci/mechanism-30-opencode-plugin-loadability.test.js +78 -45
- package/ci/mechanism-338-opencode-async.test.js +367 -194
- package/ci/mechanism-341-opencode-lane.test.js +143 -183
- package/ci/mechanism-39-opencode-verify-outcomes.test.js +118 -86
- package/ci/mechanism-394-opencode-ledger-lesson.test.js +46 -97
- package/ci/mechanism-397-opencode-observations.test.js +58 -47
- package/ci/mechanism-453-opencode-v2-driver.test.js +51 -0
- package/ci/mechanism-453-opencode-v2-only-events.test.js +241 -0
- package/ci/telemetry.test.js +31 -24
- package/docs/architecture.md +4 -2
- package/docs/platform-capabilities.md +60 -26
- package/docs/platform-compatibility.json +8 -6
- package/docs/system-one-observations.md +1 -1
- package/docs/telemetry.md +1 -1
- package/docs/troubleshooting.md +2 -2
- package/opencode-plugin/README.md +60 -66
- package/opencode-plugin/index.mjs +11 -13
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.antigravity-plugin/plugin.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/rules/AGENTS.md +8 -2
- package/sbom.cdx.json +12 -12
|
@@ -15,7 +15,7 @@ Statuses are intentionally explicit:
|
|
|
15
15
|
- `Unsupported`: official host documentation explicitly rules out the capability.
|
|
16
16
|
- `Unknown`: the capability or its current host behavior was not established.
|
|
17
17
|
|
|
18
|
-
Codex, Antigravity (AGY), and OpenCode are `Partial` in `liveHostVerification`. The Codex artifact verifies user-hook compatibility capture for two consecutive turns on one Windows Codex CLI host; native plugin-hook mounting and other host/version combinations remain unverified. The AGY artifact covers global Desktop App `2.34.0` and `agy` CLI `1.5.15` (macOS) for plugin loading/validation and lifecycle hooks under host-limited `PostToolUse` shell outcomes; IDE write tools, live `exitCode: 0` shell verification credit, live `model_stop`, and full project-scope isolation remain unverified. OpenCode
|
|
18
|
+
Codex, Antigravity (AGY), and OpenCode are `Partial` in `liveHostVerification`. The Codex artifact verifies user-hook compatibility capture for two consecutive turns on one Windows Codex CLI host; native plugin-hook mounting and other host/version combinations remain unverified. The AGY artifact covers global Desktop App `2.34.0` and `agy` CLI `1.5.15` (macOS) for plugin loading/validation and lifecycle hooks under host-limited `PostToolUse` shell outcomes; IDE write tools, live `exitCode: 0` shell verification credit, live `model_stop`, and full project-scope isolation remain unverified. OpenCode supports the **V2 plugin API only** (OpenCode 1.x / V1 is unsupported): V2 live evidence covers one isolated `2.1.4` (macOS 26.6.2) long-lived server lifecycle trace (V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded`, and completion → verification → reminder delivery; standalone `opencode run` exits before verification finishes), alongside earlier `2.1.3` macOS server-log load-only and `2.1.4` macOS workspace traces; router/context injection, observation recording, ledger lessons, session create/delete reset, cancellation, global scope, npm-package install, and other versions/OSes remain unverified, while the retained OpenCode 1.18.31 (macOS) project-scope `.js` loading and edit/verification state artifact is historical/unsupported V1 evidence only. No fresh artifacts exist yet for the other surfaces, managed-workspace import, or public OpenAI approval.
|
|
19
19
|
|
|
20
20
|
### Codex PR metadata action-gate boundary
|
|
21
21
|
|
|
@@ -66,7 +66,7 @@ Source and packaged plugin self-evolve entrypoints use installation-relative can
|
|
|
66
66
|
|
|
67
67
|
### Error-ledger lesson injection (mechanism only, #394)
|
|
68
68
|
|
|
69
|
-
A shared matcher (`hooks/scripts/lib/ledger-match.js`) selects workspace ledger lessons whose `match` rules fit a direct `git commit` action (optionally after `-C`, `-c`, `--git-dir=`, `--work-tree=`, `--no-pager` or `-P`; compound and wrapped commands stay silent, #502) or its commitlint failure; rules are read from the generated index row and checked against the record's frontmatter binding, and the host carriers add the record's Cue and Lesson as model context: Claude Code `PreToolUse` and `PostToolUseFailure` (`hooks/scripts/ledger-lesson.js`), Codex `PreToolUse` and `PostToolUse` with outcome classification (`hooks/scripts/codex-ledger-lesson.js`, packaged and user-hook compatibility paths), and OpenCode V2 tool `execute.before/after` selection delivered through the next `context` hook, i.e. after the action.
|
|
69
|
+
A shared matcher (`hooks/scripts/lib/ledger-match.js`) selects workspace ledger lessons whose `match` rules fit a direct `git commit` action (optionally after `-C`, `-c`, `--git-dir=`, `--work-tree=`, `--no-pager` or `-P`; compound and wrapped commands stay silent, #502) or its commitlint failure; rules are read from the generated index row and checked against the record's frontmatter binding, and the host carriers add the record's Cue and Lesson as model context: Claude Code `PreToolUse` and `PostToolUseFailure` (`hooks/scripts/ledger-lesson.js`), Codex `PreToolUse` and `PostToolUse` with outcome classification (`hooks/scripts/codex-ledger-lesson.js`, packaged and user-hook compatibility paths), and OpenCode V2 tool `execute.before/after` selection delivered through the next `context` hook, i.e. after the action. OpenCode 1.x / V1 is unsupported; lesson delivery targets the OpenCode V2 plugin API only. Delivery is bounded, deduplicated per session and phase, fail-open, and never changes a tool result or permission. Deterministic mechanism tests cover all three carriers. [Claude Code live evidence](../benchmarks/results/live-host/claude-2026-11-21-ledger-lesson/README.md) (2.1.330, one run) shows both contexts in the model request that follows the commit, so the action lesson arrives after the first attempt. Codex and OpenCode live receipt remain `UNCHECKED`.
|
|
70
70
|
|
|
71
71
|
## Current capability summary
|
|
72
72
|
|
|
@@ -76,7 +76,7 @@ A shared matcher (`hooks/scripts/lib/ledger-match.js`) selects workspace ledger
|
|
|
76
76
|
| Antigravity (AGY) | `Supported` | `Partial` (`Mechanism verified`; global Desktop App `2.34.0` load and `agy` CLI `1.5.15` `validate`/`list --json` live-verified on macOS; `validate --strict` fails on 2 multi-host warnings; temp `.agents/plugins/` hook discovery observed via `agy --print`) | `Partial`: `Mechanism verified` for all adapters; Desktop App `2.34.0` + CLI `1.5.15` (macOS) live-verified `SessionStart`, `PreInvocation` dedup, `PreToolUse` (`write_file`/`run_command`), `PostToolUse` edit tracking, and `Stop` (`NO_TOOL_CALL`); `PostToolUse` omits `exitCode`/`error` on shell non-zero exit (`1`) on both `2.34.0` and CLI `1.5.15`, so unknown shell outcomes grant no verification credit (`exitCode === 0` required); IDE write tools (`write_to_file`/`replace_file_content`/`multi_replace_file_content`) and live `model_stop` remain mechanism-only | `.agents/plugins/harness-everything/`, `.agents/rules/AGENTS.md` | `~/.gemini/config/plugins/harness-everything/` | [Mechanism evidence](../benchmarks/results/live-host/agy-2026-11-22/README.md) + [partial live-host evidence](../benchmarks/results/live-host/agy-2026-11-23/README.md) (Antigravity 2.0 Desktop App `2.34.0` + `agy` CLI `1.5.15`, macOS); `/hooks` TUI view, full project-scope `harness-everything` isolation, IDE write tools, live shell `exitCode: 0` verification credit, and live `Stop` `model_stop` remain open in issue #514. |
|
|
77
77
|
| ChatGPT / OpenAI Plugin | `Unknown` for a repository-local standalone path | `Mechanism verified` | `Partial`: local Work/Codex hooks are separate from ordinary Chat | Managed workspace marketplace | Not established | The public Skills-only bundle is mechanically reproducible; import, approval, and live behavior remain `Unknown`. |
|
|
78
78
|
| Claude Code | `Supported` | `Supported` | `Mechanism verified` for Harness configuration | `.claude/skills/` | `~/.claude/skills/` | Native Claude surfaces and the state-specific plugin sync command are mechanically checked; fresh-host execution is not preserved here. |
|
|
79
|
-
| OpenCode | `Supported` | `Partial`
|
|
79
|
+
| OpenCode | `Supported` | `Partial` (V2 plugin API only; OpenCode 1.x / V1 unsupported; V2 default-export load verified live on OpenCode 2.1.3 macOS via server-log only and in the 2.1.4 macOS 26.6.2 V2 lifecycle trace, plus a 2.1.4 macOS workspace trace; router injection and observation capture are mechanism-tested on V2) | `Partial` (V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded`, and completion → verification → reminder delivery on a long-lived server are live-observed on one OpenCode 2.1.4 macOS 26.6.2 run; router/context injection, observations, ledger lessons, session create/delete reset, and cancellation remain mechanism-verified only; retained 1.18.31 project-scope `.js` loading and edit/verification state artifact is historical/unsupported V1 evidence) | `.opencode/skills/`, `.agents/skills/`, `.opencode/plugins/` | `~/.config/opencode/skills/`, `~/.agents/skills/`, `~/.config/opencode/plugins/` | **V2-only support boundary (#453):** OpenCode V2 plugin API family only (OpenCode 1.x / V1 unsupported; no validated minimum patch version claimed). Tested V2 live observations: an isolated [OpenCode 2.1.4/macOS 26.6.2 V2 lifecycle trace](../benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md) (one host/version/run establishing V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded` completion, and completion → verification → reminder delivery on a long-lived server; `opencode run --standalone` exits before verification finishes), V2 default-export load on OpenCode 2.1.3 (macOS, 2026-10-23, server-log evidence only), and a separate [OpenCode 2.1.4/macOS session workspace trace](../benchmarks/results/live-host/opencode-2026-11-15-workspace/README.md) observing `ctx.session.get({sessionID})` returning `location.directory` for two sessions matching setup (no mismatch test or V2 hook fire). Router/context injection, observation recording, ledger lessons, session create/delete reset, cancellation, and workspace mismatch handling remain mechanism evidence only. [Retained historical/unsupported V1 evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md) (OpenCode 1.18.31, macOS) documents project-scope `.js` loading and edit/verification state in one V1 host session, with a post-reset final snapshot, hard lock only an interactive observation with no retained blocked-tool trace, and operator-seeded then agent-rewritten reflection; it is preserved as historical/unsupported evidence only and does not establish current V2 support. `.mjs` auto-discovery is silently ignored (issue #127); global scope, npm-package installation, and other host versions remain unverified. |
|
|
80
80
|
| GitHub Copilot agent surfaces | `Supported` | `Unknown` for a Harness-specific plugin install | `Unknown` | `.github/skills/`, `.agents/skills/`, repository instructions | `~/.copilot/skills/`, `~/.agents/skills/` | GitHub Agent Skills paths and installer behavior are checked; no live Copilot session or plugin install is preserved. |
|
|
81
81
|
| Cursor | `Supported` | `Mechanism verified` for the portable package shape | `Unknown` for Harness | `.cursor/skills/`, `.agents/skills/` | `~/.cursor/skills/`, `~/.agents/skills/` | Official paths and package shape are checked; Cursor plugin loading and hooks remain unverified. |
|
|
82
82
|
| Continue.dev | `Unknown` for standalone `SKILL.md` discovery | `Unknown` | `Unknown` | `.continue/rules/` is documented; `.continue/skills/` is only an installer candidate | `~/.continue/skills/` is only an installer candidate | The reviewed official docs establish rules, not an Agent Skills host contract. |
|
|
@@ -192,29 +192,63 @@ The general installer merges shared files only through Harness-owned markers and
|
|
|
192
192
|
|
|
193
193
|
## OpenCode boundary
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
`
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
195
|
+
Harness supports the **OpenCode V2 plugin API only**; OpenCode 1.x / V1 is
|
|
196
|
+
unsupported (#453). The plugin module (`opencode-plugin/index.mjs`, installed
|
|
197
|
+
under a `.js` filename) default-exports `{ id: "harness.enforcement", setup(ctx) }`
|
|
198
|
+
as its only public surface and registers `ctx.session.hook("prompt|context")`,
|
|
199
|
+
`ctx.tool.hook("execute.before|after")`, and `ctx.event.subscribe()` through
|
|
200
|
+
the OpenCode V2 plugin context, backed by a private internal enforcement core.
|
|
201
|
+
No public V1 factory export, V1-only event fallback (such as host
|
|
202
|
+
`session.idle` or legacy top-level/nested session-id fallbacks), V1 hook
|
|
203
|
+
registration, or compatibility mode is supported; reintroducing V1 support
|
|
204
|
+
requires an explicit owner-approved support-contract change. OpenCode V2
|
|
205
|
+
rejects named-export-only plugins with `Plugin must export a default definition
|
|
206
|
+
with an id and an effect or setup function`.
|
|
207
|
+
|
|
208
|
+
The supported boundary is the **V2 API family**; exact tested versions are
|
|
209
|
+
recorded separately rather than claiming a validated minimum patch version or
|
|
210
|
+
coverage of every V2 release:
|
|
211
|
+
|
|
212
|
+
- **OpenCode 2.1.3 (macOS, 2026-10-23):** server-log load-only evidence showing
|
|
213
|
+
the named-export failure and recovery after switching to the V2 default
|
|
214
|
+
export (no hook-fire artifact).
|
|
215
|
+
- **OpenCode 2.1.4 (macOS, 2026-11-15):** a separate [workspace trace](../benchmarks/results/live-host/opencode-2026-11-15-workspace/README.md)
|
|
216
|
+
observing `ctx.session.get({sessionID})` returning `location.directory` for
|
|
217
|
+
two sessions whose directories matched setup; it establishes field
|
|
218
|
+
availability only, not mismatch handling or V2 hook behavior.
|
|
219
|
+
- **OpenCode 2.1.4 (macOS 26.6.2, 2026-11-24):** an isolated [V2 lifecycle trace](../benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md)
|
|
220
|
+
(one host/version/run on a long-lived `opencode serve` + `opencode run --server`)
|
|
221
|
+
establishing V2 default-export loading, V2 tool hooks (`tool.execute.before/after`),
|
|
222
|
+
the V2 event envelope (`{id, created, type, durable, data}`) and
|
|
223
|
+
`session.execution.succeeded` completion type, and completion → verification →
|
|
224
|
+
reminder delivery. Standalone `opencode run --standalone` shuts down before
|
|
225
|
+
verification finishes. Not exercised: router/context injection, observation
|
|
226
|
+
recording, ledger lessons, session create/delete reset, cancellation, global
|
|
227
|
+
scope, npm-package install, other OpenCode versions, and Windows/Linux.
|
|
228
|
+
|
|
229
|
+
These observations establish bounded V2 lifecycle coverage on one macOS host,
|
|
230
|
+
not full V2 lifecycle verification across all hooks or platforms. The adapter
|
|
231
|
+
has deterministic V2 mechanism coverage (`ci/mechanism-2n-opencode-plugin.test.js`,
|
|
232
|
+
V2 edit/verification/reminder/state shapes;
|
|
233
|
+
`ci/mechanism-2p-opencode-v2-entrypoint.test.js`, V2-only export contract and
|
|
234
|
+
lifecycle shapes; `ci/mechanism-397-opencode-observations.test.js`, router
|
|
235
|
+
injection, fail-open router diagnostics on launch or runtime failure, turn
|
|
236
|
+
capture, malformed-label export counts, and opt-out). Prompt/context injection,
|
|
237
|
+
observation capture, ledger lessons, session create/delete reset, cancellation,
|
|
238
|
+
and workspace mismatch handling remain mechanism evidence only.
|
|
239
|
+
|
|
240
|
+
**Historical / unsupported V1 evidence:** retained evidence from the retired V1
|
|
241
|
+
era documents project-scope `.js` loading and edit/verification state on
|
|
242
|
+
OpenCode 1.18.31 (macOS): [live-host evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md).
|
|
243
|
+
That snapshot predates #190 and #453 and is preserved as historical/unsupported
|
|
244
|
+
evidence only — never promote it to current V2 capability evidence. Its final
|
|
245
|
+
snapshot is post-reset, the old hard lock was only an interactive observation
|
|
246
|
+
with no retained blocked-tool trace, and the old reflection was operator-seeded
|
|
247
|
+
then agent-rewritten (so it proves no behavioral effect). The forced Rule-of-3
|
|
248
|
+
reflection gate has since been retired; current package and mechanism checks
|
|
249
|
+
cover that retirement, with no post-retirement live-host run preserved. `.mjs`
|
|
250
|
+
auto-discovery is silently ignored (issue #127). Global scope, npm-package
|
|
251
|
+
installation, and other OpenCode versions remain unverified.
|
|
218
252
|
|
|
219
253
|
The plugin verification runner uses asynchronous child processes with a shared
|
|
220
254
|
sequence budget and bounded streamed diagnostics. Deterministic mechanism
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "harness-platform-compatibility-v1",
|
|
3
|
-
"last_reviewed": "2026-11-
|
|
3
|
+
"last_reviewed": "2026-11-24",
|
|
4
4
|
"status_vocabulary": {
|
|
5
5
|
"Supported": "An official or native mechanism exists and the Harness behavior is verified.",
|
|
6
6
|
"Mechanism verified": "Harness package, adapter, or installer checks pass, but a real host run is not confirmed.",
|
|
@@ -179,19 +179,21 @@
|
|
|
179
179
|
"name": "OpenCode",
|
|
180
180
|
"official_sources": [
|
|
181
181
|
"https://opencode.ai/docs/skills",
|
|
182
|
-
"https://opencode.ai/docs/plugins/"
|
|
182
|
+
"https://opencode.ai/docs/plugins/",
|
|
183
|
+
"https://opencode.ai/docs/build/plugins/server/",
|
|
184
|
+
"https://opencode.ai/docs/build/plugins/migrate-v1/"
|
|
183
185
|
],
|
|
184
186
|
"capabilities": {
|
|
185
187
|
"standaloneSkills": {"status": "Supported", "paths": {"project": [".opencode/skills", ".agents/skills", ".claude/skills"], "global": ["~/.config/opencode/skills", "~/.agents/skills", "~/.claude/skills"]}},
|
|
186
|
-
"pluginSupport": {"status": "Partial", "paths": {"project": [".opencode/plugins"], "global": ["~/.config/opencode/plugins"]}, "notes": "
|
|
188
|
+
"pluginSupport": {"status": "Partial", "paths": {"project": [".opencode/plugins"], "global": ["~/.config/opencode/plugins"]}, "notes": "OpenCode V2 plugin API only; OpenCode 1.x / V1 is unsupported (#453). Default export ({ id, setup(ctx) }) is the only public surface. Tested V2 live observations: OpenCode 2.1.4 (macOS 26.6.2, isolated V2 lifecycle trace at benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md establishing V2 default-export load, tool hooks, event envelope + session.execution.succeeded, and completion -> verification -> reminder delivery on a long-lived server), OpenCode 2.1.3 (macOS, server-log load-only), and OpenCode 2.1.4 (macOS, limited session workspace trace); no validated minimum patch version is claimed. Install under a .js filename because .mjs install names are silently ignored (issue #127). Retained OpenCode 1.18.31 (macOS) evidence (benchmarks/results/live-host/opencode-2026-09-16/README.md) is historical/unsupported V1 evidence only. Global scope, npm-package installation, and other host versions remain unverified."},
|
|
187
189
|
"bundledSkills": {"status": "Partial", "notes": "Harness provides a standalone enforcement module; it is not an OpenCode bundled-skill package."},
|
|
188
|
-
"hooksLifecycle": {"status": "Partial", "notes": "
|
|
189
|
-
"projectScope": {"status": "Partial", "paths": {"skills": [".opencode/skills", ".agents/skills"], "plugins": [".opencode/plugins"]}, "notes": "
|
|
190
|
+
"hooksLifecycle": {"status": "Partial", "notes": "OpenCode V2 plugin API only (OpenCode 1.x / V1 unsupported). An isolated OpenCode 2.1.4 (macOS 26.6.2) V2 lifecycle trace (benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md) establishes V2 default-export load, V2 tool hooks (tool.execute.before/after), the V2 event envelope + session.execution.succeeded completion, and completion -> verification -> reminder delivery on a long-lived server (standalone opencode run exits before verification finishes). Router/context injection, observation recording, ledger lessons, session create/delete reset, and cancellation were not exercised live and remain mechanism-verified only; OpenCode 2.1.3 evidence is load-only and the 2026-11-15 OpenCode 2.1.4 workspace trace did not fire V2 hooks. Retained historical/unsupported V1 evidence (benchmarks/results/live-host/opencode-2026-09-16/README.md) covers project-scope .js loading and edit/verification state on OpenCode 1.18.31 (macOS) from a post-reset snapshot predating Rule-of-3 retirement (hard lock was only an interactive observation with no retained blocked-tool trace; reflection was operator-seeded) and does not establish current V2 capability. Global scope, npm-package installation, and other host versions remain unverified."},
|
|
191
|
+
"projectScope": {"status": "Partial", "paths": {"skills": [".opencode/skills", ".agents/skills"], "plugins": [".opencode/plugins"]}, "notes": "Project-scope V2 default-export load, tool hooks, session.execution.succeeded completion, and completion -> verification -> reminder delivery on a long-lived server were observed on one OpenCode 2.1.4 (macOS 26.6.2) run (benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md), alongside OpenCode 2.1.3 (macOS) server-log load and 2.1.4 (macOS) workspace field availability; router/context injection, observations, ledger lessons, session create/delete reset, and cancellation remain unverified live. Standalone skill discovery remains path-contract verified. Retained OpenCode 1.18.31 (macOS) artifact is historical/unsupported V1 evidence only."},
|
|
190
192
|
"globalScope": {"status": "Mechanism verified", "paths": {"skills": ["~/.config/opencode/skills", "~/.agents/skills"], "plugins": ["~/.config/opencode/plugins"]}},
|
|
191
193
|
"installUninstallSymmetry": {"status": "Unknown", "notes": "The adapter is manually copied; Harness does not own an OpenCode install/uninstall flow."},
|
|
192
194
|
"assetsReferences": {"status": "Mechanism verified", "notes": "The adapter is self-contained and skill references are separately checked."},
|
|
193
195
|
"updateSync": {"status": "Unknown", "notes": "No live OpenCode refresh or npm plugin update is preserved."},
|
|
194
|
-
"liveHostVerification": {"status": "Partial", "evidence": "benchmarks/results/live-host/opencode-2026-
|
|
196
|
+
"liveHostVerification": {"status": "Partial", "evidence": "benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md", "notes": "OpenCode V2 plugin API only; OpenCode 1.x / V1 is unsupported (#453). Tested V2 live evidence: one isolated OpenCode 2.1.4 (macOS 26.6.2) V2 lifecycle trace at benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md (V2 default-export load, V2 tool hooks, V2 event envelope + session.execution.succeeded completion, and completion -> verification -> reminder delivery on a long-lived server; standalone opencode run exits before verification finishes; router/context injection, observation recording, ledger lessons, session create/delete reset, and cancellation not exercised), OpenCode 2.1.3 (macOS, server-log load-only), and OpenCode 2.1.4 (macOS, limited session workspace trace at benchmarks/results/live-host/opencode-2026-11-15-workspace/README.md); no validated minimum patch version is claimed. The retained historical artifact at benchmarks/results/live-host/opencode-2026-09-16/README.md is historical/unsupported V1 evidence documenting project-scope .js loading and edit/verification state on OpenCode 1.18.31 (macOS), not current V2 capability or durable hard enforcement: final snapshot is post-reset (hardLock: false), hard lock was only an interactive observation with no retained blocked-tool trace, reflection was operator-seeded, and agent-controlled state deletion reset the former breaker before Rule-of-3 retirement. Global scope, npm-package installation, and other host versions remain unverified."}
|
|
195
197
|
}
|
|
196
198
|
},
|
|
197
199
|
{
|
|
@@ -174,7 +174,7 @@ warning sign. The review page samples the turns where they differ.
|
|
|
174
174
|
cannot read Codex trust state.
|
|
175
175
|
- The final message comes from the rollout's `task_complete` event.
|
|
176
176
|
- Fresh live-host verification on Windows (Codex CLI 0.162.1, 2026-10-13) exercised the user-hook compatibility fallback: only the `UserPromptSubmit` and `Stop` observation hooks were individually reviewed/trusted. Two consecutive real turns produced `host: "codex"` records with distinct current `turn_id` values and their respective valid self-reports. The sanitized record excerpt and scope limits are preserved in [Codex live-host evidence](../benchmarks/results/live-host/codex-2026-10-13/README.md). This does not verify native plugin-bundled hooks, other lifecycle events, or tool behavior capture.
|
|
177
|
-
- **OpenCode
|
|
177
|
+
- **OpenCode V2 (V2-only; 1.x / V1 unsupported):** the plugin's documented `prompt` hook captures the original user text and runs the canonical kernel router; its `context` hook adds that router output, including the exact label instruction, to primary model requests. OpenCode V2 tool events and `session.execution.succeeded` feed the shared observation library, which reads the current turn's final assistant text through the session context API. `HARNESS_OBSERVATIONS=off` disables capture while routing injection remains active. Deterministic mechanism tests cover injection, turn recording, malformed labels, and opt-out; there is no retained live-host artifact for these hooks yet.
|
|
178
178
|
- The OpenCode exporter reports malformed `label-invalid` and `label-unparseable` records by host in `malformedLabelsByHost`; missing labels remain a separate reason and count.
|
|
179
179
|
- The final message must belong to the current turn. A transcript scan
|
|
180
180
|
stops at the start of the current turn (Codex `task_started` or a user
|
package/docs/telemetry.md
CHANGED
|
@@ -40,7 +40,7 @@ When a host does not expose a reliable duration, the value remains `null`; Harne
|
|
|
40
40
|
| Host | Adapter | Evidence boundary |
|
|
41
41
|
| --- | --- | --- |
|
|
42
42
|
| Claude Code | Narrow `Skill` Pre/Post hooks + Stop; existing `state-persist` observes host-reported tool duration | Mechanism covered in CI; live certification remains #82 |
|
|
43
|
-
| OpenCode | Existing single-process plugin records skill before/after, measures tool elapsed in-process, closes on `session.
|
|
43
|
+
| OpenCode | Existing single-process V2 plugin records skill before/after, measures tool elapsed in-process, closes on `session.execution.succeeded` (V2-only; 1.x / V1 unsupported) | Mechanism covered in CI; retained live support remains bounded by #37/#82/#453 |
|
|
44
44
|
| Codex | OpenAI package includes the same narrow Skill/Stop adapter | **Mechanism only** while plugin hook mounting/attribution is blocked by #122; no live claim |
|
|
45
45
|
|
|
46
46
|
Telemetry failure is always fail-open and cannot block a task.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -237,9 +237,9 @@ Do not troubleshoot a missing `SessionStart` or `UserPromptSubmit` hook in the p
|
|
|
237
237
|
|
|
238
238
|
### OpenCode plugin implementation works in tests but host loading is uncertain
|
|
239
239
|
|
|
240
|
-
**Symptom:** Source/mechanism tests pass, but there is no evidence that a real OpenCode session loaded and fired the plugin.
|
|
240
|
+
**Symptom:** Source/mechanism tests pass, but there is no evidence that a real OpenCode V2 session loaded and fired the plugin.
|
|
241
241
|
|
|
242
|
-
**Interpretation:**
|
|
242
|
+
**Interpretation:** Harness targets the **OpenCode V2 plugin API only** (OpenCode 1.x / V1 is unsupported, #453). Live V2 evidence is bounded to one isolated OpenCode 2.1.4 (macOS 26.6.2) long-lived server trace ([V2 lifecycle trace](../benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md): V2 default-export load, tool hooks, `session.execution.succeeded`, and completion → verification → reminder delivery; standalone `opencode run` exits before verification finishes), plus 2.1.3 load-only and 2.1.4 workspace traces; router/context injection, observations, ledger lessons, session create/delete reset, cancellation, global scope, npm-package install, and other versions/OSes remain **mechanism-tested, live unverified**, and the retained 1.18.31 artifact is historical/unsupported V1 evidence only. Check [`../opencode-plugin/README.md`](../opencode-plugin/README.md) and run the OpenCode mechanism coverage. Do not promote a source-level pass or historical V1 artifact into a V2 live-host pass without a real V2 session artifact.
|
|
243
243
|
|
|
244
244
|
## Performance Issues
|
|
245
245
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adds edit tracking, verification reminders, prompt routing, and observation hooks for OpenCode.
|
|
4
4
|
|
|
5
|
-
> **
|
|
5
|
+
> **Support and evidence boundary:** Harness supports the **OpenCode V2 plugin API only**; OpenCode 1.x / V1 is unsupported (#453). The plugin is covered by deterministic V2 mechanism tests. Tested V2 live observations cover one isolated OpenCode `2.1.4` (macOS 26.6.2) long-lived server run ([V2 lifecycle trace](../benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md): V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded` completion, and completion → verification → reminder delivery; standalone `opencode run` exits before verification finishes), alongside OpenCode `2.1.3` (macOS, server-log load-only) and OpenCode `2.1.4` (macOS, [workspace trace](../benchmarks/results/live-host/opencode-2026-11-15-workspace/README.md)); router/context injection, observation recording, ledger lessons, session create/delete reset, cancellation, and a validated minimum patch version remain unverified. Retained historical/unsupported V1 evidence documents project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS) — [live-host evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md). That retained snapshot is historical and does not establish current V2 capability: its final state was post-reset; the hard-lock was only an interactive observation with no retained blocked-tool trace. Reflection was operator-seeded, then agent-rewritten, so no behavioral-effectiveness claim is made. The current plugin does not force reflection or block edits based on verification history. Global scope, npm-package installation, and other host versions remain unverified. See [`../docs/platform-capabilities.md`](../docs/platform-capabilities.md).
|
|
6
6
|
|
|
7
7
|
## Problem
|
|
8
8
|
|
|
@@ -13,27 +13,25 @@ only SUGGEST rules (soft guidance). This means:
|
|
|
13
13
|
|
|
14
14
|
## The plugin
|
|
15
15
|
|
|
16
|
-
**File:** `index.mjs` - the ESM plugin entrypoint.
|
|
17
|
-
the
|
|
18
|
-
|
|
16
|
+
**File:** `index.mjs` - the OpenCode V2 ESM plugin entrypoint. Harness targets
|
|
17
|
+
the OpenCode V2 plugin API only; OpenCode 1.x / V1 is unsupported, and the
|
|
18
|
+
module's only public surface is its V2 default export
|
|
19
|
+
`{ id: "harness.enforcement", setup(ctx) }`. There is no manifest-to-script
|
|
19
20
|
mechanism; an earlier version of this plugin assumed one (a `plugin.json`
|
|
20
21
|
mapping event names to standalone scripts) and opencode never invoked it -
|
|
21
22
|
see issue #37 for how that was found and fixed. **Naming caveat (issue
|
|
22
23
|
#127):** opencode's discovery glob only matches `*.js`/`*.ts`, so the file
|
|
23
24
|
must be copied to a `.js` name when installed - see Installation below.
|
|
24
25
|
|
|
25
|
-
It implements edit tracking
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`
|
|
29
|
-
(
|
|
30
|
-
|
|
31
|
-
enough for opencode to discover and
|
|
32
|
-
repository
|
|
33
|
-
|
|
34
|
-
V1 `(input, output)` shape, including
|
|
35
|
-
`output.args` when the host supplies tool arguments only in the result object.
|
|
36
|
-
OpenCode 2's prompt injection and observation path resolves the canonical
|
|
26
|
+
It implements edit tracking, verification reminders, prompt/context routing,
|
|
27
|
+
and observation hooks through the OpenCode V2 plugin context:
|
|
28
|
+
|
|
29
|
+
`setup(ctx)` registers `ctx.session.hook("prompt|context")`,
|
|
30
|
+
`ctx.tool.hook("execute.before|after")`, and `ctx.event.subscribe()` and wires
|
|
31
|
+
them into a private internal enforcement core. Copying this one file into
|
|
32
|
+
`.opencode/plugins/` under a `.js` name is enough for opencode to discover and
|
|
33
|
+
invoke it; `plugin.json` is only a repository inventory and is not an opencode
|
|
34
|
+
runtime manifest. Prompt injection and observation capture resolve the canonical
|
|
37
35
|
`harness-everything/scripts/kernel-router.js` and
|
|
38
36
|
`hooks/scripts/lib/observations.js` from an ancestor Harness checkout/runtime.
|
|
39
37
|
|
|
@@ -42,16 +40,16 @@ OpenCode 2's prompt injection and observation path resolves the canonical
|
|
|
42
40
|
Fires after every `edit`, `write` or `apply_patch` tool call and marks
|
|
43
41
|
verification as pending.
|
|
44
42
|
|
|
45
|
-
### 2. Verification reminder (`event`, on `session.
|
|
43
|
+
### 2. Verification reminder (`ctx.event.subscribe()`, on `session.execution.succeeded`)
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
hook does. `session.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
available `npm test` / `npm run lint` / `npm run build` scripts right
|
|
52
|
-
and on failure calls `
|
|
53
|
-
message into the session -
|
|
54
|
-
|
|
45
|
+
OpenCode has no "before complete" hook to block the way Claude Code's Stop
|
|
46
|
+
hook does. `session.execution.succeeded` (carrying `data.sessionID`) - fired
|
|
47
|
+
when the agent's turn completes in OpenCode V2 - is the closest analog, and it
|
|
48
|
+
cannot be blocked. So when it fires with verification still pending, the plugin
|
|
49
|
+
runs the available `npm test` / `npm run lint` / `npm run build` scripts right
|
|
50
|
+
there, and on failure calls `ctx.session.prompt()` to push a synthetic follow-up
|
|
51
|
+
message into the session - prompting the agent to keep working instead of
|
|
52
|
+
stopping with unverified edits.
|
|
55
53
|
|
|
56
54
|
The async runner streams stdout/stderr and gives the **whole ordered sequence**
|
|
57
55
|
(`test`, `lint`, `build`) one wall-clock budget: 10 minutes by default, overridden
|
|
@@ -65,7 +63,7 @@ signal, or cancellation). The follow-up describes the verification outcome.
|
|
|
65
63
|
|---|---|
|
|
66
64
|
| Retained output | First and last 2,000 characters per stream; the final diagnostic shares a 2,000-character budget across streams, plus labels/elision markers |
|
|
67
65
|
| Timeout/cancel | Terminate the shell/npm/script process group, then force-kill after 150 ms on POSIX; Windows uses `taskkill /T /F` |
|
|
68
|
-
| Concurrent lifecycle | Duplicate
|
|
66
|
+
| Concurrent lifecycle | Duplicate turn-completion events share the active run; a code edit or session reset aborts it; a completion arriving during cancellation waits for cleanup before verifying the newer edits; the V2 event stream continues consuming cancellation events; disposal awaits active child cleanup; stale results cannot clear newer edits or recreate deleted state |
|
|
69
67
|
|
|
70
68
|
The event loop remains available while scripts run. The output-retention limit
|
|
71
69
|
never becomes a check verdict. Mechanism tests cover large output, shared
|
|
@@ -73,28 +71,22 @@ budget, child cleanup and concurrent hooks; these are deterministic mechanism
|
|
|
73
71
|
evidence, not a new live-host verification claim. Processes deliberately
|
|
74
72
|
escaping the process group are outside this cleanup boundary.
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
the follow-up is pending and ignores repeated `session.
|
|
78
|
-
code edit arrives. If prompt delivery fails, the exact
|
|
79
|
-
and retried on the next
|
|
74
|
+
Completion handling is bounded: after a failed verification, the plugin records
|
|
75
|
+
that the follow-up is pending and ignores repeated `session.execution.succeeded`
|
|
76
|
+
events until a new code edit arrives. If prompt delivery fails, the exact
|
|
77
|
+
follow-up text is saved and retried on the next completion event without
|
|
78
|
+
re-running verification.
|
|
80
79
|
|
|
81
80
|
## Installation
|
|
82
81
|
|
|
83
|
-
**OpenCode
|
|
82
|
+
**OpenCode V2 plugin API only:** the module default-exports
|
|
84
83
|
`{ id: "harness.enforcement", setup(ctx) }` and registers
|
|
85
84
|
`ctx.session.hook("prompt|context")`, `ctx.tool.hook("execute.before|after")`,
|
|
86
|
-
plus `ctx.event.subscribe()` through the OpenCode
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
(`{client, directory}`) and returns a V1 hooks object
|
|
92
|
-
(`tool.execute.before`, `tool.execute.after`, `event`); the V2 `setup`
|
|
93
|
-
adapter wraps that factory and maps the V2 hook events onto it, so the
|
|
94
|
-
enforcement logic is shared, not duplicated.
|
|
95
|
-
|
|
96
|
-
The prompt/context routing and System One observation hooks are V2-only. The
|
|
97
|
-
V1 factory keeps its existing enforcement hooks; it does not capture turns.
|
|
85
|
+
plus `ctx.event.subscribe()` through the OpenCode V2 plugin context. No named
|
|
86
|
+
V1 factory, host `session.idle`, or legacy session-id event fallback is
|
|
87
|
+
exported or supported; OpenCode 1.x / V1 is unsupported. OpenCode V2 rejects
|
|
88
|
+
named-export-only plugins with `Plugin must export a default definition with an
|
|
89
|
+
id and an effect or setup function` (SchemaError at `["default"]`).
|
|
98
90
|
|
|
99
91
|
When OpenCode runs on Bun, its Harness router needs `node` on the OpenCode
|
|
100
92
|
process's `PATH`. Run `node --version` from the same environment that launches
|
|
@@ -102,9 +94,6 @@ OpenCode and check it against the [Harness Node.js baseline](../docs/repository-
|
|
|
102
94
|
If the router cannot start or load, OpenCode still admits prompts and logs a
|
|
103
95
|
`router-unavailable` warning with a reason and per-plugin count.
|
|
104
96
|
|
|
105
|
-
Direction:
|
|
106
|
-
named factory (V1 hosts/tests) → default-export setup adapter → V2 domains.
|
|
107
|
-
|
|
108
97
|
Copy `index.mjs` into opencode's plugin directory **under a `.js` filename**.
|
|
109
98
|
The router and observation hooks resolve from a Harness checkout above the
|
|
110
99
|
plugin, or from sibling `harness-everything/`, `hooks/scripts/`, and
|
|
@@ -126,16 +115,16 @@ cp -R scripts/lib ~/.config/opencode/scripts/
|
|
|
126
115
|
Restart OpenCode after copying so the plugin is discovered at startup.
|
|
127
116
|
|
|
128
117
|
The destination extension matters: opencode's plugin auto-discovery scans
|
|
129
|
-
only `*.js` / `*.ts` files in those directories
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
118
|
+
only `*.js` / `*.ts` files in those directories, so a `.mjs` copy is **silently
|
|
119
|
+
never loaded** - no error, no hooks, no state. Keep the `.js` install filename
|
|
120
|
+
for current V2 installs (the original extension A/B probe is preserved as
|
|
121
|
+
historical evidence in
|
|
133
122
|
[`benchmarks/results/live-host/opencode-2026-09-16/probe-control.md`](../benchmarks/results/live-host/opencode-2026-09-16/probe-control.md)).
|
|
134
123
|
|
|
135
124
|
opencode auto-loads `.js`/`.ts` files dropped in those directories at startup -
|
|
136
|
-
no `opencode.json` entry needed.
|
|
137
|
-
|
|
138
|
-
|
|
125
|
+
no `opencode.json` entry needed. Explicit local-file configuration and
|
|
126
|
+
npm-package installation are separate installation surfaces and remain
|
|
127
|
+
unverified.
|
|
139
128
|
|
|
140
129
|
## Manual verification CLI
|
|
141
130
|
|
|
@@ -169,20 +158,25 @@ session root.
|
|
|
169
158
|
|
|
170
159
|
## Testing
|
|
171
160
|
|
|
172
|
-
`ci/mechanism-2n-opencode-plugin.test.js`
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
repeated
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
hook-sequence
|
|
182
|
-
A passing test is therefore mechanism evidence, not live-host
|
|
183
|
-
|
|
184
|
-
|
|
161
|
+
`ci/mechanism-2n-opencode-plugin.test.js` and
|
|
162
|
+
`ci/mechanism-2p-opencode-v2-entrypoint.test.js` import `index.mjs`, enforce the
|
|
163
|
+
V2-only default-export contract (`{ id, setup(ctx) }`), and drive the registered
|
|
164
|
+
V2 hooks with a mock V2 `ctx` - covering edit → `session.execution.succeeded` →
|
|
165
|
+
reminder, repeated failures, legacy pending state remaining inert,
|
|
166
|
+
prompt-delivery retry, repeated-completion idempotency, session isolation, reset
|
|
167
|
+
behavior, and legacy-state migration.
|
|
168
|
+
|
|
169
|
+
They do not launch a real opencode process; the tests remain deterministic
|
|
170
|
+
hook-sequence checks against the documented and source-verified V2 hook
|
|
171
|
+
signatures. A passing test is therefore mechanism evidence, not live-host
|
|
172
|
+
loading evidence. The isolated OpenCode 2.1.4 (macOS 26.6.2) V2 lifecycle trace
|
|
173
|
+
lives at
|
|
174
|
+
[`benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/`](../benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/),
|
|
175
|
+
the limited OpenCode 2.1.4 workspace trace lives at
|
|
176
|
+
[`benchmarks/results/live-host/opencode-2026-11-15-workspace/`](../benchmarks/results/live-host/opencode-2026-11-15-workspace/),
|
|
177
|
+
the historical/unsupported 1.18.31 archive lives at
|
|
185
178
|
[`benchmarks/results/live-host/opencode-2026-09-16/`](../benchmarks/results/live-host/opencode-2026-09-16/),
|
|
186
179
|
and `ci/mechanism-30-opencode-plugin-loadability.test.js` (npm script
|
|
187
180
|
`test:opencode:loadability`) fails any change that reintroduces a
|
|
188
181
|
silently-ignored install filename such as `harness-enforcement.mjs`.
|
|
182
|
+
Verification reminders need a long-lived server (`opencode serve` + `opencode run --server`); `opencode run --standalone` exits before verification completes.
|
|
@@ -661,7 +661,7 @@ function appendTelemetry(workspace, input) {
|
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
663
|
|
|
664
|
-
|
|
664
|
+
const createEnforcement = async ({ client, directory, signal }) => {
|
|
665
665
|
// State is resolved per real workspace and per opencode session. The CJS
|
|
666
666
|
// hooks use the same workspaces/<key>/state/sessions/<id> contract, while
|
|
667
667
|
// the old flat plugin state is intentionally left untouched because it is
|
|
@@ -1033,9 +1033,9 @@ export const HarnessEnforcement = async ({ client, directory, signal }) => {
|
|
|
1033
1033
|
// function" (SchemaError at ["default"]) - this is what tripped the global
|
|
1034
1034
|
// install on this machine's OpenCode 2.1.3.
|
|
1035
1035
|
//
|
|
1036
|
-
// The
|
|
1037
|
-
//
|
|
1038
|
-
//
|
|
1036
|
+
// The private `createEnforcement` factory above keeps an internal hooks-object
|
|
1037
|
+
// shape; this default export adapts it to the V2 hooks. OpenCode 1.x is not
|
|
1038
|
+
// supported. Tool hook events are verified
|
|
1039
1039
|
// OpenCode 2.1.3 shapes: execute.before is {tool, sessionID, agent, messageID,
|
|
1040
1040
|
// id, input} with `input` carrying the tool args; execute.after adds
|
|
1041
1041
|
// {status, result | error}.
|
|
@@ -1129,11 +1129,11 @@ export default {
|
|
|
1129
1129
|
const enforcementFor = workspace => {
|
|
1130
1130
|
if (events.signal.aborted) return Promise.resolve(null)
|
|
1131
1131
|
if (!enforcementByWorkspace.has(workspace)) {
|
|
1132
|
-
enforcementByWorkspace.set(workspace,
|
|
1132
|
+
enforcementByWorkspace.set(workspace, createEnforcement({
|
|
1133
1133
|
signal: events.signal,
|
|
1134
1134
|
client: {
|
|
1135
1135
|
session: {
|
|
1136
|
-
//
|
|
1136
|
+
// The private core calls client.session.prompt({path, body}) twice;
|
|
1137
1137
|
// map it onto the V2 session API instead of duplicating the code.
|
|
1138
1138
|
prompt: ({ path, body }) =>
|
|
1139
1139
|
ctx.session.prompt({
|
|
@@ -1309,13 +1309,11 @@ export default {
|
|
|
1309
1309
|
try {
|
|
1310
1310
|
for await (const raw of ctx.event.subscribe({ signal: events.signal })) {
|
|
1311
1311
|
if (events.signal.aborted) break
|
|
1312
|
-
// OpenCode
|
|
1313
|
-
//
|
|
1314
|
-
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1317
|
-
const turnEnded = raw.type === "session.idle" || raw.type === "session.execution.succeeded"
|
|
1318
|
-
const lifecycleEvent = ["session.idle", "session.created", "session.deleted"].includes(raw.type)
|
|
1312
|
+
// OpenCode V2 events carry the session id at data.sessionID. A turn
|
|
1313
|
+
// completes with session.execution.succeeded; V2 sends no session.idle.
|
|
1314
|
+
const sessionID = raw.data && raw.data.sessionID
|
|
1315
|
+
const turnEnded = raw.type === "session.execution.succeeded"
|
|
1316
|
+
const lifecycleEvent = ["session.created", "session.deleted"].includes(raw.type)
|
|
1319
1317
|
if ((!turnEnded && !lifecycleEvent) || typeof sessionID !== "string" || !sessionID) continue
|
|
1320
1318
|
retryLedgerReleases()
|
|
1321
1319
|
if (raw.type === "session.deleted") invalidatedSessions.add(sessionID)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "harness-everything",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Miya Daniel",
|
|
@@ -37,7 +37,7 @@ flowchart LR
|
|
|
37
37
|
| `<skill-name>/SKILL.md` | One canonical skill per top-level directory. Frontmatter: `name`, `description`, `metadata.author`, `metadata.version`. |
|
|
38
38
|
| `hooks/` | Claude Code lifecycle hooks and shared mechanisms (circuit breaker, workflow/action/scope guards, stop gates). Not every host packages every hook. |
|
|
39
39
|
| `harness-everything/scripts/` | Runtime: kernel/tier routing, workflow contract, verification, bootstrap, self-heal. |
|
|
40
|
-
| `opencode-plugin/` | OpenCode native plugin. Mechanism-tested, with partial live-host evidence (see the boundary below). |
|
|
40
|
+
| `opencode-plugin/` | OpenCode V2 native plugin (OpenCode 1.x / V1 unsupported). Mechanism-tested, with partial live-host evidence (see the boundary below). |
|
|
41
41
|
| `.agents/plugins/` + `plugins/harness-everything/` | Local OpenAI/Codex marketplace + `.codex-plugin` package with canonical skill copies and packaged session/prompt hooks. |
|
|
42
42
|
| `submission/openai/` | Public OpenAI Skills-only listing/test inputs. The public artifact does not include local `.codex-plugin` lifecycle hooks. |
|
|
43
43
|
| `evals/<skill>/` | Trigger/routing eval per skill (waza format). Required for every canonical routed skill. |
|
|
@@ -51,7 +51,13 @@ flowchart LR
|
|
|
51
51
|
|
|
52
52
|
## OpenCode evidence boundary
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
- **Support boundary (V2-only, #453):** Harness supports the OpenCode V2 plugin API only; OpenCode 1.x / V1 is unsupported.
|
|
55
|
+
- New features, fixes, tests, and host compatibility work target V2 only. No V1 public entrypoint, V1-only event fallback, V1 hook registration, or compatibility mode may be added.
|
|
56
|
+
- Retain historical V1 artifacts, but never promote them to current V2 capability evidence.
|
|
57
|
+
- Reintroducing V1 support requires an explicit owner-approved support-contract change; it is not a routine compatibility fix.
|
|
58
|
+
- State the V2 API family as the supported boundary. Tested V2 versions are recorded separately (`2.1.3` server-log load-only; `2.1.4` limited session workspace trace; and one isolated `2.1.4` macOS 26.6.2 [V2 lifecycle trace](benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md) establishing V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded`, and completion → verification → reminder delivery on a long-lived server — standalone `opencode run` exits before verification finishes; router/context injection, observations, ledger lessons, session create/delete reset, cancellation, global scope, npm install, and other versions/OSes were not exercised); none establishes a validated minimum patch version or coverage of every V2 release.
|
|
59
|
+
|
|
60
|
+
**Historical / unsupported V1 evidence:** the retained [OpenCode evidence](benchmarks/results/live-host/opencode-2026-09-16/README.md) documents project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS). It is preserved as historical/unsupported evidence only and does not establish current V2 capability:
|
|
55
61
|
|
|
56
62
|
- The final snapshot is post-reset (`hardLock: false`, `count: 1`).
|
|
57
63
|
- Hard lock is only an interactive observation with no retained blocked-tool trace.
|