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.
Files changed (112) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/cli/{attest-task-8ekwny8v.js → attest-task-s9cpm1pa.js} +42 -42
  4. package/dist/cli/{auto-checkpoint-dqjk82s7.js → auto-checkpoint-bhtc5gjf.js} +7 -7
  5. package/dist/cli/{checkpoint-2ahps2sp.js → checkpoint-1jmfejsh.js} +17 -15
  6. package/dist/cli/{coder-settlement-1dk37pa9.js → coder-settlement-qabkaq79.js} +10 -10
  7. package/dist/cli/{config-doctor-73rctg85.js → config-doctor-q4805y29.js} +13 -13
  8. package/dist/cli/{core-y5mfws8v.js → core-jtmr767v.js} +3 -3
  9. package/dist/cli/{curation-policy-43gq6t0y.js → curation-policy-fth5n93x.js} +4 -4
  10. package/dist/cli/{curator-m278hyrq.js → curator-4tqbp1re.js} +41 -41
  11. package/dist/cli/{curator-drift-k7j9rcgp.js → curator-drift-681mc3a2.js} +8 -8
  12. package/dist/cli/curator-llm-factory-46bzwbzr.js +82 -0
  13. package/dist/cli/{doctor-knowledge-receipt-phase-id-1m7pkzvt.js → doctor-knowledge-receipt-phase-id-h16qsh6e.js} +7 -7
  14. package/dist/cli/{evidence-summary-service-19k8x1g9.js → evidence-summary-service-qr8kf99s.js} +17 -17
  15. package/dist/cli/{gate-evidence-hche0hf8.js → gate-evidence-phq4rs28.js} +5 -5
  16. package/dist/cli/guardrail-explain-q2eqawnk.js +83 -0
  17. package/dist/cli/{guardrail-log-tvbgnxns.js → guardrail-log-jk30vszs.js} +6 -6
  18. package/dist/cli/{guardrail-reset-v8kvh9cn.js → guardrail-reset-0sfceecs.js} +41 -41
  19. package/dist/cli/{hive-promoter-bqfa763z.js → hive-promoter-8v9vcd75.js} +41 -41
  20. package/dist/cli/{index-kwfhr3mz.js → index-048p7deh.js} +1 -1
  21. package/dist/cli/{index-wfb6vrc2.js → index-0jmt8y9r.js} +2 -2
  22. package/dist/cli/{index-jbm301bq.js → index-1feqa2vz.js} +41 -41
  23. package/dist/cli/{index-bp476gwc.js → index-1v277wxc.js} +2 -2
  24. package/dist/cli/{index-yss701b3.js → index-43scxm6a.js} +4 -4
  25. package/dist/cli/{index-9nmrw7ek.js → index-4cw3w8qm.js} +3 -3
  26. package/dist/cli/{index-vqtca3xv.js → index-4ts6jpmj.js} +2 -2
  27. package/dist/cli/{index-tv9c3b3q.js → index-56w2vy52.js} +3 -3
  28. package/dist/cli/{index-0wg5q595.js → index-5snwc3dz.js} +1 -1
  29. package/dist/cli/{index-m9j9varx.js → index-ab1k780s.js} +3 -3
  30. package/dist/cli/{index-r02aqt0a.js → index-b4kdms7x.js} +2 -2
  31. package/dist/cli/{index-7v74n9a1.js → index-bncex5hw.js} +3 -3
  32. package/dist/cli/{index-qnabg1wp.js → index-bt2h69a2.js} +6 -6
  33. package/dist/cli/{index-md2180vx.js → index-bw6q2v41.js} +3 -3
  34. package/dist/cli/{index-q1x73nnd.js → index-epzadpmm.js} +1 -1
  35. package/dist/cli/{index-71bqn1nn.js → index-evf5t4ba.js} +7 -7
  36. package/dist/cli/{index-511hw14d.js → index-f50e1pn3.js} +43 -43
  37. package/dist/cli/{index-dng8z8me.js → index-g57p8p1k.js} +1 -1
  38. package/dist/cli/{index-p5m71yph.js → index-gpr3j0w1.js} +4 -4
  39. package/dist/cli/{index-hxp5jgd8.js → index-gss7ch5k.js} +2 -2
  40. package/dist/cli/{index-rfvnq6wd.js → index-h29ckdg5.js} +8 -8
  41. package/dist/cli/{index-qnst0jwc.js → index-kezh6nhq.js} +3 -3
  42. package/dist/cli/{index-e8m8bb1r.js → index-mrq61h10.js} +4 -4
  43. package/dist/cli/{index-vmevv6my.js → index-na6ph1fp.js} +1 -1
  44. package/dist/cli/{index-n5k81wym.js → index-nbg19t1b.js} +7 -7
  45. package/dist/cli/{index-8rrs1nc0.js → index-ngzt2xmr.js} +2 -2
  46. package/dist/cli/{index-wr0n2w3z.js → index-nzfq1ms2.js} +1 -1
  47. package/dist/cli/{index-sk1rva12.js → index-pktvge7a.js} +2 -2
  48. package/dist/cli/{index-gwc7jahh.js → index-pvpeggb5.js} +1 -1
  49. package/dist/cli/{index-58cr1xg0.js → index-rav29yb2.js} +3 -3
  50. package/dist/cli/{index-nq3zcrhm.js → index-s3w41p1x.js} +1 -1
  51. package/dist/cli/{index-99zt998b.js → index-s9y49avf.js} +1 -1
  52. package/dist/cli/{index-22atsy06.js → index-sv514p10.js} +918 -154
  53. package/dist/cli/{index-ac8vdmgv.js → index-traz987v.js} +1 -1
  54. package/dist/cli/{index-1rfgzsaw.js → index-trvn0kg0.js} +4 -4
  55. package/dist/cli/{index-jy0mgzjq.js → index-v1h70r3y.js} +1 -1
  56. package/dist/cli/{index-d083d1q7.js → index-ves1rtqt.js} +1 -1
  57. package/dist/cli/{index-x25rhkmk.js → index-vrvcn7k1.js} +4 -4
  58. package/dist/cli/{index-8a3aasag.js → index-wgf1780e.js} +5 -5
  59. package/dist/cli/{index-pyv8vzkx.js → index-xfkzwc4p.js} +5 -5
  60. package/dist/cli/{index-x1z5d5kj.js → index-xyvsdn07.js} +1 -1
  61. package/dist/cli/{index-hg4qa0aq.js → index-y7khxj1g.js} +1940 -2357
  62. package/dist/cli/{index-yvv0my1a.js → index-yctvn9z9.js} +5 -3
  63. package/dist/cli/{index-35tf03js.js → index-yk3b7ywa.js} +10 -10
  64. package/dist/cli/{index-1tpz99db.js → index-ypxq0x7r.js} +1 -1
  65. package/dist/cli/index.js +42 -42
  66. package/dist/cli/{knowledge-escalator-qcra58bx.js → knowledge-escalator-53n7wa7s.js} +12 -12
  67. package/dist/cli/{knowledge-events-9mnx1a3f.js → knowledge-events-80fw8pf6.js} +10 -10
  68. package/dist/cli/{knowledge-link-2jsn9f6a.js → knowledge-link-wfhsfyn2.js} +3 -3
  69. package/dist/cli/{knowledge-store-fdneqf7z.js → knowledge-store-rh1v0509.js} +4 -4
  70. package/dist/cli/{knowledge-validator-7nj987ga.js → knowledge-validator-c3926fw5.js} +6 -6
  71. package/dist/cli/{mcp-0g34wmz4.js → mcp-r43tvhzy.js} +1 -1
  72. package/dist/cli/{model-preflight-g11ykgc0.js → model-preflight-vx9px5ac.js} +41 -41
  73. package/dist/cli/{pending-delegations-5vme18wx.js → pending-delegations-0vbkv5d2.js} +11 -11
  74. package/dist/cli/{pr-subscriptions-cbx5p838.js → pr-subscriptions-a6cm44fs.js} +10 -10
  75. package/dist/cli/{pr-workflow-gate-376gw6yj.js → pr-workflow-gate-yvgpmywz.js} +41 -41
  76. package/dist/cli/{runner-vvd26z2z.js → runner-s1a73y5h.js} +4 -4
  77. package/dist/cli/{scan-cursor-x3j5wvfm.js → scan-cursor-pk4h80c1.js} +5 -5
  78. package/dist/cli/{schema-d98zzrpn.js → schema-5rxfybx2.js} +1 -1
  79. package/dist/cli/{scope-persistence-vkb8z4hc.js → scope-persistence-qzs1f91v.js} +13 -13
  80. package/dist/cli/{server-25svy6cb.js → server-gdewbeyb.js} +41 -41
  81. package/dist/cli/{skill-generator-ktz33dt6.js → skill-generator-xh2w2pvq.js} +14 -14
  82. package/dist/cli/{snapshot-coordination-init-74x3psxc.js → snapshot-coordination-init-jn2rh2s8.js} +41 -41
  83. package/dist/cli/{speckit-checkoff-9t6cdn4a.js → speckit-checkoff-98zsw8c4.js} +4 -4
  84. package/dist/cli/{workspace-snapshot-afqvh9bq.js → workspace-snapshot-93gzfac2.js} +3 -3
  85. package/dist/cli/{worktree-collision-ownership-7a1n1f9j.js → worktree-collision-ownership-2xqxqp0x.js} +12 -12
  86. package/dist/cli/{worktree-isolation-8snw7w34.js → worktree-isolation-rxpwxvw3.js} +41 -41
  87. package/dist/commands/close/internals.d.ts +1 -1
  88. package/dist/commands/close/orchestrator.d.ts +7 -0
  89. package/dist/commands/destructive-purge.d.ts +15 -0
  90. package/dist/commands/git-status-read.d.ts +23 -0
  91. package/dist/commands/registry.d.ts +1 -1
  92. package/dist/commands/rollback-gate.d.ts +77 -10
  93. package/dist/config/schema.d.ts +2 -0
  94. package/dist/full-auto/code-mode-program.d.ts +31 -0
  95. package/dist/full-auto/critic-tools.d.ts +18 -0
  96. package/dist/full-auto/policy.d.ts +17 -0
  97. package/dist/git/branch.d.ts +22 -0
  98. package/dist/hooks/code-mode-wrapper.d.ts +28 -0
  99. package/dist/hooks/full-auto-intercept.d.ts +5 -0
  100. package/dist/hooks/full-auto-permission.d.ts +25 -0
  101. package/dist/hooks/pr-workflow-gate.d.ts +21 -1
  102. package/dist/host/v2/hook-budget.d.ts +37 -0
  103. package/dist/host/v2/hooks.d.ts +9 -0
  104. package/dist/host/v2/setup.d.ts +14 -0
  105. package/dist/index.js +77 -70
  106. package/dist/session/snapshot-coordination-init.d.ts +34 -0
  107. package/dist/session/snapshot-writer.d.ts +5 -1
  108. package/dist/tools/checkpoint.d.ts +17 -0
  109. package/opencode-swarm.schema.json +8 -0
  110. package/package.json +1 -1
  111. package/dist/cli/curator-llm-factory-rke0964p.js +0 -82
  112. 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-r02aqt0a.js";
