opencode-swarm 7.150.0 → 7.151.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/cli/{config-doctor-96qyv31a.js → config-doctor-23ega26j.js} +2 -2
  2. package/dist/cli/{core-xx0x5tfv.js → core-3g4krkj8.js} +1 -1
  3. package/dist/cli/{curation-policy-nck9g765.js → curation-policy-fmvccdrg.js} +6 -6
  4. package/dist/cli/{curator-llm-factory-b83jsg02.js → curator-llm-factory-k0nxn5gt.js} +28 -28
  5. package/dist/cli/{curator-frrehxxe.js → curator-rym2wtn6.js} +28 -28
  6. package/dist/cli/{evidence-summary-service-dv4bt2bx.js → evidence-summary-service-f0gvjesf.js} +12 -12
  7. package/dist/cli/{gate-evidence-dkvs7aez.js → gate-evidence-cghq17xc.js} +6 -6
  8. package/dist/cli/{guardrail-explain-1zbk21fq.js → guardrail-explain-cv52smw2.js} +29 -29
  9. package/dist/cli/{guardrail-log-d20jewtr.js → guardrail-log-wgwmh9b7.js} +5 -5
  10. package/dist/cli/{guardrail-reset-wb3ba243.js → guardrail-reset-vx7zsmzd.js} +28 -28
  11. package/dist/cli/{hive-promoter-10zv1b45.js → hive-promoter-jb2nzv3j.js} +28 -28
  12. package/dist/cli/{index-s0xz2520.js → index-02qc4ehj.js} +3 -3
  13. package/dist/cli/{index-k2sm9677.js → index-0q2mjxp2.js} +1 -1
  14. package/dist/cli/index-2qte9nr7.js +149 -0
  15. package/dist/cli/{index-mnhagjvn.js → index-5ep31be7.js} +4 -4
  16. package/dist/cli/{index-exn0ztsv.js → index-6zkm4p7p.js} +1 -1
  17. package/dist/cli/{index-t54jt9cs.js → index-7qbyetsf.js} +1 -1
  18. package/dist/cli/{index-x3pt7d0b.js → index-8wy7pb4a.js} +2 -2
  19. package/dist/cli/{index-prxrmc3b.js → index-9wpr1p2g.js} +2 -2
  20. package/dist/cli/{index-xggpmtfx.js → index-aw492hpn.js} +57 -40
  21. package/dist/cli/{index-an922xj4.js → index-bfc4bbq4.js} +7 -7
  22. package/dist/cli/{index-dtmgt2xn.js → index-dvycdkhj.js} +1 -0
  23. package/dist/cli/{index-r5djc1cc.js → index-e9qh1j19.js} +5 -5
  24. package/dist/cli/{index-4sdhbxgq.js → index-f73px21b.js} +1 -1
  25. package/dist/cli/{index-mef0trex.js → index-fkqfcv14.js} +2 -1
  26. package/dist/cli/{index-apwcvfjt.js → index-frp2hwdg.js} +2 -2
  27. package/dist/cli/{index-qqs44wcp.js → index-fybg880e.js} +77 -64
  28. package/dist/cli/{index-n99s022c.js → index-jjpppdvb.js} +1 -1
  29. package/dist/cli/{index-htqs4p52.js → index-kghpgs47.js} +1 -1
  30. package/dist/cli/{index-bhg6brtw.js → index-qa8bmwav.js} +745 -8
  31. package/dist/cli/{index-ma1p1w05.js → index-sdff3rvj.js} +6 -6
  32. package/dist/cli/{index-reknv4f9.js → index-sg48w5e4.js} +2 -2
  33. package/dist/cli/{index-1rpjd5na.js → index-tfkc0zf4.js} +1 -1
  34. package/dist/cli/{index-w9pb72vg.js → index-tp1avc8j.js} +2 -2
  35. package/dist/cli/{index-m8dn0qnm.js → index-txbd25bc.js} +1 -1
  36. package/dist/cli/{index-jb9tb1sd.js → index-v3gshkpz.js} +1 -1
  37. package/dist/cli/{index-8cn6545x.js → index-vradyw0x.js} +30 -30
  38. package/dist/cli/{index-zyv56em5.js → index-vs8wtavs.js} +3 -3
  39. package/dist/cli/{index-1rww5k9e.js → index-wna9f75x.js} +4 -4
  40. package/dist/cli/{index-0tn1kxej.js → index-wxkgy9gh.js} +7 -7
  41. package/dist/cli/{index-1wmd5wn1.js → index-xeptzfb6.js} +4 -4
  42. package/dist/cli/{index-vy6q9d8j.js → index-z4bg1hv8.js} +1 -1
  43. package/dist/cli/{index-g75rbw3e.js → index-zkxnba57.js} +5 -5
  44. package/dist/cli/index.js +28 -28
  45. package/dist/cli/{knowledge-escalator-pc7smwrd.js → knowledge-escalator-a9dwxqz8.js} +11 -11
  46. package/dist/cli/{knowledge-events-jmb3jm84.js → knowledge-events-0q4sb713.js} +9 -9
  47. package/dist/cli/{knowledge-link-mzn8x0qd.js → knowledge-link-v7hj1h8m.js} +5 -5
  48. package/dist/cli/{knowledge-store-wd6zh05h.js → knowledge-store-y2nbt9jk.js} +6 -6
  49. package/dist/cli/{knowledge-validator-2v6ar1wk.js → knowledge-validator-4wr1m0xa.js} +8 -8
  50. package/dist/cli/{pending-delegations-qzy6rnvw.js → pending-delegations-a2nmssr1.js} +3 -3
  51. package/dist/cli/{pr-subscriptions-q862pvz1.js → pr-subscriptions-7879nq5k.js} +3 -3
  52. package/dist/cli/{runner-1aygs98c.js → runner-7znestx4.js} +6 -6
  53. package/dist/cli/{scan-cursor-hr8e3jqj.js → scan-cursor-bsrfrxm6.js} +7 -7
  54. package/dist/cli/{schema-g44y7s0w.js → schema-s6yh3rst.js} +1 -1
  55. package/dist/cli/{scope-persistence-0n2cv4kn.js → scope-persistence-f77w4jrx.js} +8 -8
  56. package/dist/cli/{skill-generator-0gmpxwgk.js → skill-generator-jr7c8fcg.js} +13 -13
  57. package/dist/cli/{telemetry-5deacb7w.js → telemetry-52pw5xac.js} +1 -1
  58. package/dist/cli/{worktree-collision-ownership-9v8e0dz7.js → worktree-collision-ownership-p31zm5k0.js} +3 -3
  59. package/dist/cli/{worktree-isolation-pcr5zv0c.js → worktree-isolation-ka20b0rm.js} +28 -28
  60. package/dist/commands/close.d.ts +1 -0
  61. package/dist/hooks/guardrails/audit-log.d.ts +70 -19
  62. package/dist/hooks/guardrails/helpers.d.ts +16 -1
  63. package/dist/hooks/guardrails/shell-audit-store.d.ts +211 -0
  64. package/dist/hooks/guardrails/tool-before.d.ts +0 -2
  65. package/dist/index.js +337 -317
  66. package/dist/observability/catalog.d.ts +7 -5
  67. package/dist/services/guardrail-log-service.d.ts +4 -0
  68. package/dist/telemetry.d.ts +22 -1
  69. package/package.json +2 -1
  70. package/dist/cli/index-ggs716fj.js +0 -110
