opencode-swarm 7.200.0 → 7.200.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 → attest-task-s9cpm1pa.js} +42 -42
- package/dist/cli/{auto-checkpoint-dqjk82s7.js → auto-checkpoint-bhtc5gjf.js} +7 -7
- package/dist/cli/{checkpoint-2ahps2sp.js → checkpoint-1jmfejsh.js} +17 -15
- package/dist/cli/{coder-settlement-1dk37pa9.js → coder-settlement-qabkaq79.js} +10 -10
- package/dist/cli/{config-doctor-73rctg85.js → config-doctor-q4805y29.js} +13 -13
- package/dist/cli/{core-y5mfws8v.js → core-jtmr767v.js} +3 -3
- package/dist/cli/{curation-policy-43gq6t0y.js → curation-policy-fth5n93x.js} +4 -4
- package/dist/cli/{curator-m278hyrq.js → curator-4tqbp1re.js} +41 -41
- package/dist/cli/{curator-drift-k7j9rcgp.js → curator-drift-681mc3a2.js} +8 -8
- package/dist/cli/curator-llm-factory-46bzwbzr.js +82 -0
- package/dist/cli/{doctor-knowledge-receipt-phase-id-1m7pkzvt.js → doctor-knowledge-receipt-phase-id-h16qsh6e.js} +7 -7
- package/dist/cli/{evidence-summary-service-19k8x1g9.js → evidence-summary-service-qr8kf99s.js} +17 -17
- package/dist/cli/{gate-evidence-hche0hf8.js → gate-evidence-phq4rs28.js} +5 -5
- package/dist/cli/guardrail-explain-q2eqawnk.js +83 -0
- package/dist/cli/{guardrail-log-tvbgnxns.js → guardrail-log-jk30vszs.js} +6 -6
- package/dist/cli/{guardrail-reset-v8kvh9cn.js → guardrail-reset-0sfceecs.js} +41 -41
- package/dist/cli/{hive-promoter-bqfa763z.js → hive-promoter-8v9vcd75.js} +41 -41
- package/dist/cli/{index-kwfhr3mz.js → index-048p7deh.js} +1 -1
- package/dist/cli/{index-wfb6vrc2.js → index-0jmt8y9r.js} +2 -2
- package/dist/cli/{index-jbm301bq.js → index-1feqa2vz.js} +41 -41
- package/dist/cli/{index-bp476gwc.js → index-1v277wxc.js} +2 -2
- package/dist/cli/{index-yss701b3.js → index-43scxm6a.js} +4 -4
- package/dist/cli/{index-9nmrw7ek.js → index-4cw3w8qm.js} +3 -3
- package/dist/cli/{index-vqtca3xv.js → index-4ts6jpmj.js} +2 -2
- package/dist/cli/{index-tv9c3b3q.js → index-56w2vy52.js} +3 -3
- package/dist/cli/{index-0wg5q595.js → index-5snwc3dz.js} +1 -1
- package/dist/cli/{index-m9j9varx.js → index-ab1k780s.js} +3 -3
- package/dist/cli/{index-r02aqt0a.js → index-b4kdms7x.js} +2 -2
- package/dist/cli/{index-7v74n9a1.js → index-bncex5hw.js} +3 -3
- package/dist/cli/{index-qnabg1wp.js → index-bt2h69a2.js} +6 -6
- package/dist/cli/{index-md2180vx.js → index-bw6q2v41.js} +3 -3
- package/dist/cli/{index-q1x73nnd.js → index-epzadpmm.js} +1 -1
- package/dist/cli/{index-71bqn1nn.js → index-evf5t4ba.js} +7 -7
- package/dist/cli/{index-511hw14d.js → index-f50e1pn3.js} +43 -43
- package/dist/cli/{index-dng8z8me.js → index-g57p8p1k.js} +1 -1
- package/dist/cli/{index-p5m71yph.js → index-gpr3j0w1.js} +4 -4
- package/dist/cli/{index-hxp5jgd8.js → index-gss7ch5k.js} +2 -2
- package/dist/cli/{index-rfvnq6wd.js → index-h29ckdg5.js} +8 -8
- package/dist/cli/{index-qnst0jwc.js → index-kezh6nhq.js} +3 -3
- package/dist/cli/{index-e8m8bb1r.js → index-mrq61h10.js} +4 -4
- package/dist/cli/{index-vmevv6my.js → index-na6ph1fp.js} +1 -1
- package/dist/cli/{index-n5k81wym.js → index-nbg19t1b.js} +7 -7
- package/dist/cli/{index-8rrs1nc0.js → index-ngzt2xmr.js} +2 -2
- package/dist/cli/{index-wr0n2w3z.js → index-nzfq1ms2.js} +1 -1
- package/dist/cli/{index-sk1rva12.js → index-pktvge7a.js} +2 -2
- package/dist/cli/{index-gwc7jahh.js → index-pvpeggb5.js} +1 -1
- package/dist/cli/{index-58cr1xg0.js → index-rav29yb2.js} +3 -3
- package/dist/cli/{index-nq3zcrhm.js → index-s3w41p1x.js} +1 -1
- package/dist/cli/{index-99zt998b.js → index-s9y49avf.js} +1 -1
- package/dist/cli/{index-22atsy06.js → index-sv514p10.js} +918 -154
- package/dist/cli/{index-ac8vdmgv.js → index-traz987v.js} +1 -1
- package/dist/cli/{index-1rfgzsaw.js → index-trvn0kg0.js} +4 -4
- package/dist/cli/{index-jy0mgzjq.js → index-v1h70r3y.js} +1 -1
- package/dist/cli/{index-d083d1q7.js → index-ves1rtqt.js} +1 -1
- package/dist/cli/{index-x25rhkmk.js → index-vrvcn7k1.js} +4 -4
- package/dist/cli/{index-8a3aasag.js → index-wgf1780e.js} +5 -5
- package/dist/cli/{index-pyv8vzkx.js → index-xfkzwc4p.js} +5 -5
- package/dist/cli/{index-x1z5d5kj.js → index-xyvsdn07.js} +1 -1
- package/dist/cli/{index-hg4qa0aq.js → index-y7khxj1g.js} +1940 -2357
- package/dist/cli/{index-yvv0my1a.js → index-yctvn9z9.js} +5 -3
- package/dist/cli/{index-35tf03js.js → index-yk3b7ywa.js} +10 -10
- package/dist/cli/{index-1tpz99db.js → index-ypxq0x7r.js} +1 -1
- package/dist/cli/index.js +42 -42
- package/dist/cli/{knowledge-escalator-qcra58bx.js → knowledge-escalator-53n7wa7s.js} +12 -12
- package/dist/cli/{knowledge-events-9mnx1a3f.js → knowledge-events-80fw8pf6.js} +10 -10
- package/dist/cli/{knowledge-link-2jsn9f6a.js → knowledge-link-wfhsfyn2.js} +3 -3
- package/dist/cli/{knowledge-store-fdneqf7z.js → knowledge-store-rh1v0509.js} +4 -4
- package/dist/cli/{knowledge-validator-7nj987ga.js → knowledge-validator-c3926fw5.js} +6 -6
- package/dist/cli/{mcp-0g34wmz4.js → mcp-r43tvhzy.js} +1 -1
- package/dist/cli/{model-preflight-g11ykgc0.js → model-preflight-vx9px5ac.js} +41 -41
- package/dist/cli/{pending-delegations-5vme18wx.js → pending-delegations-0vbkv5d2.js} +11 -11
- package/dist/cli/{pr-subscriptions-cbx5p838.js → pr-subscriptions-a6cm44fs.js} +10 -10
- package/dist/cli/{pr-workflow-gate-376gw6yj.js → pr-workflow-gate-yvgpmywz.js} +41 -41
- package/dist/cli/{runner-vvd26z2z.js → runner-s1a73y5h.js} +4 -4
- package/dist/cli/{scan-cursor-x3j5wvfm.js → scan-cursor-pk4h80c1.js} +5 -5
- package/dist/cli/{schema-d98zzrpn.js → schema-5rxfybx2.js} +1 -1
- package/dist/cli/{scope-persistence-vkb8z4hc.js → scope-persistence-qzs1f91v.js} +13 -13
- package/dist/cli/{server-25svy6cb.js → server-gdewbeyb.js} +41 -41
- package/dist/cli/{skill-generator-ktz33dt6.js → skill-generator-xh2w2pvq.js} +14 -14
- package/dist/cli/{snapshot-coordination-init-74x3psxc.js → snapshot-coordination-init-jn2rh2s8.js} +41 -41
- package/dist/cli/{speckit-checkoff-9t6cdn4a.js → speckit-checkoff-98zsw8c4.js} +4 -4
- package/dist/cli/{workspace-snapshot-afqvh9bq.js → workspace-snapshot-93gzfac2.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-7a1n1f9j.js → worktree-collision-ownership-2xqxqp0x.js} +12 -12
- package/dist/cli/{worktree-isolation-8snw7w34.js → worktree-isolation-rxpwxvw3.js} +41 -41
- package/dist/commands/close/internals.d.ts +1 -1
- package/dist/commands/close/orchestrator.d.ts +7 -0
- package/dist/commands/destructive-purge.d.ts +15 -0
- package/dist/commands/git-status-read.d.ts +23 -0
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/rollback-gate.d.ts +77 -10
- package/dist/config/schema.d.ts +2 -0
- package/dist/full-auto/code-mode-program.d.ts +31 -0
- package/dist/full-auto/critic-tools.d.ts +18 -0
- package/dist/full-auto/policy.d.ts +17 -0
- package/dist/git/branch.d.ts +22 -0
- package/dist/hooks/code-mode-wrapper.d.ts +28 -0
- package/dist/hooks/full-auto-intercept.d.ts +5 -0
- package/dist/hooks/full-auto-permission.d.ts +25 -0
- package/dist/hooks/pr-workflow-gate.d.ts +21 -1
- package/dist/host/v2/hook-budget.d.ts +37 -0
- package/dist/host/v2/hooks.d.ts +9 -0
- package/dist/host/v2/setup.d.ts +14 -0
- package/dist/index.js +77 -70
- package/dist/session/snapshot-coordination-init.d.ts +34 -0
- package/dist/session/snapshot-writer.d.ts +5 -1
- package/dist/tools/checkpoint.d.ts +17 -0
- package/opencode-swarm.schema.json +8 -0
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-rke0964p.js +0 -82
- package/dist/cli/guardrail-explain-jg5png4a.js +0 -83
|
@@ -6,28 +6,28 @@ import {
|
|
|
6
6
|
WORKTREE_PROVISIONING_OWNER_LEASE_MS,
|
|
7
7
|
removeWorktreeProvisioningOwner,
|
|
8
8
|
scanWorktreeProvisioningOwnersForRecovery
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-b4kdms7x.js";
|
|
10
10
|
import {
|
|
11
11
|
scanDelegationFallbacksForRecovery,
|
|
12
12
|
scanDelegationsForRecovery
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-h29ckdg5.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-xyvsdn07.js";
|
|
18
|
+
import"./index-s9y49avf.js";
|
|
19
|
+
import"./index-na6ph1fp.js";
|
|
20
|
+
import"./index-ves1rtqt.js";
|
|
21
21
|
import"./index-ry16d01s.js";
|
|
22
22
|
import"./index-rdm3px0g.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-nzfq1ms2.js";
|
|
24
24
|
import"./index-7pmbnjvj.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
25
|
+
import"./index-ypxq0x7r.js";
|
|
26
|
+
import"./index-nbg19t1b.js";
|
|
27
27
|
import"./index-vzm6zre7.js";
|
|
28
28
|
import"./index-ae75rja9.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-g57p8p1k.js";
|
|
30
|
+
import"./index-traz987v.js";
|
|
31
31
|
import"./index-q8vfw61p.js";
|
|
32
32
|
import"./index-t7hmqgjy.js";
|
|
33
33
|
import"./index-c2k7q723.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./index-te9hq2f4.js";
|
|
37
37
|
import"./index-ejhxgyvm.js";
|
|
38
38
|
import"./index-7g4c7s5r.js";
|
|
39
|
-
import"./index-
|
|
39
|
+
import"./index-epzadpmm.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-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
28
|
+
} from "./index-y7khxj1g.js";
|
|
29
|
+
import"./index-s3w41p1x.js";
|
|
30
|
+
import"./index-ngzt2xmr.js";
|
|
31
|
+
import"./index-bw6q2v41.js";
|
|
32
|
+
import"./index-43scxm6a.js";
|
|
33
|
+
import"./index-5snwc3dz.js";
|
|
34
34
|
import"./index-axqyjreb.js";
|
|
35
35
|
import"./index-txdagbh7.js";
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
36
|
+
import"./index-bt2h69a2.js";
|
|
37
|
+
import"./index-4ts6jpmj.js";
|
|
38
38
|
import"./index-rdec0y3z.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
39
|
+
import"./index-kezh6nhq.js";
|
|
40
|
+
import"./index-evf5t4ba.js";
|
|
41
|
+
import"./index-mrq61h10.js";
|
|
42
|
+
import"./index-1v277wxc.js";
|
|
43
|
+
import"./index-wgf1780e.js";
|
|
44
44
|
import"./index-x5jwegqw.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-8mrentmw.js";
|
|
45
|
+
import"./index-b4kdms7x.js";
|
|
46
|
+
import"./index-h29ckdg5.js";
|
|
48
47
|
import"./index-pt7h91zc.js";
|
|
49
48
|
import"./index-q7sjgr1y.js";
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
49
|
+
import"./index-sv514p10.js";
|
|
50
|
+
import"./index-yk3b7ywa.js";
|
|
52
51
|
import"./index-6b295cas.js";
|
|
53
52
|
import"./index-9nyqt3kb.js";
|
|
54
|
-
import"./index-
|
|
53
|
+
import"./index-4cw3w8qm.js";
|
|
55
54
|
import"./index-v3bmwmqw.js";
|
|
56
|
-
import"./index-
|
|
57
|
-
import"./index-
|
|
58
|
-
import"./index-
|
|
55
|
+
import"./index-8mrentmw.js";
|
|
56
|
+
import"./index-pktvge7a.js";
|
|
57
|
+
import"./index-rav29yb2.js";
|
|
58
|
+
import"./index-ab1k780s.js";
|
|
59
59
|
import"./index-spggmr30.js";
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
60
|
+
import"./index-trvn0kg0.js";
|
|
61
|
+
import"./index-vrvcn7k1.js";
|
|
62
62
|
import"./index-m9zzj4ee.js";
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
63
|
+
import"./index-xyvsdn07.js";
|
|
64
|
+
import"./index-gpr3j0w1.js";
|
|
65
|
+
import"./index-v1h70r3y.js";
|
|
66
66
|
import"./index-rtry5xyf.js";
|
|
67
67
|
import {
|
|
68
68
|
resolveWorktreeIsolationConfig
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-gss7ch5k.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-xfkzwc4p.js";
|
|
73
|
+
import"./index-s9y49avf.js";
|
|
74
|
+
import"./index-bncex5hw.js";
|
|
75
|
+
import"./index-na6ph1fp.js";
|
|
76
|
+
import"./index-ves1rtqt.js";
|
|
77
77
|
import"./index-ry16d01s.js";
|
|
78
78
|
import"./index-rdm3px0g.js";
|
|
79
|
-
import"./index-
|
|
79
|
+
import"./index-nzfq1ms2.js";
|
|
80
80
|
import"./index-7pmbnjvj.js";
|
|
81
81
|
import"./index-9rwhas09.js";
|
|
82
|
-
import"./index-
|
|
83
|
-
import"./index-
|
|
82
|
+
import"./index-ypxq0x7r.js";
|
|
83
|
+
import"./index-nbg19t1b.js";
|
|
84
84
|
import"./index-vzm6zre7.js";
|
|
85
85
|
import"./index-ae75rja9.js";
|
|
86
|
-
import"./index-
|
|
87
|
-
import"./index-
|
|
86
|
+
import"./index-g57p8p1k.js";
|
|
87
|
+
import"./index-traz987v.js";
|
|
88
88
|
import"./index-q8vfw61p.js";
|
|
89
89
|
import"./index-t7hmqgjy.js";
|
|
90
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-
|
|
94
|
+
import"./index-epzadpmm.js";
|
|
95
95
|
import"./index-3t46mez1.js";
|
|
96
|
-
import"./index-
|
|
96
|
+
import"./index-pvpeggb5.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-yctvn9z9.js";
|
|
101
101
|
import"./index-xfzkq1k4.js";
|
|
102
102
|
import"./index-bk5tah7q.js";
|
|
103
103
|
import"./index-gknz3bv1.js";
|
|
@@ -26,7 +26,7 @@ export declare const _internals: {
|
|
|
26
26
|
CLOSE_REFLECTION_TIMEOUT_MS: number;
|
|
27
27
|
detectFullAuto: typeof import("./orchestrator.js").detectFullAuto;
|
|
28
28
|
guaranteeAllPlansComplete: typeof import("./finalize-stage.js").guaranteeAllPlansComplete;
|
|
29
|
-
getGitRepositoryStatus: typeof import("../../git
|
|
29
|
+
getGitRepositoryStatus: typeof import("../../commands/git-status-read.js").readGitRepositoryStatusDetailedAsync;
|
|
30
30
|
resetToMainAfterMerge: (cwd: string, options?: import("./align-stage.js").GuardedResetToMainOptions) => Promise<import("./align-stage.js").GuardedResetToMainResult>;
|
|
31
31
|
resetToRemoteBranch: typeof import("../../git/branch.js").resetToRemoteBranch;
|
|
32
32
|
copyDirRecursive: typeof import("./fs-helpers.js").copyDirRecursive;
|
|
@@ -36,6 +36,13 @@ export interface ClosePurgeGate {
|
|
|
36
36
|
status: number | null;
|
|
37
37
|
stderrTail: string;
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* #3434: porcelain records whose path normalized outside the project
|
|
41
|
+
* root — excluded from `dirtyPaths`/`candidates` (and therefore from the
|
|
42
|
+
* confirm-token digest) and surfaced as a bounded warning instead of
|
|
43
|
+
* being joined into the scope unvalidated.
|
|
44
|
+
*/
|
|
45
|
+
excludedOutOfRoot: string[];
|
|
39
46
|
}
|
|
40
47
|
/** Test seam for the #2508 gate (simulate git-status read failures). The
|
|
41
48
|
* default routes through the #3317 async reader; legacy sync stubs returning
|
|
@@ -84,6 +84,18 @@ export declare const GIT_STATUS_ARGS: readonly ["--no-optional-locks", "status",
|
|
|
84
84
|
* `src/commands/rollback-gate.ts` exports a same-named parser for
|
|
85
85
|
* NUL-terminated `--porcelain -z` output (J1/#2946); the two are deliberately
|
|
86
86
|
* not consolidated in this PR.
|
|
87
|
+
*
|
|
88
|
+
* #3434: `../`-bearing (or absolute) records are excluded from the dirty
|
|
89
|
+
* set and recorded in `excludedOutOfRoot` — the legacy `string[]` export
|
|
90
|
+
* below returns only the in-root paths. The containment predicate itself is
|
|
91
|
+
* the rollback-gate module's `isOutOfRootRelativePath` (single shared
|
|
92
|
+
* definition; the parsers stay separate by design).
|
|
93
|
+
*/
|
|
94
|
+
export declare function parseTrackedDirtyPathsWithExclusions(statusOutput: string): import('./rollback-gate.js').TrackedDirtyParseResult;
|
|
95
|
+
/**
|
|
96
|
+
* Legacy `string[]` view of the newline-form parser (in-root paths only) —
|
|
97
|
+
* the export existing suites pin. New consumers that need the exclusion
|
|
98
|
+
* diagnostic use `parseTrackedDirtyPathsWithExclusions`.
|
|
87
99
|
*/
|
|
88
100
|
export declare function parseTrackedDirtyPaths(statusOutput: string): string[];
|
|
89
101
|
/**
|
|
@@ -94,10 +106,13 @@ export declare function parseTrackedDirtyPaths(statusOutput: string): string[];
|
|
|
94
106
|
* helper, so its existing #2508 fail-closed tests keep their injection point.
|
|
95
107
|
* #3317: async — the read is bounded and killable, and legacy sync stubs
|
|
96
108
|
* keep working (awaiting a plain value is a no-op).
|
|
109
|
+
* #3434: the ok arm carries `excludedOutOfRoot` so the #2953 re-check
|
|
110
|
+
* compares against the SAME filtered set the operator confirmed.
|
|
97
111
|
*/
|
|
98
112
|
export declare function readTrackedDirtyPaths(directory: string): Promise<{
|
|
99
113
|
ok: true;
|
|
100
114
|
dirtyPaths: string[];
|
|
115
|
+
excludedOutOfRoot: string[];
|
|
101
116
|
} | {
|
|
102
117
|
ok: false;
|
|
103
118
|
/** Structured cause when the reader could tell (absent for legacy `null` stubs). */
|
|
@@ -74,3 +74,26 @@ export declare function readGitStatusAsync(args: readonly string[], cwd: string,
|
|
|
74
74
|
* non-blocking preview, with no transient-retry chain.
|
|
75
75
|
*/
|
|
76
76
|
export declare function readGitRepositoryStatusAsync(cwd: string): Promise<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* Detailed twin of `readGitRepositoryStatusAsync` (issue #3427): the same
|
|
79
|
+
* single-attempt `rev-parse --git-dir` read, mapped to the SAME
|
|
80
|
+
* `GitRepositoryStatus` vocabulary the sync `branch.getGitRepositoryStatus`
|
|
81
|
+
* produces — `{isRepo:true}` / `not_git_repo` / `git_unavailable` /
|
|
82
|
+
* `git_error` with a message — so the finalize align stage can move off the
|
|
83
|
+
* blocking sync probe without losing its reason-specific skip diagnostics.
|
|
84
|
+
*
|
|
85
|
+
* Classification parity with `src/git/branch.ts`:
|
|
86
|
+
* - ENOENT goes through the shared #2236 `classifySpawnFailure` split — a
|
|
87
|
+
* cwd fault is `git_error` NAMING the cwd (never `git_unavailable`);
|
|
88
|
+
* binary-missing keeps the full `gitBinaryMissingMessage` remediation text.
|
|
89
|
+
* - A nonzero child exit is `not_git_repo` only when the bounded stderr
|
|
90
|
+
* matches the shared `isNotGitRepositoryMessage` vocabulary; every other
|
|
91
|
+
* nonzero exit is `git_error` carrying the status.
|
|
92
|
+
* - Spawn-class failures (ETIMEDOUT/ESIGNAL/…) are `git_error` with the
|
|
93
|
+
* failure code ALWAYS carried in the message — empty stderr never
|
|
94
|
+
* discards the class.
|
|
95
|
+
*
|
|
96
|
+
* `ignoreOutput` is deliberately NOT set: the bounded stderr feeds the
|
|
97
|
+
* repo-detection classification.
|
|
98
|
+
*/
|
|
99
|
+
export declare function readGitRepositoryStatusDetailedAsync(cwd: string): Promise<import('../git/branch.js').GitRepositoryStatus>;
|
|
@@ -1077,7 +1077,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1077
1077
|
readonly 'reset-session': {
|
|
1078
1078
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
1079
1079
|
readonly description: "Clear session state while preserving plan, evidence, and knowledge";
|
|
1080
|
-
readonly details: "Deletes
|
|
1080
|
+
readonly details: "Deletes .swarm/session/state.json plus other session files; clears in-memory sessions, chains, and active-agent maps. Preserves plan, evidence, and knowledge; releases this session's pending knowledge-gate obligations (#2398); recovers coder settlements wedged on CODER_DISPATCH_IN_PROGRESS (#2268); backs up to .swarm/reset-backups/ (newest 5 kept). If a cleanup step fails, the closing guard stays closed by design, writes pause (an advisory says why), and a reset re-run or restart recovers.";
|
|
1081
1081
|
readonly args: "--confirm=<token> (purge dirty/live lanes)";
|
|
1082
1082
|
readonly category: "utility";
|
|
1083
1083
|
readonly toolPolicy: "restricted";
|
|
@@ -23,6 +23,18 @@ export declare const _rollbackGateInternals: {
|
|
|
23
23
|
* repositories; git tracks nothing there.
|
|
24
24
|
*/
|
|
25
25
|
export declare function isRealGitRepository(directory: string): boolean;
|
|
26
|
+
/** #3434: a parsed porcelain record whose path normalizes outside the repo root. */
|
|
27
|
+
export declare function isOutOfRootRelativePath(rel: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The NUL-form parser's result contract (#3434): the in-root dirty paths that
|
|
30
|
+
* feed the destroy scope, plus any records whose path normalized outside the
|
|
31
|
+
* project root — excluded from the scope and surfaced for the diagnostic
|
|
32
|
+
* instead of being joined into the confirm-token digest unvalidated.
|
|
33
|
+
*/
|
|
34
|
+
export interface TrackedDirtyParseResult {
|
|
35
|
+
dirtyPaths: string[];
|
|
36
|
+
excludedOutOfRoot: string[];
|
|
37
|
+
}
|
|
26
38
|
/**
|
|
27
39
|
* Parse `git status --porcelain -z` output into repo-relative tracked-dirty
|
|
28
40
|
* paths. The -z form is NUL-terminated and NEVER quotes paths (core.quotepath
|
|
@@ -36,6 +48,16 @@ export declare function isRealGitRepository(directory: string): boolean;
|
|
|
36
48
|
* (intent-to-add) — so the test must not anchor to the first column, or the
|
|
37
49
|
* ORIG_PATH token of an R/C-initial file (README.md, CHANGELOG.md, …) is
|
|
38
50
|
* misread as the start of a new record and swallows the next real entry.
|
|
51
|
+
*
|
|
52
|
+
* #3434: `../`-bearing (or absolute) records are excluded from the dirty
|
|
53
|
+
* set and recorded in `excludedOutOfRoot` — the legacy `string[]` export
|
|
54
|
+
* below returns only the in-root paths.
|
|
55
|
+
*/
|
|
56
|
+
export declare function parseTrackedDirtyPathsWithExclusions(statusOutput: string): TrackedDirtyParseResult;
|
|
57
|
+
/**
|
|
58
|
+
* Legacy `string[]` view of the NUL-form parser (in-root paths only) — the
|
|
59
|
+
* export existing suites pin. New consumers that need the exclusion
|
|
60
|
+
* diagnostic use `parseTrackedDirtyPathsWithExclusions`.
|
|
39
61
|
*/
|
|
40
62
|
export declare function parseTrackedDirtyPaths(statusOutput: string): string[];
|
|
41
63
|
/**
|
|
@@ -43,11 +65,23 @@ export declare function parseTrackedDirtyPaths(statusOutput: string): string[];
|
|
|
43
65
|
* index while a file sits on disk at that path. `git reset --hard` silently
|
|
44
66
|
* overwrites exactly these untracked (or since-ignored) files when it
|
|
45
67
|
* materializes the target tree, so they belong in the destruction scope
|
|
46
|
-
* alongside tracked-dirty paths (#2976 review F-1).
|
|
47
|
-
*
|
|
48
|
-
*
|
|
68
|
+
* alongside tracked-dirty paths (#2976 review F-1).
|
|
69
|
+
*
|
|
70
|
+
* #3434 fail-closed contract: `failure` is set when either listing cannot
|
|
71
|
+
* be read, carrying the reader's structured cause when it could tell. The
|
|
72
|
+
* caller must REFUSE on it — an unreadable enumeration may not read as a
|
|
73
|
+
* measured "nothing in the way" (the same class #3317 closed for the status
|
|
74
|
+
* reads). A non-git or bare-marker root returns empty paths with NO failure:
|
|
75
|
+
* nothing tracked can be in the way there (#2127 convention).
|
|
49
76
|
*/
|
|
50
|
-
export declare function untrackedPathsInTargetTree(directory: string, targetSha: string): Promise<
|
|
77
|
+
export declare function untrackedPathsInTargetTree(directory: string, targetSha: string): Promise<{
|
|
78
|
+
paths: string[];
|
|
79
|
+
failure: {
|
|
80
|
+
code: string | null;
|
|
81
|
+
status: number | null;
|
|
82
|
+
stderrTail: string;
|
|
83
|
+
} | null;
|
|
84
|
+
}>;
|
|
51
85
|
/**
|
|
52
86
|
* The git-kind candidate set: the absolute paths of tracked-dirty files that
|
|
53
87
|
* `git reset --hard` would destroy. This is the ONLY derivation for
|
|
@@ -63,30 +97,63 @@ export declare function swarmOverwriteCandidates(directory: string, overwriteRel
|
|
|
63
97
|
/**
|
|
64
98
|
* #3317: cause-matched wording for an unreadable destruction measurement —
|
|
65
99
|
* single source shared by the /swarm rollback command and the checkpoint
|
|
66
|
-
* tool sink so the two refusal texts cannot drift.
|
|
100
|
+
* tool sink so the two refusal texts cannot drift. `source` (#3434
|
|
101
|
+
* feedback round) names WHICH read failed: the default 'status' keeps the
|
|
102
|
+
* historical wording BYTE-IDENTICAL (pinned by the #3317 round-2 trace
|
|
103
|
+
* suite checkpoint-restore-cause-3275); 'enumeration' rewords the arms to
|
|
104
|
+
* name the ls-tree/ls-files listing so the operator is pointed at the read
|
|
105
|
+
* that actually failed.
|
|
67
106
|
*/
|
|
68
107
|
export declare function describeUnreadableCause(measurement: {
|
|
69
108
|
code?: string | null;
|
|
70
109
|
status?: number | null;
|
|
71
110
|
stderrTail?: string;
|
|
72
|
-
}): string;
|
|
111
|
+
}, source?: 'status' | 'enumeration'): string;
|
|
112
|
+
/**
|
|
113
|
+
* Sanitize a repo-controlled porcelain record for operator/agent-facing
|
|
114
|
+
* diagnostic text (#3434 feedback round): collapse control characters
|
|
115
|
+
* (ANSI/CR/LF/NUL cannot smuggle terminal escapes or forged lines) and
|
|
116
|
+
* bound the excerpt — the same house discipline as the reader's
|
|
117
|
+
* `stderrTail` and `excerptProbeOutput`. Excluded records never enter the
|
|
118
|
+
* scope digest, so the digest's own NUL/newline rejection does not cover
|
|
119
|
+
* the one place their bytes are rendered.
|
|
120
|
+
*/
|
|
121
|
+
export declare function formatExcludedRecord(rel: string): string;
|
|
73
122
|
/**
|
|
74
123
|
* Measure the destruction scope for a git checkpoint restore. When
|
|
75
124
|
* `targetSha` is provided, files that are untracked (or since-ignored) on
|
|
76
125
|
* disk but tracked in the TARGET tree are included: `git reset --hard`
|
|
77
126
|
* overwrites them silently, so they are part of the destruction set
|
|
78
|
-
* (#2976 review F-1). `unreadable` means git status
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
127
|
+
* (#2976 review F-1). `unreadable` means git status — or, #3434, the
|
|
128
|
+
* ls-tree/ls-files enumeration of the target tree — could not be read
|
|
129
|
+
* inside a real repository; callers must fail closed on it (never treat it
|
|
130
|
+
* as a clean tree, and never let a failed enumeration shrink the measured
|
|
131
|
+
* scope). A non-git or bare-marker root returns an empty dirty set: nothing
|
|
132
|
+
* tracked to destroy. `excludedOutOfRoot` carries porcelain records whose
|
|
133
|
+
* path normalized outside the project root (#3434) — excluded from the
|
|
134
|
+
* scope and surfaced for the preview diagnostic.
|
|
82
135
|
*/
|
|
83
136
|
export declare function measureGitDestruction(directory: string, targetSha?: string): Promise<{
|
|
84
137
|
kind: 'ok';
|
|
85
138
|
dirtyRelPaths: string[];
|
|
139
|
+
/** #3434: out-of-root porcelain records excluded from the scope. */
|
|
140
|
+
excludedOutOfRoot: string[];
|
|
86
141
|
} | {
|
|
87
142
|
kind: 'unreadable';
|
|
88
143
|
/** #3317: why the read failed, when the async reader could tell. */
|
|
89
144
|
code?: string | null;
|
|
90
145
|
status?: number | null;
|
|
91
146
|
stderrTail?: string;
|
|
147
|
+
/**
|
|
148
|
+
* #3434 feedback: WHICH read failed — the status read or the
|
|
149
|
+
* ls-tree/ls-files enumeration. Consumers word the refusal
|
|
150
|
+
* accordingly instead of always blaming git status.
|
|
151
|
+
*/
|
|
152
|
+
source: 'status' | 'enumeration';
|
|
153
|
+
/**
|
|
154
|
+
* Out-of-root records already parsed from a SUCCESSFUL status
|
|
155
|
+
* read before the enumeration failed — carried so the refusal
|
|
156
|
+
* can still disclose them instead of dropping them silently.
|
|
157
|
+
*/
|
|
158
|
+
excludedOutOfRoot?: string[];
|
|
92
159
|
}>;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -3380,6 +3380,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
3380
3380
|
trusted_domains: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3381
3381
|
protected_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3382
3382
|
allow_defaults: z.ZodDefault<z.ZodBoolean>;
|
|
3383
|
+
trust_code_mode_wrapper: z.ZodOptional<z.ZodBoolean>;
|
|
3383
3384
|
}, z.core.$strip>>;
|
|
3384
3385
|
denials: z.ZodDefault<z.ZodObject<{
|
|
3385
3386
|
max_consecutive: z.ZodDefault<z.ZodNumber>;
|
|
@@ -3402,6 +3403,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
3402
3403
|
max_consecutive_dispatch_failures: z.ZodDefault<z.ZodNumber>;
|
|
3403
3404
|
total_timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
3404
3405
|
cleanup_timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
3406
|
+
hook_timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
3405
3407
|
}, z.core.$strip>>;
|
|
3406
3408
|
}, z.core.$strip>>>;
|
|
3407
3409
|
pr_feedback_loop: z.ZodOptional<z.ZodObject<{
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strict recogniser for the only OpenCode v2 Code Mode programs Full-Auto may
|
|
3
|
+
* pass through without a critic (#3446).
|
|
4
|
+
*
|
|
5
|
+
* The Code Mode sandbox is not limited to hooked tools: it also exposes
|
|
6
|
+
* `fetch`, `Function`, `crypto`, `URL`, `Promise`, `JSON`, `Math` and `Date`
|
|
7
|
+
* (observed on OpenCode 2.1.4), so "the wrapper only routes nested tool calls"
|
|
8
|
+
* is false in general. A denylist over arbitrary JS cannot be made safe
|
|
9
|
+
* (`Function(...)`, computed member access, string concatenation). Instead,
|
|
10
|
+
* this module ACCEPTS a tiny grammar and rejects everything else:
|
|
11
|
+
*
|
|
12
|
+
* program := ws [`return` ws] [`await` ws] callee ws `(` ws [value] ws `)` ws [`;`] ws
|
|
13
|
+
* callee := `search` | `tools` segment+
|
|
14
|
+
* segment := `.` ident | `[` ws string ws `]`
|
|
15
|
+
* value := string | number | `true` | `false` | `null` | object | array
|
|
16
|
+
* object := `{` ws [pair (ws `,` ws pair)* [ws `,`]] ws `}`
|
|
17
|
+
* pair := (ident | string) ws `:` ws value
|
|
18
|
+
*
|
|
19
|
+
* That is exactly one tool call whose argument is plain data: no identifiers
|
|
20
|
+
* other than the callee path and object keys, so no other call, no member
|
|
21
|
+
* access on a value, no computed keys, no templates, comments, regexes or
|
|
22
|
+
* functions can appear. The nested call itself is still dispatched through the
|
|
23
|
+
* same tool.execute.before chain under its own name and classified there.
|
|
24
|
+
* Anything else (multi-statement, loops, variables, `fetch`, ...) returns
|
|
25
|
+
* false and Full-Auto keeps escalating it to the critic.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* True only when `code` is exactly one `tools.<path>(<plain data>)` or
|
|
29
|
+
* `search(<plain data>)` call, optionally prefixed by `return` and/or `await`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isSingleToolCallProgram(code: unknown): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tools denied to the Full-Auto critic agent (#3446).
|
|
3
|
+
*
|
|
4
|
+
* The critic's task is "verify using read-only tools only", but `shell`/`bash`
|
|
5
|
+
* are not read-only and — worse for latency — let the critic wander: on
|
|
6
|
+
* OpenCode 2 every observed critic session ran `grep -rl` / `find ~` over the
|
|
7
|
+
* user's home directory until the oversight deadline killed it, so no verdict
|
|
8
|
+
* was ever produced and Full-Auto paused. Shell is denied alongside the
|
|
9
|
+
* mutating tools; the critic keeps read/grep/glob and the swarm's own
|
|
10
|
+
* read-only verification tools (diff, evidence, test_impact, symbols).
|
|
11
|
+
*
|
|
12
|
+
* Limit, stated plainly: `execute` (OpenCode 2 Code Mode, which reaches plugin
|
|
13
|
+
* tools such as diff/evidence/test_impact) stays available to the critic by
|
|
14
|
+
* design, and its sandbox also exposes `fetch`/`Function`, which no hook sees.
|
|
15
|
+
* This denial list therefore bounds shell and mutating tools only; it is not a
|
|
16
|
+
* sandbox. A restricted critic Code Mode surface is a follow-up.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FULL_AUTO_CRITIC_DENIED_TOOLS: Readonly<Record<string, false>>;
|
|
@@ -31,6 +31,8 @@ export interface FullAutoPolicyConfig {
|
|
|
31
31
|
trusted_domains?: string[];
|
|
32
32
|
protected_paths?: string[];
|
|
33
33
|
allow_defaults?: boolean;
|
|
34
|
+
/** Opt in to passing the marked OpenCode 2 Code Mode wrapper (#3446). */
|
|
35
|
+
trust_code_mode_wrapper?: boolean;
|
|
34
36
|
};
|
|
35
37
|
oversight?: {
|
|
36
38
|
on_high_risk_action?: boolean;
|
|
@@ -52,6 +54,21 @@ export interface FullAutoClassifierInput {
|
|
|
52
54
|
planSummary?: string;
|
|
53
55
|
changedFiles?: string[];
|
|
54
56
|
fullAutoConfig: FullAutoPolicyConfig | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* True for a call the OpenCode v2 adapter marked as the host's Code Mode
|
|
59
|
+
* `execute` wrapper (see `src/hooks/code-mode-wrapper.ts`). The mark is not
|
|
60
|
+
* proof of provenance (a same-named third-party tool is marked too), so it
|
|
61
|
+
* is only honoured with the operator opt-in `trust_code_mode_wrapper`.
|
|
62
|
+
*/
|
|
63
|
+
hostCodeModeWrapper?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* True when this `swarm_command` is on the explicit read-only allowlist
|
|
66
|
+
* (`READ_ONLY_SWARM_COMMANDS`) AND the tool's own policy allows it. Computed
|
|
67
|
+
* by the permission hook so this module stays free of the command
|
|
68
|
+
* registry's import graph. Absent or false means the call is escalated like
|
|
69
|
+
* any unclassified tool.
|
|
70
|
+
*/
|
|
71
|
+
swarmCommandReadOnly?: boolean;
|
|
55
72
|
pluginConfig?: {
|
|
56
73
|
memory?: {
|
|
57
74
|
enabled?: boolean;
|
package/dist/git/branch.d.ts
CHANGED
|
@@ -7,6 +7,13 @@ export type GitRepositoryStatus = {
|
|
|
7
7
|
reason: 'not_git_repo' | 'git_unavailable' | 'git_error';
|
|
8
8
|
message: string;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Repo-detection vocabulary shared with the async detailed reader
|
|
12
|
+
* (`src/commands/git-status-read.ts`, #3427): the same case-folded phrases
|
|
13
|
+
* classify a nonzero `rev-parse` exit as `not_git_repo` on the sync and
|
|
14
|
+
* async probe paths alike, so the two probes cannot drift apart.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isNotGitRepositoryMessage(message: string): boolean;
|
|
10
17
|
/**
|
|
11
18
|
* Seam that calls child_process.spawnSync dynamically.
|
|
12
19
|
* Uses getChildProcessSpawnSync() to resolve at call time, allowing
|
|
@@ -71,6 +78,21 @@ declare const __spawnSyncSeam: {
|
|
|
71
78
|
* looks sufficient but is not — that gap is exactly what #2263 reported.
|
|
72
79
|
*/
|
|
73
80
|
export declare function readLaneEnvFileFromDiskSync(worktreePath: string, laneIndex: number): Record<string, string>;
|
|
81
|
+
/**
|
|
82
|
+
* Issue #2236 F5: builds the *actionable* "git is not available" message.
|
|
83
|
+
*
|
|
84
|
+
* `describeGitResolution()` (src/utils/git-executable.ts) is the production
|
|
85
|
+
* source of truth for what the resolver actually tried — every candidate path,
|
|
86
|
+
* its source (`override`/`platform`/`path`), and why each was rejected. A bare
|
|
87
|
+
* "git executable is not available on PATH" is what sent the original report
|
|
88
|
+
* down a four-day PATH investigation while git was present the whole time, so
|
|
89
|
+
* the thrown message names the candidates and the override escape hatch.
|
|
90
|
+
*
|
|
91
|
+
* `cwd` is named too: reaching this function means the cwd was positively
|
|
92
|
+
* classified as present-and-a-directory, which is the fact that rules the
|
|
93
|
+
* #2236 misdiagnosis out rather than leaving it implied.
|
|
94
|
+
*/
|
|
95
|
+
export declare function gitBinaryMissingMessage(cwd: string): string;
|
|
74
96
|
declare function gitExec(args: string[], cwd: string, laneEnv?: Record<string, string>, laneIndex?: number): string;
|
|
75
97
|
export declare function getGitRepositoryStatus(cwd: string): GitRepositoryStatus;
|
|
76
98
|
/**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-call marker for the OpenCode v2 Code Mode `execute` wrapper (#3446).
|
|
3
|
+
*
|
|
4
|
+
* OpenCode v2 reaches plugin and MCP tools through one host-owned `execute`
|
|
5
|
+
* tool whose input is a JS program (`{ code }`); every nested `tools.<name>()`
|
|
6
|
+
* call is dispatched through the tool.execute.before chain under its own name.
|
|
7
|
+
* Only the v2 adapter sees the host's real tool id, so only the adapter can
|
|
8
|
+
* mark a call. The mark is NOT proof of provenance: a v2 tool event is just
|
|
9
|
+
* {tool, sessionID, agent, messageID, id, input}, so a plugin- or MCP-provided
|
|
10
|
+
* tool that shares the name `execute` and takes a string `code` is marked too.
|
|
11
|
+
* That is why the Full-Auto classifier only honours the mark when the operator
|
|
12
|
+
* opts in (`permission_policy.trust_code_mode_wrapper`, default false) and the
|
|
13
|
+
* program is exactly one plain-data tool call. On a v1 host nothing is marked.
|
|
14
|
+
*
|
|
15
|
+
* Side-channel shape mirrors `src/sandbox/skip-state.ts` (keyed by
|
|
16
|
+
* session + call, bounded, FIFO-evicted) so session state stays bounded
|
|
17
|
+
* (invariant 8).
|
|
18
|
+
*/
|
|
19
|
+
/** Hard cap on retained marks; oldest are evicted first. */
|
|
20
|
+
export declare const MAX_CODE_MODE_WRAPPER_MARKS = 256;
|
|
21
|
+
/** Record that this exact call is the host's Code Mode `execute` wrapper. */
|
|
22
|
+
export declare function recordCodeModeWrapperCall(sessionID: string, callID: string): void;
|
|
23
|
+
/** True only for a call the v2 adapter marked as the Code Mode wrapper. */
|
|
24
|
+
export declare function isCodeModeWrapperCall(sessionID: string, callID: string | undefined): boolean;
|
|
25
|
+
/** Drop a mark once the call has completed. */
|
|
26
|
+
export declare function clearCodeModeWrapperCall(sessionID: string, callID: string): void;
|
|
27
|
+
/** Test seam: drop every mark. */
|
|
28
|
+
export declare function resetCodeModeWrapperCalls(): void;
|
|
@@ -69,4 +69,9 @@ export declare function createFullAutoInterceptHook(config: PluginConfig, direct
|
|
|
69
69
|
messages?: MessageWithParts[];
|
|
70
70
|
}) => Promise<void>;
|
|
71
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* Builds additional context to append to the autonomous oversight prompt.
|
|
74
|
+
* This provides the architect's question/output for the critic to evaluate.
|
|
75
|
+
*/
|
|
76
|
+
export declare function buildCriticContext(architectOutput: string, escalationType: 'phase_completion' | 'question'): string;
|
|
72
77
|
export {};
|
|
@@ -35,6 +35,31 @@ export interface FullAutoPermissionHookOptions {
|
|
|
35
35
|
config: PluginConfig;
|
|
36
36
|
directory: string;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* `/swarm` commands that only read and display state. Deliberately SEPARATE from
|
|
40
|
+
* the tool policy's agent allowlist, which also contains state-changing and
|
|
41
|
+
* process-spawning commands (`auto-proceed`, `guardrail reset`, `attest`,
|
|
42
|
+
* `ci-simulate`, `gate-audit`, `review`, `post-mortem`, `pr subscribe`,
|
|
43
|
+
* `sdd project`, `*-opt` runs, ...). Canonical keys.
|
|
44
|
+
*
|
|
45
|
+
* The invariant is: no change to source, plan, gates or any operator-visible
|
|
46
|
+
* state, and no process spawn or network egress. Some of these commands do
|
|
47
|
+
* refresh bookkeeping under `.swarm/` (e.g. `report` writes `.swarm/swarm.db`
|
|
48
|
+
* and a cohort manifest, `memory *` create `.swarm/memory/memory.db`, and
|
|
49
|
+
* commands that load the plan may regenerate `plan.md`): writes are confined
|
|
50
|
+
* to `.swarm/`, which `tests/unit/hooks/full-auto-swarm-command-policy-3446.test.ts`
|
|
51
|
+
* pins by running every key and diffing the tree outside `.swarm/`. Keys that
|
|
52
|
+
* were shown to spawn processes (`diagnose`, `doctor tools`) or contact
|
|
53
|
+
* GitHub (`pr status`) are NOT in this set.
|
|
54
|
+
*/
|
|
55
|
+
export declare const READ_ONLY_SWARM_COMMANDS: ReadonlySet<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Is this `swarm_command` call on the read-only allowlist AND permitted by the
|
|
58
|
+
* tool's own policy for this exact command + args? Anything else (unknown,
|
|
59
|
+
* human-only, restricted, bad args, or any state-changing command) returns
|
|
60
|
+
* false and falls through to the normal escalation.
|
|
61
|
+
*/
|
|
62
|
+
export declare function isSwarmCommandReadOnly(args: unknown): boolean;
|
|
38
63
|
export declare function createFullAutoPermissionHook(options: FullAutoPermissionHookOptions): {
|
|
39
64
|
toolBefore: (input: {
|
|
40
65
|
tool: string;
|