opencode-swarm 7.126.3 → 7.126.4

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 (37) hide show
  1. package/.opencode/skills/issue-tracer/scripts/trace-init.sh +20 -0
  2. package/dist/cli/{config-doctor-mfx27331.js → config-doctor-2admdwc2.js} +2 -2
  3. package/dist/cli/{curation-policy-n944aq62.js → curation-policy-s2wydhda.js} +2 -2
  4. package/dist/cli/{curator-jm9ehfkg.js → curator-4tp297kp.js} +12 -12
  5. package/dist/cli/{curator-llm-factory-3cy0h9yw.js → curator-llm-factory-caf8jqyb.js} +12 -12
  6. package/dist/cli/{guardrail-explain-va0kj05m.js → guardrail-explain-yjzbs0fq.js} +13 -13
  7. package/dist/cli/{guardrail-log-61gya05m.js → guardrail-log-7cychbgs.js} +3 -3
  8. package/dist/cli/{hive-promoter-h9c4kyv0.js → hive-promoter-er83aqka.js} +12 -12
  9. package/dist/cli/{index-nqp13m5a.js → index-360anpk0.js} +1 -1
  10. package/dist/cli/{index-b16153py.js → index-46xgqgd5.js} +14 -14
  11. package/dist/cli/{index-gwss5btk.js → index-4scxzpbz.js} +1 -1
  12. package/dist/cli/{index-c48dvb6j.js → index-6mfcg9ws.js} +2 -2
  13. package/dist/cli/{index-vcqwhe9d.js → index-7ttstfv6.js} +25 -3
  14. package/dist/cli/{index-bf76q8q7.js → index-8etcyr9r.js} +1 -1
  15. package/dist/cli/{index-3xd9a2g7.js → index-cpssctv1.js} +1 -1
  16. package/dist/cli/{index-6t5sa6v0.js → index-cxtnbjwn.js} +2 -2
  17. package/dist/cli/{index-pb8ag9vg.js → index-mgdcrhkg.js} +4 -4
  18. package/dist/cli/{index-pf3xae4s.js → index-r3f1z043.js} +1 -1
  19. package/dist/cli/{index-88dt7c9z.js → index-swgsq1ds.js} +2 -2
  20. package/dist/cli/{index-gf9cxvp0.js → index-v3gw3sc5.js} +1 -1
  21. package/dist/cli/{index-gxw20m1d.js → index-v4n224r1.js} +1 -1
  22. package/dist/cli/{index-f97dm6tz.js → index-vbk29hmf.js} +5 -5
  23. package/dist/cli/{index-7bxw3v5w.js → index-ypy3dhbg.js} +3 -3
  24. package/dist/cli/{index-5n868tw8.js → index-yvgmsepb.js} +136 -124
  25. package/dist/cli/index.js +12 -12
  26. package/dist/cli/{knowledge-escalator-nna0zec3.js → knowledge-escalator-9sd533p6.js} +3 -3
  27. package/dist/cli/{knowledge-events-7k82xk36.js → knowledge-events-v0cp1a8d.js} +1 -1
  28. package/dist/cli/{knowledge-store-efvtng9t.js → knowledge-store-mv7qjf4s.js} +1 -1
  29. package/dist/cli/{knowledge-validator-jh93eagj.js → knowledge-validator-g05g6qrt.js} +4 -4
  30. package/dist/cli/{scan-cursor-cydz8d9q.js → scan-cursor-jp2zz6y1.js} +2 -2
  31. package/dist/cli/{schema-fa033pqw.js → schema-2x7wsb0n.js} +1 -1
  32. package/dist/cli/{skill-generator-8v463kj7.js → skill-generator-497vvped.js} +5 -5
  33. package/dist/config/schema.d.ts +4 -4
  34. package/dist/index.js +252 -252
  35. package/dist/tools/test-runner.d.ts +12 -2
  36. package/dist/utils/path-security.d.ts +2 -0
  37. package/package.json +1 -1
@@ -4,7 +4,7 @@ import {
4
4
  readDoctorArtifact,
5
5
  removeStraySwarmDir,
6
6
  runConfigDoctor
7
- } from "./index-3xd9a2g7.js";
7
+ } from "./index-cpssctv1.js";
8
8
  import {
9
9
  EvaluationTaskV1Schema,
10
10
  GateAuditManifestV1Schema,
@@ -94,15 +94,15 @@ import {
94
94
  retireSkill,
95
95
  selectCandidateEntries,
96
96
  syncBundledProjectSkillsIfMissingAsync
97
- } from "./index-7bxw3v5w.js";
97
+ } from "./index-ypy3dhbg.js";
98
98
  import {
99
99
  readRecentEscalations
100
- } from "./index-f97dm6tz.js";
100
+ } from "./index-vbk29hmf.js";
101
101
  import {
102
102
  alreadyCuratedThisGeneration,
103
103
  claimNextScanBatch,
104
104
  resolveCohortId
105
- } from "./index-pf3xae4s.js";
105
+ } from "./index-r3f1z043.js";
106
106
  import {
107
107
  CURATOR_INIT_PROMPT,
108
108
  CURATOR_PHASE_PROMPT,
@@ -135,11 +135,11 @@ import {
135
135
  validateActionability,
136
136
  validateActionableFields,
137
137
  validateLesson
138
- } from "./index-88dt7c9z.js";
138
+ } from "./index-swgsq1ds.js";
139
139
  import {
140
140
  authorizeCuration,
141
141
  buildConfigFingerprintInput
142
- } from "./index-gwss5btk.js";
142
+ } from "./index-4scxzpbz.js";
143
143
  import {
144
144
  cohortConfigFingerprint
145
145
  } from "./index-rtry5xyf.js";
@@ -169,7 +169,7 @@ import {
169
169
  transactFile,
170
170
  transactKnowledge,
171
171
  wordBigrams
172
- } from "./index-pb8ag9vg.js";
172
+ } from "./index-mgdcrhkg.js";
173
173
  import {
174
174
  MAX_EVENT_LOG_ENTRIES,
175
175
  _internals,
@@ -179,7 +179,7 @@ import {
179
179
  recordHiveKnowledgeEvent,
180
180
  recordKnowledgeEvent,
181
181
  resolveKnowledgeEventsPath
182
- } from "./index-nqp13m5a.js";
182
+ } from "./index-360anpk0.js";
183
183
  import {
184
184
  resolveHiveDataDir,
185
185
  resolveHiveEventsPath,
@@ -201,7 +201,7 @@ import {
201
201
  init_loader,
202
202
  loadPluginConfig,
203
203
  loadPluginConfigWithMeta
204
- } from "./index-gf9cxvp0.js";
204
+ } from "./index-v3gw3sc5.js";
205
205
  import {
206
206
  RetrospectiveEvidenceSchema
207
207
  } from "./index-k5jrywpr.js";
