harness-everything 1.1.0 → 1.1.1

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.
@@ -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.1.0",
13
+ "version": "1.1.1",
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.1.0",
4
+ "version": "1.1.1",
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.1.1](https://github.com/dyphn1/Harness-everything/compare/v1.1.0...v1.1.1) (2026-11-25)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **agy:** exclude sphinx make-mode help from verification ([9cb27dc](https://github.com/dyphn1/Harness-everything/commit/9cb27dcb83225c1dfdac0f4f0deb53a27ae6df44))
10
+ * **agy:** require grounded windows verification evidence ([#525](https://github.com/dyphn1/Harness-everything/issues/525)) ([1427391](https://github.com/dyphn1/Harness-everything/commit/1427391ead664e716caa6a3f16f9705033fda024))
11
+ * **agy:** support windows verifiers and readonly powershell ([#516](https://github.com/dyphn1/Harness-everything/issues/516)) ([7b3b4d9](https://github.com/dyphn1/Harness-everything/commit/7b3b4d9d8c206ef347dddd7505a9120d0f665472))
12
+
5
13
  ## [1.1.0](https://github.com/dyphn1/Harness-everything/compare/v1.0.1...v1.1.0) (2026-11-25)
6
14
 
7
15
  ### Features
@@ -0,0 +1,32 @@
1
+ # Live-Host Evidence: Google Antigravity (AGY) Windows Desktop & CLI 1.5.16 (Partial)
2
+
3
+ Sanitized live-host verification of the native Google Antigravity (AGY) plugin (`harness-everything` `1.0.1`, matching commit `d5789004` / PR #521) on **Windows**. This records partial live-host coverage on Windows Desktop App and `agy` CLI `1.5.16`, confirms that PR #521's bounded `Stop` continuation fix operates on live Windows sessions, and documents the remaining #516 / #514 gaps observed during the run.
4
+
5
+ ## Environment & Scope
6
+
7
+ | Field | Value |
8
+ |---|---|
9
+ | Date | 2026-11-25 |
10
+ | Host | Antigravity Desktop App (Windows) + `agy` CLI `1.5.16` |
11
+ | OS / Runtime | Windows, Node `v24.18.0` |
12
+ | Install Scope | Global: `<USERPROFILE>/.gemini/config/plugins/harness-everything` (`version: 1.0.1`, updated `2026-11-25 08:52`, SHA-256 parity verified against `plugins/harness-everything` at `d5789004`) |
13
+ | Related Issues | #516 (Windows Stop loop / verification detection), #514 (AGY live-host evidence), #510 |
14
+
15
+ ## Live Observations (Windows Desktop App & `agy` CLI `1.5.16`)
16
+
17
+ | Surface | Result | Sanitized Evidence |
18
+ |---|---|---|
19
+ | `agy --version` / `agy plugin list --json` | **Observed live** | `agy` CLI `1.5.16` listed `<USERPROFILE>/.gemini/config/plugins/harness-everything` (`enabled: true`, `version: "1.0.1"`, 28 skills, `rules: ["AGENTS.md"]`, `hooks: ["harness-everything"]`). |
20
+ | `agy plugin validate --json ./plugins/harness-everything` | **Observed live** | Exited `0` (`manifest: ".antigravity-plugin/plugin.json"`, `components: { agents: 0, hooks: 1, mcpServers: 0, rules: 1, sidecars: 0, skills: 28 }`, 2 expected multi-host warnings + 1 note). |
21
+ | `SessionStart` | **Observed live** | Injected `Harness Skills OS active. Operating under AGENTS.md invariant-first routing.` at step 1 of live Windows Desktop session `<conv-2>`. |
22
+ | `PreInvocation` | **Observed live** | Injected `[Tier Routing Pre-check]` and persisted `workflow-run.json` and `agy-pre-invocation-state.json` under `<USERPROFILE>/.agents/harness-everything/workspaces/<ws-key>/state/sessions/<conv-id>/`. |
23
+ | `Stop` bounded continuation (with direct edits) | **Observed live** | In live Windows Desktop session `<conv-1>` (`developerdocs`, `2026-11-25 10:13–10:16`), `handoff-state.json` tracked `agyDirectMutationRevision: 5`, and `agy-stop-state.json` recorded `lastContinuedRevision: "direct:5"` with `lastContinuedContentFingerprint`, bounding continuation to 1 and allowing subsequent build + commit completion without the prior 7+ turn loop. |
24
+ | `Stop` bounded continuation (read-only PowerShell session) | **Observed live** | In live Windows Desktop session `<conv-2>` (`Harness-everything`, `2026-11-25 17:28–17:32`) with zero workspace file edits, running PowerShell pipelines (`Get-ChildItem ... \| ForEach-Object { ... }`) and `npm.cmd run test:consistency` updated `handoff-state.json` `lastEditAt`. At turn end (`2026-11-25T09:32:21.322Z`), host `Stop` returned `continue` once and wrote `agy-stop-state.json` (`lastContinuedRevision: "session:<conv-2>"` + `lastContinuedContentFingerprint`), then allowed termination on the following turn end with unchanged workspace content. |
25
+ | `PostToolUse` shell verification credit | **Host-limited / Gap confirmed** | On both `<conv-1>` (`.venv\Scripts\mkdocs build --strict`) and `<conv-2>` (`npm.cmd run test:consistency`, `node --test ...`), `lastVerifyAt` remained unset: (1) live Desktop `PostToolUse` omitted numeric `exitCode`, and (2) `verification-contract.js` did not recognize `mkdocs`, `.venv\Scripts\mkdocs`, `npm.cmd`, or `node --test`. |
26
+ | Installed hook scripts (isolated `HARNESS_STATE_HOME`) | **Mechanism verified** | Direct invocation of all 5 installed scripts under `<USERPROFILE>/.gemini/config/plugins/harness-everything/hooks/scripts/agy-*.js` passed (`SessionStart`, `PreInvocation` dedup, `PreToolUse` in/out-of-bounds + `git push --force` deny, `PostToolUse`, and `Stop` 1-continuation cap under PowerShell command churn). |
27
+
28
+ ## Observed Remaining Gaps (Analysis Input for #516 Follow-up)
29
+
30
+ 1. **PowerShell read-only pipelines / `npm.cmd` bump `lastEditAt`:** `workflow-isolation.js` (`splitShellSegments` / `READ_ONLY_PREFIX_RE`) marks PowerShell script blocks (`{...}`) and `$` expressions (`$_.Name`) as `untrusted`, and `npm.cmd` as `mutation-or-unknown`, causing `state-persist.js` to advance `lastEditAt` on read-only turns.
31
+ 2. **Windows verification command recognition:** `scripts/lib/verification-contract.js` did not match Windows `.cmd` runner wrappers (`npm.cmd`, `pnpm.cmd`, `yarn.cmd`, `bun.cmd`), `node --test`, `mkdocs build`, `poetry run mkdocs build`, or `Set-Location ...; <cmd>` PowerShell preludes.
32
+ 3. **Unresolved host / #514 items:** Live `PostToolUse` `exitCode: 0` emission on AGY Desktop, IDE-specific write tools (`write_to_file`, `replace_file_content`, `multi_replace_file_content`), live `model_stop`, project-scope `.agents/plugins/harness-everything/` isolation without global install, and `/hooks` TUI view remain `UNCHECKED`.
@@ -0,0 +1,328 @@
1
+ 'use strict';
2
+
3
+ const assert = require('assert');
4
+ const fs = require('fs');
5
+ const os = require('os');
6
+ const path = require('path');
7
+ const { spawnSync } = require('child_process');
8
+
9
+ const ROOT = path.resolve(__dirname, '..');
10
+ const VERIFY = path.join(ROOT, 'harness-everything', 'scripts', 'verify-gate.js');
11
+ const PACKAGED_POST_TOOL = path.join(ROOT, 'plugins', 'harness-everything', 'hooks', 'scripts', 'agy-post-tool.js');
12
+ const PACKAGED_STOP = path.join(ROOT, 'plugins', 'harness-everything', 'hooks', 'scripts', 'agy-stop.js');
13
+
14
+ const temp = fs.mkdtempSync(path.join(os.tmpdir(), 'harness-516-win-'));
15
+ const stateHome = path.join(temp, 'state-home');
16
+ const originalStateHome = process.env.HARNESS_STATE_HOME;
17
+ fs.mkdirSync(stateHome, { recursive: true });
18
+ process.env.HARNESS_STATE_HOME = stateHome;
19
+
20
+ const { isVerificationCommand, detectRoot, parseCwdPrelude } = require('../scripts/lib/verification-contract');
21
+ const { classifyShell } = require('../hooks/scripts/lib/workflow-isolation');
22
+ const { getSessionDir } = require('../plugins/harness-everything/hooks/scripts/lib/harness-state');
23
+
24
+ function git(cwd, args) {
25
+ const res = spawnSync('git', args, { cwd, encoding: 'utf8', timeout: 20000 });
26
+ assert.ifError(res.error);
27
+ assert.strictEqual(res.status, 0, `git ${args.join(' ')} failed: ${res.stderr}`);
28
+ return res.stdout.trim();
29
+ }
30
+
31
+ function initRepo(dir) {
32
+ fs.mkdirSync(dir, { recursive: true });
33
+ git(dir, ['init', '-b', 'main']);
34
+ git(dir, ['config', 'user.name', 'Harness Test']);
35
+ git(dir, ['config', 'user.email', 'harness@example.test']);
36
+ fs.writeFileSync(path.join(dir, 'README.md'), 'seed\n');
37
+ git(dir, ['add', 'README.md']);
38
+ git(dir, ['commit', '-m', 'seed']);
39
+ return fs.realpathSync.native(dir);
40
+ }
41
+
42
+ function runScript(scriptPath, payload) {
43
+ const env = { ...process.env, HARNESS_STATE_HOME: stateHome };
44
+ delete env.HARNESS_REQUIRE_VERIFICATION;
45
+ const res = spawnSync(process.execPath, [scriptPath], {
46
+ input: JSON.stringify(payload),
47
+ encoding: 'utf8',
48
+ env,
49
+ timeout: 20000,
50
+ });
51
+ assert.ifError(res.error);
52
+ assert.strictEqual(res.status, 0, `${path.basename(scriptPath)} failed: ${res.stderr}`);
53
+ return JSON.parse(res.stdout.trim());
54
+ }
55
+
56
+ function runPowerShell(cwd, command) {
57
+ const env = { ...process.env };
58
+ delete env.NODE_TEST_CONTEXT;
59
+ const res = spawnSync('pwsh', ['-NoProfile', '-NonInteractive', '-Command', command], {
60
+ cwd,
61
+ encoding: 'utf8',
62
+ env,
63
+ timeout: 20000,
64
+ });
65
+ assert.ifError(res.error);
66
+ return res;
67
+ }
68
+
69
+ function readHandoff(repo, conversationId) {
70
+ return JSON.parse(fs.readFileSync(path.join(getSessionDir(repo, conversationId), 'handoff-state.json'), 'utf8'));
71
+ }
72
+
73
+ function postShell(repo, conversationId, command, exitCode, cwd = repo) {
74
+ runScript(PACKAGED_POST_TOOL, {
75
+ conversationId,
76
+ workspacePaths: [repo],
77
+ toolCall: { name: 'run_command', args: { CommandLine: command, Cwd: cwd } },
78
+ exitCode,
79
+ });
80
+ return readHandoff(repo, conversationId);
81
+ }
82
+
83
+ try {
84
+ const repo = initRepo(path.join(temp, 'repo'));
85
+ const outside = fs.realpathSync.native(fs.mkdtempSync(path.join(temp, 'outside-')));
86
+ fs.mkdirSync(path.join(repo, 'pkg'), { recursive: true });
87
+ fs.mkdirSync(path.join(repo, 'pkg[1]'));
88
+ fs.mkdirSync(path.join(repo, 'pkg1'));
89
+ const infoQueries = [
90
+ 'node --test --help',
91
+ 'node --test "--version"',
92
+ 'node --test -v',
93
+ 'mkdocs build --help',
94
+ 'poetry run mkdocs build --strict -h',
95
+ 'uv run mkdocs build --"help"',
96
+ '.venv\\Scripts\\mkdocs.exe build --help',
97
+ '.venv/bin/mkdocs build --help',
98
+ 'sphinx-build --version',
99
+ 'sphinx-build -M help docs build',
100
+ '.venv\\Scripts\\sphinx-build.exe -V',
101
+ ];
102
+
103
+ // 1. Windows .cmd wrappers and Node/Docs verifiers
104
+ for (const cmd of [
105
+ 'npm.cmd test',
106
+ 'npm.cmd run test',
107
+ 'npm.cmd run test:consistency',
108
+ 'npm.cmd run verify:all',
109
+ 'pnpm.cmd test',
110
+ 'yarn.cmd lint',
111
+ 'bun.cmd run check',
112
+ 'node --test ci/mechanism-516-agy-post-tool-exit.test.js',
113
+ 'node --test --test-name-pattern "mentions --help in a test name"',
114
+ 'mkdocs build --strict',
115
+ 'poetry run mkdocs build --strict',
116
+ 'uv run mkdocs build --strict',
117
+ '.venv\\Scripts\\mkdocs build --strict',
118
+ '.venv/bin/mkdocs build --strict',
119
+ 'sphinx-build -W docs build',
120
+ 'sphinx-build -v docs build',
121
+ 'sphinx-build -M html docs build',
122
+ ]) {
123
+ assert.strictEqual(isVerificationCommand(cmd, { cwd: repo, root: repo }), true, `must recognize verifier: ${cmd}`);
124
+ }
125
+
126
+ for (const cmd of [
127
+ ...infoQueries,
128
+ 'mkdocs serve',
129
+ 'node -e "console.log(1)"',
130
+ 'npm.cmd install',
131
+ 'npm.cmd run build && rm -rf out',
132
+ 'npm.cmd run test:consistency; Remove-Item -Recurse .',
133
+ ]) {
134
+ assert.strictEqual(isVerificationCommand(cmd, { cwd: repo, root: repo }), false, `must reject non-verifier: ${cmd}`);
135
+ }
136
+
137
+ // Declared contract matches npm.cmd equivalent only in declared cwd
138
+ fs.mkdirSync(path.join(repo, '.harness'), { recursive: true });
139
+ fs.writeFileSync(path.join(repo, '.harness', 'verify.json'), JSON.stringify({
140
+ version: 1,
141
+ checks: [{ id: 'root-test', run: 'npm test', cwd: '.' }],
142
+ }));
143
+ assert.strictEqual(isVerificationCommand('npm.cmd test', { cwd: repo, root: repo }), true, 'declared npm test matches npm.cmd test');
144
+ assert.strictEqual(isVerificationCommand('npm.cmd test', { cwd: path.join(repo, 'pkg'), root: repo }), false, 'declared npm.cmd test must still respect cwd');
145
+ fs.rmSync(path.join(repo, '.harness'), { recursive: true, force: true });
146
+
147
+ // 2. mkdocs.yml detection
148
+ const docsRepo = initRepo(path.join(temp, 'mkdocs-repo'));
149
+ fs.writeFileSync(path.join(docsRepo, 'mkdocs.yml'), 'site_name: Demo\n');
150
+ fs.writeFileSync(path.join(docsRepo, 'pyproject.toml'), '[tool.poetry]\nname = "demo"\n');
151
+ const detected = detectRoot(docsRepo);
152
+ const runs = detected.candidates.map(c => c.run);
153
+ assert.ok(runs.includes('mkdocs build --strict'), `missing mkdocs candidate: ${JSON.stringify(runs)}`);
154
+ assert.ok(runs.includes('poetry run mkdocs build --strict'), `missing poetry mkdocs candidate: ${JSON.stringify(runs)}`);
155
+ for (const prefix of ['mkdocs build --strict', 'poetry run mkdocs build --strict']) {
156
+ assert.strictEqual(isVerificationCommand(prefix, { cwd: docsRepo, root: docsRepo }), true);
157
+ assert.strictEqual(isVerificationCommand(prefix + ' --help', { cwd: docsRepo, root: docsRepo }), false);
158
+ assert.ok(!postShell(docsRepo, 'docs-help', prefix + ' --help', 0).lastVerifyAt);
159
+ }
160
+
161
+ const gateOut = spawnSync(process.execPath, [VERIFY, '--json'], { cwd: docsRepo, encoding: 'utf8', timeout: 20000 });
162
+ assert.strictEqual(gateOut.status, 0);
163
+ const gateReport = JSON.parse(gateOut.stdout);
164
+ assert.strictEqual(gateReport.status, 'UNCHECKED_DISCOVERED');
165
+ assert.ok(gateReport.candidates.some(c => c.run === 'mkdocs build --strict'));
166
+
167
+ // 3. PowerShell Set-Location prelude
168
+ const changeLocation = dir => `Set-Location -LiteralPath '${dir}' -ErrorAction Stop`;
169
+ const testCommand = 'node --test verify.test.js';
170
+ const verifyInPkg = `${changeLocation('./pkg')} && ${testCommand}`;
171
+ const failedPrelude = `${changeLocation('./missing')} && ${testCommand}`;
172
+ const unconditionalPrelude = `Set-Location -Path './missing'; ${testCommand}`;
173
+ const wildcardPrelude = `Set-Location -Path './pkg[1]' -ErrorAction Stop && ${testCommand}`;
174
+ const literalBracketsPrelude = `${changeLocation('./pkg[1]')} && ${testCommand}`;
175
+ const posixRepo = repo.replace(/\\/g, '/');
176
+ fs.mkdirSync(path.join(repo, '.harness'));
177
+ const pkgContract = JSON.stringify({
178
+ version: 1,
179
+ checks: [{ id: 'pkg-test', run: testCommand, cwd: 'pkg' }],
180
+ });
181
+ const contractPath = path.join(repo, '.harness', 'verify.json');
182
+ fs.writeFileSync(contractPath, pkgContract);
183
+ for (const cmd of [
184
+ verifyInPkg,
185
+ `${changeLocation(path.join(repo, 'pkg'))} && ${testCommand}`,
186
+ `${changeLocation(posixRepo + '/pkg')} && ${testCommand}`,
187
+ `cd ./pkg && ${testCommand}`,
188
+ ]) {
189
+ assert.strictEqual(isVerificationCommand(cmd, { cwd: repo, root: repo }), true, `must unwrap matching prelude: ${cmd}`);
190
+ }
191
+ if (process.platform === 'win32') {
192
+ assert.strictEqual(isVerificationCommand(`${changeLocation('.\\pkg')} && ${testCommand}`, { cwd: repo, root: repo }), true);
193
+ }
194
+
195
+ let successfulExit = 0;
196
+ let failedExit = 1;
197
+ let wildcardExit = 0;
198
+ if (process.platform === 'win32' || process.env.HARNESS_TEST_PWSH === '1') {
199
+ fs.writeFileSync(path.join(repo, 'verify.test.js'), 'require("node:test")("root verifier", () => {});\n');
200
+ fs.writeFileSync(path.join(repo, 'pkg', 'verify.test.js'), 'require("node:test")("package verifier", () => {});\n');
201
+ fs.writeFileSync(path.join(repo, 'pkg1', 'verify.test.js'), 'require("node:test")("wildcard verifier", () => {});\n');
202
+ fs.writeFileSync(path.join(repo, 'pkg[1]', 'verify.test.js'), 'require("node:test")("literal verifier", () => {});\n');
203
+
204
+ const success = runPowerShell(repo, verifyInPkg);
205
+ assert.strictEqual(success.status, 0, success.stderr);
206
+ assert.match(success.stdout, /package verifier/);
207
+ successfulExit = success.status;
208
+
209
+ const failure = runPowerShell(repo, failedPrelude);
210
+ assert.strictEqual(failure.status, 1, failure.stderr);
211
+ assert.doesNotMatch(failure.stdout, /verifier/);
212
+ failedExit = failure.status;
213
+
214
+ const unconditional = runPowerShell(repo, unconditionalPrelude);
215
+ assert.strictEqual(unconditional.status, 0, unconditional.stderr);
216
+ assert.match(unconditional.stdout, /root verifier/);
217
+
218
+ const wildcard = runPowerShell(repo, wildcardPrelude);
219
+ assert.strictEqual(wildcard.status, 0, wildcard.stderr);
220
+ assert.match(wildcard.stdout, /wildcard verifier/);
221
+ wildcardExit = wildcard.status;
222
+
223
+ const literal = runPowerShell(repo, literalBracketsPrelude);
224
+ assert.strictEqual(literal.status, 0, literal.stderr);
225
+ assert.match(literal.stdout, /literal verifier/);
226
+ }
227
+
228
+ for (const cmd of [
229
+ failedPrelude,
230
+ unconditionalPrelude,
231
+ `Set-Location -Path './pkg' -ErrorAction Stop && ${testCommand}`,
232
+ `Set-Location -LiteralPath './pkg' && ${testCommand}`,
233
+ `${changeLocation('./pkg')}; ${testCommand}`,
234
+ literalBracketsPrelude,
235
+ wildcardPrelude,
236
+ `${changeLocation('./pkg1')} && ${testCommand}`,
237
+ `${changeLocation('./pkg1/../pkg')} && ${testCommand}`,
238
+ `${changeLocation('FileSystem::./pkg')} && ${testCommand}`,
239
+ `${changeLocation(outside)} && ${testCommand}`,
240
+ `${changeLocation('./pkg')} && ${testCommand} && echo done`,
241
+ ]) {
242
+ assert.strictEqual(isVerificationCommand(cmd, { cwd: repo, root: repo }), false, `must reject unsafe Set-Location prelude: ${cmd}`);
243
+ assert.ok(!postShell(repo, 'rejected-prelude', cmd, 0).lastVerifyAt, `must not credit prelude: ${cmd}`);
244
+ }
245
+ assert.ok(!postShell(repo, 'failed-prelude', failedPrelude, failedExit).lastVerifyAt);
246
+ assert.strictEqual(parseCwdPrelude(`${changeLocation(outside)} && ${testCommand}`, { cwd: repo, root: repo }), null);
247
+ assert.ok(!postShell(repo, 'wrong-tool-cwd', testCommand, 0).lastVerifyAt);
248
+ assert.ok(postShell(repo, 'tool-cwd', testCommand, 0, path.join(repo, 'pkg')).lastVerifyAt);
249
+ // The wildcard fixture is checked against the directory the literal path
250
+ // would credit, so a contract mismatch cannot mask incorrect recognition.
251
+ fs.writeFileSync(contractPath, JSON.stringify({
252
+ version: 1,
253
+ checks: [{ id: 'literal-test', run: testCommand, cwd: 'pkg[1]' }],
254
+ }));
255
+ for (const command of [wildcardPrelude, literalBracketsPrelude]) {
256
+ assert.ok(!postShell(repo, 'wildcard-prelude', command, wildcardExit).lastVerifyAt);
257
+ }
258
+ fs.rmSync(contractPath);
259
+ for (const cmd of infoQueries) {
260
+ assert.ok(!postShell(repo, 'verifier-info', cmd, 0).lastVerifyAt, `must not credit info query: ${cmd}`);
261
+ }
262
+ fs.writeFileSync(contractPath, pkgContract);
263
+
264
+ // 4. Read-only PowerShell cmdlets & agy CLI read commands
265
+ for (const cmd of [
266
+ 'Get-Command agy',
267
+ 'Get-FileHash hooks/scripts/agy-stop.js',
268
+ 'Get-ChildItem | Select-Object Name',
269
+ 'Get-ChildItem | Sort-Object LastWriteTime | Format-Table Name',
270
+ 'agy --version',
271
+ 'agy plugin list --json',
272
+ 'agy plugin validate --json ./plugins/harness-everything',
273
+ ]) {
274
+ assert.strictEqual(classifyShell(cmd), 'read-only', `must classify as read-only: ${cmd}`);
275
+ }
276
+
277
+ assert.strictEqual(classifyShell('Get-ChildItem | ForEach-Object { Remove-Item $_.FullName }'), 'untrusted');
278
+ assert.notStrictEqual(classifyShell('Set-Location C:\\outside; git status'), 'read-only');
279
+ assert.strictEqual(classifyShell('Get-Content a.txt > b.txt'), 'untrusted');
280
+
281
+ // 5. End-to-end packaged AGY hooks: read-only PowerShell doesn't trigger false Stop;
282
+ // A successful, contained Set-Location verifier allows Stop.
283
+ const convReadOnly = 'win-readonly-' + Date.now();
284
+ runScript(PACKAGED_POST_TOOL, {
285
+ conversationId: convReadOnly,
286
+ workspacePaths: [repo],
287
+ toolCall: { name: 'run_command', args: { CommandLine: 'Get-ChildItem | Select-Object Name', Cwd: repo } },
288
+ });
289
+ runScript(PACKAGED_POST_TOOL, {
290
+ conversationId: convReadOnly,
291
+ workspacePaths: [repo],
292
+ toolCall: { name: 'run_command', args: { CommandLine: 'agy plugin list --json', Cwd: repo } },
293
+ });
294
+ const handoffReadOnly = JSON.parse(fs.readFileSync(path.join(getSessionDir(repo, convReadOnly), 'handoff-state.json'), 'utf8'));
295
+ assert.ok(!handoffReadOnly.lastEditAt, `read-only PowerShell/agy commands must not set lastEditAt: ${JSON.stringify(handoffReadOnly)}`);
296
+ assert.deepStrictEqual(
297
+ runScript(PACKAGED_STOP, { conversationId: convReadOnly, workspacePaths: [repo], terminationReason: 'NO_TOOL_CALL' }),
298
+ { decision: 'allow' }
299
+ );
300
+
301
+ const convEditVerify = 'win-edit-verify-' + Date.now();
302
+ const target = path.join(repo, 'README.md');
303
+ fs.writeFileSync(target, 'edited\n');
304
+ runScript(PACKAGED_POST_TOOL, {
305
+ conversationId: convEditVerify,
306
+ workspacePaths: [repo],
307
+ toolCall: { name: 'write_file', args: { Path: target, Content: 'edited\n' } },
308
+ });
309
+ const afterEdit = readHandoff(repo, convEditVerify);
310
+ for (const exitCode of [undefined, '0']) {
311
+ const unverified = postShell(repo, convEditVerify, verifyInPkg, exitCode);
312
+ assert.strictEqual(unverified.lastEditAt, afterEdit.lastEditAt);
313
+ assert.strictEqual(unverified.lastVerifyAt, afterEdit.lastVerifyAt);
314
+ }
315
+ assert.strictEqual(postShell(repo, convEditVerify, verifyInPkg, 1).lastVerifyAt, afterEdit.lastVerifyAt);
316
+ const afterPass = postShell(repo, convEditVerify, verifyInPkg, successfulExit);
317
+ assert.ok(afterPass.lastVerifyAt >= afterEdit.lastEditAt, 'confirmed Set-Location verifier must advance lastVerifyAt');
318
+ assert.deepStrictEqual(
319
+ runScript(PACKAGED_STOP, { conversationId: convEditVerify, workspacePaths: [repo], terminationReason: 'NO_TOOL_CALL' }),
320
+ { decision: 'allow' }
321
+ );
322
+
323
+ console.log('Windows verification-contract, PowerShell read-only classification, and packaged AGY hook flow verified.');
324
+ } finally {
325
+ if (originalStateHome === undefined) delete process.env.HARNESS_STATE_HOME;
326
+ else process.env.HARNESS_STATE_HOME = originalStateHome;
327
+ fs.rmSync(temp, { recursive: true, force: true });
328
+ }
@@ -15,7 +15,7 @@ Statuses are intentionally explicit:
15
15
  - `Unsupported`: official host documentation explicitly rules out the capability.
16
16
  - `Unknown`: the capability or its current host behavior was not established.
17
17
 
18
- Codex, Antigravity (AGY), and OpenCode are `Partial` in `liveHostVerification`. The Codex artifact verifies user-hook compatibility capture for two consecutive turns on one Windows Codex CLI host; native plugin-hook mounting and other host/version combinations remain unverified. The AGY artifact covers global Desktop App `2.34.0` and `agy` CLI `1.5.15` (macOS) for plugin loading/validation and lifecycle hooks under host-limited `PostToolUse` shell outcomes; IDE write tools, live `exitCode: 0` shell verification credit, live `model_stop`, and full project-scope isolation remain unverified. OpenCode 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.
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), plus Windows Desktop and `agy` CLI `1.5.16` (`harness-everything` `1.0.1`), for plugin loading/validation and lifecycle hooks (including bounded 1-continuation `Stop` on Windows) 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
 
@@ -73,7 +73,7 @@ A shared matcher (`hooks/scripts/lib/ledger-match.js`) selects workspace ledger
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
+ | 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, plus `agy` CLI `1.5.16` `validate`/`list --json` on Windows; `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`); Windows Desktop + CLI `1.5.16` (`harness-everything` `1.0.1`) live-verified `SessionStart`, `PreInvocation`, and bounded 1-continuation `Stop`; `PostToolUse` omits `exitCode`/`error` on shell outcomes on macOS `2.34.0`/CLI `1.5.15` and Windows Desktop, 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) + [macOS partial live-host evidence](../benchmarks/results/live-host/agy-2026-11-23/README.md) + [Windows partial live-host evidence](../benchmarks/results/live-host/agy-2026-11-25/README.md); `/hooks` TUI view, full project-scope `harness-everything` isolation, IDE write tools, live shell `exitCode: 0` verification credit, and live `Stop` `model_stop` remain open in issue #514. |
77
77
  | ChatGPT / OpenAI Plugin | `Unknown` for a repository-local standalone path | `Mechanism verified` | `Partial`: local Work/Codex hooks are separate from ordinary Chat | Managed workspace marketplace | Not established | The public Skills-only bundle is mechanically reproducible; import, approval, and live behavior remain `Unknown`. |
78
78
  | Claude Code | `Supported` | `Supported` | `Mechanism verified` for Harness configuration | `.claude/skills/` | `~/.claude/skills/` | Native Claude surfaces and the state-specific plugin sync command are mechanically checked; fresh-host execution is not preserved here. |
79
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. |
@@ -294,11 +294,11 @@
294
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
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
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."},
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), agy CLI 1.5.15 (macOS), and Windows Antigravity Desktop + agy CLI 1.5.16; Linux and other AGY versions remain unverified."},
298
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
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
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."}
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), agy CLI 1.5.15 (macOS), and Windows Desktop + agy CLI 1.5.16 (benchmarks/results/live-host/agy-2026-11-25/README.md): plugin validate/list, SessionStart, PreInvocation, PreToolUse (write_file/run_command), PostToolUse edit timestamps, bounded Stop continuation (NO_TOOL_CALL / direct revision + workspace fingerprint), and temporary project-scope hook discovery. IDE write tools, live shell exitCode: 0 verification credit, live Stop model_stop, full project-scope isolation, and Linux hosts remain unverified."}
302
302
  }
