opencode-swarm 7.145.0 → 7.145.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 (105) hide show
  1. package/.opencode/skills/phase-wrap/SKILL.md +3 -2
  2. package/README.md +5 -1
  3. package/dist/background/workspace-snapshot.d.ts +29 -0
  4. package/dist/cli/{config-doctor-dzsv3pqy.js → config-doctor-j1r33f4q.js} +3 -3
  5. package/dist/cli/{core-qkh9me8x.js → core-c2zrd384.js} +4 -4
  6. package/dist/cli/{curation-policy-5x6346tf.js → curation-policy-xv0j8zyt.js} +6 -6
  7. package/dist/cli/{curator-zssndq5x.js → curator-gk2kmrk1.js} +31 -31
  8. package/dist/cli/{curator-llm-factory-q5p4578g.js → curator-llm-factory-sat3mn5n.js} +31 -31
  9. package/dist/cli/{evidence-summary-service-dqcpapj8.js → evidence-summary-service-0mhx0t0v.js} +14 -14
  10. package/dist/cli/{gate-evidence-bkdqryqg.js → gate-evidence-a5adh55x.js} +9 -9
  11. package/dist/cli/{guardrail-explain-kspf83x5.js → guardrail-explain-r50fery8.js} +32 -32
  12. package/dist/cli/{guardrail-log-qg4sq6gr.js → guardrail-log-p69eys6d.js} +4 -4
  13. package/dist/cli/{hive-promoter-3h7dhnek.js → hive-promoter-ay8a7sct.js} +31 -31
  14. package/dist/cli/{index-wk54ey3h.js → index-0a0asz2s.js} +1 -1
  15. package/dist/cli/{index-2dnqazyr.js → index-1g87esfp.js} +2 -2
  16. package/dist/cli/{index-0pcq32y2.js → index-2vefr1f8.js} +1 -1
  17. package/dist/cli/{index-fp464as8.js → index-4p3qfb05.js} +1 -1
  18. package/dist/cli/{index-77ef8gye.js → index-5e5a1y2r.js} +1 -1
  19. package/dist/cli/{index-0jr9zn34.js → index-612rr70a.js} +2 -2
  20. package/dist/cli/{index-apjdytwx.js → index-673axbjx.js} +3 -3
  21. package/dist/cli/{index-qfawexc8.js → index-6wf75rcm.js} +6 -6
  22. package/dist/cli/{index-k6pdsct6.js → index-7y5akvc9.js} +1 -1
  23. package/dist/cli/{index-hfzcztv6.js → index-9080b3de.js} +34 -34
  24. package/dist/cli/{index-v64kjqvg.js → index-917z76qr.js} +25 -18
  25. package/dist/cli/{index-ffdwj1an.js → index-97psh79d.js} +1 -1
  26. package/dist/cli/{index-kp87kr1a.js → index-9gt8g2qj.js} +4 -4
  27. package/dist/cli/{index-4e5a28h7.js → index-b9kxxd6k.js} +2 -2
  28. package/dist/cli/{index-pa86tpgt.js → index-bghwrr59.js} +1 -1
  29. package/dist/cli/{index-6ezbzd5e.js → index-cb2qtetk.js} +682 -181
  30. package/dist/cli/{index-v3y3qg48.js → index-cpg98bh1.js} +17 -1
  31. package/dist/cli/{index-c13ttmak.js → index-cxn95n7q.js} +180 -32
  32. package/dist/cli/{index-7g276m9m.js → index-czde45km.js} +3 -3
  33. package/dist/cli/{index-zfhe7vbb.js → index-gpnv14kq.js} +2 -2
  34. package/dist/cli/{index-6q3agdmr.js → index-j20fzn0w.js} +2 -2
  35. package/dist/cli/{index-mkks7jwg.js → index-jgb7mq2y.js} +4 -4
  36. package/dist/cli/{index-h4hasck4.js → index-jpppcckq.js} +4 -4
  37. package/dist/cli/{index-4evasm2b.js → index-kggqpefz.js} +5 -5
  38. package/dist/cli/{index-s6cwsnrw.js → index-n55a28zr.js} +254 -36
  39. package/dist/cli/{index-b3xret0a.js → index-ncfjxz9n.js} +5 -5
  40. package/dist/cli/{index-e00wbqw5.js → index-np4ytvvv.js} +2 -2
  41. package/dist/cli/{index-jy9bwa9k.js → index-nsr5b69r.js} +2 -2
  42. package/dist/cli/{index-zz5qsjd1.js → index-qyvjp0bq.js} +66 -38
  43. package/dist/cli/{index-6hqhyb0f.js → index-rk80jhef.js} +19 -5
  44. package/dist/cli/{index-4zwjc9sb.js → index-vav705md.js} +101 -4
  45. package/dist/cli/{index-s72naw1j.js → index-x8pm918t.js} +1 -1
  46. package/dist/cli/{index-b30x236n.js → index-z9yhhk6q.js} +96 -8
  47. package/dist/cli/index.js +32 -32
  48. package/dist/cli/{knowledge-escalator-w1mbaktt.js → knowledge-escalator-22apj3dj.js} +14 -14
  49. package/dist/cli/{knowledge-events-a0dj6gy6.js → knowledge-events-bx8xba9z.js} +12 -12
  50. package/dist/cli/{knowledge-link-mzdjvjsd.js → knowledge-link-82ew2yc4.js} +5 -5
  51. package/dist/cli/{knowledge-store-8kk3rghx.js → knowledge-store-nc71kfsg.js} +6 -6
  52. package/dist/cli/{knowledge-validator-91ym56e0.js → knowledge-validator-g8ne80v6.js} +8 -8
  53. package/dist/cli/model-preflight-7ea00h34.js +170 -0
  54. package/dist/cli/{pending-delegations-6vsrmw5w.js → pending-delegations-kkrczqv7.js} +3 -3
  55. package/dist/cli/{pr-subscriptions-zc3skxde.js → pr-subscriptions-2xn238xt.js} +3 -3
  56. package/dist/cli/{runner-jj32v8bk.js → runner-pqsf809k.js} +6 -6
  57. package/dist/cli/{scan-cursor-12jxwd14.js → scan-cursor-6ksgv514.js} +7 -7
  58. package/dist/cli/{schema-nq9tcz87.js → schema-mpcm7nje.js} +2 -2
  59. package/dist/cli/{scope-persistence-dv6z7n08.js → scope-persistence-mj1w3hqw.js} +11 -8
  60. package/dist/cli/{skill-generator-drscnzq9.js → skill-generator-gsa6qwwt.js} +16 -16
  61. package/dist/cli/{telemetry-z54dgdrh.js → telemetry-t109dhv7.js} +1 -1
  62. package/dist/cli/{workspace-snapshot-q21mgbsh.js → workspace-snapshot-kznz5e13.js} +4 -2
  63. package/dist/cli/{worktree-collision-ownership-rfyyjjct.js → worktree-collision-ownership-2jtg2my1.js} +8 -8
  64. package/dist/cli/{worktree-isolation-4tehtym5.js → worktree-isolation-ajzyp2gm.js} +33 -31
  65. package/dist/config/schema.d.ts +2 -2
  66. package/dist/evidence/task-gate-repair.d.ts +26 -0
  67. package/dist/evidence/task-gate-requirements.d.ts +20 -0
  68. package/dist/gate-evidence.d.ts +7 -0
  69. package/dist/hooks/delegation-gate/worktree-isolation.d.ts +4 -0
  70. package/dist/hooks/knowledge-receipt-ledger-storage.d.ts +2 -0
  71. package/dist/hooks/knowledge-receipt-ledger.d.ts +72 -3
  72. package/dist/hooks/knowledge-receipt-observability.d.ts +1 -1
  73. package/dist/hooks/phase-complete-directive-gate.d.ts +9 -0
  74. package/dist/index.js +566 -546
  75. package/dist/observability/catalog.d.ts +2 -2
  76. package/dist/plan/manager.d.ts +8 -0
  77. package/dist/review/diff-source.d.ts +30 -0
  78. package/dist/review/engine.d.ts +1 -0
  79. package/dist/review/evidence.d.ts +16 -2
  80. package/dist/review/phase-runner.d.ts +1 -0
  81. package/dist/scope/scope-binding.d.ts +16 -0
  82. package/dist/services/model-preflight.d.ts +151 -0
  83. package/dist/services/session-reflection.d.ts +24 -0
  84. package/dist/telemetry.d.ts +12 -1
  85. package/dist/tools/completion-verify.d.ts +2 -0
  86. package/dist/tools/convene-council.d.ts +1 -1
  87. package/dist/tools/index.d.ts +4 -0
  88. package/dist/tools/manifest.d.ts +4 -0
  89. package/dist/tools/phase-complete/gates/final-review-gate.d.ts +3 -3
  90. package/dist/tools/phase-complete/gates/types.d.ts +2 -2
  91. package/dist/tools/phase-complete/preflight-report.d.ts +66 -0
  92. package/dist/tools/phase-complete/snapshot-identity.d.ts +1 -0
  93. package/dist/tools/phase-complete.d.ts +66 -3
  94. package/dist/tools/placeholder-scan.d.ts +64 -0
  95. package/dist/tools/record-directive-override.d.ts +14 -0
  96. package/dist/tools/repair-gate-evidence.d.ts +6 -0
  97. package/dist/tools/repair-knowledge-receipt-ledger.d.ts +27 -0
  98. package/dist/tools/run-phase-review.d.ts +37 -0
  99. package/dist/tools/sast-scan.d.ts +6 -0
  100. package/dist/tools/submit-phase-council-verdicts.d.ts +1 -1
  101. package/dist/tools/tool-metadata.d.ts +32 -16
  102. package/dist/tools/write-final-council-evidence.d.ts +1 -1
  103. package/dist/tools/write-retro.d.ts +2 -0
  104. package/package.json +1 -1
  105. package/dist/cli/{curator-drift-yn5d0mvq.js → curator-drift-r50x1rac.js} +1 -1
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-w8pgjr75.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-pa86tpgt.js";
7
+ } from "./index-bghwrr59.js";
8
8
  import {
9
9
  exports_external,
10
10
  init_zod
@@ -6,11 +6,11 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  stripKnownSwarmPrefix
9
- } from "./index-zfhe7vbb.js";
9
+ } from "./index-gpnv14kq.js";
10
10
  import {
11
11
  ALL_AGENT_NAMES,
12
12
  init_constants
13
- } from "./index-v3y3qg48.js";
13
+ } from "./index-cpg98bh1.js";
14
14
  import {
15
15
  log
16
16
  } from "./index-zgwm4ryv.js";