@@ -2,23 +2,23 @@
2
2
  import {
3
3
  computePlanStructureHash,
4
4
  derivePlanId
5
- } from "./index-zyv56em5.js";
5
+ } from "./index-vs8wtavs.js";
6
6
  import {
7
7
  appendCoreEventSync
8
- } from "./index-exn0ztsv.js";
8
+ } from "./index-6zkm4p7p.js";
9
9
  import {
10
10
  unsafePathTextReason
11
11
  } from "./index-556ja8an.js";
12
12
  import {
13
13
  PlanSchema
14
- } from "./index-t54jt9cs.js";
14
+ } from "./index-7qbyetsf.js";
15
15
  import {
16
16
  atomicWriteSwarmFile,
17
17
  atomicWriteSwarmFileSync
18
- } from "./index-dtmgt2xn.js";
18
+ } from "./index-dvycdkhj.js";
19
19
  import {
20
20
  assertProjectRoot
21
- } from "./index-m8dn0qnm.js";
21
+ } from "./index-txbd25bc.js";
22
22
  import {
23
23
  require_proper_lockfile
24
24
  } from "./index-7g4c7s5r.js";
@@ -7,7 +7,7 @@ import {
7
7
  readLinkPointer,
8
8
  resolveKnowledgeStoreDir,
9
9
  resolveLinkDir
10
- } from "./index-jb9tb1sd.js";
10
+ } from "./index-v3gshkpz.js";
11
11
 
12
12
  // src/knowledge/curation-policy.ts
13
13
  import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "opencode-swarm",
24
- version: "7.150.0",
24
+ version: "7.151.0",
25
25
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
26
26
  main: "dist/index.js",
27
27
  types: "dist/index.d.ts",
