harness-everything 0.57.4 → 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.
Files changed (67) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.releaserc.json +2 -0
  4. package/AGENTS.md +8 -2
  5. package/CHANGELOG.md +23 -0
  6. package/README.md +4 -4
  7. package/benchmarks/results/live-host/agy-2026-11-22/README.md +49 -0
  8. package/benchmarks/results/live-host/agy-2026-11-23/README.md +48 -0
  9. package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md +40 -0
  10. package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/edit-state-final.json +11 -0
  11. package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/events-2026-11-24.jsonl +103 -0
  12. package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/host-version.txt +3 -0
  13. package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/live-event-trace-probe.js +11 -0
  14. package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/plugin-load-lines.txt +2 -0
  15. package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/reminder-excerpt.txt +1 -0
  16. package/ci/doc-capability-consistency.test.js +15 -3
  17. package/ci/lib/opencode-v2-driver.js +169 -0
  18. package/ci/mechanism-2ao-plugin-sync.test.js +235 -2
  19. package/ci/mechanism-2n-opencode-plugin.test.js +387 -223
  20. package/ci/mechanism-2p-opencode-v2-entrypoint.test.js +24 -15
  21. package/ci/mechanism-2u-issue-42-regressions.test.js +41 -2
  22. package/ci/mechanism-2w-platform-compatibility.test.js +29 -5
  23. package/ci/mechanism-2x-release-automation.test.js +3 -1
  24. package/ci/mechanism-30-opencode-plugin-loadability.test.js +78 -45
  25. package/ci/mechanism-338-opencode-async.test.js +367 -194
  26. package/ci/mechanism-341-opencode-lane.test.js +143 -183
  27. package/ci/mechanism-39-opencode-verify-outcomes.test.js +118 -86
  28. package/ci/mechanism-394-opencode-ledger-lesson.test.js +46 -97
  29. package/ci/mechanism-397-opencode-observations.test.js +58 -47
  30. package/ci/mechanism-453-opencode-v2-driver.test.js +51 -0
  31. package/ci/mechanism-453-opencode-v2-only-events.test.js +241 -0
  32. package/ci/mechanism-agy-hooks.test.js +1096 -0
  33. package/ci/mechanism-agy-plugin-package.test.js +76 -0
  34. package/ci/telemetry.test.js +31 -24
  35. package/docs/architecture.md +4 -2
  36. package/docs/platform-capabilities.md +62 -26
  37. package/docs/platform-compatibility.json +41 -6
  38. package/docs/system-one-observations.md +1 -1
  39. package/docs/telemetry.md +1 -1
  40. package/docs/troubleshooting.md +2 -2
  41. package/hooks/scripts/agy-post-tool.js +124 -0
  42. package/hooks/scripts/agy-pre-invocation.js +185 -0
  43. package/hooks/scripts/agy-pre-tool.js +158 -0
  44. package/hooks/scripts/agy-session-start.js +54 -0
  45. package/hooks/scripts/agy-stop.js +152 -0
  46. package/hooks/scripts/lib/agy-adapter-core.js +168 -0
  47. package/hooks/scripts/state-persist.js +50 -10
  48. package/opencode-plugin/README.md +60 -66
  49. package/opencode-plugin/index.mjs +11 -13
  50. package/opencode-plugin/plugin.json +1 -1
  51. package/package.json +1 -1
  52. package/plugins/harness-everything/.antigravity-plugin/plugin.json +18 -0
  53. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  54. package/plugins/harness-everything/hooks/scripts/agy-post-tool.js +124 -0
  55. package/plugins/harness-everything/hooks/scripts/agy-pre-invocation.js +185 -0
  56. package/plugins/harness-everything/hooks/scripts/agy-pre-tool.js +158 -0
  57. package/plugins/harness-everything/hooks/scripts/agy-session-start.js +54 -0
  58. package/plugins/harness-everything/hooks/scripts/agy-stop.js +152 -0
  59. package/plugins/harness-everything/hooks/scripts/lib/agy-adapter-core.js +168 -0
  60. package/plugins/harness-everything/hooks/scripts/state-persist.js +50 -10
  61. package/plugins/harness-everything/hooks.json +44 -0
  62. package/plugins/harness-everything/plugin.json +1 -1
  63. package/plugins/harness-everything/rules/AGENTS.md +117 -0
  64. package/sbom.cdx.json +12 -12
  65. package/scripts/plugin-sync.js +105 -14
  66. package/scripts/sync-openai-plugin.js +16 -1
  67. package/scripts/sync-release-version.js +1 -0
