opencode-swarm 7.200.5 → 7.200.7

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 (75) 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-0k72fh70.js → attest-task-rp4xn5wh.js} +31 -27
  4. package/dist/cli/{auto-checkpoint-8g004dar.js → auto-checkpoint-a6x7bw5k.js} +4 -4
  5. package/dist/cli/{checkpoint-18wx2473.js → checkpoint-kpgmse11.js} +8 -8
  6. package/dist/cli/{coder-settlement-r2q6pkxc.js → coder-settlement-f54sfmaj.js} +4 -3
  7. package/dist/cli/{config-doctor-h071vxsj.js → config-doctor-hpakt9zz.js} +7 -7
  8. package/dist/cli/{core-6767154r.js → core-m2x9w49f.js} +1 -1
  9. package/dist/cli/{curator-drift-gd7tckag.js → curator-drift-hxfzkkhg.js} +5 -5
  10. package/dist/cli/{curator-pf0edk2z.js → curator-ghjq55v7.js} +25 -25
  11. package/dist/cli/{curator-llm-factory-mf701qb7.js → curator-llm-factory-b3hk73vd.js} +25 -25
  12. package/dist/cli/{doctor-knowledge-receipt-phase-id-zz0tz3pt.js → doctor-knowledge-receipt-phase-id-wk9vry5a.js} +4 -4
  13. package/dist/cli/{evidence-summary-service-awjxt2am.js → evidence-summary-service-gf50zpwx.js} +9 -9
  14. package/dist/cli/{gate-evidence-tvkhkqwy.js → gate-evidence-7my0f82h.js} +7 -2
  15. package/dist/cli/{guardrail-explain-m70anx1g.js → guardrail-explain-e1ck0csp.js} +26 -26
  16. package/dist/cli/{guardrail-log-3sf6n33b.js → guardrail-log-hkkkwmj1.js} +3 -3
  17. package/dist/cli/{guardrail-reset-t94jbv1q.js → guardrail-reset-wwnbcexb.js} +25 -25
  18. package/dist/cli/{hive-promoter-60h9tqgs.js → hive-promoter-4nzbfwcd.js} +25 -25
  19. package/dist/cli/{index-hfnj4s6r.js → index-0fbtnkyw.js} +25 -25
  20. package/dist/cli/{index-ryrg48c7.js → index-223g5dj9.js} +5 -5
  21. package/dist/cli/{index-yamz6830.js → index-39pge60a.js} +1 -1
  22. package/dist/cli/{index-cy2gbs5b.js → index-5djd4vrn.js} +1 -1
  23. package/dist/cli/{index-1by2qd8n.js → index-6e75mvmn.js} +1 -1
  24. package/dist/cli/{index-b4amh1n3.js → index-6phyfsvn.js} +3 -3
  25. package/dist/cli/{index-se501ytb.js → index-7r9yg7h1.js} +1 -1
  26. package/dist/cli/{index-8c51asrp.js → index-87kk5dqm.js} +232 -97
  27. package/dist/cli/{index-687c2ze1.js → index-8k6jd7a9.js} +3 -3
  28. package/dist/cli/{index-10myvh2k.js → index-bgcanr26.js} +1 -1
  29. package/dist/cli/{index-5qajesjq.js → index-c0dbzf9v.js} +3 -3
  30. package/dist/cli/{index-3x8mz39c.js → index-f3ed5wde.js} +1 -1
  31. package/dist/cli/{index-twwdx79t.js → index-f4tht67a.js} +1 -1
  32. package/dist/cli/{index-74n7sz4s.js → index-g5hghxgw.js} +1 -1
  33. package/dist/cli/{index-dsqavehz.js → index-h9hgxbsw.js} +1 -1
  34. package/dist/cli/{index-k01n01sc.js → index-jfkzhyqs.js} +3 -3
  35. package/dist/cli/{index-1asbb0r4.js → index-k69vjyfm.js} +1 -1
  36. package/dist/cli/{index-xh861gf3.js → index-kmnyh4r1.js} +2 -2
  37. package/dist/cli/{index-ee59rzwk.js → index-mkkwhrtn.js} +2 -2
  38. package/dist/cli/{index-vxbj42j0.js → index-mnpcwcqf.js} +2 -2
  39. package/dist/cli/{index-g1b5xxzc.js → index-p61vaebj.js} +5 -4
  40. package/dist/cli/{index-826kptfe.js → index-q8fy8cxa.js} +3 -3
  41. package/dist/cli/{index-h8419k5d.js → index-qc3qqknb.js} +4 -4
  42. package/dist/cli/{index-4mjfdpte.js → index-ramxwbtt.js} +6 -6
  43. package/dist/cli/{index-1akazdbj.js → index-rjtf507t.js} +48 -3
  44. package/dist/cli/{index-pvj101jx.js → index-sy15gtjr.js} +3 -3
  45. package/dist/cli/{index-xdk3cxs9.js → index-vhkk8grb.js} +27 -27
  46. package/dist/cli/{index-phz90w3t.js → index-vsqc38a0.js} +1 -1
  47. package/dist/cli/{index-vz1fh1v3.js → index-wkz6w3yy.js} +3 -3
  48. package/dist/cli/{index-wyfag7r7.js → index-y76sev7j.js} +2 -2
  49. package/dist/cli/index.js +26 -26
  50. package/dist/cli/{knowledge-escalator-3096yt7j.js → knowledge-escalator-cx03qhmc.js} +7 -7
  51. package/dist/cli/{knowledge-events-st3j22za.js → knowledge-events-cfdd3syn.js} +5 -5
  52. package/dist/cli/{knowledge-store-9q8jvd0p.js → knowledge-store-fgwc40g2.js} +1 -1
  53. package/dist/cli/{knowledge-validator-fak1fvdm.js → knowledge-validator-hvah3jxx.js} +2 -2
  54. package/dist/cli/{mcp-shvt5c9b.js → mcp-1crekab3.js} +1 -1
  55. package/dist/cli/{model-preflight-cxhdzc9c.js → model-preflight-knjgtnwb.js} +25 -25
  56. package/dist/cli/{pending-delegations-tjj8nhmm.js → pending-delegations-3a2tgmgq.js} +2 -2
  57. package/dist/cli/{pr-subscriptions-xtnbfg8m.js → pr-subscriptions-8yprtmt7.js} +1 -1
  58. package/dist/cli/{pr-workflow-gate-24ytg64p.js → pr-workflow-gate-fcpvkwg8.js} +25 -25
  59. package/dist/cli/{scan-cursor-drax4dt3.js → scan-cursor-a776c7b6.js} +2 -2
  60. package/dist/cli/{schema-epr5xxb0.js → schema-evj1vbxz.js} +1 -1
  61. package/dist/cli/{scope-persistence-pyn9vb4r.js → scope-persistence-s1e120ba.js} +5 -5
  62. package/dist/cli/{server-c5b651kg.js → server-exd3q95h.js} +25 -25
  63. package/dist/cli/{skill-generator-r8kvvbh2.js → skill-generator-6r8pxx5z.js} +8 -8
  64. package/dist/cli/{snapshot-coordination-init-wnt85258.js → snapshot-coordination-init-z8b9twvf.js} +25 -25
  65. package/dist/cli/{speckit-checkoff-64p4d5hf.js → speckit-checkoff-hhbcq87w.js} +3 -3
  66. package/dist/cli/{worktree-collision-ownership-eej2phhm.js → worktree-collision-ownership-waf8d48d.js} +2 -2
  67. package/dist/cli/{worktree-isolation-xsc0k2n3.js → worktree-isolation-ea4qe5f5.js} +25 -25
  68. package/dist/gate-evidence.d.ts +20 -0
  69. package/dist/hooks/guardrails/tool-before.d.ts +1 -1
  70. package/dist/hooks/shell-executor-context.d.ts +17 -0
  71. package/dist/hooks/shell-write-detect.d.ts +26 -0
  72. package/dist/host/v2/hooks.d.ts +20 -0
  73. package/dist/host/v2/types.d.ts +27 -0
  74. package/dist/index.js +17 -17
  75. package/package.json +1 -1