@@ -131,6 +131,7 @@ var init_package = __esm(() => {
131
131
  "check:events": "bun run scripts/check-event-contract.ts",
132
132
  "check:retention": "bun run scripts/check-retention-registry.ts",
133
133
  "check:core-events": "bun run scripts/check-core-events-usage.ts",
134
+ "check:shell-audit": "bun run scripts/check-shell-audit-usage.ts",
134
135
  "check:test-file-cap": "bun run scripts/check-test-file-cap.ts",
135
136
  "check:pending-fragment": "bun run scripts/check-pending-fragment.ts",
136
137
  "check:gate-portability": "bun run scripts/check-gate-portability.ts",
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  atomicWriteFileAnyRoot
4
- } from "./index-dtmgt2xn.js";
4
+ } from "./index-dvycdkhj.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-m8dn0qnm.js";
7
+ } from "./index-txbd25bc.js";
8
8
 
9
9
  // src/evidence/task-file.ts
10
10
  import * as path from "path";
@@ -6,17 +6,19 @@ import {
6
6
  resolveExecutableFromPath,
7
7
  runEvaluation,
8
8
  runExternalTool
9
- } from "./index-n99s022c.js";
9
+ } from "./index-jjpppdvb.js";
10
10
  import {
11
+ finalizeShellAuditForClose,
11
12
  normalizeToolNameLowerCase,
13
+ redactDecisionLineForArchive,
12
14
  stableCanonicalStringify
13
- } from "./index-bhg6brtw.js";
15
+ } from "./index-qa8bmwav.js";
14
16
  import {
15
17
  detectStraySwarmDirs,
16
18
  readDoctorArtifact,
17
19
  removeStraySwarmDir,
18
20
  runConfigDoctor
19
- } from "./index-htqs4p52.js";
21
+ } from "./index-kghpgs47.js";
20
22
  import {
21
23
  MAX_TRANSIENT_RETRIES,
22
24
  archiveEvidence,
@@ -62,7 +64,7 @@ import {
62
64
  updateTaskStatus,
63
65
  validateProjectRoot,
64
66
  validateSymlinkBoundary
65
- } from "./index-an922xj4.js";
67
+ } from "./index-bfc4bbq4.js";
66
68
  import {
67
69
  EvaluationTaskV1Schema,
68
70
  GateAuditManifestV1Schema,
@@ -79,7 +81,7 @@ import {
79
81
  saveGateAuditResult,
80
82
  savePromotionDecision,
81
83
  saveTaskSetSnapshot
82
- } from "./index-prxrmc3b.js";
84
+ } from "./index-9wpr1p2g.js";
83
85
  import {
84
86
  loadDatabaseCtor
85
87
  } from "./index-134d35c1.js";
@@ -105,12 +107,12 @@ import {
105
107
  } from "./index-y8552snf.js";
106
108
  import {
107
109
  readRecentEscalations
108
- } from "./index-g75rbw3e.js";
110
+ } from "./index-zkxnba57.js";
109
111
  import {
110
112
  alreadyCuratedThisGeneration,
111
113
  claimNextScanBatch,
112
114
  resolveCohortId
113
- } from "./index-reknv4f9.js";
115
+ } from "./index-sg48w5e4.js";
114
116
  import {
115
117
  CURATOR_INIT_PROMPT,
116
118
  CURATOR_PHASE_PROMPT,
@@ -159,7 +161,7 @@ import {
159
161
  listActive,
160
162
  subscribe,
161
163
  unsubscribe
162
- } from "./index-k2sm9677.js";
164
+ } from "./index-0q2mjxp2.js";
163
165
  import {
164
166
  BUNDLED_PROJECT_SKILL_ROOT,
165
167
  DEFAULT_SKILL_MIN_CONFIDENCE,
@@ -180,7 +182,7 @@ import {
180
182
  retireSkill,
181
183
  selectCandidateEntries,
182
184
  syncBundledProjectSkillsIfMissingAsync
183
- } from "./index-1rww5k9e.js";
185
+ } from "./index-wna9f75x.js";
184
186
  import {
185
187
  appendUnactionable,
186
188
  quarantineEntry,
@@ -191,11 +193,11 @@ import {
191
193
  validateActionableFields,
192
194
  validateLesson,
193
195
  validateSkillPath
194
- } from "./index-mnhagjvn.js";
196
+ } from "./index-5ep31be7.js";
195
197
  import {
196
198
  authorizeCuration,
197
199
  buildConfigFingerprintInput
198
- } from "./index-4sdhbxgq.js";
200
+ } from "./index-f73px21b.js";
199
201
  import {
200
202
  cohortConfigFingerprint
201
203
  } from "./index-rtry5xyf.js";
@@ -219,7 +221,7 @@ import {
219
221
  scanBackgroundCoderReservationsForAdmission,
220
222
  scanDelegationsForRecovery,
221
223
  sweepStaleDelegations
222
- } from "./index-vy6q9d8j.js";
224
+ } from "./index-z4bg1hv8.js";
223
225
  import {
224
226
  WORKTREE_LIFECYCLE_LOCK_FILE,
225
227
  recordWorktreeProvisioningOwner,
@@ -252,18 +254,18 @@ import {
252
254
  transitionTaskWorkflowEvidence,
253
255
  withTaskEvidenceTransaction,
254
256
  writeWorkflowWalFile
255
- } from "./index-1wmd5wn1.js";
257
+ } from "./index-xeptzfb6.js";
256
258
  import {
257
259
  provisionWorktree,
258
260
  removeWorktree
259
- } from "./index-1rpjd5na.js";
261
+ } from "./index-tfkc0zf4.js";
260
262
  import {
261
263
  MAX_PENDING_SCOPE_BINDINGS,
262
264
  canonicalWorkspaceIdentity,
263
265
  clearAllScopes,
264
266
  clearScopeBindingFromDisk,
265
267
  clearScopeBindings
266
- } from "./index-r5djc1cc.js";
268
+ } from "./index-e9qh1j19.js";
267
269
  import {
268
270
  appendLedgerEvent,
269
271
  computePlanHash,
@@ -278,7 +280,7 @@ import {
278
280
  readPlanEpochIdentity,
279
281
  replayFromLedgerWithStatus,
280
282
  takeSnapshotEvent
281
- } from "./index-zyv56em5.js";
283
+ } from "./index-vs8wtavs.js";
282
284
  import {
283
285
  CORE_EVENT_LOCKED,
284
286
  appendCoreEventSync,
@@ -288,7 +290,7 @@ import {
288
290
  hasSpecDriftAuditEvent,
289
291
  hasTaskRepairAuditEvent,
290
292
  readCoreEvents
291
- } from "./index-exn0ztsv.js";
293
+ } from "./index-6zkm4p7p.js";
292
294
  import {
293
295
  isPathWithinDeclaredScope,
294
296
  sanitizeDiagnosticText
@@ -340,7 +342,7 @@ import {
340
342
  transactFile,
341
343
  transactKnowledge,
342
344
  wordBigrams
343
- } from "./index-ma1p1w05.js";
345
+ } from "./index-sdff3rvj.js";
344
346
  import {
345
347
  MAX_EVENT_LOG_ENTRIES,
346
348
  _internals as _internals2,
@@ -354,10 +356,10 @@ import {
354
356
  recordKnowledgeEvent,
355
357
  recordPhaseCloseIntent,
356
358
  resolveKnowledgeEventsPath
357
- } from "./index-0tn1kxej.js";
359
+ } from "./index-wxkgy9gh.js";
358
360
  import {
359
361
  resolveWorktreeIsolationConfig
360
- } from "./index-w9pb72vg.js";
362
+ } from "./index-tp1avc8j.js";
361
363
  import {
362
364
  RetrospectiveEvidenceSchema
363
365
  } from "./index-gprxjmm7.js";
@@ -379,7 +381,7 @@ import {
379
381
  init_loader,
380
382
  loadPluginConfig,
381
383
  loadPluginConfigWithMeta
382
- } from "./index-t54jt9cs.js";
384
+ } from "./index-7qbyetsf.js";
383
385
  import {
384
386
  DEFAULT_SKILL_OPT_CONFIG,
385
387
  FALLBACK_MODELS_MAX,
@@ -393,7 +395,7 @@ import {
393
395
  package_default,
394
396
  resolveAutoReviewConfig,
395
397
  stripKnownSwarmPrefix
396
- } from "./index-mef0trex.js";
398
+ } from "./index-fkqfcv14.js";
397
399
  import {
398
400
  AGENT_TOOL_MAP,
399
401
  ALL_AGENT_NAMES,
@@ -433,10 +435,10 @@ import {
433
435
  resolveLinkDir,
434
436
  sanitizeLinkId,
435
437
  writeLinkPointer
436
- } from "./index-jb9tb1sd.js";
438
+ } from "./index-v3gshkpz.js";
437
439
  import {
438
440
  atomicWriteFile
439
- } from "./index-apwcvfjt.js";
441
+ } from "./index-frp2hwdg.js";
440
442
  import {
441
443
  KNOWLEDGE_SCHEMA_VERSION,
442
444
  OUTCOME_BLOCK_THRESHOLD,
@@ -448,7 +450,7 @@ import {
448
450
  atomicWriteSwarmFileSync,
449
451
  matchTempGrammar,
450
452
  parseTargetBasename
451
- } from "./index-dtmgt2xn.js";
453
+ } from "./index-dvycdkhj.js";
452
454
  import {
453
455
  assertProjectRoot,
454
456
  hasExplicitProjectBoundary,
@@ -456,12 +458,12 @@ import {
456
458
  listActiveLocks,
457
459
  tryAcquireLock,
458
460
  withEvidenceLock
459
- } from "./index-m8dn0qnm.js";
461
+ } from "./index-txbd25bc.js";
460
462
  import {
461
463
  emit,
462
464
  getLastHeartbeat,
463
465
  telemetry
464
- } from "./index-xggpmtfx.js";
466
+ } from "./index-aw492hpn.js";
465
467
  import {
466
468
  require_proper_lockfile
467
469
  } from "./index-7g4c7s5r.js";
@@ -5599,7 +5601,7 @@ async function cleanupRecoveredWorktree(directory, descriptor) {
5599
5601
  awaitingMergeByCallID,
5600
5602
  cleanupStandardWorktreeForCallId,
5601
5603
  standardWorktreeByCallID
5602
- } = await import("./worktree-isolation-pcr5zv0c.js");
5604
+ } = await import("./worktree-isolation-ka20b0rm.js");
5603
5605
  standardWorktreeByCallID.delete(descriptor.callID);
5604
5606
  if (hasResidue)
5605
5607
  awaitingMergeByCallID.set(descriptor.callID, {
@@ -5701,7 +5703,7 @@ async function recoverCoderSettlement(directory, taskId) {
5701
5703
  awaitingMergeByCallID,
5702
5704
  finishStandardWorktreeDispatch,
5703
5705
  standardWorktreeByCallID
5704
- } = await import("./worktree-isolation-pcr5zv0c.js");
5706
+ } = await import("./worktree-isolation-ka20b0rm.js");
5705
5707
  const descriptor = wal.worktree;
5706
5708
  const reconstructedDispatch = {
5707
5709
  callID: descriptor.callID,
@@ -18503,7 +18505,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
18503
18505
  };
18504
18506
  }
18505
18507
  async function sweepActiveNearDuplicates(directory, options = {}) {
18506
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-s0xz2520.js");
18508
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-02qc4ehj.js");
18507
18509
  const { config } = loadPluginConfigWithMeta2(directory);
18508
18510
  const sweepConfig = config.learning?.dedup_sweep;
18509
18511
  if (sweepConfig?.enabled === false)
@@ -19633,7 +19635,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
19633
19635
  }
19634
19636
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
19635
19637
  try {
19636
- const skillModule = await import("./skill-generator-0gmpxwgk.js");
19638
+ const skillModule = await import("./skill-generator-jr7c8fcg.js");
19637
19639
  for (const cand of skillCandidates) {
19638
19640
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
19639
19641
  continue;
@@ -20105,7 +20107,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
20105
20107
  } catch {}
20106
20108
  }