@@ -220,7 +220,7 @@ import {
220
220
  init_schema,
221
221
  init_tool_metadata,
222
222
  stripKnownSwarmPrefix
223
- } from "./index-vcqwhe9d.js";
223
+ } from "./index-7ttstfv6.js";
224
224
  import {
225
225
  KNOWLEDGE_SCHEMA_VERSION,
226
226
  OUTCOME_BLOCK_THRESHOLD,
@@ -10962,7 +10962,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
10962
10962
  }
10963
10963
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
10964
10964
  try {
10965
- const skillModule = await import("./skill-generator-8v463kj7.js");
10965
+ const skillModule = await import("./skill-generator-497vvped.js");
10966
10966
  for (const cand of skillCandidates) {
10967
10967
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
10968
10968
  continue;
@@ -11299,7 +11299,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
11299
11299
  } catch {}
11300
11300
  }
11301
11301
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
11302
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-nna0zec3.js");
11302
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-9sd533p6.js");
11303
11303
  for (const { id } of contradictedEntries) {
11304
11304
  try {
11305
11305
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -12098,7 +12098,7 @@ async function runCuratorPostMortem(directory, options = {}) {
12098
12098
  warnings.push("Failed to collect knowledge summary.");
12099
12099
  }
12100
12100
  try {
12101
- const { getScanStatus } = await import("./scan-cursor-cydz8d9q.js");
12101
+ const { getScanStatus } = await import("./scan-cursor-jp2zz6y1.js");
12102
12102
  const scanStatus = await getScanStatus(directory);
12103
12103
  if (scanStatus.remaining_estimate > 0) {
12104
12104
  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.`);
@@ -12270,9 +12270,9 @@ var _internals15 = {
12270
12270
  verifyPostMortemKnowledgeActions,
12271
12271
  repairPostMortemActions,
12272
12272
  loadDefaultKnowledgeConfig: async (directory) => {
12273
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-fa033pqw.js");
12273
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-2x7wsb0n.js");
12274
12274
  try {
12275
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-c48dvb6j.js");
12275
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-6mfcg9ws.js");
12276
12276
  const loaded = loadPluginConfigWithMeta2(directory);
12277
12277
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
12278
12278
  } catch {
@@ -12280,11 +12280,11 @@ var _internals15 = {
12280
12280
  }
12281
12281
  },
12282
12282
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
12283
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-jm9ehfkg.js");
12283
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-4tp297kp.js");
12284
12284
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
12285
12285
  },
12286
12286
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
12287
- const { checkHivePromotions } = await import("./hive-promoter-h9c4kyv0.js");
12287
+ const { checkHivePromotions } = await import("./hive-promoter-er83aqka.js");
12288
12288
  return checkHivePromotions(entries, knowledgeConfig, directory);
12289
12289
  },
12290
12290
  applyProposalTriage: async (directory, triage) => {
@@ -12293,7 +12293,7 @@ var _internals15 = {
12293
12293
  activateProposal,
12294
12294
  listSkills: listSkills2,
12295
12295
  sanitizeSlug
12296
- } = await import("./skill-generator-8v463kj7.js");
12296
+ } = await import("./skill-generator-497vvped.js");
12297
12297
  const result = {
12298
12298
  approved: [],
12299
12299
  rejected: [],
@@ -14818,9 +14818,9 @@ function hashContent(content) {
14818
14818
  return createHash7("sha1").update(content).digest("hex");
14819
14819
  }
14820
14820
  async function loadConfigForPolicyCurator(directory) {
14821
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-fa033pqw.js");
14821
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-2x7wsb0n.js");
14822
14822
  try {
14823
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-c48dvb6j.js");
14823
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-6mfcg9ws.js");
14824
14824
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
14825
14825
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
14826
14826
  } catch {
@@ -17981,7 +17981,7 @@ async function runFinalizeStage(ctx) {
17981
17981
  }
17982
17982
  }
17983
17983
  try {
17984
- const { CuratorConfigSchema: CCS } = await import("./schema-fa033pqw.js");
17984
+ const { CuratorConfigSchema: CCS } = await import("./schema-2x7wsb0n.js");
17985
17985
  const { config: pmLoadedConfig } = _internals24.loadPluginConfigWithMeta(ctx.directory);
17986
17986
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
17987
17987
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -20150,9 +20150,9 @@ var _internals28 = {
20150
20150
  readSwarmFileAsync,
20151
20151
  loadCuratorDeps: async () => {
20152
20152
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
20153
- import("./schema-fa033pqw.js"),
20154
- import("./curator-jm9ehfkg.js"),
20155
- import("./curator-llm-factory-3cy0h9yw.js")
20153
+ import("./schema-2x7wsb0n.js"),
20154
+ import("./curator-4tp297kp.js"),
20155
+ import("./curator-llm-factory-caf8jqyb.js")
20156
20156
  ]);
20157
20157
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
20158
20158
  }
@@ -20651,7 +20651,7 @@ import { fileURLToPath } from "url";
20651
20651
  // package.json
20652
20652
  var package_default = {
20653
20653
  name: "opencode-swarm",
20654
- version: "7.126.3",
20654
+ version: "7.126.4",
20655
20655
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
20656
20656
  main: "dist/index.js",
20657
20657
  types: "dist/index.d.ts",
@@ -21173,7 +21173,7 @@ async function computeCurationDiagnostics(directory, entries) {
21173
21173
  let scanCompleted = false;
21174
21174
  let scanRemaining = 0;
21175
21175
  try {
21176
- const { getScanStatus } = await import("./scan-cursor-cydz8d9q.js");
21176
+ const { getScanStatus } = await import("./scan-cursor-jp2zz6y1.js");
21177
21177
  const status = await getScanStatus(directory);
21178
21178
  scanGeneration = status.generation;
21179
21179
  scanCompleted = status.completed;
@@ -21183,17 +21183,17 @@ async function computeCurationDiagnostics(directory, entries) {
21183
21183
  try {
21184
21184
  const { isLinked: isLinked2 } = await import("./knowledge-link-4yd2z8ev.js");
21185
21185
  if (isLinked2(directory)) {
21186
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-fa033pqw.js");
21186
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-2x7wsb0n.js");
21187
21187
  let config;
21188
21188
  try {
21189
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-c48dvb6j.js");
21189
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-6mfcg9ws.js");
21190
21190
  const loaded = loadPluginConfigWithMeta2(directory);
21191
21191
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
21192
21192
  } catch {
21193
21193
  config = KnowledgeConfigSchema2.parse({});
21194
21194
  }
21195
21195
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
21196
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-n944aq62.js");
21196
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-s2wydhda.js");
21197
21197
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
21198
21198
  const cohortFp = await readCohortConfigFingerprint(directory);
21199
21199
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -22391,7 +22391,7 @@ async function handleDoctorCommand(directory, args) {
22391
22391
  const result = runConfigDoctor(config, directory);
22392
22392
  let output;
22393
22393
  if (enableAutoFix && result.hasAutoFixableIssues) {
22394
- const { runConfigDoctorWithFixes } = await import("./config-doctor-mfx27331.js");
22394
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-2admdwc2.js");
22395
22395
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
22396
22396
  applyLossy: true
22397
22397
  });
@@ -35013,7 +35013,9 @@ var MAX_SAFE_TEST_FILES = 50;
35013
35013
  var MAX_SAFE_SOURCE_FILES = 1;
35014
35014
  async function estimateFanOut(sourceFiles, cwd) {
35015
35015
  try {
35016
- const impactMap = await loadImpactMap(cwd, { skipRebuild: true });
35016
+ const impactMap = await _internals55.loadImpactMap(cwd, {
35017
+ skipRebuild: true
35018
+ });
35017
35019
  const uniqueTestFiles = new Set;
35018
35020
  for (const sourceFile of sourceFiles) {
35019
35021
  const resolvedPath = path70.resolve(cwd, sourceFile);
@@ -35101,45 +35103,45 @@ function hasDevDependency(devDeps, ...patterns) {
35101
35103
  return hasPackageJsonDependency(devDeps, ...patterns);
35102
35104
  }
35103
35105
  function detectGoTest(cwd) {
35104
- return fs31.existsSync(path70.join(cwd, "go.mod")) && isCommandAvailable("go");
35106
+ return _internals55.existsSync(path70.join(cwd, "go.mod")) && _internals55.isCommandAvailable("go");
35105
35107
  }
35106
35108
  function detectJavaMaven(cwd) {
35107
- return fs31.existsSync(path70.join(cwd, "pom.xml")) && isCommandAvailable("mvn");
35109
+ return _internals55.existsSync(path70.join(cwd, "pom.xml")) && _internals55.isCommandAvailable("mvn");
35108
35110
  }
35109
35111
  function detectGradle(cwd) {
35110
- const hasBuildFile = fs31.existsSync(path70.join(cwd, "build.gradle")) || fs31.existsSync(path70.join(cwd, "build.gradle.kts"));
35111
- const hasGradlew = fs31.existsSync(path70.join(cwd, "gradlew")) || fs31.existsSync(path70.join(cwd, "gradlew.bat"));
35112
- return hasBuildFile && (hasGradlew || isCommandAvailable("gradle"));
35112
+ const hasBuildFile = _internals55.existsSync(path70.join(cwd, "build.gradle")) || _internals55.existsSync(path70.join(cwd, "build.gradle.kts"));
35113
+ const hasGradlew = _internals55.existsSync(path70.join(cwd, "gradlew")) || _internals55.existsSync(path70.join(cwd, "gradlew.bat"));
35114
+ return hasBuildFile && (hasGradlew || _internals55.isCommandAvailable("gradle"));
35113
35115
  }
35114
35116
  function detectDotnetTest(cwd) {
35115
35117
  try {
35116
- const files = fs31.readdirSync(cwd);
35118
+ const files = _internals55.readdirSync(cwd);
35117
35119
  const hasCsproj = files.some((f) => f.endsWith(".csproj"));
35118
- return hasCsproj && isCommandAvailable("dotnet");
35120
+ return hasCsproj && _internals55.isCommandAvailable("dotnet");
35119
35121
  } catch {
35120
35122
  return false;
35121
35123
  }
35122
35124
  }
35123
35125
  function detectCTest(cwd) {
35124
- const hasSource = fs31.existsSync(path70.join(cwd, "CMakeLists.txt"));
35125
- const hasBuildCache = fs31.existsSync(path70.join(cwd, "CMakeCache.txt")) || fs31.existsSync(path70.join(cwd, "build", "CMakeCache.txt"));
35126
- return (hasSource || hasBuildCache) && isCommandAvailable("ctest");
35126
+ const hasSource = _internals55.existsSync(path70.join(cwd, "CMakeLists.txt"));
35127
+ const hasBuildCache = _internals55.existsSync(path70.join(cwd, "CMakeCache.txt")) || _internals55.existsSync(path70.join(cwd, "build", "CMakeCache.txt"));
35128
+ return (hasSource || hasBuildCache) && _internals55.isCommandAvailable("ctest");
35127
35129
  }
35128
35130
  function detectSwiftTest(cwd) {
35129
- return fs31.existsSync(path70.join(cwd, "Package.swift")) && isCommandAvailable("swift");
35131
+ return _internals55.existsSync(path70.join(cwd, "Package.swift")) && _internals55.isCommandAvailable("swift");
35130
35132
  }
35131
35133
  function detectDartTest(cwd) {
35132
- return fs31.existsSync(path70.join(cwd, "pubspec.yaml")) && (isCommandAvailable("dart") || isCommandAvailable("flutter"));
35134
+ return _internals55.existsSync(path70.join(cwd, "pubspec.yaml")) && (_internals55.isCommandAvailable("dart") || _internals55.isCommandAvailable("flutter"));
35133
35135
  }
35134
35136
  function detectRSpec(cwd) {
35135
- const hasRSpecFile = fs31.existsSync(path70.join(cwd, ".rspec"));
35136
- const hasGemfile = fs31.existsSync(path70.join(cwd, "Gemfile"));
35137
- const hasSpecDir = fs31.existsSync(path70.join(cwd, "spec"));
35137
+ const hasRSpecFile = _internals55.existsSync(path70.join(cwd, ".rspec"));
35138
+ const hasGemfile = _internals55.existsSync(path70.join(cwd, "Gemfile"));
35139
+ const hasSpecDir = _internals55.existsSync(path70.join(cwd, "spec"));
35138
35140
  const hasRSpec = hasRSpecFile || hasGemfile && hasSpecDir;
35139
- return hasRSpec && (isCommandAvailable("bundle") || isCommandAvailable("rspec"));
35141
+ return hasRSpec && (_internals55.isCommandAvailable("bundle") || _internals55.isCommandAvailable("rspec"));
35140
35142
  }
35141
35143
  function detectMinitest(cwd) {
35142
- return fs31.existsSync(path70.join(cwd, "test")) && (fs31.existsSync(path70.join(cwd, "Gemfile")) || fs31.existsSync(path70.join(cwd, "Rakefile"))) && isCommandAvailable("ruby");
35144
+ return _internals55.existsSync(path70.join(cwd, "test")) && (_internals55.existsSync(path70.join(cwd, "Gemfile")) || _internals55.existsSync(path70.join(cwd, "Rakefile"))) && _internals55.isCommandAvailable("ruby");
35143
35145
  }
35144
35146
  var DISPATCH_FRAMEWORK_MAP = {
35145
35147
  bun: "bun",
@@ -35230,8 +35232,8 @@ async function detectTestFramework(cwd) {
35230
35232
  const baseDir = cwd;
35231
35233
  try {
35232
35234
  const packageJsonPath = path70.join(baseDir, "package.json");
35233
- if (fs31.existsSync(packageJsonPath)) {
35234
- const content = fs31.readFileSync(packageJsonPath, "utf-8");
35235
+ if (_internals55.existsSync(packageJsonPath)) {
35236
+ const content = _internals55.readFileSync(packageJsonPath, "utf-8");
35235
35237
  const pkg = JSON.parse(content);
35236
35238
  const _deps = pkg.dependencies || {};
35237
35239
  const devDeps = pkg.devDependencies || {};
@@ -35250,7 +35252,7 @@ async function detectTestFramework(cwd) {
35250
35252
  return "jest";
35251
35253
  if (hasDevDependency(devDeps, "mocha", "@types/mocha"))
35252
35254
  return "mocha";
35253
- if (fs31.existsSync(path70.join(baseDir, "bun.lockb")) || fs31.existsSync(path70.join(baseDir, "bun.lock"))) {
35255
+ if (_internals55.existsSync(path70.join(baseDir, "bun.lockb")) || _internals55.existsSync(path70.join(baseDir, "bun.lock"))) {
35254
35256
  if (scripts.test?.includes("bun"))
35255
35257
  return "bun";
35256
35258
  }
@@ -35260,28 +35262,28 @@ async function detectTestFramework(cwd) {
35260
35262
  const pyprojectTomlPath = path70.join(baseDir, "pyproject.toml");
35261
35263
  const setupCfgPath = path70.join(baseDir, "setup.cfg");
35262
35264
  const requirementsTxtPath = path70.join(baseDir, "requirements.txt");
35263
- if (fs31.existsSync(pyprojectTomlPath)) {
35264
- const content = fs31.readFileSync(pyprojectTomlPath, "utf-8");
35265
+ if (_internals55.existsSync(pyprojectTomlPath)) {
35266
+ const content = _internals55.readFileSync(pyprojectTomlPath, "utf-8");
35265
35267
  if (content.includes("[tool.pytest"))
35266
35268
  return "pytest";
35267
35269
  if (content.includes("pytest"))
35268
35270
  return "pytest";
35269
35271
  }
35270
- if (fs31.existsSync(setupCfgPath)) {
35271
- const content = fs31.readFileSync(setupCfgPath, "utf-8");
35272
+ if (_internals55.existsSync(setupCfgPath)) {
35273
+ const content = _internals55.readFileSync(setupCfgPath, "utf-8");
35272
35274
  if (content.includes("[pytest]"))
35273
35275
  return "pytest";
35274
35276
  }
35275
- if (fs31.existsSync(requirementsTxtPath)) {
35276
- const content = fs31.readFileSync(requirementsTxtPath, "utf-8");
35277
+ if (_internals55.existsSync(requirementsTxtPath)) {
35278
+ const content = _internals55.readFileSync(requirementsTxtPath, "utf-8");
35277
35279
  if (content.includes("pytest"))
35278
35280
  return "pytest";
35279
35281
  }
35280
35282
  } catch {}
35281
35283
  try {
35282
35284
  const cargoTomlPath = path70.join(baseDir, "Cargo.toml");
35283
- if (fs31.existsSync(cargoTomlPath)) {
35284
- const content = fs31.readFileSync(cargoTomlPath, "utf-8");
35285
+ if (_internals55.existsSync(cargoTomlPath)) {
35286
+ const content = _internals55.readFileSync(cargoTomlPath, "utf-8");
35285
35287
  if (content.includes("[dev-dependencies]")) {
35286
35288
  if (content.includes("tokio") || content.includes("mockall") || content.includes("pretty_assertions")) {
35287
35289
  return "cargo";
@@ -35293,7 +35295,7 @@ async function detectTestFramework(cwd) {
35293
35295
  const pesterConfigPath = path70.join(baseDir, "pester.config.ps1");
35294
35296
  const pesterConfigJsonPath = path70.join(baseDir, "pester.config.ps1.json");
35295
35297
  const pesterPs1Path = path70.join(baseDir, "tests.ps1");
35296
- if (fs31.existsSync(pesterConfigPath) || fs31.existsSync(pesterConfigJsonPath) || fs31.existsSync(pesterPs1Path)) {
35298
+ if (_internals55.existsSync(pesterConfigPath) || _internals55.existsSync(pesterConfigJsonPath) || _internals55.existsSync(pesterPs1Path)) {
35297
35299
  return "pester";
35298
35300
  }
35299
35301
  } catch {}
@@ -35321,12 +35323,12 @@ async function detectTestFramework(cwd) {
35321
35323
  return "none";
35322
35324
  }
35323
35325
  function detectPhpTest(cwd) {
35324
- if (fs31.existsSync(path70.join(cwd, "artisan")) && fs31.existsSync(path70.join(cwd, "composer.json"))) {
35326
+ if (_internals55.existsSync(path70.join(cwd, "artisan")) && _internals55.existsSync(path70.join(cwd, "composer.json"))) {
35325
35327
  return "php-artisan";
35326
35328
  }
35327
- if (fs31.existsSync(path70.join(cwd, "Pest.php")))
35329
+ if (_internals55.existsSync(path70.join(cwd, "Pest.php")))
35328
35330
  return "pest";
35329
- if (fs31.existsSync(path70.join(cwd, "phpunit.xml")) || fs31.existsSync(path70.join(cwd, "phpunit.xml.dist"))) {
35331
+ if (_internals55.existsSync(path70.join(cwd, "phpunit.xml")) || _internals55.existsSync(path70.join(cwd, "phpunit.xml.dist"))) {
35330
35332
  return "phpunit";
35331
35333
  }
35332
35334
  return null;
@@ -35708,9 +35710,9 @@ function buildTestCommand(framework, scope, files, coverage, baseDir, bail) {
35708
35710
  case "swift-test":
35709
35711
  return ["swift", "test"];
35710
35712
  case "dart-test":
35711
- return isCommandAvailable("flutter") ? ["flutter", "test", ...files] : ["dart", "test", ...files];
35713
+ return _internals55.isCommandAvailable("flutter") ? ["flutter", "test", ...files] : ["dart", "test", ...files];
35712
35714
  case "rspec": {
35713
- const args = isCommandAvailable("bundle") ? ["bundle", "exec", "rspec"] : ["rspec"];
35715
+ const args = _internals55.isCommandAvailable("bundle") ? ["bundle", "exec", "rspec"] : ["rspec"];
35714
35716
  if (bail)
35715
35717
  args.push("--fail-fast");
35716
35718
  if (scope !== "all" && files.length > 0) {
@@ -36723,7 +36725,7 @@ var test_runner = createSwarmTool({
36723
36725
  return JSON.stringify(errorResult, null, 2);
36724
36726
  }
36725
36727
  try {
36726
- const impactResult = await analyzeImpact(sourceFiles, workingDir, MAX_SAFE_TEST_FILES);
36728
+ const impactResult = await _internals55.analyzeImpact(sourceFiles, workingDir, MAX_SAFE_TEST_FILES);
36727
36729
  if (impactResult.budgetExceeded) {
36728
36730
  const errorResult = {
36729
36731
  success: false,
@@ -36813,6 +36815,16 @@ var test_runner = createSwarmTool({
36813
36815
  return JSON.stringify(result, null, 2);
36814
36816
  }
36815
36817
  });
36818
+ var _internals55 = {
36819
+ analyzeImpact,
36820
+ loadImpactMap,
36821
+ isCommandAvailable,
36822
+ existsSync: fs31.existsSync,
36823
+ readdirSync: fs31.readdirSync,
36824
+ readFileSync: fs31.readFileSync,
36825
+ selectHistoryForAnalysis,
36826
+ AGGREGATE_TEST_NAME
36827
+ };
36816
36828
 
36817
36829
  // src/services/preflight-service.ts
36818
36830
  var MIN_CHECK_TIMEOUT_MS = 5000;
@@ -36898,9 +36910,9 @@ function getVersionFileVersion(dir) {
36898
36910
  async function runVersionCheck(dir, _timeoutMs) {
36899
36911
  const startTime = Date.now();
36900
36912
  try {
36901
- const packageVersion = _internals55.getPackageVersion(dir);
36902
- const changelogVersion = _internals55.getChangelogVersion(dir);
36903
- const versionFileVersion = _internals55.getVersionFileVersion(dir);
36913
+ const packageVersion = _internals56.getPackageVersion(dir);
36914
+ const changelogVersion = _internals56.getChangelogVersion(dir);
36915
+ const versionFileVersion = _internals56.getVersionFileVersion(dir);
36904
36916
  const versions = [];
36905
36917
  if (packageVersion)
36906
36918
  versions.push(`package.json: ${packageVersion}`);
@@ -37264,7 +37276,7 @@ async function runPreflight(dir, phase, config) {
37264
37276
  const reportId = `preflight-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
37265
37277
  let validatedDir;
37266
37278
  try {
37267
- validatedDir = _internals55.validateDirectoryPath(dir);
37279
+ validatedDir = _internals56.validateDirectoryPath(dir);
37268
37280
  } catch (error2) {
37269
37281
  return {
37270
37282
  id: reportId,
@@ -37284,7 +37296,7 @@ async function runPreflight(dir, phase, config) {
37284
37296
  }
37285
37297
  let validatedTimeout;
37286
37298
  try {
37287
- validatedTimeout = _internals55.validateTimeout(config?.checkTimeoutMs, DEFAULT_CONFIG.checkTimeoutMs);
37299
+ validatedTimeout = _internals56.validateTimeout(config?.checkTimeoutMs, DEFAULT_CONFIG.checkTimeoutMs);
37288
37300
  } catch (error2) {
37289
37301
  return {
37290
37302
  id: reportId,
@@ -37325,12 +37337,12 @@ async function runPreflight(dir, phase, config) {
37325
37337
  });
37326
37338
  const checks = [];
37327
37339
  log("[Preflight] Running lint check...");
37328
- const lintResult = await _internals55.runLintCheck(validatedDir, cfg.linter, cfg.checkTimeoutMs);
37340
+ const lintResult = await _internals56.runLintCheck(validatedDir, cfg.linter, cfg.checkTimeoutMs);
37329
37341
  checks.push(lintResult);
37330
37342
  log(`[Preflight] Lint check: ${lintResult.status} ${lintResult.message}`);
37331
37343
  if (!cfg.skipTests) {
37332
37344
  log("[Preflight] Running tests check...");
37333
- const testsResult = await _internals55.runTestsCheck(validatedDir, cfg.testScope, cfg.checkTimeoutMs);
37345
+ const testsResult = await _internals56.runTestsCheck(validatedDir, cfg.testScope, cfg.checkTimeoutMs);
37334
37346
  checks.push(testsResult);
37335
37347
  log(`[Preflight] Tests check: ${testsResult.status} ${testsResult.message}`);
37336
37348
  } else {
@@ -37342,7 +37354,7 @@ async function runPreflight(dir, phase, config) {
37342
37354
  }
37343
37355
  if (!cfg.skipSecrets) {
37344
37356
  log("[Preflight] Running secrets check...");
37345
- const secretsResult = await _internals55.runSecretsCheck(validatedDir, cfg.checkTimeoutMs);
37357
+ const secretsResult = await _internals56.runSecretsCheck(validatedDir, cfg.checkTimeoutMs);
37346
37358
  checks.push(secretsResult);
37347
37359
  log(`[Preflight] Secrets check: ${secretsResult.status} ${secretsResult.message}`);
37348
37360
  } else {
@@ -37354,7 +37366,7 @@ async function runPreflight(dir, phase, config) {
37354
37366
  }
37355
37367
  if (!cfg.skipEvidence) {
37356
37368
  log("[Preflight] Running evidence check...");
37357
- const evidenceResult = await _internals55.runEvidenceCheck(validatedDir);
37369
+ const evidenceResult = await _internals56.runEvidenceCheck(validatedDir);
37358
37370
  checks.push(evidenceResult);
37359
37371
  log(`[Preflight] Evidence check: ${evidenceResult.status} ${evidenceResult.message}`);
37360
37372
  } else {
@@ -37365,12 +37377,12 @@ async function runPreflight(dir, phase, config) {
37365
37377
  });
37366
37378
  }
37367
37379
  log("[Preflight] Running requirement coverage check...");
37368
- const reqCoverageResult = await _internals55.runRequirementCoverageCheck(validatedDir, phase);
37380
+ const reqCoverageResult = await _internals56.runRequirementCoverageCheck(validatedDir, phase);
37369
37381
  checks.push(reqCoverageResult);
37370
37382
  log(`[Preflight] Requirement coverage check: ${reqCoverageResult.status} ${reqCoverageResult.message}`);
37371
37383
  if (!cfg.skipVersion) {
37372
37384
  log("[Preflight] Running version check...");
37373
- const versionResult = await _internals55.runVersionCheck(validatedDir, cfg.checkTimeoutMs);
37385
+ const versionResult = await _internals56.runVersionCheck(validatedDir, cfg.checkTimeoutMs);
37374
37386
  checks.push(versionResult);
37375
37387
  log(`[Preflight] Version check: ${versionResult.status} ${versionResult.message}`);
37376
37388
  } else {
@@ -37433,10 +37445,10 @@ function formatPreflightMarkdown(report) {
37433
37445
  async function handlePreflightCommand(directory, _args) {
37434
37446
  const plan = await loadPlan(directory);
37435
37447
  const phase = plan?.current_phase ?? 1;
37436
- const report = await _internals55.runPreflight(directory, phase);
37437
- return _internals55.formatPreflightMarkdown(report);
37448
+ const report = await _internals56.runPreflight(directory, phase);
37449
+ return _internals56.formatPreflightMarkdown(report);
37438
37450
  }
37439
- var _internals55 = {
37451
+ var _internals56 = {
37440
37452
  runPreflight,
37441
37453
  formatPreflightMarkdown,
37442
37454
  handlePreflightCommand,
@@ -38408,7 +38420,7 @@ function pruneOldResetBackups(backupsRoot, warnings) {
38408
38420
  }
38409
38421
 
38410
38422
  // src/commands/reset.ts
38411
- var _internals56 = {
38423
+ var _internals57 = {
38412
38424
  backupSwarmStateBeforeReset
38413
38425
  };
38414
38426
  async function handleResetCommand(directory, args) {
@@ -38442,7 +38454,7 @@ async function handleResetCommand(directory, args) {
38442
38454
  ];
38443
38455
  const results = [];
38444
38456
  try {
38445
- const backup = _internals56.backupSwarmStateBeforeReset(directory, "reset", [
38457
+ const backup = _internals57.backupSwarmStateBeforeReset(directory, "reset", [
38446
38458
  ...filesToReset,
38447
38459
  "summaries"
38448
38460
  ]);
@@ -39065,7 +39077,7 @@ async function recordReplayEntry(artifactPath, sessionID, entry) {
39065
39077
  }
39066
39078
 
39067
39079
  // src/prm/index.ts
39068
- var _internals57 = {
39080
+ var _internals58 = {
39069
39081
  getAgentSession,
39070
39082
  readTrajectory,
39071
39083
  getInMemoryTrajectory,
@@ -39088,12 +39100,12 @@ function resetPrmSessionState(session, sessionId) {
39088
39100
  session.prmTrajectoryStep = 0;
39089
39101
  session.replayArtifactPath = null;
39090
39102
  if (sessionId) {
39091
- _internals57.clearTrajectoryCache(sessionId);
39103
+ _internals58.clearTrajectoryCache(sessionId);
39092
39104
  }
39093
39105
  }
39094
39106
 
39095
39107
  // src/commands/reset-session.ts
39096
- var _internals58 = {
39108
+ var _internals59 = {
39097
39109
  cleanupOrphanedBranches,
39098
39110
  backupSwarmStateBeforeReset
39099
39111
  };
@@ -39105,7 +39117,7 @@ function errorMessage(err) {
39105
39117
  async function handleResetSessionCommand(directory, _args) {
39106
39118
  const results = [];
39107
39119
  try {
39108
- const backup = _internals58.backupSwarmStateBeforeReset(directory, "reset-session", ["session"]);
39120
+ const backup = _internals59.backupSwarmStateBeforeReset(directory, "reset-session", ["session"]);
39109
39121
  if (backup.backupDir && backup.copied.length > 0) {
39110
39122
  const rel = path76.relative(directory, backup.backupDir);
39111
39123
  results.push(`\uD83D\uDCE6 Backed up session state to ${rel}/ (restore by copying files back into .swarm/session/)`);
@@ -39172,7 +39184,7 @@ async function handleResetSessionCommand(directory, _args) {
39172
39184
  results.push(`\u26A0\uFE0F Failed to remove .swarm-worktrees/: ${errorMessage(err)}`);
39173
39185
  }
39174
39186
  try {
39175
- const branchResult = await _internals58.cleanupOrphanedBranches(directory, []);
39187
+ const branchResult = await _internals59.cleanupOrphanedBranches(directory, []);
39176
39188
  if (branchResult.removed.length > 0) {
39177
39189
  results.push(`\u2705 Removed ${branchResult.removed.length} orphan swarm-lane branch(es)`);
39178
39190
  }
@@ -39510,7 +39522,7 @@ async function handleRollbackCommand(directory, args) {
39510
39522
  // src/commands/sdd.ts
39511
39523
  import * as fs39 from "fs";
39512
39524
  import * as path79 from "path";
39513
- var _internals59 = {
39525
+ var _internals60 = {
39514
39526
  writeProjectedSpecSync
39515
39527
  };
39516
39528
  var SWARM_SPEC_REL = path79.join(".swarm", "spec.md");
@@ -39906,7 +39918,7 @@ ${USAGE11}`;
39906
39918
 
39907
39919
  ${USAGE11}`;
39908
39920
  }
39909
- const result2 = _internals59.writeProjectedSpecSync(directory, {
39921
+ const result2 = _internals60.writeProjectedSpecSync(directory, {
39910
39922
  source: "speckit",
39911
39923
  feature: resolution.feature,
39912
39924
  dryRun: parsed.dryRun,
@@ -39964,7 +39976,7 @@ ${formatList(result2.projection.warnings)}` : ""
39964
39976
  ].join(`
39965
39977
  `);
39966
39978
  }
39967
- const result = _internals59.writeProjectedSpecSync(directory, {
39979
+ const result = _internals60.writeProjectedSpecSync(directory, {
39968
39980
  changeId: parsed.changeId,
39969
39981
  dryRun: parsed.dryRun,
39970
39982
  overwrite: parsed.overwrite
@@ -40353,7 +40365,7 @@ var DEFAULT_CONTEXT_BUDGET_CONFIG = {
40353
40365
  };
40354
40366
 
40355
40367
  // src/services/status-service.ts
40356
- var _internals60 = {
40368
+ var _internals61 = {
40357
40369
  loadLeanTurboRunState,
40358
40370
  hasActiveLeanTurbo,
40359
40371
  hasActiveFullAuto,
@@ -40508,11 +40520,11 @@ async function getStatusData(directory, agents) {
40508
40520
  } catch {
40509
40521
  status.memoryCohort = { linked: false };
40510
40522
  }
40511
- status.fullAutoActive = _internals60.hasActiveFullAuto();
40523
+ status.fullAutoActive = _internals61.hasActiveFullAuto();
40512
40524
  if (status.fullAutoActive) {
40513
- const sid = _internals60.getActiveFullAutoSessionID();
40525
+ const sid = _internals61.getActiveFullAutoSessionID();
40514
40526
  if (sid) {
40515
- const runState = _internals60.loadFullAutoRunState(directory, sid);
40527
+ const runState = _internals61.loadFullAutoRunState(directory, sid);
40516
40528
  if (runState?.lastEscalation) {
40517
40529
  status.fullAutoEscalation = {
40518
40530
  reason: runState.lastEscalation.reason,
@@ -40527,7 +40539,7 @@ async function getStatusData(directory, agents) {
40527
40539
  }
40528
40540
  function enrichWithLeanTurbo(status, directory) {
40529
40541
  const turboMode = hasActiveTurboMode();
40530
- const leanActive = _internals60.hasActiveLeanTurbo();
40542
+ const leanActive = _internals61.hasActiveLeanTurbo();
40531
40543
  let turboStrategy = "off";
40532
40544
  if (leanActive) {
40533
40545
  turboStrategy = "lean";
@@ -40546,7 +40558,7 @@ function enrichWithLeanTurbo(status, directory) {
40546
40558
  }
40547
40559
  }
40548
40560
  if (leanSessionID) {
40549
- const runState = _internals60.loadLeanTurboRunState(directory, leanSessionID);
40561
+ const runState = _internals61.loadLeanTurboRunState(directory, leanSessionID);
40550
40562
  if (runState) {
40551
40563
  status.leanTurboPhase = runState.phase;
40552
40564
  status.leanMaxParallelCoders = runState.maxParallelCoders;
@@ -40781,7 +40793,7 @@ init_logger();
40781
40793
  var TURBO_BYPASS_DISCLOSURE = "Bypassed: Stage B (reviewer + test_engineer) for Tier 0-2 tasks; phase_complete Gates 1-5 " + "(completion-verify, drift-verifier, hallucination-guard, mutation-gate, phase-council). " + "Still enforced: Stage A (lint, imports, pre_check_batch); Tier 3 Stage B; Gate 5b " + "(architecture-supervisor); Gate 6 (final-council); Gate 7 (full-auto).";
40782
40794
 
40783
40795
  // src/commands/turbo.ts
40784
- var _internals61 = {
40796
+ var _internals62 = {
40785
40797
  loadPluginConfigWithMeta
40786
40798
  };
40787
40799
  async function handleTurboCommand(directory, args, sessionID) {
@@ -40841,7 +40853,7 @@ async function handleTurboCommand(directory, args, sessionID) {
40841
40853
  if (arg0 === "on") {
40842
40854
  let strategy = "standard";
40843
40855
  try {
40844
- const { config } = _internals61.loadPluginConfigWithMeta(directory);
40856
+ const { config } = _internals62.loadPluginConfigWithMeta(directory);
40845
40857
  if (config.turbo?.strategy === "lean") {
40846
40858
  strategy = "lean";
40847
40859
  }
@@ -40938,7 +40950,7 @@ function enableLeanTurbo(session, directory, sessionID) {
40938
40950
  let maxParallelCoders = 4;
40939
40951
  let conflictPolicy = "serialize";
40940
40952
  try {
40941
- const { config } = _internals61.loadPluginConfigWithMeta(directory);
40953
+ const { config } = _internals62.loadPluginConfigWithMeta(directory);
40942
40954
  const leanConfig = config.turbo?.lean;
40943
40955
  if (leanConfig) {
40944
40956
  maxParallelCoders = leanConfig.max_parallel_coders ?? 4;
@@ -41143,7 +41155,7 @@ function findSimilarCommands(query) {
41143
41155
  }
41144
41156
  const scored = VALID_COMMANDS.map((cmd) => {
41145
41157
  const cmdLower = cmd.toLowerCase();
41146
- const fullScore = _internals62.levenshteinDistance(q, cmdLower);
41158
+ const fullScore = _internals63.levenshteinDistance(q, cmdLower);
41147
41159
  let tokenScore = Infinity;
41148
41160
  if (cmd.includes(" ") || cmd.includes("-")) {
41149
41161
  const qTokens = q.split(/[\s-]+/);
@@ -41156,7 +41168,7 @@ function findSimilarCommands(query) {
41156
41168
  for (const ct of cmdTokens) {
41157
41169
  if (ct.length === 0)
41158
41170
  continue;
41159
- const dist = _internals62.levenshteinDistance(qt, ct);
41171
+ const dist = _internals63.levenshteinDistance(qt, ct);
41160
41172
  if (dist < minDist)
41161
41173
  minDist = dist;
41162
41174
  }
@@ -41166,7 +41178,7 @@ function findSimilarCommands(query) {
41166
41178
  }
41167
41179
  const dashStrippedQ = q.replace(/-/g, "");
41168
41180
  const dashStrippedCmd = cmdLower.replace(/-/g, "");
41169
- const dashScore = _internals62.levenshteinDistance(dashStrippedQ, dashStrippedCmd);
41181
+ const dashScore = _internals63.levenshteinDistance(dashStrippedQ, dashStrippedCmd);
41170
41182
  const score = Math.min(fullScore, tokenScore, dashScore);
41171
41183
  return { cmd, score };
41172
41184
  });
@@ -41201,16 +41213,16 @@ function buildDetailedHelp(commandName, entry) {
41201
41213
  async function handleHelpCommand(ctx) {
41202
41214
  const targetCommand = ctx.args.join(" ");
41203
41215
  if (!targetCommand) {
41204
- const { buildHelpText } = await import("./index-b16153py.js");
41216
+ const { buildHelpText } = await import("./index-46xgqgd5.js");
41205
41217
  return buildHelpText();
41206
41218
  }
41207
41219
  const tokens = targetCommand.split(/\s+/);
41208
- const resolved = _internals62.resolveCommand(tokens);
41220
+ const resolved = _internals63.resolveCommand(tokens);
41209
41221
  if (resolved) {
41210
- return _internals62.buildDetailedHelp(resolved.key, resolved.entry);
41222
+ return _internals63.buildDetailedHelp(resolved.key, resolved.entry);
41211
41223
  }
41212
- const similar = _internals62.findSimilarCommands(targetCommand);
41213
- const { buildHelpText: fullHelp } = await import("./index-b16153py.js");
41224
+ const similar = _internals63.findSimilarCommands(targetCommand);
41225
+ const { buildHelpText: fullHelp } = await import("./index-46xgqgd5.js");
41214
41226
  if (similar.length > 0) {
41215
41227
  return `Command '/swarm ${targetCommand}' not found.
41216
41228
 
@@ -41280,7 +41292,7 @@ var COMMAND_REGISTRY = {
41280
41292
  toolNoArgs: true
41281
41293
  },
41282
41294
  help: {
41283
- handler: (ctx) => _internals62.handleHelpCommand(ctx),
41295
+ handler: (ctx) => _internals63.handleHelpCommand(ctx),
41284
41296
  description: "Show help for swarm commands",
41285
41297
  category: "core",
41286
41298
  args: "[command]",
@@ -41349,7 +41361,7 @@ var COMMAND_REGISTRY = {
41349
41361
  },
41350
41362
  "guardrail explain": {
41351
41363
  handler: async (ctx) => {
41352
- const { handleGuardrailExplain } = await import("./guardrail-explain-va0kj05m.js");
41364
+ const { handleGuardrailExplain } = await import("./guardrail-explain-yjzbs0fq.js");
41353
41365
  return handleGuardrailExplain(ctx.directory, ctx.args);
41354
41366
  },
41355
41367
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -41359,7 +41371,7 @@ var COMMAND_REGISTRY = {
41359
41371
  },
41360
41372
  "guardrail-explain": {
41361
41373
  handler: async (ctx) => {
41362
- const { handleGuardrailExplain } = await import("./guardrail-explain-va0kj05m.js");
41374
+ const { handleGuardrailExplain } = await import("./guardrail-explain-yjzbs0fq.js");
41363
41375
  return handleGuardrailExplain(ctx.directory, ctx.args);
41364
41376
  },
41365
41377
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -41369,7 +41381,7 @@ var COMMAND_REGISTRY = {
41369
41381
  },
41370
41382
  "guardrail-log": {
41371
41383
  handler: async (ctx) => {
41372
- const { handleGuardrailLog } = await import("./guardrail-log-61gya05m.js");
41384
+ const { handleGuardrailLog } = await import("./guardrail-log-7cychbgs.js");
41373
41385
  return handleGuardrailLog(ctx.directory, ctx.args);
41374
41386
  },
41375
41387
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -42253,7 +42265,7 @@ function validateToolPolicy() {
42253
42265
  }
42254
42266
  return { valid: warnings.length === 0, warnings };
42255
42267
  }
42256
- var _internals62 = {
42268
+ var _internals63 = {
42257
42269
  handleHelpCommand,
42258
42270
  validateAliases,
42259
42271
  validateToolPolicy,
@@ -42263,16 +42275,16 @@ var _internals62 = {
42263
42275
  findSimilarCommands,
42264
42276
  buildDetailedHelp
42265
42277
  };
42266
- var validation = _internals62.validateAliases();
42278
+ var validation = _internals63.validateAliases();
42267
42279
  if (!validation.valid) {
42268
42280
  throw new Error(`COMMAND_REGISTRY alias validation failed:
42269
42281
  ${validation.errors.join(`
42270
42282
  `)}`);
42271
42283
  }
42272
- _internals62.emitValidationWarnings("COMMAND_REGISTRY alias warnings", validation.warnings);
42284
+ _internals63.emitValidationWarnings("COMMAND_REGISTRY alias warnings", validation.warnings);
42273
42285
  try {
42274
- const toolPolicyValidation = _internals62.validateToolPolicy();
42275
- _internals62.emitValidationWarnings("COMMAND_REGISTRY toolPolicy warnings", toolPolicyValidation.warnings);
42286
+ const toolPolicyValidation = _internals63.validateToolPolicy();
42287
+ _internals63.emitValidationWarnings("COMMAND_REGISTRY toolPolicy warnings", toolPolicyValidation.warnings);
42276
42288
  } catch (e) {
42277
42289
  warn(`COMMAND_REGISTRY toolPolicy validation failed (non-fatal): ${e.message}`);
42278
42290
  }
@@ -45041,7 +45053,7 @@ function formatCommandNotFound(tokens) {
45041
45053
  const attemptedCommand = tokens[0] || "";
45042
45054
  const MAX_DISPLAY = 100;
45043
45055
  const displayCommand = attemptedCommand.length > MAX_DISPLAY ? `${attemptedCommand.slice(0, MAX_DISPLAY)}...` : attemptedCommand;
45044
- const similar = _internals62.findSimilarCommands(attemptedCommand);
45056
+ const similar = _internals63.findSimilarCommands(attemptedCommand);
45045
45057
  const header = `Command \`/swarm ${displayCommand}\` not found.`;
45046
45058
  const suggestions = similar.length > 0 ? `Did you mean:
45047
45059
  ${similar.map((cmd) => ` - /swarm ${cmd}`).join(`
@@ -47069,10 +47081,10 @@ function startAgentSession(sessionId, agentName, staleDurationMs = STALE_SESSION
47069
47081
  }
47070
47082
  telemetry.sessionStarted(sessionId, agentName);
47071
47083
  swarmState.activeAgent.set(sessionId, agentName);
47072
- _internals65.applyRehydrationCache(sessionState);
47084
+ _internals66.applyRehydrationCache(sessionState);
47073
47085
  if (directory) {
47074
47086
  let rehydrationPromise;
47075
- rehydrationPromise = _internals65.rehydrateSessionFromDisk(directory, sessionState).then(async () => {
47087
+ rehydrationPromise = _internals66.rehydrateSessionFromDisk(directory, sessionState).then(async () => {
47076
47088
  try {
47077
47089
  sessionState.prSubscriptions = await rehydratePrSubscriptions(sessionId, directory);
47078
47090
  } catch (err) {
@@ -47268,7 +47280,7 @@ function ensureAgentSession(sessionId, agentName, directory) {
47268
47280
  maybeSweepStaleSessions();
47269
47281
  return session;
47270
47282
  }
47271
- _internals65.startAgentSession(sessionId, agentName ?? "unknown", 7200000, directory);
47283
+ _internals66.startAgentSession(sessionId, agentName ?? "unknown", 7200000, directory);
47272
47284
  session = swarmState.agentSessions.get(sessionId);
47273
47285
  if (!session) {
47274
47286
  throw new Error(`Failed to create guardrail session for ${sessionId}`);
@@ -47557,8 +47569,8 @@ function applyRehydrationCache(session) {
47557
47569
  }
47558
47570
  }
47559
47571
  async function rehydrateSessionFromDisk(directory, session) {
47560
- await _internals65.buildRehydrationCache(directory);
47561
- _internals65.applyRehydrationCache(session);
47572
+ await _internals66.buildRehydrationCache(directory);
47573
+ _internals66.applyRehydrationCache(session);
47562
47574
  }
47563
47575
  function hasActiveTurboMode(sessionID) {
47564
47576
  if (sessionID) {
@@ -47646,7 +47658,7 @@ async function rehydratePrSubscriptions(sessionID, directory) {
47646
47658
  }
47647
47659
  return map;
47648
47660
  }
47649
- var _internals65 = {
47661
+ var _internals66 = {
47650
47662
  swarmState,
47651
47663
  resetSwarmState,
47652
47664
  ensureAgentSession,
@@ -47785,4 +47797,4 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
47785
47797
  };
47786
47798
  }
47787
47799
 
47788
- export { package_default, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleArchiveCommand, DC_SAFE_TARGETS, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcValidateTargets, dcCheckJunctionCreation, dcExtractWindowsCmdTargets, dcExtractPowerShellTargets, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, handleCheckpointCommand, handleCiSimulateCommand, handleClarifyCommand, createCuratorLLMDelegate, _internals14 as _internals, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals17 as _internals1, createHivePromoterHook, promoteToHive, promoteFromSwarm, handleCloseCommand, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getPluginConfigDir, getPluginCachePaths, getPluginLockFilePaths, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, COMMAND_REGISTRY, VALID_COMMANDS, _internals62 as _internals2, resolveCommand };
47800
+ export { package_default, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleArchiveCommand, DC_SAFE_TARGETS, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcValidateTargets, dcCheckJunctionCreation, dcExtractWindowsCmdTargets, dcExtractPowerShellTargets, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, handleCheckpointCommand, handleCiSimulateCommand, handleClarifyCommand, createCuratorLLMDelegate, _internals14 as _internals, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals17 as _internals1, createHivePromoterHook, promoteToHive, promoteFromSwarm, handleCloseCommand, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getPluginConfigDir, getPluginCachePaths, getPluginLockFilePaths, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, COMMAND_REGISTRY, VALID_COMMANDS, _internals63 as _internals2, resolveCommand };