@@ -4,14 +4,14 @@ import {
4
4
  PlanSchema,
5
5
  TaskStatusSchema,
6
6
  init_loader
7
- } from "./index-0pcq32y2.js";
7
+ } from "./index-2vefr1f8.js";
8
8
  import {
9
9
  assertProjectRoot,
10
10
  withEvidenceLock
11
- } from "./index-pa86tpgt.js";
11
+ } from "./index-bghwrr59.js";
12
12
  import {
13
13
  emit
14
- } from "./index-zz5qsjd1.js";
14
+ } from "./index-qyvjp0bq.js";
15
15
  import {
16
16
  criticalWarn,
17
17
  init_logger,
@@ -6,10 +6,10 @@ import {
6
6
  } from "./index-ae75rja9.js";
7
7
  import {
8
8
  resolveKnowledgeStoreDir
9
- } from "./index-s72naw1j.js";
9
+ } from "./index-x8pm918t.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-6q3agdmr.js";
12
+ } from "./index-j20fzn0w.js";
13
13
  import {
14
14
  init_knowledge_types,
15
15
  isActiveStatus
@@ -709,7 +709,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
709
709
  const {
710
710
  readAuthoritativeKnowledgeCounterRollups,
711
711
  effectiveRetrievalOutcomes
712
- } = await import("./knowledge-events-a0dj6gy6.js");
712
+ } = await import("./knowledge-events-bx8xba9z.js");
713
713
  const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