@@ -0,0 +1,76 @@
1
+ 'use strict';
2
+
3
+ const assert = require('assert');
4
+ const crypto = require('crypto');
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+
8
+ const ROOT = path.resolve(__dirname, '..');
9
+ const PLUGIN = path.join(ROOT, 'plugins', 'harness-everything');
10
+ const ROOT_PKG = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8'));
11
+ const SOURCE_MANIFEST = JSON.parse(fs.readFileSync(path.join(ROOT, '.claude-plugin', 'plugin.json'), 'utf8'));
12
+
13
+ function sha256File(filePath) {
14
+ return crypto.createHash('sha256').update(fs.readFileSync(filePath)).digest('hex');
15
+ }
16
+
17
+ // 1. Manifest structure & schema
18
+ const AGY_MANIFEST_PATH = path.join(PLUGIN, '.antigravity-plugin', 'plugin.json');
19
+ assert.ok(fs.existsSync(AGY_MANIFEST_PATH), '.antigravity-plugin/plugin.json must exist');
20
+ const agyManifest = JSON.parse(fs.readFileSync(AGY_MANIFEST_PATH, 'utf8'));
21
+
22
+ assert.strictEqual(agyManifest.name, 'harness-everything', 'name must be harness-everything');
23
+ assert.strictEqual(agyManifest.version, ROOT_PKG.version, 'version must match package.json');
24
+ assert.ok(typeof agyManifest.description === 'string' && agyManifest.description.length > 0, 'description must be non-empty');
25
+ assert.ok(agyManifest.author && agyManifest.author.name, 'author name must be present');
26
+ assert.match(agyManifest.repository, /^https:\/\/github\.com\//, 'repository must be valid HTTPS github URL');
27
+ assert.match(agyManifest.homepage, /^https:\/\/github\.com\//, 'homepage must be valid HTTPS URL');
28
+ assert.strictEqual(agyManifest.license, 'Apache-2.0', 'license must be Apache-2.0');
29
+ assert.ok(Array.isArray(agyManifest.keywords) && agyManifest.keywords.length > 0, 'keywords must be non-empty array');
30
+
31
+ // 2. Rules integration (AGENTS.md)
32
+ const RULES_PATH = path.join(PLUGIN, 'rules', 'AGENTS.md');
33
+ assert.ok(fs.existsSync(RULES_PATH), 'plugins/harness-everything/rules/AGENTS.md must exist');
34
+ assert.strictEqual(sha256File(RULES_PATH), sha256File(path.join(ROOT, 'AGENTS.md')), 'rules/AGENTS.md must match repository AGENTS.md byte-for-byte');
35
+
36
+ // 3. AGY hook runtime parity between hooks/scripts/ and plugins/harness-everything/hooks/scripts/
37
+ const HOOKS_JSON = path.join(PLUGIN, 'hooks.json');
38
+ assert.ok(fs.existsSync(HOOKS_JSON), 'plugins/harness-everything/hooks.json must exist at plugin root');
39
+ JSON.parse(fs.readFileSync(HOOKS_JSON, 'utf8'));
40
+
41
+ const agyHookFiles = [
42
+ 'agy-session-start.js',
43
+ 'agy-pre-invocation.js',
44
+ 'agy-pre-tool.js',
45
+ 'agy-post-tool.js',
46
+ 'agy-stop.js',
47
+ 'state-persist.js',
48
+ path.join('lib', 'agy-adapter-core.js')
49
+ ];
50
+ for (const rel of agyHookFiles) {
51
+ const sourceFile = path.join(ROOT, 'hooks', 'scripts', rel);
52
+ const packagedFile = path.join(PLUGIN, 'hooks', 'scripts', rel);
53
+ assert.ok(fs.existsSync(sourceFile), `Source hook script missing: ${rel}`);
54
+ assert.ok(fs.existsSync(packagedFile), `Packaged hook script missing: ${rel}`);
55
+ assert.strictEqual(sha256File(packagedFile), sha256File(sourceFile), `Packaged hook script must match source byte-for-byte: ${rel}`);
56
+ }
57
+
58
+ // 4. Canonical skills parity
59
+ const expectedSkills = (SOURCE_MANIFEST.skills || []).map(entry => path.basename(entry)).sort();
60
+ const packagedSkills = fs.readdirSync(path.join(PLUGIN, 'skills'), { withFileTypes: true })
61
+ .filter(entry => entry.isDirectory())
62
+ .map(entry => entry.name)
63
+ .sort();
64
+
65
+ assert.strictEqual(expectedSkills.length, 28, 'canonical suite should contain 28 skills');
66
+ assert.deepStrictEqual(packagedSkills, expectedSkills, 'AGY package must contain exactly the 28 canonical skills');
67
+
68
+ for (const skillName of packagedSkills) {
69
+ const skillFile = path.join(PLUGIN, 'skills', skillName, 'SKILL.md');
70
+ assert.ok(fs.existsSync(skillFile), `${skillName} must contain SKILL.md`);
71
+ const content = fs.readFileSync(skillFile, 'utf8');
72
+ assert.ok(content.includes('## USE FOR:'), `${skillName} must contain ## USE FOR:`);
73
+ assert.ok(content.includes('## DO NOT USE FOR:'), `${skillName} must contain ## DO NOT USE FOR:`);
74
+ }
75
+
76
+ console.log('Antigravity (AGY) plugin package verified: manifest, rules, hooks parity, and 28 canonical skills in lockstep.');
@@ -4,10 +4,10 @@
4
4
  const fs = require('fs');
5
5
  const os = require('os');
6
6
  const path = require('path');
7
- const { pathToFileURL } = require('url');
8
7
  const { spawnSync } = require('child_process');
9
8
 
10
9
  const ROOT = path.resolve(__dirname, '..');
10
+ const { createV2Driver } = require(path.join(ROOT, 'ci/lib/opencode-v2-driver'));
11
11
  const telemetry = require(path.join(ROOT, 'hooks/scripts/lib/telemetry.js'));
12
12
  const { buildReport } = require(path.join(ROOT, 'telemetry/scripts/report.js'));
13
13
  const { runBenchmark } = require(path.join(ROOT, 'telemetry/scripts/benchmark.js'));
@@ -154,30 +154,37 @@ async function main() {
154
154
  check(disabled.ok === true && disabled.disabled === true && fs.statSync(file).size === beforeDisabled, 'telemetry can be locally disabled without task failure');
155
155
  process.env.HARNESS_TELEMETRY = 'local';
156
156
 
157
- // OpenCode: use the real plugin hooks. No extra process is spawned for
157
+ // OpenCode: use the real V2 plugin hooks. No extra process is spawned for
158
158
  // per-tool timing; before/after timestamps live inside the plugin process.
159
- const skillDir = path.join(workspace, '.claude', 'skills', 'tdd');
160
- fs.mkdirSync(skillDir, { recursive: true });
161
- fs.writeFileSync(path.join(skillDir, 'SKILL.md'), '---\nname: tdd\nmetadata:\n version: 9.9.9\n---\n', 'utf8');
162
- const pluginUrl = pathToFileURL(path.join(ROOT, 'opencode-plugin', 'index.mjs')).href + `?telemetry=${Date.now()}`;
163
- const { HarnessEnforcement } = await import(pluginUrl);
164
- const hooks = await HarnessEnforcement({
165
- directory: workspace,
166
- client: { session: { prompt: async () => {} } },
167
- });
168
- await hooks['tool.execute.before']({ tool: 'skill', sessionID: 'oc-session', callID: 'oc-skill-1', args: { name: 'tdd', secret } }, {});
169
- await hooks['tool.execute.after']({ tool: 'skill', sessionID: 'oc-session', callID: 'oc-skill-1', args: { name: 'tdd' } }, {});
170
- await hooks['tool.execute.before']({ tool: 'bash', sessionID: 'oc-session', callID: 'oc-tool-1', args: { command: secret } }, {});
171
- await new Promise(resolve => setTimeout(resolve, 2));
172
- await hooks['tool.execute.after']({ tool: 'bash', sessionID: 'oc-session', callID: 'oc-tool-1', args: { command: secret } }, {});
173
- await hooks.event({ event: { type: 'session.idle', properties: { sessionID: 'oc-session' } } });
174
-
175
- const allEvents = telemetry.readEvents(file);
176
- const ocEvents = allEvents.filter(event => event.host === 'opencode');
177
- check(ocEvents.some(event => event.event === 'skill.invoke') && ocEvents.some(event => event.event === 'skill.complete'), 'real OpenCode plugin emits skill invocation and turn-boundary completion events');
178
- check(ocEvents.some(event => event.event === 'tool.observed' && Number.isFinite(event.timing.attributedToolDurationMs)), 'OpenCode adapter measures in-process tool duration while skill is active');
179
- check(ocEvents.some(event => event.skillVersion === '9.9.9'), 'OpenCode adapter records locally resolved skill version without storing skill-file path');
180
- check(!fs.readFileSync(file, 'utf8').includes(secret), 'OpenCode telemetry also excludes raw tool arguments');
159
+ const d = await createV2Driver();
160
+ try {
161
+ const skillDir = path.join(d.workspace, '.claude', 'skills', 'tdd');
162
+ fs.mkdirSync(skillDir, { recursive: true });
163
+ fs.writeFileSync(path.join(skillDir, 'SKILL.md'), '---\nname: tdd\nmetadata:\n version: 9.9.9\n---\n', 'utf8');
164
+
165
+ const ocFile = telemetry.telemetryFile(d.workspace, { cwd: d.workspace });
166
+ const beforeHook = d.toolHook('execute.before');
167
+ const afterHook = d.toolHook('execute.after');
168
+ await beforeHook({ tool: 'skill', sessionID: 'oc-session', agent: 'main', messageID: 'oc-msg-1', id: 'oc-skill-1', input: { name: 'tdd', secret } });
169
+ await afterHook({ tool: 'skill', sessionID: 'oc-session', agent: 'main', messageID: 'oc-msg-1', id: 'oc-skill-1', input: { name: 'tdd' }, status: 'completed', result: {} });
170
+ await beforeHook({ tool: 'bash', sessionID: 'oc-session', agent: 'main', messageID: 'oc-msg-2', id: 'oc-tool-1', input: { command: secret } });
171
+ await afterHook({ tool: 'bash', sessionID: 'oc-session', agent: 'main', messageID: 'oc-msg-2', id: 'oc-tool-1', input: { command: secret }, status: 'completed', result: { output: secret } });
172
+ d.emit('session.execution.succeeded', 'oc-session');
173
+
174
+ await d.waitFor(
175
+ () => telemetry.readEvents(ocFile).some(event => event.host === 'opencode' && event.event === 'skill.complete'),
176
+ { label: 'OpenCode skill.complete telemetry event' }
177
+ );
178
+
179
+ const allEvents = telemetry.readEvents(ocFile);
180
+ const ocEvents = allEvents.filter(event => event.host === 'opencode');
181
+ check(ocEvents.some(event => event.event === 'skill.invoke') && ocEvents.some(event => event.event === 'skill.complete'), 'real OpenCode plugin emits skill invocation and turn-boundary completion events');
182
+ check(ocEvents.some(event => event.event === 'tool.observed' && Number.isFinite(event.timing.attributedToolDurationMs)), 'OpenCode adapter measures in-process tool duration while skill is active');
183
+ check(ocEvents.some(event => event.skillVersion === '9.9.9'), 'OpenCode adapter records locally resolved skill version without storing skill-file path');
184
+ check(!fs.readFileSync(ocFile, 'utf8').includes(secret), 'OpenCode telemetry also excludes raw tool arguments');
185
+ } finally {
186
+ await d.teardown();
187
+ }
181
188
 
182
189
  const benchmark = runBenchmark(120);
183
190
  check(Number.isFinite(benchmark.p50Ms) && Number.isFinite(benchmark.p95Ms) && benchmark.count === 120, 'instrumentation benchmark measures local append overhead');
@@ -136,9 +136,11 @@ The installer configures native lifecycle hooks and project skills.
136
136
 
137
137
  Cognitive workflow contracts (boundary/depth/scope/commit/workflow guards) are made observable, not hard-enforced — [#190](https://github.com/dyphn1/Harness-everything/issues/190) downgraded their `exit(2)` blocking to reminders. `action-gate.js` remains the explicit user/host permission and dangerous-action safety boundary. The former Rule-of-3 counter and forced zoom-out path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394).
138
138
 
139
- ### OpenCode — plugin enforcement, scoped live verification
139
+ ### OpenCode — V2 plugin API, scoped live verification
140
140
 
141
- The retained [OpenCode evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md) supports **project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS)**. The final snapshot is **post-reset**. The old hard-lock was an **interactive observation** with **no retained blocked-tool trace**; reflection was **operator-seeded** and then agent-rewritten. The former third-failure reflection and hard-lock paths are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394); the snapshot does not establish current host behavior. Global scope, npm-package installation, and other OpenCode versions remain unverified.
141
+ Harness supports the **OpenCode V2 plugin API only**; OpenCode 1.x / V1 is unsupported (#453). Tested V2 live observations cover one isolated `2.1.4` (macOS 26.6.2) [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`, and completion → verification → reminder delivery on a long-lived server; standalone `opencode run` exits before verification finishes), alongside `2.1.3` macOS server-log load-only and `2.1.4` macOS limited [session workspace trace](../benchmarks/results/live-host/opencode-2026-11-15-workspace/README.md); router/context injection, observations, ledger lessons, session create/delete reset, cancellation, and a validated minimum patch version remain unverified.
142
+
143
+ **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. The final snapshot is **post-reset**. The old hard-lock was an **interactive observation** with **no retained blocked-tool trace**; reflection was **operator-seeded** and then agent-rewritten. The former third-failure reflection and hard-lock paths are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394); the snapshot does not establish current host behavior. Global scope, npm-package installation, and other OpenCode versions remain unverified.
142
144
 
143
145
  This evidence predates #190 and does not establish behavioral effectiveness of the current contract-first lifecycle.
144
146
 
@@ -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 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. OpenCode's retained evidence supports project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS), not durable hard enforcement. No fresh artifacts exist yet for the other surfaces, managed-workspace import, or public OpenAI approval.
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,16 +66,17 @@ 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. The OpenCode V1 adapter does not register `experimental.chat.system.transform` (`output.system`). V1 lesson delivery is `UNCHECKED`. 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`.
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
 
73
73
  | Platform surface | Standalone skills | Plugin support | Hooks/lifecycle | Project scope | Global scope | Current evidence boundary |
74
74
  | --- | --- | --- | --- | --- | --- | --- |
75
75
  | Codex | `Supported` | `Mechanism verified` | `Partial`: user-hook compatibility capture is live-verified for `UserPromptSubmit` and `Stop` on one Windows Codex CLI host; native plugin hooks remain mechanism-verified | `.agents/skills/`, `AGENTS.md` | `~/.agents/skills/` | [Live evidence](../benchmarks/results/live-host/codex-2026-10-13/README.md) verifies two consecutive turns on Codex CLI 0.162.1; native plugin mounting, other lifecycle events, and other versions remain unverified. |
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. |
76
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`. |
77
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. |
78
- | OpenCode | `Supported` | `Partial` live-host loading for the project-scope, `.js`-filename install path on OpenCode 1.18.31 (macOS); router injection and observation capture are mechanism-tested on V2 | `Partial` live-host evidence for project-scope `.js` loading and edit/verification state; new prompt/context hooks have mechanism evidence only | `.opencode/skills/`, `.agents/skills/`, `.opencode/plugins/` | `~/.config/opencode/skills/`, `~/.agents/skills/`, `~/.config/opencode/plugins/` | [Retained evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md): loading and state effects verified in one host session; final snapshot post-reset; hard lock only an interactive observation, with no retained blocked-tool trace, and a post-reset final snapshot; reflection operator-seeded, then agent-rewritten; no raw transcript or behavioral-effectiveness claim. `.mjs` auto-discovery broken (issue #127); global scope, npm-package installation, and other host versions remain unverified; V2 default-export load verified live on OpenCode 2.1.3 (macOS, 2026-10-23, server-log evidence only). A separate [OpenCode 2.1.4/macOS session workspace trace](../benchmarks/results/live-host/opencode-2026-11-15-workspace/README.md) observed `ctx.session.get({sessionID})` returning `location.directory` for two sessions, both matching setup; it did not exercise a mismatch or fire the V2 hooks. Prompt/system injection and observation capture remain mechanism evidence only; no live-host behavior claim is made. |
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. |
79
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. |
80
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. |
81
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. |
@@ -101,6 +102,7 @@ The general installer’s target paths are tested independently from host discov
101
102
  | Cursor | `.cursor/skills/` | `~/.agents/skills/` | Official Agent Skills compatibility path |
102
103
  | GitHub Copilot agent surfaces | `.github/skills/` | `~/.agents/skills/` | Official project/global Agent Skills paths |
103
104
  | Codex | `.agents/skills/` | `~/.agents/skills/` | Official Agent Skills paths; `AGENTS.md` is separate instruction context |
105
+ | Antigravity (AGY) | `.agents/plugins/harness-everything/` | `~/.gemini/config/plugins/harness-everything/` | Native Customization System plugin path and lifecycle hooks |
104
106
  | Continue.dev | `.continue/skills/` | `~/.continue/skills/` | Installer adapter candidate; host discovery is `Unknown` from reviewed official docs |
105
107
  | Hermes Agent | `.agents/skills/` | `~/.hermes/skills/` | Project loading is subject to Hermes trust |
106
108
 
@@ -190,29 +192,63 @@ The general installer merges shared files only through Harness-owned markers and
190
192
 
191
193
  ## OpenCode boundary
192
194
 
193
- The OpenCode adapter targets the V2 plugin contract: it default-exports
194
- `{ id: "harness.enforcement", setup(ctx) }` that registers
195
- `ctx.session.hook("prompt|context")`, `ctx.tool.hook("execute.before|after")`,
196
- and `ctx.event.subscribe()` through the OpenCode 2 plugin context, and keeps the V1-shaped `HarnessEnforcement` factory
197
- for OpenCode 1.x hosts. OpenCode 2 rejects named-export-only plugins with
198
- `Plugin must export a default definition with an id and an effect or setup
199
- function`; that failure (observed on OpenCode 2.1.3, macOS) and the recovery
200
- after the V2 entrypoint were verified live on one host, with retained evidence
201
- in the OpenCode server log only (loading succeeded after a plugin-file
202
- reload; no hook-fire artifact). A separate OpenCode 2.1.4/macOS trace observed
203
- that `ctx.session.get({sessionID})` returns `location.directory` for two
204
- sessions whose directories matched setup; it establishes field availability,
205
- not mismatch handling or V2 hook behavior ([trace notes](../benchmarks/results/live-host/opencode-2026-11-15-workspace/README.md)). The adapter itself has deterministic mechanism
206
- coverage (`ci/mechanism-2n-opencode-plugin.test.js`, V1 shapes;
207
- `ci/mechanism-2p-opencode-v2-entrypoint.test.js`, V2 lifecycle shapes;
208
- `ci/mechanism-397-opencode-observations.test.js`, router injection, fail-open
209
- router diagnostics on launch or runtime failure, turn capture,
210
- malformed-label export counts and opt-out). The injection/capture path has
211
- mechanism evidence only; no live-host hook-fire or mismatch-handling artifact
212
- exists. Retained
213
- evidence supports project-scope `.js` loading and edit/verification state on
214
- OpenCode 1.18.31 (macOS): [live-host evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md). The
215
- retained snapshot predates #190 and remains historical evidence only. The forced Rule-of-3 reflection gate has since been retired; current package and mechanism checks cover that retirement, but no post-retirement live-host run is preserved. The old reflection was operator-seeded, then agent-rewritten, so it proves no behavioral effect. `.mjs` auto-discovery is broken on this host version (issue #127). npm-package installation and behavioral V2-hook fire remain unverified.
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.
216
252
 
217
253
  The plugin verification runner uses asynchronous child processes with a shared
218
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-10-13",
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.",
@@ -61,6 +61,11 @@
61
61
  "project": ".agents/skills",
62
62
  "global": "~/.hermes/skills",
63
63
  "host_discovery_status": "Supported"
64
+ },
65
+ "agy": {
66
+ "project": ".agents/plugins/harness-everything",
67
+ "global": "~/.gemini/config/plugins/harness-everything",
68
+ "host_discovery_status": "Partial"
64
69
  }
65
70
  },
66
71
  "action_gate": {
@@ -87,6 +92,12 @@
87
92
  "fallback": "exit-2-block",
88
93
  "notes": "Public skills-only distribution does not include local lifecycle hooks; local plugin hook semantics remain a separate host capability."
89
94
  },
95
+ "agy": {
96
+ "ask_decision": "Unknown",
97
+ "permission_mode_matrix": "Unknown",
98
+ "fallback": "hook-deny",
99
+ "notes": "agy-pre-tool.js returns {\"decision\":\"deny\",\"reason\":\"...\"} for canonical Action Gate blocks (verified live for run_command force-push on Antigravity 2.0 Desktop App 2.34.0 macOS) and filesystem boundary violations."
100
+ },
90
101
  "other": {
91
102
  "ask_decision": "Unknown",
92
103
  "permission_mode_matrix": "Unknown",
@@ -168,19 +179,21 @@
168
179
  "name": "OpenCode",
169
180
  "official_sources": [
170
181
  "https://opencode.ai/docs/skills",
171
- "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/"
172
185
  ],
173
186
  "capabilities": {
174
187
  "standaloneSkills": {"status": "Supported", "paths": {"project": [".opencode/skills", ".agents/skills", ".claude/skills"], "global": ["~/.config/opencode/skills", "~/.agents/skills", "~/.claude/skills"]}},
175
- "pluginSupport": {"status": "Partial", "paths": {"project": [".opencode/plugins"], "global": ["~/.config/opencode/plugins"]}, "notes": "Live verified scoped: project-scope install of the plugin copied under a .js filename loads on OpenCode 1.18.31 (macOS) and edit/verification state effects are retained (benchmarks/results/live-host/opencode-2026-09-16/README.md). The host discovery silently ignores .mjs install names (issue #127). Global scope and npm-package installation remain mechanism-only."},
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."},
176
189
  "bundledSkills": {"status": "Partial", "notes": "Harness provides a standalone enforcement module; it is not an OpenCode bundled-skill package."},
177
- "hooksLifecycle": {"status": "Partial", "notes": "Historical live-host evidence covers project-scope .js loading and edit/verification state (including then-active breaker failure recording) on OpenCode 1.18.31 (macOS). That snapshot predates the Rule-of-3 retirement; current retirement coverage is package/mechanism evidence only, with no post-retirement live-host trace. Hard lock was only an interactive observation with no retained blocked-tool trace and the final snapshot is post-reset (benchmarks/results/live-host/opencode-2026-09-16/README.md). Global scope, npm-package installation, and other host versions remain mechanism-tested."},
178
- "projectScope": {"status": "Partial", "paths": {"skills": [".opencode/skills", ".agents/skills"], "plugins": [".opencode/plugins"]}, "notes": "Plugin loading at project scope and edit/verification state are live-verified via the retained host session artifact; standalone skill discovery remains path-contract verified."},
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."},
179
192
  "globalScope": {"status": "Mechanism verified", "paths": {"skills": ["~/.config/opencode/skills", "~/.agents/skills"], "plugins": ["~/.config/opencode/plugins"]}},
180
193
  "installUninstallSymmetry": {"status": "Unknown", "notes": "The adapter is manually copied; Harness does not own an OpenCode install/uninstall flow."},
181
194
  "assetsReferences": {"status": "Mechanism verified", "notes": "The adapter is self-contained and skill references are separately checked."},
182
195
  "updateSync": {"status": "Unknown", "notes": "No live OpenCode refresh or npm plugin update is preserved."},
183
- "liveHostVerification": {"status": "Partial", "evidence": "benchmarks/results/live-host/opencode-2026-09-16/README.md", "notes": "Retained historical evidence supports project-scope .js plugin loading and edit/verification state on OpenCode 1.18.31 (macOS), not durable hard enforcement: final snapshot is post-reset (hardLock: false), hard lock only an interactive observation with no retained blocked-tool trace, reflection was operator-seeded, and agent-controlled state deletion reset the former breaker. The snapshot predates the Rule-of-3 retirement and does not establish current post-retirement behavior; current coverage is package/mechanism evidence only, with no retained live-host trace. Global scope, npm-package installation, and other host versions remain unverified."}
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."}
184
197
  }
185
198
  },
186
199
  {
@@ -265,6 +278,28 @@
265
278
  "updateSync": {"status": "Unknown", "notes": "Hermes bundled-skill update behavior is documented, but Harness source refresh is not live verified."},
266
279
  "liveHostVerification": {"status": "Unknown", "notes": "No Hermes session artifact is committed."}
267
280
  }
281
+ },
282
+ {
283
+ "id": "agy",
284
+ "name": "Antigravity (AGY)",
285
+ "official_sources": [
286
+ "https://antigravity.google/docs/skills",
287
+ "https://antigravity.google/docs/plugins",
288
+ "https://antigravity.google/docs/hooks",
289
+ "https://antigravity.google/docs/rules"
290
+ ],
291
+ "capabilities": {
292
+ "standaloneSkills": {"status": "Supported", "notes": "Harness bundles all 28 canonical skills in plugins/harness-everything/skills/ and syncs rules/AGENTS.md; standalone AGY skill-only targets are not separately registered in installer.js."},
293
+ "pluginSupport": {"status": "Partial", "paths": {"manifest": [".antigravity-plugin/plugin.json"], "project": [".agents/plugins/harness-everything"], "global": ["~/.gemini/config/plugins/harness-everything"]}, "notes": "Package parity is mechanism-verified; global Desktop App 2.34.0 (macOS) GetAllPlugins load and agy CLI 1.5.15 validate/list --json are live-verified (validate exits 0 with 2 multi-host warnings; --strict exits 1). Project-scope .agents/plugins/ hook discovery was observed on agy CLI 1.5.15 via a temporary probe plugin; full project-scope harness-everything isolation and Desktop App project scope remain unverified."},
294
+ "bundledSkills": {"status": "Mechanism verified", "paths": {"skills": ["plugins/harness-everything/skills/<name>/SKILL.md"]}, "notes": "Package checks verify all 28 canonical skills, and agy plugin validate --json (1.5.15) counted skills: 28; live invocation across all 28 skills remains unverified."},
295
+ "hooksLifecycle": {"status": "Partial", "notes": "Deterministic mechanism tests cover SessionStart, PreInvocation, PreToolUse, PostToolUse, and Stop. Desktop App 2.34.0 and CLI 1.5.15 (macOS) live-verified SessionStart, PreInvocation, PreToolUse (write_file/run_command), PostToolUse edit timestamps, and Stop (NO_TOOL_CALL). Host limits: PostToolUse omits exitCode and error on shell non-zero exit (1) on both Desktop 2.34.0 and CLI 1.5.15, so unknown shell outcomes grant no verification credit and preserve failed state (explicit exitCode === 0 required); IDE write tools (write_to_file, replace_file_content, multi_replace_file_content) and live Stop model_stop remain unverified."},
296
+ "projectScope": {"status": "Partial", "paths": {"plugins": [".agents/plugins/harness-everything"], "rules": [".agents/rules/AGENTS.md"]}, "notes": "agy CLI 1.5.15 plugin list --json only lists global plugins, while agy --print discovered and executed project-scope .agents/plugins/ hooks from a temporary probe plugin. Full project-scope harness-everything isolation without global install and Desktop App project-scope loading remain unverified."},
297
+ "globalScope": {"status": "Partial", "paths": {"plugins": ["~/.gemini/config/plugins/harness-everything"]}, "notes": "Global load and hook execution are live-verified on Antigravity 2.0 Desktop App 2.34.0 (macOS) and agy CLI 1.5.15 (agy plugin list --json); Windows, Linux, and other AGY versions remain unverified."},
298
+ "installUninstallSymmetry": {"status": "Mechanism verified", "notes": "scripts/plugin-sync.js --host agy install/update/dry-run and staged rollback are covered by mechanism tests and synced live to global scope; plugin-sync.js does not provide uninstall symmetry."},
299
+ "assetsReferences": {"status": "Mechanism verified", "notes": "Packaged skills, rules/AGENTS.md byte-for-byte parity, and packaged agy-*.js hook scripts are verified by ci/mechanism-agy-plugin-package.test.js."},
300
+ "updateSync": {"status": "Partial", "notes": "scripts/plugin-sync.js --host agy --json is mechanism-tested and was observed live updating ~/.gemini/config/plugins/harness-everything on macOS; other OSes and project-scope sync live behavior remain unverified."},
301
+ "liveHostVerification": {"status": "Partial", "evidence": "benchmarks/results/live-host/agy-2026-11-23/README.md", "notes": "Partial live-host evidence covers global Antigravity 2.0 Desktop App 2.34.0 (macOS) and agy CLI 1.5.15 (macOS): plugin validate/list, SessionStart, PreInvocation, PreToolUse (write_file/run_command), PostToolUse edit timestamps, Stop (NO_TOOL_CALL), and temporary project-scope hook discovery. IDE write tools, live shell exitCode: 0 verification credit, live Stop model_stop, full project-scope isolation, and non-macOS hosts remain unverified."}
302
+ }
268
303
  }