9
+ } from "./index-b4kdms7x.js";
10
10
  import {
11
11
  scanDelegationFallbacksForRecovery,
12
12
  scanDelegationsForRecovery
13
- } from "./index-rfvnq6wd.js";
13
+ } from "./index-h29ckdg5.js";
14
14
  import {
15
15
  scanWorktreeMergeFailuresForRecovery
16
16
  } from "./index-v3bmwmqw.js";
17
- import"./index-x1z5d5kj.js";
18
- import"./index-99zt998b.js";
19
- import"./index-vmevv6my.js";
20
- import"./index-d083d1q7.js";
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-wr0n2w3z.js";
23
+ import"./index-nzfq1ms2.js";
24
24
  import"./index-7pmbnjvj.js";
25
- import"./index-1tpz99db.js";
26
- import"./index-n5k81wym.js";
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-dng8z8me.js";
30
- import"./index-ac8vdmgv.js";
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-q1x73nnd.js";
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-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";
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-qnabg1wp.js";
37
- import"./index-vqtca3xv.js";
36
+ import"./index-bt2h69a2.js";
37
+ import"./index-4ts6jpmj.js";
38
38
  import"./index-rdec0y3z.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";
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-r02aqt0a.js";
46
- import"./index-rfvnq6wd.js";
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-22atsy06.js";
51
- import"./index-35tf03js.js";
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-9nmrw7ek.js";
53
+ import"./index-4cw3w8qm.js";
55
54
  import"./index-v3bmwmqw.js";
