harness-everything 0.42.0 → 0.42.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.
Files changed (41) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +12 -0
  4. package/benchmarks/results/codex-pr-metadata-2026-10-26/README.md +68 -0
  5. package/benchmarks/results/codex-pr-metadata-2026-10-26/green-final.log +162 -0
  6. package/benchmarks/results/codex-pr-metadata-2026-10-26/green.log +158 -0
  7. package/benchmarks/results/codex-pr-metadata-2026-10-26/live-installed-runtime-rejection.json +31 -0
  8. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-action-family-cross-product.js +143 -0
  9. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-action-family-cross-product.log +7 -0
  10. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-codex-action-gate-prehook-smoke.js +78 -0
  11. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-codex-action-gate-prehook-smoke.log +8 -0
  12. package/benchmarks/results/codex-pr-metadata-2026-10-26/luna-review.md +151 -0
  13. package/benchmarks/results/codex-pr-metadata-2026-10-26/original-rejection.json +31 -0
  14. package/benchmarks/results/codex-pr-metadata-2026-10-26/red.log +158 -0
  15. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-descriptor-green.log +192 -0
  16. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-descriptor-red.log +192 -0
  17. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-family-green.log +206 -0
  18. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-family-red.log +206 -0
  19. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-hints-green.log +174 -0
  20. package/benchmarks/results/codex-pr-metadata-2026-10-26/review-hints-red.log +174 -0
  21. package/benchmarks/results/codex-pr-metadata-2026-10-26/verification.md +31 -0
  22. package/benchmarks/results/doc-evidence-e1/README.md +68 -0
  23. package/benchmarks/results/doc-evidence-e1/evidence.json +360 -0
  24. package/benchmarks/results/doc-evidence-e1/pilot-report.json +175 -0
  25. package/benchmarks/results/h1-provider-independence-qualification/README.md +26 -3
  26. package/benchmarks/results/live-host/opencode-d1-d2-2026-10-25/README.md +30 -0
  27. package/benchmarks/results/live-host/opencode-d1-d2-2026-10-25/evidence.json +128 -0
  28. package/ci/action-gate.test.js +86 -0
  29. package/ci/mechanism-2aa-codex-action-gate-policy.test.js +47 -0
  30. package/ci/mechanism-task-git-authorization.test.js +12 -0
  31. package/docs/codex-action-gate.md +27 -1
  32. package/docs/doc-workflow-reconciliation.md +4 -3
  33. package/docs/document-lifecycle.md +3 -3
  34. package/docs/platform-capabilities.md +8 -2
  35. package/hooks/scripts/action-gate.js +35 -8
  36. package/opencode-plugin/plugin.json +1 -1
  37. package/package.json +1 -1
  38. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  39. package/plugins/harness-everything/hooks/scripts/action-gate.js +35 -8
  40. package/plugins/harness-everything/plugin.json +1 -1
  41. package/sbom.cdx.json +7 -7
@@ -108,12 +108,14 @@ function safeResource(input, explicit) {
108
108
  return null;
109
109
  }
110
110
 