269
304
  ]
270
305
  }
@@ -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 2.x:** 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 tool events and `session.idle` 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.
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.idle` | Mechanism covered in CI; retained live support remains bounded by #37/#82 |
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.
@@ -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:** The current repository claim is intentionally **mechanism-tested, live loading unverified**. Check [`../opencode-plugin/README.md`](../opencode-plugin/README.md) and run the OpenCode mechanism coverage. Do not promote a source-level pass into a live-host pass without a real session artifact.
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
 
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ /**
5
+ * Antigravity (AGY) PostToolUse Hook Adapter
6
+ *
7
+ * Captures tool outcomes, tracks execution errors and file edits for state persistence.
8
+ * Bridges AGY tool execution to Harness session state (handoff-state.json).
9
+ * Returns empty JSON object `{}` on stdout as required by AGY protocol.
10
+ */
11
+
12
+ const path = require('path');
13
+ const { spawnSync } = require('child_process');
14
+ const {
15
+ readJsonStdin,
16
+ getAgySessionId,
17
+ getAgyEffectiveCwd
18
+ } = require('./lib/agy-adapter-core');
19
+
20
+ const FILE_MUTATION_TOOLS = new Set([
21
+ 'write_file',
22
+ 'write_to_file',
23
+ 'edit_file',
24
+ 'replace_file_content',
25
+ 'multi_replace_file_content'
26
+ ]);
27
+
28
+ function mapAgyPayloadToStatePersist(payload) {
29
+ const safePayload = payload && typeof payload === 'object' ? payload : {};
30
+ const sessionId = getAgySessionId(safePayload);
31
+ const workspaceCwd = getAgyEffectiveCwd(safePayload);
32
+ const toolCall = (safePayload.toolCall && typeof safePayload.toolCall === 'object') ? safePayload.toolCall : {};
33
+ const rawToolName = toolCall.name || safePayload.tool_name || safePayload.toolName || safePayload.tool || '';
34
+ const args = (toolCall.args && typeof toolCall.args === 'object')
35
+ ? toolCall.args
36
+ : ((safePayload.tool_input && typeof safePayload.tool_input === 'object') ? safePayload.tool_input : {});
37
+
38
+ let toolName = rawToolName;
39
+ let toolInput = { ...args };
40
+ let effectiveCwd = workspaceCwd;
41
+
42
+ if (rawToolName === 'run_command') {
43
+ toolName = 'Bash';
44
+ const command = String(args.CommandLine || args.command || '').trim();
45
+ const commandCwd = (typeof args.Cwd === 'string' && args.Cwd.trim())
46
+ || (typeof args.cwd === 'string' && args.cwd.trim())
47
+ || workspaceCwd;
48
+ effectiveCwd = commandCwd;
49
+ toolInput = {
50
+ command,
51
+ ...(commandCwd ? { cwd: commandCwd } : {})
52
+ };
53
+ } else if (FILE_MUTATION_TOOLS.has(rawToolName)) {
54
+ toolName = 'Write';
55
+ const filePath = args.TargetFile || args.Path || args.path || args.targetFile || args.filePath || args.file_path || '';
56
+ toolInput = { ...args, file_path: filePath };
57
+ }
58
+
59
+ const toolResponse = safePayload.toolResponse || safePayload.tool_response || safePayload.result || {};
60
+ const rawError = safePayload.error || toolResponse.error || '';
61
+ const error = typeof rawError === 'string' ? rawError : (rawError ? JSON.stringify(rawError) : '');
62
+ const stdout = toolResponse.stdout || (typeof safePayload.output === 'string' ? safePayload.output : '') || '';
63
+ const stderr = toolResponse.stderr || (typeof error === 'string' ? error : '') || '';
64
+
65
+ const rawExitCodes = [
66
+ safePayload.exitCode,
67
+ safePayload.exit_code,
68
+ toolResponse.exitCode,
69
+ toolResponse.exit_code
70
+ ].filter(Number.isInteger);
71
+ const exitCode = rawExitCodes.find(code => code !== 0) ?? rawExitCodes[0];
72
+
73
+ const isFailed = Boolean(error && error.trim()) || (exitCode !== undefined && exitCode !== 0);
74
+
75
+ return {
76
+ hook_event_name: isFailed ? 'PostToolUseFailure' : 'PostToolUse',
77
+ session_id: sessionId,
78
+ sessionId: sessionId,
79
+ conversationId: sessionId,
80
+ cwd: effectiveCwd,
81
+ workspace_root: workspaceCwd,
82
+ workspacePaths: (Array.isArray(safePayload.workspacePaths) && safePayload.workspacePaths.length > 0)
83
+ ? safePayload.workspacePaths
84
+ : [workspaceCwd],
85
+ tool_name: toolName,
86
+ tool_input: toolInput,
87
+ tool_response: {
88
+ stdout,
89
+ stderr,
90
+ ...(exitCode !== undefined ? { exitCode } : {})
91
+ },
92
+ error: isFailed ? (error || stderr || `Command exited with code ${exitCode}`) : '',
93
+ ...(exitCode !== undefined ? { exitCode } : {})
94
+ };
95
+ }
96
+
97
+ async function main() {
98
+ const payload = await readJsonStdin();
99
+
100
+ try {
101
+ const mapped = mapAgyPayloadToStatePersist(payload);
102
+ const statePersistScript = path.join(__dirname, 'state-persist.js');
103
+ spawnSync(process.execPath, [statePersistScript, '--agy'], {
104
+ input: JSON.stringify(mapped),
105
+ encoding: 'utf8',
106
+ env: process.env,
107
+ timeout: 10000
108
+ });
109
+ } catch (err) {
110
+ if (process.env.HARNESS_DEBUG) {
111
+ console.error('[AGY-PostToolUse] State persistence error:', err);
112
+ }
113
+ }
114
+
115
+ process.stdout.write('{}\n');
116
+ }
117
+
118
+ if (require.main === module) {
119
+ main().catch(() => {
120
+ process.stdout.write('{}\n');
121
+ });
122
+ }
123
+
124
+ module.exports = { main, mapAgyPayloadToStatePersist };