714
714
  const flagIds = new Set;
715
715
  for (const e of atFloor) {
@@ -776,11 +776,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
776
776
  });
777
777
  }
778
778
  if (action === "quarantine" && toQuarantine.length > 0) {
779
- const { quarantineEntry } = await import("./knowledge-validator-91ym56e0.js");
780
- const { KnowledgeConfigSchema } = await import("./schema-nq9tcz87.js");
779
+ const { quarantineEntry } = await import("./knowledge-validator-g8ne80v6.js");
780
+ const { KnowledgeConfigSchema } = await import("./schema-mpcm7nje.js");
781
781
  let config;
782
782
  try {
783
- const { loadPluginConfigWithMeta } = await import("./index-kp87kr1a.js");
783
+ const { loadPluginConfigWithMeta } = await import("./index-9gt8g2qj.js");
784
784
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
785
785
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
786
786
  } catch {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-2dnqazyr.js";
5
+ } from "./index-1g87esfp.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-4e5a28h7.js";
4
+ } from "./index-b9kxxd6k.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-k6pdsct6.js";
7
+ } from "./index-7y5akvc9.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -85,66 +85,66 @@ import {
85
85
  handleWriteRetroCommand,
86
86
  normalizeSwarmCommandInput,
87
87
  resolveCommand