111
- function normalizeActionDescriptor(payload) {
111
+ function normalizeActionDescriptor(payload, options = {}) {
112
112
  const tool = toolNameOf(payload);
113
113
  const input = toolInputOf(payload);
114
114
  const explicit = explicitActionDescriptor(payload);
115
- const toolFamily = inferToolFamily(tool, explicit);
116
- const action = inferStructuredAction(tool, explicit);
115
+ const codexPrUpdate = detectHost(payload, options.host) === 'codex' && isPullRequestUpdateTool(tool);
116
+ const toolFamily = inferToolFamily(tool, codexPrUpdate ? null : explicit);
117
+ const inferred = inferStructuredAction(tool, explicit);
118
+ const action = codexPrUpdate && !STRUCTURED_GATED_ACTIONS.has(inferred) ? 'mutate' : inferred;
117
119
  const classification = STRUCTURED_GATED_ACTIONS.has(action)
118
120
  ? 'gated'
119
121
  : (STRUCTURED_SAFE_ACTIONS.has(action) ? 'safe' : 'unknown');
@@ -140,8 +142,23 @@ function isRoutinePullRequestCreation(toolName) {
140
142
  return (last === 'create_pull_request' || name === 'create_pull_request');
141
143
  }
142
144
 
143
- function structuredRule(payload) {
144
- const descriptor = normalizeActionDescriptor(payload);
145
+ function isPullRequestUpdateTool(name) {
146
+ return name.split('__').pop() === 'update_pull_request' || name === 'mcp__codex_apps__github_update_pull_request';
147
+ }
148
+
149
+ function isPullRequestMetadataUpdate(payload) {
150
+ if (!isPullRequestUpdateTool(toolNameOf(payload))) return false;
151
+ const input = toolInputOf(payload);
152
+ if (!input || typeof input !== 'object' || Array.isArray(input)) return false;
153
+ const keys = Object.keys(input);
154
+ const allowed = new Set(['repository_full_name', 'pr_number', 'owner', 'repo', 'pullNumber', 'pull_number', 'title', 'body']);
155
+ return keys.every(key => allowed.has(key))
156
+ && keys.some(key => key === 'title' || key === 'body')
157
+ && keys.filter(key => key === 'title' || key === 'body').every(key => typeof input[key] === 'string');
158
+ }
159
+
160
+ function structuredRule(payload, options = {}) {
161
+ const descriptor = normalizeActionDescriptor(payload, options);
145
162
  if (descriptor.toolFamily === 'shell') return { descriptor, rule: null };
146
163
  if (descriptor.classification === 'safe') return { descriptor, rule: null };
147
164
  // Routine PR creation is a host-deferred mutation, not a Harness-gated one:
@@ -152,6 +169,10 @@ function structuredRule(payload) {
152
169
  if (isRoutinePullRequestCreation(descriptor.toolName) && !(hint && hint.required)) {
153
170
  return { descriptor, rule: null };
154
171
  }
172
+ if (detectHost(payload, options.host) === 'codex' && descriptor.action === 'mutate'
173
+ && isPullRequestMetadataUpdate(payload) && !(hint && hint.required)) {
174
+ return { descriptor, rule: null, hostDeferred: true };
175
+ }
155
176
  if (descriptor.classification === 'gated') {
156
177
  return {
157
178
  descriptor,
@@ -367,7 +388,8 @@ function routerActionGateHint(payload) {
367
388
  payload && payload.routerContract && payload.routerContract.workflowPlan && payload.routerContract.workflowPlan.actionGate,
368
389
  payload && payload.harness && payload.harness.workflowPlan && payload.harness.workflowPlan.actionGate,
369
390
  ];
370
- const gate = candidates.find(candidate => candidate && typeof candidate === 'object');
391
+ const gate = candidates.find(candidate => candidate && typeof candidate === 'object' && candidate.required)
392
+ || candidates.find(candidate => candidate && typeof candidate === 'object');
371
393
  if (!gate) return null;
372
394
  return {
373
395
  required: Boolean(gate.required),
@@ -435,7 +457,7 @@ function recordDecision(payload, rule, table, host, disposition, options = {}, e
435
457
  const exact = exactPayloadText(payload);
436
458
  const commandHash = hashExact(exact);
437
459
  const now = new Date().toISOString();
438
- const descriptor = normalizeActionDescriptor(payload);
460
+ const descriptor = normalizeActionDescriptor(payload, { host });
439
461
  const record = {
440
462
  schemaVersion: 1,
441
463
  toolName: toolNameOf(payload),
@@ -467,11 +489,15 @@ function recordDecision(payload, rule, table, host, disposition, options = {}, e
467
489
  function evaluatePreToolUse(payload, options = {}) {
468
490
  const context = sessionContext(payload, options.sessionDir);
469
491
  const table = options.ruleTable || loadRuleTable(options.rulePath || RULES_PATH);
470
- const structured = structuredRule(payload);
492
+ const structured = structuredRule(payload, options);
471
493
  const rule = structured.rule || classify(payload, table.rules, context.sessionDir);
472
494
  const host = detectHost(payload, options.host);
473
495
 
474
496
  if (!rule) {
497
+ const record = structured.hostDeferred ? recordDecision(payload, {
498
+ id: 'routine-pr-metadata-update',
499
+ reason: 'Codex PR title/body metadata update defers to native task scope and permissions.',
500
+ }, table, host, 'deferred-to-host', { ...options, sessionDir: context.sessionDir }) : null;
475
501
  return {
476
502
  kind: 'allow',
477
503
  exitCode: 0,
@@ -480,6 +506,7 @@ function evaluatePreToolUse(payload, options = {}) {
480
506
  rule: null,
481
507
  table,
482
508
  descriptor: structured.descriptor,
509
+ ...(record ? { record } : {}),
483
510
  };
484
511
  }
485
512
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "harness-everything",
4
- "version": "0.42.0",
4
+ "version": "0.42.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",
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:72e1dfda-07d6-5dc0-a4a1-3cc122ec6c96",
5
+ "serialNumber": "urn:uuid:e3ce04bb-3f54-5090-bffc-a7fca1d360db",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-10-25T08:17:49.469Z",
8
+ "timestamp": "2026-10-26T06:57:43.886Z",
9
9
  "tools": [
10
10
  {
11
11
  "vendor": "Harness Everything",
12
12
  "name": "generate-sbom.js",
13
- "version": "0.42.0"
13
+ "version": "0.42.1"
14
14
  }
15
15
  ],
16
16
  "component": {
17
17
  "type": "application",
18
- "bom-ref": "pkg:npm/harness-everything@0.42.0",
18
+ "bom-ref": "pkg:npm/harness-everything@0.42.1",
19
19
  "name": "harness-everything",
20
- "version": "0.42.0",
21
- "purl": "pkg:npm/harness-everything@0.42.0"
20
+ "version": "0.42.1",
21
+ "purl": "pkg:npm/harness-everything@0.42.1"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -2033,7 +2033,7 @@
2033
2033
  ]
2034
2034
  },
2035
2035
  {
2036
- "ref": "pkg:npm/harness-everything@0.42.0",
2036
+ "ref": "pkg:npm/harness-everything@0.42.1",
2037
2037
  "dependsOn": [
2038
2038
  "pkg:npm/%40commitlint/cli@19.8.1",
2039
2039
  "pkg:npm/%40commitlint/config-conventional@19.8.1",