303
303
  }
304
304
  ]
@@ -192,7 +192,7 @@ function linkedWorktree(cwd, boundRoot) {
192
192
  // a raw regex split so quoted/escaped separator characters remain arguments.
193
193
  // Unsupported shell syntax still fails closed.
194
194
  const DANGEROUS_FLAG_RE = /\s(?:--(?:output|ext-diff|textconv|exec|pre|pre-glob|pager|open|batch|filters)|-[xoO])(?:\b|=)|\s-(?:exec|execdir|delete|fprint|fprintf)\b/i;
195
- const READ_ONLY_PREFIX_RE = /^(?:git\s+(?:status|rev-parse|diff|log|show|ls-files|check-ignore)(?:\s|$)|git\s+branch\s+--show-current$|git\s+worktree\s+list(?:\s|$)|gh\s+(?:issue|pr)\s+(?:view|list)(?:\s|$)|gh\s+repo\s+view(?:\s|$)|gh\s+auth\s+status(?:\s|$)|(?:pwd|ls|dir|cat|type|head|tail|wc|stat|rg|grep|echo|Get-Location|Get-ChildItem|Get-Content|Select-String|Test-Path)(?:\s|$))/i;
195
+ const READ_ONLY_PREFIX_RE = /^(?:git\s+(?:status|rev-parse|diff|log|show|ls-files|check-ignore)(?:\s|$)|git\s+branch\s+--show-current$|git\s+worktree\s+list(?:\s|$)|gh\s+(?:issue|pr)\s+(?:view|list)(?:\s|$)|gh\s+repo\s+view(?:\s|$)|gh\s+auth\s+status(?:\s|$)|agy\s+(?:--version|plugin\s+(?:list|validate))(?:\s|$)|(?:pwd|ls|dir|cat|type|head|tail|wc|stat|rg|grep|echo|Get-Location|Get-ChildItem|Get-Content|Get-Command|Get-FileHash|Select-String|Select-Object|Sort-Object|Measure-Object|Format-Table|Format-List|Out-String|ConvertTo-Json|ConvertFrom-Json|Test-Path)(?:\s|$))/i;
196
196
  function isVerificationShell(command, options = {}) {
197
197
  return isVerificationCommand(command, options);
198
198
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-enforcement",
3
3
  "description": "Repository inventory for the opencode enforcement plugin and its standalone helper",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "runtime": "index.mjs",
6
6
  "hooks": {
7
7
  "verify": "hooks/verify.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
5
5
  "main": "harness-everything/scripts/bootstrap.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -192,7 +192,7 @@ function linkedWorktree(cwd, boundRoot) {
192
192
  // a raw regex split so quoted/escaped separator characters remain arguments.
193
193
  // Unsupported shell syntax still fails closed.
194
194
  const DANGEROUS_FLAG_RE = /\s(?:--(?:output|ext-diff|textconv|exec|pre|pre-glob|pager|open|batch|filters)|-[xoO])(?:\b|=)|\s-(?:exec|execdir|delete|fprint|fprintf)\b/i;
195
- const READ_ONLY_PREFIX_RE = /^(?:git\s+(?:status|rev-parse|diff|log|show|ls-files|check-ignore)(?:\s|$)|git\s+branch\s+--show-current$|git\s+worktree\s+list(?:\s|$)|gh\s+(?:issue|pr)\s+(?:view|list)(?:\s|$)|gh\s+repo\s+view(?:\s|$)|gh\s+auth\s+status(?:\s|$)|(?:pwd|ls|dir|cat|type|head|tail|wc|stat|rg|grep|echo|Get-Location|Get-ChildItem|Get-Content|Select-String|Test-Path)(?:\s|$))/i;
195
+ const READ_ONLY_PREFIX_RE = /^(?:git\s+(?:status|rev-parse|diff|log|show|ls-files|check-ignore)(?:\s|$)|git\s+branch\s+--show-current$|git\s+worktree\s+list(?:\s|$)|gh\s+(?:issue|pr)\s+(?:view|list)(?:\s|$)|gh\s+repo\s+view(?:\s|$)|gh\s+auth\s+status(?:\s|$)|agy\s+(?:--version|plugin\s+(?:list|validate))(?:\s|$)|(?:pwd|ls|dir|cat|type|head|tail|wc|stat|rg|grep|echo|Get-Location|Get-ChildItem|Get-Content|Get-Command|Get-FileHash|Select-String|Select-Object|Sort-Object|Measure-Object|Format-Table|Format-List|Out-String|ConvertTo-Json|ConvertFrom-Json|Test-Path)(?:\s|$))/i;
196
196
  function isVerificationShell(command, options = {}) {
197
197
  return isVerificationCommand(command, options);
198
198
  }
@@ -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.1.0",
4
+ "version": "1.1.1",
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",
@@ -201,6 +201,12 @@ function detectRoot(root) {
201
201
  }
202
202
  if (fs.existsSync(path.join(root, 'tox.ini'))) addCandidate(candidates, seen, { source: 'tox', run: 'tox', cwd: root });
203
203
  if (fs.existsSync(path.join(root, 'noxfile.py'))) addCandidate(candidates, seen, { source: 'nox', run: 'nox', cwd: root });
204
+ if (fs.existsSync(path.join(root, 'mkdocs.yml')) || fs.existsSync(path.join(root, 'mkdocs.yaml'))) {
205
+ addCandidate(candidates, seen, { source: 'mkdocs', run: 'mkdocs build --strict', cwd: root });
206
+ if (/\[tool\.poetry(?:\.|\])/m.test(pyproject)) {
207
+ addCandidate(candidates, seen, { source: 'mkdocs:poetry', run: 'poetry run mkdocs build --strict', cwd: root });
208
+ }
209
+ }
204
210
  if (fs.existsSync(path.join(root, 'Cargo.toml'))) addCandidate(candidates, seen, { source: 'cargo', run: 'cargo test', cwd: root });
205
211
  if (fs.existsSync(path.join(root, 'go.mod'))) addCandidate(candidates, seen, { source: 'go', run: 'go test ./...', cwd: root });
206
212
 
@@ -245,6 +251,10 @@ function normalizeCommand(command) {
245
251
  return String(command || '').trim().replace(/\s+/g, ' ');
246
252
  }
247
253
 
254
+ function stripWindowsCmdShim(command) {
255
+ return String(command || '').replace(/^(npm|pnpm|yarn|bun|npx)\.cmd(?=\s|$)/i, '$1');
256
+ }
257
+
248
258
  function hasControlOperators(command) {
249
259
  return /(?:&&|\|\||[;|\r\n])/.test(command);
250
260
  }
@@ -253,7 +263,9 @@ function commandMatches(command, expected) {
253
263
  const actual = normalizeCommand(command);
254
264
  const target = normalizeCommand(expected);
255
265
  if (!actual || !target || hasControlOperators(actual)) return false;
256
- return actual === target || actual.startsWith(target + ' ');
266
+ const normalizedActual = stripWindowsCmdShim(actual);
267
+ const normalizedTarget = stripWindowsCmdShim(target);
268
+ return normalizedActual === normalizedTarget || normalizedActual.startsWith(normalizedTarget + ' ');
257
269
  }
258
270
 
259
271
  function isGitCommit(command) {
@@ -274,9 +286,28 @@ function bypassesHooks(command) {
274
286
  );
275
287
  }
276
288
 
289
+ const NODE_TEST_RE = /^node\s+--test(?:\s|$)/i;
290
+ const DOC_BUILD_RE = /^(?:(?:uv|poetry)\s+run\s+mkdocs(?:\.exe)?\s+build|(?:(?:\.?[/\\])?(?:\.?venv|env)[/\\](?:Scripts|bin)[/\\])?(?:mkdocs(?:\.exe)?\s+build|sphinx-build(?:\.exe)?))(?:\s|$)/i;
291
+
292
+ function isVerifierInfoQuery(command) {
293
+ const nodeTest = NODE_TEST_RE.exec(command);
294
+ const verifier = nodeTest || DOC_BUILD_RE.exec(command);
295
+ if (!verifier) return false;
296
+
297
+ // Keep quoted argument values together, while recognizing quoted switches.
298
+ const args = command.slice(verifier[0].length).match(/(?:[^\s"'\x60\\]|\\.|\x60.|"[^"]*"|'[^']*')+/g) || [];
299
+ const options = args.map(arg => arg.replace(/["']/g, '').replace(/(?:\\|\x60)(?=[A-Za-z-])/g, ''));
300
+ if (options[0] === '-M' && options[1] === 'help' && /sphinx-build(?:\.exe)?\s*$/i.test(verifier[0])) return true;
301
+ const versionFlag = nodeTest ? '-v' : '-V';
302
+ return options.some(option =>
303
+ option === '--help' || option === '--version' || option === '-h' || option === versionFlag
304
+ );
305
+ }
306
+
277
307
  function legacyVerificationCommand(command) {
278
- const value = normalizeCommand(command);
279
- return /^(?:(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|lint|build|typecheck|check|verify)\b|npx\s+(?:jest|vitest|mocha|tsc|eslint)\b|(?:jest|vitest|mocha|pytest|rspec|phpunit)\b|uv\s+run\s+(?:pytest|ruff)\b|(?:make|just)\s+(?:test|check|lint|ci)\b|cargo\s+(?:test|check)\b|go\s+test\b|dotnet\s+(?:test|build)\b)/i.test(value);
308
+ const value = stripWindowsCmdShim(normalizeCommand(command));
309
+ if (NODE_TEST_RE.test(value) || DOC_BUILD_RE.test(value)) return !isVerifierInfoQuery(value);
310
+ return /^(?:(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|lint|build|typecheck|check|verify)\b|npx\s+(?:jest|vitest|mocha|tsc|eslint)\b|(?:jest|vitest|mocha|pytest|rspec|phpunit)\b|(?:uv|poetry)\s+run\s+(?:pytest|ruff)\b|(?:make|just)\s+(?:test|check|lint|ci)\b|cargo\s+(?:test|check)\b|go\s+test\b|dotnet\s+(?:test|build)\b)/i.test(value);
280
311
  }
281
312
 
282
313
  function verificationCommandSet(cwd, options = {}) {
@@ -334,6 +365,9 @@ function verificationCommandSet(cwd, options = {}) {
334
365
  // command must be one plain command: no further control operators,
335
366
  // redirection, substitution, expansion, subshell, or background syntax.
336
367
  const CWD_PRELUDE_RE = /^cd\s+(?:"([^"]*)"|'([^']*)'|([A-Za-z0-9_./:@%+,-]+))\s*&&\s*([\s\S]+)$/;
368
+ // PowerShell 7 must stop on a failed location change before running the
369
+ // verifier. Match only a single-quoted filesystem path with explicit flags.
370
+ const PS_CWD_PRELUDE_RE = /^Set-Location[ \t]+-LiteralPath[ \t]+'([^'\r\n]+)'[ \t]+-ErrorAction[ \t]+Stop[ \t]*&&[ \t]*([^\r\n]+)$/i;
337
371
  const UNSAFE_WRAPPED_RE = /[`$<>&|;()\r\n]/;
338
372
  const UNSAFE_DOUBLE_QUOTED_RE = /[$`!]|\\[\\"$`]|\\$/;
339
373
 
@@ -355,22 +389,44 @@ function stableCdTarget(target, platform = process.platform) {
355
389
  return target.startsWith('/');
356
390
  }
357
391
 
392
+ function stablePowerShellTarget(target, platform = process.platform) {
393
+ const start = platform === 'win32' ? /^(?:[A-Za-z]:|\.)[/\\]/ : /^(?:\.)?\//;
394
+ if (target === '.') return true;
395
+ if (!start.test(target) || (platform !== 'win32' && target.includes('\\'))) return false;
396
+ // Restrict segments to unambiguous filesystem names. In particular, a
397
+ // parent component after a symlink can resolve differently from path.resolve.
398
+ return target.replace(start, '').split(/[/\\]/).every(part =>
399
+ /^[A-Za-z0-9_. -]*[A-Za-z0-9_-]$/.test(part) && !part.startsWith(' ')
400
+ );
401
+ }
402
+
358
403
  function parseCwdPrelude(command, options = {}) {
359
- const match = String(command || '').trim().match(CWD_PRELUDE_RE);
360
- if (!match) return null;
361
- const [, doubleQuoted, singleQuoted, bare, restRaw] = match;
362
- const target = doubleQuoted ?? singleQuoted ?? bare;
404
+ const trimmed = String(command || '').trim();
405
+ const bash = trimmed.match(CWD_PRELUDE_RE);
406
+ const powerShell = bash ? null : trimmed.match(PS_CWD_PRELUDE_RE);
407
+ if (!bash && !powerShell) return null;
408
+ let target;
409
+ let restRaw;
410
+ if (bash) {
411
+ const [, doubleQuoted, singleQuoted, bare, bashRest] = bash;
412
+ target = doubleQuoted ?? singleQuoted ?? bare;
413
+ if (!target || (doubleQuoted !== undefined && UNSAFE_DOUBLE_QUOTED_RE.test(target))) return null;
414
+ if (!stableCdTarget(target, options.platform)) return null;
415
+ target = hostPathToNative(target, options.platform);
416
+ restRaw = bashRest;
417
+ } else {
418
+ [, target, restRaw] = powerShell;
419
+ if (!stablePowerShellTarget(target, options.platform)) return null;
420
+ }
363
421
  const rest = restRaw.trim();
364
- if (!target || !rest) return null;
365
- if (doubleQuoted !== undefined && UNSAFE_DOUBLE_QUOTED_RE.test(target)) return null;
422
+ if (!rest) return null;
366
423
  if (UNSAFE_WRAPPED_RE.test(rest) || hasControlOperators(rest)) return null;
367
- if (!stableCdTarget(target, options.platform)) return null;
368
424
 
369
425
  const cwd = path.resolve(options.cwd || process.cwd());
370
426
  let resolved;
371
427
  let root;
372
428
  try {
373
- resolved = fs.realpathSync.native(path.resolve(cwd, hostPathToNative(target, options.platform)));
429
+ resolved = fs.realpathSync.native(path.resolve(cwd, target));
374
430
  if (!fs.statSync(resolved).isDirectory()) return null;
375
431
  root = fs.realpathSync.native(path.resolve(options.root || findGitRoot(cwd)));
376
432
  } catch (_) {
@@ -395,7 +451,7 @@ function cwdKey(dir) {
395
451
  function isPlainVerificationCommand(command, options = {}) {
396
452
  const cwd = path.resolve(options.cwd || process.cwd());
397
453
  const actual = normalizeCommand(command);
398
- if (!actual || hasControlOperators(actual)) return false;
454
+ if (!actual || hasControlOperators(actual) || isVerifierInfoQuery(actual)) return false;
399
455
  const set = verificationCommandSet(cwd, options);
400
456
  if (set.contractInvalid) return false;
401
457
 
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:e4b24eb1-40d0-5a66-929d-8a537eb5374c",
5
+ "serialNumber": "urn:uuid:cc86a84d-8231-574c-a714-4a870b59f395",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-11-25T02:50:38.003Z",
8
+ "timestamp": "2026-11-25T13:09:46.678Z",
9
9
  "tools": [
10
10
  {
11
11
  "vendor": "Harness Everything",
12
12
  "name": "generate-sbom.js",
13
- "version": "1.1.0"
13
+ "version": "1.1.1"
14
14
  }
15
15
  ],
16
16
  "component": {
17
17
  "type": "application",
18
- "bom-ref": "pkg:npm/harness-everything@1.1.0",
18
+ "bom-ref": "pkg:npm/harness-everything@1.1.1",
19
19
  "name": "harness-everything",
20
- "version": "1.1.0",
21
- "purl": "pkg:npm/harness-everything@1.1.0"
20
+ "version": "1.1.1",
21
+ "purl": "pkg:npm/harness-everything@1.1.1"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -2033,7 +2033,7 @@
2033
2033
  ]
2034
2034
  },
2035
2035
  {
2036
- "ref": "pkg:npm/harness-everything@1.1.0",
2036
+ "ref": "pkg:npm/harness-everything@1.1.1",
2037
2037
  "dependsOn": [
2038
2038
  "pkg:npm/%40commitlint/cli@19.8.1",
2039
2039
  "pkg:npm/%40commitlint/config-conventional@19.8.1",
@@ -201,6 +201,12 @@ function detectRoot(root) {
201
201
  }
202
202
  if (fs.existsSync(path.join(root, 'tox.ini'))) addCandidate(candidates, seen, { source: 'tox', run: 'tox', cwd: root });
203
203
  if (fs.existsSync(path.join(root, 'noxfile.py'))) addCandidate(candidates, seen, { source: 'nox', run: 'nox', cwd: root });
204
+ if (fs.existsSync(path.join(root, 'mkdocs.yml')) || fs.existsSync(path.join(root, 'mkdocs.yaml'))) {
205
+ addCandidate(candidates, seen, { source: 'mkdocs', run: 'mkdocs build --strict', cwd: root });
206
+ if (/\[tool\.poetry(?:\.|\])/m.test(pyproject)) {
207
+ addCandidate(candidates, seen, { source: 'mkdocs:poetry', run: 'poetry run mkdocs build --strict', cwd: root });
208
+ }
209
+ }
204
210
  if (fs.existsSync(path.join(root, 'Cargo.toml'))) addCandidate(candidates, seen, { source: 'cargo', run: 'cargo test', cwd: root });
205
211
  if (fs.existsSync(path.join(root, 'go.mod'))) addCandidate(candidates, seen, { source: 'go', run: 'go test ./...', cwd: root });
206
212
 
@@ -245,6 +251,10 @@ function normalizeCommand(command) {
245
251
  return String(command || '').trim().replace(/\s+/g, ' ');
246
252
  }
247
253
 
254
+ function stripWindowsCmdShim(command) {
255
+ return String(command || '').replace(/^(npm|pnpm|yarn|bun|npx)\.cmd(?=\s|$)/i, '$1');
256
+ }
257
+
248
258
  function hasControlOperators(command) {
249
259
  return /(?:&&|\|\||[;|\r\n])/.test(command);
250
260
  }
@@ -253,7 +263,9 @@ function commandMatches(command, expected) {
253
263
  const actual = normalizeCommand(command);
254
264
  const target = normalizeCommand(expected);
255
265
  if (!actual || !target || hasControlOperators(actual)) return false;
256
- return actual === target || actual.startsWith(target + ' ');
266
+ const normalizedActual = stripWindowsCmdShim(actual);
267
+ const normalizedTarget = stripWindowsCmdShim(target);
268
+ return normalizedActual === normalizedTarget || normalizedActual.startsWith(normalizedTarget + ' ');
257
269
  }
258
270
 
259
271
  function isGitCommit(command) {
@@ -274,9 +286,28 @@ function bypassesHooks(command) {
274
286
  );
275
287
  }
276
288
 
289
+ const NODE_TEST_RE = /^node\s+--test(?:\s|$)/i;
290
+ const DOC_BUILD_RE = /^(?:(?:uv|poetry)\s+run\s+mkdocs(?:\.exe)?\s+build|(?:(?:\.?[/\\])?(?:\.?venv|env)[/\\](?:Scripts|bin)[/\\])?(?:mkdocs(?:\.exe)?\s+build|sphinx-build(?:\.exe)?))(?:\s|$)/i;
291
+
292
+ function isVerifierInfoQuery(command) {
293
+ const nodeTest = NODE_TEST_RE.exec(command);
294
+ const verifier = nodeTest || DOC_BUILD_RE.exec(command);
295
+ if (!verifier) return false;
296
+
297
+ // Keep quoted argument values together, while recognizing quoted switches.
298
+ const args = command.slice(verifier[0].length).match(/(?:[^\s"'\x60\\]|\\.|\x60.|"[^"]*"|'[^']*')+/g) || [];
299
+ const options = args.map(arg => arg.replace(/["']/g, '').replace(/(?:\\|\x60)(?=[A-Za-z-])/g, ''));
300
+ if (options[0] === '-M' && options[1] === 'help' && /sphinx-build(?:\.exe)?\s*$/i.test(verifier[0])) return true;
301
+ const versionFlag = nodeTest ? '-v' : '-V';
302
+ return options.some(option =>
303
+ option === '--help' || option === '--version' || option === '-h' || option === versionFlag
304
+ );
305
+ }
306
+
277
307
  function legacyVerificationCommand(command) {
278
- const value = normalizeCommand(command);
279
- return /^(?:(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|lint|build|typecheck|check|verify)\b|npx\s+(?:jest|vitest|mocha|tsc|eslint)\b|(?:jest|vitest|mocha|pytest|rspec|phpunit)\b|uv\s+run\s+(?:pytest|ruff)\b|(?:make|just)\s+(?:test|check|lint|ci)\b|cargo\s+(?:test|check)\b|go\s+test\b|dotnet\s+(?:test|build)\b)/i.test(value);
308
+ const value = stripWindowsCmdShim(normalizeCommand(command));
309
+ if (NODE_TEST_RE.test(value) || DOC_BUILD_RE.test(value)) return !isVerifierInfoQuery(value);
310
+ return /^(?:(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|lint|build|typecheck|check|verify)\b|npx\s+(?:jest|vitest|mocha|tsc|eslint)\b|(?:jest|vitest|mocha|pytest|rspec|phpunit)\b|(?:uv|poetry)\s+run\s+(?:pytest|ruff)\b|(?:make|just)\s+(?:test|check|lint|ci)\b|cargo\s+(?:test|check)\b|go\s+test\b|dotnet\s+(?:test|build)\b)/i.test(value);
280
311
  }
281
312
 
282
313
  function verificationCommandSet(cwd, options = {}) {
@@ -334,6 +365,9 @@ function verificationCommandSet(cwd, options = {}) {
334
365
  // command must be one plain command: no further control operators,
335
366
  // redirection, substitution, expansion, subshell, or background syntax.
336
367
  const CWD_PRELUDE_RE = /^cd\s+(?:"([^"]*)"|'([^']*)'|([A-Za-z0-9_./:@%+,-]+))\s*&&\s*([\s\S]+)$/;
368
+ // PowerShell 7 must stop on a failed location change before running the
369
+ // verifier. Match only a single-quoted filesystem path with explicit flags.
370
+ const PS_CWD_PRELUDE_RE = /^Set-Location[ \t]+-LiteralPath[ \t]+'([^'\r\n]+)'[ \t]+-ErrorAction[ \t]+Stop[ \t]*&&[ \t]*([^\r\n]+)$/i;
337
371
  const UNSAFE_WRAPPED_RE = /[`$<>&|;()\r\n]/;
338
372
  const UNSAFE_DOUBLE_QUOTED_RE = /[$`!]|\\[\\"$`]|\\$/;
339
373
 
@@ -355,22 +389,44 @@ function stableCdTarget(target, platform = process.platform) {
355
389
  return target.startsWith('/');
356
390
  }
357
391
 
392
+ function stablePowerShellTarget(target, platform = process.platform) {
393
+ const start = platform === 'win32' ? /^(?:[A-Za-z]:|\.)[/\\]/ : /^(?:\.)?\//;
394
+ if (target === '.') return true;
395
+ if (!start.test(target) || (platform !== 'win32' && target.includes('\\'))) return false;
396
+ // Restrict segments to unambiguous filesystem names. In particular, a
397
+ // parent component after a symlink can resolve differently from path.resolve.
398
+ return target.replace(start, '').split(/[/\\]/).every(part =>
399
+ /^[A-Za-z0-9_. -]*[A-Za-z0-9_-]$/.test(part) && !part.startsWith(' ')
400
+ );
401
+ }
402
+
358
403
  function parseCwdPrelude(command, options = {}) {
359
- const match = String(command || '').trim().match(CWD_PRELUDE_RE);
360
- if (!match) return null;
361
- const [, doubleQuoted, singleQuoted, bare, restRaw] = match;
362
- const target = doubleQuoted ?? singleQuoted ?? bare;
404
+ const trimmed = String(command || '').trim();
405
+ const bash = trimmed.match(CWD_PRELUDE_RE);
406
+ const powerShell = bash ? null : trimmed.match(PS_CWD_PRELUDE_RE);
407
+ if (!bash && !powerShell) return null;
408
+ let target;
409
+ let restRaw;
410
+ if (bash) {
411
+ const [, doubleQuoted, singleQuoted, bare, bashRest] = bash;
412
+ target = doubleQuoted ?? singleQuoted ?? bare;
413
+ if (!target || (doubleQuoted !== undefined && UNSAFE_DOUBLE_QUOTED_RE.test(target))) return null;
414
+ if (!stableCdTarget(target, options.platform)) return null;
415
+ target = hostPathToNative(target, options.platform);
416
+ restRaw = bashRest;
417
+ } else {
418
+ [, target, restRaw] = powerShell;
419
+ if (!stablePowerShellTarget(target, options.platform)) return null;
420
+ }
363
421
  const rest = restRaw.trim();
364
- if (!target || !rest) return null;
365
- if (doubleQuoted !== undefined && UNSAFE_DOUBLE_QUOTED_RE.test(target)) return null;
422
+ if (!rest) return null;
366
423
  if (UNSAFE_WRAPPED_RE.test(rest) || hasControlOperators(rest)) return null;
367
- if (!stableCdTarget(target, options.platform)) return null;
368
424
 
369
425
  const cwd = path.resolve(options.cwd || process.cwd());
370
426
  let resolved;
371
427
  let root;
372
428
  try {
373
- resolved = fs.realpathSync.native(path.resolve(cwd, hostPathToNative(target, options.platform)));
429
+ resolved = fs.realpathSync.native(path.resolve(cwd, target));
374
430
  if (!fs.statSync(resolved).isDirectory()) return null;
375
431
  root = fs.realpathSync.native(path.resolve(options.root || findGitRoot(cwd)));
376
432
  } catch (_) {
@@ -395,7 +451,7 @@ function cwdKey(dir) {
395
451
  function isPlainVerificationCommand(command, options = {}) {
396
452
  const cwd = path.resolve(options.cwd || process.cwd());
397
453
  const actual = normalizeCommand(command);
398
- if (!actual || hasControlOperators(actual)) return false;
454
+ if (!actual || hasControlOperators(actual) || isVerifierInfoQuery(actual)) return false;
399
455
  const set = verificationCommandSet(cwd, options);
400
456
  if (set.contractInvalid) return false;
401
457