88
- } from "./index-6ezbzd5e.js";
89
- import"./index-2dnqazyr.js";
90
- import"./index-0jr9zn34.js";
91
- import"./index-v64kjqvg.js";
88
+ } from "./index-cb2qtetk.js";
89
+ import"./index-0a0asz2s.js";
90
+ import"./index-1g87esfp.js";
91
+ import"./index-612rr70a.js";
92
+ import"./index-917z76qr.js";
93
+ import"./index-nsr5b69r.js";
92
94
  import"./index-134d35c1.js";
93
95
  import"./index-abtrcs16.js";
94
- import"./index-wk54ey3h.js";
95
- import"./index-jy9bwa9k.js";
96
96
  import"./index-y8552snf.js";
97
- import"./index-e00wbqw5.js";
97
+ import"./index-ncfjxz9n.js";
98
+ import"./index-np4ytvvv.js";
98
99
  import"./index-70ha9e09.js";
99
100
  import"./index-c8s9a3zh.js";
100
101
  import"./index-9ss2m4rs.js";
101
- import"./index-b30x236n.js";
102
- import"./index-77ef8gye.js";
103
- import"./index-mkks7jwg.js";
104
- import"./index-b3xret0a.js";
105
- import"./index-h4hasck4.js";
106
- import"./index-fp464as8.js";
102
+ import"./index-z9yhhk6q.js";
103
+ import"./index-5e5a1y2r.js";
104
+ import"./index-jgb7mq2y.js";
105
+ import"./index-jpppcckq.js";
106
+ import"./index-4p3qfb05.js";
107
107
  import"./index-rtry5xyf.js";
108
108
  import"./index-zsrtt42s.js";
109
- import"./index-ffdwj1an.js";
109
+ import"./index-97psh79d.js";
110
110
  import"./index-e1pxav9g.js";
111
- import"./index-s6cwsnrw.js";
112
- import"./index-6hqhyb0f.js";
113
- import"./index-4zwjc9sb.js";
114
- import"./index-apjdytwx.js";
111
+ import"./index-n55a28zr.js";
112
+ import"./index-rk80jhef.js";
113
+ import"./index-vav705md.js";
114
+ import"./index-673axbjx.js";
115
115
  import"./index-556ja8an.js";