56
- import"./index-sk1rva12.js";
57
- import"./index-58cr1xg0.js";
58
- import"./index-m9j9varx.js";
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-1rfgzsaw.js";
61
- import"./index-x25rhkmk.js";
60
+ import"./index-trvn0kg0.js";
61
+ import"./index-vrvcn7k1.js";
62
62
  import"./index-m9zzj4ee.js";
63
- import"./index-x1z5d5kj.js";
64
- import"./index-p5m71yph.js";
65
- import"./index-jy0mgzjq.js";
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-hxp5jgd8.js";
69
+ } from "./index-gss7ch5k.js";
70
70
  import"./index-g22dps7x.js";
71
71
  import"./index-0725jpp7.js";
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";
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-wr0n2w3z.js";
79
+ import"./index-nzfq1ms2.js";
80
80
  import"./index-7pmbnjvj.js";
81
81
  import"./index-9rwhas09.js";
82
- import"./index-1tpz99db.js";
83
- import"./index-n5k81wym.js";
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-dng8z8me.js";
87
- import"./index-ac8vdmgv.js";
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-q1x73nnd.js";
94
+ import"./index-epzadpmm.js";
95
95
  import"./index-3t46mez1.js";
96
- import"./index-gwc7jahh.js";
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-yvv0my1a.js";
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/branch.js").getGitRepositoryStatus;
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 only .swarm/session/state.json and other session files. Clears in-memory agent sessions, delegation chains, and active-agent mappings. Preserves plan, evidence, and knowledge. Also releases this session's pending knowledge-gate obligations (#2398) and recovers stale coder settlements so dispatches cannot wedge on CODER_DISPATCH_IN_PROGRESS (#2268). Auto-backs up removed files to .swarm/reset-backups/ (newest 5 kept).";
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). Returns [] when either
47
- * listing cannot be read — the tracked-dirty gate above still applies, and
48
- * the caller's unreadable-status refusal covers real-repo failures.
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<string[]>;
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 could not be read
79
- * inside a real repository — callers must fail closed on it (never treat
80
- * it as a clean tree). A non-git or bare-marker root returns an empty
81
- * dirty set: nothing tracked to destroy.
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
  }>;
@@ -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;
@@ -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;