opencode-swarm 7.200.11 → 7.200.13

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 (77) hide show
  1. package/.opencode/skills/test-file-split/SKILL.md +6 -1
  2. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  3. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  4. package/dist/cli/{attest-task-y0n69zgb.js → attest-task-pvwft49v.js} +26 -26
  5. package/dist/cli/{auto-checkpoint-hyaksmtg.js → auto-checkpoint-d42tskyk.js} +4 -4
  6. package/dist/cli/{checkpoint-t0p781sc.js → checkpoint-ga9vbvb1.js} +8 -8
  7. package/dist/cli/{coder-settlement-nh88s6es.js → coder-settlement-rbhdzxs0.js} +4 -4
  8. package/dist/cli/{config-doctor-sf7hc0q4.js → config-doctor-qh3aba3c.js} +7 -7
  9. package/dist/cli/{core-p168fw3r.js → core-vx7fxf4y.js} +1 -1
  10. package/dist/cli/{curator-5ayzhk7v.js → curator-0nv1asjc.js} +26 -26
  11. package/dist/cli/{curator-drift-jx9kyndc.js → curator-drift-4e5nsjec.js} +5 -5
  12. package/dist/cli/{curator-llm-factory-ytfkvtxs.js → curator-llm-factory-cn47pa0k.js} +26 -26
  13. package/dist/cli/{doctor-knowledge-receipt-phase-id-2gjvxndy.js → doctor-knowledge-receipt-phase-id-5qs5w6jz.js} +4 -4
  14. package/dist/cli/{evidence-summary-service-972sqht5.js → evidence-summary-service-fbhdnww1.js} +10 -10
  15. package/dist/cli/{gate-evidence-n1m842gj.js → gate-evidence-44bzkpnp.js} +3 -3
  16. package/dist/cli/{guardrail-explain-6yv78gmk.js → guardrail-explain-ga6m57w3.js} +27 -27
  17. package/dist/cli/{guardrail-log-z5pzgkcv.js → guardrail-log-aekacstp.js} +3 -3
  18. package/dist/cli/{guardrail-reset-w0nxcs6a.js → guardrail-reset-ezjd8vtv.js} +26 -26
  19. package/dist/cli/{hive-promoter-3q0738xg.js → hive-promoter-r8z673jn.js} +26 -26
  20. package/dist/cli/{index-ssp4t8g6.js → index-0g2nvyn9.js} +28 -28
  21. package/dist/cli/{index-nnc23ddw.js → index-165v1k07.js} +3 -3
  22. package/dist/cli/{index-ve74c3a8.js → index-1nnrz6yd.js} +6 -6
  23. package/dist/cli/{index-0g0x9ets.js → index-1w9mc5ck.js} +26 -26
  24. package/dist/cli/{index-yq73sd3w.js → index-3jewj7q3.js} +1 -1
  25. package/dist/cli/{index-mq4eyhtf.js → index-6kdyc1s7.js} +1 -1
  26. package/dist/cli/{index-2vj8d8te.js → index-6tpmpc0f.js} +1 -1
  27. package/dist/cli/{index-jt9j02tm.js → index-6xaft4r3.js} +1 -1
  28. package/dist/cli/{index-8g9rn3rp.js → index-7811ftfy.js} +5 -5
  29. package/dist/cli/{index-krjamprc.js → index-8az4qgz7.js} +2 -2
  30. package/dist/cli/{index-ke881z7m.js → index-8kta0a96.js} +2 -2
  31. package/dist/cli/{index-kzr3nby8.js → index-9v10n049.js} +2 -2
  32. package/dist/cli/{index-0an54fza.js → index-9zw7mh20.js} +3 -3
  33. package/dist/cli/{index-ce6qarfq.js → index-a01knv2b.js} +276 -133
  34. package/dist/cli/{index-814q5t5s.js → index-cc2vkpg7.js} +1 -1
  35. package/dist/cli/{index-gkvk9et2.js → index-dkg8meb8.js} +3 -3
  36. package/dist/cli/{index-njg8zvqe.js → index-ffz00br0.js} +3 -3
  37. package/dist/cli/{index-5k88v1e7.js → index-fh22ndnh.js} +1 -1
  38. package/dist/cli/{index-nzhfhpng.js → index-fxnj2qd5.js} +1 -1
  39. package/dist/cli/{index-ra3erqpk.js → index-h59n1rx5.js} +2 -2
  40. package/dist/cli/{index-r097ettz.js → index-h8ta8mva.js} +1 -1
  41. package/dist/cli/{index-bv9tqmpm.js → index-hs96g7xz.js} +1 -1
  42. package/dist/cli/{index-hhzwfyd7.js → index-krrn8eg3.js} +1 -1
  43. package/dist/cli/{index-x8sh8v4a.js → index-nfjwshs6.js} +1 -1
  44. package/dist/cli/{index-yn6jrxen.js → index-pxf512yn.js} +3 -3
  45. package/dist/cli/{index-2n7a184b.js → index-q0gtj1px.js} +2 -2
  46. package/dist/cli/{index-qdz6zysj.js → index-qg38v82w.js} +4 -4
  47. package/dist/cli/{index-bnbhqvsn.js → index-sx4fm1d2.js} +1 -1
  48. package/dist/cli/{index-aj41bscz.js → index-v4g6rm68.js} +3 -3
  49. package/dist/cli/{index-xht6gprr.js → index-x9gyt21k.js} +2 -2
  50. package/dist/cli/{index-h1chaf63.js → index-xfdx40ba.js} +5 -5
  51. package/dist/cli/index.js +27 -27
  52. package/dist/cli/{knowledge-escalator-2e92rdsx.js → knowledge-escalator-t29wynav.js} +7 -7
  53. package/dist/cli/{knowledge-events-gzqwr94e.js → knowledge-events-pqn56zk8.js} +5 -5
  54. package/dist/cli/{knowledge-store-6j8d1gm4.js → knowledge-store-tset38av.js} +1 -1
  55. package/dist/cli/{knowledge-validator-wt2tcfg7.js → knowledge-validator-6p132rab.js} +2 -2
  56. package/dist/cli/{mcp-ky6xn6ys.js → mcp-j2zpg3pg.js} +1 -1
  57. package/dist/cli/{model-preflight-ajt55s59.js → model-preflight-0n10a18z.js} +26 -26
  58. package/dist/cli/{pending-delegations-wry31649.js → pending-delegations-qsvc60qb.js} +2 -2
  59. package/dist/cli/{pr-subscriptions-dsdjbfr4.js → pr-subscriptions-zx205zj2.js} +1 -1
  60. package/dist/cli/{pr-workflow-gate-0vcq1m95.js → pr-workflow-gate-04ypha5r.js} +26 -26
  61. package/dist/cli/{scan-cursor-1zgrg7kp.js → scan-cursor-6zb8bjmp.js} +2 -2
  62. package/dist/cli/{schema-q9xbwkec.js → schema-9spe6r4w.js} +1 -1
  63. package/dist/cli/{scope-persistence-4wwmytwh.js → scope-persistence-7b330a4k.js} +5 -5
  64. package/dist/cli/{server-q8ydxk7z.js → server-q54h8edd.js} +26 -26
  65. package/dist/cli/{skill-generator-b1eqcxej.js → skill-generator-k6gtr0fh.js} +8 -8
  66. package/dist/cli/{snapshot-coordination-init-0yva5015.js → snapshot-coordination-init-namz3ae3.js} +26 -26
  67. package/dist/cli/{speckit-checkoff-sh9w7j5b.js → speckit-checkoff-40evtzf3.js} +3 -3
  68. package/dist/cli/{workflow-wal-file-a2c8e920.js → workflow-wal-file-qjez91sg.js} +2 -2
  69. package/dist/cli/{worktree-collision-ownership-xr6crt8c.js → worktree-collision-ownership-k471ygv7.js} +2 -2
  70. package/dist/cli/{worktree-isolation-0126b5e7.js → worktree-isolation-5tbcb2j9.js} +26 -26
  71. package/dist/hooks/guardrails/cmd-delete-grammar.d.ts +17 -0
  72. package/dist/hooks/skill-propagation-gate.d.ts +13 -0
  73. package/dist/index.js +70 -70
  74. package/dist/turbo/lean/planner.d.ts +8 -5
  75. package/dist/turbo/lean/runner.d.ts +3 -0
  76. package/dist/turbo/lean/upstream-committed.d.ts +94 -0
  77. package/package.json +1 -1
