harness-everything 1.2.1 → 1.2.2
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/CHANGELOG.md +8 -0
- package/benchmarks/results/live-host/agy-2026-11-26-516-read-only/README.md +12 -0
- package/benchmarks/results/live-host/agy-2026-11-26-516-read-only/capture.sanitized.jsonl +5 -0
- package/benchmarks/results/live-host/codex-2026-11-26-488-post-tool-use/README.md +25 -0
- package/benchmarks/results/live-host/codex-2026-11-26-488-post-tool-use/capture.sanitized.jsonl +10 -0
- package/ci/mechanism-2am-observations-session-import.test.js +1 -0
- package/ci/mechanism-2w-platform-compatibility.test.js +1 -2
- package/ci/mechanism-34-observations.test.js +37 -1
- package/ci/mechanism-397-opencode-observations.test.js +4 -3
- package/ci/mechanism-516-windows-verify-and-shell.test.js +74 -19
- package/ci/mechanism-report-writer.test.js +2 -1
- package/ci/mechanism-system-one-cycle.test.js +47 -2
- package/ci/openai-plugin-submission.test.js +26 -8
- package/docs/openai-plugin.md +6 -10
- package/docs/platform-capabilities.md +15 -0
- package/docs/routing.md +2 -0
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/kernel-router.js +3 -2
- package/hooks/scripts/state-persist.js +6 -1
- 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/hooks/scripts/state-persist.js +6 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +3 -2
- package/sbom.cdx.json +7 -7
- package/scripts/build-openai-submission.js +8 -4
- package/submission/openai/README.md +9 -14
- package/submission/openai/listing.json +1 -1
- package/submission/openai/test-cases.json +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "harness-everything",
|
|
11
11
|
"source": "./",
|
|
12
12
|
"description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
|
|
13
|
-
"version": "1.2.
|
|
13
|
+
"version": "1.2.2",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Miya Daniel"
|
|
16
16
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harness-everything",
|
|
3
3
|
"description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Miya Daniel"
|
|
7
7
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.2.2](https://github.com/dyphn1/Harness-everything/compare/v1.2.1...v1.2.2) (2026-11-26)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **agy:** avoid false windows shell edit tracking ([8e611ce](https://github.com/dyphn1/Harness-everything/commit/8e611ce288719729d6de1dc08b1ffe46aee87478))
|
|
10
|
+
* **distribution:** include the portable manifest in the public skills bundle ([b52d1da](https://github.com/dyphn1/Harness-everything/commit/b52d1daa59eb91ff9218853be9858e5ccc977bc3))
|
|
11
|
+
* **router:** explain null workflow labels for deferred routing ([a6339a5](https://github.com/dyphn1/Harness-everything/commit/a6339a5d3e6219c588ccab50dbc9f146c3ef3462))
|
|
12
|
+
|
|
5
13
|
## [1.2.1](https://github.com/dyphn1/Harness-everything/compare/v1.2.0...v1.2.1) (2026-11-26)
|
|
6
14
|
|
|
7
15
|
### Bug Fixes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Windows AGY read-only handoff for #516 (2026-11-26)
|
|
2
|
+
|
|
3
|
+
AGY CLI 1.5.17 with Gemini 4 Hydrogen (High) ran the two reported commands separately in a clean disposable Git workspace on Windows PowerShell 5.1.26100.9818 with Node 24.18.0 and no pwsh. A project-scope capture hook forwarded the live payloads to the PR's packaged PostToolUse and Stop scripts with a dedicated Harness state directory. The pre-existing global plugin used its own state and also ran.
|
|
4
|
+
|
|
5
|
+
| Live command | Result reported by AGY |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `git grep -n "mechanism-516"` | Exit 0, matched the seeded README |
|
|
8
|
+
| `$PSVersionTable.PSVersion; Get-Command pwsh -ErrorAction SilentlyContinue` | Exit 1, printed the PowerShell version and found no pwsh |
|
|
9
|
+
|
|
10
|
+
[Sanitized capture](capture.sanitized.jsonl) records the event keys, allowlisted probe commands, and packaged hook decisions. Both PostToolUse events had an empty error string and omitted a response and numeric exit status. The isolated handoff finished idle with neither `lastEditAt` nor `lastVerifyAt`. The patched Stop hook returned `allow` on both deliveries. The older global plugin requested one continuation from its separate state.
|
|
11
|
+
|
|
12
|
+
This trace covers these two shell outcomes and normal Stop delivery. Async launch/completion, wait markers, subdirectory workspace behavior, and installation of the patched global plugin remain outside this trace. The missing structured status leaves automatic verification credit unavailable for these payloads.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{"phase":"post","deliveryKeys":["artifactDirectoryPath","conversationId","cwd","error","hookEventName","lastUserInput","modelName","stepIdx","toolCall","transcriptPath","workspacePaths"],"tool":"run_command","command":"git grep -n \"mechanism-516\"","resultType":"undefined","hookExit":0,"errorType":"string","hasError":false}
|
|
2
|
+
{"phase":"post","deliveryKeys":["artifactDirectoryPath","conversationId","cwd","error","hookEventName","lastUserInput","modelName","stepIdx","toolCall","transcriptPath","workspacePaths"],"tool":"run_command","command":"$PSVersionTable.PSVersion; Get-Command pwsh -ErrorAction SilentlyContinue","resultType":"undefined","hookExit":0,"errorType":"string","hasError":false}
|
|
3
|
+
{"phase":"stop","deliveryKeys":["artifactDirectoryPath","continuationActive","conversationId","cwd","error","executionNum","fullyIdle","hookEventName","lastUserInput","modelName","terminationReason","transcriptPath","workspacePaths"],"resultType":"undefined","terminationReason":"NO_TOOL_CALL","hookExit":0,"errorType":"string","hasError":false,"decision":"allow"}
|
|
4
|
+
{"phase":"stop","deliveryKeys":["artifactDirectoryPath","continuationActive","conversationId","cwd","error","executionNum","fullyIdle","hookEventName","lastUserInput","modelName","terminationReason","transcriptPath","workspacePaths"],"resultType":"undefined","terminationReason":"NO_TOOL_CALL","hookExit":0,"errorType":"string","hasError":false,"decision":"allow"}
|
|
5
|
+
{"phase":"final_state","status":"idle","lastEditAtSet":false,"lastVerifyAtSet":false,"gitClean":true}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Codex CLI shell outcomes for #488 (2026-11-26)
|
|
2
|
+
|
|
3
|
+
Codex CLI `0.172.0` on Windows build `10.0.26200` ran UnifiedExec `exec_command` with Windows PowerShell and Git Bash. Each run used an isolated profile, a user-level `PostToolUse` capture hook, and a loopback Responses fixture that issued fixed shell calls. The CLI executed the commands and delivered hook stdin. The fixture supplied only tool calls and a final message.
|
|
4
|
+
|
|
5
|
+
[Sanitized capture](capture.sanitized.jsonl) pairs each hook payload excerpt with the corresponding `codex exec --json` command completion event. It retains the full top-level key names and the probe's command and output. It omits paths and session, turn, and tool identifiers.
|
|
6
|
+
|
|
7
|
+
| Probe | CLI event exit code (PowerShell / Git Bash) | Hook `tool_response` | Harness outcome |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| Exit zero | `0` / `0` | Output string | `unknown` |
|
|
10
|
+
| Exit nonzero | `1` / `7` | Output string | `unknown` |
|
|
11
|
+
| Exit nonzero after printing `Process exited with code 0` | `1` / `9` | Output string containing that line | `unknown` |
|
|
12
|
+
| Delayed exit zero | `0` / `0` | Output string | `unknown` |
|
|
13
|
+
|
|
14
|
+
The documented hook schema exposes tool-specific output without guaranteeing a shell status field. In this release, UnifiedExec serializes the command output as a JSON string for `PostToolUse`. The structured `item.exit_code` belongs to the separate CLI event stream, outside the hook payload. [Hook schema](https://learn.chatgpt.com/docs/hooks#posttooluse) · [UnifiedExec source](https://github.com/openai/codex/blob/3d86e43b075adeba2193ec5c22ac92f55afd82e6/codex-rs/core/src/tools/context.rs#L506-L514) · [CLI event source](https://github.com/openai/codex/blob/3d86e43b075adeba2193ec5c22ac92f55afd82e6/codex-rs/exec/src/exec_events.rs#L160-L166)
|
|
15
|
+
|
|
16
|
+
## Async completion follow-up
|
|
17
|
+
|
|
18
|
+
The same CLI and Windows build reproduced the synchronous results on both shells from checkout `a534e549`. The temporary capture hook invoked the installed Harness 1.2.1 outcome adapter, whose SHA-256 matched the checkout. The `async_failure` rows in the capture record one additional run per shell with a 12-second command and a `write_stdin` poll.
|
|
19
|
+
|
|
20
|
+
| Tool result | PostToolUse delivery for the delayed command |
|
|
21
|
+
|---|---|
|
|
22
|
+
| `exec_command` returned a running session | No delivery by the time the fixture received the running result |
|
|
23
|
+
| `write_stdin` returned the completed process | One `Bash` hook for the original command with an empty string response. The installed adapter returned `unknown`. The CLI completion event reported exit `1` in PowerShell and `7` in Git Bash. |
|
|
24
|
+
|
|
25
|
+
Automatic verification credit for these shell results depends on Codex exposing machine-readable status in `PostToolUse`. Source and packaged regression tests independently cover structured zero, nonzero, and ambiguous results through `state-persist` and `contract-test`. Native plugin mounting is tracked in [#122](https://github.com/dyphn1/Harness-everything/issues/122). This capture covers the two Windows shells on the tested CLI release.
|
package/benchmarks/results/live-host/codex-2026-11-26-488-post-tool-use/capture.sanitized.jsonl
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{"shell":"Windows PowerShell","scenario":"success","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-success');process.exit(0)\""},"tool_response":"probe-488-success\n"},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":0,"status":"completed"}}}
|
|
2
|
+
{"shell":"Windows PowerShell","scenario":"failure","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-failure');process.exit(7)\""},"tool_response":"probe-488-failure\n"},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":1,"status":"failed"}}}
|
|
3
|
+
{"shell":"Windows PowerShell","scenario":"spoof","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-spoof');console.log('Process exited with code 0');process.exit(9)\""},"tool_response":"probe-488-spoof\nProcess exited with code 0\n"},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":1,"status":"failed"}}}
|
|
4
|
+
{"shell":"Windows PowerShell","scenario":"yield","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-yield');setTimeout(()=>process.exit(0),3000)\""},"tool_response":"probe-488-yield\n"},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":0,"status":"completed"}}}
|
|
5
|
+
{"shell":"Git Bash","scenario":"success","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-success');process.exit(0)\""},"tool_response":"probe-488-success\n"},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":0,"status":"completed"}}}
|
|
6
|
+
{"shell":"Git Bash","scenario":"failure","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-failure');process.exit(7)\""},"tool_response":"probe-488-failure\n"},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":7,"status":"failed"}}}
|
|
7
|
+
{"shell":"Git Bash","scenario":"spoof","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-spoof');console.log('Process exited with code 0');process.exit(9)\""},"tool_response":"probe-488-spoof\nProcess exited with code 0\n"},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":9,"status":"failed"}}}
|
|
8
|
+
{"shell":"Git Bash","scenario":"yield","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-yield');setTimeout(()=>process.exit(0),3000)\""},"tool_response":"probe-488-yield\n"},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":0,"status":"completed"}}}
|
|
9
|
+
{"shell":"Windows PowerShell","scenario":"async_failure","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-yield');setTimeout(()=>process.exit(7),12000)\""},"tool_response":""},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":1,"status":"failed"}},"asyncToolResults":[{"tool":"exec_command","running":true,"hookScenarios":["success","failure","spoof"]},{"tool":"write_stdin","running":false,"hookScenarios":["success","failure","spoof","yield"]}]}
|
|
10
|
+
{"shell":"Git Bash","scenario":"async_failure","payloadKeys":["cwd","hook_event_name","model","permission_mode","session_id","tool_input","tool_name","tool_response","tool_use_id","transcript_path","turn_id"],"hook":{"hook_event_name":"PostToolUse","tool_name":"Bash","tool_input":{"command":"node -e \"console.log('probe-488-yield');setTimeout(()=>process.exit(7),12000)\""},"tool_response":""},"harnessOutcome":"unknown","cliEvent":{"type":"item.completed","item":{"type":"command_execution","exit_code":7,"status":"failed"}},"asyncToolResults":[{"tool":"exec_command","running":true,"hookScenarios":["success","failure","spoof"]},{"tool":"write_stdin","running":false,"hookScenarios":["success","failure","spoof","yield"]}]}
|
|
@@ -117,6 +117,7 @@ try {
|
|
|
117
117
|
|
|
118
118
|
const fallbackRecord = index.records.find(entry => entry.captureMethod === 'session-backfill' && entry.turn === 3);
|
|
119
119
|
assert(fallbackRecord, 'the response_item assistant label is recovered when task_complete omits it');
|
|
120
|
+
assert.strictEqual(fallbackRecord.selfReport.workflow, null);
|
|
120
121
|
const fallbackText = JSON.parse(fs.readFileSync(path.join(store, 'text', fallbackRecord.contentSha256 + '.json'), 'utf8'));
|
|
121
122
|
assert.strictEqual(fallbackText.prompt, 'fallback prompt from the rollout message');
|
|
122
123
|
const backfilledTier1 = index.records.find(entry => entry.captureMethod === 'session-backfill' && entry.selfReport.tier === 'tier1');
|
|
@@ -180,8 +180,7 @@ try {
|
|
|
180
180
|
const result = build(tempOutput);
|
|
181
181
|
const publicManifest = JSON.parse(fs.readFileSync(result.manifestPath, 'utf8'));
|
|
182
182
|
const packagedFiles = filesUnder(path.join(ROOT, 'plugins', 'harness-everything', 'skills')).map(file => `skills/${file}`);
|
|
183
|
-
assert.deepStrictEqual(publicManifest.files.map(file => file.path), packagedFiles);
|
|
184
|
-
assert.ok(publicManifest.files.every(file => file.path.startsWith('skills/')));
|
|
183
|
+
assert.deepStrictEqual(publicManifest.files.map(file => file.path), ['plugin.json', ...packagedFiles]);
|
|
185
184
|
assert.ok(publicManifest.files.every(file => !/(^|\/)(hooks|\.codex-plugin)(\/|$)/.test(file.path)));
|
|
186
185
|
assert.strictEqual(publicManifest.bundle_sha256, sha256(tempOutput));
|
|
187
186
|
} finally {
|
|
@@ -639,7 +639,7 @@ test('the label contract is the router output\'s last section and covers every t
|
|
|
639
639
|
const sections = out.split(/\n(?==> )/);
|
|
640
640
|
const last = sections[sections.length - 1];
|
|
641
641
|
assert(/^=> TURN LABEL LINE/.test(last) && last.includes('harness-label'), 'the label contract is printed last');
|
|
642
|
-
assert(/EVERY TURN/.test(last) && /null only when validity is invalid/.test(last));
|
|
642
|
+
assert(/EVERY TURN/.test(last) && /null tier only when validity is invalid/.test(last));
|
|
643
643
|
assert(/cannot be understood from its own text and needs conversation context/.test(last));
|
|
644
644
|
assert(/agent-written dispatches and worker instructions are ordinary prompts/.test(last));
|
|
645
645
|
const status = sections.find(x => x.startsWith('=> USER-VISIBLE HARNESS STATUS CONTRACT'));
|
|
@@ -647,6 +647,41 @@ test('the label contract is the router output\'s last section and covers every t
|
|
|
647
647
|
assert(/^14\. \*\*The turn label line is mandatory on every turn/m.test(fs.readFileSync(path.join(ROOT, 'AGENTS.md'), 'utf8')));
|
|
648
648
|
});
|
|
649
649
|
|
|
650
|
+
test('deferred routing instructs an actionable turn to report a null workflow', () => {
|
|
651
|
+
const s = sandbox();
|
|
652
|
+
s.env.HARNESS_SYSTEM_ONE_MODE = 'off';
|
|
653
|
+
const base = { session_id: 'deferred-label', cwd: s.repo };
|
|
654
|
+
const promptEvent = { ...base, hook_event_name: 'UserPromptSubmit', prompt: 'git status' };
|
|
655
|
+
const result = spawnSync(process.execPath, [ROUTER], {
|
|
656
|
+
input: JSON.stringify(promptEvent), cwd: s.repo, encoding: 'utf8', env: s.env,
|
|
657
|
+
});
|
|
658
|
+
assert.strictEqual(result.status, 0, result.stderr);
|
|
659
|
+
assert.match(result.stdout, /=> WORKFLOW STRATEGY: deferred/);
|
|
660
|
+
const contract = result.stdout.slice(result.stdout.indexOf('=> TURN LABEL LINE'));
|
|
661
|
+
assert.match(contract, /Use JSON null for workflow when the strategy is deferred/);
|
|
662
|
+
|
|
663
|
+
const [, example] = contract.match(/<!-- harness-label (.*) -->/);
|
|
664
|
+
const nullWorkflow = LABEL.replace('"iterative-single"', JSON.stringify(JSON.parse(example).workflow));
|
|
665
|
+
assert.strictEqual(lib.parseLabelLine(nullWorkflow).label.workflow, null);
|
|
666
|
+
hook(s.env, promptEvent);
|
|
667
|
+
hook(s.env, { ...base, hook_event_name: 'Stop', last_assistant_message: `done\n${nullWorkflow}` });
|
|
668
|
+
const [report] = records(s.store);
|
|
669
|
+
assert.strictEqual(report.selfReport.workflow, null);
|
|
670
|
+
const out = path.join(s.dir, 'deferred-export');
|
|
671
|
+
const exported = spawnSync(process.execPath, [EXPORTER, '--store', s.store, '--out', out, '--self-report-only'], {
|
|
672
|
+
encoding: 'utf8', env: s.env,
|
|
673
|
+
});
|
|
674
|
+
assert.strictEqual(exported.status, 0, exported.stderr);
|
|
675
|
+
assert.strictEqual(JSON.parse(fs.readFileSync(path.join(out, 'labels-observed.jsonl'), 'utf8')).workflow, null);
|
|
676
|
+
|
|
677
|
+
const witness = { v: 1, validity: 'actionable', tier: 'tier1', intents: [], workflow: 'deferred', skills: [] };
|
|
678
|
+
assert.strictEqual(lib.parseLabelLine(`<!-- harness-label ${JSON.stringify(witness)} -->`).reason, 'label-invalid');
|
|
679
|
+
assert.strictEqual(lib.validLabel({ ...witness, workflow: 'unknown' }), false);
|
|
680
|
+
for (const workflow of ['direct-single', 'iterative-single', 'fable-staged', 'fable-parallel', 'fable-multi-agent-workspace']) {
|
|
681
|
+
assert.strictEqual(lib.validLabel({ ...witness, workflow }), true, workflow);
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
|
|
650
685
|
test('router/self agreement counts only turns where the router chose a tier', () => {
|
|
651
686
|
const s = sandbox();
|
|
652
687
|
fs.mkdirSync(path.join(s.store, 'text'), { recursive: true });
|
|
@@ -692,6 +727,7 @@ test('Codex router hook returns its contract as JSON additionalContext', () => {
|
|
|
692
727
|
const out = JSON.parse(r.stdout);
|
|
693
728
|
assert.strictEqual(out.hookSpecificOutput.hookEventName, 'UserPromptSubmit', script);
|
|
694
729
|
assert(out.hookSpecificOutput.additionalContext.includes('TURN LABEL LINE'), script);
|
|
730
|
+
assert.match(out.hookSpecificOutput.additionalContext, /Use JSON null for workflow when the strategy is deferred/, script);
|
|
695
731
|
}
|
|
696
732
|
});
|
|
697
733
|
|
|
@@ -253,13 +253,14 @@ test('inject: the documented OpenCode hooks deliver the kernel router output and
|
|
|
253
253
|
dispose = await install(f);
|
|
254
254
|
assert.ok(f.sessionHooks.has('prompt'), 'setup registers prompt admission');
|
|
255
255
|
assert.ok(f.sessionHooks.has('context'), 'setup registers the system context transform');
|
|
256
|
-
const prompt = { sessionID: 'inject-session', messageID: 'inject-turn', prompt: { text: '
|
|
256
|
+
const prompt = { sessionID: 'inject-session', messageID: 'inject-turn', prompt: { text: 'git status' } };
|
|
257
257
|
await f.sessionHooks.get('prompt')(prompt);
|
|
258
258
|
const context = { sessionID: 'inject-session', kind: 'primary', system: [], messages: [] };
|
|
259
259
|
await f.sessionHooks.get('context')(context);
|
|
260
|
-
assert.equal(prompt.prompt.text, '
|
|
260
|
+
assert.equal(prompt.prompt.text, 'git status', 'injection leaves the persisted user prompt unchanged');
|
|
261
261
|
const injected = context.system.map(part => part.text || '').join('\n');
|
|
262
|
-
assert.match(injected, /=>
|
|
262
|
+
assert.match(injected, /=> WORKFLOW STRATEGY: deferred/);
|
|
263
|
+
assert.match(injected, /Use JSON null for workflow when the strategy is deferred/);
|
|
263
264
|
|
|
264
265
|
const expectedRun = spawnSync(process.execPath, [path.join(ROOT, 'harness-everything/scripts/kernel-router.js')], {
|
|
265
266
|
cwd: f.workspace,
|
|
@@ -53,10 +53,20 @@ function runScript(scriptPath, payload) {
|
|
|
53
53
|
return JSON.parse(res.stdout.trim());
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
function
|
|
56
|
+
function hasPwsh(cwd) {
|
|
57
|
+
const result = spawnSync('pwsh', ['-NoProfile', '-NonInteractive', '-Command', 'exit 0'], {
|
|
58
|
+
cwd, timeout: 20000,
|
|
59
|
+
});
|
|
60
|
+
if (result.error?.code === 'ENOENT' && process.env.HARNESS_TEST_PWSH !== '1') return false;
|
|
61
|
+
assert.strictEqual(result.error?.code, undefined, 'PowerShell 7 runtime requires pwsh on PATH');
|
|
62
|
+
assert.strictEqual(result.status, 0, 'PowerShell 7 prerequisite probe failed');
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function runPowerShell(cwd, command, executable = 'pwsh') {
|
|
57
67
|
const env = { ...process.env };
|
|
58
68
|
delete env.NODE_TEST_CONTEXT;
|
|
59
|
-
const res = spawnSync(
|
|
69
|
+
const res = spawnSync(executable, ['-NoProfile', '-NonInteractive', '-Command', command], {
|
|
60
70
|
cwd,
|
|
61
71
|
encoding: 'utf8',
|
|
62
72
|
env,
|
|
@@ -192,10 +202,28 @@ try {
|
|
|
192
202
|
assert.strictEqual(isVerificationCommand(`${changeLocation('.\\pkg')} && ${testCommand}`, { cwd: repo, root: repo }), true);
|
|
193
203
|
}
|
|
194
204
|
|
|
205
|
+
const pkg = path.join(repo, 'pkg');
|
|
206
|
+
if (process.platform === 'win32') {
|
|
207
|
+
const fixture = path.join(pkg, 'verify.test.js');
|
|
208
|
+
fs.writeFileSync(fixture, 'require("node:test")("failing verifier", () => { throw Error("fixture failure"); });\n');
|
|
209
|
+
const failure = runPowerShell(pkg, testCommand, 'powershell.exe');
|
|
210
|
+
assert.strictEqual(failure.status, 1, failure.stderr);
|
|
211
|
+
assert.match(failure.stdout, /fixture failure/);
|
|
212
|
+
assert.ok(!postShell(repo, 'winps-plain', testCommand, failure.status, pkg).lastVerifyAt);
|
|
213
|
+
|
|
214
|
+
fs.writeFileSync(fixture, 'require("node:test")("passing verifier", () => {});\n');
|
|
215
|
+
const success = runPowerShell(pkg, testCommand, 'powershell.exe');
|
|
216
|
+
assert.strictEqual(success.status, 0, success.stderr);
|
|
217
|
+
assert.match(success.stdout, /passing verifier/);
|
|
218
|
+
assert.ok(postShell(repo, 'winps-plain', testCommand, success.status, pkg).lastVerifyAt);
|
|
219
|
+
console.log('Windows PowerShell plain verifier: real exit 0 and 1 propagated through packaged PostToolUse.');
|
|
220
|
+
}
|
|
221
|
+
|
|
195
222
|
let successfulExit = 0;
|
|
196
223
|
let failedExit = 1;
|
|
197
224
|
let wildcardExit = 0;
|
|
198
|
-
|
|
225
|
+
const wantsPwsh = process.platform === 'win32' || process.env.HARNESS_TEST_PWSH === '1';
|
|
226
|
+
if (wantsPwsh && hasPwsh(repo)) {
|
|
199
227
|
fs.writeFileSync(path.join(repo, 'verify.test.js'), 'require("node:test")("root verifier", () => {});\n');
|
|
200
228
|
fs.writeFileSync(path.join(repo, 'pkg', 'verify.test.js'), 'require("node:test")("package verifier", () => {});\n');
|
|
201
229
|
fs.writeFileSync(path.join(repo, 'pkg1', 'verify.test.js'), 'require("node:test")("wildcard verifier", () => {});\n');
|
|
@@ -223,6 +251,8 @@ try {
|
|
|
223
251
|
const literal = runPowerShell(repo, literalBracketsPrelude);
|
|
224
252
|
assert.strictEqual(literal.status, 0, literal.stderr);
|
|
225
253
|
assert.match(literal.stdout, /literal verifier/);
|
|
254
|
+
} else {
|
|
255
|
+
console.log('Skipped 5 PowerShell 7 runtime cases: ' + (wantsPwsh ? 'pwsh unavailable' : 'pwsh runtime lane not requested'));
|
|
226
256
|
}
|
|
227
257
|
|
|
228
258
|
for (const cmd of [
|
|
@@ -280,23 +310,41 @@ try {
|
|
|
280
310
|
|
|
281
311
|
// 5. End-to-end packaged AGY hooks: read-only PowerShell doesn't trigger false Stop;
|
|
282
312
|
// A successful, contained Set-Location verifier allows Stop.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
runScript(
|
|
290
|
-
conversationId:
|
|
291
|
-
workspacePaths: [repo],
|
|
292
|
-
toolCall: { name: 'run_command', args: { CommandLine: 'agy plugin list --json', Cwd: repo } },
|
|
313
|
+
git(repo, ['add', '.']);
|
|
314
|
+
git(repo, ['commit', '-m', 'seed verifier fixtures']);
|
|
315
|
+
const liveReadOnly = [
|
|
316
|
+
'git grep -n "mechanism-516"',
|
|
317
|
+
'$PSVersionTable.PSVersion; Get-Command pwsh -ErrorAction SilentlyContinue',
|
|
318
|
+
];
|
|
319
|
+
const stop = conversationId => runScript(PACKAGED_STOP, {
|
|
320
|
+
conversationId, workspacePaths: [repo], terminationReason: 'NO_TOOL_CALL',
|
|
293
321
|
});
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
322
|
+
for (const [index, command] of [
|
|
323
|
+
'Get-ChildItem | Select-Object Name', 'agy plugin list --json', ...liveReadOnly,
|
|
324
|
+
].entries()) {
|
|
325
|
+
const conversationId = 'win-readonly-' + index;
|
|
326
|
+
assert.ok(!git(repo, ['status', '--short']), 'read-only fixture requires a clean workspace');
|
|
327
|
+
const handoff = postShell(repo, conversationId, command);
|
|
328
|
+
assert.ok(!handoff.lastEditAt, command);
|
|
329
|
+
assert.ok(!handoff.lastVerifyAt, command);
|
|
330
|
+
assert.deepStrictEqual(stop(conversationId), { decision: 'allow' });
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
for (const [index, command] of [
|
|
334
|
+
'git grep -O "mechanism-516"',
|
|
335
|
+
'git grep --open-files-in-pager "mechanism-516"',
|
|
336
|
+
'git grep --textconv "mechanism-516"',
|
|
337
|
+
'git grep -n "mechanism-516" > output.txt',
|
|
338
|
+
'git grep -n "$(Get-Content file)"',
|
|
339
|
+
'git grep -n "mechanism-516"; git status',
|
|
340
|
+
'Get-ChildItem | ForEach-Object { Remove-Item $_.FullName }',
|
|
341
|
+
liveReadOnly[1] + '; git status',
|
|
342
|
+
].entries()) {
|
|
343
|
+
assert.notStrictEqual(classifyShell(command), 'read-only', command);
|
|
344
|
+
const handoff = postShell(repo, 'win-unknown-' + index, command);
|
|
345
|
+
assert.ok(handoff.lastEditAt, command);
|
|
346
|
+
assert.ok(!handoff.lastVerifyAt, command);
|
|
347
|
+
}
|
|
300
348
|
|
|
301
349
|
const convEditVerify = 'win-edit-verify-' + Date.now();
|
|
302
350
|
const target = path.join(repo, 'README.md');
|
|
@@ -307,6 +355,13 @@ try {
|
|
|
307
355
|
toolCall: { name: 'write_file', args: { Path: target, Content: 'edited\n' } },
|
|
308
356
|
});
|
|
309
357
|
const afterEdit = readHandoff(repo, convEditVerify);
|
|
358
|
+
for (const command of liveReadOnly) {
|
|
359
|
+
const pending = postShell(repo, convEditVerify, command);
|
|
360
|
+
assert.strictEqual(pending.lastEditAt, afterEdit.lastEditAt, command);
|
|
361
|
+
assert.strictEqual(pending.lastVerifyAt, afterEdit.lastVerifyAt, command);
|
|
362
|
+
}
|
|
363
|
+
assert.strictEqual(stop(convEditVerify).decision, 'continue');
|
|
364
|
+
assert.deepStrictEqual(stop(convEditVerify), { decision: 'allow' });
|
|
310
365
|
for (const exitCode of [undefined, '0']) {
|
|
311
366
|
const unverified = postShell(repo, convEditVerify, verifyInPkg, exitCode);
|
|
312
367
|
assert.strictEqual(unverified.lastEditAt, afterEdit.lastEditAt);
|
|
@@ -156,7 +156,7 @@ test('assembles BLOCKED from a raw body, blank line, and one EOF host label', t
|
|
|
156
156
|
const dir = tempDir(t);
|
|
157
157
|
const raw = path.join(dir, 'raw.txt');
|
|
158
158
|
const output = path.join(dir, 'report.md');
|
|
159
|
-
const rawBytes = Buffer.from(`Summary\n\nEvidence\n\n${labelLine({ ...CODEX_LABEL, intents: ['fix', 'lookup'], contextDependent: false })}`);
|
|
159
|
+
const rawBytes = Buffer.from(`Summary\n\nEvidence\n\n${labelLine({ ...CODEX_LABEL, workflow: null, intents: ['fix', 'lookup'], contextDependent: false })}`);
|
|
160
160
|
const body = rawBytes.subarray(0, rawBytes.lastIndexOf(Buffer.from('<!-- harness-label')));
|
|
161
161
|
fs.writeFileSync(raw, rawBytes);
|
|
162
162
|
|
|
@@ -240,6 +240,7 @@ test('464 rejects unrecognized terminal label schemas before touching report or
|
|
|
240
240
|
{ ...CODEX_LABEL, validity: 'unknown' },
|
|
241
241
|
{ ...CODEX_LABEL, tier: 'tier9' },
|
|
242
242
|
{ ...CODEX_LABEL, workflow: 'unknown' },
|
|
243
|
+
{ ...CODEX_LABEL, workflow: 'deferred' },
|
|
243
244
|
{ ...CODEX_LABEL, intents: 'fix' },
|
|
244
245
|
{ ...CODEX_LABEL, skills: [42] },
|
|
245
246
|
[],
|
|
@@ -155,13 +155,15 @@ function environment446(fixture, quality = 0.9) {
|
|
|
155
155
|
return env;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
function run446Cycle(fixture, version, { history, quality = 0.9, all = false } = {}) {
|
|
158
|
+
function run446Cycle(fixture, version, { history, quality = 0.9, all = false, preload } = {}) {
|
|
159
159
|
const args = [cycleCli, all ? 'all' : 'evaluate'];
|
|
160
160
|
if (all) args.push('--until', 'evaluate');
|
|
161
161
|
args.push('--data-dir', fixture.dataDir, '--holdout', fixture.holdout, '--version', version);
|
|
162
162
|
if (history === true) args.push('--history');
|
|
163
163
|
else if (history !== undefined) args.push('--history', history);
|
|
164
|
-
|
|
164
|
+
const env = environment446(fixture, quality);
|
|
165
|
+
if (preload) env.NODE_OPTIONS = `--require ${JSON.stringify(preload.replaceAll('\\', '/'))}`;
|
|
166
|
+
return spawnSync(process.execPath, args, { cwd: root, encoding: 'utf8', env });
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
function rows446(history) {
|
|
@@ -1026,6 +1028,49 @@ test('446 cross-cycle: default history remains local and explicit history valida
|
|
|
1026
1028
|
assert.equal(fs.existsSync(path.join(appendFailure.dataDir, 'cycle-state.json')), false);
|
|
1027
1029
|
});
|
|
1028
1030
|
|
|
1031
|
+
test('443 R6: resumes after an interrupted history append exactly once', t => {
|
|
1032
|
+
const tmp = private446Root(t);
|
|
1033
|
+
const history = path.join(tmp, 'history.jsonl');
|
|
1034
|
+
const version = 'v1';
|
|
1035
|
+
const fixture = setup446Cycle(t, path.join(tmp, 'cycle'), [
|
|
1036
|
+
{ version: 'v0', quality: 0.9 }, { version, quality: 0.9 },
|
|
1037
|
+
]);
|
|
1038
|
+
assert.equal(run446Cycle(fixture, 'v0', { history }).status, 0);
|
|
1039
|
+
const prefix = fs.readFileSync(history, 'utf8');
|
|
1040
|
+
const preload = path.join(tmp, 'fail-history-append.cjs');
|
|
1041
|
+
fs.writeFileSync(preload, `
|
|
1042
|
+
const fs = require('node:fs');
|
|
1043
|
+
const append = fs.appendFileSync;
|
|
1044
|
+
fs.appendFileSync = (file, ...args) => {
|
|
1045
|
+
if (file === ${JSON.stringify(fs.realpathSync.native(history))}) throw new Error('injected history append failure');
|
|
1046
|
+
return append(file, ...args);
|
|
1047
|
+
};
|
|
1048
|
+
`);
|
|
1049
|
+
|
|
1050
|
+
const interrupted = run446Cycle(fixture, version, { history, preload });
|
|
1051
|
+
assert.notEqual(interrupted.status, 0);
|
|
1052
|
+
const candidate = path.join(fixture.dataDir, 'training', 'candidates', version);
|
|
1053
|
+
const manifest = path.join(candidate, 'manifest.json');
|
|
1054
|
+
const evaluationFiles = snapshot446(['curves.json', 'trend.json'].map(file =>
|
|
1055
|
+
path.join(candidate, 'evaluation', file)));
|
|
1056
|
+
assert.equal(fs.readFileSync(history, 'utf8'), prefix);
|
|
1057
|
+
assert.equal(JSON.parse(fs.readFileSync(manifest, 'utf8')).evaluation, null);
|
|
1058
|
+
const callsAfterFailure = fs.readFileSync(fixture.callLog, 'utf8');
|
|
1059
|
+
|
|
1060
|
+
const resumed = run446Cycle(fixture, version, { history });
|
|
1061
|
+
assert.equal(resumed.status, 0, resumed.stderr || resumed.stdout);
|
|
1062
|
+
assert.equal(JSON.parse(resumed.stdout).steps[0].resumed, true);
|
|
1063
|
+
assert.equal(JSON.parse(fs.readFileSync(manifest, 'utf8')).evaluation, 'evaluation/curves.json');
|
|
1064
|
+
const restored = fs.readFileSync(history, 'utf8');
|
|
1065
|
+
assert.equal(restored, prefix + JSON.stringify(evaluation446(fixture.dataDir, version).curves) + '\n');
|
|
1066
|
+
|
|
1067
|
+
const repeated = run446Cycle(fixture, version, { history });
|
|
1068
|
+
assert.equal(repeated.status, 0, repeated.stderr || repeated.stdout);
|
|
1069
|
+
assert.equal(fs.readFileSync(history, 'utf8'), restored);
|
|
1070
|
+
assert.equal(fs.readFileSync(fixture.callLog, 'utf8'), callsAfterFailure);
|
|
1071
|
+
assertSnapshot446(evaluationFiles);
|
|
1072
|
+
});
|
|
1073
|
+
|
|
1029
1074
|
test('446 H2: rejects changed same-id baseline before append, including an existing identical candidate', t => {
|
|
1030
1075
|
const tmp = private446Root(t);
|
|
1031
1076
|
const originalHistory = path.join(tmp, 'original-history.jsonl');
|
|
@@ -48,8 +48,8 @@ assert.ok(listing.manual_requirements?.developer_identity, 'developer identity r
|
|
|
48
48
|
assert.ok(listing.manual_requirements?.logo, 'logo upload reminder missing');
|
|
49
49
|
assert.ok(listing.manual_requirements?.apps_management_write_access, 'Apps Management access reminder missing');
|
|
50
50
|
|
|
51
|
-
assert.strictEqual(tests.positive.length, 5, '
|
|
52
|
-
assert.strictEqual(tests.negative.length, 3, '
|
|
51
|
+
assert.strictEqual(tests.positive.length, 5, 'maintain five positive smoke cases');
|
|
52
|
+
assert.strictEqual(tests.negative.length, 3, 'maintain three negative smoke cases');
|
|
53
53
|
const ids = new Set();
|
|
54
54
|
for (const test of tests.positive) {
|
|
55
55
|
assert.ok(test.id && !ids.has(test.id), `duplicate/missing test id: ${test.id}`);
|
|
@@ -82,20 +82,38 @@ try {
|
|
|
82
82
|
assert.strictEqual(sha256(first), sha256(second), 'submission bundle must be deterministic');
|
|
83
83
|
|
|
84
84
|
const manifest = JSON.parse(fs.readFileSync(first.replace(/\.zip$/, '.manifest.json'), 'utf8'));
|
|
85
|
-
const expectedFiles = filesUnder(path.join(PLUGIN, 'skills')).map(file => `skills/${file}`);
|
|
85
|
+
const expectedFiles = ['plugin.json', ...filesUnder(path.join(PLUGIN, 'skills')).map(file => `skills/${file}`)];
|
|
86
86
|
assert.strictEqual(manifest.source, 'plugins/harness-everything/skills');
|
|
87
|
-
assert.ok(manifest.files.every(file => file.path.startsWith('skills/')), 'public bundle must contain only skills/ paths');
|
|
88
87
|
assert.ok(manifest.files.every(file => !/(^|\/)(hooks|\.codex-plugin)(\/|$)/.test(file.path)), 'public bundle must exclude local hook package paths');
|
|
89
|
-
assert.
|
|
90
|
-
assert.deepStrictEqual(manifest.files.map(file => file.path), expectedFiles, 'bundle manifest must contain exactly packaged skill files');
|
|
88
|
+
assert.deepStrictEqual(manifest.files.map(file => file.path), expectedFiles, 'bundle must contain the root manifest and packaged skill files');
|
|
91
89
|
assert.strictEqual(manifest.file_count, expectedFiles.length);
|
|
92
90
|
assert.strictEqual(manifest.bundle_sha256, sha256(first));
|
|
93
91
|
|
|
94
92
|
const zip = fs.readFileSync(first);
|
|
95
|
-
|
|
93
|
+
let offset = 0;
|
|
94
|
+
for (const file of manifest.files) {
|
|
95
|
+
assert.strictEqual(zip.readUInt32LE(offset), 0x04034b50, file.path);
|
|
96
|
+
const size = zip.readUInt32LE(offset + 18);
|
|
97
|
+
const nameStart = offset + 30;
|
|
98
|
+
const nameEnd = nameStart + zip.readUInt16LE(offset + 26);
|
|
99
|
+
const dataStart = nameEnd + zip.readUInt16LE(offset + 28);
|
|
100
|
+
const data = zip.subarray(dataStart, dataStart + size);
|
|
101
|
+
assert.strictEqual(zip.toString('utf8', nameStart, nameEnd), file.path);
|
|
102
|
+
assert.strictEqual(size, file.bytes);
|
|
103
|
+
assert.strictEqual(crypto.createHash('sha256').update(data).digest('hex'), file.sha256);
|
|
104
|
+
if (file.path === 'plugin.json') {
|
|
105
|
+
const { extensions, ...identity } = portablePlugin;
|
|
106
|
+
assert.deepStrictEqual(JSON.parse(data), {
|
|
107
|
+
...identity,
|
|
108
|
+
extensions: { 'com.openai': { interface: extensions['com.openai'].interface } },
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
offset = dataStart + size;
|
|
112
|
+
}
|
|
113
|
+
assert.strictEqual(zip.readUInt32LE(offset), 0x02014b50, 'no extra file entries before the central directory');
|
|
96
114
|
assert.strictEqual(zip.readUInt32LE(zip.length - 22), 0x06054b50, 'bundle must end with ZIP EOCD signature');
|
|
97
115
|
} finally {
|
|
98
116
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
99
117
|
}
|
|
100
118
|
|
|
101
|
-
console.log('OpenAI public submission verified: listing metadata,
|
|
119
|
+
console.log('OpenAI public submission verified: portable manifest, listing metadata, smoke cases, and deterministic skills bundle.');
|
package/docs/openai-plugin.md
CHANGED
|
@@ -61,7 +61,7 @@ npm run test:plugin:submission
|
|
|
61
61
|
|
|
62
62
|
OpenAI documents GitHub marketplace import for workspace administrators. The repository provides both `.agents/plugins/marketplace.json` and `.claude-plugin/marketplace.json`; the source entry resolves to `plugins/harness-everything/`.
|
|
63
63
|
|
|
64
|
-
Use the repository URL as the source, leave Path empty so the marketplace is read from the repository root, and select the intended branch (normally `main`). In
|
|
64
|
+
Use the repository URL as the source, leave Path empty so the marketplace is read from the repository root, and select the intended branch (normally `main`). In the OpenAI Admin Console, select the workspace and use **Plugins > Add > Import marketplace**. Save the import report with the source/ref and client version, set the installation policy, then install and invoke a representative skill from a fresh eligible member session. Use **Marketplaces > Sync now** after a branch update and retain the sync report and the updated skill result. OpenAI also documents automatic daily sync.
|
|
65
65
|
|
|
66
66
|
This repository contains the marketplace/package artifacts and deterministic import-shape checks. It does not contain a managed-workspace import report or a fresh host smoke-test artifact, so those operations remain `Unknown` in the compatibility matrix.
|
|
67
67
|
|
|
@@ -74,7 +74,7 @@ The local package path is distinct from the general `--codex` installer. The gen
|
|
|
74
74
|
The package tests prove the following repository-side contract:
|
|
75
75
|
|
|
76
76
|
- the portable root manifest and `.codex-plugin` compatibility manifest agree on identity, version, interface, and hook entry point;
|
|
77
|
-
- the root `skills/` tree contains
|
|
77
|
+
- the root `skills/` tree contains the canonical skills;
|
|
78
78
|
- Windows and POSIX hook commands resolve through `PLUGIN_ROOT`;
|
|
79
79
|
- session start emits the compact policy and prompt submission invokes invariant-first routing;
|
|
80
80
|
- supported local `Bash` and `apply_patch` calls receive the packaged guards and state tracking;
|
|
@@ -93,13 +93,9 @@ Build the final upload from the synchronized package:
|
|
|
93
93
|
npm run plugin:submission:build
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
The generated ZIP
|
|
96
|
+
The generated ZIP has a portable root `plugin.json` and the synchronized `skills/<name>/...` tree. It does **not** include the local `.codex-plugin` lifecycle hooks, MCP definitions, or app wrappers. The generated checksum manifest records each file and the ZIP SHA-256. OpenAI documents a supported plugin manifest as an upload requirement. [Submission error reference](https://developers.openai.com/plugins/deploy/submission-errors#plugin-manifest-errors)
|
|
97
97
|
|
|
98
|
-
The submission
|
|
99
|
-
|
|
100
|
-
The official portal flow is: **Create plugin → Skills only → upload the final skill bundle → provide review cases and listing metadata → complete identity, availability, policy, and access requirements → submit for review → publish after approval**. The repository cannot complete verified identity, logo upload, availability selection, Apps Management write access, review, approval, or public-directory publication.
|
|
101
|
-
|
|
102
|
-
Official documentation: [Submit a plugin](https://developers.openai.com/plugins/deploy/submission) and [Build plugins](https://developers.openai.com/plugins/build/plugins).
|
|
98
|
+
The [public submission runbook](../submission/openai/README.md) covers the developer identity, ZIP upload, automated scans, and publication. It also links to the project smoke cases for a fresh session. Use the [OpenAI submission guide](https://developers.openai.com/plugins/deploy/submission) to confirm the portal requirements.
|
|
103
99
|
|
|
104
100
|
## Evidence boundary
|
|
105
101
|
|
|
@@ -109,10 +105,10 @@ The local plugin and public Skills-only artifact must not be conflated:
|
|
|
109
105
|
| --- | --- | --- |
|
|
110
106
|
| Portable/root plugin package | Manifest, tree, hook, and routing mechanism tests | Package shape and local mechanism are verified |
|
|
111
107
|
| Managed workspace marketplace | Marketplace JSON and source-path checks | Import-ready repository artifact; live import remains unverified |
|
|
112
|
-
| Public Skills-only ZIP | Deterministic builder and
|
|
108
|
+
| Public Skills-only ZIP | Deterministic builder, portable manifest, and smoke-case inputs | Reproducible skills bundle; approval and live public behavior remain unverified |
|
|
113
109
|
|
|
114
110
|
See the [platform capability matrix](platform-capabilities.md) for the complete ten-dimension status table and official source URLs.
|
|
115
111
|
|
|
116
112
|
## Publication smoke checklist
|
|
117
113
|
|
|
118
|
-
Before public submission, run `plugin:sync`, both OpenAI package checks, and the platform compatibility check.
|
|
114
|
+
Before public submission, run `plugin:sync`, both OpenAI package checks, and the platform compatibility check. Check that the packaged skills match canonical sources after EOL normalization and that the ZIP is reproducible. Confirm the publisher identity and portal permissions, and run the project smoke cases against the exact bundle being submitted.
|
|
@@ -30,6 +30,13 @@ recovery state intact and is audited as `unknown` for observed gated actions.
|
|
|
30
30
|
Edits are still tracked when the outcome is unknown because side effects may
|
|
31
31
|
already have occurred.
|
|
32
32
|
|
|
33
|
+
[Windows CLI 0.172.0 evidence](../benchmarks/results/live-host/codex-2026-11-26-488-post-tool-use/README.md)
|
|
34
|
+
shows that UnifiedExec with PowerShell and Git Bash delivers only a string in
|
|
35
|
+
`PostToolUse.tool_response`. A command that yielded and then completed through
|
|
36
|
+
`write_stdin` delivered an empty string response on both shells. Structured exit
|
|
37
|
+
status appears in the separate CLI event stream. Automatic verification credit
|
|
38
|
+
through the hook depends on Codex exposing structured status in the hook payload.
|
|
39
|
+
|
|
33
40
|
Codex `SubagentStop` uses the documented JSON `systemMessage` field for a UI-only
|
|
34
41
|
warning when the scope audit detects a new violation. Each audit advances the
|
|
35
42
|
Git status baseline and replaces `subagent-scope-last.json`. A later silent stop
|
|
@@ -38,6 +45,14 @@ can therefore coexist with unresolved changes. The coordinator owns
|
|
|
38
45
|
even when the hook is silent. The source and package fixtures cover these
|
|
39
46
|
behaviors. Windows host delivery remains to be verified.
|
|
40
47
|
|
|
48
|
+
### Antigravity Windows shell handoff
|
|
49
|
+
|
|
50
|
+
[AGY CLI 1.5.17 evidence](../benchmarks/results/live-host/agy-2026-11-26-516-read-only/README.md)
|
|
51
|
+
records live delivery of two read-only Windows shell probes to the packaged
|
|
52
|
+
AGY hooks. Both probes left edit and verification timestamps unset, and the
|
|
53
|
+
patched Stop hook allowed termination. These payloads omitted structured exit
|
|
54
|
+
status, so they could not grant automatic verification credit.
|
|
55
|
+
|
|
41
56
|
### Routing contract vs. host evidence
|
|
42
57
|
|
|
43
58
|
The workflow plan controller rejects present non-array required/optional binding declarations before recording a requirement plan. This input-validation contract is covered by deterministic mechanism tests and does not change live-host evidence status.
|
package/docs/routing.md
CHANGED
|
@@ -75,6 +75,8 @@ End the final message of **every** turn with one line that rendered Markdown hid
|
|
|
75
75
|
|
|
76
76
|
It states the agent's own judgement after the work, not a copy of the router's suggestion. `invalid` means the prompt cannot be understood from its own text and needs conversation context; agent-written dispatches and worker instructions are ordinary prompts. The remaining keys record `tier` under tier rules v2, up to three `intents`, the `workflow` strategy and the `skills` actually used. The observation collector stores it as training data ([system-one-observations.md](system-one-observations.md)). A missing or malformed line is recorded with a reason code; it never blocks a turn or changes routing.
|
|
77
77
|
|
|
78
|
+
Use JSON `null` for `workflow` when the strategy is deferred or no strategy was selected. Otherwise use the strategy id actually used.
|
|
79
|
+
|
|
78
80
|
Tier values:
|
|
79
81
|
|
|
80
82
|
| Tier | Meaning |
|
|
@@ -155,9 +155,10 @@ function activeExecutionFor(persisted, plan) {
|
|
|
155
155
|
function printLabelContract() {
|
|
156
156
|
console.log('\n=> TURN LABEL LINE (MUST, EVERY TURN — short answers, lookups and trivial edits included):');
|
|
157
157
|
console.log(' - The last line of your final message MUST be one hidden label line with your own post-work judgement, not a copy of the router tier above:');
|
|
158
|
-
console.log('
|
|
158
|
+
console.log(' - Use JSON null for workflow when the strategy is deferred or none was selected. Otherwise use the strategy id actually used.');
|
|
159
|
+
console.log(' <!-- harness-label {"v":1,"validity":"actionable|invalid","tier":"tier1|tier2|tier3|null","intents":["up to 3 of explain,discuss,git,fix,edit,feature,refactor,review,test,docs,plan,investigate"],"workflow":null,"skills":["skills used"]} -->');
|
|
159
160
|
console.log(' - invalid means the prompt cannot be understood from its own text and needs conversation context; agent-written dispatches and worker instructions are ordinary prompts.');
|
|
160
|
-
console.log(' - tier1: answer, lookup, status or git operation with no code change; tier2: bounded change; tier3: new feature, refactor, redefinition or cross-component work. Use null only when validity is invalid.');
|
|
161
|
+
console.log(' - tier1: answer, lookup, status or git operation with no code change; tier2: bounded change; tier3: new feature, refactor, redefinition or cross-component work. Use a null tier only when validity is invalid.');
|
|
161
162
|
console.log(' - It is invisible in rendered Markdown and records local training data; it never gates routing.');
|
|
162
163
|
}
|
|
163
164
|
|
|
@@ -150,6 +150,11 @@ function processState(payload) {
|
|
|
150
150
|
const command = (payload.tool_input && payload.tool_input.command) || '';
|
|
151
151
|
if (isShell) {
|
|
152
152
|
const commandClass = classifyShell(command);
|
|
153
|
+
// These narrow AGY probes affect handoff tracking only.
|
|
154
|
+
const agyReadOnlyProbe = agy && (
|
|
155
|
+
command === '$PSVersionTable.PSVersion; Get-Command pwsh -ErrorAction SilentlyContinue'
|
|
156
|
+
|| /^git grep (?:-n )?(?:"[\w][\w.-]*"|'[\w][\w.-]*'|[\w][\w.-]*)(?: --(?: [\w.][\w./-]*)+)?$/.test(command)
|
|
157
|
+
);
|
|
153
158
|
const pilotEnabled = process.env.HARNESS_DOC_RECONCILIATION_PILOT === '1';
|
|
154
159
|
const docCheck = pilotEnabled ? require('./lib/doc-reconciliation-provider') : null;
|
|
155
160
|
stateOnlyCandidate = Boolean(docCheck && typeof payload.cwd === 'string' && payload.cwd
|
|
@@ -171,7 +176,7 @@ function processState(payload) {
|
|
|
171
176
|
// On AGY hosts that omit shell error/exitCode, an unconfirmed verification-only command must not advance lastEditAt
|
|
172
177
|
// and defeat agy-stop.js's bounded continuation fingerprint.
|
|
173
178
|
const agyUnknownOutcomeVerify = agy && !verifiedSuccess && !isFailed && verifies;
|
|
174
|
-
if (!metadataStep && !agyUnknownOutcomeVerify && commandClass !== 'read-only' && commandClass !== 'worktree-setup') {
|
|
179
|
+
if (!metadataStep && !agyUnknownOutcomeVerify && !agyReadOnlyProbe && commandClass !== 'read-only' && commandClass !== 'worktree-setup') {
|
|
175
180
|
if (stateOnlyCandidate) editAfterCapture = true;
|
|
176
181
|
else state.lastEditAt = Date.now();
|
|
177
182
|
}
|
package/package.json
CHANGED
|
@@ -150,6 +150,11 @@ function processState(payload) {
|
|
|
150
150
|
const command = (payload.tool_input && payload.tool_input.command) || '';
|
|
151
151
|
if (isShell) {
|
|
152
152
|
const commandClass = classifyShell(command);
|
|
153
|
+
// These narrow AGY probes affect handoff tracking only.
|
|
154
|
+
const agyReadOnlyProbe = agy && (
|
|
155
|
+
command === '$PSVersionTable.PSVersion; Get-Command pwsh -ErrorAction SilentlyContinue'
|
|
156
|
+
|| /^git grep (?:-n )?(?:"[\w][\w.-]*"|'[\w][\w.-]*'|[\w][\w.-]*)(?: --(?: [\w.][\w./-]*)+)?$/.test(command)
|
|
157
|
+
);
|
|
153
158
|
const pilotEnabled = process.env.HARNESS_DOC_RECONCILIATION_PILOT === '1';
|
|
154
159
|
const docCheck = pilotEnabled ? require('./lib/doc-reconciliation-provider') : null;
|
|
155
160
|
stateOnlyCandidate = Boolean(docCheck && typeof payload.cwd === 'string' && payload.cwd
|
|
@@ -171,7 +176,7 @@ function processState(payload) {
|
|
|
171
176
|
// On AGY hosts that omit shell error/exitCode, an unconfirmed verification-only command must not advance lastEditAt
|
|
172
177
|
// and defeat agy-stop.js's bounded continuation fingerprint.
|
|
173
178
|
const agyUnknownOutcomeVerify = agy && !verifiedSuccess && !isFailed && verifies;
|
|
174
|
-
if (!metadataStep && !agyUnknownOutcomeVerify && commandClass !== 'read-only' && commandClass !== 'worktree-setup') {
|
|
179
|
+
if (!metadataStep && !agyUnknownOutcomeVerify && !agyReadOnlyProbe && commandClass !== 'read-only' && commandClass !== 'worktree-setup') {
|
|
175
180
|
if (stateOnlyCandidate) editAfterCapture = true;
|
|
176
181
|
else state.lastEditAt = Date.now();
|
|
177
182
|
}
|
|
@@ -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": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
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",
|
|
@@ -155,9 +155,10 @@ function activeExecutionFor(persisted, plan) {
|
|
|
155
155
|
function printLabelContract() {
|
|
156
156
|
console.log('\n=> TURN LABEL LINE (MUST, EVERY TURN — short answers, lookups and trivial edits included):');
|
|
157
157
|
console.log(' - The last line of your final message MUST be one hidden label line with your own post-work judgement, not a copy of the router tier above:');
|
|
158
|
-
console.log('
|
|
158
|
+
console.log(' - Use JSON null for workflow when the strategy is deferred or none was selected. Otherwise use the strategy id actually used.');
|
|
159
|
+
console.log(' <!-- harness-label {"v":1,"validity":"actionable|invalid","tier":"tier1|tier2|tier3|null","intents":["up to 3 of explain,discuss,git,fix,edit,feature,refactor,review,test,docs,plan,investigate"],"workflow":null,"skills":["skills used"]} -->');
|
|
159
160
|
console.log(' - invalid means the prompt cannot be understood from its own text and needs conversation context; agent-written dispatches and worker instructions are ordinary prompts.');
|
|
160
|
-
console.log(' - tier1: answer, lookup, status or git operation with no code change; tier2: bounded change; tier3: new feature, refactor, redefinition or cross-component work. Use null only when validity is invalid.');
|
|
161
|
+
console.log(' - tier1: answer, lookup, status or git operation with no code change; tier2: bounded change; tier3: new feature, refactor, redefinition or cross-component work. Use a null tier only when validity is invalid.');
|
|
161
162
|
console.log(' - It is invisible in rendered Markdown and records local training data; it never gates routing.');
|
|
162
163
|
}
|
|
163
164
|
|
package/sbom.cdx.json
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
"$schema": "https://cyclonedx.org/schema/bom-1.7.schema.json",
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.7",
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:bc58b946-e71f-5258-a016-063d58fa204d",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-26T05:36:03.836Z",
|
|
9
9
|
"tools": [
|
|
10
10
|
{
|
|
11
11
|
"vendor": "Harness Everything",
|
|
12
12
|
"name": "generate-sbom.js",
|
|
13
|
-
"version": "1.2.
|
|
13
|
+
"version": "1.2.2"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "application",
|
|
18
|
-
"bom-ref": "pkg:npm/harness-everything@1.2.
|
|
18
|
+
"bom-ref": "pkg:npm/harness-everything@1.2.2",
|
|
19
19
|
"name": "harness-everything",
|
|
20
|
-
"version": "1.2.
|
|
21
|
-
"purl": "pkg:npm/harness-everything@1.2.
|
|
20
|
+
"version": "1.2.2",
|
|
21
|
+
"purl": "pkg:npm/harness-everything@1.2.2"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [
|
|
@@ -2033,7 +2033,7 @@
|
|
|
2033
2033
|
]
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
2036
|
-
"ref": "pkg:npm/harness-everything@1.2.
|
|
2036
|
+
"ref": "pkg:npm/harness-everything@1.2.2",
|
|
2037
2037
|
"dependsOn": [
|
|
2038
2038
|
"pkg:npm/%40commitlint/cli@19.8.1",
|
|
2039
2039
|
"pkg:npm/%40commitlint/config-conventional@19.8.1",
|
|
@@ -7,7 +7,8 @@ const path = require('path');
|
|
|
7
7
|
const { isPackagingNoise } = require('./lib/packaging-noise');
|
|
8
8
|
|
|
9
9
|
const ROOT = path.resolve(__dirname, '..');
|
|
10
|
-
const
|
|
10
|
+
const PLUGIN_ROOT = path.join(ROOT, 'plugins', 'harness-everything');
|
|
11
|
+
const SKILLS_ROOT = path.join(PLUGIN_ROOT, 'skills');
|
|
11
12
|
const DEFAULT_OUTPUT = path.join(ROOT, 'dist', 'openai-submission', 'harness-everything-skills.zip');
|
|
12
13
|
|
|
13
14
|
function parseArgs(argv) {
|
|
@@ -119,10 +120,13 @@ function build(output) {
|
|
|
119
120
|
const relativeFiles = filesUnder(SKILLS_ROOT);
|
|
120
121
|
if (relativeFiles.length === 0) throw new Error('no packaged skill files found');
|
|
121
122
|
|
|
122
|
-
const
|
|
123
|
+
const { extensions, ...identity } = JSON.parse(fs.readFileSync(path.join(PLUGIN_ROOT, 'plugin.json'), 'utf8'));
|
|
124
|
+
const publicManifest = { ...identity, extensions: { 'com.openai': { interface: extensions['com.openai'].interface } } };
|
|
125
|
+
const entries = [{ name: 'plugin.json', data: Buffer.from(`${JSON.stringify(publicManifest, null, 2)}\n`) }];
|
|
126
|
+
for (const relative of relativeFiles) {
|
|
123
127
|
const data = fs.readFileSync(path.join(SKILLS_ROOT, relative));
|
|
124
|
-
|
|
125
|
-
}
|
|
128
|
+
entries.push({ name: `skills/${relative}`, data });
|
|
129
|
+
}
|
|
126
130
|
const zip = zipStored(entries);
|
|
127
131
|
fs.mkdirSync(path.dirname(output), { recursive: true });
|
|
128
132
|
fs.writeFileSync(output, zip);
|
|
@@ -19,22 +19,17 @@ dist/openai-submission/
|
|
|
19
19
|
└── harness-everything-skills.manifest.json
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
The ZIP contains
|
|
22
|
+
The ZIP contains a portable root `plugin.json` and the synchronized skill tree under `skills/`. The builder takes the identity and listing interface from the local portable manifest. The archive excludes the local hook configuration, MCP definitions, and app wrappers. The manifest records every file path, byte count, content hash, and final bundle SHA-256. Rebuilding the same revision must produce the same bundle hash.
|
|
23
23
|
|
|
24
24
|
## Official portal workflow
|
|
25
25
|
|
|
26
|
-
1. Select **
|
|
27
|
-
2.
|
|
28
|
-
3.
|
|
29
|
-
4.
|
|
30
|
-
5.
|
|
31
|
-
6. Select the verified developer/business identity, production logo, availability, and policy attestations.
|
|
32
|
-
7. Confirm the submitter has **Apps Management: Write** access.
|
|
33
|
-
8. Submit for review and publish only after approval.
|
|
26
|
+
1. Select the publishing organization and project. Organization owners can submit. Other members need **Apps Management: Write**. Complete individual or business identity verification.
|
|
27
|
+
2. In the OpenAI Platform Plugins page, select **Upload new or existing plugin**, choose the verified developer identity, and upload `harness-everything-skills.zip`.
|
|
28
|
+
3. Review the imported listing in **Metadata & Skills**. Resolve scan findings and complete the requested listing, logo, and availability fields using `listing.json`.
|
|
29
|
+
4. Run the smoke cases in `test-cases.json` against the prepared plugin in a fresh host session. The documented five-positive and three-negative app review requirement applies to initial MCP app review. Harness uses these cases for its own Skills-only smoke test.
|
|
30
|
+
5. Submit for review when the portal is ready. After approval, publish and confirm that a fresh eligible account can find and install the public listing.
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
The review cases follow the documented shape. Each positive case includes a prompt, expected skill/workflow behavior, expected result shape, and fixture/account data. Each negative case includes a prompt/scenario, expected refusal/clarification/safe fallback, and a reason not to complete.
|
|
32
|
+
See [Submit a plugin](https://developers.openai.com/plugins/deploy/submission) and the [submission error reference](https://developers.openai.com/plugins/deploy/submission-errors).
|
|
38
33
|
|
|
39
34
|
## Public submission boundary
|
|
40
35
|
|
|
@@ -53,7 +48,7 @@ CI cannot complete these portal operations:
|
|
|
53
48
|
- run reviewer cases in the final host environment;
|
|
54
49
|
- submit, receive approval, or publish to the public directory.
|
|
55
50
|
|
|
56
|
-
The repository
|
|
51
|
+
The repository checks establish package evidence. Keep the ZIP digest and source revision with the portal scan or submission result, then retain the approval and the fresh-account install result when available.
|
|
57
52
|
|
|
58
53
|
## Repository checks
|
|
59
54
|
|
|
@@ -64,4 +59,4 @@ npm run test:plugin:openai
|
|
|
64
59
|
npm run test:plugin:submission
|
|
65
60
|
```
|
|
66
61
|
|
|
67
|
-
The checks verify listing
|
|
62
|
+
The checks verify listing metadata, public URLs, and the project smoke cases. They also verify deterministic bundle generation, ZIP entry names and hashes, and that the public manifest omits local hook settings.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"Route this software task with Harness and use only the skills that help.",
|
|
19
19
|
"Review this change and verify it with objective evidence before claiming completion."
|
|
20
20
|
],
|
|
21
|
-
"release_notes": "Initial public skills-only submission of Harness Everything. Includes
|
|
21
|
+
"release_notes": "Initial public skills-only submission of Harness Everything. Includes reusable engineering skills plus invariant-first routing and verification guidance. No remote MCP server, hosted backend, authentication, or external account is required by the plugin package.",
|
|
22
22
|
"availability": {
|
|
23
23
|
"selection": "manual_in_portal",
|
|
24
24
|
"guidance": "Select only countries or regions where the publisher, support process, privacy notice, and terms are ready for users."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "harness-openai-plugin-review-tests-v1",
|
|
3
|
-
"note": "
|
|
3
|
+
"note": "Harness smoke cases for testing the Skills-only plugin in a fresh host session.",
|
|
4
4
|
"positive": [
|
|
5
5
|
{
|
|
6
6
|
"id": "bugfix-with-tests",
|