@@ -4,7 +4,7 @@ import {
4
4
  ensureTaskCheckpointReceipt,
5
5
  loadPlan,
6
6
  updateTaskCheckpointReceipt
7
- } from "./index-ryrg48c7.js";
7
+ } from "./index-223g5dj9.js";
8
8
  import {
9
9
  tool
10
10
  } from "./index-9nyqt3kb.js";
@@ -25,7 +25,7 @@ import {
25
25
  } from "./index-4krkevgc.js";
26
26
  import {
27
27
  readLedgerEvents
28
- } from "./index-vxbj42j0.js";
28
+ } from "./index-mnpcwcqf.js";
29
29
  import {
30
30
  appendCoreEventSync
31
31
  } from "./index-vtpt8yns.js";
@@ -46,7 +46,7 @@ import {
46
46
  } from "./index-mn75z39t.js";
47
47
  import {
48
48
  loadPluginConfigWithMeta
49
- } from "./index-dsqavehz.js";
49
+ } from "./index-h9hgxbsw.js";
50
50
  import {
51
51
  GIT_BINARY_ENV_VAR,
52
52
  describeGitResolution,
@@ -9,7 +9,7 @@ import {
9
9
  resolveSwarmKnowledgePath,
10
10
  resolveSwarmRejectedPath,
11
11
  transactKnowledge
12
- } from "./index-h8419k5d.js";
12
+ } from "./index-qc3qqknb.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
15
  } from "./index-4fkxdnc7.js";
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  writeSpeckitCheckoffLedger
4
- } from "./index-phz90w3t.js";
4
+ } from "./index-vsqc38a0.js";
5
5
  import {
6
6
  validateSpecContent
7
7
  } from "./index-0725jpp7.js";