@@ -17,14 +17,14 @@ import {
17
17
  protectedRoots,
18
18
  redactDecisionLineForArchive,
19
19
  stableCanonicalStringify
20
- } from "./index-5k88v1e7.js";
20
+ } from "./index-fh22ndnh.js";
21
21
  import {
22
22
  detectStraySwarmDirs,
23
23
  readDoctorArtifact,
24
24
  removeStraySwarmDir,
25
25
  resolvePlanParallelizationFlag,
26
26
  runConfigDoctor
27
- } from "./index-yn6jrxen.js";
27
+ } from "./index-pxf512yn.js";
28
28
  import {
29
29
  archiveEvidence,
30
30
  checkRequirementCoverage,
@@ -36,7 +36,7 @@ import {
36
36
  sanitizeTaskId,
37
37
  saveEvidence,
38
38
  validateProjectRoot
39
- } from "./index-x8sh8v4a.js";
39
+ } from "./index-nfjwshs6.js";
40
40
  import {
41
41
  EvaluationTaskV1Schema,
42
42
  GateAuditManifestV1Schema,
@@ -107,16 +107,16 @@ import {
107
107
  skillContractDigest,
108
108
  splitSkillFrontmatter,
109
109
  syncBundledProjectSkillsIfMissingAsync
110
- } from "./index-aj41bscz.js";
110
+ } from "./index-v4g6rm68.js";
111
111
  import {
112
112
  buildEscalationBriefing,
113
113
  readRecentEscalations
114
- } from "./index-ve74c3a8.js";
114
+ } from "./index-1nnrz6yd.js";
115
115
  import {
116
116
  alreadyCuratedThisGeneration,
117
117
  claimNextScanBatch,
118
118
  resolveCohortId
119
- } from "./index-jt9j02tm.js";
119
+ } from "./index-6xaft4r3.js";
120
120
  import {
121
121
  CURATOR_CONSOLIDATION_PROMPT,
122
122
  CURATOR_INIT_PROMPT,
@@ -135,13 +135,13 @@ import {
135
135
  getGroupCommitWriter,
136
136
  importLegacyJsonl,
137
137
  readPriorDriftReports
138
- } from "./index-bv9tqmpm.js";
138
+ } from "./index-hs96g7xz.js";
139
139
  import {
140
140
  assertNoUnsettledCoderDispatch,
141
141
  listCoderSettlementWalStates,
142
142
  recoverCoderSettlement,
143
143
  recoverStaleCoderSettlements
144
- } from "./index-8g9rn3rp.js";
144
+ } from "./index-7811ftfy.js";
145
145
  import {
146
146
  TASK_WORKFLOW_SCHEMA_MARKER,
147
147
  compareTaskWorkflowStateRank,
@@ -155,7 +155,7 @@ import {
155
155
  readTaskEvidenceState,
156
156
  transitionTaskWorkflowEvidenceWithStatus,
157
157
  withTaskEvidenceTransaction
158
- } from "./index-r097ettz.js";
158
+ } from "./index-h8ta8mva.js";
159
159
  import {
160
160
  fastForwardToRefAsync,
161
161
  parsePorcelainV2Snapshot,
@@ -289,7 +289,7 @@ import {
289
289
  writeAtomicJson,
290
290
  writePrWorkflowAtomicJson,
291
291
  writeStateWhileLocked
292
- } from "./index-0an54fza.js";
292
+ } from "./index-9zw7mh20.js";
293
293
  import {
294
294
  MAX_PENDING_SCOPE_BINDINGS,
295
295
  canonicalWorkspaceIdentity,
@@ -298,7 +298,7 @@ import {
298
298
  clearScopeBindings,
299
299
  readAuthoritativeScopeBindingSet,
300
300
  readDeclaredScopeFilesFromBindings
301
- } from "./index-bnbhqvsn.js";
301
+ } from "./index-sx4fm1d2.js";
302
302
  import {
303
303
  DEFAULT_QA_GATES,
304
304
  computeProfileHash,
@@ -349,7 +349,7 @@ import {
349
349
  swarmOverwriteCandidates,
350
350
  trackedDirtyCandidates,
351
351
  transientBackoff
352
- } from "./index-gkvk9et2.js";
352
+ } from "./index-dkg8meb8.js";
353
353
  import {
354
354
  EPIC_MODE_CONFIG_DISABLED_MESSAGE,
355
355
  PlanRecoverySupersededError,
@@ -381,7 +381,7 @@ import {
381
381
  updateEpicRecord,
382
382
  updateTaskStatus,
383
383
  withPlanLifecycleLock
384
- } from "./index-h1chaf63.js";
384
+ } from "./index-xfdx40ba.js";
385
385
  import {
386
386
  containsControlChars,
387
387
  containsPathTraversal,
@@ -398,7 +398,7 @@ import {
398
398
  resolveSpeckitProjection,
399
399
  validateSpeckit,
400
400
  writeProjectedSpecSync
401
- } from "./index-nnc23ddw.js";
401
+ } from "./index-165v1k07.js";
402
402
  import {
403
403
  clearWorktreeMergeStatus,
404
404
  getAllWorktreeMergeFailures,
@@ -421,7 +421,7 @@ import {
421
421
  replayFromLedgerWithStatus,
422
422
  resolvePlanningProfile,
423
423
  takeSnapshotEvent
424
- } from "./index-ra3erqpk.js";
424
+ } from "./index-h59n1rx5.js";
425
425
  import {
426
426
  MAX_COORDINATION_STATE_LIST_ROWS,
427
427
  deleteCoordinationImports,
@@ -485,7 +485,7 @@ import {
485
485
  recordHiveKnowledgeEvent,
486
486
  recordKnowledgeEvent,
487
487
  resolveKnowledgeEventsPath
488
- } from "./index-kzr3nby8.js";
488
+ } from "./index-9v10n049.js";
489
489
  import {
490
490
  commitDisplayedMembership,
491
491
  commitEmptyRetrieval,
@@ -498,7 +498,7 @@ import {
498
498
  queryLiveMemberships,
499
499
  reconcilePhaseClose,
500
500
  recordPhaseCloseIntent
501
- } from "./index-ke881z7m.js";
501
+ } from "./index-8kta0a96.js";
502
502
  import {
503
503
  sanitizeContextText
504
504
  } from "./index-m9zzj4ee.js";
@@ -519,7 +519,7 @@ import {
519
519
  validateActionableFields,
520
520
  validateLesson,
521
521
  validateSkillPath
522
- } from "./index-yq73sd3w.js";
522
+ } from "./index-3jewj7q3.js";
523
523
  import {
524
524
  MAX_CURATION_PROPOSALS,
525
525
  authorizeCuration,
@@ -558,7 +558,7 @@ import {
558
558
  transactFile,
559
559
  transactKnowledge,
560
560
  wordBigrams
561
- } from "./index-qdz6zysj.js";
561
+ } from "./index-qg38v82w.js";
562
562
  import {
563
563
  readTailJsonl,
564
564
  readTailJsonlDetailed,
@@ -582,7 +582,7 @@ import {
582
582
  } from "./index-erp7fk72.js";
583
583
  import {
584
584
  resolveWorktreeIsolationConfig
585
- } from "./index-krjamprc.js";
585
+ } from "./index-8az4qgz7.js";
586
586
  import {
587
587
  RetrospectiveEvidenceSchema
588
588
  } from "./index-g22dps7x.js";
@@ -603,7 +603,7 @@ import {
603
603
  loadPluginConfig,
604
604
  loadPluginConfigWithMeta,
605
605
  resolveEpicConfig
606
- } from "./index-mq4eyhtf.js";
606
+ } from "./index-6kdyc1s7.js";
607
607
  import {
608
608
  DEFAULT_HARNESS_EVOLUTION_CONFIG,
609
609
  DEFAULT_HARNESS_OPT_CONFIG,
@@ -625,7 +625,7 @@ import {
625
625
  resolveContextWindow,
626
626
  resolveGeneratedAgentRole,
627
627
  stripKnownSwarmPrefix
628
- } from "./index-814q5t5s.js";
628
+ } from "./index-cc2vkpg7.js";
629
629
  import {
630
630
  KNOWLEDGE_SCHEMA_VERSION,
631
631
  OUTCOME_BLOCK_THRESHOLD,
@@ -647,7 +647,7 @@ import {
647
647
  recoveryReadErrored,
648
648
  startupOrphanRecovery,
649
649
  writeWorkflowWalFile
650
- } from "./index-hhzwfyd7.js";
650
+ } from "./index-krrn8eg3.js";
651
651
  import {
652
652
  assertSettlementArtifactsRemovable,
653
653
  isPathUnderSwarmWorktreeBase,
@@ -658,7 +658,7 @@ import {
658
658
  removeWorktree,
659
659
  resolveWorktreeBaseDir,
660
660
  withSettlementArtifactLifecycle
661
- } from "./index-2n7a184b.js";
661
+ } from "./index-q0gtj1px.js";
662
662
  import {
663
663
  estimateCharsForTokens,
664
664
  estimateTokens,
@@ -9675,7 +9675,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
9675
9675
  return extracted === expectedSessionId;
9676
9676
  }
9677
9677
  async function inspectStandardWorktreeCollisionOwnership(identity) {
9678
- const collisionOwnership = await import("./worktree-collision-ownership-xr6crt8c.js");
9678
+ const collisionOwnership = await import("./worktree-collision-ownership-k471ygv7.js");
9679
9679
  return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
9680
9680
  }