116
116
  import"./index-7sy3aa9m.js";
117
117
  import"./index-wx8zdh4a.js";
118
118
  import"./index-3g0xk6tk.js";
119
119
  import"./index-85gkedsf.js";
120
- import"./index-qfawexc8.js";
121
- import"./index-c13ttmak.js";
122
- import"./index-7g276m9m.js";
120
+ import"./index-6wf75rcm.js";
121
+ import"./index-cxn95n7q.js";
122
+ import"./index-czde45km.js";
123
123
  import"./index-gprxjmm7.js";
124
124
  import"./index-n832052r.js";
125
- import"./index-w8pgjr75.js";
126
- import"./index-z6xqpmqg.js";
127
- import"./index-zj6t9zgx.js";
128
- import"./index-0pcq32y2.js";
125
+ import"./index-2vefr1f8.js";
129
126
  import {
130
127
  init_schema,
131
128
  stripKnownSwarmPrefix
132
- } from "./index-zfhe7vbb.js";
129
+ } from "./index-gpnv14kq.js";
133
130
  import {
134
131
  AGENT_TOOL_MAP,
135
132
  ORCHESTRATOR_NAME,
136
133
  init_constants
137
- } from "./index-v3y3qg48.js";
134
+ } from "./index-cpg98bh1.js";
138
135
  import"./index-9e6fdz2h.js";
139
136
  import"./index-4rhhvd1a.js";
137
+ import"./index-w8pgjr75.js";
138
+ import"./index-z6xqpmqg.js";
139
+ import"./index-zj6t9zgx.js";
140
140
  import"./index-zjygnfay.js";
141
141
  import"./index-ae75rja9.js";
142
- import"./index-s72naw1j.js";
143
- import"./index-6q3agdmr.js";
142
+ import"./index-x8pm918t.js";
143
+ import"./index-j20fzn0w.js";
144
144
  import"./index-bk5tah7q.js";
145
- import"./index-4evasm2b.js";
146
- import"./index-pa86tpgt.js";
147
- import"./index-zz5qsjd1.js";
145
+ import"./index-kggqpefz.js";
146
+ import"./index-bghwrr59.js";
147
+ import"./index-qyvjp0bq.js";
148
148
  import"./index-7g4c7s5r.js";
149
149
  import"./index-bpmtbmy9.js";
150
150
  import"./index-ed5ykebp.js";
@@ -1,12 +1,12 @@
1
1
  // @bun
2
- import {
3
- loadDatabaseCtor
4
- } from "./index-134d35c1.js";
5
2
  import {
6
3
  EvaluationRunV1Schema,
7
4
  GateAuditResultV1Schema,
8
5
  getProtectedEvaluationRunIds
9
- } from "./index-jy9bwa9k.js";
6
+ } from "./index-nsr5b69r.js";
7
+ import {
8
+ loadDatabaseCtor
9
+ } from "./index-134d35c1.js";
10
10
  import {
11
11
  readEffectiveSpecSync
12
12
  } from "./index-9ss2m4rs.js";