8
8
  import {
9
9
  init_loader,
10
10
  readSddSourceSetting
11
- } from "./index-dsqavehz.js";
11
+ } from "./index-h9hgxbsw.js";
12
12
  import {
13
13
  advisoryWarn,
14
14
  init_warning_buffer
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  SDD_SOURCES,
22
22
  init_schema
23
- } from "./index-se501ytb.js";
23
+ } from "./index-7r9yg7h1.js";
24
24
 
25
25
  // src/sdd/effective-spec.ts
26
26
  init_loader();
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-h8419k5d.js";
5
+ } from "./index-qc3qqknb.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-4fkxdnc7.js";
@@ -244,7 +244,7 @@ var _internals2 = {
244
244
  symlinkSync: fs2.symlinkSync
245
245
  },
246
246
  writeScopeToDisk: async (directory, taskId, files) => {
247
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-pyn9vb4r.js");
247
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-s1e120ba.js");
248
248
  return realWrite(directory, taskId, files);
249
249
  },
250
250
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  readEffectiveSpecSync
4
- } from "./index-5qajesjq.js";
4
+ } from "./index-c0dbzf9v.js";
5
5
  import {
6
6
  readSwarmFileAsync
7
7
  } from "./index-4krkevgc.js";
@@ -16,7 +16,7 @@ import {
16
16
  init_schema,
17
17
  resolveExternalSkillsConfig,
18
18
  retiredEpicKeyReplacement
19
- } from "./index-se501ytb.js";
19
+ } from "./index-7r9yg7h1.js";
20
20
  import {
21
21
  DangerousMergeKeyError,
22
22
  MAX_MERGE_DEPTH,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  loadPlanJsonOnly
4
- } from "./index-ryrg48c7.js";
4
+ } from "./index-223g5dj9.js";
5
5
  import {
6
6
  isCanonicalPathWithinRoot
7
7
  } from "./index-6b295cas.js";
@@ -14,7 +14,7 @@ import {
14
14
  legacyEpicIssuePath,
15
15
  migrateLegacyEpicConfig,
16
16
  resolveEpicConfig
17
- } from "./index-dsqavehz.js";
17
+ } from "./index-h9hgxbsw.js";
18
18
  import {
19
19
  log
20
20
  } from "./index-zgwm4ryv.js";
@@ -28,7 +28,7 @@ import {
28
28
  init_schema,
29
29
  retiredEpicKeyReplacement,
30
30
  stripKnownSwarmPrefix
31
- } from "./index-se501ytb.js";
31
+ } from "./index-7r9yg7h1.js";
32
32
  import {
33
33
  ALL_AGENT_NAMES,
34
34
  TOOL_NAME_SET,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  computePlanStructureHash
4
- } from "./index-vxbj42j0.js";
4
+ } from "./index-mnpcwcqf.js";
5
5
  import {
6
6
  deleteCoordinationState,
7
7
  importCoordinationOnce,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-dsqavehz.js";
5
+ } from "./index-h9hgxbsw.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-se501ytb.js";
8
+ } from "./index-7r9yg7h1.js";
9
9
  import {
10
10
  DEFAULT_WORKTREE_ISOLATION_CONFIG,
11
11
  init_constants
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  queryHistoricalOutcomes
4
- } from "./index-wyfag7r7.js";
4
+ } from "./index-y76sev7j.js";
5
5
  import {
6
6
  resolveHiveEventsPath
7
7
  } from "./index-ae75rja9.js";
@@ -708,7 +708,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
708
708
  }
709
709
  let bumps = 0;
710
710
  if (deltas.length > 0) {
711
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-9q8jvd0p.js");
711
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-fgwc40g2.js");
712
712
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
713
713
  }
714
714
  return {
@@ -27,7 +27,7 @@ import {
27
27
  import {
28
28
  init_loader,
29
29
  loadPluginConfig
30
- } from "./index-dsqavehz.js";
30
+ } from "./index-h9hgxbsw.js";
31
31
  import {
32
32
  criticalWarn,
33
33
  init_logger,
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  init_package,
38
38
  package_default
39
- } from "./index-se501ytb.js";
39
+ } from "./index-7r9yg7h1.js";
40
40
 
41
41
  // src/plan/planning-profile.ts
42
42
  init_loader();
@@ -13,6 +13,7 @@ import {
13
13
  declaresWindowsWrapperLoose,
14
14
  detectPosixWrites,
15
15
  detectWindowsWrites,
16
+ getObservedHostShell,
16
17
  getSharedClassifierGuardrailBlock,
17
18
  isEmptyDirectoryRemovalWithinWorkspace,
18
19
  isPosixRmdirExecutor,
@@ -21,14 +22,14 @@ import {
21
22
  mergeWriteAnalyses,
22
23
  resolveWindowsWriteAuthority,
23
24
  resolveWriteTargets
24
- } from "./index-8c51asrp.js";
25
+ } from "./index-87kk5dqm.js";
25
26
  import {
26
27
  checkFileAuthority,
27
28
  classifyFile,
28
29
  isInDeclaredScope,
29
30
  redactPath,
30
31
  redactShellCommand
31
- } from "./index-1by2qd8n.js";
32
+ } from "./index-6e75mvmn.js";
32
33
 
33
34
  // src/services/guardrail-explain-service.ts
34
35
  import path from "path";
@@ -369,7 +370,7 @@ async function handleGuardrailExplain(directory, args) {
369
370
  `) : shellCommand;
370
371
  if (decision === "allow") {
371
372
  const detected = resolveShellType(shellCommand);
372
- const authority = resolveWindowsWriteAuthority("shell", shellCommand, detected, isPowerShellShaped(shellCommand));
373
+ const authority = resolveWindowsWriteAuthority("shell", shellCommand, detected, isPowerShellShaped(shellCommand), process.platform, getObservedHostShell());
373
374
  const wrapperDeclaredHere = declaresWindowsWrapperLoose(shellCommand);
374
375
  const posix = detectPosixWrites(detectionCommand);
375
376
  const analysis = authority === null ? posix : mergeWriteAnalyses(posix, detectWindowsWrites(detectionCommand, authority), true, wrapperDeclaredHere);
@@ -402,7 +403,7 @@ async function handleGuardrailExplain(directory, args) {
402
403
  }
403
404
  } else {
404
405
  const detected = resolveShellType(shellCommand);
405
- const authority = resolveWindowsWriteAuthority("shell", shellCommand, detected, isPowerShellShaped(shellCommand));
406
+ const authority = resolveWindowsWriteAuthority("shell", shellCommand, detected, isPowerShellShaped(shellCommand), process.platform, getObservedHostShell());
406
407
  const wrapperDeclaredElse = declaresWindowsWrapperLoose(shellCommand);
407
408
  const posix = detectPosixWrites(detectionCommand);
408
409
  const analysis = authority === null ? posix : mergeWriteAnalyses(posix, detectWindowsWrites(detectionCommand, authority), true, wrapperDeclaredElse);
@@ -14,7 +14,7 @@ import {
14
14
  reconcileLandedMerge,
15
15
  withTaskEvidenceTransaction,
16
16
  writeWorkflowWalFile
17
- } from "./index-1akazdbj.js";
17
+ } from "./index-rjtf507t.js";
18
18
  import {
19
19
  validateSwarmPath
20
20
  } from "./index-4krkevgc.js";
@@ -512,7 +512,7 @@ async function cleanupRecoveredWorktree(directory, descriptor, options) {
512
512
  awaitingMergeByCallID,
513
513
  cleanupStandardWorktreeForCallId,
514
514
  standardWorktreeByCallID
515
- } = await import("./worktree-isolation-xsc0k2n3.js");
515
+ } = await import("./worktree-isolation-ea4qe5f5.js");
516
516
  standardWorktreeByCallID.delete(descriptor.callID);
517
517
  if (hasResidue)
518
518
  awaitingMergeByCallID.set(descriptor.callID, {
@@ -648,7 +648,7 @@ async function recoverCoderSettlement(directory, taskId) {
648
648
  awaitingMergeByCallID,
649
649
  finishStandardWorktreeDispatch,
650
650
  standardWorktreeByCallID
651
- } = await import("./worktree-isolation-xsc0k2n3.js");
651
+ } = await import("./worktree-isolation-ea4qe5f5.js");
652
652
  const descriptor = wal.worktree;
653
653
  const reconstructedDispatch = {
654
654
  callID: descriptor.callID,
@@ -739,7 +739,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
739
739
  const {
740
740
  readAuthoritativeKnowledgeCounterRollups,
741
741
  effectiveRetrievalOutcomes
742
- } = await import("./knowledge-events-st3j22za.js");
742
+ } = await import("./knowledge-events-cfdd3syn.js");
743
743
  const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
744
744
  const flagIds = new Set;
745
745
  for (const e of atFloor) {
@@ -806,11 +806,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
806
806
  });
807
807
  }
808
808
  if (action === "quarantine" && toQuarantine.length > 0) {
809
- const { quarantineEntry } = await import("./knowledge-validator-fak1fvdm.js");
810
- const { KnowledgeConfigSchema } = await import("./schema-epr5xxb0.js");
809
+ const { quarantineEntry } = await import("./knowledge-validator-hvah3jxx.js");
810
+ const { KnowledgeConfigSchema } = await import("./schema-evj1vbxz.js");
811
811
  let config;
812
812
  try {
813
- const { loadPluginConfigWithMeta } = await import("./index-vz1fh1v3.js");
813
+ const { loadPluginConfigWithMeta } = await import("./index-wkz6w3yy.js");
814
814
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
815
815
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
816
816
  } catch {
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  readKnowledgeEvents,
4
4
  recordKnowledgeEvent
5
- } from "./index-ee59rzwk.js";
5
+ } from "./index-mkkwhrtn.js";
6
6
  import {
7
7
  queryHistoricalOutcomes
8
- } from "./index-wyfag7r7.js";
8
+ } from "./index-y76sev7j.js";
9
9
  import {
10
10
  jaccardBigram,
11
11
  readKnowledge,
@@ -13,7 +13,7 @@ import {
13
13
  resolveSwarmKnowledgePath,
14
14
  transactKnowledge,
15
15
  wordBigrams
16
- } from "./index-h8419k5d.js";
16
+ } from "./index-qc3qqknb.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -226,11 +226,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
226
226
  alreadyInactive: true
227
227
  };
228
228
  }
229
- const { quarantineEntry } = await import("./knowledge-validator-fak1fvdm.js");
229
+ const { quarantineEntry } = await import("./knowledge-validator-hvah3jxx.js");
230
230
  let policyConfig;
231
231
  try {
232
- const { KnowledgeConfigSchema } = await import("./schema-epr5xxb0.js");
233
- const { loadPluginConfigWithMeta } = await import("./index-vz1fh1v3.js");
232
+ const { KnowledgeConfigSchema } = await import("./schema-evj1vbxz.js");
233
+ const { loadPluginConfigWithMeta } = await import("./index-wkz6w3yy.js");
234
234
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
235
235
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
236
236
  } catch {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  autoCommitDirty,
4
4
  cleanUntrackedFiles
5
- } from "./index-twwdx79t.js";
5
+ } from "./index-f4tht67a.js";
6
6
  import {
7
7
  isSpawnCwdMissing,
8
8
  isSpawnCwdUnreadable
@@ -10,6 +10,10 @@ import {
10
10
  import {
11
11
  validateSwarmPath
12
12
  } from "./index-4krkevgc.js";
13
+ import {
14
+ derivePlanId,
15
+ derivePlanIdentityHash
16
+ } from "./index-7pmbnjvj.js";
13
17
  import {
14
18
  init_path_identity,
15
19
  isPathWithinDeclaredScope,
@@ -1906,6 +1910,8 @@ var TaskEvidenceSchema = exports_external.object({
1906
1910
  turbo: exports_external.boolean().optional(),
1907
1911
  requirements_state: exports_external.enum(["known", "unknown"]).optional(),
1908
1912
  test_engineer_exempt: exports_external.boolean().optional(),
1913
+ planId: exports_external.string().optional(),
1914
+ planIdentityHash: exports_external.string().regex(/^[a-f0-9]{64}$/).optional(),
1909
1915
  workflow: TaskWorkflowMetadataSchema.optional(),
1910
1916
  repair_provenance: exports_external.object({
1911
1917
  source_sha256: exports_external.string().regex(/^[a-f0-9]{64}$/).nullable(),
@@ -1926,6 +1932,43 @@ function parseTaskEvidence(raw, expectedTaskId) {
1926
1932
  }
1927
1933
  return parsed;
1928
1934
  }
1935
+ function resolveCurrentPlanIdentitySync(directory) {
1936
+ if (!directory)
1937
+ return null;
1938
+ try {
1939
+ const planPath = path4.join(directory, ".swarm", "plan.json");
1940
+ const raw = readFileSync3(planPath, "utf8");
1941
+ const plan = JSON.parse(raw);
1942
+ if (typeof plan.swarm !== "string" || typeof plan.title !== "string")
1943
+ return null;
1944
+ return {
1945
+ planId: derivePlanId(plan),
1946
+ planIdentityHash: derivePlanIdentityHash(plan)
1947
+ };
1948
+ } catch {
1949
+ return null;
1950
+ }
1951
+ }
1952
+ function evidenceStampedForDifferentPlan(evidence, currentPlanIdentityHash) {
1953
+ if (evidence == null || currentPlanIdentityHash == null)
1954
+ return false;
1955
+ return typeof evidence.planIdentityHash === "string" && evidence.planIdentityHash !== currentPlanIdentityHash;
1956
+ }
1957
+ function planStampForPersist(nextEvidence, previous, planIdentity, campaignRestart) {
1958
+ if (nextEvidence.planIdentityHash !== undefined)
1959
+ return {};
1960
+ const carriesGates = Object.keys(nextEvidence.gates ?? {}).length > 0;
1961
+ if (carriesGates && previous != null && !campaignRestart) {
1962
+ return previous.planIdentityHash !== undefined ? {
1963
+ ...previous.planId !== undefined ? { planId: previous.planId } : {},
1964
+ planIdentityHash: previous.planIdentityHash
1965
+ } : {};
1966
+ }
1967
+ return planIdentity ? {
1968
+ planId: planIdentity.planId,
1969
+ planIdentityHash: planIdentity.planIdentityHash
1970
+ } : {};
1971
+ }
1929
1972
  var DEFAULT_REQUIRED_GATES = ["reviewer", "test_engineer"];
1930
1973
  var DEFAULT_WORKFLOW_STATE = "idle";
1931
1974
  var WORKFLOW_STATE_RANK = {
@@ -2501,9 +2544,11 @@ async function withTaskEvidenceTransaction(directory, taskId, agent, callback) {
2501
2544
  throw error;
2502
2545
  }
2503
2546
  const persist = async (nextEvidence, event) => {
2547
+ const planIdentity = resolveCurrentPlanIdentitySync(directory);
2504
2548
  const validated = TaskEvidenceSchema.parse({
2505
2549
  ...nextEvidence,
2506
- taskId
2550
+ taskId,
2551
+ ...planStampForPersist(nextEvidence, current, planIdentity, event?.type === "accepted_mutation" && event.agentType === "coder" && nextEvidence !== current)
2507
2552
  });
2508
2553
  await atomicWriteFile(evidencePath, JSON.stringify(validated, null, 2));
2509
2554
  if (event) {
@@ -2663,4 +2708,4 @@ function compareTaskWorkflowStateRank(left, right) {
2663
2708
  return WORKFLOW_STATE_RANK[left] - WORKFLOW_STATE_RANK[right];
2664
2709
  }
2665
2710
 
2666
- export { readTaskGateRequirementsReceiptsSync, routeEvidenceFromTaskGateRequirements, isLegacyTaskGateRequirementsChain, isStrictTaskId, sanitizeTaskId, validateTaskIdFormat, listRecoveryRecords, recoveryReadErrored, _internals, SOURCE_WORKTREE_GONE_STAGE, SOURCE_WORKTREE_UNCERTAIN_STAGE, getMergeStrategy, recoverMergeBackFromImmutableCoordinates, reconcileLandedMerge, postMergeCleanup, pruneStaleWorktreeMetadata, attemptMergeBackFromDirty, cleanupOrphanedBranches, startupOrphanRecovery, readWorkflowWalFile, writeWorkflowWalFile, _internals3 as _internals1, TASK_WORKFLOW_SCHEMA_MARKER, readCurrentTaskDeclaredFiles, TASK_GATE_REQUIREMENTS_RECONSTRUCTION_SENTINEL, assertTaskEvidenceWriteAllowed, ExternalEvidenceBundleSchema, parseTaskEvidence, DEFAULT_REQUIRED_GATES, isValidTaskId, getTaskWorkflowSnapshot, deriveApplicableGateSet, isReadOnlyNoMutationEligible, computeExternalDeclarationDigest, externalProofCurrent, isExternalEvidenceInitialCompletionEligible, reduceTaskWorkflowSnapshot, deriveRequiredGates, expandRequiredGates, transitionTaskWorkflowEvidence, transitionTaskWorkflowEvidenceWithStatus, withTaskEvidenceTransaction, ensureTaskGateRequirementsReceiptForSettledTransition, recordGateEvidence, recordTodoScanEvidence, recordAgentDispatch, readTaskEvidence, readTaskEvidenceState, readTaskEvidenceRaw, hasPassedAllGates, compareTaskWorkflowStateRank };
2711
+ export { readTaskGateRequirementsReceiptsSync, routeEvidenceFromTaskGateRequirements, isLegacyTaskGateRequirementsChain, isStrictTaskId, sanitizeTaskId, validateTaskIdFormat, listRecoveryRecords, recoveryReadErrored, _internals, SOURCE_WORKTREE_GONE_STAGE, SOURCE_WORKTREE_UNCERTAIN_STAGE, getMergeStrategy, recoverMergeBackFromImmutableCoordinates, reconcileLandedMerge, postMergeCleanup, pruneStaleWorktreeMetadata, attemptMergeBackFromDirty, cleanupOrphanedBranches, startupOrphanRecovery, readWorkflowWalFile, writeWorkflowWalFile, _internals3 as _internals1, TASK_WORKFLOW_SCHEMA_MARKER, readCurrentTaskDeclaredFiles, TASK_GATE_REQUIREMENTS_RECONSTRUCTION_SENTINEL, assertTaskEvidenceWriteAllowed, ExternalEvidenceBundleSchema, parseTaskEvidence, resolveCurrentPlanIdentitySync, evidenceStampedForDifferentPlan, DEFAULT_REQUIRED_GATES, isValidTaskId, getTaskWorkflowSnapshot, deriveApplicableGateSet, isReadOnlyNoMutationEligible, computeExternalDeclarationDigest, externalProofCurrent, isExternalEvidenceInitialCompletionEligible, reduceTaskWorkflowSnapshot, deriveRequiredGates, expandRequiredGates, transitionTaskWorkflowEvidence, transitionTaskWorkflowEvidenceWithStatus, withTaskEvidenceTransaction, ensureTaskGateRequirementsReceiptForSettledTransition, recordGateEvidence, recordTodoScanEvidence, recordAgentDispatch, readTaskEvidence, readTaskEvidenceState, readTaskEvidenceRaw, hasPassedAllGates, compareTaskWorkflowStateRank };
@@ -543,7 +543,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
543
543
  return null;
544
544
  throw error;
545
545
  }
546
- const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-24ytg64p.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
546
+ const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-fcpvkwg8.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
547
547
  if (!legacy)
548
548
  return null;
549
549
  const namespace = workflowGateStateCoordinationNamespace(sessionID);
@@ -677,7 +677,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
677
677
  let recoveryState = null;
678
678
  if (!currentAuthoritative) {
679
679
  if (options.allowSalvagedRead) {
680
- const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-24ytg64p.js");
680
+ const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-fcpvkwg8.js");
681
681
  recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
682
682
  }
683
683
  if (!recoveryState) {
@@ -6266,7 +6266,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
6266
6266
  const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
6267
6267
  if (candidates.length === 0)
6268
6268
  return 0;
6269
- const { transferCoderSettlementToBackground } = await import("./coder-settlement-r2q6pkxc.js");
6269
+ const { transferCoderSettlementToBackground } = await import("./coder-settlement-f54sfmaj.js");
6270
6270
  let transferred = 0;
6271
6271
  for (const record of candidates) {
6272
6272
  try {
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-g1b5xxzc.js";
4
+ } from "./index-p61vaebj.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-yamz6830.js";
7
+ } from "./index-39pge60a.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  DEFAULT_CI_DEADLINE_MS,
@@ -98,51 +98,51 @@ import {
98
98
  handleWriteRetroCommand,
99
99
  normalizeSwarmCommandInput,
100
100
  resolveCommand
101
- } from "./index-8c51asrp.js";
101
+ } from "./index-87kk5dqm.js";
102
102
  import"./index-p2dst45x.js";
103
- import"./index-1by2qd8n.js";
104
- import"./index-k01n01sc.js";
105
- import"./index-cy2gbs5b.js";
103
+ import"./index-6e75mvmn.js";
104
+ import"./index-jfkzhyqs.js";
105
+ import"./index-5djd4vrn.js";
106
106
  import"./index-4ph7ad0b.js";
107
107
  import"./index-axqyjreb.js";
108
108
  import"./index-txdagbh7.js";
109
- import"./index-4mjfdpte.js";
110
- import"./index-3x8mz39c.js";
109
+ import"./index-ramxwbtt.js";
110
+ import"./index-f3ed5wde.js";
111
111
  import"./index-rdec0y3z.js";
112
- import"./index-74n7sz4s.js";
113
- import"./index-826kptfe.js";
114
- import"./index-b4amh1n3.js";
112
+ import"./index-g5hghxgw.js";
113
+ import"./index-q8fy8cxa.js";
114
+ import"./index-6phyfsvn.js";
115
115
  import"./index-bk8r4m9j.js";
116
116
  import"./index-tecp3a77.js";
117
117
  import"./index-x5jwegqw.js";
118
118
  import"./index-7h22y3ew.js";
119
- import"./index-pvj101jx.js";
119
+ import"./index-sy15gtjr.js";
120
120
  import"./index-pt7h91zc.js";
121
121
  import"./index-q7sjgr1y.js";
122
- import"./index-687c2ze1.js";
123
- import"./index-ryrg48c7.js";
122
+ import"./index-8k6jd7a9.js";
123
+ import"./index-223g5dj9.js";
124
124
  import"./index-6b295cas.js";
125
125
  import"./index-9nyqt3kb.js";
126
- import"./index-5qajesjq.js";
126
+ import"./index-c0dbzf9v.js";
127
127
  import"./index-697mg68b.js";
128
128
  import"./index-8mrentmw.js";
129
- import"./index-phz90w3t.js";
130
- import"./index-1akazdbj.js";
131
- import"./index-twwdx79t.js";
129
+ import"./index-vsqc38a0.js";
130
+ import"./index-rjtf507t.js";
131
+ import"./index-f4tht67a.js";
132
132
  import"./index-spggmr30.js";
133
- import"./index-ee59rzwk.js";
134
- import"./index-wyfag7r7.js";
133
+ import"./index-mkkwhrtn.js";
134
+ import"./index-y76sev7j.js";
135
135
  import"./index-m9zzj4ee.js";
136
136
  import"./index-4krkevgc.js";
137
- import"./index-10myvh2k.js";
137
+ import"./index-bgcanr26.js";
138
138
  import"./index-mhd6kdzr.js";
139
139
  import"./index-rtry5xyf.js";
140
- import"./index-xh861gf3.js";
140
+ import"./index-kmnyh4r1.js";
141
141
  import"./index-g22dps7x.js";
142
142
  import"./index-0725jpp7.js";
143
- import"./index-1asbb0r4.js";
143
+ import"./index-k69vjyfm.js";
144
144
  import"./index-v839c9mv.js";
145
- import"./index-vxbj42j0.js";
145
+ import"./index-mnpcwcqf.js";
146
146
  import"./index-2x015vjy.js";
147
147
  import"./index-y7c4hqcj.js";
148
148
  import"./index-ry16d01s.js";
@@ -151,7 +151,7 @@ import"./index-vtpt8yns.js";
151
151
  import"./index-7pmbnjvj.js";
152
152
  import"./index-8srvdpw6.js";
153
153
  import"./index-9rwhas09.js";
154
- import"./index-h8419k5d.js";
154
+ import"./index-qc3qqknb.js";
155
155
  import"./index-vzm6zre7.js";
156
156
  import"./index-ae75rja9.js";
157
157
  import"./index-4fkxdnc7.js";
@@ -164,14 +164,14 @@ import"./index-ejhxgyvm.js";
164
164
  import"./index-7g4c7s5r.js";
165
165
  import"./index-mn75z39t.js";
166
166
  import"./index-3t46mez1.js";
167
- import"./index-dsqavehz.js";
167
+ import"./index-h9hgxbsw.js";
168
168
  import"./index-sp2cxpaq.js";
169
169
  import"./index-qbxk2rn6.js";
170
170
  import"./index-zgwm4ryv.js";
171
171
  import {
172
172
  init_schema,
173
173
  stripKnownSwarmPrefix
174
- } from "./index-se501ytb.js";
174
+ } from "./index-7r9yg7h1.js";
175
175
  import {
176
176
  AGENT_TOOL_MAP,
177
177
  ORCHESTRATOR_NAME,
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  init_loader,
11
11
  loadPluginConfig
12
- } from "./index-dsqavehz.js";
12
+ } from "./index-h9hgxbsw.js";
13
13
  import {
14
14
  init_logger,
15
15
  log,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  _internals,
4
4
  resolveWorktreeIsolationConfig
5
- } from "./index-xh861gf3.js";
5
+ } from "./index-kmnyh4r1.js";
6
6
  import {
7
7
  ApprovalEvidenceSchema,
8
8
  BaseEvidenceSchema,
@@ -46,7 +46,7 @@ import {
46
46
  loadPluginConfigWithMeta,
47
47
  loadPluginConfigWithMetaAsync,
48
48
  resetConfigAdvisoryDedup
49
- } from "./index-dsqavehz.js";
49
+ } from "./index-h9hgxbsw.js";
50
50
  import"./index-sp2cxpaq.js";
51
51
  import"./index-qbxk2rn6.js";
52
52
  import"./index-zgwm4ryv.js";
@@ -74,7 +74,7 @@ import {
74
74
  TurboConfigSchema,
75
75
  WorktreeIsolationConfigSchema,
76
76
  resolveAutoReviewConfig
77
- } from "./index-se501ytb.js";
77
+ } from "./index-7r9yg7h1.js";
78
78
  import {
79
79
  ALL_AGENT_NAMES,
80
80
  ALL_SUBAGENT_NAMES,
@@ -23,11 +23,11 @@ import {
23
23
  } from "./index-3t46mez1.js";
24
24
  import {
25
25
  loadPluginConfigWithMeta
26
- } from "./index-dsqavehz.js";
26
+ } from "./index-h9hgxbsw.js";
27
27
  import {
28
28
  KnowledgeConfigSchema,
29
29
  init_schema
30
- } from "./index-se501ytb.js";
30
+ } from "./index-7r9yg7h1.js";
31
31
 
32
32
  // src/utils/context-decisions.ts
33
33
  function extractContextDecisions(content) {