9681
9681
  async function runRecoveryGit(directory, args, timeoutMs = 15000) {
@@ -10103,7 +10103,7 @@ async function precreateStandardWorktreeSession(args) {
10103
10103
  const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
10104
10104
  if (laneProfile) {
10105
10105
  try {
10106
- const { writeLaneProfileToDiskReal } = await import("./core-p168fw3r.js");
10106
+ const { writeLaneProfileToDiskReal } = await import("./core-vx7fxf4y.js");
10107
10107
  await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
10108
10108
  } catch {}
10109
10109
  }
@@ -11103,7 +11103,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
11103
11103
  }
11104
11104
  clearWorktreeMergeStatus(statusKey);
11105
11105
  try {
11106
- const { removeLaneProfileFromDiskReal } = await import("./core-p168fw3r.js");
11106
+ const { removeLaneProfileFromDiskReal } = await import("./core-vx7fxf4y.js");
11107
11107
  await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
11108
11108
  } catch {}
11109
11109
  const state = serializationStateBySessionID.get(dispatch.parentSessionID);
@@ -12943,39 +12943,6 @@ init_config();
12943
12943
  // src/security/command-classifier.ts
12944
12944
  import { createHash as createHash16 } from "crypto";
12945
12945
 
12946
- // src/hooks/guardrails/destructive-command.ts
12947
- import * as fsSync from "fs";
12948
- import * as path17 from "path";
12949
-
12950
- // src/hooks/shell-executor-context.ts
12951
- var CMD_SWITCH = String.raw`\/[a-z](?::(?:on|off))?`;
12952
- var CMD_WRAPPER_DECLARATION = new RegExp(String.raw`(?:^|[;|&\n])\s*cmd(?:\.exe)?\s+(?:${CMD_SWITCH}\s+)*\/c(?:\s|$)`, "i");
12953
- var PS_WRAPPER_DECLARATION = /(?:^|[;|&\n])\s*(?:powershell|pwsh)(?:\.exe)?\s+(?:-[A-Za-z]+\s+)*-command(?:\s|$)/i;
12954
- var PS_WRAPPER_LOOSE = /(?:^|\|)\s*(?:powershell|pwsh)(?:\.exe)?\s+-/i;
12955
- function declaresWindowsWrapper(command) {
12956
- return CMD_WRAPPER_DECLARATION.test(command) || PS_WRAPPER_DECLARATION.test(command);
12957
- }
12958
- function declaresWindowsWrapperLoose(command) {
12959
- return declaresWindowsWrapper(command) || PS_WRAPPER_LOOSE.test(command);
12960
- }
12961
- var CMD_BUILTIN_PREFIX = new RegExp(String.raw`(?:(?:^|\s)(?:if\s+(?:not\s+)?exist\s+(?:"[^"]*"|\S+)\s+)|(?:^|[;|&\n])\s*cmd(?:\.exe)?\s+(?:${CMD_SWITCH}\s+)*\/c\s+|(?:^|\s)(?:call|start)\s+)*`, "i");
12962
- var CMD_STRIP_PREFIX = new RegExp(String.raw`^cmd(?:\.exe)?\s+(?:${CMD_SWITCH}\s+)*\/[ck]\s+`, "i");
12963
- var PS_STRIP_PREFIX = /^(?:powershell|pwsh)(?:\.exe)?\s+(?:-[A-Za-z]+\s+)*-(?:command|c)\s+/i;
12964
- var observedHostShell;
12965
- function getObservedHostShell() {
12966
- return observedHostShell;
12967
- }
12968
- function hostShellGrammarFamily(hostShell) {
12969
- const leaf = hostShell.split(/[\\/]/).filter(Boolean).pop() ?? hostShell;
12970
- const name = leaf.replace(/\.exe$/i, "").toLowerCase();
12971
- return name === "powershell" || name === "pwsh" || name === "cmd" ? "windows" : "posix";
12972
- }
12973
-
12974
- // src/hooks/shell-write-detect.ts
12975
- init_path_identity();
12976
- import * as path16 from "path";
12977
- import parse from "bash-parser";
12978
-
12979
12946
  // src/hooks/guardrails/cmd-delete-grammar.ts
12980
12947
  function dcIsSwitchClusterText(text) {
12981
12948
  if (text.length === 0)
@@ -12993,7 +12960,7 @@ function dcScanCmdTokens(args) {
12993
12960
  current += ch;
12994
12961
  continue;
12995
12962
  }
12996
- if (!inQuote && /[\s,;=]/.test(ch)) {
12963
+ if (!inQuote && /[\s,;=()<>|&]/.test(ch)) {
12997
12964
  if (current.length > 0)
12998
12965
  tokens.push(current);
12999
12966
  current = "";
@@ -13005,9 +12972,9 @@ function dcScanCmdTokens(args) {
13005
12972
  tokens.push(current);
13006
12973
  return tokens;
13007
12974
  }
13008
- function dcParseWindowsRecursiveDelete(args) {
13009
- const tokens = dcScanCmdTokens(args);
13010
- const fires = tokens.some((token) => {
12975
+ function dcHasCmdDeleteSwitch(args, letters) {
12976
+ const wanted = letters.toLowerCase();
12977
+ return dcScanCmdTokens(args).some((token) => {
13011
12978
  let inQuote = false;
13012
12979
  let slashIdx = -1;
13013
12980
  for (let i = 0;i < token.length; i += 1) {
@@ -13025,8 +12992,19 @@ function dcParseWindowsRecursiveDelete(args) {
13025
12992
  const afterSlash = token.slice(slashIdx + 1);
13026
12993
  const quoteIdx = afterSlash.indexOf('"');
13027
12994
  const switchText = (quoteIdx >= 0 ? afterSlash.slice(0, quoteIdx) : afterSlash).replace(/["']/g, "");
13028
- return dcIsSwitchClusterText(switchText) && switchText.replace(/\//g, "").toLowerCase().includes("s");
12995
+ if (!dcIsSwitchClusterText(switchText))
12996
+ return false;
12997
+ const cluster = switchText.replace(/\//g, "").toLowerCase();
12998
+ for (const letter of wanted) {
12999
+ if (cluster.includes(letter))
13000
+ return true;
13001
+ }
13002
+ return false;
13029
13003
  });
13004
+ }
13005
+ function dcParseWindowsRecursiveDelete(args) {
13006
+ const tokens = dcScanCmdTokens(args);
13007
+ const fires = dcHasCmdDeleteSwitch(args, "s");
13030
13008
  const targets = [];
13031
13009
  for (const token of tokens) {
13032
13010
  let inQuote = false;
@@ -13070,7 +13048,38 @@ function dcParseWindowsRecursiveDelete(args) {
13070
13048
  return { fires, targets };
13071
13049
  }
13072
13050
 
13051
+ // src/hooks/guardrails/destructive-command.ts
13052
+ import * as fsSync from "fs";
13053
+ import * as path17 from "path";
13054
+
13055
+ // src/hooks/shell-executor-context.ts
13056
+ var CMD_SWITCH = String.raw`\/[a-z](?::(?:on|off))?`;
13057
+ var CMD_WRAPPER_DECLARATION = new RegExp(String.raw`(?:^|[;|&\n])\s*cmd(?:\.exe)?\s+(?:${CMD_SWITCH}\s+)*\/c(?:\s|$)`, "i");
13058
+ var PS_WRAPPER_DECLARATION = /(?:^|[;|&\n])\s*(?:powershell|pwsh)(?:\.exe)?\s+(?:-[A-Za-z]+\s+)*-command(?:\s|$)/i;
13059
+ var PS_WRAPPER_LOOSE = /(?:^|\|)\s*(?:powershell|pwsh)(?:\.exe)?\s+-/i;
13060
+ function declaresWindowsWrapper(command) {
13061
+ return CMD_WRAPPER_DECLARATION.test(command) || PS_WRAPPER_DECLARATION.test(command);
13062
+ }
13063
+ function declaresWindowsWrapperLoose(command) {
13064
+ return declaresWindowsWrapper(command) || PS_WRAPPER_LOOSE.test(command);
13065
+ }
13066
+ var CMD_BUILTIN_PREFIX = new RegExp(String.raw`(?:(?:^|\s)(?:if\s+(?:not\s+)?exist\s+(?:"[^"]*"|\S+)\s+)|(?:^|[;|&\n])\s*cmd(?:\.exe)?\s+(?:${CMD_SWITCH}\s+)*\/c\s+|(?:^|\s)(?:call|start)\s+)*`, "i");
13067
+ var CMD_STRIP_PREFIX = new RegExp(String.raw`^cmd(?:\.exe)?\s+(?:${CMD_SWITCH}\s+)*\/[ck]\s+`, "i");
13068
+ var PS_STRIP_PREFIX = /^(?:powershell|pwsh)(?:\.exe)?\s+(?:-[A-Za-z]+\s+)*-(?:command|c)\s+/i;
13069
+ var observedHostShell;
13070
+ function getObservedHostShell() {
13071
+ return observedHostShell;
13072
+ }
13073
+ function hostShellGrammarFamily(hostShell) {
13074
+ const leaf = hostShell.split(/[\\/]/).filter(Boolean).pop() ?? hostShell;
13075
+ const name = leaf.replace(/\.exe$/i, "").toLowerCase();
13076
+ return name === "powershell" || name === "pwsh" || name === "cmd" ? "windows" : "posix";
13077
+ }
13078
+
13073
13079
  // src/hooks/shell-write-detect.ts
13080
+ init_path_identity();
13081
+ import * as path16 from "path";
13082
+ import parse from "bash-parser";
13074
13083
  function unsafeShellCommandTextReason(value) {
13075
13084
  return unsafePathTextReason(value.replace(/[\r\n]/g, ""));
13076
13085
  }
@@ -13547,9 +13556,10 @@ function detectProcessSubstitutionWrites(command) {
13547
13556
  continue;
13548
13557
  const stages = innerCommand.split("|").map((s) => s.trim());
13549
13558
  for (const stage of stages) {
13550
- const builtinResult = detectBuiltinWritesFromString(stage);
13551
- if (builtinResult)
13552
- results.push(builtinResult);
13559
+ const builtinWrites = detectBuiltinWritesFromString(stage);
13560
+ for (const write of builtinWrites) {
13561
+ results.push(write);
13562
+ }
13553
13563
  const appendMatch = stage.match(/^\s*(.*?)\s*>>(\s*)(\S+)\s*$/);
13554
13564
  if (appendMatch) {
13555
13565
  const path17 = appendMatch[3];
@@ -13572,20 +13582,37 @@ function detectProcessSubstitutionWrites(command) {
13572
13582
  function detectBuiltinWritesFromString(cmd) {
13573
13583
  const tokens = cmd.trim().split(/\s+/);
13574
13584
  if (tokens.length === 0)
13575
- return null;
13585
+ return [];
13576
13586
  const leaf = detectorCommandLeafFromWords(tokens[0], tokens.slice(1));
13577
13587
  const name = detectorSetMember(leaf, BUILTIN_WRITE_COMMANDS);
13578
13588
  if (!name)
13579
- return null;
13589
+ return [];
13580
13590
  if (name === "rmdir" && dcParseWindowsRecursiveDelete(cmd).fires) {
13581
- return null;
13591
+ return [];
13592
+ }
13593
+ if (name === "rmdir" || name === "truncate") {
13594
+ const writes = [];
13595
+ let endOfOptions = false;
13596
+ for (let i = 1;i < tokens.length; i += 1) {
13597
+ const token = tokens[i];
13598
+ if (!endOfOptions && token === "--") {
13599
+ endOfOptions = true;
13600
+ continue;
13601
+ }
13602
+ if (!endOfOptions && token.startsWith("-"))
13603
+ continue;
13604
+ if (name === "truncate" && !endOfOptions && isNumeric(token))
13605
+ continue;
13606
+ writes.push({ category: "builtin_write", operator: name, path: token });
13607
+ }
13608
+ return writes;
13582
13609
  }
13583
13610
  for (let i = tokens.length - 1;i >= 1; i--) {
13584
13611
  if (!tokens[i].startsWith("-")) {
13585
- return { category: "builtin_write", operator: name, path: tokens[i] };
13612
+ return [{ category: "builtin_write", operator: name, path: tokens[i] }];
13586
13613
  }
13587
13614
  }
13588
- return null;
13615
+ return [];
13589
13616
  }
13590
13617
  function wordText(node) {
13591
13618
  if (!node || typeof node !== "object")
@@ -14314,14 +14341,33 @@ function detectBuiltinWrites(cmd) {
14314
14341
  return results;
14315
14342
  }
14316
14343
  if (lowerName === "truncate") {
14344
+ let endOfOptions = false;
14317
14345
  for (const word of suffixWords) {
14318
- if (!word.startsWith("-") && !isNumeric(word)) {
14346
+ if (!endOfOptions && word === "--") {
14347
+ endOfOptions = true;
14348
+ continue;
14349
+ }
14350
+ if (endOfOptions || !word.startsWith("-") && !isNumeric(word)) {
14319
14351
  results.push({
14320
14352
  category: "builtin_write",
14321
14353
  operator: "truncate",
14322
14354
  path: word
14323
14355
  });
14324
- break;
14356
+ }
14357
+ }
14358
+ } else if (lowerName === "rmdir") {
14359
+ let endOfOptions = false;
14360
+ for (const word of suffixWords) {
14361
+ if (!endOfOptions && word === "--") {
14362
+ endOfOptions = true;
14363
+ continue;
14364
+ }
14365
+ if (endOfOptions || !word.startsWith("-")) {
14366
+ results.push({
14367
+ category: "builtin_write",
14368
+ operator: dedupeOperator,
14369
+ path: word
14370
+ });
14325
14371
  }
14326
14372
  }
14327
14373
  } else {
@@ -15576,19 +15622,28 @@ function detectPosixWrites(command) {
15576
15622
  collectLeafCommands(ast, leafCommands);
15577
15623
  cwdNeutral = leafCommands.every(isCwdNeutralLeaf);
15578
15624
  for (const cmd of leafCommands) {
15579
- allWrites.push(...detectRedirects(cmd));
15580
- allWrites.push(...detectBuiltinWrites(cmd));
15581
- allWrites.push(...detectInplaceEdit(cmd));
15582
- allWrites.push(...detectInterpreterEval(cmd));
15583
- allWrites.push(...detectNetworkDownloaders(cmd));
15584
- allWrites.push(...detectArchiveExtract(cmd));
15585
- allWrites.push(...detectGitDestructive(cmd));
15625
+ for (const write of detectRedirects(cmd))
15626
+ allWrites.push(write);
15627
+ for (const write of detectBuiltinWrites(cmd))
15628
+ allWrites.push(write);
15629
+ for (const write of detectInplaceEdit(cmd))
15630
+ allWrites.push(write);
15631
+ for (const write of detectInterpreterEval(cmd))
15632
+ allWrites.push(write);
15633
+ for (const write of detectNetworkDownloaders(cmd))
15634
+ allWrites.push(write);
15635
+ for (const write of detectArchiveExtract(cmd))
15636
+ allWrites.push(write);
15637
+ for (const write of detectGitDestructive(cmd))
15638
+ allWrites.push(write);
15586
15639
  }
15587
15640
  collectPipeStdinEvals(ast, allWrites);
15588
15641
  }
15589
15642
  if (parseFailed) {
15590
15643
  const procSubWrites = detectProcessSubstitutionWrites(command);
15591
- allWrites.push(...procSubWrites);
15644
+ for (const write of procSubWrites) {
15645
+ allWrites.push(write);
15646
+ }
15592
15647
  }
15593
15648
  const seen = new Set;
15594
15649
  const occurrence = new Map;
@@ -16759,6 +16814,18 @@ var SEVERITY = {
16759
16814
  destructive: 3,
16760
16815
  catastrophic: 4
16761
16816
  };
16817
+ var WINDOWS_RECURSIVE_DELETE_VERB = /\b(?:rmdir|rd|del)(?:\.exe)?\b/i;
16818
+ function windowsRecursiveDeleteMatch(segment) {
16819
+ const verb = WINDOWS_RECURSIVE_DELETE_VERB.exec(segment);
16820
+ if (verb === null)
16821
+ return false;
16822
+ let args = segment.slice(verb.index + verb[0].length);
16823
+ const lineBreak = /[\r\n]/.exec(args);
16824
+ if (lineBreak !== null) {
16825
+ args = args.slice(0, lineBreak.index);
16826
+ }
16827
+ return dcHasCmdDeleteSwitch(args, "sqf");
16828
+ }
16762
16829
  var CATASTROPHIC = [
16763
16830
  {
16764
16831
  id: "fork-bomb",
@@ -16899,7 +16966,9 @@ var DESTRUCTIVE = [
16899
16966
  },
16900
16967
  {
16901
16968
  id: "windows-recursive-delete",
16902
- pattern: /\b(?:rmdir|rd|del)(?:\.exe)?\b[^\n]*\/[sqf]/i,
16969
+ pattern: /\b(?:rmdir|rd|del)(?:\.exe)?\b/i,
16970
+ match: windowsRecursiveDeleteMatch,
16971
+ reason: "cmd.exe delete switch (valid cluster containing s/q/f)",
16903
16972
  liveGuardrail: {
16904
16973
  mode: "target-aware",
16905
16974
  destructiveCategory: "recursive delete",
@@ -17099,8 +17168,9 @@ function hasAmbiguousSyntax(value) {
17099
17168
  }
17100
17169
  function matchRule(rules, segment) {
17101
17170
  for (const rule of rules) {
17102
- if (rule.pattern.test(segment))
17171
+ if (rule.match ? rule.match(segment) : rule.pattern?.test(segment)) {
17103
17172
  return rule;
17173
+ }
17104
17174
  }
17105
17175
  return null;
17106
17176
  }
@@ -17111,7 +17181,7 @@ function classifySegment(segment, ambiguous) {
17111
17181
  return {
17112
17182
  segment: bounded,
17113
17183
  category: "catastrophic",
17114
- reason: catastrophic.reason ?? catastrophic.pattern.source,
17184
+ reason: catastrophic.reason ?? catastrophic.pattern?.source ?? catastrophic.id,
17115
17185
  ruleId: catastrophic.id
17116
17186
  };
17117
17187
  const destructive = matchRule(DESTRUCTIVE, segment);
@@ -17119,7 +17189,7 @@ function classifySegment(segment, ambiguous) {
17119
17189
  return {
17120
17190
  segment: bounded,
17121
17191
  category: "destructive",
17122
- reason: destructive.reason ?? destructive.pattern.source,
17192
+ reason: destructive.reason ?? destructive.pattern?.source ?? destructive.id,
17123
17193
  ruleId: destructive.id
17124
17194
  };
17125
17195
  if (ambiguous || /[<>]|\|\s*(?:sh|bash|zsh|fish|pwsh|powershell|cmd)\b/i.test(segment)) {
@@ -17134,7 +17204,7 @@ function classifySegment(segment, ambiguous) {
17134
17204
  return {
17135
17205
  segment: bounded,
17136
17206
  category: "escalate",
17137
- reason: escalate.reason ?? escalate.pattern.source,
17207
+ reason: escalate.reason ?? escalate.pattern?.source ?? escalate.id,
17138
17208
  ruleId: escalate.id
17139
17209
  };
17140
17210
  const safe = matchRule(SAFE, segment);
@@ -17142,7 +17212,7 @@ function classifySegment(segment, ambiguous) {
17142
17212
  return {
17143
17213
  segment: bounded,
17144
17214
  category: "safe",
17145
- reason: safe.reason ?? safe.pattern.source,
17215
+ reason: safe.reason ?? safe.pattern?.source ?? safe.id,
17146
17216
  ruleId: safe.id
17147
17217
  };
17148
17218
  return {
@@ -18351,9 +18421,10 @@ function toTaskIdPlanContextOptions(context) {
18351
18421
  }
18352
18422
 
18353
18423
  // src/hooks/skill-propagation-gate.ts
18354
- init_schema();
18355
18424
  import * as fs15 from "fs";
18356
18425
  import * as path22 from "path";
18426
+ init_schema();
18427
+ init_path_identity();
18357
18428
  init_logger();
18358
18429
 
18359
18430
  // src/hooks/skill-scoring.ts
@@ -20988,6 +21059,7 @@ var _internals31 = {
20988
21059
  readdirSync: fs15.readdirSync.bind(fs15),
20989
21060
  existsSync: fs15.existsSync.bind(fs15),
20990
21061
  statSync: fs15.statSync.bind(fs15),
21062
+ lstatSync: fs15.lstatSync.bind(fs15),
20991
21063
  realpathSync: fs15.realpathSync.bind(fs15),
20992
21064
  mkdirSync: fs15.mkdirSync.bind(fs15),
20993
21065
  appendFileSync: fs15.appendFileSync.bind(fs15),
@@ -21136,6 +21208,63 @@ function extractFileSkillReferences(fieldValue) {
21136
21208
  }
21137
21209
  var MAX_EXPLICIT_SKILL_REFERENCES = 16;
21138
21210
  var MAX_PROVENANCE_SKILL_REFERENCES_PER_TRANSFORM = 64;
21211
+ var RETIRED_SKILL_REPLACEMENTS = {
21212
+ "gate-attribution": bundledProjectSkillFileReference("gate-attribution"),
21213
+ "merge-queue-readiness": bundledProjectSkillFileReference("merge-queue-readiness"),
21214
+ "skill-edit-validation": bundledProjectSkillFileReference("skill-edit-validation"),
21215
+ "worktree-retry-cleanup": bundledProjectSkillFileReference("worktree-retry-cleanup"),
21216
+ "pr-review-fix": bundledProjectSkillFileReference("swarm-pr-feedback"),
21217
+ "pr-readiness": bundledProjectSkillFileReference("swarm-pr-feedback")
21218
+ };
21219
+ var RETIREMENT_REASON_MAX_CHARS = 160;
21220
+ var MAX_MARKER_BYTES = 8192;
21221
+ function readRetirementMarker(skillDir) {
21222
+ for (const kind of ["retired", "stale"]) {
21223
+ try {
21224
+ const st = _internals31.lstatSync(path22.join(skillDir, `${kind}.marker`));
21225
+ if (st.isFile() || st.isSymbolicLink())
21226
+ return kind;
21227
+ } catch {}
21228
+ }
21229
+ return null;
21230
+ }
21231
+ function readMarkerDetail(skillDir, marker) {
21232
+ const file = path22.join(skillDir, marker === "retired" ? "retired.marker" : "stale.marker");
21233
+ try {
21234
+ const st = _internals31.lstatSync(file);
21235
+ if (st.isSymbolicLink() || !st.isFile() || st.size > MAX_MARKER_BYTES) {
21236
+ return;
21237
+ }
21238
+ const raw = _internals31.readFileSync(file, "utf-8");
21239
+ if (marker === "retired") {
21240
+ try {
21241
+ const parsed = JSON.parse(raw);
21242
+ const parts = [];
21243
+ if (typeof parsed.reason === "string" && parsed.reason.trim().length > 0) {
21244
+ parts.push(parsed.reason);
21245
+ }
21246
+ if (typeof parsed.retiredAt === "string" && parsed.retiredAt.trim().length > 0) {
21247
+ parts.push(`retired ${parsed.retiredAt}`);
21248
+ }
21249
+ if (parts.length > 0) {
21250
+ return sanitizeDiagnosticText(parts.join(", "), RETIREMENT_REASON_MAX_CHARS);
21251
+ }
21252
+ } catch {}
21253
+ }
21254
+ const flat = sanitizeDiagnosticText(raw, RETIREMENT_REASON_MAX_CHARS);
21255
+ return flat.length > 0 ? flat : undefined;
21256
+ } catch {
21257
+ return;
21258
+ }
21259
+ }
21260
+ function retirementMessage(slug, marker, detail) {
21261
+ const state = marker === "retired" ? "retired" : "stale";
21262
+ const detailText = detail === undefined ? "" : ` (${detail})`;
21263
+ const safeSlug = sanitizeDiagnosticText(slug, 120);
21264
+ const replacement = Object.hasOwn(RETIRED_SKILL_REPLACEMENTS, slug) ? RETIRED_SKILL_REPLACEMENTS[slug] : undefined;
21265
+ const guidance = replacement === undefined ? "regenerate via skill_generate or pick a live skill with skill_inspect" : `use "${replacement}" instead`;
21266
+ return `skill "${safeSlug}" is ${state}${detailText}: ${guidance} \u2014 do not delegate with retired skills`;
21267
+ }
21139
21268
  function resolveSkillAudienceContext(config) {
21140
21269
  return {
21141
21270
  runner: "opencode",
@@ -21176,6 +21305,20 @@ function validateSkillReference(directory, reference, context, options) {
21176
21305
  reason: "skill symlink resolves outside the project"
21177
21306
  };
21178
21307
  }
21308
+ const realSkillDir = path22.dirname(realPath);
21309
+ const lexicalSkillDir = path22.dirname(lexicalPath);
21310
+ const realMarker = readRetirementMarker(realSkillDir);
21311
+ const lexicalMarker = realSkillDir === lexicalSkillDir ? null : readRetirementMarker(lexicalSkillDir);
21312
+ const retirement = realMarker === "retired" || lexicalMarker === "retired" ? "retired" : realMarker ?? lexicalMarker;
21313
+ if (retirement !== null) {
21314
+ const slug = path22.basename(lexicalSkillDir);
21315
+ const winnerIsReal = realMarker === retirement;
21316
+ const detail = readMarkerDetail(winnerIsReal ? realSkillDir : lexicalSkillDir, retirement);
21317
+ return {
21318
+ valid: false,
21319
+ reason: retirementMessage(slug, retirement, detail)
21320
+ };
21321
+ }
21179
21322
  const normalizedPath = withoutPrefix.replace(/^\.\//, "");
21180
21323
  const validatedMetadataPath = path22.relative(root, realPath).replace(/\\/g, "/");
21181
21324
  const metadata = _internals31.readSkillMetadata(validatedMetadataPath, root);
@@ -29510,7 +29653,7 @@ function clearCriticalShownIds(sessionID) {
29510
29653
  async function rehydratePrSubscriptions(sessionID, directory) {
29511
29654
  const map = new Map;
29512
29655
  try {
29513
- const { listActive: listActive2 } = await import("./pr-subscriptions-dsdjbfr4.js");
29656
+ const { listActive: listActive2 } = await import("./pr-subscriptions-zx205zj2.js");
29514
29657
  const records = await listActive2(directory);
29515
29658
  for (const record of records) {
29516
29659
  if (record.sessionID !== sessionID)
@@ -40151,7 +40294,7 @@ async function handleAttestCommand(directory, args, sessionID) {
40151
40294
  `);
40152
40295
  }
40153
40296
  const taskId = args[0];
40154
- const { executeAttestTask } = await import("./attest-task-y0n69zgb.js");
40297
+ const { executeAttestTask } = await import("./attest-task-pvwft49v.js");
40155
40298
  const result = await executeAttestTask({
40156
40299
  task_id: taskId,
40157
40300
  working_directory: directory,
@@ -47343,9 +47486,9 @@ function hashContent(content) {
47343
47486
  return createHash28("sha1").update(content).digest("hex");
47344
47487
  }
47345
47488
  async function loadConfigForPolicyCurator(directory) {
47346
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-q9xbwkec.js");
47489
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-9spe6r4w.js");
47347
47490
  try {
47348
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-njg8zvqe.js");
47491
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ffz00br0.js");
47349
47492
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
47350
47493
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
47351
47494
  } catch {
@@ -50403,7 +50546,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
50403
50546
  const seam = _internals49.createCuratorLLMDelegate;
50404
50547
  if (seam)
50405
50548
  return seam(directory, mode, sessionId);
50406
- const { createCuratorLLMDelegate } = await import("./curator-llm-factory-ytfkvtxs.js");
50549
+ const { createCuratorLLMDelegate } = await import("./curator-llm-factory-cn47pa0k.js");
50407
50550
  return createCuratorLLMDelegate(directory, mode, sessionId);
50408
50551
  }
50409
50552
  async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
@@ -50798,7 +50941,7 @@ async function runFinalizeStage(ctx) {
50798
50941
  }
50799
50942
  }
50800
50943
  try {
50801
- const { CuratorConfigSchema: CCS } = await import("./schema-q9xbwkec.js");
50944
+ const { CuratorConfigSchema: CCS } = await import("./schema-9spe6r4w.js");
50802
50945
  const { config: pmLoadedConfig } = _internals49.loadPluginConfigWithMeta(ctx.directory);
50803
50946
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
50804
50947
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -54871,7 +55014,7 @@ function adviseClosingStop(directory) {
54871
55014
  }
54872
55015
  async function writeSnapshot(directory, state) {
54873
55016
  try {
54874
- const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-0yva5015.js");
55017
+ const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-namz3ae3.js");
54875
55018
  await ensureSnapshotCoordinationReady(directory);
54876
55019
  if (closingStopAdvisedRoots.size > 0) {
54877
55020
  closingStopAdvisedRoots.delete(canonicalProjectKey(directory));
@@ -58100,7 +58243,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
58100
58243
  };
58101
58244
  }
58102
58245
  async function sweepActiveNearDuplicates(directory, options = {}) {
58103
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-njg8zvqe.js");
58246
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ffz00br0.js");
58104
58247
  const { config } = loadPluginConfigWithMeta2(directory);
58105
58248
  const sweepConfig = config.learning?.dedup_sweep;
58106
58249
  if (sweepConfig?.enabled === false)
@@ -59224,7 +59367,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
59224
59367
  }
59225
59368
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
59226
59369
  try {
59227
- const skillModule = await import("./skill-generator-b1eqcxej.js");
59370
+ const skillModule = await import("./skill-generator-k6gtr0fh.js");
59228
59371
  for (const cand of skillCandidates) {
59229
59372
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
59230
59373
  continue;
@@ -59696,7 +59839,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
59696
59839
  } catch {}
59697
59840
  }
59698
59841
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
59699
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-2e92rdsx.js");
59842
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-t29wynav.js");
59700
59843
  for (const { id } of contradictedEntries) {
59701
59844
  try {
59702
59845
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -60528,7 +60671,7 @@ async function runCuratorPostMortem(directory, options = {}) {
60528
60671
  warnings.push("Failed to collect knowledge summary.");
60529
60672
  }
60530
60673
  try {
60531
- const { getScanStatus } = await import("./scan-cursor-1zgrg7kp.js");
60674
+ const { getScanStatus } = await import("./scan-cursor-6zb8bjmp.js");
60532
60675
  const scanStatus = await getScanStatus(directory);
60533
60676
  if (scanStatus.remaining_estimate > 0) {
60534
60677
  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.`);
@@ -60700,9 +60843,9 @@ var _internals71 = {
60700
60843
  verifyPostMortemKnowledgeActions,
60701
60844
  repairPostMortemActions,
60702
60845
  loadDefaultKnowledgeConfig: async (directory) => {
60703
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-q9xbwkec.js");
60846
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-9spe6r4w.js");
60704
60847
  try {
60705
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-njg8zvqe.js");
60848
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ffz00br0.js");
60706
60849
  const loaded = loadPluginConfigWithMeta2(directory);
60707
60850
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
60708
60851
  } catch {
@@ -60710,11 +60853,11 @@ var _internals71 = {
60710
60853
  }
60711
60854
  },
60712
60855
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
60713
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-5ayzhk7v.js");
60856
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-0nv1asjc.js");
60714
60857
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
60715
60858
  },
60716
60859
  checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
60717
- const { checkHivePromotions } = await import("./hive-promoter-3q0738xg.js");
60860
+ const { checkHivePromotions } = await import("./hive-promoter-r8z673jn.js");
60718
60861
  return checkHivePromotions(entries2, knowledgeConfig, directory);
60719
60862
  },
60720
60863
  applyProposalTriage: async (directory, triage) => {
@@ -60723,7 +60866,7 @@ var _internals71 = {
60723
60866
  activateProposal,
60724
60867
  listSkills: listSkills2,
60725
60868
  sanitizeSlug
60726
- } = await import("./skill-generator-b1eqcxej.js");
60869
+ } = await import("./skill-generator-k6gtr0fh.js");
60727
60870
  const result = {
60728
60871
  approved: [],
60729
60872
  rejected: [],
@@ -60765,7 +60908,7 @@ var _internals71 = {
60765
60908
  return result;
60766
60909
  },
60767
60910
  readPriorDriftReports: async (directory) => {
60768
- const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-jx9kyndc.js");
60911
+ const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-4e5nsjec.js");
60769
60912
  return readPriorDriftReports2(directory);
60770
60913
  },
60771
60914
  readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
@@ -71036,9 +71179,9 @@ var _internals79 = {
71036
71179
  loadPluginConfigWithMeta,
71037
71180
  loadCuratorDeps: async () => {
71038
71181
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
71039
- import("./schema-q9xbwkec.js"),
71040
- import("./curator-5ayzhk7v.js"),
71041
- import("./curator-llm-factory-ytfkvtxs.js")
71182
+ import("./schema-9spe6r4w.js"),
71183
+ import("./curator-0nv1asjc.js"),
71184
+ import("./curator-llm-factory-cn47pa0k.js")
71042
71185
  ]);
71043
71186
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
71044
71187
  }
@@ -73486,7 +73629,7 @@ async function computeCurationDiagnostics(directory, entries2) {
73486
73629
  let scanCompleted = false;
73487
73630
  let scanRemaining = 0;
73488
73631
  try {
73489
- const { getScanStatus } = await import("./scan-cursor-1zgrg7kp.js");
73632
+ const { getScanStatus } = await import("./scan-cursor-6zb8bjmp.js");
73490
73633
  const status = await getScanStatus(directory);
73491
73634
  scanGeneration = status.generation;
73492
73635
  scanCompleted = status.completed;
@@ -73496,10 +73639,10 @@ async function computeCurationDiagnostics(directory, entries2) {
73496
73639
  try {
73497
73640
  const { isLinked: isLinked2 } = await import("./knowledge-link-r7e2t5c1.js");
73498
73641
  if (isLinked2(directory)) {
73499
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-q9xbwkec.js");
73642
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-9spe6r4w.js");
73500
73643
  let config;
73501
73644
  try {
73502
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-njg8zvqe.js");
73645
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ffz00br0.js");
73503
73646
  const loaded = loadPluginConfigWithMeta2(directory);
73504
73647
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
73505
73648
  } catch {
@@ -74979,7 +75122,7 @@ async function handleDoctorCommand(directory, args) {
74979
75122
  const result = runConfigDoctor(config, directory, planParallelizationEnabled);
74980
75123
  let output;
74981
75124
  if (enableAutoFix && result.hasAutoFixableIssues) {
74982
- const { runConfigDoctorWithFixes } = await import("./config-doctor-sf7hc0q4.js");
75125
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-qh3aba3c.js");
74983
75126
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
74984
75127
  applyLossy: true
74985
75128
  });
@@ -75017,7 +75160,7 @@ async function handleDoctorCommand(directory, args) {
75017
75160
  `;
75018
75161
  }
75019
75162
  try {
75020
- const { runModelPreflight } = await import("./model-preflight-ajt55s59.js");
75163
+ const { runModelPreflight } = await import("./model-preflight-0n10a18z.js");
75021
75164
  const preflight = await runModelPreflight(config, swarmState.opencodeClient, { generatedAgentNames: swarmState.generatedAgentNames });
75022
75165
  const missingSelection = preflight.resolutions.filter((resolution) => resolution.status === "missing-selection");
75023
75166
  const unresolved = preflight.catalogAvailable ? preflight.resolutions.filter((resolution) => resolution.status === "unresolved") : [];
@@ -75051,7 +75194,7 @@ async function handleDoctorCommand(directory, args) {
75051
75194
  }
75052
75195
  } catch {}
75053
75196
  try {
75054
- const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-2gjvxndy.js");
75197
+ const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-5qs5w6jz.js");
75055
75198
  output += await renderKnowledgeReceiptPhaseIdSection(directory, enableAutoFix);
75056
75199
  } catch {}
75057
75200
  const strayDirs = detectStraySwarmDirs(directory);
@@ -77068,7 +77211,7 @@ async function handleEvidenceCommand(directory, args) {
77068
77211
  return formatTaskEvidenceMarkdown(evidenceData);
77069
77212
  }
77070
77213
  async function handleEvidenceSummaryCommand(directory) {
77071
- const { buildEvidenceSummary } = await import("./evidence-summary-service-972sqht5.js");
77214
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-fbhdnww1.js");
77072
77215
  const artifact = await buildEvidenceSummary(directory);
77073
77216
  if (!artifact) {
77074
77217
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -84791,7 +84934,7 @@ import {
84791
84934
  closeSync as closeSync19,
84792
84935
  constants as FS_CONSTANTS2,
84793
84936
  fstatSync as fstatSync6,
84794
- lstatSync as lstatSync13,
84937
+ lstatSync as lstatSync14,
84795
84938
  openSync as openSync19,
84796
84939
  readFileSync as readFileSync50
84797
84940
  } from "fs";
@@ -85433,7 +85576,7 @@ import {
85433
85576
  fstatSync as fstatSync5,
85434
85577
  fsyncSync as fsyncSync5,
85435
85578
  ftruncateSync as ftruncateSync2,
85436
- lstatSync as lstatSync12,
85579
+ lstatSync as lstatSync13,
85437
85580
  mkdirSync as mkdirSync32,
85438
85581
  opendirSync as opendirSync2,
85439
85582
  openSync as openSync18,
@@ -85734,7 +85877,7 @@ function assertSafeArtifactPath(filePath, root) {
85734
85877
  let probe = resolvedFile;
85735
85878
  for (let index = 0;index < 4096; index++) {
85736
85879
  try {
85737
- if (lstatSync12(probe).isSymbolicLink()) {
85880
+ if (lstatSync13(probe).isSymbolicLink()) {
85738
85881
  throw new HarnessStoreIntegrityError(filePath, "harness artifact path contains a symlink or junction");
85739
85882
  }
85740
85883
  } catch (error2) {
@@ -85758,7 +85901,7 @@ function readJsonFile(filePath, storeRoot) {
85758
85901
  if (!existsSync51(filePath))
85759
85902
  return null;
85760
85903
  try {
85761
- const initial = lstatSync12(filePath);
85904
+ const initial = lstatSync13(filePath);
85762
85905
  if (!initial.isFile() || initial.isSymbolicLink() || (initial.nlink ?? 1) > 1) {
85763
85906
  throw new Error("artifact must be a regular non-linked file");
85764
85907
  }
@@ -86989,7 +87132,7 @@ function boundedJsonFile(directory, relativePath2, config) {
86989
87132
  if (rejection)
86990
87133
  throw new Error(`unsafe input path: ${rejection}`);
86991
87134
  const target = path109.resolve(directory, relativePath2);
86992
- const stat7 = lstatSync13(target);
87135
+ const stat7 = lstatSync14(target);
86993
87136
  if (!stat7.isFile() || stat7.isSymbolicLink()) {
86994
87137
  throw new Error("input must be a regular non-symlink file");
86995
87138
  }
@@ -87022,7 +87165,7 @@ function inputPathExists(directory, relativePath2) {
87022
87165
  if (validateTargetWithinRoot(relativePath2, directory))
87023
87166
  return false;
87024
87167
  try {
87025
- lstatSync13(path109.resolve(directory, relativePath2));
87168
+ lstatSync14(path109.resolve(directory, relativePath2));
87026
87169
  return true;
87027
87170
  } catch {
87028
87171
  return false;
@@ -101506,7 +101649,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
101506
101649
  }
101507
101650
  const sdkOpts = signal ? { signal } : {};
101508
101651
  try {
101509
- const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-0g0x9ets.js");
101652
+ const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-1w9mc5ck.js");
101510
101653
  const createResult = await client.session.create({
101511
101654
  ...sessionId ? {
101512
101655
  body: {
@@ -103605,7 +103748,7 @@ async function cancelPrFeedbackLoopUnlocked(directory, sessionID, reason) {
103605
103748
  clearedEvents: []
103606
103749
  };
103607
103750
  try {
103608
- const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-0vcq1m95.js");
103751
+ const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-04ypha5r.js");
103609
103752
  await cancelPrFeedbackPublication2(directory, sessionID, reason);
103610
103753
  } catch (err) {
103611
103754
  warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
@@ -117153,7 +117296,7 @@ async function deterministicSeed(input) {
117153
117296
  }
117154
117297
 
117155
117298
  // src/services/skill-optimizer/smoke.ts
117156
- import { existsSync as existsSync78, lstatSync as lstatSync18, readFileSync as readFileSync72, realpathSync as realpathSync24 } from "fs";
117299
+ import { existsSync as existsSync78, lstatSync as lstatSync19, readFileSync as readFileSync72, realpathSync as realpathSync24 } from "fs";
117157
117300
  import * as path155 from "path";
117158
117301
 
117159
117302
  // src/hooks/spawn-helper.ts
@@ -117237,7 +117380,7 @@ var _internals142 = {
117237
117380
  validateSkillPath,
117238
117381
  isSymbolicLink: (p) => {
117239
117382
  try {
117240
- return lstatSync18(p).isSymbolicLink();
117383
+ return lstatSync19(p).isSymbolicLink();
117241
117384
  } catch {
117242
117385
  return false;
117243
117386
  }
@@ -120245,7 +120388,7 @@ function buildDetailedHelp(commandName, entry) {
120245
120388
  async function handleHelpCommand(ctx) {
120246
120389
  const targetCommand = ctx.args.join(" ");
120247
120390
  if (!targetCommand) {
120248
- const { buildHelpText } = await import("./index-ssp4t8g6.js");
120391
+ const { buildHelpText } = await import("./index-0g2nvyn9.js");
120249
120392
  return buildHelpText();
120250
120393
  }
120251
120394
  const tokens = targetCommand.split(/\s+/);
@@ -120259,7 +120402,7 @@ async function handleHelpCommand(ctx) {
120259
120402
  > Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
120260
120403
  }
120261
120404
  const similar = _internals38.findSimilarCommands(targetCommand);
120262
- const { buildHelpText: fullHelp } = await import("./index-ssp4t8g6.js");
120405
+ const { buildHelpText: fullHelp } = await import("./index-0g2nvyn9.js");
120263
120406
  if (similar.length > 0) {
120264
120407
  return `Command '/swarm ${targetCommand}' not found.
120265
120408
 
@@ -120587,7 +120730,7 @@ var COMMAND_REGISTRY = {
120587
120730
  },
120588
120731
  "guardrail explain": {
120589
120732
  handler: async (ctx) => {
120590
- const { handleGuardrailExplain } = await import("./guardrail-explain-6yv78gmk.js");
120733
+ const { handleGuardrailExplain } = await import("./guardrail-explain-ga6m57w3.js");
120591
120734
  return handleGuardrailExplain(ctx.directory, ctx.args);
120592
120735
  },
120593
120736
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -120597,7 +120740,7 @@ var COMMAND_REGISTRY = {
120597
120740
  },
120598
120741
  "guardrail reset": {
120599
120742
  handler: async (ctx) => {
120600
- const { handleGuardrailReset } = await import("./guardrail-reset-w0nxcs6a.js");
120743
+ const { handleGuardrailReset } = await import("./guardrail-reset-ezjd8vtv.js");
120601
120744
  return handleGuardrailReset(ctx.args, ctx.sessionID);
120602
120745
  },
120603
120746
  description: "Reset one exact active invocation/action circuit after repair",
@@ -120618,7 +120761,7 @@ var COMMAND_REGISTRY = {
120618
120761
  },
120619
120762
  "guardrail-log": {
120620
120763
  handler: async (ctx) => {
120621
- const { handleGuardrailLog } = await import("./guardrail-log-z5pzgkcv.js");
120764
+ const { handleGuardrailLog } = await import("./guardrail-log-aekacstp.js");
120622
120765
  return handleGuardrailLog(ctx.directory, ctx.args);
120623
120766
  },
120624
120767
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -125950,4 +126093,4 @@ function getAgentConfigs(config, directory, sessionId, projectContext) {
125950
126093
  return result;
125951
126094
  }
125952
126095
 
125953
- export { resetActionCircuitExternally, getBlockingActionCircuit, resolveConfiguredAgentModel, resolveRegisteredAgentModel, resolveEffectiveAgentOverride, normalizePath, MAX_PARALLEL_VERDICT_TASKS, computeParallelVerdict, declaresWindowsWrapperLoose, getObservedHostShell, dcParseWindowsRecursiveDelete, mergeWriteAnalyses, isPowerShellShaped, isPowerShellReadOnlyPipeline, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcExtractRecursiveRmTargets, dcEvaluateRecursiveDeleteTargets, dcCheckJunctionCreation, dcExtractPowerShellTargets, getSharedClassifierGuardrailBlock, classifyCommand, readReviewRouteReceiptSync, enforcePersistedReviewRouteReceipt, recoverPreparedTaskRepair, recoverPreparedTaskRepairUnderPlanLock, repairTaskWorkflowUnderPlanLock, recoverPreparedTaskTerminal, recoverPreparedTaskTerminalUnderPlanLock, commitTaskTerminalUnderPlanLock, matchesTier3, resetArchitectPromptBudgetAdvisories, createArchitectAgent, createCoderAgent, GENERALIST_COUNCIL_PROMPT, SKEPTIC_COUNCIL_PROMPT, DOMAIN_EXPERT_COUNCIL_PROMPT, createCriticAgent, createCuratorAgent, createDesignerAgent, createDocsAgent, createResearcherAgent, SECURITY_CATEGORIES, createReviewerAgent, createSMEAgent, createTestEngineerAgent, _internals146 as _internals, stripSwarmPrefix, extractSwarmIdFromAgentName, resolveFallbackModel, getSwarmAgents, createAgents, resolvePrimaryAgentNames, getAgentConfigs, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, isPosixRmdirExecutor, isEmptyDirectoryRemovalWithinWorkspace, resolveWindowsWriteAuthority, swarmState, startAgentSession, getAgentSession, ensureAgentSession, hasModifiedFilesForTask, getModifiedFilesForTask, updateTaskWorkflowCache, advanceTaskState, getTaskState, recordStageBCompletion, getStageBRouteEvidence, isStageBRouteRequired, hasBothStageBCompletions, hasActiveTurboMode, hasActiveLeanTurbo, parseLeanLaneIndex, computeLaneRuntimeProfile, MAX_TRACKED_STANDARD_WORKTREE_CALLS, awaitingMergeByCallID, standardWorktreeByCallID, standardWorktreeSerializationSessions, laneChildSessionAgents, recordLaneChildSession, assertTaskIdNotForeignLaneSession, getStandardWorktreeDegradationReason, resetStandardWorktreeIsolationState, checkStandardWorktreeSerializationRelease, sanitizeWorktreeTaskId, preProvisionCollisionCheck, isLaneOwnedByCurrentSession, precreateStandardWorktreeSession, preserveBackgroundWorktreeOwnershipForCallId, preserveDirtyWorktreeForCallId, preserveDirtyWorktreeAtPath, cleanupStandardWorktreeForCallId, abortStandardWorktreeDispatch, runSerializedWithMergeBacks, finishStandardWorktreeDispatch, readLaneEnvFileFromDisk, _internals23 as _internals1, redactSecrets, PR_REVIEW_REPORT_VERDICTS, allowedPrReviewReportVerdicts, normalizePrReviewPartialBaseCoverageRecord, rollbackPrReviewPartialBaseCoverageAdmission, readPrReviewTerminalCoverageForReport, PR_REVIEW_REQUIRED_MICRO_LANE_IDS, PR_REVIEW_DEPTH_TIER_THRESHOLDS, PR_REVIEW_BASE_LANE_FLOORS, PR_REVIEW_TIER_L_CONSOLIDATED_LANE_FLOOR, PR_REVIEW_MICRO_LANE_FLOORS, computePrReviewDepthTier, MAX_PR_REVIEW_SUBMIT_REJECTIONS, MAX_PR_REVIEW_VERDICT_REJECTIONS, MAX_PR_FEEDBACK_INVENTORY_AMENDMENTS, activatePrWorkflow, appendPrWorkflowSkillContractAdvisories, readPrWorkflowGateState, recordPrReviewSubmitRejection, latestPrReviewSubmitRejectionMessage, recordPrReviewVerdictRejection, latestPrReviewVerdictRejectionForLane, submitPrReviewResult, withPrWorkflowCheckoutPreparationLock, withInactivePrWorkflowCheckoutRestoreLock, clearPrWorkflowGateState, terminalizePrWorkflowGateForSession2 as terminalizePrWorkflowGateForSession, PR_WORKFLOW_PROBE_SKIPPED_NO_BUDGET_REASON, collectPrWorkflowPendingLaneLiveness, settlePresumedStalePrWorkflowLanes, abortPrWorkflow, recoverArmedPrWorkflow, bindPrWorkflowHead, rebindPrFeedbackHead, bindPrReviewBase, assertCurrentCheckoutHead, assertPrReviewCleanCheckout, enforcePrWorkflowDispatchLanesAsync, PrReviewResilienceCircuitOpenError, PrReviewResilienceRetryExhaustedError, enforcePrReviewBaseDimensions, rollbackPrReviewBaseAdmissionIfUnlaunched, rollbackPrReviewValidationBatchIfUnlaunched, admitPrReviewPartialBaseCoverage2 as admitPrReviewPartialBaseCoverage, assertPrReviewBaseCoverageSettled2 as assertPrReviewBaseCoverageSettled, recordPrReviewMicroFamilyDispatch, recordPrReviewValidationBatch, assertPrReviewValidationSettled, declarePrFeedbackInventory, enforcePrFeedbackVerificationOwnership, assertPrFeedbackVerificationSettled, recordPrFeedbackStageA, recordPrFeedbackGateBatch, assertPrFeedbackGatePhaseSettled, assertPrFeedbackReadyToPublish, invalidatePrFeedbackPublication, describePrWorkflowPublicationSection, findDanglingLivePublicationGeneration, recordPrFeedbackPushAttemptResult, cancelPrFeedbackPublication, resolvePrReviewWriterRunId, markPrReviewTriggerEvaluationComplete, bindPrReviewTriggerLedger, assertPrReviewArtifactBoundary, assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts, markPrReviewArtifactBoundary, markPrReviewHandoffComplete, readAuthoritativeFindingPolicy, readPrReviewFinalFindingPolicyForReport, transitionPrReviewToFeedback, declarePrFeedbackScope, resolvePrFeedbackScopeDeclaration, consumePrFeedbackScopeDeclaration, validatePrFeedbackScopeBinding, enforcePrWorkflowToolBefore, readPrReviewReentryBindingContext, hasActivePrReviewReentryAuthorization, reserveActivePrReviewReentryAuthorization, completePrWorkflow, _test_exports2 as _test_exports, normalizePrWorkflowShellCommand, describePrWorkflowRevisionDigestFailure, derivePrReviewCandidateInventoryForStatus, prReviewPhaseWindowForStatus, readPrReviewVerdictSettlementReceiptItems, readPrReviewVerdictSettlementEffectiveIds, readAuthoritativePrReviewCriticSettlements, readAuthoritativePrReviewCriticVerdicts, derivePrReviewPresentationOrder, derivePrReviewOrderUnstableItems, derivePrReviewReviewerSeverities, readAuthoritativePrReviewOrderAgreement, formatPrReviewLaneValidationFailure, validateExactStructuredReceiptCoverage2 as validateExactStructuredReceiptCoverage, validatePrReviewDiscoveryLaneCompletion2 as validatePrReviewDiscoveryLaneCompletion, validatePrWorkflowTransportRecovery, prReviewDiscoveryArtifactCoversLane, MAX_SALVAGED_SCHEMA_ERROR_CHARS, readPrWorkflowGateStateForRecovery, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleApproveWriteCommand, handleArchiveCommand, applySessionWorkflowView, handleAttestCommand, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, handleCheckpointCommand, DEFAULT_CI_DEADLINE_MS2 as DEFAULT_CI_DEADLINE_MS, createSignalCancellation, handleCiCommand, handleCiSimulateCommand, handleClarifyCommand, safeRealpathSync, createCuratorLLMDelegate, getCoChangePairs, startSnapshotCoordinationInitialization, ensureSnapshotCoordinationReady, retrySnapshotCoordinationInitialization, getSnapshotCoordinationStatus, beginSnapshotCoordinationReset, closeSnapshotCoordinationInitialization, markSnapshotCoordinationClosing, _snapshotCoordinationInternals, handleCloseCommand, _internals70 as _internals2, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals74 as _internals3, createHivePromoterHook, promoteToHive, promoteFromSwarm, createMemoryGateway, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getHostConfigDir, getPluginCachePaths, getPluginLockFilePaths, VERSION_PINNED_LEAF, discoverVersionPinnedCachePaths, readCachePackageVersion, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, computeQualityBudget, computeSastScan, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleBlueprintValidateCommand, handleBlueprintCurrentCommand, handleBlueprintHistoryCommand, handleBlueprintDiffCommand, handleBlueprintExportCommand, handleHarnessCandidateValidateCommand, handleHarnessCandidateShowCommand, handleHarnessCandidateDiffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, searchKnowledge, symbols, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleRecoverCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleReviewCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, isCommandFailure, COMMAND_REGISTRY, VALID_COMMANDS, _internals38 as _internals4, resolveCommand, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand };
126096
+ export { resetActionCircuitExternally, getBlockingActionCircuit, resolveConfiguredAgentModel, resolveRegisteredAgentModel, resolveEffectiveAgentOverride, normalizePath, MAX_PARALLEL_VERDICT_TASKS, computeParallelVerdict, dcParseWindowsRecursiveDelete, declaresWindowsWrapperLoose, getObservedHostShell, mergeWriteAnalyses, isPowerShellShaped, isPowerShellReadOnlyPipeline, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcExtractRecursiveRmTargets, dcEvaluateRecursiveDeleteTargets, dcCheckJunctionCreation, dcExtractPowerShellTargets, getSharedClassifierGuardrailBlock, classifyCommand, readReviewRouteReceiptSync, enforcePersistedReviewRouteReceipt, recoverPreparedTaskRepair, recoverPreparedTaskRepairUnderPlanLock, repairTaskWorkflowUnderPlanLock, recoverPreparedTaskTerminal, recoverPreparedTaskTerminalUnderPlanLock, commitTaskTerminalUnderPlanLock, matchesTier3, resetArchitectPromptBudgetAdvisories, createArchitectAgent, createCoderAgent, GENERALIST_COUNCIL_PROMPT, SKEPTIC_COUNCIL_PROMPT, DOMAIN_EXPERT_COUNCIL_PROMPT, createCriticAgent, createCuratorAgent, createDesignerAgent, createDocsAgent, createResearcherAgent, SECURITY_CATEGORIES, createReviewerAgent, createSMEAgent, createTestEngineerAgent, _internals146 as _internals, stripSwarmPrefix, extractSwarmIdFromAgentName, resolveFallbackModel, getSwarmAgents, createAgents, resolvePrimaryAgentNames, getAgentConfigs, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, isPosixRmdirExecutor, isEmptyDirectoryRemovalWithinWorkspace, resolveWindowsWriteAuthority, swarmState, startAgentSession, getAgentSession, ensureAgentSession, hasModifiedFilesForTask, getModifiedFilesForTask, updateTaskWorkflowCache, advanceTaskState, getTaskState, recordStageBCompletion, getStageBRouteEvidence, isStageBRouteRequired, hasBothStageBCompletions, hasActiveTurboMode, hasActiveLeanTurbo, parseLeanLaneIndex, computeLaneRuntimeProfile, MAX_TRACKED_STANDARD_WORKTREE_CALLS, awaitingMergeByCallID, standardWorktreeByCallID, standardWorktreeSerializationSessions, laneChildSessionAgents, recordLaneChildSession, assertTaskIdNotForeignLaneSession, getStandardWorktreeDegradationReason, resetStandardWorktreeIsolationState, checkStandardWorktreeSerializationRelease, sanitizeWorktreeTaskId, preProvisionCollisionCheck, isLaneOwnedByCurrentSession, precreateStandardWorktreeSession, preserveBackgroundWorktreeOwnershipForCallId, preserveDirtyWorktreeForCallId, preserveDirtyWorktreeAtPath, cleanupStandardWorktreeForCallId, abortStandardWorktreeDispatch, runSerializedWithMergeBacks, finishStandardWorktreeDispatch, readLaneEnvFileFromDisk, _internals23 as _internals1, redactSecrets, PR_REVIEW_REPORT_VERDICTS, allowedPrReviewReportVerdicts, normalizePrReviewPartialBaseCoverageRecord, rollbackPrReviewPartialBaseCoverageAdmission, readPrReviewTerminalCoverageForReport, PR_REVIEW_REQUIRED_MICRO_LANE_IDS, PR_REVIEW_DEPTH_TIER_THRESHOLDS, PR_REVIEW_BASE_LANE_FLOORS, PR_REVIEW_TIER_L_CONSOLIDATED_LANE_FLOOR, PR_REVIEW_MICRO_LANE_FLOORS, computePrReviewDepthTier, MAX_PR_REVIEW_SUBMIT_REJECTIONS, MAX_PR_REVIEW_VERDICT_REJECTIONS, MAX_PR_FEEDBACK_INVENTORY_AMENDMENTS, activatePrWorkflow, appendPrWorkflowSkillContractAdvisories, readPrWorkflowGateState, recordPrReviewSubmitRejection, latestPrReviewSubmitRejectionMessage, recordPrReviewVerdictRejection, latestPrReviewVerdictRejectionForLane, submitPrReviewResult, withPrWorkflowCheckoutPreparationLock, withInactivePrWorkflowCheckoutRestoreLock, clearPrWorkflowGateState, terminalizePrWorkflowGateForSession2 as terminalizePrWorkflowGateForSession, PR_WORKFLOW_PROBE_SKIPPED_NO_BUDGET_REASON, collectPrWorkflowPendingLaneLiveness, settlePresumedStalePrWorkflowLanes, abortPrWorkflow, recoverArmedPrWorkflow, bindPrWorkflowHead, rebindPrFeedbackHead, bindPrReviewBase, assertCurrentCheckoutHead, assertPrReviewCleanCheckout, enforcePrWorkflowDispatchLanesAsync, PrReviewResilienceCircuitOpenError, PrReviewResilienceRetryExhaustedError, enforcePrReviewBaseDimensions, rollbackPrReviewBaseAdmissionIfUnlaunched, rollbackPrReviewValidationBatchIfUnlaunched, admitPrReviewPartialBaseCoverage2 as admitPrReviewPartialBaseCoverage, assertPrReviewBaseCoverageSettled2 as assertPrReviewBaseCoverageSettled, recordPrReviewMicroFamilyDispatch, recordPrReviewValidationBatch, assertPrReviewValidationSettled, declarePrFeedbackInventory, enforcePrFeedbackVerificationOwnership, assertPrFeedbackVerificationSettled, recordPrFeedbackStageA, recordPrFeedbackGateBatch, assertPrFeedbackGatePhaseSettled, assertPrFeedbackReadyToPublish, invalidatePrFeedbackPublication, describePrWorkflowPublicationSection, findDanglingLivePublicationGeneration, recordPrFeedbackPushAttemptResult, cancelPrFeedbackPublication, resolvePrReviewWriterRunId, markPrReviewTriggerEvaluationComplete, bindPrReviewTriggerLedger, assertPrReviewArtifactBoundary, assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts, markPrReviewArtifactBoundary, markPrReviewHandoffComplete, readAuthoritativeFindingPolicy, readPrReviewFinalFindingPolicyForReport, transitionPrReviewToFeedback, declarePrFeedbackScope, resolvePrFeedbackScopeDeclaration, consumePrFeedbackScopeDeclaration, validatePrFeedbackScopeBinding, enforcePrWorkflowToolBefore, readPrReviewReentryBindingContext, hasActivePrReviewReentryAuthorization, reserveActivePrReviewReentryAuthorization, completePrWorkflow, _test_exports2 as _test_exports, normalizePrWorkflowShellCommand, describePrWorkflowRevisionDigestFailure, derivePrReviewCandidateInventoryForStatus, prReviewPhaseWindowForStatus, readPrReviewVerdictSettlementReceiptItems, readPrReviewVerdictSettlementEffectiveIds, readAuthoritativePrReviewCriticSettlements, readAuthoritativePrReviewCriticVerdicts, derivePrReviewPresentationOrder, derivePrReviewOrderUnstableItems, derivePrReviewReviewerSeverities, readAuthoritativePrReviewOrderAgreement, formatPrReviewLaneValidationFailure, validateExactStructuredReceiptCoverage2 as validateExactStructuredReceiptCoverage, validatePrReviewDiscoveryLaneCompletion2 as validatePrReviewDiscoveryLaneCompletion, validatePrWorkflowTransportRecovery, prReviewDiscoveryArtifactCoversLane, MAX_SALVAGED_SCHEMA_ERROR_CHARS, readPrWorkflowGateStateForRecovery, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleApproveWriteCommand, handleArchiveCommand, applySessionWorkflowView, handleAttestCommand, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, handleCheckpointCommand, DEFAULT_CI_DEADLINE_MS2 as DEFAULT_CI_DEADLINE_MS, createSignalCancellation, handleCiCommand, handleCiSimulateCommand, handleClarifyCommand, safeRealpathSync, createCuratorLLMDelegate, getCoChangePairs, startSnapshotCoordinationInitialization, ensureSnapshotCoordinationReady, retrySnapshotCoordinationInitialization, getSnapshotCoordinationStatus, beginSnapshotCoordinationReset, closeSnapshotCoordinationInitialization, markSnapshotCoordinationClosing, _snapshotCoordinationInternals, handleCloseCommand, _internals70 as _internals2, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals74 as _internals3, createHivePromoterHook, promoteToHive, promoteFromSwarm, createMemoryGateway, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getHostConfigDir, getPluginCachePaths, getPluginLockFilePaths, VERSION_PINNED_LEAF, discoverVersionPinnedCachePaths, readCachePackageVersion, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, computeQualityBudget, computeSastScan, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleBlueprintValidateCommand, handleBlueprintCurrentCommand, handleBlueprintHistoryCommand, handleBlueprintDiffCommand, handleBlueprintExportCommand, handleHarnessCandidateValidateCommand, handleHarnessCandidateShowCommand, handleHarnessCandidateDiffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, searchKnowledge, symbols, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleRecoverCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleReviewCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, isCommandFailure, COMMAND_REGISTRY, VALID_COMMANDS, _internals38 as _internals4, resolveCommand, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand };