opencode-swarm 7.199.5 → 7.200.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/attest-task-8ekwny8v.js +2209 -0
- package/dist/cli/{auto-checkpoint-tje4xvtw.js → auto-checkpoint-dqjk82s7.js} +9 -9
- package/dist/cli/{checkpoint-wyh8nkhb.js → checkpoint-2ahps2sp.js} +17 -17
- package/dist/cli/{coder-settlement-d0ca5fb3.js → coder-settlement-1dk37pa9.js} +12 -12
- package/dist/cli/{config-doctor-swg02esj.js → config-doctor-73rctg85.js} +16 -16
- package/dist/cli/{core-yh8ae69m.js → core-y5mfws8v.js} +3 -3
- package/dist/cli/{curation-policy-w9y0db1n.js → curation-policy-43gq6t0y.js} +6 -6
- package/dist/cli/{curator-drift-85qect05.js → curator-drift-k7j9rcgp.js} +8 -8
- package/dist/cli/curator-llm-factory-rke0964p.js +82 -0
- package/dist/cli/{curator-9vzqhesg.js → curator-m278hyrq.js} +43 -43
- package/dist/cli/{doctor-knowledge-receipt-phase-id-eqzsh3b7.js → doctor-knowledge-receipt-phase-id-1m7pkzvt.js} +9 -9
- package/dist/cli/{evidence-summary-service-hc513kyq.js → evidence-summary-service-19k8x1g9.js} +20 -20
- package/dist/cli/{gate-evidence-a10epye0.js → gate-evidence-hche0hf8.js} +15 -7
- package/dist/cli/guardrail-explain-jg5png4a.js +83 -0
- package/dist/cli/{guardrail-log-caspzygc.js → guardrail-log-tvbgnxns.js} +7 -7
- package/dist/cli/{guardrail-reset-48r2n8mz.js → guardrail-reset-v8kvh9cn.js} +43 -43
- package/dist/cli/{hive-promoter-sd3a61mq.js → hive-promoter-bqfa763z.js} +43 -43
- package/dist/cli/{index-hx2f3j9w.js → index-0wg5q595.js} +2 -2
- package/dist/cli/{index-6xv2hz0e.js → index-1rfgzsaw.js} +4 -4
- package/dist/cli/{index-zbygz217.js → index-1tpz99db.js} +2 -2
- package/dist/cli/{index-xtda4xsn.js → index-22atsy06.js} +6 -6
- package/dist/cli/{index-gyz59cbh.js → index-35tf03js.js} +21 -14
- package/dist/cli/{index-gx2vp8gx.js → index-3t46mez1.js} +27 -1
- package/dist/cli/{index-b0kr8720.js → index-511hw14d.js} +47 -45
- package/dist/cli/{index-yg5xd4am.js → index-58cr1xg0.js} +172 -14
- package/dist/cli/{index-6xyt6d5m.js → index-71bqn1nn.js} +7 -7
- package/dist/cli/{index-ybvnf7rt.js → index-7v74n9a1.js} +12 -8
- package/dist/cli/{index-4cyc18bc.js → index-8a3aasag.js} +7 -7
- package/dist/cli/{index-my753e0g.js → index-8rrs1nc0.js} +3 -3
- package/dist/cli/{index-j3rfbs45.js → index-99zt998b.js} +2 -2
- package/dist/cli/{index-76skvj8z.js → index-9nmrw7ek.js} +3 -3
- package/dist/cli/{index-jmhn6ab5.js → index-ac8vdmgv.js} +2 -2
- package/dist/cli/{index-eyq1q1xn.js → index-bp476gwc.js} +2 -2
- package/dist/cli/{index-dtwj4hsk.js → index-c2k7q723.js} +2 -2
- package/dist/cli/{index-snx2vb1x.js → index-d083d1q7.js} +1 -1
- package/dist/cli/{index-n1ddn12j.js → index-dng8z8me.js} +1 -1
- package/dist/cli/{index-85vd6sxy.js → index-e8m8bb1r.js} +4 -4
- package/dist/cli/{index-3ckvw3j2.js → index-gwc7jahh.js} +1 -1
- package/dist/cli/{index-26dmsdx3.js → index-hg4qa0aq.js} +2704 -2208
- package/dist/cli/{index-zte3djpf.js → index-hxp5jgd8.js} +2 -2
- package/dist/cli/{index-0aj9tvms.js → index-jbm301bq.js} +43 -43
- package/dist/cli/{index-0veqvgny.js → index-jy0mgzjq.js} +1 -1
- package/dist/cli/{index-esakwcr3.js → index-kwfhr3mz.js} +1 -1
- package/dist/cli/{index-0ra0vs2p.js → index-m9j9varx.js} +3 -3
- package/dist/cli/{index-3fz5w2wb.js → index-md2180vx.js} +3 -3
- package/dist/cli/{index-bgydmx8k.js → index-n5k81wym.js} +7 -7
- package/dist/cli/{index-0je0mees.js → index-nq3zcrhm.js} +1 -1
- package/dist/cli/{index-xyg7des8.js → index-p5m71yph.js} +4 -4
- package/dist/cli/{index-p5d32v0x.js → index-pyv8vzkx.js} +6 -6
- package/dist/cli/{index-270zfq1f.js → index-q1x73nnd.js} +6 -6
- package/dist/cli/{index-dz15f98h.js → index-q8vfw61p.js} +1 -1
- package/dist/cli/{index-10wwrgj2.js → index-qnabg1wp.js} +6 -6
- package/dist/cli/{index-9n40q82y.js → index-qnst0jwc.js} +3 -3
- package/dist/cli/{index-tsg61z0r.js → index-r02aqt0a.js} +2 -2
- package/dist/cli/{index-4pbzepgw.js → index-rfvnq6wd.js} +10 -10
- package/dist/cli/{index-9c0vp5yj.js → index-sk1rva12.js} +2 -2
- package/dist/cli/{index-v4mremxw.js → index-tv9c3b3q.js} +4 -4
- package/dist/cli/{index-9y6yk1n0.js → index-vmevv6my.js} +1 -1
- package/dist/cli/{index-zdfzrwbk.js → index-vqtca3xv.js} +2 -2
- package/dist/cli/{index-34jat4f2.js → index-wfb6vrc2.js} +2 -2
- package/dist/cli/{index-3mzc5rqc.js → index-wr0n2w3z.js} +3 -3
- package/dist/cli/{index-b3ws03kp.js → index-x1z5d5kj.js} +1 -1
- package/dist/cli/{index-d7y3cafq.js → index-x25rhkmk.js} +6 -6
- package/dist/cli/{index-6ssraqaa.js → index-yss701b3.js} +5 -5
- package/dist/cli/{index-dengtwpp.js → index-yvv0my1a.js} +1 -1
- package/dist/cli/index.js +44 -44
- package/dist/cli/{knowledge-escalator-9wqe0m8j.js → knowledge-escalator-qcra58bx.js} +15 -15
- package/dist/cli/{knowledge-events-m5vdchaa.js → knowledge-events-9mnx1a3f.js} +13 -13
- package/dist/cli/{knowledge-link-t0ce3mw7.js → knowledge-link-2jsn9f6a.js} +5 -5
- package/dist/cli/{knowledge-store-ff4hy057.js → knowledge-store-fdneqf7z.js} +6 -6
- package/dist/cli/{knowledge-validator-erj5thtq.js → knowledge-validator-7nj987ga.js} +8 -8
- package/dist/cli/{mcp-d0hz5gfp.js → mcp-0g34wmz4.js} +1 -1
- package/dist/cli/{model-preflight-p34x0k25.js → model-preflight-g11ykgc0.js} +43 -43
- package/dist/cli/{pending-delegations-1j6dx1mf.js → pending-delegations-5vme18wx.js} +13 -13
- package/dist/cli/{pr-subscriptions-b1g41jce.js → pr-subscriptions-cbx5p838.js} +12 -12
- package/dist/cli/{pr-workflow-gate-zjwt050h.js → pr-workflow-gate-376gw6yj.js} +43 -43
- package/dist/cli/{runner-wq954cda.js → runner-vvd26z2z.js} +6 -6
- package/dist/cli/{scan-cursor-enz1rp21.js → scan-cursor-x3j5wvfm.js} +7 -7
- package/dist/cli/{schema-9r8sggpb.js → schema-d98zzrpn.js} +1 -1
- package/dist/cli/{scope-persistence-c5n4g9f0.js → scope-persistence-vkb8z4hc.js} +16 -16
- package/dist/cli/{server-8z7pd66d.js → server-25svy6cb.js} +45 -45
- package/dist/cli/{skill-generator-nezzfa0t.js → skill-generator-ktz33dt6.js} +17 -17
- package/dist/cli/{snapshot-coordination-init-2j06c7ck.js → snapshot-coordination-init-74x3psxc.js} +43 -43
- package/dist/cli/{speckit-checkoff-805cqmrf.js → speckit-checkoff-9t6cdn4a.js} +4 -4
- package/dist/cli/{telemetry-gena5typ.js → telemetry-cr8q16wk.js} +1 -1
- package/dist/cli/{workspace-snapshot-hzhz0rxw.js → workspace-snapshot-afqvh9bq.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-xpr0yv7h.js → worktree-collision-ownership-7a1n1f9j.js} +14 -14
- package/dist/cli/{worktree-isolation-z6ytes0j.js → worktree-isolation-8snw7w34.js} +43 -43
- package/dist/commands/attest.d.ts +10 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/registry.d.ts +8 -0
- package/dist/config/plan-schema.d.ts +44 -0
- package/dist/gate-evidence.d.ts +138 -1
- package/dist/host/v2/guidance.d.ts +7 -0
- package/dist/index.js +561 -557
- package/dist/tools/attest-task.d.ts +67 -0
- package/dist/tools/phase-complete.d.ts +12 -0
- package/dist/tools/save-plan.d.ts +16 -0
- package/dist/tools/update-task-status.d.ts +1 -1
- package/dist/workflow/task-terminal.d.ts +1 -0
- package/dist/workflow/workflow-wal-schema.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-dwvftpvm.js +0 -82
- package/dist/cli/guardrail-explain-rqqhmb44.js +0 -83
|
@@ -6,37 +6,37 @@ import {
|
|
|
6
6
|
WORKTREE_PROVISIONING_OWNER_LEASE_MS,
|
|
7
7
|
removeWorktreeProvisioningOwner,
|
|
8
8
|
scanWorktreeProvisioningOwnersForRecovery
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-r02aqt0a.js";
|
|
10
10
|
import {
|
|
11
11
|
scanDelegationFallbacksForRecovery,
|
|
12
12
|
scanDelegationsForRecovery
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-rfvnq6wd.js";
|
|
14
14
|
import {
|
|
15
15
|
scanWorktreeMergeFailuresForRecovery
|
|
16
16
|
} from "./index-v3bmwmqw.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
17
|
+
import"./index-x1z5d5kj.js";
|
|
18
|
+
import"./index-99zt998b.js";
|
|
19
|
+
import"./index-vmevv6my.js";
|
|
20
|
+
import"./index-d083d1q7.js";
|
|
21
21
|
import"./index-ry16d01s.js";
|
|
22
22
|
import"./index-rdm3px0g.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-wr0n2w3z.js";
|
|
24
24
|
import"./index-7pmbnjvj.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
25
|
+
import"./index-1tpz99db.js";
|
|
26
|
+
import"./index-n5k81wym.js";
|
|
27
27
|
import"./index-vzm6zre7.js";
|
|
28
28
|
import"./index-ae75rja9.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
29
|
+
import"./index-dng8z8me.js";
|
|
30
|
+
import"./index-ac8vdmgv.js";
|
|
31
|
+
import"./index-q8vfw61p.js";
|
|
32
32
|
import"./index-t7hmqgjy.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-c2k7q723.js";
|
|
34
34
|
import {
|
|
35
35
|
canonicalRootKeyFresh
|
|
36
36
|
} from "./index-te9hq2f4.js";
|
|
37
37
|
import"./index-ejhxgyvm.js";
|
|
38
38
|
import"./index-7g4c7s5r.js";
|
|
39
|
-
import"./index-
|
|
39
|
+
import"./index-q1x73nnd.js";
|
|
40
40
|
import"./index-sp2cxpaq.js";
|
|
41
41
|
import"./index-qbxk2rn6.js";
|
|
42
42
|
import"./index-zgwm4ryv.js";
|
|
@@ -25,79 +25,79 @@ import {
|
|
|
25
25
|
sanitizeWorktreeTaskId,
|
|
26
26
|
standardWorktreeByCallID,
|
|
27
27
|
standardWorktreeSerializationSessions
|
|
28
|
-
} from "./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
28
|
+
} from "./index-hg4qa0aq.js";
|
|
29
|
+
import"./index-nq3zcrhm.js";
|
|
30
|
+
import"./index-8rrs1nc0.js";
|
|
31
|
+
import"./index-md2180vx.js";
|
|
32
|
+
import"./index-yss701b3.js";
|
|
33
|
+
import"./index-0wg5q595.js";
|
|
32
34
|
import"./index-axqyjreb.js";
|
|
33
|
-
import"./index-0je0mees.js";
|
|
34
|
-
import"./index-hx2f3j9w.js";
|
|
35
35
|
import"./index-txdagbh7.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-qnabg1wp.js";
|
|
37
|
+
import"./index-vqtca3xv.js";
|
|
37
38
|
import"./index-rdec0y3z.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-4cyc18bc.js";
|
|
39
|
+
import"./index-qnst0jwc.js";
|
|
40
|
+
import"./index-71bqn1nn.js";
|
|
41
|
+
import"./index-e8m8bb1r.js";
|
|
42
|
+
import"./index-bp476gwc.js";
|
|
43
|
+
import"./index-8a3aasag.js";
|
|
44
44
|
import"./index-x5jwegqw.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
45
|
+
import"./index-r02aqt0a.js";
|
|
46
|
+
import"./index-rfvnq6wd.js";
|
|
47
47
|
import"./index-8mrentmw.js";
|
|
48
48
|
import"./index-pt7h91zc.js";
|
|
49
49
|
import"./index-q7sjgr1y.js";
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
50
|
+
import"./index-22atsy06.js";
|
|
51
|
+
import"./index-35tf03js.js";
|
|
52
52
|
import"./index-6b295cas.js";
|
|
53
53
|
import"./index-9nyqt3kb.js";
|
|
54
|
-
import"./index-
|
|
54
|
+
import"./index-9nmrw7ek.js";
|
|
55
55
|
import"./index-v3bmwmqw.js";
|
|
56
|
-
import"./index-
|
|
57
|
-
import"./index-
|
|
58
|
-
import"./index-
|
|
56
|
+
import"./index-sk1rva12.js";
|
|
57
|
+
import"./index-58cr1xg0.js";
|
|
58
|
+
import"./index-m9j9varx.js";
|
|
59
59
|
import"./index-spggmr30.js";
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
60
|
+
import"./index-1rfgzsaw.js";
|
|
61
|
+
import"./index-x25rhkmk.js";
|
|
62
62
|
import"./index-m9zzj4ee.js";
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
63
|
+
import"./index-x1z5d5kj.js";
|
|
64
|
+
import"./index-p5m71yph.js";
|
|
65
|
+
import"./index-jy0mgzjq.js";
|
|
66
66
|
import"./index-rtry5xyf.js";
|
|
67
67
|
import {
|
|
68
68
|
resolveWorktreeIsolationConfig
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-hxp5jgd8.js";
|
|
70
70
|
import"./index-g22dps7x.js";
|
|
71
71
|
import"./index-0725jpp7.js";
|
|
72
|
-
import"./index-
|
|
73
|
-
import"./index-
|
|
74
|
-
import"./index-
|
|
75
|
-
import"./index-
|
|
76
|
-
import"./index-
|
|
72
|
+
import"./index-pyv8vzkx.js";
|
|
73
|
+
import"./index-99zt998b.js";
|
|
74
|
+
import"./index-7v74n9a1.js";
|
|
75
|
+
import"./index-vmevv6my.js";
|
|
76
|
+
import"./index-d083d1q7.js";
|
|
77
77
|
import"./index-ry16d01s.js";
|
|
78
78
|
import"./index-rdm3px0g.js";
|
|
79
|
-
import"./index-
|
|
79
|
+
import"./index-wr0n2w3z.js";
|
|
80
80
|
import"./index-7pmbnjvj.js";
|
|
81
81
|
import"./index-9rwhas09.js";
|
|
82
|
-
import"./index-
|
|
83
|
-
import"./index-
|
|
82
|
+
import"./index-1tpz99db.js";
|
|
83
|
+
import"./index-n5k81wym.js";
|
|
84
84
|
import"./index-vzm6zre7.js";
|
|
85
85
|
import"./index-ae75rja9.js";
|
|
86
|
-
import"./index-
|
|
87
|
-
import"./index-
|
|
88
|
-
import"./index-
|
|
86
|
+
import"./index-dng8z8me.js";
|
|
87
|
+
import"./index-ac8vdmgv.js";
|
|
88
|
+
import"./index-q8vfw61p.js";
|
|
89
89
|
import"./index-t7hmqgjy.js";
|
|
90
|
-
import"./index-
|
|
90
|
+
import"./index-c2k7q723.js";
|
|
91
91
|
import"./index-te9hq2f4.js";
|
|
92
92
|
import"./index-ejhxgyvm.js";
|
|
93
93
|
import"./index-7g4c7s5r.js";
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
96
|
-
import"./index-
|
|
94
|
+
import"./index-q1x73nnd.js";
|
|
95
|
+
import"./index-3t46mez1.js";
|
|
96
|
+
import"./index-gwc7jahh.js";
|
|
97
97
|
import"./index-sp2cxpaq.js";
|
|
98
98
|
import"./index-qbxk2rn6.js";
|
|
99
99
|
import"./index-zgwm4ryv.js";
|
|
100
|
-
import"./index-
|
|
100
|
+
import"./index-yvv0my1a.js";
|
|
101
101
|
import"./index-xfzkq1k4.js";
|
|
102
102
|
import"./index-bk5tah7q.js";
|
|
103
103
|
import"./index-gknz3bv1.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/swarm attest <task_id>` (issue #3422): verify a git-external deliverable
|
|
3
|
+
* with the task's pinned read-only git anchors and record the durable
|
|
4
|
+
* external-evidence bundle that admits completion — the in-machine exit for
|
|
5
|
+
* tasks whose deliverable (commit/push, gh ops) can never produce a coder
|
|
6
|
+
* settlement. Human- or agent-invoked; everything fails closed exactly as
|
|
7
|
+
* the underlying executor does (undeclared tasks, non-read-only commands,
|
|
8
|
+
* mismatched anchors, oversized output all refuse).
|
|
9
|
+
*/
|
|
10
|
+
export declare function handleAttestCommand(directory: string, args: string[], sessionID?: string): Promise<string>;
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { handleAgentsCommand } from './agents';
|
|
|
8
8
|
export { handleAnalyzeCommand } from './analyze';
|
|
9
9
|
export { handleApproveWriteCommand } from './approve-write';
|
|
10
10
|
export { handleArchiveCommand } from './archive';
|
|
11
|
+
export { handleAttestCommand } from './attest';
|
|
11
12
|
export { handleAutoProceedCommand } from './auto-proceed';
|
|
12
13
|
export { handleBenchmarkCommand } from './benchmark';
|
|
13
14
|
export { handleBrainstormCommand } from './brainstorm';
|
|
@@ -1082,6 +1082,14 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1082
1082
|
readonly category: "utility";
|
|
1083
1083
|
readonly toolPolicy: "restricted";
|
|
1084
1084
|
};
|
|
1085
|
+
readonly attest: {
|
|
1086
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
1087
|
+
readonly description: "Verify a git-external deliverable with pinned anchors <task_id>";
|
|
1088
|
+
readonly details: "Runs the task's pinned read-only git evidence_anchors (issue #3422) inside the project root and records the durable external-evidence bundle that admits completion — the in-machine exit for tasks whose deliverable (commit/push, gh ops) can never produce a coder settlement. Fail-closed: the plan task must declare evidence_class external_git with 1..16 anchors (expect exact / expect_prefix non-empty), every anchor runs as a bounded no-shell argv spawn (stdin ignored, 10s per anchor, 30s total; output over the 4096-char evidence bound refuses the anchor rather than truncating it), and only positively-known read-only git subcommands/flags (rev-list, log, rev-parse, show, diff) are admitted. Undeclared tasks, mismatched anchors, and non-read-only commands refuse exactly as the completion gate does. Declaration changes revoke stale proofs (a fresh attest is then required). See docs/commands.md and docs/plan-durability.md.";
|
|
1089
|
+
readonly args: "<task_id>";
|
|
1090
|
+
readonly category: "utility";
|
|
1091
|
+
readonly toolPolicy: "agent";
|
|
1092
|
+
};
|
|
1085
1093
|
readonly recover: {
|
|
1086
1094
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
1087
1095
|
readonly description: "Recover wedged coder settlements [task_id] [--force]";
|
|
@@ -53,6 +53,23 @@ export declare const MigrationStatusSchema: z.ZodEnum<{
|
|
|
53
53
|
migration_failed: "migration_failed";
|
|
54
54
|
}>;
|
|
55
55
|
export type MigrationStatus = z.infer<typeof MigrationStatusSchema>;
|
|
56
|
+
/**
|
|
57
|
+
* External-evidence anchor (issue #3422): a pinned read-only git assertion a
|
|
58
|
+
* task declares so `/swarm attest` can verify a git-external deliverable
|
|
59
|
+
* (commit/push, gh ops) without a coder settlement.
|
|
60
|
+
*
|
|
61
|
+
* `expect` matches the trimmed stdout exactly; `expect_prefix` requires a
|
|
62
|
+
* NON-EMPTY prefix of it (an empty prefix would match everything and attest
|
|
63
|
+
* nothing). At least one of the two must be present per anchor; both bounds
|
|
64
|
+
* mirror the durable-evidence storage cap so an anchor is never accepted with
|
|
65
|
+
* output that cannot be persisted verbatim.
|
|
66
|
+
*/
|
|
67
|
+
export declare const ExternalEvidenceAnchorSchema: z.ZodObject<{
|
|
68
|
+
command: z.ZodString;
|
|
69
|
+
expect: z.ZodOptional<z.ZodString>;
|
|
70
|
+
expect_prefix: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export type ExternalEvidenceAnchor = z.infer<typeof ExternalEvidenceAnchorSchema>;
|
|
56
73
|
export declare const TaskSchema: z.ZodObject<{
|
|
57
74
|
id: z.ZodString;
|
|
58
75
|
phase: z.ZodNumber;
|
|
@@ -75,6 +92,15 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
75
92
|
evidence_path: z.ZodOptional<z.ZodString>;
|
|
76
93
|
blocked_reason: z.ZodOptional<z.ZodString>;
|
|
77
94
|
fr_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
|
+
evidence_class: z.ZodOptional<z.ZodEnum<{
|
|
96
|
+
coder_mutation: "coder_mutation";
|
|
97
|
+
external_git: "external_git";
|
|
98
|
+
}>>;
|
|
99
|
+
evidence_anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
+
command: z.ZodString;
|
|
101
|
+
expect: z.ZodOptional<z.ZodString>;
|
|
102
|
+
expect_prefix: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>>>;
|
|
78
104
|
}, z.core.$strip>;
|
|
79
105
|
export type Task = z.infer<typeof TaskSchema>;
|
|
80
106
|
export declare const PhaseSchema: z.ZodObject<{
|
|
@@ -110,6 +136,15 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
110
136
|
evidence_path: z.ZodOptional<z.ZodString>;
|
|
111
137
|
blocked_reason: z.ZodOptional<z.ZodString>;
|
|
112
138
|
fr_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
evidence_class: z.ZodOptional<z.ZodEnum<{
|
|
140
|
+
coder_mutation: "coder_mutation";
|
|
141
|
+
external_git: "external_git";
|
|
142
|
+
}>>;
|
|
143
|
+
evidence_anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
144
|
+
command: z.ZodString;
|
|
145
|
+
expect: z.ZodOptional<z.ZodString>;
|
|
146
|
+
expect_prefix: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>>>;
|
|
113
148
|
}, z.core.$strip>>>;
|
|
114
149
|
type: z.ZodOptional<z.ZodEnum<{
|
|
115
150
|
code: "code";
|
|
@@ -156,6 +191,15 @@ export declare const PlanSchema: z.ZodObject<{
|
|
|
156
191
|
evidence_path: z.ZodOptional<z.ZodString>;
|
|
157
192
|
blocked_reason: z.ZodOptional<z.ZodString>;
|
|
158
193
|
fr_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
194
|
+
evidence_class: z.ZodOptional<z.ZodEnum<{
|
|
195
|
+
coder_mutation: "coder_mutation";
|
|
196
|
+
external_git: "external_git";
|
|
197
|
+
}>>;
|
|
198
|
+
evidence_anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
199
|
+
command: z.ZodString;
|
|
200
|
+
expect: z.ZodOptional<z.ZodString>;
|
|
201
|
+
expect_prefix: z.ZodOptional<z.ZodString>;
|
|
202
|
+
}, z.core.$strip>>>;
|
|
159
203
|
}, z.core.$strip>>>;
|
|
160
204
|
type: z.ZodOptional<z.ZodEnum<{
|
|
161
205
|
code: "code";
|
package/dist/gate-evidence.d.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* authorization against a process with arbitrary same-user workspace access;
|
|
17
17
|
* that requires a protected trust root outside the project workspace.
|
|
18
18
|
*/
|
|
19
|
+
import { z } from 'zod';
|
|
19
20
|
import { appendTaskGateRequirementsReceiptIfNeeded } from './evidence/task-gate-requirements.js';
|
|
20
21
|
import type { ReviewRouteEvidence } from './review/routing-enforcement.js';
|
|
21
22
|
import type { TaskWorkflowState } from './state';
|
|
@@ -28,7 +29,7 @@ export interface GateEvidence {
|
|
|
28
29
|
agent: string;
|
|
29
30
|
}
|
|
30
31
|
export declare const TASK_WORKFLOW_SCHEMA_MARKER: "exact-task-v1";
|
|
31
|
-
declare const TASK_WORKFLOW_OUTCOMES: readonly ["none", "dispatch_attempted", "dispatch_no_mutation", "accepted_mutation", "accepted_mutation_failed", "stage_a_passed", "stage_a_failed", "stage_b_completed", "stage_b_failed", "gate_recorded", "task_completed", "task_blocked", "task_closed", "repair_idle"];
|
|
32
|
+
declare const TASK_WORKFLOW_OUTCOMES: readonly ["none", "dispatch_attempted", "dispatch_no_mutation", "accepted_mutation", "accepted_mutation_failed", "stage_a_passed", "stage_a_failed", "stage_b_completed", "stage_b_failed", "gate_recorded", "task_completed", "task_blocked", "task_closed", "repair_idle", "external_evidence_attested", "external_evidence_revoked"];
|
|
32
33
|
export type TaskWorkflowTransitionOutcome = (typeof TASK_WORKFLOW_OUTCOMES)[number];
|
|
33
34
|
export interface TaskWorkflowMetadata {
|
|
34
35
|
schema: typeof TASK_WORKFLOW_SCHEMA_MARKER;
|
|
@@ -95,6 +96,17 @@ export interface TaskWorkflowMetadata {
|
|
|
95
96
|
transitionId: string;
|
|
96
97
|
declaredFiles: string[];
|
|
97
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* Pinned external evidence bundle (issue #3422): the read-only git proof
|
|
101
|
+
* for a task declared `evidence_class: 'external_git'`, attested while the
|
|
102
|
+
* workflow is idle and preserved through the terminal task_completed write
|
|
103
|
+
* so a duplicate completion can re-validate the same current proof. Cleared
|
|
104
|
+
* by a new coder attribution window (dispatch_attempted /
|
|
105
|
+
* dispatch_no_mutation / accepted_mutation), by repair_idle's fresh
|
|
106
|
+
* generation, and by the declaration-change revoke; terminal states are
|
|
107
|
+
* never revoked (06-critic-review.md R4F1).
|
|
108
|
+
*/
|
|
109
|
+
externalEvidence?: ExternalEvidenceBundle;
|
|
98
110
|
}
|
|
99
111
|
export interface TaskWorkflowSnapshot extends TaskWorkflowMetadata {
|
|
100
112
|
authoritative: boolean;
|
|
@@ -237,6 +249,13 @@ export type TaskWorkflowTransitionEvent = {
|
|
|
237
249
|
qaExempt?: boolean;
|
|
238
250
|
/** Durable, non-forced completion of a trusted empty-scope settlement. */
|
|
239
251
|
readOnlyNoMutation?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Issue #3422: the caller proved the external bundle current via
|
|
254
|
+
* externalProofCurrent / isExternalEvidenceInitialCompletionEligible
|
|
255
|
+
* before forwarding the terminal event; the reducer still requires the
|
|
256
|
+
* durable bundle to exist and fully match before admitting it.
|
|
257
|
+
*/
|
|
258
|
+
externalEvidence?: boolean;
|
|
240
259
|
expectedGeneration: number;
|
|
241
260
|
transitionId?: string;
|
|
242
261
|
} | {
|
|
@@ -251,6 +270,27 @@ export type TaskWorkflowTransitionEvent = {
|
|
|
251
270
|
type: 'repair_idle';
|
|
252
271
|
expectedGeneration: number;
|
|
253
272
|
transitionId?: string;
|
|
273
|
+
} | {
|
|
274
|
+
/**
|
|
275
|
+
* Issue #3422: pin the attest producer's validated read-only git bundle
|
|
276
|
+
* as durable workflow metadata. State-preserving (the gate_recorded
|
|
277
|
+
* precedent) and admitted from idle only — an external task never
|
|
278
|
+
* enters the coder QA lifecycle.
|
|
279
|
+
*/
|
|
280
|
+
type: 'external_evidence_attested';
|
|
281
|
+
bundle: ExternalEvidenceBundle;
|
|
282
|
+
expectedGeneration: number;
|
|
283
|
+
transitionId?: string;
|
|
284
|
+
} | {
|
|
285
|
+
/**
|
|
286
|
+
* Issue #3422: the plan declaration changed under a nonterminal task, so
|
|
287
|
+
* the pinned bundle no longer describes the declared work. Terminal
|
|
288
|
+
* states are never revoked (06-critic-review.md R4F1).
|
|
289
|
+
*/
|
|
290
|
+
type: 'external_evidence_revoked';
|
|
291
|
+
reason: 'declaration_changed';
|
|
292
|
+
expectedGeneration: number;
|
|
293
|
+
transitionId?: string;
|
|
254
294
|
};
|
|
255
295
|
export interface TaskEvidenceTransaction {
|
|
256
296
|
taskId: string;
|
|
@@ -277,6 +317,29 @@ export interface TaskEvidenceTransaction {
|
|
|
277
317
|
*/
|
|
278
318
|
save?(nextEvidence: TaskEvidence): Promise<TaskEvidence>;
|
|
279
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* Durable external-evidence bundle (issue #3422): the pinned read-only git
|
|
322
|
+
* proof for a task whose deliverable is verified outside the coder QA
|
|
323
|
+
* lifecycle. The attest producer validates the bundle (digest recompute, all
|
|
324
|
+
* anchors matched, bounds) before publishing it through the
|
|
325
|
+
* `external_evidence_attested` transition; this schema is the persistence
|
|
326
|
+
* boundary that refuses anything malformed after the fact.
|
|
327
|
+
*/
|
|
328
|
+
export declare const ExternalEvidenceBundleSchema: z.ZodObject<{
|
|
329
|
+
class: z.ZodLiteral<"external_git">;
|
|
330
|
+
transitionId: z.ZodString;
|
|
331
|
+
declarationDigest: z.ZodString;
|
|
332
|
+
anchors: z.ZodArray<z.ZodObject<{
|
|
333
|
+
command: z.ZodString;
|
|
334
|
+
expect: z.ZodOptional<z.ZodString>;
|
|
335
|
+
expect_prefix: z.ZodOptional<z.ZodString>;
|
|
336
|
+
matched: z.ZodBoolean;
|
|
337
|
+
exit_code: z.ZodNumber;
|
|
338
|
+
stdout: z.ZodString;
|
|
339
|
+
}, z.core.$strip>>;
|
|
340
|
+
attestedAt: z.ZodString;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
export type ExternalEvidenceBundle = z.infer<typeof ExternalEvidenceBundleSchema>;
|
|
280
343
|
export declare function parseTaskEvidence(raw: string, expectedTaskId: string): TaskEvidence;
|
|
281
344
|
export declare const DEFAULT_REQUIRED_GATES: string[];
|
|
282
345
|
export interface GateDerivationContext {
|
|
@@ -308,6 +371,80 @@ export declare function deriveApplicableGateSet(evidence: TaskEvidence | null |
|
|
|
308
371
|
export declare function isReadOnlyNoMutationEligible(evidence: TaskEvidence | null | undefined, options?: {
|
|
309
372
|
currentDeclaredFiles?: readonly string[] | null;
|
|
310
373
|
}): boolean;
|
|
374
|
+
/**
|
|
375
|
+
* Inputs to the external-evidence declaration digest (issue #3422,
|
|
376
|
+
* 05-fix-plan.md §3): the exact task declaration plus the plan identity and
|
|
377
|
+
* evidence generation the digest binds.
|
|
378
|
+
*/
|
|
379
|
+
export interface ExternalDeclarationInput {
|
|
380
|
+
taskId: string;
|
|
381
|
+
evidence_class: 'external_git';
|
|
382
|
+
evidence_anchors: ReadonlyArray<{
|
|
383
|
+
command: string;
|
|
384
|
+
expect?: string;
|
|
385
|
+
expect_prefix?: string;
|
|
386
|
+
}>;
|
|
387
|
+
plan_title: string;
|
|
388
|
+
plan_swarm: string;
|
|
389
|
+
generation: number;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Compute the declaration digest bound into an external evidence bundle:
|
|
393
|
+
* sha256 hex over the canonical JSON of `{taskId, evidence_class,
|
|
394
|
+
* evidence_anchors (ordered definitions only), plan_title, plan_swarm,
|
|
395
|
+
* generation}`.
|
|
396
|
+
*
|
|
397
|
+
* Deliberately CURSOR-FREE (issue #3422, 05-fix-plan.md §3): the whole-plan
|
|
398
|
+
* structure hash includes `current_phase`, which advances during the terminal
|
|
399
|
+
* plan write. Binding the digest to it would self-invalidate the proof in
|
|
400
|
+
* the crash window after plan.json advances and before the evidence
|
|
401
|
+
* transaction applies. Every revalidation recomputes this digest from the
|
|
402
|
+
* CURRENT plan task and CURRENT generation instead — no whole-plan hash is
|
|
403
|
+
* ever consulted.
|
|
404
|
+
*/
|
|
405
|
+
export declare function computeExternalDeclarationDigest(input: ExternalDeclarationInput): string;
|
|
406
|
+
/** Plan identity inputs to the external declaration digest (issue #3422). */
|
|
407
|
+
export interface ExternalPlanIdentity {
|
|
408
|
+
title: string;
|
|
409
|
+
swarm: string;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* The subset of a plan task the external-evidence predicates consult: the
|
|
413
|
+
* declaration fields save_plan validated (issue #3422).
|
|
414
|
+
*/
|
|
415
|
+
export interface ExternalPlanTaskRef {
|
|
416
|
+
id: string;
|
|
417
|
+
evidence_class?: string;
|
|
418
|
+
evidence_anchors?: ReadonlyArray<{
|
|
419
|
+
command: string;
|
|
420
|
+
expect?: string;
|
|
421
|
+
expect_prefix?: string;
|
|
422
|
+
}> | undefined;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Proof-currency predicate (issue #3422, 05-fix-plan.md §4c / R3F1): true iff
|
|
426
|
+
* the task declares `external_git`, a bundle exists with at least one anchor,
|
|
427
|
+
* every anchor matched, and the bundle's declarationDigest equals the digest
|
|
428
|
+
* recomputed from the CURRENT plan declaration + CURRENT generation. There is
|
|
429
|
+
* NO workflow-state condition — this is the "proof is current" predicate
|
|
430
|
+
* usable in ANY state (mirroring isNoMutationSettlementMetadata's
|
|
431
|
+
* idle || complete acceptance), so duplicate completion, committed-WAL
|
|
432
|
+
* idempotent replay, terminal recovery, and check_gate_status on a completed
|
|
433
|
+
* task all re-validate the same way.
|
|
434
|
+
*/
|
|
435
|
+
export declare function externalProofCurrent(plan: ExternalPlanIdentity, planTask: ExternalPlanTaskRef, evidence: TaskEvidence | null | undefined): boolean;
|
|
436
|
+
/**
|
|
437
|
+
* Initial-completion eligibility (issue #3422, 05-fix-plan.md §4c / R3F1):
|
|
438
|
+
* `externalProofCurrent` AND the authoritative workflow state is exactly
|
|
439
|
+
* `idle` (blocked removed — a blocked task reopens via the audited
|
|
440
|
+
* blocked → in_progress plan transition first). This is the R3F1 split's
|
|
441
|
+
* other half: the FIRST completion requires idle, while DUPLICATE
|
|
442
|
+
* completions and terminal recovery use `externalProofCurrent` and accept
|
|
443
|
+
* `complete`. Consults the authoritative snapshot (the
|
|
444
|
+
* isNoMutationSettlementMetadata pattern) so non-authoritative legacy
|
|
445
|
+
* metadata never admits an external completion.
|
|
446
|
+
*/
|
|
447
|
+
export declare function isExternalEvidenceInitialCompletionEligible(plan: ExternalPlanIdentity, planTask: ExternalPlanTaskRef, evidence: TaskEvidence | null | undefined): boolean;
|
|
311
448
|
export declare function reduceTaskWorkflowSnapshot(current: TaskWorkflowSnapshot, event: TaskWorkflowTransitionEvent, context: {
|
|
312
449
|
requiredGates: string[];
|
|
313
450
|
gates: Record<string, GateEvidence>;
|
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
* `event.agent` is an Agent.Info-shaped object on v2; it is normalized to a
|
|
19
19
|
* name before any v1 agent comparison (frozen C4 header requirement).
|
|
20
20
|
*
|
|
21
|
+
* View -> original pairing: every v1 view is stamped `info.swarmV2Origin` (its
|
|
22
|
+
* index in the original `event.messages`). Kept views are paired by object
|
|
23
|
+
* identity, then `id`, then that stamp (role-checked for non-carriers); there
|
|
24
|
+
* is no positional fallback. Views the chain INSERTS carry no stamp and are
|
|
25
|
+
* dropped — on v2, id-less chain inserts (full-auto verdict/continuation
|
|
26
|
+
* messages) are therefore not delivered.
|
|
27
|
+
*
|
|
21
28
|
* Part-kind mapping (R10): text parts map 1:1; non-text content kinds
|
|
22
29
|
* (media, tool-call, tool-result, reasoning, step-start, compaction, effort)
|
|
23
30
|
* are preserved untouched on their message — the v1 chain's steps only read
|