opencode-swarm 7.121.1 → 7.121.3
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.
- package/dist/cli/{curation-policy-re2kaysb.js → curation-policy-10wnhpwn.js} +2 -2
- package/dist/cli/{curator-tesgq6ye.js → curator-ed91r7rw.js} +10 -10
- package/dist/cli/{curator-llm-factory-jkbachdb.js → curator-llm-factory-q9veqj3h.js} +10 -10
- package/dist/cli/{evidence-summary-service-jtx5q3r6.js → evidence-summary-service-k14ykm03.js} +2 -2
- package/dist/cli/{guardrail-explain-hqz48re6.js → guardrail-explain-0vcaa7hj.js} +11 -11
- package/dist/cli/{hive-promoter-4vfe1rcs.js → hive-promoter-dg6fk563.js} +10 -10
- package/dist/cli/{index-rywkdacj.js → index-0f800qg7.js} +3 -3
- package/dist/cli/{index-nhgw7de8.js → index-35xyj7gn.js} +1 -1
- package/dist/cli/{index-69ms9ny1.js → index-5a3xsnzg.js} +1 -1
- package/dist/cli/{index-3366gs26.js → index-db82jxt7.js} +2 -2
- package/dist/cli/{index-j5xv8zbp.js → index-emkb0bbe.js} +1 -1
- package/dist/cli/{index-e7yqazk3.js → index-fs2q8jyf.js} +236 -229
- package/dist/cli/{index-0k4r8111.js → index-ft6jw816.js} +4 -4
- package/dist/cli/{index-k7gvykn4.js → index-g9eg7z93.js} +11 -11
- package/dist/cli/{index-0e1v02hq.js → index-j8349ac0.js} +1 -1
- package/dist/cli/{index-8cp19x15.js → index-qad0m9bz.js} +1 -1
- package/dist/cli/{index-0mbmfmt0.js → index-qt2yaghg.js} +2 -1
- package/dist/cli/{index-fndvr7fr.js → index-rbfq77sz.js} +1 -1
- package/dist/cli/{index-78b192v7.js → index-x4fwtd59.js} +3 -3
- package/dist/cli/index.js +10 -10
- package/dist/cli/{knowledge-escalator-0ejqs8c9.js → knowledge-escalator-8ajq1fhb.js} +3 -3
- package/dist/cli/{knowledge-events-wx9e37ba.js → knowledge-events-2sjy3aa7.js} +1 -1
- package/dist/cli/{knowledge-store-rnajx33a.js → knowledge-store-27cesthc.js} +1 -1
- package/dist/cli/{knowledge-validator-1f4mkzmc.js → knowledge-validator-9keh3p8j.js} +4 -4
- package/dist/cli/{scan-cursor-qapm0sxj.js → scan-cursor-qmsmmg1b.js} +2 -2
- package/dist/cli/{skill-generator-tkv7s12g.js → skill-generator-hkyxdc3j.js} +5 -5
- package/dist/commands/design-docs.d.ts +4 -0
- package/dist/commands/pr-feedback.d.ts +6 -6
- package/dist/config/plan-schema.d.ts +3 -0
- package/dist/hooks/delegation-gate.d.ts +115 -0
- package/dist/hooks/knowledge-curator.d.ts +4 -4
- package/dist/index.js +166 -156
- package/dist/tools/save-plan.d.ts +2 -0
- package/package.json +1 -1
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
saveTaskSetSnapshot,
|
|
66
66
|
transientBackoff,
|
|
67
67
|
validateProjectRoot
|
|
68
|
-
} from "./index-
|
|
68
|
+
} from "./index-emkb0bbe.js";
|
|
69
69
|
import {
|
|
70
70
|
withTimeout
|
|
71
71
|
} from "./index-4905hd2m.js";
|
|
@@ -95,15 +95,15 @@ import {
|
|
|
95
95
|
retireSkill,
|
|
96
96
|
selectCandidateEntries,
|
|
97
97
|
syncBundledProjectSkillsIfMissingAsync
|
|
98
|
-
} from "./index-
|
|
98
|
+
} from "./index-x4fwtd59.js";
|
|
99
99
|
import {
|
|
100
100
|
readRecentEscalations
|
|
101
|
-
} from "./index-
|
|
101
|
+
} from "./index-ft6jw816.js";
|
|
102
102
|
import {
|
|
103
103
|
alreadyCuratedThisGeneration,
|
|
104
104
|
claimNextScanBatch,
|
|
105
105
|
resolveCohortId
|
|
106
|
-
} from "./index-
|
|
106
|
+
} from "./index-j8349ac0.js";
|
|
107
107
|
import {
|
|
108
108
|
CURATOR_INIT_PROMPT,
|
|
109
109
|
CURATOR_PHASE_PROMPT,
|
|
@@ -136,11 +136,11 @@ import {
|
|
|
136
136
|
validateActionability,
|
|
137
137
|
validateActionableFields,
|
|
138
138
|
validateLesson
|
|
139
|
-
} from "./index-
|
|
139
|
+
} from "./index-db82jxt7.js";
|
|
140
140
|
import {
|
|
141
141
|
authorizeCuration,
|
|
142
142
|
buildConfigFingerprintInput
|
|
143
|
-
} from "./index-
|
|
143
|
+
} from "./index-5a3xsnzg.js";
|
|
144
144
|
import {
|
|
145
145
|
cohortConfigFingerprint
|
|
146
146
|
} from "./index-rtry5xyf.js";
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
transactFile,
|
|
171
171
|
transactKnowledge,
|
|
172
172
|
wordBigrams
|
|
173
|
-
} from "./index-
|
|
173
|
+
} from "./index-0f800qg7.js";
|
|
174
174
|
import {
|
|
175
175
|
MAX_EVENT_LOG_ENTRIES,
|
|
176
176
|
_internals,
|
|
@@ -180,7 +180,7 @@ import {
|
|
|
180
180
|
recordHiveKnowledgeEvent,
|
|
181
181
|
recordKnowledgeEvent,
|
|
182
182
|
resolveKnowledgeEventsPath
|
|
183
|
-
} from "./index-
|
|
183
|
+
} from "./index-35xyj7gn.js";
|
|
184
184
|
import {
|
|
185
185
|
resolveHiveDataDir,
|
|
186
186
|
resolveHiveEventsPath,
|
|
@@ -204,7 +204,7 @@ import {
|
|
|
204
204
|
import {
|
|
205
205
|
PlanSchema,
|
|
206
206
|
RetrospectiveEvidenceSchema
|
|
207
|
-
} from "./index-
|
|
207
|
+
} from "./index-qt2yaghg.js";
|
|
208
208
|
import {
|
|
209
209
|
AGENT_TOOL_MAP,
|
|
210
210
|
ALL_SUBAGENT_NAMES,
|
|
@@ -9759,7 +9759,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
9759
9759
|
}
|
|
9760
9760
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
9761
9761
|
try {
|
|
9762
|
-
const skillModule = await import("./skill-generator-
|
|
9762
|
+
const skillModule = await import("./skill-generator-hkyxdc3j.js");
|
|
9763
9763
|
for (const cand of skillCandidates) {
|
|
9764
9764
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
9765
9765
|
continue;
|
|
@@ -10096,7 +10096,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
10096
10096
|
} catch {}
|
|
10097
10097
|
}
|
|
10098
10098
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
10099
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
10099
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-8ajq1fhb.js");
|
|
10100
10100
|
for (const { id } of contradictedEntries) {
|
|
10101
10101
|
try {
|
|
10102
10102
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -10894,7 +10894,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
10894
10894
|
warnings.push("Failed to collect knowledge summary.");
|
|
10895
10895
|
}
|
|
10896
10896
|
try {
|
|
10897
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
10897
|
+
const { getScanStatus } = await import("./scan-cursor-qmsmmg1b.js");
|
|
10898
10898
|
const scanStatus = await getScanStatus(directory);
|
|
10899
10899
|
if (scanStatus.remaining_estimate > 0) {
|
|
10900
10900
|
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.`);
|
|
@@ -11068,7 +11068,7 @@ var _internals15 = {
|
|
|
11068
11068
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
11069
11069
|
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vwxpsk6j.js");
|
|
11070
11070
|
try {
|
|
11071
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
11071
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rbfq77sz.js");
|
|
11072
11072
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
11073
11073
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
11074
11074
|
} catch {
|
|
@@ -11076,11 +11076,11 @@ var _internals15 = {
|
|
|
11076
11076
|
}
|
|
11077
11077
|
},
|
|
11078
11078
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
11079
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
11079
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-ed91r7rw.js");
|
|
11080
11080
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
11081
11081
|
},
|
|
11082
11082
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
11083
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
11083
|
+
const { checkHivePromotions } = await import("./hive-promoter-dg6fk563.js");
|
|
11084
11084
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
11085
11085
|
},
|
|
11086
11086
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -11089,7 +11089,7 @@ var _internals15 = {
|
|
|
11089
11089
|
activateProposal,
|
|
11090
11090
|
listSkills: listSkills2,
|
|
11091
11091
|
sanitizeSlug
|
|
11092
|
-
} = await import("./skill-generator-
|
|
11092
|
+
} = await import("./skill-generator-hkyxdc3j.js");
|
|
11093
11093
|
const result = {
|
|
11094
11094
|
approved: [],
|
|
11095
11095
|
rejected: [],
|
|
@@ -13557,7 +13557,7 @@ function hashContent(content) {
|
|
|
13557
13557
|
async function loadConfigForPolicyCurator(directory) {
|
|
13558
13558
|
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vwxpsk6j.js");
|
|
13559
13559
|
try {
|
|
13560
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
13560
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rbfq77sz.js");
|
|
13561
13561
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
13562
13562
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
13563
13563
|
} catch {
|
|
@@ -13808,19 +13808,19 @@ var ENRICHMENT_ALLOWED_FIELDS = [
|
|
|
13808
13808
|
function buildV3EnrichmentPrompt(lesson, category, tags) {
|
|
13809
13809
|
return [
|
|
13810
13810
|
"Convert this prose lesson into an actionable knowledge directive.",
|
|
13811
|
-
"Output ONLY a single JSON object \
|
|
13811
|
+
"Output ONLY a single JSON object \u2014 no code fences, no commentary.",
|
|
13812
13812
|
"",
|
|
13813
13813
|
"MANDATORY fields (the directive is rejected without them):",
|
|
13814
13814
|
"- At least ONE scope field non-empty:",
|
|
13815
|
-
' "applies_to_agents": string[] \
|
|
13816
|
-
' "applies_to_tools": string[] \
|
|
13815
|
+
' "applies_to_agents": string[] \u2014 roles from: architect, coder, reviewer, test_engineer, sme, docs, designer, critic, curator',
|
|
13816
|
+
' "applies_to_tools": string[] \u2014 tool names from: edit, write, patch, bash, read, grep, glob',
|
|
13817
13817
|
"- At least ONE predicate field non-empty:",
|
|
13818
|
-
' "forbidden_actions": string[] \
|
|
13819
|
-
' "required_actions": string[] \
|
|
13820
|
-
' "verification_checks": string[] \
|
|
13818
|
+
' "forbidden_actions": string[] \u2014 concrete actions to never take',
|
|
13819
|
+
' "required_actions": string[] \u2014 concrete actions to always take',
|
|
13820
|
+
' "verification_checks": string[] \u2014 checks a reviewer can run',
|
|
13821
13821
|
"",
|
|
13822
13822
|
"OPTIONAL fields:",
|
|
13823
|
-
' "triggers": string[] \
|
|
13823
|
+
' "triggers": string[] \u2014 short phrases that should surface this lesson',
|
|
13824
13824
|
' "directive_priority": "low" | "medium" | "high" | "critical"',
|
|
13825
13825
|
"",
|
|
13826
13826
|
"Example output:",
|
|
@@ -13845,8 +13845,8 @@ function buildV3BatchEnrichmentPrompt(lessons) {
|
|
|
13845
13845
|
"",
|
|
13846
13846
|
"For EACH element, mandatory requirements:",
|
|
13847
13847
|
"- At least ONE scope field non-empty:",
|
|
13848
|
-
' "applies_to_agents": string[] \
|
|
13849
|
-
' "applies_to_tools": string[] \
|
|
13848
|
+
' "applies_to_agents": string[] \u2014 roles from: architect, coder, reviewer, test_engineer, sme, docs, designer, critic, curator',
|
|
13849
|
+
' "applies_to_tools": string[] \u2014 tool names from: edit, write, patch, bash, read, grep, glob',
|
|
13850
13850
|
"- At least ONE predicate field non-empty:",
|
|
13851
13851
|
' "forbidden_actions": string[] | "required_actions": string[] | "verification_checks": string[]',
|
|
13852
13852
|
"",
|
|
@@ -18867,8 +18867,8 @@ var _internals28 = {
|
|
|
18867
18867
|
loadCuratorDeps: async () => {
|
|
18868
18868
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
18869
18869
|
import("./schema-vwxpsk6j.js"),
|
|
18870
|
-
import("./curator-
|
|
18871
|
-
import("./curator-llm-factory-
|
|
18870
|
+
import("./curator-ed91r7rw.js"),
|
|
18871
|
+
import("./curator-llm-factory-q9veqj3h.js")
|
|
18872
18872
|
]);
|
|
18873
18873
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
18874
18874
|
}
|
|
@@ -19244,8 +19244,8 @@ ${USAGE5}`;
|
|
|
19244
19244
|
}
|
|
19245
19245
|
|
|
19246
19246
|
// src/commands/design-docs.ts
|
|
19247
|
-
init_logger();
|
|
19248
19247
|
var MAX_DESC_LEN = 2000;
|
|
19248
|
+
var _internals29 = { loadPluginConfigWithMeta };
|
|
19249
19249
|
var USAGE6 = `Usage: /swarm design-docs <description> [--out <dir>] [--lang <name>] [--update]
|
|
19250
19250
|
|
|
19251
19251
|
Generate or sync language-agnostic design docs for the project under build:
|
|
@@ -19341,14 +19341,14 @@ async function handleDesignDocsCommand(directory, args) {
|
|
|
19341
19341
|
${USAGE6}`;
|
|
19342
19342
|
}
|
|
19343
19343
|
try {
|
|
19344
|
-
const { config } = loadPluginConfigWithMeta(directory);
|
|
19344
|
+
const { config } = _internals29.loadPluginConfigWithMeta(directory);
|
|
19345
19345
|
if (config.design_docs?.enabled !== true) {
|
|
19346
19346
|
return "Error: design docs are disabled. Set `design_docs.enabled: true` in " + `opencode-swarm.json to enable the docs_design agent and this command.
|
|
19347
19347
|
|
|
19348
19348
|
` + USAGE6;
|
|
19349
19349
|
}
|
|
19350
19350
|
} catch (configErr) {
|
|
19351
|
-
|
|
19351
|
+
advisoryWarn(`[design-docs] Could not read opencode-swarm.json (${String(configErr)}). ` + "Falling through \u2014 the architect will abort if docs_design is not registered.");
|
|
19352
19352
|
}
|
|
19353
19353
|
const description = sanitizeDescription(parsed.rest.join(" "));
|
|
19354
19354
|
if (!description && !parsed.update) {
|
|
@@ -19366,7 +19366,7 @@ import { fileURLToPath } from "url";
|
|
|
19366
19366
|
// package.json
|
|
19367
19367
|
var package_default = {
|
|
19368
19368
|
name: "opencode-swarm",
|
|
19369
|
-
version: "7.121.
|
|
19369
|
+
version: "7.121.3",
|
|
19370
19370
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
19371
19371
|
main: "dist/index.js",
|
|
19372
19372
|
types: "dist/index.d.ts",
|
|
@@ -19806,7 +19806,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
19806
19806
|
let scanCompleted = false;
|
|
19807
19807
|
let scanRemaining = 0;
|
|
19808
19808
|
try {
|
|
19809
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
19809
|
+
const { getScanStatus } = await import("./scan-cursor-qmsmmg1b.js");
|
|
19810
19810
|
const status = await getScanStatus(directory);
|
|
19811
19811
|
scanGeneration = status.generation;
|
|
19812
19812
|
scanCompleted = status.completed;
|
|
@@ -19819,14 +19819,14 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
19819
19819
|
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vwxpsk6j.js");
|
|
19820
19820
|
let config;
|
|
19821
19821
|
try {
|
|
19822
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
19822
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rbfq77sz.js");
|
|
19823
19823
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
19824
19824
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
19825
19825
|
} catch {
|
|
19826
19826
|
config = KnowledgeConfigSchema2.parse({});
|
|
19827
19827
|
}
|
|
19828
19828
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
19829
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
19829
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-10wnhpwn.js");
|
|
19830
19830
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
19831
19831
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
19832
19832
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -19987,7 +19987,7 @@ function resolveCachePackageRoot(cachePath) {
|
|
|
19987
19987
|
const nestedPackageRoot = path38.join(cachePath, "node_modules", "opencode-swarm");
|
|
19988
19988
|
return existsSync22(nestedPackageRoot) ? nestedPackageRoot : cachePath;
|
|
19989
19989
|
}
|
|
19990
|
-
var
|
|
19990
|
+
var _internals30 = {
|
|
19991
19991
|
detectSandboxCapability: () => sandboxCapabilityProbe.detect(),
|
|
19992
19992
|
getSandboxExecutor: getExecutor
|
|
19993
19993
|
};
|
|
@@ -20571,9 +20571,9 @@ async function checkCurator(directory) {
|
|
|
20571
20571
|
}
|
|
20572
20572
|
async function getSandboxStatus() {
|
|
20573
20573
|
try {
|
|
20574
|
-
const capability = await
|
|
20574
|
+
const capability = await _internals30.detectSandboxCapability();
|
|
20575
20575
|
const mechanism = capability.mechanism ?? "none";
|
|
20576
|
-
const executor = await
|
|
20576
|
+
const executor = await _internals30.getSandboxExecutor();
|
|
20577
20577
|
const hasExecutor = executor !== null;
|
|
20578
20578
|
if (hasExecutor) {
|
|
20579
20579
|
const executorStrength = executor?.strength;
|
|
@@ -21325,7 +21325,7 @@ function readPromotionEvidence(directory) {
|
|
|
21325
21325
|
}
|
|
21326
21326
|
|
|
21327
21327
|
// src/commands/epic.ts
|
|
21328
|
-
var
|
|
21328
|
+
var _internals31 = {
|
|
21329
21329
|
loadPluginConfigWithMeta,
|
|
21330
21330
|
loadPlanJsonOnly,
|
|
21331
21331
|
getCoChangeData,
|
|
@@ -21347,7 +21347,7 @@ async function handleEpicCommand(directory, args, sessionID) {
|
|
|
21347
21347
|
if (!sessionID || sessionID.trim() === "") {
|
|
21348
21348
|
return "Error: No active session context. Epic Mode requires an active session. Use /swarm epic from within an OpenCode session.";
|
|
21349
21349
|
}
|
|
21350
|
-
const session =
|
|
21350
|
+
const session = _internals31.ensureAgentSession(sessionID, undefined, directory);
|
|
21351
21351
|
const arg0 = args[0]?.toLowerCase();
|
|
21352
21352
|
switch (arg0) {
|
|
21353
21353
|
case "status":
|
|
@@ -21374,7 +21374,7 @@ Usage:
|
|
|
21374
21374
|
}
|
|
21375
21375
|
function enableAndAck(directory, sessionID, session) {
|
|
21376
21376
|
try {
|
|
21377
|
-
|
|
21377
|
+
_internals31.enableEpicMode(directory, sessionID);
|
|
21378
21378
|
} catch (err) {
|
|
21379
21379
|
return `Error enabling Epic Mode: ${err instanceof Error ? err.message : String(err)}`;
|
|
21380
21380
|
}
|
|
@@ -21390,7 +21390,7 @@ function enableAndAck(directory, sessionID, session) {
|
|
|
21390
21390
|
}
|
|
21391
21391
|
function disableAndAck(directory, sessionID, session) {
|
|
21392
21392
|
try {
|
|
21393
|
-
|
|
21393
|
+
_internals31.disableEpicMode(directory, sessionID);
|
|
21394
21394
|
} catch (err) {
|
|
21395
21395
|
return `Error disabling Epic Mode: ${err instanceof Error ? err.message : String(err)}`;
|
|
21396
21396
|
}
|
|
@@ -21399,12 +21399,12 @@ function disableAndAck(directory, sessionID, session) {
|
|
|
21399
21399
|
}
|
|
21400
21400
|
function renderStatus(directory, sessionID) {
|
|
21401
21401
|
const lines = ["## Epic Mode \u2014 Status", ""];
|
|
21402
|
-
if (
|
|
21402
|
+
if (_internals31.isStateUnreadable(directory)) {
|
|
21403
21403
|
lines.push("**Epic Mode state is unreadable** (`.swarm/epic-state.json` is corrupt or has an unexpected shape). Status cannot be reported until the file is repaired or removed. The fail-closed marker means `epic_decide_phase` will refuse to compute a verdict in this state.");
|
|
21404
21404
|
return lines.join(`
|
|
21405
21405
|
`);
|
|
21406
21406
|
}
|
|
21407
|
-
const state =
|
|
21407
|
+
const state = _internals31.loadEpicSessionState(directory, sessionID);
|
|
21408
21408
|
if (!state) {
|
|
21409
21409
|
lines.push("Epic Mode has not been toggled for this session.");
|
|
21410
21410
|
return lines.join(`
|
|
@@ -21456,7 +21456,7 @@ function formatGreenfieldDetail(input) {
|
|
|
21456
21456
|
function renderLast(directory) {
|
|
21457
21457
|
let records;
|
|
21458
21458
|
try {
|
|
21459
|
-
records =
|
|
21459
|
+
records = _internals31.readPromotionEvidence(directory);
|
|
21460
21460
|
} catch (err) {
|
|
21461
21461
|
return `Error reading epic-promotions.jsonl: ${err instanceof Error ? err.message : String(err)}`;
|
|
21462
21462
|
}
|
|
@@ -21511,7 +21511,7 @@ function renderLast(directory) {
|
|
|
21511
21511
|
`);
|
|
21512
21512
|
}
|
|
21513
21513
|
function renderCalibration(directory) {
|
|
21514
|
-
if (
|
|
21514
|
+
if (_internals31.isCalibrationStateUnreadable(directory)) {
|
|
21515
21515
|
return [
|
|
21516
21516
|
"## Epic Mode \u2014 Calibration",
|
|
21517
21517
|
"",
|
|
@@ -21523,11 +21523,11 @@ function renderCalibration(directory) {
|
|
|
21523
21523
|
}
|
|
21524
21524
|
let state;
|
|
21525
21525
|
try {
|
|
21526
|
-
state =
|
|
21526
|
+
state = _internals31.loadCalibrationState(directory);
|
|
21527
21527
|
} catch (err) {
|
|
21528
21528
|
return `Error reading calibration state: ${err instanceof Error ? err.message : String(err)}`;
|
|
21529
21529
|
}
|
|
21530
|
-
const { config } =
|
|
21530
|
+
const { config } = _internals31.loadPluginConfigWithMeta(directory);
|
|
21531
21531
|
const staticThreshold = config.turbo?.epic?.mode?.activation_threshold ?? 0.3;
|
|
21532
21532
|
const calibrationCfg = config.turbo?.epic?.calibration;
|
|
21533
21533
|
const loosenWindow = calibrationCfg?.loosen_window ?? 10;
|
|
@@ -21575,7 +21575,7 @@ function renderCalibration(directory) {
|
|
|
21575
21575
|
lines.push("");
|
|
21576
21576
|
let recentDivergent = [];
|
|
21577
21577
|
try {
|
|
21578
|
-
const all =
|
|
21578
|
+
const all = _internals31.readDivergenceHistory(directory, { limit: 50 });
|
|
21579
21579
|
recentDivergent = all.filter((r) => !r.isClean).slice(-5);
|
|
21580
21580
|
} catch {}
|
|
21581
21581
|
lines.push("### Recent divergent tasks (tightened the threshold)");
|
|
@@ -21592,11 +21592,11 @@ function renderCalibration(directory) {
|
|
|
21592
21592
|
`);
|
|
21593
21593
|
}
|
|
21594
21594
|
async function renderDecide(directory) {
|
|
21595
|
-
const plan = await
|
|
21595
|
+
const plan = await _internals31.loadPlanJsonOnly(directory);
|
|
21596
21596
|
if (!plan) {
|
|
21597
21597
|
return "No plan found at `.swarm/plan.json`. Run `/swarm plan` first.";
|
|
21598
21598
|
}
|
|
21599
|
-
const { config } =
|
|
21599
|
+
const { config } = _internals31.loadPluginConfigWithMeta(directory);
|
|
21600
21600
|
const modeCfg = config.turbo?.epic?.mode;
|
|
21601
21601
|
const cochangeCfg = config.turbo?.epic?.cochange;
|
|
21602
21602
|
const activationThreshold = modeCfg?.activation_threshold ?? 0.3;
|
|
@@ -21606,20 +21606,20 @@ async function renderDecide(directory) {
|
|
|
21606
21606
|
const tasks = [];
|
|
21607
21607
|
for (const phase of plan.phases) {
|
|
21608
21608
|
for (const task of phase.tasks) {
|
|
21609
|
-
const scopeFiles =
|
|
21609
|
+
const scopeFiles = _internals31.readTaskScopes(directory, task.id);
|
|
21610
21610
|
const scope = scopeFiles ?? task.files_touched ?? [];
|
|
21611
21611
|
tasks.push({ id: task.id, scope });
|
|
21612
21612
|
}
|
|
21613
21613
|
}
|
|
21614
|
-
const { pairs, commitsObserved } = await
|
|
21614
|
+
const { pairs, commitsObserved } = await _internals31.getCoChangeData(directory);
|
|
21615
21615
|
const isGitProject = (() => {
|
|
21616
21616
|
try {
|
|
21617
|
-
return
|
|
21617
|
+
return _internals31.isGitRepo(directory);
|
|
21618
21618
|
} catch {
|
|
21619
21619
|
return false;
|
|
21620
21620
|
}
|
|
21621
21621
|
})();
|
|
21622
|
-
const verdict =
|
|
21622
|
+
const verdict = _internals31.decideEpicActivation(tasks, pairs, commitsObserved, {
|
|
21623
21623
|
activationThreshold,
|
|
21624
21624
|
minCommitsForSignal,
|
|
21625
21625
|
cochangeNpmiThreshold,
|
|
@@ -21663,7 +21663,7 @@ function formatVerdict(verdict) {
|
|
|
21663
21663
|
}
|
|
21664
21664
|
|
|
21665
21665
|
// src/services/evidence-service.ts
|
|
21666
|
-
var
|
|
21666
|
+
var _internals32 = {
|
|
21667
21667
|
loadEvidence,
|
|
21668
21668
|
listEvidenceTaskIds
|
|
21669
21669
|
};
|
|
@@ -21708,7 +21708,7 @@ function getVerdictEmoji(verdict) {
|
|
|
21708
21708
|
return getVerdictIcon(verdict);
|
|
21709
21709
|
}
|
|
21710
21710
|
async function getTaskEvidenceData(directory, taskId) {
|
|
21711
|
-
const result = await
|
|
21711
|
+
const result = await _internals32.loadEvidence(directory, taskId);
|
|
21712
21712
|
if (result.status !== "found") {
|
|
21713
21713
|
return {
|
|
21714
21714
|
hasEvidence: false,
|
|
@@ -21731,13 +21731,13 @@ async function getTaskEvidenceData(directory, taskId) {
|
|
|
21731
21731
|
};
|
|
21732
21732
|
}
|
|
21733
21733
|
async function getEvidenceListData(directory) {
|
|
21734
|
-
const taskIds = await
|
|
21734
|
+
const taskIds = await _internals32.listEvidenceTaskIds(directory);
|
|
21735
21735
|
if (taskIds.length === 0) {
|
|
21736
21736
|
return { hasEvidence: false, tasks: [] };
|
|
21737
21737
|
}
|
|
21738
21738
|
const tasks = [];
|
|
21739
21739
|
for (const taskId of taskIds) {
|
|
21740
|
-
const result = await
|
|
21740
|
+
const result = await _internals32.loadEvidence(directory, taskId);
|
|
21741
21741
|
if (result.status === "found") {
|
|
21742
21742
|
tasks.push({
|
|
21743
21743
|
taskId,
|
|
@@ -21817,7 +21817,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
21817
21817
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
21818
21818
|
}
|
|
21819
21819
|
async function handleEvidenceSummaryCommand(directory) {
|
|
21820
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
21820
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-k14ykm03.js");
|
|
21821
21821
|
const artifact = await buildEvidenceSummary(directory);
|
|
21822
21822
|
if (!artifact) {
|
|
21823
21823
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -22632,7 +22632,7 @@ function isStaticallyEquivalent(originalCode, mutatedCode) {
|
|
|
22632
22632
|
const strippedMutated = stripCode(mutatedCode);
|
|
22633
22633
|
return strippedOriginal === strippedMutated;
|
|
22634
22634
|
}
|
|
22635
|
-
var
|
|
22635
|
+
var _internals33 = {
|
|
22636
22636
|
isStaticallyEquivalent,
|
|
22637
22637
|
checkEquivalence,
|
|
22638
22638
|
batchCheckEquivalence
|
|
@@ -22672,7 +22672,7 @@ async function batchCheckEquivalence(patches, llmJudge) {
|
|
|
22672
22672
|
const results = [];
|
|
22673
22673
|
for (const { patch, originalCode, mutatedCode } of patches) {
|
|
22674
22674
|
try {
|
|
22675
|
-
const result = await
|
|
22675
|
+
const result = await _internals33.checkEquivalence(patch, originalCode, mutatedCode, llmJudge);
|
|
22676
22676
|
results.push(result);
|
|
22677
22677
|
} catch (err) {
|
|
22678
22678
|
results.push({
|
|
@@ -22746,10 +22746,10 @@ function isMissingExecutableFailure(message) {
|
|
|
22746
22746
|
return /\bENOENT\b/i.test(message) || /\bexecutable\b[^\r\n]*\bnot found\b/i.test(message) || /\bnot found in (?:the )?\$?PATH\b/i.test(message);
|
|
22747
22747
|
}
|
|
22748
22748
|
var runMutationCommand = async (args) => {
|
|
22749
|
-
const resolvedExecutable =
|
|
22749
|
+
const resolvedExecutable = _internals34.resolveExecutableFromPath([
|
|
22750
22750
|
args.executable
|
|
22751
22751
|
]);
|
|
22752
|
-
const result = await
|
|
22752
|
+
const result = await _internals34.runExternalTool({
|
|
22753
22753
|
executable: resolvedExecutable ?? args.executable,
|
|
22754
22754
|
args: args.args,
|
|
22755
22755
|
cwd: args.cwd,
|
|
@@ -22768,7 +22768,7 @@ var runMutationCommand = async (args) => {
|
|
|
22768
22768
|
};
|
|
22769
22769
|
var runLegacyTestSeam = async (args) => {
|
|
22770
22770
|
try {
|
|
22771
|
-
const result =
|
|
22771
|
+
const result = _internals34.spawnSync(args.executable, args.args, {
|
|
22772
22772
|
cwd: args.cwd,
|
|
22773
22773
|
timeout: args.timeoutMs,
|
|
22774
22774
|
stdio: "pipe"
|
|
@@ -22802,11 +22802,11 @@ var runLegacyTestSeam = async (args) => {
|
|
|
22802
22802
|
function selectRunner(options) {
|
|
22803
22803
|
if (options.runner)
|
|
22804
22804
|
return options.runner;
|
|
22805
|
-
if (
|
|
22805
|
+
if (_internals34.spawnSync !== defaultLegacySpawnSync)
|
|
22806
22806
|
return runLegacyTestSeam;
|
|
22807
|
-
return
|
|
22807
|
+
return _internals34.runCommand;
|
|
22808
22808
|
}
|
|
22809
|
-
var
|
|
22809
|
+
var _internals34 = {
|
|
22810
22810
|
executeMutation,
|
|
22811
22811
|
computeReport,
|
|
22812
22812
|
executeMutationSuite,
|
|
@@ -24047,11 +24047,11 @@ var quality_budget = createSwarmTool({
|
|
|
24047
24047
|
}).optional().describe("Quality budget thresholds")
|
|
24048
24048
|
},
|
|
24049
24049
|
async execute(args, directory) {
|
|
24050
|
-
const result = await
|
|
24050
|
+
const result = await _internals35.qualityBudget(args, directory);
|
|
24051
24051
|
return JSON.stringify(result);
|
|
24052
24052
|
}
|
|
24053
24053
|
});
|
|
24054
|
-
var
|
|
24054
|
+
var _internals35 = {
|
|
24055
24055
|
qualityBudget
|
|
24056
24056
|
};
|
|
24057
24057
|
|
|
@@ -24919,7 +24919,7 @@ var DEFAULT_RULES_DIR = ".swarm/semgrep-rules";
|
|
|
24919
24919
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
24920
24920
|
var MAX_OUTPUT_BYTES = 10 * 1024 * 1024;
|
|
24921
24921
|
var KILL_GRACE_MS = 2000;
|
|
24922
|
-
var
|
|
24922
|
+
var _internals36 = {
|
|
24923
24923
|
isSemgrepAvailable,
|
|
24924
24924
|
checkSemgrepAvailable,
|
|
24925
24925
|
resetSemgrepCache,
|
|
@@ -24945,7 +24945,7 @@ function isSemgrepAvailable() {
|
|
|
24945
24945
|
}
|
|
24946
24946
|
}
|
|
24947
24947
|
async function checkSemgrepAvailable() {
|
|
24948
|
-
return
|
|
24948
|
+
return _internals36.isSemgrepAvailable();
|
|
24949
24949
|
}
|
|
24950
24950
|
function resetSemgrepCache() {
|
|
24951
24951
|
semgrepAvailableCache = null;
|
|
@@ -25132,12 +25132,12 @@ async function runSemgrep(options) {
|
|
|
25132
25132
|
const timeoutMs = options.timeoutMs || DEFAULT_TIMEOUT_MS;
|
|
25133
25133
|
if (files.length === 0) {
|
|
25134
25134
|
return {
|
|
25135
|
-
available:
|
|
25135
|
+
available: _internals36.isSemgrepAvailable(),
|
|
25136
25136
|
findings: [],
|
|
25137
25137
|
engine: "tier_a"
|
|
25138
25138
|
};
|
|
25139
25139
|
}
|
|
25140
|
-
if (!
|
|
25140
|
+
if (!_internals36.isSemgrepAvailable()) {
|
|
25141
25141
|
return {
|
|
25142
25142
|
available: false,
|
|
25143
25143
|
findings: [],
|
|
@@ -25299,7 +25299,7 @@ function assignOccurrenceIndices(findings, directory) {
|
|
|
25299
25299
|
}
|
|
25300
25300
|
const occIdx = countMap.get(baseKey) ?? 0;
|
|
25301
25301
|
countMap.set(baseKey, occIdx + 1);
|
|
25302
|
-
const fp =
|
|
25302
|
+
const fp = _internals37.fingerprintFinding(finding, directory, occIdx);
|
|
25303
25303
|
return {
|
|
25304
25304
|
finding,
|
|
25305
25305
|
index: occIdx,
|
|
@@ -25368,7 +25368,7 @@ async function captureOrMergeBaseline(directory, phase, findings, engine, scanne
|
|
|
25368
25368
|
}
|
|
25369
25369
|
} catch {}
|
|
25370
25370
|
const scannedRelFiles = new Set(scannedFiles.map((f) => normalizeFindingPath(directory, f)));
|
|
25371
|
-
const indexed =
|
|
25371
|
+
const indexed = _internals37.assignOccurrenceIndices(findings, directory);
|
|
25372
25372
|
if (existing && !opts?.force) {
|
|
25373
25373
|
const prunedFingerprints = existing.fingerprints.filter((fp) => {
|
|
25374
25374
|
const relFile = fp.slice(0, fp.indexOf("|"));
|
|
@@ -25508,7 +25508,7 @@ function loadBaseline(directory, phase) {
|
|
|
25508
25508
|
};
|
|
25509
25509
|
}
|
|
25510
25510
|
}
|
|
25511
|
-
var
|
|
25511
|
+
var _internals37 = {
|
|
25512
25512
|
fingerprintFinding,
|
|
25513
25513
|
assignOccurrenceIndices,
|
|
25514
25514
|
captureOrMergeBaseline,
|
|
@@ -25622,7 +25622,7 @@ async function sastScan(input, directory, config) {
|
|
|
25622
25622
|
let filesScanned = 0;
|
|
25623
25623
|
let _filesSkipped = 0;
|
|
25624
25624
|
const scannedFilePaths = [];
|
|
25625
|
-
const semgrepAvailable = !offline_only &&
|
|
25625
|
+
const semgrepAvailable = !offline_only && _internals38.isSemgrepAvailable();
|
|
25626
25626
|
const engine = semgrepAvailable ? "tier_a+tier_b" : "tier_a";
|
|
25627
25627
|
const filesByLanguage = new Map;
|
|
25628
25628
|
for (const filePath of changed_files) {
|
|
@@ -25685,13 +25685,13 @@ async function sastScan(input, directory, config) {
|
|
|
25685
25685
|
let semgrepResult;
|
|
25686
25686
|
if (bucketKey.startsWith("auto:")) {
|
|
25687
25687
|
const lang = bucketKey.slice("auto:".length);
|
|
25688
|
-
semgrepResult = await
|
|
25688
|
+
semgrepResult = await _internals38.runSemgrep({
|
|
25689
25689
|
files: bucketFiles,
|
|
25690
25690
|
lang,
|
|
25691
25691
|
useAutoConfig: true
|
|
25692
25692
|
});
|
|
25693
25693
|
} else {
|
|
25694
|
-
semgrepResult = await
|
|
25694
|
+
semgrepResult = await _internals38.runSemgrep({
|
|
25695
25695
|
files: bucketFiles
|
|
25696
25696
|
});
|
|
25697
25697
|
}
|
|
@@ -25933,11 +25933,11 @@ var sast_scan = createSwarmTool({
|
|
|
25933
25933
|
capture_baseline: safeArgs.capture_baseline,
|
|
25934
25934
|
phase: safeArgs.phase
|
|
25935
25935
|
};
|
|
25936
|
-
const result = await
|
|
25936
|
+
const result = await _internals38.sastScan(input, directory);
|
|
25937
25937
|
return JSON.stringify(result, null, 2);
|
|
25938
25938
|
}
|
|
25939
25939
|
});
|
|
25940
|
-
var
|
|
25940
|
+
var _internals38 = {
|
|
25941
25941
|
sastScan,
|
|
25942
25942
|
sast_scan,
|
|
25943
25943
|
isSemgrepAvailable: () => isSemgrepAvailable(),
|
|
@@ -25969,10 +25969,10 @@ class DisposableWorktreeCleanupError extends Error {
|
|
|
25969
25969
|
}
|
|
25970
25970
|
}
|
|
25971
25971
|
async function git(projectRoot, args, abortSignal) {
|
|
25972
|
-
const executable =
|
|
25972
|
+
const executable = _internals39.resolveExecutableFromPath(["git"]);
|
|
25973
25973
|
if (!executable)
|
|
25974
25974
|
throw new Error("git executable not found");
|
|
25975
|
-
const result = await
|
|
25975
|
+
const result = await _internals39.runExternalTool({
|
|
25976
25976
|
executable,
|
|
25977
25977
|
args: ["-C", projectRoot, ...args],
|
|
25978
25978
|
cwd: projectRoot,
|
|
@@ -26008,7 +26008,7 @@ async function createDisposableWorktree(projectRoot, baseRef, abortSignal) {
|
|
|
26008
26008
|
if (!/^[A-Fa-f0-9]{40,64}$/.test(baseRef)) {
|
|
26009
26009
|
throw new Error("Evaluation baseRef must be a full commit hash");
|
|
26010
26010
|
}
|
|
26011
|
-
const parent = path49.join(
|
|
26011
|
+
const parent = path49.join(_internals39.tmpdir(), WORKTREE_PARENT);
|
|
26012
26012
|
fs22.mkdirSync(parent, { recursive: true });
|
|
26013
26013
|
const canonicalParent = fs22.realpathSync(parent);
|
|
26014
26014
|
const worktreePath = path49.join(canonicalParent, crypto4.randomUUID());
|
|
@@ -26017,7 +26017,7 @@ async function createDisposableWorktree(projectRoot, baseRef, abortSignal) {
|
|
|
26017
26017
|
}
|
|
26018
26018
|
async function removeDisposableWorktree(projectRoot, worktreePath) {
|
|
26019
26019
|
const canonicalRoot = fs22.realpathSync(projectRoot);
|
|
26020
|
-
const expectedParent = fs22.realpathSync(path49.join(
|
|
26020
|
+
const expectedParent = fs22.realpathSync(path49.join(_internals39.tmpdir(), WORKTREE_PARENT));
|
|
26021
26021
|
const resolved = path49.resolve(worktreePath);
|
|
26022
26022
|
const relative7 = path49.relative(expectedParent, resolved);
|
|
26023
26023
|
if (!relative7 || relative7 === ".." || relative7.startsWith(`..${path49.sep}`) || path49.isAbsolute(relative7)) {
|
|
@@ -26030,7 +26030,7 @@ async function removeDisposableWorktree(projectRoot, worktreePath) {
|
|
|
26030
26030
|
cleanupErrors.push(`git-remove: ${error2 instanceof Error ? error2.message : String(error2)}`);
|
|
26031
26031
|
}
|
|
26032
26032
|
try {
|
|
26033
|
-
|
|
26033
|
+
_internals39.rmSync(resolved, { recursive: true, force: true });
|
|
26034
26034
|
} catch (error2) {
|
|
26035
26035
|
cleanupErrors.push(`filesystem-remove: ${error2 instanceof Error ? error2.message : String(error2)}`);
|
|
26036
26036
|
}
|
|
@@ -26039,7 +26039,7 @@ async function removeDisposableWorktree(projectRoot, worktreePath) {
|
|
|
26039
26039
|
} catch (error2) {
|
|
26040
26040
|
cleanupErrors.push(`git-prune: ${error2 instanceof Error ? error2.message : String(error2)}`);
|
|
26041
26041
|
}
|
|
26042
|
-
const pathPresent =
|
|
26042
|
+
const pathPresent = _internals39.existsSync(resolved);
|
|
26043
26043
|
let registrationPresent;
|
|
26044
26044
|
try {
|
|
26045
26045
|
const listed = await git(canonicalRoot, [
|
|
@@ -26061,7 +26061,7 @@ function normalizeWorktreePath(value) {
|
|
|
26061
26061
|
const resolved = path49.resolve(value);
|
|
26062
26062
|
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
26063
26063
|
}
|
|
26064
|
-
var
|
|
26064
|
+
var _internals39 = {
|
|
26065
26065
|
runExternalTool,
|
|
26066
26066
|
resolveExecutableFromPath,
|
|
26067
26067
|
tmpdir: os7.tmpdir,
|
|
@@ -26895,7 +26895,7 @@ function extractCurrentPhaseFromPlan(plan) {
|
|
|
26895
26895
|
if (!plan) {
|
|
26896
26896
|
return { currentPhase: null, currentTask: null, incompleteTasks: [] };
|
|
26897
26897
|
}
|
|
26898
|
-
if (!
|
|
26898
|
+
if (!_internals40.validatePlanPhases(plan)) {
|
|
26899
26899
|
return { currentPhase: null, currentTask: null, incompleteTasks: [] };
|
|
26900
26900
|
}
|
|
26901
26901
|
let currentPhase = null;
|
|
@@ -27037,9 +27037,9 @@ function extractPhaseMetrics(content) {
|
|
|
27037
27037
|
async function getHandoffData(directory) {
|
|
27038
27038
|
const now = new Date().toISOString();
|
|
27039
27039
|
const sessionContent = await readSwarmFileAsync(directory, "session/state.json");
|
|
27040
|
-
const sessionState =
|
|
27040
|
+
const sessionState = _internals40.parseSessionState(sessionContent);
|
|
27041
27041
|
const plan = await loadPlanJsonOnly(directory);
|
|
27042
|
-
const planInfo =
|
|
27042
|
+
const planInfo = _internals40.extractCurrentPhaseFromPlan(plan);
|
|
27043
27043
|
if (!plan) {
|
|
27044
27044
|
const planMdContent = await readSwarmFileAsync(directory, "plan.md");
|
|
27045
27045
|
if (planMdContent) {
|
|
@@ -27058,8 +27058,8 @@ async function getHandoffData(directory) {
|
|
|
27058
27058
|
}
|
|
27059
27059
|
}
|
|
27060
27060
|
const contextContent = await readSwarmFileAsync(directory, "context.md");
|
|
27061
|
-
const recentDecisions =
|
|
27062
|
-
const rawPhaseMetrics =
|
|
27061
|
+
const recentDecisions = _internals40.extractDecisions(contextContent);
|
|
27062
|
+
const rawPhaseMetrics = _internals40.extractPhaseMetrics(contextContent);
|
|
27063
27063
|
const phaseMetrics = sanitizeString(rawPhaseMetrics, 1000);
|
|
27064
27064
|
let delegationState = null;
|
|
27065
27065
|
if (sessionState?.delegationState) {
|
|
@@ -27223,7 +27223,7 @@ ${lines.join(`
|
|
|
27223
27223
|
`)}
|
|
27224
27224
|
\`\`\``;
|
|
27225
27225
|
}
|
|
27226
|
-
var
|
|
27226
|
+
var _internals40 = {
|
|
27227
27227
|
getHandoffData,
|
|
27228
27228
|
formatHandoffMarkdown,
|
|
27229
27229
|
formatContinuationPrompt,
|
|
@@ -27372,15 +27372,15 @@ async function writeSnapshot(directory, state) {
|
|
|
27372
27372
|
}
|
|
27373
27373
|
function createSnapshotWriterHook(directory) {
|
|
27374
27374
|
return (_input, _output) => {
|
|
27375
|
-
_writeInFlight = _writeInFlight.then(() =>
|
|
27375
|
+
_writeInFlight = _writeInFlight.then(() => _internals41.writeSnapshot(directory, swarmState), () => _internals41.writeSnapshot(directory, swarmState));
|
|
27376
27376
|
return _writeInFlight;
|
|
27377
27377
|
};
|
|
27378
27378
|
}
|
|
27379
27379
|
async function flushPendingSnapshot(directory) {
|
|
27380
|
-
_writeInFlight = _writeInFlight.then(() =>
|
|
27380
|
+
_writeInFlight = _writeInFlight.then(() => _internals41.writeSnapshot(directory, swarmState), () => _internals41.writeSnapshot(directory, swarmState));
|
|
27381
27381
|
await _writeInFlight;
|
|
27382
27382
|
}
|
|
27383
|
-
var
|
|
27383
|
+
var _internals41 = {
|
|
27384
27384
|
writeSnapshot,
|
|
27385
27385
|
createSnapshotWriterHook,
|
|
27386
27386
|
flushPendingSnapshot
|
|
@@ -27665,7 +27665,7 @@ function parseIssueRef(input, directory) {
|
|
|
27665
27665
|
}
|
|
27666
27666
|
return null;
|
|
27667
27667
|
}
|
|
27668
|
-
var
|
|
27668
|
+
var _internals42 = {
|
|
27669
27669
|
writeFileSync: fs24.writeFileSync,
|
|
27670
27670
|
mkdirSync: fs24.mkdirSync,
|
|
27671
27671
|
renameSync: fs24.renameSync,
|
|
@@ -27676,18 +27676,18 @@ var _internals41 = {
|
|
|
27676
27676
|
function atomicWriteFileSync(dir, filename, content) {
|
|
27677
27677
|
const tmpPath = path53.join(dir, `.tmp-${filename}-${Date.now()}-${process.pid}`);
|
|
27678
27678
|
const finalPath = path53.join(dir, filename);
|
|
27679
|
-
|
|
27679
|
+
_internals42.writeFileSync(tmpPath, content, "utf-8");
|
|
27680
27680
|
try {
|
|
27681
|
-
|
|
27681
|
+
_internals42.renameSync(tmpPath, finalPath);
|
|
27682
27682
|
} catch {
|
|
27683
27683
|
try {
|
|
27684
|
-
|
|
27684
|
+
_internals42.unlinkSync(finalPath);
|
|
27685
27685
|
} catch {}
|
|
27686
27686
|
try {
|
|
27687
|
-
|
|
27687
|
+
_internals42.renameSync(tmpPath, finalPath);
|
|
27688
27688
|
} catch (retryErr) {
|
|
27689
27689
|
try {
|
|
27690
|
-
|
|
27690
|
+
_internals42.unlinkSync(tmpPath);
|
|
27691
27691
|
} catch {}
|
|
27692
27692
|
throw retryErr;
|
|
27693
27693
|
}
|
|
@@ -27740,10 +27740,10 @@ ${USAGE7}`;
|
|
|
27740
27740
|
};
|
|
27741
27741
|
let oldTraceState = null;
|
|
27742
27742
|
try {
|
|
27743
|
-
oldTraceState =
|
|
27743
|
+
oldTraceState = _internals42.readFileSync(path53.join(swarmDir, "issue-trace-state.json"), "utf-8");
|
|
27744
27744
|
} catch {}
|
|
27745
27745
|
try {
|
|
27746
|
-
|
|
27746
|
+
_internals42.mkdirSync(swarmDir, { recursive: true });
|
|
27747
27747
|
atomicWriteFileSync(swarmDir, "issue-trace-state.json", JSON.stringify(traceState, null, 2));
|
|
27748
27748
|
atomicWriteFileSync(swarmDir, "issue-reference.json", JSON.stringify(issueReference, null, 2));
|
|
27749
27749
|
} catch (e) {
|
|
@@ -27753,11 +27753,11 @@ ${USAGE7}`;
|
|
|
27753
27753
|
} catch {}
|
|
27754
27754
|
} else {
|
|
27755
27755
|
try {
|
|
27756
|
-
|
|
27756
|
+
_internals42.unlinkSync(path53.join(swarmDir, "issue-trace-state.json"));
|
|
27757
27757
|
} catch {}
|
|
27758
27758
|
}
|
|
27759
27759
|
try {
|
|
27760
|
-
|
|
27760
|
+
_internals42.unlinkSync(path53.join(swarmDir, "issue-reference.json"));
|
|
27761
27761
|
} catch {}
|
|
27762
27762
|
const errMsg = e instanceof Error ? e.message : String(e);
|
|
27763
27763
|
return `Error: Failed to persist issue reference durably: ${errMsg}
|
|
@@ -27788,7 +27788,7 @@ import * as path54 from "path";
|
|
|
27788
27788
|
async function migrateKnowledgeToExternal(_directory, _config) {
|
|
27789
27789
|
const externalSentinelPath = path54.join(_directory, ".swarm", ".knowledge-external-migrated");
|
|
27790
27790
|
const contextPath = path54.join(_directory, ".swarm", "context.md");
|
|
27791
|
-
if (
|
|
27791
|
+
if (_internals43.existsSync(externalSentinelPath)) {
|
|
27792
27792
|
return {
|
|
27793
27793
|
migrated: false,
|
|
27794
27794
|
entriesMigrated: 0,
|
|
@@ -27797,7 +27797,7 @@ async function migrateKnowledgeToExternal(_directory, _config) {
|
|
|
27797
27797
|
skippedReason: "external-sentinel-exists"
|
|
27798
27798
|
};
|
|
27799
27799
|
}
|
|
27800
|
-
if (!
|
|
27800
|
+
if (!_internals43.existsSync(contextPath)) {
|
|
27801
27801
|
return {
|
|
27802
27802
|
migrated: false,
|
|
27803
27803
|
entriesMigrated: 0,
|
|
@@ -27806,7 +27806,7 @@ async function migrateKnowledgeToExternal(_directory, _config) {
|
|
|
27806
27806
|
skippedReason: "no-context-file"
|
|
27807
27807
|
};
|
|
27808
27808
|
}
|
|
27809
|
-
const contextContent = await
|
|
27809
|
+
const contextContent = await _internals43.readFile(contextPath, "utf-8");
|
|
27810
27810
|
if (contextContent.trim().length === 0) {
|
|
27811
27811
|
return {
|
|
27812
27812
|
migrated: false,
|
|
@@ -27824,7 +27824,7 @@ async function migrateKnowledgeToExternal(_directory, _config) {
|
|
|
27824
27824
|
entriesCount++;
|
|
27825
27825
|
}
|
|
27826
27826
|
}
|
|
27827
|
-
await
|
|
27827
|
+
await _internals43.writeSentinel(externalSentinelPath, entriesCount, entriesCount);
|
|
27828
27828
|
return {
|
|
27829
27829
|
migrated: true,
|
|
27830
27830
|
entriesMigrated: entriesCount,
|
|
@@ -27832,7 +27832,7 @@ async function migrateKnowledgeToExternal(_directory, _config) {
|
|
|
27832
27832
|
entriesTotal: entriesCount
|
|
27833
27833
|
};
|
|
27834
27834
|
}
|
|
27835
|
-
var
|
|
27835
|
+
var _internals43 = {
|
|
27836
27836
|
appendKnowledge,
|
|
27837
27837
|
migrateContextToKnowledge,
|
|
27838
27838
|
migrateKnowledgeToExternal,
|
|
@@ -27883,9 +27883,9 @@ async function migrateContextToKnowledge(directory, config) {
|
|
|
27883
27883
|
skippedReason: "empty-context"
|
|
27884
27884
|
};
|
|
27885
27885
|
}
|
|
27886
|
-
const rawEntries =
|
|
27886
|
+
const rawEntries = _internals43.parseContextMd(contextContent);
|
|
27887
27887
|
if (rawEntries.length === 0) {
|
|
27888
|
-
await
|
|
27888
|
+
await _internals43.writeSentinel(sentinelPath, 0, 0);
|
|
27889
27889
|
return {
|
|
27890
27890
|
migrated: true,
|
|
27891
27891
|
entriesMigrated: 0,
|
|
@@ -27896,10 +27896,10 @@ async function migrateContextToKnowledge(directory, config) {
|
|
|
27896
27896
|
const existing = await readKnowledge(knowledgePath);
|
|
27897
27897
|
let migrated = 0;
|
|
27898
27898
|
let dropped = 0;
|
|
27899
|
-
const projectName =
|
|
27899
|
+
const projectName = _internals43.inferProjectName(directory);
|
|
27900
27900
|
for (const raw of rawEntries) {
|
|
27901
27901
|
if (config.validation_enabled !== false) {
|
|
27902
|
-
const category = raw.categoryHint ??
|
|
27902
|
+
const category = raw.categoryHint ?? _internals43.inferCategoryFromText(raw.text);
|
|
27903
27903
|
const result = validateLesson(raw.text, existing.map((e) => e.lesson), {
|
|
27904
27904
|
category,
|
|
27905
27905
|
scope: "global",
|
|
@@ -27919,8 +27919,8 @@ async function migrateContextToKnowledge(directory, config) {
|
|
|
27919
27919
|
const entry = {
|
|
27920
27920
|
id: randomUUID7(),
|
|
27921
27921
|
tier: "swarm",
|
|
27922
|
-
lesson:
|
|
27923
|
-
category: raw.categoryHint ??
|
|
27922
|
+
lesson: _internals43.truncateLesson(raw.text),
|
|
27923
|
+
category: raw.categoryHint ?? _internals43.inferCategoryFromText(raw.text),
|
|
27924
27924
|
tags: [...inferredTags, `migration:${raw.sourceSection}`],
|
|
27925
27925
|
scope: "global",
|
|
27926
27926
|
confidence: 0.3,
|
|
@@ -27943,7 +27943,7 @@ async function migrateContextToKnowledge(directory, config) {
|
|
|
27943
27943
|
if (migrated > 0) {
|
|
27944
27944
|
await rewriteKnowledge(knowledgePath, existing);
|
|
27945
27945
|
}
|
|
27946
|
-
await
|
|
27946
|
+
await _internals43.writeSentinel(sentinelPath, migrated, dropped);
|
|
27947
27947
|
log(`[knowledge-migrator] Migrated ${migrated} entries, dropped ${dropped}`);
|
|
27948
27948
|
return {
|
|
27949
27949
|
migrated: true,
|
|
@@ -27953,7 +27953,7 @@ async function migrateContextToKnowledge(directory, config) {
|
|
|
27953
27953
|
};
|
|
27954
27954
|
}
|
|
27955
27955
|
async function migrateHiveKnowledgeLegacy(config) {
|
|
27956
|
-
const legacyHivePath =
|
|
27956
|
+
const legacyHivePath = _internals43.resolveLegacyHiveKnowledgePath();
|
|
27957
27957
|
const canonicalHivePath = resolveHiveKnowledgePath2();
|
|
27958
27958
|
const sentinelPath = path54.join(path54.dirname(canonicalHivePath), ".hive-knowledge-migrated");
|
|
27959
27959
|
if (existsSync32(sentinelPath)) {
|
|
@@ -27976,7 +27976,7 @@ async function migrateHiveKnowledgeLegacy(config) {
|
|
|
27976
27976
|
}
|
|
27977
27977
|
const legacyEntries = await readKnowledge(legacyHivePath);
|
|
27978
27978
|
if (legacyEntries.length === 0) {
|
|
27979
|
-
await
|
|
27979
|
+
await _internals43.writeSentinel(sentinelPath, 0, 0);
|
|
27980
27980
|
return {
|
|
27981
27981
|
migrated: true,
|
|
27982
27982
|
entriesMigrated: 0,
|
|
@@ -28024,7 +28024,7 @@ async function migrateHiveKnowledgeLegacy(config) {
|
|
|
28024
28024
|
const newHiveEntry = {
|
|
28025
28025
|
id: resolvedId,
|
|
28026
28026
|
tier: "hive",
|
|
28027
|
-
lesson:
|
|
28027
|
+
lesson: _internals43.truncateLesson(lesson),
|
|
28028
28028
|
category,
|
|
28029
28029
|
tags: ["migration:legacy-hive"],
|
|
28030
28030
|
scope: scopeTag,
|
|
@@ -28043,7 +28043,7 @@ async function migrateHiveKnowledgeLegacy(config) {
|
|
|
28043
28043
|
encounter_score: 1
|
|
28044
28044
|
};
|
|
28045
28045
|
try {
|
|
28046
|
-
await
|
|
28046
|
+
await _internals43.appendKnowledge(canonicalHivePath, newHiveEntry);
|
|
28047
28047
|
existingHiveEntries.push(newHiveEntry);
|
|
28048
28048
|
migrated++;
|
|
28049
28049
|
} catch (appendError) {
|
|
@@ -28059,7 +28059,7 @@ async function migrateHiveKnowledgeLegacy(config) {
|
|
|
28059
28059
|
dropped++;
|
|
28060
28060
|
}
|
|
28061
28061
|
}
|
|
28062
|
-
await
|
|
28062
|
+
await _internals43.writeSentinel(sentinelPath, migrated, dropped);
|
|
28063
28063
|
log(`[knowledge-migrator] Migrated ${migrated} legacy hive entries, dropped ${dropped}`);
|
|
28064
28064
|
return {
|
|
28065
28065
|
migrated: true,
|
|
@@ -28070,7 +28070,7 @@ async function migrateHiveKnowledgeLegacy(config) {
|
|
|
28070
28070
|
};
|
|
28071
28071
|
}
|
|
28072
28072
|
function parseContextMd(content) {
|
|
28073
|
-
const sections =
|
|
28073
|
+
const sections = _internals43.splitIntoSections(content);
|
|
28074
28074
|
const entries = [];
|
|
28075
28075
|
const seen = new Set;
|
|
28076
28076
|
const sectionPatterns = [
|
|
@@ -28086,7 +28086,7 @@ function parseContextMd(content) {
|
|
|
28086
28086
|
const match = sectionPatterns.find((sp) => sp.pattern.test(section.heading));
|
|
28087
28087
|
if (!match)
|
|
28088
28088
|
continue;
|
|
28089
|
-
const bullets =
|
|
28089
|
+
const bullets = _internals43.extractBullets(section.body);
|
|
28090
28090
|
for (const bullet of bullets) {
|
|
28091
28091
|
if (bullet.length < 15)
|
|
28092
28092
|
continue;
|
|
@@ -28095,9 +28095,9 @@ function parseContextMd(content) {
|
|
|
28095
28095
|
continue;
|
|
28096
28096
|
seen.add(normalized);
|
|
28097
28097
|
entries.push({
|
|
28098
|
-
text:
|
|
28098
|
+
text: _internals43.truncateLesson(bullet),
|
|
28099
28099
|
sourceSection: match.sourceSection,
|
|
28100
|
-
categoryHint:
|
|
28100
|
+
categoryHint: _internals43.inferCategoryFromText(bullet)
|
|
28101
28101
|
});
|
|
28102
28102
|
}
|
|
28103
28103
|
}
|
|
@@ -28187,8 +28187,8 @@ async function writeSentinel(sentinelPath, migrated, dropped) {
|
|
|
28187
28187
|
schema_version: 1,
|
|
28188
28188
|
migration_tool: "knowledge-migrator.ts"
|
|
28189
28189
|
};
|
|
28190
|
-
await
|
|
28191
|
-
await
|
|
28190
|
+
await _internals43.mkdir(path54.dirname(sentinelPath), { recursive: true });
|
|
28191
|
+
await _internals43.writeFile(sentinelPath, JSON.stringify(sentinel, null, 2), "utf-8");
|
|
28192
28192
|
}
|
|
28193
28193
|
function resolveLegacyHiveKnowledgePath() {
|
|
28194
28194
|
const platform = process.platform;
|
|
@@ -28600,7 +28600,7 @@ function timeoutMessage(timeoutMs) {
|
|
|
28600
28600
|
async function computeWithTimeout(directory, currentPhase, timeoutMs) {
|
|
28601
28601
|
const controller = new AbortController;
|
|
28602
28602
|
let timeout;
|
|
28603
|
-
const metricsPromise =
|
|
28603
|
+
const metricsPromise = _internals44.computeLearningMetrics(directory, {
|
|
28604
28604
|
currentPhase,
|
|
28605
28605
|
signal: controller.signal
|
|
28606
28606
|
});
|
|
@@ -28657,7 +28657,7 @@ ${JSON.stringify({
|
|
|
28657
28657
|
return `Error computing learning metrics: ${message}. Run /swarm diagnose to check .swarm/ health.`;
|
|
28658
28658
|
}
|
|
28659
28659
|
}
|
|
28660
|
-
var
|
|
28660
|
+
var _internals44 = {
|
|
28661
28661
|
computeLearningMetrics
|
|
28662
28662
|
};
|
|
28663
28663
|
|
|
@@ -29279,7 +29279,7 @@ async function readLatestLoopState(directory) {
|
|
|
29279
29279
|
return null;
|
|
29280
29280
|
}
|
|
29281
29281
|
}
|
|
29282
|
-
var
|
|
29282
|
+
var _internals45 = {
|
|
29283
29283
|
readLatestLoopState
|
|
29284
29284
|
};
|
|
29285
29285
|
var USAGE8 = `Usage: /swarm loop <objective> [--max-cycles 1..5] [--autonomy checkpoint|auto] [--depth standard|exhaustive] [--resume]
|
|
@@ -29392,7 +29392,7 @@ ${USAGE8}`;
|
|
|
29392
29392
|
}
|
|
29393
29393
|
let autonomy = parsed.autonomy;
|
|
29394
29394
|
if (parsed.resume && !parsed.autonomyExplicit) {
|
|
29395
|
-
const state = await
|
|
29395
|
+
const state = await _internals45.readLatestLoopState(_directory);
|
|
29396
29396
|
if (state?.autonomy && AUTONOMY_LEVELS.has(state.autonomy)) {
|
|
29397
29397
|
autonomy = state.autonomy;
|
|
29398
29398
|
}
|
|
@@ -30328,15 +30328,15 @@ function truncate(value, maxLength) {
|
|
|
30328
30328
|
}
|
|
30329
30329
|
|
|
30330
30330
|
// src/services/plan-service.ts
|
|
30331
|
-
var
|
|
30331
|
+
var _internals46 = {
|
|
30332
30332
|
loadPlanJsonOnly,
|
|
30333
30333
|
derivePlanMarkdown,
|
|
30334
30334
|
readSwarmFileAsync
|
|
30335
30335
|
};
|
|
30336
30336
|
async function getPlanData(directory, phaseArg) {
|
|
30337
|
-
const plan = await
|
|
30337
|
+
const plan = await _internals46.loadPlanJsonOnly(directory);
|
|
30338
30338
|
if (plan) {
|
|
30339
|
-
const fullMarkdown =
|
|
30339
|
+
const fullMarkdown = _internals46.derivePlanMarkdown(plan);
|
|
30340
30340
|
if (phaseArg === undefined || phaseArg === null || phaseArg === "") {
|
|
30341
30341
|
return {
|
|
30342
30342
|
hasPlan: true,
|
|
@@ -30379,7 +30379,7 @@ async function getPlanData(directory, phaseArg) {
|
|
|
30379
30379
|
isLegacy: false
|
|
30380
30380
|
};
|
|
30381
30381
|
}
|
|
30382
|
-
const planContent = await
|
|
30382
|
+
const planContent = await _internals46.readSwarmFileAsync(directory, "plan.md");
|
|
30383
30383
|
if (!planContent) {
|
|
30384
30384
|
return {
|
|
30385
30385
|
hasPlan: false,
|
|
@@ -30476,7 +30476,7 @@ async function handlePlanCommand(directory, args) {
|
|
|
30476
30476
|
return formatPlanMarkdown(planData);
|
|
30477
30477
|
}
|
|
30478
30478
|
// src/commands/post-mortem.ts
|
|
30479
|
-
var
|
|
30479
|
+
var _internals47 = {
|
|
30480
30480
|
createCuratorLLMDelegate,
|
|
30481
30481
|
runCuratorPostMortem
|
|
30482
30482
|
};
|
|
@@ -30524,10 +30524,10 @@ async function handlePostMortemCommand(directory, args, options) {
|
|
|
30524
30524
|
};
|
|
30525
30525
|
if (options?.sessionID) {
|
|
30526
30526
|
try {
|
|
30527
|
-
pmOptions.llmDelegate =
|
|
30527
|
+
pmOptions.llmDelegate = _internals47.createCuratorLLMDelegate(directory, "postmortem", options.sessionID);
|
|
30528
30528
|
} catch {}
|
|
30529
30529
|
}
|
|
30530
|
-
const result = await
|
|
30530
|
+
const result = await _internals47.runCuratorPostMortem(directory, pmOptions);
|
|
30531
30531
|
const lines = [];
|
|
30532
30532
|
if (result.success) {
|
|
30533
30533
|
lines.push("## Post-Mortem Report Generated");
|
|
@@ -30684,7 +30684,7 @@ function formatMergeGroupStatus(status, conclusion, htmlUrl) {
|
|
|
30684
30684
|
}
|
|
30685
30685
|
return parts.join(" ");
|
|
30686
30686
|
}
|
|
30687
|
-
var
|
|
30687
|
+
var _internals48 = {
|
|
30688
30688
|
formatRelativeTime,
|
|
30689
30689
|
formatMergeGroupStatus,
|
|
30690
30690
|
listActive,
|
|
@@ -30692,7 +30692,7 @@ var _internals47 = {
|
|
|
30692
30692
|
parseMergeGroupRuns
|
|
30693
30693
|
};
|
|
30694
30694
|
async function handlePrMonitorStatusCommand(directory, _args, sessionID, source) {
|
|
30695
|
-
const allActive = await
|
|
30695
|
+
const allActive = await _internals48.listActive(directory);
|
|
30696
30696
|
const allSessions = source === "cli";
|
|
30697
30697
|
const subs = allSessions ? allActive : allActive.filter((record) => record.sessionID === sessionID);
|
|
30698
30698
|
if (subs.length === 0) {
|
|
@@ -30708,7 +30708,7 @@ async function handlePrMonitorStatusCommand(directory, _args, sessionID, source)
|
|
|
30708
30708
|
const index = i + 1;
|
|
30709
30709
|
lines.push(` ${index}. ${sub.repoFullName}#${sub.prNumber}`);
|
|
30710
30710
|
lines.push(` URL: ${sub.prUrl}`);
|
|
30711
|
-
const mergeGroupRuns = await
|
|
30711
|
+
const mergeGroupRuns = await _internals48.listMergeGroupRuns(directory, sub.repoFullName, sub.prNumber);
|
|
30712
30712
|
if (mergeGroupRuns.runs.length > 0) {
|
|
30713
30713
|
lines.push(" Merge-group runs:");
|
|
30714
30714
|
for (const run of mergeGroupRuns.runs) {
|
|
@@ -30848,7 +30848,7 @@ async function handlePrSubscribeCommand(directory, args, sessionID) {
|
|
|
30848
30848
|
const repoFullName = `${prInfo.owner}/${prInfo.repo}`;
|
|
30849
30849
|
const prUrl = `https://github.com/${prInfo.owner}/${prInfo.repo}/pull/${prInfo.number}`;
|
|
30850
30850
|
try {
|
|
30851
|
-
const config =
|
|
30851
|
+
const config = _internals49.loadPluginConfig(directory);
|
|
30852
30852
|
const prMonitorConfig = config.pr_monitor;
|
|
30853
30853
|
if (!prMonitorConfig?.enabled) {
|
|
30854
30854
|
return [
|
|
@@ -30858,7 +30858,7 @@ async function handlePrSubscribeCommand(directory, args, sessionID) {
|
|
|
30858
30858
|
].join(`
|
|
30859
30859
|
`);
|
|
30860
30860
|
}
|
|
30861
|
-
await
|
|
30861
|
+
await _internals49.subscribe(directory, {
|
|
30862
30862
|
sessionID,
|
|
30863
30863
|
prNumber: prInfo.number,
|
|
30864
30864
|
repoFullName,
|
|
@@ -30886,7 +30886,7 @@ async function handlePrSubscribeCommand(directory, args, sessionID) {
|
|
|
30886
30886
|
`);
|
|
30887
30887
|
}
|
|
30888
30888
|
}
|
|
30889
|
-
var
|
|
30889
|
+
var _internals49 = {
|
|
30890
30890
|
loadPluginConfig,
|
|
30891
30891
|
subscribe
|
|
30892
30892
|
};
|
|
@@ -30909,9 +30909,9 @@ async function handlePrUnsubscribeCommand(directory, args, sessionID) {
|
|
|
30909
30909
|
`);
|
|
30910
30910
|
}
|
|
30911
30911
|
const refToken = rest[0];
|
|
30912
|
-
const prInfo =
|
|
30912
|
+
const prInfo = _internals50.parsePrRef(refToken, directory);
|
|
30913
30913
|
if (!prInfo) {
|
|
30914
|
-
if (
|
|
30914
|
+
if (_internals50.looksLikePrRef(refToken)) {
|
|
30915
30915
|
return [
|
|
30916
30916
|
`Error: Could not resolve PR reference from "${refToken}".`,
|
|
30917
30917
|
"",
|
|
@@ -30932,8 +30932,8 @@ async function handlePrUnsubscribeCommand(directory, args, sessionID) {
|
|
|
30932
30932
|
const repoFullName = `${prInfo.owner}/${prInfo.repo}`;
|
|
30933
30933
|
const prUrl = `https://github.com/${prInfo.owner}/${prInfo.repo}/pull/${prInfo.number}`;
|
|
30934
30934
|
try {
|
|
30935
|
-
const correlationId =
|
|
30936
|
-
const result = await
|
|
30935
|
+
const correlationId = _internals50.buildCorrelationId(sessionID, repoFullName, prInfo.number);
|
|
30936
|
+
const result = await _internals50.unsubscribe(directory, correlationId);
|
|
30937
30937
|
if (!result) {
|
|
30938
30938
|
return [
|
|
30939
30939
|
`Not subscribed to ${prUrl}`,
|
|
@@ -30960,7 +30960,7 @@ async function handlePrUnsubscribeCommand(directory, args, sessionID) {
|
|
|
30960
30960
|
`);
|
|
30961
30961
|
}
|
|
30962
30962
|
}
|
|
30963
|
-
var
|
|
30963
|
+
var _internals50 = {
|
|
30964
30964
|
unsubscribe,
|
|
30965
30965
|
buildCorrelationId,
|
|
30966
30966
|
parsePrRef,
|
|
@@ -31442,15 +31442,15 @@ var lint = createSwarmTool({
|
|
|
31442
31442
|
}
|
|
31443
31443
|
const { mode } = args;
|
|
31444
31444
|
const cwd = directory;
|
|
31445
|
-
const linter = await
|
|
31445
|
+
const linter = await _internals51.detectAvailableLinter(directory);
|
|
31446
31446
|
if (linter) {
|
|
31447
|
-
const result = await
|
|
31447
|
+
const result = await _internals51.runLint(linter, mode, directory);
|
|
31448
31448
|
return JSON.stringify(result, null, 2);
|
|
31449
31449
|
}
|
|
31450
|
-
const additionalLinter =
|
|
31450
|
+
const additionalLinter = _internals51.detectAdditionalLinter(cwd);
|
|
31451
31451
|
if (additionalLinter) {
|
|
31452
31452
|
warn(`[lint] Using ${additionalLinter} linter for this project`);
|
|
31453
|
-
const result = await
|
|
31453
|
+
const result = await _internals51.runAdditionalLint(additionalLinter, mode, cwd);
|
|
31454
31454
|
return JSON.stringify(result, null, 2);
|
|
31455
31455
|
}
|
|
31456
31456
|
const errorResult = {
|
|
@@ -31464,7 +31464,7 @@ For Rust: rustup component add clippy`
|
|
|
31464
31464
|
return JSON.stringify(errorResult, null, 2);
|
|
31465
31465
|
}
|
|
31466
31466
|
});
|
|
31467
|
-
var
|
|
31467
|
+
var _internals51 = {
|
|
31468
31468
|
detectAvailableLinter,
|
|
31469
31469
|
runLint,
|
|
31470
31470
|
detectAdditionalLinter,
|
|
@@ -32152,7 +32152,7 @@ var secretscan = createSwarmTool({
|
|
|
32152
32152
|
});
|
|
32153
32153
|
async function runSecretscan(directory) {
|
|
32154
32154
|
try {
|
|
32155
|
-
const result = await
|
|
32155
|
+
const result = await _internals52.secretscan.execute({ directory }, {});
|
|
32156
32156
|
const jsonStr = typeof result === "string" ? result : result.output;
|
|
32157
32157
|
return JSON.parse(jsonStr);
|
|
32158
32158
|
} catch (e) {
|
|
@@ -32224,7 +32224,7 @@ async function runSecretscanOnFiles(files, directory) {
|
|
|
32224
32224
|
};
|
|
32225
32225
|
}
|
|
32226
32226
|
}
|
|
32227
|
-
var
|
|
32227
|
+
var _internals52 = {
|
|
32228
32228
|
secretscan,
|
|
32229
32229
|
runSecretscan,
|
|
32230
32230
|
runSecretscanOnFiles,
|
|
@@ -32500,7 +32500,7 @@ async function buildImpactMapInternal(cwd) {
|
|
|
32500
32500
|
}
|
|
32501
32501
|
return impactMap;
|
|
32502
32502
|
}
|
|
32503
|
-
var
|
|
32503
|
+
var _internals53 = {
|
|
32504
32504
|
validateProjectRoot,
|
|
32505
32505
|
normalizePath: normalizePath2,
|
|
32506
32506
|
isCacheStale,
|
|
@@ -32515,8 +32515,8 @@ var _internals52 = {
|
|
|
32515
32515
|
_clearGoModuleCache
|
|
32516
32516
|
};
|
|
32517
32517
|
async function buildImpactMap(cwd) {
|
|
32518
|
-
const impactMap = await
|
|
32519
|
-
await
|
|
32518
|
+
const impactMap = await _internals53.buildImpactMapInternal(cwd);
|
|
32519
|
+
await _internals53.saveImpactMap(cwd, impactMap);
|
|
32520
32520
|
return impactMap;
|
|
32521
32521
|
}
|
|
32522
32522
|
async function loadImpactMap(cwd, options) {
|
|
@@ -32530,7 +32530,7 @@ async function loadImpactMap(cwd, options) {
|
|
|
32530
32530
|
const hasValidValues = Object.values(map).every((v) => Array.isArray(v) && v.every((item) => typeof item === "string"));
|
|
32531
32531
|
if (hasValidValues) {
|
|
32532
32532
|
const generatedAt = new Date(data.generatedAt).getTime();
|
|
32533
|
-
if (!
|
|
32533
|
+
if (!_internals53.isCacheStale(map, generatedAt)) {
|
|
32534
32534
|
return map;
|
|
32535
32535
|
}
|
|
32536
32536
|
if (options?.skipRebuild) {
|
|
@@ -32550,13 +32550,13 @@ async function loadImpactMap(cwd, options) {
|
|
|
32550
32550
|
if (options?.skipRebuild) {
|
|
32551
32551
|
return {};
|
|
32552
32552
|
}
|
|
32553
|
-
return
|
|
32553
|
+
return _internals53.buildImpactMap(cwd);
|
|
32554
32554
|
}
|
|
32555
32555
|
async function saveImpactMap(cwd, impactMap) {
|
|
32556
32556
|
if (!path62.isAbsolute(cwd)) {
|
|
32557
32557
|
throw new Error(`saveImpactMap requires an absolute project root path, got: "${cwd}"`);
|
|
32558
32558
|
}
|
|
32559
|
-
|
|
32559
|
+
_internals53.validateProjectRoot(cwd);
|
|
32560
32560
|
const cacheDir2 = path62.join(cwd, ".swarm", "cache");
|
|
32561
32561
|
const cachePath = path62.join(cacheDir2, "impact-map.json");
|
|
32562
32562
|
if (!fs28.existsSync(cacheDir2)) {
|
|
@@ -32580,7 +32580,7 @@ async function analyzeImpact(changedFiles, cwd, budget) {
|
|
|
32580
32580
|
};
|
|
32581
32581
|
}
|
|
32582
32582
|
const validFiles = changedFiles.filter((f) => typeof f === "string" && f.length > 0 && !f.includes("\x00"));
|
|
32583
|
-
const impactMap = await
|
|
32583
|
+
const impactMap = await _internals53.loadImpactMap(cwd);
|
|
32584
32584
|
const impactedTestsSet = new Set;
|
|
32585
32585
|
const untestedFiles = [];
|
|
32586
32586
|
let visitedCount = 0;
|
|
@@ -32857,7 +32857,7 @@ function batchAppendTestRuns(records, workingDir) {
|
|
|
32857
32857
|
}
|
|
32858
32858
|
const historyPath = getHistoryPath(workingDir);
|
|
32859
32859
|
const historyDir = path63.dirname(historyPath);
|
|
32860
|
-
|
|
32860
|
+
_internals54.validateProjectRoot(workingDir);
|
|
32861
32861
|
if (!fs29.existsSync(historyDir)) {
|
|
32862
32862
|
fs29.mkdirSync(historyDir, { recursive: true });
|
|
32863
32863
|
}
|
|
@@ -32980,7 +32980,7 @@ function getAllHistory(workingDir) {
|
|
|
32980
32980
|
records.sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
|
|
32981
32981
|
return records;
|
|
32982
32982
|
}
|
|
32983
|
-
var
|
|
32983
|
+
var _internals54 = {
|
|
32984
32984
|
validateProjectRoot
|
|
32985
32985
|
};
|
|
32986
32986
|
|
|
@@ -34957,9 +34957,9 @@ function getVersionFileVersion(dir) {
|
|
|
34957
34957
|
async function runVersionCheck(dir, _timeoutMs) {
|
|
34958
34958
|
const startTime = Date.now();
|
|
34959
34959
|
try {
|
|
34960
|
-
const packageVersion =
|
|
34961
|
-
const changelogVersion =
|
|
34962
|
-
const versionFileVersion =
|
|
34960
|
+
const packageVersion = _internals55.getPackageVersion(dir);
|
|
34961
|
+
const changelogVersion = _internals55.getChangelogVersion(dir);
|
|
34962
|
+
const versionFileVersion = _internals55.getVersionFileVersion(dir);
|
|
34963
34963
|
const versions = [];
|
|
34964
34964
|
if (packageVersion)
|
|
34965
34965
|
versions.push(`package.json: ${packageVersion}`);
|
|
@@ -35323,7 +35323,7 @@ async function runPreflight(dir, phase, config) {
|
|
|
35323
35323
|
const reportId = `preflight-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
35324
35324
|
let validatedDir;
|
|
35325
35325
|
try {
|
|
35326
|
-
validatedDir =
|
|
35326
|
+
validatedDir = _internals55.validateDirectoryPath(dir);
|
|
35327
35327
|
} catch (error2) {
|
|
35328
35328
|
return {
|
|
35329
35329
|
id: reportId,
|
|
@@ -35343,7 +35343,7 @@ async function runPreflight(dir, phase, config) {
|
|
|
35343
35343
|
}
|
|
35344
35344
|
let validatedTimeout;
|
|
35345
35345
|
try {
|
|
35346
|
-
validatedTimeout =
|
|
35346
|
+
validatedTimeout = _internals55.validateTimeout(config?.checkTimeoutMs, DEFAULT_CONFIG.checkTimeoutMs);
|
|
35347
35347
|
} catch (error2) {
|
|
35348
35348
|
return {
|
|
35349
35349
|
id: reportId,
|
|
@@ -35384,12 +35384,12 @@ async function runPreflight(dir, phase, config) {
|
|
|
35384
35384
|
});
|
|
35385
35385
|
const checks = [];
|
|
35386
35386
|
log("[Preflight] Running lint check...");
|
|
35387
|
-
const lintResult = await
|
|
35387
|
+
const lintResult = await _internals55.runLintCheck(validatedDir, cfg.linter, cfg.checkTimeoutMs);
|
|
35388
35388
|
checks.push(lintResult);
|
|
35389
35389
|
log(`[Preflight] Lint check: ${lintResult.status} ${lintResult.message}`);
|
|
35390
35390
|
if (!cfg.skipTests) {
|
|
35391
35391
|
log("[Preflight] Running tests check...");
|
|
35392
|
-
const testsResult = await
|
|
35392
|
+
const testsResult = await _internals55.runTestsCheck(validatedDir, cfg.testScope, cfg.checkTimeoutMs);
|
|
35393
35393
|
checks.push(testsResult);
|
|
35394
35394
|
log(`[Preflight] Tests check: ${testsResult.status} ${testsResult.message}`);
|
|
35395
35395
|
} else {
|
|
@@ -35401,7 +35401,7 @@ async function runPreflight(dir, phase, config) {
|
|
|
35401
35401
|
}
|
|
35402
35402
|
if (!cfg.skipSecrets) {
|
|
35403
35403
|
log("[Preflight] Running secrets check...");
|
|
35404
|
-
const secretsResult = await
|
|
35404
|
+
const secretsResult = await _internals55.runSecretsCheck(validatedDir, cfg.checkTimeoutMs);
|
|
35405
35405
|
checks.push(secretsResult);
|
|
35406
35406
|
log(`[Preflight] Secrets check: ${secretsResult.status} ${secretsResult.message}`);
|
|
35407
35407
|
} else {
|
|
@@ -35413,7 +35413,7 @@ async function runPreflight(dir, phase, config) {
|
|
|
35413
35413
|
}
|
|
35414
35414
|
if (!cfg.skipEvidence) {
|
|
35415
35415
|
log("[Preflight] Running evidence check...");
|
|
35416
|
-
const evidenceResult = await
|
|
35416
|
+
const evidenceResult = await _internals55.runEvidenceCheck(validatedDir);
|
|
35417
35417
|
checks.push(evidenceResult);
|
|
35418
35418
|
log(`[Preflight] Evidence check: ${evidenceResult.status} ${evidenceResult.message}`);
|
|
35419
35419
|
} else {
|
|
@@ -35424,12 +35424,12 @@ async function runPreflight(dir, phase, config) {
|
|
|
35424
35424
|
});
|
|
35425
35425
|
}
|
|
35426
35426
|
log("[Preflight] Running requirement coverage check...");
|
|
35427
|
-
const reqCoverageResult = await
|
|
35427
|
+
const reqCoverageResult = await _internals55.runRequirementCoverageCheck(validatedDir, phase);
|
|
35428
35428
|
checks.push(reqCoverageResult);
|
|
35429
35429
|
log(`[Preflight] Requirement coverage check: ${reqCoverageResult.status} ${reqCoverageResult.message}`);
|
|
35430
35430
|
if (!cfg.skipVersion) {
|
|
35431
35431
|
log("[Preflight] Running version check...");
|
|
35432
|
-
const versionResult = await
|
|
35432
|
+
const versionResult = await _internals55.runVersionCheck(validatedDir, cfg.checkTimeoutMs);
|
|
35433
35433
|
checks.push(versionResult);
|
|
35434
35434
|
log(`[Preflight] Version check: ${versionResult.status} ${versionResult.message}`);
|
|
35435
35435
|
} else {
|
|
@@ -35492,10 +35492,10 @@ function formatPreflightMarkdown(report) {
|
|
|
35492
35492
|
async function handlePreflightCommand(directory, _args) {
|
|
35493
35493
|
const plan = await loadPlan(directory);
|
|
35494
35494
|
const phase = plan?.current_phase ?? 1;
|
|
35495
|
-
const report = await
|
|
35496
|
-
return
|
|
35495
|
+
const report = await _internals55.runPreflight(directory, phase);
|
|
35496
|
+
return _internals55.formatPreflightMarkdown(report);
|
|
35497
35497
|
}
|
|
35498
|
-
var
|
|
35498
|
+
var _internals55 = {
|
|
35499
35499
|
runPreflight,
|
|
35500
35500
|
formatPreflightMarkdown,
|
|
35501
35501
|
handlePreflightCommand,
|
|
@@ -36466,7 +36466,7 @@ function pruneOldResetBackups(backupsRoot, warnings) {
|
|
|
36466
36466
|
}
|
|
36467
36467
|
|
|
36468
36468
|
// src/commands/reset.ts
|
|
36469
|
-
var
|
|
36469
|
+
var _internals56 = {
|
|
36470
36470
|
backupSwarmStateBeforeReset
|
|
36471
36471
|
};
|
|
36472
36472
|
async function handleResetCommand(directory, args) {
|
|
@@ -36500,7 +36500,7 @@ async function handleResetCommand(directory, args) {
|
|
|
36500
36500
|
];
|
|
36501
36501
|
const results = [];
|
|
36502
36502
|
try {
|
|
36503
|
-
const backup =
|
|
36503
|
+
const backup = _internals56.backupSwarmStateBeforeReset(directory, "reset", [
|
|
36504
36504
|
...filesToReset,
|
|
36505
36505
|
"summaries"
|
|
36506
36506
|
]);
|
|
@@ -37122,7 +37122,7 @@ async function recordReplayEntry(artifactPath, sessionID, entry) {
|
|
|
37122
37122
|
}
|
|
37123
37123
|
|
|
37124
37124
|
// src/prm/index.ts
|
|
37125
|
-
var
|
|
37125
|
+
var _internals57 = {
|
|
37126
37126
|
getAgentSession,
|
|
37127
37127
|
readTrajectory,
|
|
37128
37128
|
getInMemoryTrajectory,
|
|
@@ -37145,12 +37145,12 @@ function resetPrmSessionState(session, sessionId) {
|
|
|
37145
37145
|
session.prmTrajectoryStep = 0;
|
|
37146
37146
|
session.replayArtifactPath = null;
|
|
37147
37147
|
if (sessionId) {
|
|
37148
|
-
|
|
37148
|
+
_internals57.clearTrajectoryCache(sessionId);
|
|
37149
37149
|
}
|
|
37150
37150
|
}
|
|
37151
37151
|
|
|
37152
37152
|
// src/commands/reset-session.ts
|
|
37153
|
-
var
|
|
37153
|
+
var _internals58 = {
|
|
37154
37154
|
cleanupOrphanedBranches,
|
|
37155
37155
|
backupSwarmStateBeforeReset
|
|
37156
37156
|
};
|
|
@@ -37162,7 +37162,7 @@ function errorMessage(err) {
|
|
|
37162
37162
|
async function handleResetSessionCommand(directory, _args) {
|
|
37163
37163
|
const results = [];
|
|
37164
37164
|
try {
|
|
37165
|
-
const backup =
|
|
37165
|
+
const backup = _internals58.backupSwarmStateBeforeReset(directory, "reset-session", ["session"]);
|
|
37166
37166
|
if (backup.backupDir && backup.copied.length > 0) {
|
|
37167
37167
|
const rel = path71.relative(directory, backup.backupDir);
|
|
37168
37168
|
results.push(`\uD83D\uDCE6 Backed up session state to ${rel}/ (restore by copying files back into .swarm/session/)`);
|
|
@@ -37229,7 +37229,7 @@ async function handleResetSessionCommand(directory, _args) {
|
|
|
37229
37229
|
results.push(`\u26A0\uFE0F Failed to remove .swarm-worktrees/: ${errorMessage(err)}`);
|
|
37230
37230
|
}
|
|
37231
37231
|
try {
|
|
37232
|
-
const branchResult = await
|
|
37232
|
+
const branchResult = await _internals58.cleanupOrphanedBranches(directory, []);
|
|
37233
37233
|
if (branchResult.removed.length > 0) {
|
|
37234
37234
|
results.push(`\u2705 Removed ${branchResult.removed.length} orphan swarm-lane branch(es)`);
|
|
37235
37235
|
}
|
|
@@ -37567,7 +37567,7 @@ async function handleRollbackCommand(directory, args) {
|
|
|
37567
37567
|
// src/commands/sdd.ts
|
|
37568
37568
|
import * as fs39 from "fs";
|
|
37569
37569
|
import * as path74 from "path";
|
|
37570
|
-
var
|
|
37570
|
+
var _internals59 = {
|
|
37571
37571
|
writeProjectedSpecSync
|
|
37572
37572
|
};
|
|
37573
37573
|
var SWARM_SPEC_REL = path74.join(".swarm", "spec.md");
|
|
@@ -37963,7 +37963,7 @@ ${USAGE10}`;
|
|
|
37963
37963
|
|
|
37964
37964
|
${USAGE10}`;
|
|
37965
37965
|
}
|
|
37966
|
-
const result2 =
|
|
37966
|
+
const result2 = _internals59.writeProjectedSpecSync(directory, {
|
|
37967
37967
|
source: "speckit",
|
|
37968
37968
|
feature: resolution.feature,
|
|
37969
37969
|
dryRun: parsed.dryRun,
|
|
@@ -38021,7 +38021,7 @@ ${formatList(result2.projection.warnings)}` : ""
|
|
|
38021
38021
|
].join(`
|
|
38022
38022
|
`);
|
|
38023
38023
|
}
|
|
38024
|
-
const result =
|
|
38024
|
+
const result = _internals59.writeProjectedSpecSync(directory, {
|
|
38025
38025
|
changeId: parsed.changeId,
|
|
38026
38026
|
dryRun: parsed.dryRun,
|
|
38027
38027
|
overwrite: parsed.overwrite
|
|
@@ -38408,7 +38408,7 @@ var DEFAULT_CONTEXT_BUDGET_CONFIG = {
|
|
|
38408
38408
|
};
|
|
38409
38409
|
|
|
38410
38410
|
// src/services/status-service.ts
|
|
38411
|
-
var
|
|
38411
|
+
var _internals60 = {
|
|
38412
38412
|
loadLeanTurboRunState,
|
|
38413
38413
|
hasActiveLeanTurbo,
|
|
38414
38414
|
hasActiveFullAuto,
|
|
@@ -38529,11 +38529,11 @@ async function getStatusData(directory, agents) {
|
|
|
38529
38529
|
} catch {
|
|
38530
38530
|
status.cohort = { linked: false };
|
|
38531
38531
|
}
|
|
38532
|
-
status.fullAutoActive =
|
|
38532
|
+
status.fullAutoActive = _internals60.hasActiveFullAuto();
|
|
38533
38533
|
if (status.fullAutoActive) {
|
|
38534
|
-
const sid =
|
|
38534
|
+
const sid = _internals60.getActiveFullAutoSessionID();
|
|
38535
38535
|
if (sid) {
|
|
38536
|
-
const runState =
|
|
38536
|
+
const runState = _internals60.loadFullAutoRunState(directory, sid);
|
|
38537
38537
|
if (runState?.lastEscalation) {
|
|
38538
38538
|
status.fullAutoEscalation = {
|
|
38539
38539
|
reason: runState.lastEscalation.reason,
|
|
@@ -38548,7 +38548,7 @@ async function getStatusData(directory, agents) {
|
|
|
38548
38548
|
}
|
|
38549
38549
|
function enrichWithLeanTurbo(status, directory) {
|
|
38550
38550
|
const turboMode = hasActiveTurboMode();
|
|
38551
|
-
const leanActive =
|
|
38551
|
+
const leanActive = _internals60.hasActiveLeanTurbo();
|
|
38552
38552
|
let turboStrategy = "off";
|
|
38553
38553
|
if (leanActive) {
|
|
38554
38554
|
turboStrategy = "lean";
|
|
@@ -38567,7 +38567,7 @@ function enrichWithLeanTurbo(status, directory) {
|
|
|
38567
38567
|
}
|
|
38568
38568
|
}
|
|
38569
38569
|
if (leanSessionID) {
|
|
38570
|
-
const runState =
|
|
38570
|
+
const runState = _internals60.loadLeanTurboRunState(directory, leanSessionID);
|
|
38571
38571
|
if (runState) {
|
|
38572
38572
|
status.leanTurboPhase = runState.phase;
|
|
38573
38573
|
status.leanMaxParallelCoders = runState.maxParallelCoders;
|
|
@@ -38774,7 +38774,7 @@ No active swarm plan found. Nothing to sync.`;
|
|
|
38774
38774
|
|
|
38775
38775
|
// src/commands/turbo.ts
|
|
38776
38776
|
init_logger();
|
|
38777
|
-
var
|
|
38777
|
+
var _internals61 = {
|
|
38778
38778
|
loadPluginConfigWithMeta
|
|
38779
38779
|
};
|
|
38780
38780
|
async function handleTurboCommand(directory, args, sessionID) {
|
|
@@ -38834,7 +38834,7 @@ async function handleTurboCommand(directory, args, sessionID) {
|
|
|
38834
38834
|
if (arg0 === "on") {
|
|
38835
38835
|
let strategy = "standard";
|
|
38836
38836
|
try {
|
|
38837
|
-
const { config } =
|
|
38837
|
+
const { config } = _internals61.loadPluginConfigWithMeta(directory);
|
|
38838
38838
|
if (config.turbo?.strategy === "lean") {
|
|
38839
38839
|
strategy = "lean";
|
|
38840
38840
|
}
|
|
@@ -38931,7 +38931,7 @@ function enableLeanTurbo(session, directory, sessionID) {
|
|
|
38931
38931
|
let maxParallelCoders = 4;
|
|
38932
38932
|
let conflictPolicy = "serialize";
|
|
38933
38933
|
try {
|
|
38934
|
-
const { config } =
|
|
38934
|
+
const { config } = _internals61.loadPluginConfigWithMeta(directory);
|
|
38935
38935
|
const leanConfig = config.turbo?.lean;
|
|
38936
38936
|
if (leanConfig) {
|
|
38937
38937
|
maxParallelCoders = leanConfig.max_parallel_coders ?? 4;
|
|
@@ -39136,7 +39136,7 @@ function findSimilarCommands(query) {
|
|
|
39136
39136
|
}
|
|
39137
39137
|
const scored = VALID_COMMANDS.map((cmd) => {
|
|
39138
39138
|
const cmdLower = cmd.toLowerCase();
|
|
39139
|
-
const fullScore =
|
|
39139
|
+
const fullScore = _internals62.levenshteinDistance(q, cmdLower);
|
|
39140
39140
|
let tokenScore = Infinity;
|
|
39141
39141
|
if (cmd.includes(" ") || cmd.includes("-")) {
|
|
39142
39142
|
const qTokens = q.split(/[\s-]+/);
|
|
@@ -39149,7 +39149,7 @@ function findSimilarCommands(query) {
|
|
|
39149
39149
|
for (const ct of cmdTokens) {
|
|
39150
39150
|
if (ct.length === 0)
|
|
39151
39151
|
continue;
|
|
39152
|
-
const dist =
|
|
39152
|
+
const dist = _internals62.levenshteinDistance(qt, ct);
|
|
39153
39153
|
if (dist < minDist)
|
|
39154
39154
|
minDist = dist;
|
|
39155
39155
|
}
|
|
@@ -39159,7 +39159,7 @@ function findSimilarCommands(query) {
|
|
|
39159
39159
|
}
|
|
39160
39160
|
const dashStrippedQ = q.replace(/-/g, "");
|
|
39161
39161
|
const dashStrippedCmd = cmdLower.replace(/-/g, "");
|
|
39162
|
-
const dashScore =
|
|
39162
|
+
const dashScore = _internals62.levenshteinDistance(dashStrippedQ, dashStrippedCmd);
|
|
39163
39163
|
const score = Math.min(fullScore, tokenScore, dashScore);
|
|
39164
39164
|
return { cmd, score };
|
|
39165
39165
|
});
|
|
@@ -39194,16 +39194,16 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
39194
39194
|
async function handleHelpCommand(ctx) {
|
|
39195
39195
|
const targetCommand = ctx.args.join(" ");
|
|
39196
39196
|
if (!targetCommand) {
|
|
39197
|
-
const { buildHelpText } = await import("./index-
|
|
39197
|
+
const { buildHelpText } = await import("./index-g9eg7z93.js");
|
|
39198
39198
|
return buildHelpText();
|
|
39199
39199
|
}
|
|
39200
39200
|
const tokens = targetCommand.split(/\s+/);
|
|
39201
|
-
const resolved =
|
|
39201
|
+
const resolved = _internals62.resolveCommand(tokens);
|
|
39202
39202
|
if (resolved) {
|
|
39203
|
-
return
|
|
39203
|
+
return _internals62.buildDetailedHelp(resolved.key, resolved.entry);
|
|
39204
39204
|
}
|
|
39205
|
-
const similar =
|
|
39206
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
39205
|
+
const similar = _internals62.findSimilarCommands(targetCommand);
|
|
39206
|
+
const { buildHelpText: fullHelp } = await import("./index-g9eg7z93.js");
|
|
39207
39207
|
if (similar.length > 0) {
|
|
39208
39208
|
return `Command '/swarm ${targetCommand}' not found.
|
|
39209
39209
|
|
|
@@ -39267,7 +39267,7 @@ var COMMAND_REGISTRY = {
|
|
|
39267
39267
|
toolNoArgs: true
|
|
39268
39268
|
},
|
|
39269
39269
|
help: {
|
|
39270
|
-
handler: (ctx) =>
|
|
39270
|
+
handler: (ctx) => _internals62.handleHelpCommand(ctx),
|
|
39271
39271
|
description: "Show help for swarm commands",
|
|
39272
39272
|
category: "core",
|
|
39273
39273
|
args: "[command]",
|
|
@@ -39336,7 +39336,7 @@ var COMMAND_REGISTRY = {
|
|
|
39336
39336
|
},
|
|
39337
39337
|
"guardrail explain": {
|
|
39338
39338
|
handler: async (ctx) => {
|
|
39339
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
39339
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-0vcaa7hj.js");
|
|
39340
39340
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
39341
39341
|
},
|
|
39342
39342
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -39346,7 +39346,7 @@ var COMMAND_REGISTRY = {
|
|
|
39346
39346
|
},
|
|
39347
39347
|
"guardrail-explain": {
|
|
39348
39348
|
handler: async (ctx) => {
|
|
39349
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
39349
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-0vcaa7hj.js");
|
|
39350
39350
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
39351
39351
|
},
|
|
39352
39352
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -40207,7 +40207,7 @@ function validateToolPolicy() {
|
|
|
40207
40207
|
}
|
|
40208
40208
|
return { valid: warnings.length === 0, warnings };
|
|
40209
40209
|
}
|
|
40210
|
-
var
|
|
40210
|
+
var _internals62 = {
|
|
40211
40211
|
handleHelpCommand,
|
|
40212
40212
|
validateAliases,
|
|
40213
40213
|
validateToolPolicy,
|
|
@@ -40217,16 +40217,16 @@ var _internals61 = {
|
|
|
40217
40217
|
findSimilarCommands,
|
|
40218
40218
|
buildDetailedHelp
|
|
40219
40219
|
};
|
|
40220
|
-
var validation =
|
|
40220
|
+
var validation = _internals62.validateAliases();
|
|
40221
40221
|
if (!validation.valid) {
|
|
40222
40222
|
throw new Error(`COMMAND_REGISTRY alias validation failed:
|
|
40223
40223
|
${validation.errors.join(`
|
|
40224
40224
|
`)}`);
|
|
40225
40225
|
}
|
|
40226
|
-
|
|
40226
|
+
_internals62.emitValidationWarnings("COMMAND_REGISTRY alias warnings", validation.warnings);
|
|
40227
40227
|
try {
|
|
40228
|
-
const toolPolicyValidation =
|
|
40229
|
-
|
|
40228
|
+
const toolPolicyValidation = _internals62.validateToolPolicy();
|
|
40229
|
+
_internals62.emitValidationWarnings("COMMAND_REGISTRY toolPolicy warnings", toolPolicyValidation.warnings);
|
|
40230
40230
|
} catch (e) {
|
|
40231
40231
|
warn(`COMMAND_REGISTRY toolPolicy validation failed (non-fatal): ${e.message}`);
|
|
40232
40232
|
}
|
|
@@ -40597,6 +40597,8 @@ DELEGATION ENVELOPE FIELDS \u2014 include these in every delegation for traceabi
|
|
|
40597
40597
|
|
|
40598
40598
|
Before delegating to {{AGENT_PREFIX}}reviewer: call check_gate_status for the current task_id and include the gate results in the GATES field of the reviewer message. Format: GATES: lint=PASS/FAIL, sast_scan=PASS/FAIL, secretscan=PASS/FAIL (use PASS/FAIL/skipped for each gate). If no gates have been run yet, use GATES: none.
|
|
40599
40599
|
|
|
40600
|
+
ACCEPTANCE FIELD RESOLUTION \u2014 before every {{AGENT_PREFIX}}coder (and {{AGENT_PREFIX}}reviewer) delegation, populate that delegation's ACCEPTANCE field like this: (1) read the current task's \`fr_refs\` from the plan; (2) if \`fr_refs\` is non-empty, look up EVERY listed FR-###/SC-### id in the current \`.swarm/spec.md\` and copy each one's full requirement text into ACCEPTANCE VERBATIM \u2014 byte-for-byte, no summarizing or paraphrasing, and concatenate all of them when a task maps to more than one; (3) if \`fr_refs\` is empty or absent, populate ACCEPTANCE with a task-derived one-line restatement of what DONE looks like instead (the same pattern as \`acceptanceCriteria\` above). ACCEPTANCE must never be empty \u2014 lacking a spec mapping is normal and is not a reason to omit it.
|
|
40601
|
+
|
|
40600
40602
|
<!-- BEHAVIORAL_GUIDANCE_START -->
|
|
40601
40603
|
PARTIAL GATE RATIONALIZATIONS \u2014 automated gates \u2260 agent review. Running SOME gates is NOT compliance:
|
|
40602
40604
|
\u2717 "I ran pre_check_batch so the code is verified" \u2192 pre_check_batch does NOT replace {{AGENT_PREFIX}}reviewer or {{AGENT_PREFIX}}test_engineer
|
|
@@ -40773,7 +40775,7 @@ FILE: src/auth/login.ts
|
|
|
40773
40775
|
INPUT: Validate email format, password >= 8 chars
|
|
40774
40776
|
OUTPUT: Modified file
|
|
40775
40777
|
CONSTRAINT: Do not modify other functions
|
|
40776
|
-
ACCEPTANCE:
|
|
40778
|
+
ACCEPTANCE: [copied verbatim from spec.md, or a task-derived DONE restatement \u2014 see ACCEPTANCE FIELD RESOLUTION]
|
|
40777
40779
|
SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
|
|
40778
40780
|
|
|
40779
40781
|
{{AGENT_PREFIX}}reviewer
|
|
@@ -40781,8 +40783,9 @@ TASK: Review login validation
|
|
|
40781
40783
|
FILE: src/auth/login.ts
|
|
40782
40784
|
CHECK: [security, correctness, edge-cases]
|
|
40783
40785
|
GATES: lint=PASS, sast_scan=PASS, secretscan=PASS
|
|
40786
|
+
ACCEPTANCE: [copied verbatim from spec.md, or a task-derived DONE restatement \u2014 see ACCEPTANCE FIELD RESOLUTION; same text as the coder delegation for this task]
|
|
40784
40787
|
SKILLS_USED_BY_CODER: file:.claude/skills/engineering-conventions/SKILL.md
|
|
40785
|
-
OUTPUT: VERDICT + RISK + ISSUES
|
|
40788
|
+
OUTPUT: VERDICT + RISK + ISSUES + ACCEPTANCE_SATISFACTION
|
|
40786
40789
|
SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
|
|
40787
40790
|
|
|
40788
40791
|
{{AGENT_PREFIX}}test_engineer
|
|
@@ -42307,7 +42310,7 @@ AUTOMATIC REJECTION: Any vaporware indicator triggers immediate rejection before
|
|
|
42307
42310
|
Emit event: 'reviewer_substance_check' with fields: { function_name: string, issue_type: string }
|
|
42308
42311
|
|
|
42309
42312
|
TIER 1: CORRECTNESS (mandatory, always run)
|
|
42310
|
-
Does the code do what the task acceptance criteria require? Check: every acceptance criterion has corresponding implementation. First-error focus: if you find a correctness issue, stop. Report it. Do not continue to style or optimization issues.
|
|
42313
|
+
Does the code do what the task acceptance criteria require? Check: every acceptance criterion has corresponding implementation. When your input includes an ACCEPTANCE field, that field \u2014 not your own impression of "looks correct" \u2014 is the authoritative acceptance criteria: verify the diff satisfies EVERY requirement stated in ACCEPTANCE (including verbatim FR/SC text when the task maps to one or more spec requirements), not merely that the diff is well-formed or plausible in isolation. A diff that is clean, idiomatic, and bug-free but does not satisfy an ACCEPTANCE requirement is a Tier 1 CORRECTNESS failure. First-error focus: if you find a correctness issue, stop. Report it. Do not continue to style or optimization issues.
|
|
42311
42314
|
|
|
42312
42315
|
TIER 2: SAFETY (mandatory for MODERATE+, always for COMPLEX)
|
|
42313
42316
|
Does the code introduce security vulnerabilities, data loss risks, or breaking changes? Check against: SAST findings, secret scan results, import analysis. Anti-rubber-stamp: "No issues found" requires evidence. State what you checked.
|
|
@@ -42345,9 +42348,12 @@ DIFF: [changed files/functions, or "infer from FILE" if omitted]
|
|
|
42345
42348
|
AFFECTS: [callers/consumers/dependents to inspect, or "infer from diff"]
|
|
42346
42349
|
CHECK: [list of dimensions to evaluate]
|
|
42347
42350
|
GATES: [pre-completed gate results (lint, SAST, secretscan, etc.), or "none" if unavailable]
|
|
42351
|
+
ACCEPTANCE: [verbatim FR/SC requirement text this diff must satisfy, copied byte-for-byte from spec.md when the task maps to one or more FR-###/SC-### items \u2014 never a paraphrase or summary. When the task maps to no spec requirement, this is a task-derived, one-line restatement of what DONE looks like instead. This field is never empty.]
|
|
42348
42352
|
SKILLS: [optional \u2014 either "none", repo-relative file: references (preferred), or inline skill content pasted by architect]
|
|
42349
42353
|
SKILLS_USED_BY_CODER: [list of skill paths that were passed to the coder for this task, or "none" if no skills were used]
|
|
42350
42354
|
|
|
42355
|
+
ACCEPTANCE HANDLING: ACCEPTANCE is the authoritative definition of "done" for this task \u2014 evaluate the diff against it explicitly and directly, not only against your own general impression of code quality or correctness in isolation. Before writing your verdict, check EACH item in ACCEPTANCE against the diff and be prepared to state whether it is met. If the diff fails to satisfy any item in ACCEPTANCE, that is a Tier 1 CORRECTNESS failure \u2014 REJECT even if the code otherwise looks clean and well-written, and cite the specific unmet ACCEPTANCE item(s) in your FIXES.
|
|
42356
|
+
|
|
42351
42357
|
SKILLS HANDLING: If SKILLS is present and not "none", read the skill names/descriptions first, then load every referenced skill that applies before beginning your review. If uncertain whether a skill applies, load it.
|
|
42352
42358
|
- A file entry may include a short description after the path; use the description to decide whether the full skill body is relevant.
|
|
42353
42359
|
- For \`file:\` entries, use the search tool to read the referenced \`SKILL.md\` file with \`include\` set to that exact repo-relative path, \`mode: regex\`, \`query: .*\`, \`max_results: 1000\`, and \`max_lines: 1000\`.
|
|
@@ -42373,6 +42379,7 @@ VERDICT: APPROVED | REJECTED
|
|
|
42373
42379
|
REUSE_RE_VERIFICATION: [VERIFIED | DUPLICATION_DETECTED | SKIPPED] \u2014 DUPLICATION_DETECTED is only valid when VERDICT is REJECTED
|
|
42374
42380
|
RISK: LOW | MEDIUM | HIGH | CRITICAL
|
|
42375
42381
|
ISSUES: list with line numbers, grouped by CHECK dimension
|
|
42382
|
+
ACCEPTANCE_SATISFACTION: SATISFIED | PARTIAL | NOT_SATISFIED \u2014 one line per item in the input ACCEPTANCE field, stating explicitly whether the diff satisfies it (with evidence: file:line or "no corresponding implementation found"). This is a distinct question from "does the diff look correct" \u2014 assess conformance to ACCEPTANCE even when the diff is otherwise well-written. NOT_SATISFIED on any item forces VERDICT: REJECTED.
|
|
42376
42383
|
TASK: [task id being reviewed, or "unknown"]
|
|
42377
42384
|
SKILL_COMPLIANCE: COMPLIANT | PARTIAL | VIOLATED \u2014 [list of violations or "all rules followed"]
|
|
42378
42385
|
DIRECTIVE_COMPLIANCE: one line per knowledge directive shown during this phase (IDs listed in the DIRECTIVES TO VERIFY block of your prompt, when present). Use exactly one of:
|
|
@@ -42939,7 +42946,7 @@ function formatCommandNotFound(tokens) {
|
|
|
42939
42946
|
const attemptedCommand = tokens[0] || "";
|
|
42940
42947
|
const MAX_DISPLAY = 100;
|
|
42941
42948
|
const displayCommand = attemptedCommand.length > MAX_DISPLAY ? `${attemptedCommand.slice(0, MAX_DISPLAY)}...` : attemptedCommand;
|
|
42942
|
-
const similar =
|
|
42949
|
+
const similar = _internals62.findSimilarCommands(attemptedCommand);
|
|
42943
42950
|
const header = `Command \`/swarm ${displayCommand}\` not found.`;
|
|
42944
42951
|
const suggestions = similar.length > 0 ? `Did you mean:
|
|
42945
42952
|
${similar.map((cmd) => ` - /swarm ${cmd}`).join(`
|
|
@@ -44899,10 +44906,10 @@ function startAgentSession(sessionId, agentName, staleDurationMs = STALE_SESSION
|
|
|
44899
44906
|
}
|
|
44900
44907
|
telemetry.sessionStarted(sessionId, agentName);
|
|
44901
44908
|
swarmState.activeAgent.set(sessionId, agentName);
|
|
44902
|
-
|
|
44909
|
+
_internals65.applyRehydrationCache(sessionState);
|
|
44903
44910
|
if (directory) {
|
|
44904
44911
|
let rehydrationPromise;
|
|
44905
|
-
rehydrationPromise =
|
|
44912
|
+
rehydrationPromise = _internals65.rehydrateSessionFromDisk(directory, sessionState).then(async () => {
|
|
44906
44913
|
try {
|
|
44907
44914
|
sessionState.prSubscriptions = await rehydratePrSubscriptions(sessionId, directory);
|
|
44908
44915
|
} catch (err) {
|
|
@@ -45083,7 +45090,7 @@ function ensureAgentSession(sessionId, agentName, directory) {
|
|
|
45083
45090
|
maybeSweepStaleSessions();
|
|
45084
45091
|
return session;
|
|
45085
45092
|
}
|
|
45086
|
-
|
|
45093
|
+
_internals65.startAgentSession(sessionId, agentName ?? "unknown", 7200000, directory);
|
|
45087
45094
|
session = swarmState.agentSessions.get(sessionId);
|
|
45088
45095
|
if (!session) {
|
|
45089
45096
|
throw new Error(`Failed to create guardrail session for ${sessionId}`);
|
|
@@ -45371,8 +45378,8 @@ function applyRehydrationCache(session) {
|
|
|
45371
45378
|
}
|
|
45372
45379
|
}
|
|
45373
45380
|
async function rehydrateSessionFromDisk(directory, session) {
|
|
45374
|
-
await
|
|
45375
|
-
|
|
45381
|
+
await _internals65.buildRehydrationCache(directory);
|
|
45382
|
+
_internals65.applyRehydrationCache(session);
|
|
45376
45383
|
}
|
|
45377
45384
|
function hasActiveTurboMode(sessionID) {
|
|
45378
45385
|
if (sessionID) {
|
|
@@ -45460,7 +45467,7 @@ async function rehydratePrSubscriptions(sessionID, directory) {
|
|
|
45460
45467
|
}
|
|
45461
45468
|
return map;
|
|
45462
45469
|
}
|
|
45463
|
-
var
|
|
45470
|
+
var _internals65 = {
|
|
45464
45471
|
swarmState,
|
|
45465
45472
|
resetSwarmState,
|
|
45466
45473
|
ensureAgentSession,
|
|
@@ -45599,4 +45606,4 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
|
|
|
45599
45606
|
};
|
|
45600
45607
|
}
|
|
45601
45608
|
|
|
45602
|
-
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,
|
|
45609
|
+
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 };
|