opencode-swarm 7.125.2 → 7.125.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/{config-doctor-8df6hk58.js → config-doctor-rm1m07gz.js} +2 -2
- package/dist/cli/{core-d38hc85b.js → core-v1kp7anb.js} +2 -2
- package/dist/cli/{curation-policy-7pvghg6f.js → curation-policy-7pgdjt5w.js} +2 -2
- package/dist/cli/{curator-dw2zb74h.js → curator-arwm18td.js} +16 -16
- package/dist/cli/{curator-drift-h9a2sjvf.js → curator-drift-24bdacdc.js} +2 -2
- package/dist/cli/{curator-llm-factory-bntt6v8j.js → curator-llm-factory-yq5vf298.js} +16 -16
- package/dist/cli/{evidence-summary-service-v4h2w487.js → evidence-summary-service-thx1c3me.js} +3 -3
- package/dist/cli/{guardrail-explain-vmr4db9n.js → guardrail-explain-mscq3veq.js} +17 -17
- package/dist/cli/{guardrail-log-8prd6cnc.js → guardrail-log-6a2zxvtx.js} +3 -3
- package/dist/cli/{hive-promoter-xymt9vf2.js → hive-promoter-q79naynh.js} +16 -16
- package/dist/cli/{index-ptmhxsaf.js → index-01n43w2p.js} +4 -4
- package/dist/cli/{index-qcrah1jk.js → index-414r47r7.js} +3 -3
- package/dist/cli/{index-pgya7cnn.js → index-45mvd5q7.js} +4 -4
- package/dist/cli/index-4rhhvd1a.js +62 -0
- package/dist/cli/{index-1s7jzcsy.js → index-4ycq2mrp.js} +1 -1
- package/dist/cli/{index-yrk6hfp1.js → index-7p6jkkat.js} +18 -18
- package/dist/cli/{index-39p1yyag.js → index-8tjbq2ej.js} +1 -1
- package/dist/cli/{index-s9mj4rb9.js → index-9ss2m4rs.js} +1 -1
- package/dist/cli/{index-j8ptbcxz.js → index-ambnwnmt.js} +15 -6
- package/dist/cli/{index-zbsxek49.js → index-emzes7sj.js} +3 -3
- package/dist/cli/{index-tdpct4cz.js → index-fm4zfxnr.js} +1 -1
- package/dist/cli/{index-v2rdhwx8.js → index-g4ef4v3m.js} +1 -1
- package/dist/cli/{index-fs02c7tz.js → index-kk1scggc.js} +1 -1
- package/dist/cli/{index-8ed9rz7y.js → index-m5e00g9s.js} +44 -42
- package/dist/cli/{index-92xyawa7.js → index-pk099nqv.js} +87 -6
- package/dist/cli/{index-7ne6q2a0.js → index-rp5msv7n.js} +1 -1
- package/dist/cli/{index-7mtvvt8p.js → index-sa3dgpmc.js} +2 -2
- package/dist/cli/{index-v3f7jvm8.js → index-vdfewvn5.js} +5 -5
- package/dist/cli/{index-em4h33my.js → index-x8entmky.js} +2 -2
- package/dist/cli/{index-sxdh19nk.js → index-xezv6tdw.js} +1 -1
- package/dist/cli/index.js +16 -16
- package/dist/cli/{knowledge-escalator-47hfstmk.js → knowledge-escalator-gr8qd7kz.js} +3 -3
- package/dist/cli/{knowledge-events-j5dpp72w.js → knowledge-events-q83g3f8z.js} +1 -1
- package/dist/cli/{knowledge-store-58gt7m85.js → knowledge-store-qq3w5yt8.js} +1 -1
- package/dist/cli/{knowledge-validator-jjxw5mwc.js → knowledge-validator-7jhq8yam.js} +4 -4
- package/dist/cli/{scan-cursor-h8we8dfv.js → scan-cursor-fa5sy36q.js} +2 -2
- package/dist/cli/{schema-xpqbhcyp.js → schema-bw68my66.js} +3 -1
- package/dist/cli/{skill-generator-k8d0vff0.js → skill-generator-ffc1agyw.js} +6 -6
- package/dist/config/loader.d.ts +14 -0
- package/dist/config/schema.d.ts +6 -0
- package/dist/index.js +6 -6
- package/dist/services/config-doctor.d.ts +14 -2
- package/dist/services/warning-buffer.d.ts +24 -5
- package/package.json +1 -1
- package/dist/cli/index-gacm5s2n.js +0 -34
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
loadPluginConfigWithMeta,
|
|
7
7
|
loadPluginConfigWithMetaAsync,
|
|
8
8
|
resolveWorktreeIsolationConfig
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-ambnwnmt.js";
|
|
10
10
|
import {
|
|
11
11
|
ApprovalEvidenceSchema,
|
|
12
12
|
BaseEvidenceSchema,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
WorktreeIsolationConfigSchema,
|
|
59
59
|
isQAAgent,
|
|
60
60
|
isSubagent
|
|
61
|
-
} from "./index-
|
|
61
|
+
} from "./index-414r47r7.js";
|
|
62
62
|
import"./index-bk5tah7q.js";
|
|
63
63
|
import {
|
|
64
64
|
MigrationStatusSchema,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
TaskSizeSchema,
|
|
70
70
|
TaskStatusSchema
|
|
71
71
|
} from "./index-1kz6da87.js";
|
|
72
|
-
import"./index-
|
|
72
|
+
import"./index-4rhhvd1a.js";
|
|
73
73
|
import"./index-zjygnfay.js";
|
|
74
74
|
import"./index-zgwm4ryv.js";
|
|
75
75
|
import"./index-bpmtbmy9.js";
|
|
@@ -608,7 +608,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
608
608
|
deltas.push({ id, delta });
|
|
609
609
|
}
|
|
610
610
|
if (deltas.length > 0) {
|
|
611
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
611
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-qq3w5yt8.js");
|
|
612
612
|
await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
613
613
|
}
|
|
614
614
|
return {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
readDoctorArtifact,
|
|
5
5
|
removeStraySwarmDir,
|
|
6
6
|
runConfigDoctor
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-pk099nqv.js";
|
|
8
8
|
import {
|
|
9
9
|
EvaluationTaskV1Schema,
|
|
10
10
|
GateAuditManifestV1Schema,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
saveTaskSetSnapshot,
|
|
62
62
|
transientBackoff,
|
|
63
63
|
validateProjectRoot
|
|
64
|
-
} from "./index-
|
|
64
|
+
} from "./index-kk1scggc.js";
|
|
65
65
|
import {
|
|
66
66
|
withTimeout
|
|
67
67
|
} from "./index-4905hd2m.js";
|
|
@@ -94,15 +94,15 @@ import {
|
|
|
94
94
|
retireSkill,
|
|
95
95
|
selectCandidateEntries,
|
|
96
96
|
syncBundledProjectSkillsIfMissingAsync
|
|
97
|
-
} from "./index-
|
|
97
|
+
} from "./index-01n43w2p.js";
|
|
98
98
|
import {
|
|
99
99
|
readRecentEscalations
|
|
100
|
-
} from "./index-
|
|
100
|
+
} from "./index-vdfewvn5.js";
|
|
101
101
|
import {
|
|
102
102
|
alreadyCuratedThisGeneration,
|
|
103
103
|
claimNextScanBatch,
|
|
104
104
|
resolveCohortId
|
|
105
|
-
} from "./index-
|
|
105
|
+
} from "./index-8tjbq2ej.js";
|
|
106
106
|
import {
|
|
107
107
|
CURATOR_INIT_PROMPT,
|
|
108
108
|
CURATOR_PHASE_PROMPT,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
resolveSpeckitProjection,
|
|
120
120
|
validateSpeckit,
|
|
121
121
|
writeProjectedSpecSync
|
|
122
|
-
} from "./index-
|
|
122
|
+
} from "./index-9ss2m4rs.js";
|
|
123
123
|
import {
|
|
124
124
|
buildCorrelationId,
|
|
125
125
|
listActive,
|
|
@@ -135,11 +135,11 @@ import {
|
|
|
135
135
|
validateActionability,
|
|
136
136
|
validateActionableFields,
|
|
137
137
|
validateLesson
|
|
138
|
-
} from "./index-
|
|
138
|
+
} from "./index-sa3dgpmc.js";
|
|
139
139
|
import {
|
|
140
140
|
authorizeCuration,
|
|
141
141
|
buildConfigFingerprintInput
|
|
142
|
-
} from "./index-
|
|
142
|
+
} from "./index-rp5msv7n.js";
|
|
143
143
|
import {
|
|
144
144
|
cohortConfigFingerprint
|
|
145
145
|
} from "./index-rtry5xyf.js";
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
transactFile,
|
|
170
170
|
transactKnowledge,
|
|
171
171
|
wordBigrams
|
|
172
|
-
} from "./index-
|
|
172
|
+
} from "./index-45mvd5q7.js";
|
|
173
173
|
import {
|
|
174
174
|
MAX_EVENT_LOG_ENTRIES,
|
|
175
175
|
_internals,
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
recordHiveKnowledgeEvent,
|
|
180
180
|
recordKnowledgeEvent,
|
|
181
181
|
resolveKnowledgeEventsPath
|
|
182
|
-
} from "./index-
|
|
182
|
+
} from "./index-fm4zfxnr.js";
|
|
183
183
|
import {
|
|
184
184
|
resolveHiveDataDir,
|
|
185
185
|
resolveHiveEventsPath,
|
|
@@ -201,7 +201,7 @@ import {
|
|
|
201
201
|
init_loader,
|
|
202
202
|
loadPluginConfig,
|
|
203
203
|
loadPluginConfigWithMeta
|
|
204
|
-
} from "./index-
|
|
204
|
+
} from "./index-ambnwnmt.js";
|
|
205
205
|
import {
|
|
206
206
|
RetrospectiveEvidenceSchema
|
|
207
207
|
} from "./index-k5jrywpr.js";
|
|
@@ -220,7 +220,7 @@ import {
|
|
|
220
220
|
init_schema,
|
|
221
221
|
init_tool_metadata,
|
|
222
222
|
stripKnownSwarmPrefix
|
|
223
|
-
} from "./index-
|
|
223
|
+
} from "./index-414r47r7.js";
|
|
224
224
|
import {
|
|
225
225
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
226
226
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -250,7 +250,7 @@ import {
|
|
|
250
250
|
advisoryWarn,
|
|
251
251
|
getDeferredWarnings,
|
|
252
252
|
init_warning_buffer
|
|
253
|
-
} from "./index-
|
|
253
|
+
} from "./index-4rhhvd1a.js";
|
|
254
254
|
import {
|
|
255
255
|
readSwarmFileAsync,
|
|
256
256
|
safeHook,
|
|
@@ -10815,7 +10815,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
10815
10815
|
}
|
|
10816
10816
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
10817
10817
|
try {
|
|
10818
|
-
const skillModule = await import("./skill-generator-
|
|
10818
|
+
const skillModule = await import("./skill-generator-ffc1agyw.js");
|
|
10819
10819
|
for (const cand of skillCandidates) {
|
|
10820
10820
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
10821
10821
|
continue;
|
|
@@ -11152,7 +11152,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
11152
11152
|
} catch {}
|
|
11153
11153
|
}
|
|
11154
11154
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
11155
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
11155
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-gr8qd7kz.js");
|
|
11156
11156
|
for (const { id } of contradictedEntries) {
|
|
11157
11157
|
try {
|
|
11158
11158
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -11951,7 +11951,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
11951
11951
|
warnings.push("Failed to collect knowledge summary.");
|
|
11952
11952
|
}
|
|
11953
11953
|
try {
|
|
11954
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
11954
|
+
const { getScanStatus } = await import("./scan-cursor-fa5sy36q.js");
|
|
11955
11955
|
const scanStatus = await getScanStatus(directory);
|
|
11956
11956
|
if (scanStatus.remaining_estimate > 0) {
|
|
11957
11957
|
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.`);
|
|
@@ -12123,9 +12123,9 @@ var _internals15 = {
|
|
|
12123
12123
|
verifyPostMortemKnowledgeActions,
|
|
12124
12124
|
repairPostMortemActions,
|
|
12125
12125
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
12126
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
12126
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-bw68my66.js");
|
|
12127
12127
|
try {
|
|
12128
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
12128
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-emzes7sj.js");
|
|
12129
12129
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
12130
12130
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
12131
12131
|
} catch {
|
|
@@ -12133,11 +12133,11 @@ var _internals15 = {
|
|
|
12133
12133
|
}
|
|
12134
12134
|
},
|
|
12135
12135
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
12136
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
12136
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-arwm18td.js");
|
|
12137
12137
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
12138
12138
|
},
|
|
12139
12139
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
12140
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
12140
|
+
const { checkHivePromotions } = await import("./hive-promoter-q79naynh.js");
|
|
12141
12141
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
12142
12142
|
},
|
|
12143
12143
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -12146,7 +12146,7 @@ var _internals15 = {
|
|
|
12146
12146
|
activateProposal,
|
|
12147
12147
|
listSkills: listSkills2,
|
|
12148
12148
|
sanitizeSlug
|
|
12149
|
-
} = await import("./skill-generator-
|
|
12149
|
+
} = await import("./skill-generator-ffc1agyw.js");
|
|
12150
12150
|
const result = {
|
|
12151
12151
|
approved: [],
|
|
12152
12152
|
rejected: [],
|
|
@@ -12188,7 +12188,7 @@ var _internals15 = {
|
|
|
12188
12188
|
return result;
|
|
12189
12189
|
},
|
|
12190
12190
|
readPriorDriftReports: async (directory) => {
|
|
12191
|
-
const { readPriorDriftReports } = await import("./curator-drift-
|
|
12191
|
+
const { readPriorDriftReports } = await import("./curator-drift-24bdacdc.js");
|
|
12192
12192
|
return readPriorDriftReports(directory);
|
|
12193
12193
|
},
|
|
12194
12194
|
readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
|
|
@@ -14671,9 +14671,9 @@ function hashContent(content) {
|
|
|
14671
14671
|
return createHash7("sha1").update(content).digest("hex");
|
|
14672
14672
|
}
|
|
14673
14673
|
async function loadConfigForPolicyCurator(directory) {
|
|
14674
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
14674
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-bw68my66.js");
|
|
14675
14675
|
try {
|
|
14676
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
14676
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-emzes7sj.js");
|
|
14677
14677
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
14678
14678
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
14679
14679
|
} catch {
|
|
@@ -17834,7 +17834,7 @@ async function runFinalizeStage(ctx) {
|
|
|
17834
17834
|
}
|
|
17835
17835
|
}
|
|
17836
17836
|
try {
|
|
17837
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
17837
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-bw68my66.js");
|
|
17838
17838
|
const { config: pmLoadedConfig } = _internals24.loadPluginConfigWithMeta(ctx.directory);
|
|
17839
17839
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
17840
17840
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -20003,9 +20003,9 @@ var _internals28 = {
|
|
|
20003
20003
|
readSwarmFileAsync,
|
|
20004
20004
|
loadCuratorDeps: async () => {
|
|
20005
20005
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
20006
|
-
import("./schema-
|
|
20007
|
-
import("./curator-
|
|
20008
|
-
import("./curator-llm-factory-
|
|
20006
|
+
import("./schema-bw68my66.js"),
|
|
20007
|
+
import("./curator-arwm18td.js"),
|
|
20008
|
+
import("./curator-llm-factory-yq5vf298.js")
|
|
20009
20009
|
]);
|
|
20010
20010
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
20011
20011
|
}
|
|
@@ -20504,7 +20504,7 @@ import { fileURLToPath } from "url";
|
|
|
20504
20504
|
// package.json
|
|
20505
20505
|
var package_default = {
|
|
20506
20506
|
name: "opencode-swarm",
|
|
20507
|
-
version: "7.125.
|
|
20507
|
+
version: "7.125.3",
|
|
20508
20508
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
20509
20509
|
main: "dist/index.js",
|
|
20510
20510
|
types: "dist/index.d.ts",
|
|
@@ -21025,7 +21025,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
21025
21025
|
let scanCompleted = false;
|
|
21026
21026
|
let scanRemaining = 0;
|
|
21027
21027
|
try {
|
|
21028
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
21028
|
+
const { getScanStatus } = await import("./scan-cursor-fa5sy36q.js");
|
|
21029
21029
|
const status = await getScanStatus(directory);
|
|
21030
21030
|
scanGeneration = status.generation;
|
|
21031
21031
|
scanCompleted = status.completed;
|
|
@@ -21035,17 +21035,17 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
21035
21035
|
try {
|
|
21036
21036
|
const { isLinked: isLinked2 } = await import("./knowledge-link-4yd2z8ev.js");
|
|
21037
21037
|
if (isLinked2(directory)) {
|
|
21038
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
21038
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-bw68my66.js");
|
|
21039
21039
|
let config;
|
|
21040
21040
|
try {
|
|
21041
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
21041
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-emzes7sj.js");
|
|
21042
21042
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
21043
21043
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
21044
21044
|
} catch {
|
|
21045
21045
|
config = KnowledgeConfigSchema2.parse({});
|
|
21046
21046
|
}
|
|
21047
21047
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
21048
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
21048
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-7pgdjt5w.js");
|
|
21049
21049
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
21050
21050
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
21051
21051
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -21985,7 +21985,7 @@ async function getDiagnoseData(directory) {
|
|
|
21985
21985
|
checks.push({
|
|
21986
21986
|
name: "Deferred Warnings",
|
|
21987
21987
|
status: "\u26A0\uFE0F",
|
|
21988
|
-
detail: `${getDeferredWarnings().length} warning(s) deferred from init (
|
|
21988
|
+
detail: `${getDeferredWarnings().length} warning(s) deferred from init \u2014 see the Deferred Warnings section below (or set OPENCODE_SWARM_DEBUG=1 for full detail)`
|
|
21989
21989
|
});
|
|
21990
21990
|
}
|
|
21991
21991
|
const cachePaths = getPluginCachePaths();
|
|
@@ -22233,8 +22233,10 @@ async function handleDoctorCommand(directory, args) {
|
|
|
22233
22233
|
const result = runConfigDoctor(config, directory);
|
|
22234
22234
|
let output;
|
|
22235
22235
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
22236
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
22237
|
-
const fixResult = await runConfigDoctorWithFixes(directory, config, true
|
|
22236
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-rm1m07gz.js");
|
|
22237
|
+
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
22238
|
+
applyLossy: true
|
|
22239
|
+
});
|
|
22238
22240
|
output = formatDoctorMarkdown(fixResult.result);
|
|
22239
22241
|
} else {
|
|
22240
22242
|
const lastRun = readDoctorArtifact(directory);
|
|
@@ -23046,7 +23048,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
23046
23048
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
23047
23049
|
}
|
|
23048
23050
|
async function handleEvidenceSummaryCommand(directory) {
|
|
23049
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
23051
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-thx1c3me.js");
|
|
23050
23052
|
const artifact = await buildEvidenceSummary(directory);
|
|
23051
23053
|
if (!artifact) {
|
|
23052
23054
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -41008,7 +41010,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
41008
41010
|
async function handleHelpCommand(ctx) {
|
|
41009
41011
|
const targetCommand = ctx.args.join(" ");
|
|
41010
41012
|
if (!targetCommand) {
|
|
41011
|
-
const { buildHelpText } = await import("./index-
|
|
41013
|
+
const { buildHelpText } = await import("./index-7p6jkkat.js");
|
|
41012
41014
|
return buildHelpText();
|
|
41013
41015
|
}
|
|
41014
41016
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -41017,7 +41019,7 @@ async function handleHelpCommand(ctx) {
|
|
|
41017
41019
|
return _internals62.buildDetailedHelp(resolved.key, resolved.entry);
|
|
41018
41020
|
}
|
|
41019
41021
|
const similar = _internals62.findSimilarCommands(targetCommand);
|
|
41020
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
41022
|
+
const { buildHelpText: fullHelp } = await import("./index-7p6jkkat.js");
|
|
41021
41023
|
if (similar.length > 0) {
|
|
41022
41024
|
return `Command '/swarm ${targetCommand}' not found.
|
|
41023
41025
|
|
|
@@ -41156,7 +41158,7 @@ var COMMAND_REGISTRY = {
|
|
|
41156
41158
|
},
|
|
41157
41159
|
"guardrail explain": {
|
|
41158
41160
|
handler: async (ctx) => {
|
|
41159
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
41161
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-mscq3veq.js");
|
|
41160
41162
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
41161
41163
|
},
|
|
41162
41164
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -41166,7 +41168,7 @@ var COMMAND_REGISTRY = {
|
|
|
41166
41168
|
},
|
|
41167
41169
|
"guardrail-explain": {
|
|
41168
41170
|
handler: async (ctx) => {
|
|
41169
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
41171
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-mscq3veq.js");
|
|
41170
41172
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
41171
41173
|
},
|
|
41172
41174
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -41176,7 +41178,7 @@ var COMMAND_REGISTRY = {
|
|
|
41176
41178
|
},
|
|
41177
41179
|
"guardrail-log": {
|
|
41178
41180
|
handler: async (ctx) => {
|
|
41179
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
41181
|
+
const { handleGuardrailLog } = await import("./guardrail-log-6a2zxvtx.js");
|
|
41180
41182
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
41181
41183
|
},
|
|
41182
41184
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ALL_AGENT_NAMES,
|
|
4
|
+
FALLBACK_MODELS_MAX,
|
|
4
5
|
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
5
6
|
GateConfigSchema,
|
|
6
7
|
PluginConfigSchema,
|
|
7
8
|
init_constants,
|
|
8
9
|
init_schema,
|
|
9
10
|
stripKnownSwarmPrefix
|
|
10
|
-
} from "./index-
|
|
11
|
+
} from "./index-414r47r7.js";
|
|
11
12
|
import {
|
|
12
13
|
log
|
|
13
14
|
} from "./index-zgwm4ryv.js";
|
|
@@ -205,6 +206,83 @@ function collectRawStrictSectionFindings(directory) {
|
|
|
205
206
|
}
|
|
206
207
|
return findings;
|
|
207
208
|
}
|
|
209
|
+
function getRawValueAtPath(raw, issuePath) {
|
|
210
|
+
let node = raw;
|
|
211
|
+
for (const seg of issuePath) {
|
|
212
|
+
if (node === null || typeof node !== "object")
|
|
213
|
+
return;
|
|
214
|
+
node = node[seg];
|
|
215
|
+
}
|
|
216
|
+
return node;
|
|
217
|
+
}
|
|
218
|
+
function collectRawValueConstraintFindings(directory) {
|
|
219
|
+
const findings = [];
|
|
220
|
+
const { userConfigPath, projectConfigPath } = getConfigPaths(directory);
|
|
221
|
+
const applyTargetPath = fs.existsSync(projectConfigPath) ? projectConfigPath : userConfigPath;
|
|
222
|
+
const seen = new Set;
|
|
223
|
+
const filesInApplyOrder = applyTargetPath === projectConfigPath ? [projectConfigPath, userConfigPath] : [userConfigPath, projectConfigPath];
|
|
224
|
+
for (const configPath of filesInApplyOrder) {
|
|
225
|
+
if (!fs.existsSync(configPath))
|
|
226
|
+
continue;
|
|
227
|
+
try {
|
|
228
|
+
const stats = fs.statSync(configPath);
|
|
229
|
+
if (stats.size > CONFIG_DOCTOR_MAX_CONFIG_FILE_BYTES)
|
|
230
|
+
continue;
|
|
231
|
+
const raw = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
232
|
+
if (!isPlainObject(raw))
|
|
233
|
+
continue;
|
|
234
|
+
const parsed = PluginConfigSchema.safeParse(raw);
|
|
235
|
+
if (parsed.success)
|
|
236
|
+
continue;
|
|
237
|
+
for (const issue of parsed.error.issues) {
|
|
238
|
+
if (issue.code === "unrecognized_keys")
|
|
239
|
+
continue;
|
|
240
|
+
if (issue.path[0] === "gates")
|
|
241
|
+
continue;
|
|
242
|
+
const dotted = issue.path.map(String).join(".");
|
|
243
|
+
const dedupeKey = `${dotted}|${issue.code}`;
|
|
244
|
+
if (seen.has(dedupeKey))
|
|
245
|
+
continue;
|
|
246
|
+
seen.add(dedupeKey);
|
|
247
|
+
const current = getRawValueAtPath(raw, issue.path);
|
|
248
|
+
if (issue.code === "too_big" && dotted.endsWith("fallback_models") && Array.isArray(current) && current.length > FALLBACK_MODELS_MAX) {
|
|
249
|
+
const trimmed = current.slice(0, FALLBACK_MODELS_MAX);
|
|
250
|
+
const dropped = current.slice(FALLBACK_MODELS_MAX).map(String);
|
|
251
|
+
const inApplyTarget = configPath === applyTargetPath;
|
|
252
|
+
const drop = `${dropped.length} entr${dropped.length === 1 ? "y" : "ies"}`;
|
|
253
|
+
findings.push({
|
|
254
|
+
id: "fallback-models-too-many",
|
|
255
|
+
title: "Too many fallback models",
|
|
256
|
+
description: `"${dotted}" in ${configPath} lists ${current.length} models; the maximum is ${FALLBACK_MODELS_MAX}. ` + `A config that fails validation is discarded in favor of safe defaults. ` + (inApplyTarget ? `Run /swarm config doctor --fix to trim to the first ${FALLBACK_MODELS_MAX} (drops ${drop}: ${dropped.join(", ")}), or edit the file yourself.` : `Remove ${drop} from that file (would drop: ${dropped.join(", ")}).`),
|
|
257
|
+
severity: "error",
|
|
258
|
+
path: dotted,
|
|
259
|
+
currentValue: current,
|
|
260
|
+
autoFixable: inApplyTarget,
|
|
261
|
+
proposedFix: {
|
|
262
|
+
type: "update",
|
|
263
|
+
path: dotted,
|
|
264
|
+
value: trimmed,
|
|
265
|
+
description: `Trim "${dotted}" to the first ${FALLBACK_MODELS_MAX} models`,
|
|
266
|
+
risk: "low",
|
|
267
|
+
lossy: true
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
findings.push({
|
|
273
|
+
id: "invalid-config-value",
|
|
274
|
+
title: "Invalid config value",
|
|
275
|
+
description: `"${dotted || "(root)"}" in ${configPath} is invalid: ${issue.message}. ` + `A config that fails validation is discarded in favor of safe defaults until this is fixed.`,
|
|
276
|
+
severity: "error",
|
|
277
|
+
path: dotted,
|
|
278
|
+
currentValue: current,
|
|
279
|
+
autoFixable: false
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
} catch {}
|
|
283
|
+
}
|
|
284
|
+
return findings;
|
|
285
|
+
}
|
|
208
286
|
function emitWorktreeIsolationLayeringAdvisory(config, findings) {
|
|
209
287
|
const parallelization = config.parallelization;
|
|
210
288
|
const worktreePolicy = config.worktree?.policy ?? "auto";
|
|
@@ -1059,6 +1137,7 @@ function runConfigDoctor(config, directory) {
|
|
|
1059
1137
|
walkConfigAndValidate(config, "", findings);
|
|
1060
1138
|
findings.push(...collectRawGatesConfigFindings(directory));
|
|
1061
1139
|
findings.push(...collectRawStrictSectionFindings(directory));
|
|
1140
|
+
findings.push(...collectRawValueConstraintFindings(directory));
|
|
1062
1141
|
emitWorktreeIsolationLayeringAdvisory(config, findings);
|
|
1063
1142
|
const summary = {
|
|
1064
1143
|
info: findings.filter((f) => f.severity === "info").length,
|
|
@@ -1098,7 +1177,8 @@ function isPathSafe(fixPath) {
|
|
|
1098
1177
|
}
|
|
1099
1178
|
return true;
|
|
1100
1179
|
}
|
|
1101
|
-
function applySafeAutoFixes(directory, result) {
|
|
1180
|
+
function applySafeAutoFixes(directory, result, options = {}) {
|
|
1181
|
+
const applyLossy = options.applyLossy === true;
|
|
1102
1182
|
const appliedFixes = [];
|
|
1103
1183
|
let updatedConfigPath = null;
|
|
1104
1184
|
const { userConfigPath, projectConfigPath } = getConfigPaths(directory);
|
|
@@ -1119,7 +1199,7 @@ function applySafeAutoFixes(directory, result) {
|
|
|
1119
1199
|
} catch {
|
|
1120
1200
|
return { appliedFixes, updatedConfigPath: null };
|
|
1121
1201
|
}
|
|
1122
|
-
const safeFixes = result.findings.filter((f) => f.autoFixable && f.proposedFix?.risk === "low");
|
|
1202
|
+
const safeFixes = result.findings.filter((f) => f.autoFixable && f.proposedFix?.risk === "low" && (applyLossy || !f.proposedFix?.lossy));
|
|
1123
1203
|
for (const finding of safeFixes) {
|
|
1124
1204
|
const fix = finding.proposedFix;
|
|
1125
1205
|
if (!fix)
|
|
@@ -1244,7 +1324,8 @@ function writeDoctorArtifact(directory, result) {
|
|
|
1244
1324
|
type: f.proposedFix.type,
|
|
1245
1325
|
path: f.proposedFix.path,
|
|
1246
1326
|
description: f.proposedFix.description,
|
|
1247
|
-
risk: f.proposedFix.risk
|
|
1327
|
+
risk: f.proposedFix.risk,
|
|
1328
|
+
lossy: f.proposedFix.lossy === true
|
|
1248
1329
|
} : null
|
|
1249
1330
|
}))
|
|
1250
1331
|
};
|
|
@@ -1260,7 +1341,7 @@ function shouldRunOnStartup(automationConfig) {
|
|
|
1260
1341
|
}
|
|
1261
1342
|
return automationConfig.capabilities?.config_doctor_on_startup === true;
|
|
1262
1343
|
}
|
|
1263
|
-
async function runConfigDoctorWithFixes(directory, config, autoFix = false) {
|
|
1344
|
+
async function runConfigDoctorWithFixes(directory, config, autoFix = false, options = {}) {
|
|
1264
1345
|
const result = runConfigDoctor(config, directory);
|
|
1265
1346
|
const artifactPath = writeDoctorArtifact(directory, result);
|
|
1266
1347
|
if (!autoFix) {
|
|
@@ -1277,7 +1358,7 @@ async function runConfigDoctorWithFixes(directory, config, autoFix = false) {
|
|
|
1277
1358
|
if (backup) {
|
|
1278
1359
|
backupPath = writeBackupArtifact(directory, backup);
|
|
1279
1360
|
}
|
|
1280
|
-
const { appliedFixes, updatedConfigPath } = applySafeAutoFixes(directory, result);
|
|
1361
|
+
const { appliedFixes, updatedConfigPath } = applySafeAutoFixes(directory, result, options);
|
|
1281
1362
|
if (appliedFixes.length > 0) {
|
|
1282
1363
|
const freshConfig = readConfigFromFile(directory);
|
|
1283
1364
|
if (freshConfig) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-rp5msv7n.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-45mvd5q7.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
15
|
} from "./index-q27bajqb.js";
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-45mvd5q7.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-fm4zfxnr.js";
|
|
16
16
|
import {
|
|
17
17
|
init_knowledge_types,
|
|
18
18
|
isActiveStatus
|
|
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
190
190
|
alreadyInactive: true
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
193
|
+
const { quarantineEntry } = await import("./knowledge-validator-7jhq8yam.js");
|
|
194
194
|
let policyConfig;
|
|
195
195
|
try {
|
|
196
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
197
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
196
|
+
const { KnowledgeConfigSchema } = await import("./schema-bw68my66.js");
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-emzes7sj.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-m5e00g9s.js";
|
|
16
16
|
import {
|
|
17
17
|
checkFileAuthority,
|
|
18
18
|
classifyFile,
|
|
19
19
|
isInDeclaredScope,
|
|
20
20
|
redactPath,
|
|
21
21
|
redactShellCommand
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-xezv6tdw.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|