@@ -23,7 +23,7 @@ import {
23
23
  readTaskEvidence,
24
24
  readTaskEvidenceRaw,
25
25
  sanitizeTaskId
26
- } from "./index-s6cwsnrw.js";
26
+ } from "./index-n55a28zr.js";
27
27
  import {
28
28
  LedgerStaleWriterError,
29
29
  appendLedgerEvent,
@@ -43,7 +43,7 @@ import {
43
43
  replayFromLedgerWithStatus,
44
44
  takeSnapshotEvent,
45
45
  takeSnapshotWithRetry
46
- } from "./index-apjdytwx.js";
46
+ } from "./index-673axbjx.js";
47
47
  import {
48
48
  init_executor,
49
49
  isUntrustedEnvKey,
@@ -54,6 +54,15 @@ import {
54
54
  EvidenceBundleSchema,
55
55
  EvidenceSchema
56
56
  } from "./index-gprxjmm7.js";
57
+ import {
58
+ PlanSchema
59
+ } from "./index-2vefr1f8.js";
60
+ import {
61
+ GIT_BINARY_ENV_VAR,
62
+ describeGitResolution,
63
+ init_git_executable,
64
+ resolveGitExecutable
65
+ } from "./index-9e6fdz2h.js";
57
66
  import {
58
67
  readSwarmFileAsync,
59
68
  validateSwarmPath
@@ -63,23 +72,14 @@ import {
63
72
  bunWrite,
64
73
  mergeEnvForChild
65
74
  } from "./index-zj6t9zgx.js";
66
- import {
67
- PlanSchema
68
- } from "./index-0pcq32y2.js";
69
- import {
70
- GIT_BINARY_ENV_VAR,
71
- describeGitResolution,
72
- init_git_executable,
73
- resolveGitExecutable
74
- } from "./index-9e6fdz2h.js";
75
75
  import {
76
76
  assertProjectRoot,
77
77
  tryAcquireLock,
78
78
  withEvidenceLock
79
- } from "./index-pa86tpgt.js";
79
+ } from "./index-bghwrr59.js";
80
80
  import {
81
81
  emit
82
- } from "./index-zz5qsjd1.js";
82
+ } from "./index-qyvjp0bq.js";
83
83
  import {
84
84
  ZodError,
85
85
  init_zod
@@ -2568,6 +2568,7 @@ async function savePlan(directory, plan, options) {
2568
2568
  const planHashForInit = computePlanHash(validated);
2569
2569
  if (!await ledgerExists(directory)) {
2570
2570
  try {
2571
+ options?.preCommitCheck?.();
2571
2572
  await initLedger(directory, planId, planHashForInit, validated);
2572
2573
  } catch (initErr) {
2573
2574
  const msg = initErr instanceof Error ? initErr.message : String(initErr);
@@ -2584,6 +2585,7 @@ async function savePlan(directory, plan, options) {
2584
2585
  let backupExists = false;
2585
2586
  if (existsSync4(oldLedgerPath)) {
2586
2587
  try {
2588
+ options?.preCommitCheck?.();
2587
2589
  renameSync2(oldLedgerPath, oldLedgerBackupPath);
2588
2590
  backupExists = true;
2589
2591
  } catch (renameErr) {
@@ -2593,6 +2595,7 @@ async function savePlan(directory, plan, options) {
2593
2595
  let initSucceeded = false;
2594
2596
  if (backupExists) {
2595
2597
  try {
2598
+ options?.preCommitCheck?.();
2596
2599
  await initLedger(directory, planId, planHashForInit, validated);
2597
2600
  initSucceeded = true;
2598
2601
  } catch (initErr) {
@@ -2731,6 +2734,7 @@ async function savePlan(directory, plan, options) {
2731
2734
  }
2732
2735
  try {
2733
2736
  for (const missing of missingTasks) {
2737
+ options?.preCommitCheck?.();
2734
2738
  const eventInput = {
2735
2739
  plan_id: derivePlanId(validated),
2736
2740
  event_type: "task_removed",
@@ -2768,6 +2772,7 @@ async function savePlan(directory, plan, options) {
2768
2772
  for (const task of phase.tasks) {
2769
2773
  const oldTask = oldTaskMap.get(task.id);
2770
2774
  if (oldTask && oldTask.status !== task.status) {
2775
+ options?.preCommitCheck?.();
2771
2776
  const eventInput = {
2772
2777
  plan_id: derivePlanId(validated),
2773
2778
  event_type: "task_status_changed",
@@ -2809,6 +2814,7 @@ async function savePlan(directory, plan, options) {
2809
2814
  const replayedBeforeProjection = await replayFromLedger(directory);
2810
2815
  const projectionCandidate = replayedBeforeProjection ? mergeStatusesTakingPrecedence(validated, replayedBeforeProjection, ledgerStatusTaskIds) : validated;
2811
2816
  if (replayedBeforeProjection && computePlanHash(replayedBeforeProjection) !== computePlanHash(projectionCandidate)) {
2817
+ options?.preCommitCheck?.();
2812
2818
  await takeSnapshotEvent(directory, projectionCandidate, {
2813
2819
  planHashAfter: computePlanHash(projectionCandidate),
2814
2820
  source: "savePlan_structural_projection"
@@ -2817,7 +2823,7 @@ async function savePlan(directory, plan, options) {
2817
2823
  const projectedPlan = projectionCandidate;
2818
2824
  const SNAPSHOT_INTERVAL = 50;
2819
2825
  const latestSeq = await getLatestLedgerSeq(directory);
2820
- if (latestSeq > 0 && latestSeq % SNAPSHOT_INTERVAL === 0) {
2826
+ if (!options?.preCommitCheck && latestSeq > 0 && latestSeq % SNAPSHOT_INTERVAL === 0) {
2821
2827
  await takeSnapshotWithRetry(directory, projectedPlan, {
2822
2828
  planHashAfter: computePlanHash(projectedPlan),
2823
2829
  source: "savePlan_manager"
@@ -2828,6 +2834,7 @@ async function savePlan(directory, plan, options) {
2828
2834
  const tempPath = path5.join(swarmDir, `plan.json.tmp.${Date.now()}.${Math.floor(Math.random() * 1e9)}`);
2829
2835
  try {
2830
2836
  await bunWrite(tempPath, JSON.stringify(projectedPlan, null, 2));
2837
+ options?.preCommitCheck?.();
2831
2838
  renameSync2(tempPath, planPath);
2832
2839
  } finally {
2833
2840
  try {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./index-zj6t9zgx.js";
8
8
  import {
9
9
  withEvidenceLock
10
- } from "./index-pa86tpgt.js";
10
+ } from "./index-bghwrr59.js";
11
11
  import {
12
12
  exports_external,
13
13
  init_zod
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  _internals,
4
4
  resolveWorktreeIsolationConfig
5
- } from "./index-7g276m9m.js";
5
+ } from "./index-czde45km.js";
6
6
  import {
7
7
  ApprovalEvidenceSchema,
8
8
  BaseEvidenceSchema,
@@ -42,7 +42,7 @@ import {
42
42
  loadPluginConfig,
43
43
  loadPluginConfigWithMeta,
44
44
  loadPluginConfigWithMetaAsync
45
- } from "./index-0pcq32y2.js";
45
+ } from "./index-2vefr1f8.js";
46
46
  import {
47
47
  AUTO_REVIEW_V8_BURN_IN_DECISION,
48
48
  AgentOverrideConfigSchema,
@@ -64,7 +64,7 @@ import {
64
64
  TurboConfigSchema,
65
65
  WorktreeIsolationConfigSchema,
66
66
  resolveAutoReviewConfig
67
- } from "./index-zfhe7vbb.js";
67
+ } from "./index-gpnv14kq.js";
68
68
  import {
69
69
  ALL_AGENT_NAMES,
70
70
  ALL_SUBAGENT_NAMES,
@@ -74,7 +74,7 @@ import {
74
74
  QA_AGENTS,
75
75
  isQAAgent,
76
76
  isSubagent
77
- } from "./index-v3y3qg48.js";
77
+ } from "./index-cpg98bh1.js";
78
78
  import"./index-9e6fdz2h.js";
79
79
  import"./index-4rhhvd1a.js";
80
80
  import"./index-zjygnfay.js";
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-6ezbzd5e.js";
15
+ } from "./index-cb2qtetk.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-2dnqazyr.js";
22
+ } from "./index-1g87esfp.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  emit
4
- } from "./index-zz5qsjd1.js";
4
+ } from "./index-qyvjp0bq.js";
5
5
  import {
6
6
  require_proper_lockfile
7
7
  } from "./index-7g4c7s5r.js";