20107
20109
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
20108
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-pc7smwrd.js");
20110
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-a9dwxqz8.js");
20109
20111
  for (const { id } of contradictedEntries) {
20110
20112
  try {
20111
20113
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -20924,7 +20926,7 @@ async function runCuratorPostMortem(directory, options = {}) {
20924
20926
  warnings.push("Failed to collect knowledge summary.");
20925
20927
  }
20926
20928
  try {
20927
- const { getScanStatus } = await import("./scan-cursor-hr8e3jqj.js");
20929
+ const { getScanStatus } = await import("./scan-cursor-bsrfrxm6.js");
20928
20930
  const scanStatus = await getScanStatus(directory);
20929
20931
  if (scanStatus.remaining_estimate > 0) {
20930
20932
  warnings.push(`Fair scan: reviewed ${knowledgeSummary.length} entries this sweep (generation ${scanStatus.generation}); ${scanStatus.remaining_estimate} more eligible entries will be visited in future curation sweeps.`);
@@ -21096,9 +21098,9 @@ var _internals26 = {
21096
21098
  verifyPostMortemKnowledgeActions,
21097
21099
  repairPostMortemActions,
21098
21100
  loadDefaultKnowledgeConfig: async (directory) => {
21099
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-g44y7s0w.js");
21101
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-s6yh3rst.js");
21100
21102
  try {
21101
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-s0xz2520.js");
21103
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-02qc4ehj.js");
21102
21104
  const loaded = loadPluginConfigWithMeta2(directory);
21103
21105
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
21104
21106
  } catch {
@@ -21106,11 +21108,11 @@ var _internals26 = {
21106
21108
  }
21107
21109
  },
21108
21110
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
21109
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-frrehxxe.js");
21111
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-rym2wtn6.js");
21110
21112
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
21111
21113
  },
21112
21114
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
21113
- const { checkHivePromotions } = await import("./hive-promoter-10zv1b45.js");
21115
+ const { checkHivePromotions } = await import("./hive-promoter-jb2nzv3j.js");
21114
21116
  return checkHivePromotions(entries, knowledgeConfig, directory);
21115
21117
  },
21116
21118
  applyProposalTriage: async (directory, triage) => {
@@ -21119,7 +21121,7 @@ var _internals26 = {
21119
21121
  activateProposal,
21120
21122
  listSkills: listSkills2,
21121
21123
  sanitizeSlug
21122
- } = await import("./skill-generator-0gmpxwgk.js");
21124
+ } = await import("./skill-generator-jr7c8fcg.js");
21123
21125
  const result = {
21124
21126
  approved: [],
21125
21127
  rejected: [],
@@ -22449,9 +22451,9 @@ function hashContent(content) {
22449
22451
  return createHash10("sha1").update(content).digest("hex");
22450
22452
  }
22451
22453
  async function loadConfigForPolicyCurator(directory) {
22452
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-g44y7s0w.js");
22454
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-s6yh3rst.js");
22453
22455
  try {
22454
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-s0xz2520.js");
22456
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-02qc4ehj.js");
22455
22457
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
22456
22458
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
22457
22459
  } catch {
@@ -33658,7 +33660,7 @@ async function runFinalizeStage(ctx) {
33658
33660
  }
33659
33661
  }
33660
33662
  try {
33661
- const { CuratorConfigSchema: CCS } = await import("./schema-g44y7s0w.js");
33663
+ const { CuratorConfigSchema: CCS } = await import("./schema-s6yh3rst.js");
33662
33664
  const { config: pmLoadedConfig } = _internals41.loadPluginConfigWithMeta(ctx.directory);
33663
33665
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
33664
33666
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -33703,6 +33705,12 @@ async function runArchiveStage(ctx) {
33703
33705
  const msg = finalizeErr instanceof Error ? finalizeErr.message : String(finalizeErr);
33704
33706
  ctx.warnings.push(`Core events finalize before archive failed: ${msg}`);
33705
33707
  }
33708
+ try {
33709
+ _internals41.finalizeShellAudit(ctx.directory);
33710
+ } catch (finalizeErr) {
33711
+ const msg = finalizeErr instanceof Error ? finalizeErr.message : String(finalizeErr);
33712
+ ctx.warnings.push(`Shell audit finalize before archive failed: ${msg}`);
33713
+ }
33706
33714
  const linkedKnowledgeShared = isLinked(ctx.directory);
33707
33715
  if (linkedKnowledgeShared) {
33708
33716
  ctx.warnings.push("Worktree is linked: shared knowledge (knowledge.jsonl, knowledge-rejected.jsonl) lives in the link store and is not archived or cleaned by /swarm close. Manage it via the link.");
@@ -34528,7 +34536,7 @@ var _internals41 = {
34528
34536
  closePlanTerminalState: reconcileCloseTerminalStateForPlan,
34529
34537
  endAgentSession,
34530
34538
  flushAndDrainTelemetry: async () => {
34531
- const { flushAndDrainTelemetry } = await import("./telemetry-5deacb7w.js");
34539
+ const { flushAndDrainTelemetry } = await import("./telemetry-52pw5xac.js");
34532
34540
  return flushAndDrainTelemetry();
34533
34541
  },
34534
34542
  finalizeContextTelemetry: (directory) => {
@@ -34536,6 +34544,11 @@ var _internals41 = {
34536
34544
  },
34537
34545
  finalizeCoreEvents: (directory) => {
34538
34546
  finalizeCoreEventsForClose(directory);
34547
+ },
34548
+ finalizeShellAudit: (directory) => {
34549
+ finalizeShellAuditForClose(directory, {
34550
+ lineTransform: redactDecisionLineForArchive
34551
+ });
34539
34552
  }
34540
34553
  };
34541
34554
 
@@ -35860,9 +35873,9 @@ var _internals45 = {
35860
35873
  loadPluginConfigWithMeta,
35861
35874
  loadCuratorDeps: async () => {
35862
35875
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
35863
- import("./schema-g44y7s0w.js"),
35864
- import("./curator-frrehxxe.js"),
35865
- import("./curator-llm-factory-b83jsg02.js")
35876
+ import("./schema-s6yh3rst.js"),
35877
+ import("./curator-rym2wtn6.js"),
35878
+ import("./curator-llm-factory-k0nxn5gt.js")
35866
35879
  ]);
35867
35880
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
35868
35881
  }
@@ -36852,7 +36865,7 @@ async function computeCurationDiagnostics(directory, entries) {
36852
36865
  let scanCompleted = false;
36853
36866
  let scanRemaining = 0;
36854
36867
  try {
36855
- const { getScanStatus } = await import("./scan-cursor-hr8e3jqj.js");
36868
+ const { getScanStatus } = await import("./scan-cursor-bsrfrxm6.js");
36856
36869
  const status = await getScanStatus(directory);
36857
36870
  scanGeneration = status.generation;
36858
36871
  scanCompleted = status.completed;
@@ -36860,19 +36873,19 @@ async function computeCurationDiagnostics(directory, entries) {
36860
36873
  } catch {}
36861
36874
  let configMatch = null;
36862
36875
  try {
36863
- const { isLinked: isLinked2 } = await import("./knowledge-link-mzn8x0qd.js");
36876
+ const { isLinked: isLinked2 } = await import("./knowledge-link-v7hj1h8m.js");
36864
36877
  if (isLinked2(directory)) {
36865
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-g44y7s0w.js");
36878
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-s6yh3rst.js");
36866
36879
  let config;
36867
36880
  try {
36868
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-s0xz2520.js");
36881
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-02qc4ehj.js");
36869
36882
  const loaded = loadPluginConfigWithMeta2(directory);
36870
36883
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
36871
36884
  } catch {
36872
36885
  config = KnowledgeConfigSchema2.parse({});
36873
36886
  }
36874
36887
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
36875
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-nck9g765.js");
36888
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-fmvccdrg.js");
36876
36889
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
36877
36890
  const cohortFp = await readCohortConfigFingerprint(directory);
36878
36891
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -38176,7 +38189,7 @@ async function handleDoctorCommand(directory, args) {
38176
38189
  const result = runConfigDoctor(config, directory);
38177
38190
  let output;
38178
38191
  if (enableAutoFix && result.hasAutoFixableIssues) {
38179
- const { runConfigDoctorWithFixes } = await import("./config-doctor-96qyv31a.js");
38192
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-23ega26j.js");
38180
38193
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
38181
38194
  applyLossy: true
38182
38195
  });
@@ -39116,7 +39129,7 @@ async function handleEvidenceCommand(directory, args) {
39116
39129
  return formatTaskEvidenceMarkdown(evidenceData);
39117
39130
  }
39118
39131
  async function handleEvidenceSummaryCommand(directory) {
39119
- const { buildEvidenceSummary } = await import("./evidence-summary-service-dv4bt2bx.js");
39132
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-f0gvjesf.js");
39120
39133
  const artifact = await buildEvidenceSummary(directory);
39121
39134
  if (!artifact) {
39122
39135
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -70384,7 +70397,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
70384
70397
  if (!input.dispatcher) {
70385
70398
  throw new Error("no evaluation dispatcher available (cannot run validation)");
70386
70399
  }
70387
- const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-1aygs98c.js");
70400
+ const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-7znestx4.js");
70388
70401
  const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
70389
70402
  const result = await _internals96.evaluateCandidateV1({
70390
70403
  projectRoot: input.directory,
@@ -72419,7 +72432,7 @@ function buildDetailedHelp(commandName, entry) {
72419
72432
  async function handleHelpCommand(ctx) {
72420
72433
  const targetCommand = ctx.args.join(" ");
72421
72434
  if (!targetCommand) {
72422
- const { buildHelpText } = await import("./index-8cn6545x.js");
72435
+ const { buildHelpText } = await import("./index-vradyw0x.js");
72423
72436
  return buildHelpText();
72424
72437
  }
72425
72438
  const tokens = targetCommand.split(/\s+/);
@@ -72428,7 +72441,7 @@ async function handleHelpCommand(ctx) {
72428
72441
  return _internals99.buildDetailedHelp(resolved.key, resolved.entry);
72429
72442
  }
72430
72443
  const similar = _internals99.findSimilarCommands(targetCommand);
72431
- const { buildHelpText: fullHelp } = await import("./index-8cn6545x.js");
72444
+ const { buildHelpText: fullHelp } = await import("./index-vradyw0x.js");
72432
72445
  if (similar.length > 0) {
72433
72446
  return `Command '/swarm ${targetCommand}' not found.
72434
72447
 
@@ -72608,7 +72621,7 @@ var COMMAND_REGISTRY = {
72608
72621
  },
72609
72622
  "guardrail explain": {
72610
72623
  handler: async (ctx) => {
72611
- const { handleGuardrailExplain } = await import("./guardrail-explain-1zbk21fq.js");
72624
+ const { handleGuardrailExplain } = await import("./guardrail-explain-cv52smw2.js");
72612
72625
  return handleGuardrailExplain(ctx.directory, ctx.args);
72613
72626
  },
72614
72627
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -72618,7 +72631,7 @@ var COMMAND_REGISTRY = {
72618
72631
  },
72619
72632
  "guardrail reset": {
72620
72633
  handler: async (ctx) => {
72621
- const { handleGuardrailReset } = await import("./guardrail-reset-wb3ba243.js");
72634
+ const { handleGuardrailReset } = await import("./guardrail-reset-vx7zsmzd.js");
72622
72635
  return handleGuardrailReset(ctx.args, ctx.sessionID);
72623
72636
  },
72624
72637
  description: "Reset one exact active invocation/action circuit after repair",
@@ -72627,7 +72640,7 @@ var COMMAND_REGISTRY = {
72627
72640
  },
72628
72641
  "guardrail-explain": {
72629
72642
  handler: async (ctx) => {
72630
- const { handleGuardrailExplain } = await import("./guardrail-explain-1zbk21fq.js");
72643
+ const { handleGuardrailExplain } = await import("./guardrail-explain-cv52smw2.js");
72631
72644
  return handleGuardrailExplain(ctx.directory, ctx.args);
72632
72645
  },
72633
72646
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -72637,7 +72650,7 @@ var COMMAND_REGISTRY = {
72637
72650
  },
72638
72651
  "guardrail-reset": {
72639
72652
  handler: async (ctx) => {
72640
- const { handleGuardrailReset } = await import("./guardrail-reset-wb3ba243.js");
72653
+ const { handleGuardrailReset } = await import("./guardrail-reset-vx7zsmzd.js");
72641
72654
  return handleGuardrailReset(ctx.args, ctx.sessionID);
72642
72655
  },
72643
72656
  description: "Reset one exact active invocation/action circuit after repair",
@@ -72647,7 +72660,7 @@ var COMMAND_REGISTRY = {
72647
72660
  },
72648
72661
  "guardrail-log": {
72649
72662
  handler: async (ctx) => {
72650
- const { handleGuardrailLog } = await import("./guardrail-log-d20jewtr.js");
72663
+ const { handleGuardrailLog } = await import("./guardrail-log-wgwmh9b7.js");
72651
72664
  return handleGuardrailLog(ctx.directory, ctx.args);
72652
72665
  },
72653
72666
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -79073,7 +79086,7 @@ function getDisplayBudget() {
79073
79086
  async function rehydratePrSubscriptions(sessionID, directory) {
79074
79087
  const map = new Map;
79075
79088
  try {
79076
- const { listActive: listActive2 } = await import("./pr-subscriptions-q862pvz1.js");
79089
+ const { listActive: listActive2 } = await import("./pr-subscriptions-7879nq5k.js");
79077
79090
  const records = await listActive2(directory);
79078
79091
  for (const record of records) {
79079
79092
  if (record.sessionID !== sessionID)
@@ -79489,7 +79502,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
79489
79502
  return extracted === expectedSessionId;
79490
79503
  }
79491
79504
  async function inspectStandardWorktreeCollisionOwnership(identity) {
79492
- const collisionOwnership = await import("./worktree-collision-ownership-9v8e0dz7.js");
79505
+ const collisionOwnership = await import("./worktree-collision-ownership-p31zm5k0.js");
79493
79506
  return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
79494
79507
  }
79495
79508
  async function precreateStandardWorktreeSession(args) {
@@ -79637,7 +79650,7 @@ async function precreateStandardWorktreeSession(args) {
79637
79650
  const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, provisionResult.worktreePath);
79638
79651
  if (laneProfile) {
79639
79652
  try {
79640
- const { writeLaneProfileToDiskReal } = await import("./core-xx0x5tfv.js");
79653
+ const { writeLaneProfileToDiskReal } = await import("./core-3g4krkj8.js");
79641
79654
  await writeLaneProfileToDiskReal(provisionResult.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
79642
79655
  } catch {}
79643
79656
  }
@@ -80295,7 +80308,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
80295
80308
  }
80296
80309
  clearWorktreeMergeStatus(statusKey);
80297
80310
  try {
80298
- const { removeLaneProfileFromDiskReal } = await import("./core-xx0x5tfv.js");
80311
+ const { removeLaneProfileFromDiskReal } = await import("./core-3g4krkj8.js");
80299
80312
  await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
80300
80313
  } catch {}
80301
80314
  const state = serializationStateBySessionID.get(dispatch.parentSessionID);
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-prxrmc3b.js";
12
+ } from "./index-9wpr1p2g.js";
13
13
  import {
14
14
  canonicalHash,
15
15
  computeCandidateInputContentHash,
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  stripKnownSwarmPrefix
9
- } from "./index-mef0trex.js";
9
+ } from "./index-fkqfcv14.js";
10
10
  import {
11
11
  ALL_AGENT_NAMES,
12
12
  init_constants