opencode-swarm 7.134.0 → 7.134.2
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/.opencode/skills/codebase-review-swarm/SKILL.md +18 -2
- package/.opencode/skills/codebase-review-swarm/references/review-protocol-v8.2.md +18 -2
- package/.opencode/skills/swarm-implement/SKILL.md +17 -2
- package/dist/background/pr-event-subscribers.d.ts +1 -1
- package/dist/cli/{config-doctor-t5r92674.js → config-doctor-wk7xzrma.js} +2 -2
- package/dist/cli/{curation-policy-3smfn2a3.js → curation-policy-npgspa14.js} +2 -2
- package/dist/cli/{curator-drift-tsyyf4b4.js → curator-drift-9q6f85bm.js} +1 -1
- package/dist/cli/{curator-llm-factory-p3aqev12.js → curator-llm-factory-tpc0qg6x.js} +13 -13
- package/dist/cli/{curator-hva8f3nf.js → curator-njzxdyav.js} +13 -13
- package/dist/cli/{evidence-summary-service-mrzsjpg4.js → evidence-summary-service-pay9409b.js} +1 -1
- package/dist/cli/{guardrail-explain-k8mcvk61.js → guardrail-explain-75pr3e9z.js} +14 -14
- package/dist/cli/{guardrail-log-absma1rv.js → guardrail-log-783svw0e.js} +3 -3
- package/dist/cli/{hive-promoter-jwd51gzk.js → hive-promoter-nrxjatdx.js} +13 -13
- package/dist/cli/{index-hgh01f6h.js → index-0dszfjf3.js} +1 -1
- package/dist/cli/{index-kapharv7.js → index-1bytvz73.js} +2 -2
- package/dist/cli/{index-eedq2y40.js → index-225t7m1j.js} +15 -15
- package/dist/cli/{index-jpkxjmfw.js → index-4cnwvmsm.js} +5 -5
- package/dist/cli/{index-c3e0ymrg.js → index-746ga67b.js} +1 -1
- package/dist/cli/{index-k742ecbm.js → index-8fhg2nt2.js} +2 -2
- package/dist/cli/{index-rkyhv4p5.js → index-9299e7d5.js} +2 -2
- package/dist/cli/{index-2njes601.js → index-a0nk83rk.js} +2 -2
- package/dist/cli/{index-dgxgvzab.js → index-asd9n0ms.js} +1 -1
- package/dist/cli/{index-y0kk3rtv.js → index-ca44jww3.js} +1 -1
- package/dist/cli/{index-3dtjhr26.js → index-cav39zjt.js} +70 -39
- package/dist/cli/{index-xfejq1p9.js → index-n48xwynh.js} +1 -1
- package/dist/cli/{index-j6ywarjp.js → index-njfcm1tn.js} +3 -3
- package/dist/cli/{index-g87ty4wp.js → index-ss26e2d4.js} +1 -1
- package/dist/cli/{index-b5ek2cge.js → index-v8m282zt.js} +1 -1
- package/dist/cli/{index-baawkm48.js → index-x60gpbt5.js} +4 -4
- package/dist/cli/{index-m2s0gbzt.js → index-y8vqsm2g.js} +1 -1
- package/dist/cli/index.js +13 -13
- package/dist/cli/{knowledge-escalator-mkdac2m7.js → knowledge-escalator-b3b91k0t.js} +3 -3
- package/dist/cli/{knowledge-events-jjc9qbe0.js → knowledge-events-kyw0s745.js} +1 -1
- package/dist/cli/{knowledge-store-9e0w1kxm.js → knowledge-store-5watc2b2.js} +1 -1
- package/dist/cli/{knowledge-validator-h1nrn2pk.js → knowledge-validator-a4wxkgbc.js} +4 -4
- package/dist/cli/{scan-cursor-mk3tq3sf.js → scan-cursor-gcd771kn.js} +2 -2
- package/dist/cli/{schema-bjb0yzsq.js → schema-6eghf6gt.js} +1 -1
- package/dist/cli/{skill-generator-p1de0wkr.js → skill-generator-8dswjh14.js} +5 -5
- package/dist/hooks/guardrails/messages-transform.d.ts +10 -0
- package/dist/hooks/guardrails/stored-input-args.d.ts +6 -0
- package/dist/hooks/shell-write-detect.d.ts +1 -1
- package/dist/index.js +40 -39
- package/dist/prm/escalation.d.ts +1 -11
- package/dist/prm/index.d.ts +1 -0
- package/dist/prm/types.d.ts +0 -2
- package/dist/session/snapshot-writer.d.ts +1 -0
- package/dist/state.d.ts +11 -0
- package/dist/utils/advisory-queue.d.ts +60 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
readDoctorArtifact,
|
|
12
12
|
removeStraySwarmDir,
|
|
13
13
|
runConfigDoctor
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-ss26e2d4.js";
|
|
15
15
|
import {
|
|
16
16
|
EvaluationTaskV1Schema,
|
|
17
17
|
GateAuditManifestV1Schema,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
saveTaskSetSnapshot,
|
|
67
67
|
transientBackoff,
|
|
68
68
|
validateProjectRoot
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-8fhg2nt2.js";
|
|
70
70
|
import {
|
|
71
71
|
withTimeout
|
|
72
72
|
} from "./index-4905hd2m.js";
|
|
@@ -92,15 +92,15 @@ import {
|
|
|
92
92
|
retireSkill,
|
|
93
93
|
selectCandidateEntries,
|
|
94
94
|
syncBundledProjectSkillsIfMissingAsync
|
|
95
|
-
} from "./index-
|
|
95
|
+
} from "./index-njfcm1tn.js";
|
|
96
96
|
import {
|
|
97
97
|
readRecentEscalations
|
|
98
|
-
} from "./index-
|
|
98
|
+
} from "./index-4cnwvmsm.js";
|
|
99
99
|
import {
|
|
100
100
|
alreadyCuratedThisGeneration,
|
|
101
101
|
claimNextScanBatch,
|
|
102
102
|
resolveCohortId
|
|
103
|
-
} from "./index-
|
|
103
|
+
} from "./index-y8vqsm2g.js";
|
|
104
104
|
import {
|
|
105
105
|
CURATOR_INIT_PROMPT,
|
|
106
106
|
CURATOR_PHASE_PROMPT,
|
|
@@ -133,11 +133,11 @@ import {
|
|
|
133
133
|
validateActionability,
|
|
134
134
|
validateActionableFields,
|
|
135
135
|
validateLesson
|
|
136
|
-
} from "./index-
|
|
136
|
+
} from "./index-a0nk83rk.js";
|
|
137
137
|
import {
|
|
138
138
|
authorizeCuration,
|
|
139
139
|
buildConfigFingerprintInput
|
|
140
|
-
} from "./index-
|
|
140
|
+
} from "./index-ca44jww3.js";
|
|
141
141
|
import {
|
|
142
142
|
cohortConfigFingerprint
|
|
143
143
|
} from "./index-rtry5xyf.js";
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
transactFile,
|
|
171
171
|
transactKnowledge,
|
|
172
172
|
wordBigrams
|
|
173
|
-
} from "./index-
|
|
173
|
+
} from "./index-x60gpbt5.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-asd9n0ms.js";
|
|
184
184
|
import {
|
|
185
185
|
resolveHiveDataDir,
|
|
186
186
|
resolveHiveEventsPath,
|
|
@@ -205,7 +205,7 @@ import {
|
|
|
205
205
|
init_loader,
|
|
206
206
|
loadPluginConfig,
|
|
207
207
|
loadPluginConfigWithMeta
|
|
208
|
-
} from "./index-
|
|
208
|
+
} from "./index-n48xwynh.js";
|
|
209
209
|
import {
|
|
210
210
|
RetrospectiveEvidenceSchema
|
|
211
211
|
} from "./index-k5jrywpr.js";
|
|
@@ -228,7 +228,7 @@ import {
|
|
|
228
228
|
package_default,
|
|
229
229
|
resolveAutoReviewConfig,
|
|
230
230
|
stripKnownSwarmPrefix
|
|
231
|
-
} from "./index-
|
|
231
|
+
} from "./index-v8m282zt.js";
|
|
232
232
|
import {
|
|
233
233
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
234
234
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -8600,6 +8600,26 @@ function detectBuiltinWrites(cmd) {
|
|
|
8600
8600
|
}
|
|
8601
8601
|
return results;
|
|
8602
8602
|
}
|
|
8603
|
+
if (lowerName === "tee") {
|
|
8604
|
+
const suffixWords2 = getSuffixWords(cmd);
|
|
8605
|
+
let pastDoubleDash = false;
|
|
8606
|
+
for (const word of suffixWords2) {
|
|
8607
|
+
if (word === "--") {
|
|
8608
|
+
pastDoubleDash = true;
|
|
8609
|
+
continue;
|
|
8610
|
+
}
|
|
8611
|
+
if (!pastDoubleDash && word.startsWith("-"))
|
|
8612
|
+
continue;
|
|
8613
|
+
if (word && !isNullDevice(word)) {
|
|
8614
|
+
results.push({
|
|
8615
|
+
category: "builtin_write",
|
|
8616
|
+
operator: "tee",
|
|
8617
|
+
path: word
|
|
8618
|
+
});
|
|
8619
|
+
}
|
|
8620
|
+
}
|
|
8621
|
+
return results;
|
|
8622
|
+
}
|
|
8603
8623
|
if (!BUILTIN_WRITE_COMMANDS.has(lowerName))
|
|
8604
8624
|
return results;
|
|
8605
8625
|
const suffixWords = getSuffixWords(cmd);
|
|
@@ -8690,7 +8710,7 @@ function detectInterpreterEval(cmd) {
|
|
|
8690
8710
|
php: ["-r", "-R", "-F"]
|
|
8691
8711
|
};
|
|
8692
8712
|
const relevantFlags = evalFlags[lowerName] ?? [];
|
|
8693
|
-
const hasEvalFlag = suffixWords.some((word) => relevantFlags.some((f) => word === f || word.startsWith(
|
|
8713
|
+
const hasEvalFlag = suffixWords.some((word) => relevantFlags.some((f) => word === f || word.startsWith(f) && word.length > f.length));
|
|
8694
8714
|
if (!hasEvalFlag)
|
|
8695
8715
|
return [];
|
|
8696
8716
|
results.push({
|
|
@@ -10350,6 +10370,7 @@ function startAgentSession(sessionId, agentName, staleDurationMs = STALE_SESSION
|
|
|
10350
10370
|
reviewerCallCount: new Map,
|
|
10351
10371
|
lastGateFailure: null,
|
|
10352
10372
|
partialGateWarningsIssuedForTask: new Set,
|
|
10373
|
+
completionGateWarnedForTask: new Set,
|
|
10353
10374
|
selfFixAttempted: false,
|
|
10354
10375
|
selfCodingWarnedAtCount: 0,
|
|
10355
10376
|
catastrophicPhaseWarnings: new Set,
|
|
@@ -10397,6 +10418,7 @@ function startAgentSession(sessionId, agentName, staleDurationMs = STALE_SESSION
|
|
|
10397
10418
|
prmLastPatternDetected: null,
|
|
10398
10419
|
prmTrajectoryStep: 0,
|
|
10399
10420
|
prmHardStopPending: false,
|
|
10421
|
+
prmInjectedAdvisoryKeys: new Set,
|
|
10400
10422
|
prSubscriptions: new Map
|
|
10401
10423
|
};
|
|
10402
10424
|
swarmState.agentSessions.set(sessionId, sessionState);
|
|
@@ -10496,6 +10518,9 @@ function ensureAgentSession(sessionId, agentName, directory) {
|
|
|
10496
10518
|
if (!session.partialGateWarningsIssuedForTask) {
|
|
10497
10519
|
session.partialGateWarningsIssuedForTask = new Set;
|
|
10498
10520
|
}
|
|
10521
|
+
if (!session.completionGateWarnedForTask) {
|
|
10522
|
+
session.completionGateWarnedForTask = new Set;
|
|
10523
|
+
}
|
|
10499
10524
|
if (session.selfFixAttempted === undefined) {
|
|
10500
10525
|
session.selfFixAttempted = false;
|
|
10501
10526
|
}
|
|
@@ -10625,6 +10650,9 @@ function ensureAgentSession(sessionId, agentName, directory) {
|
|
|
10625
10650
|
if (session.prmHardStopPending === undefined) {
|
|
10626
10651
|
session.prmHardStopPending = false;
|
|
10627
10652
|
}
|
|
10653
|
+
if (!session.prmInjectedAdvisoryKeys) {
|
|
10654
|
+
session.prmInjectedAdvisoryKeys = new Set;
|
|
10655
|
+
}
|
|
10628
10656
|
if (!session.prSubscriptions) {
|
|
10629
10657
|
session.prSubscriptions = new Map;
|
|
10630
10658
|
}
|
|
@@ -14918,7 +14946,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
14918
14946
|
};
|
|
14919
14947
|
}
|
|
14920
14948
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
14921
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
14949
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-1bytvz73.js");
|
|
14922
14950
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
14923
14951
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
14924
14952
|
if (sweepConfig?.enabled === false)
|
|
@@ -16511,7 +16539,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
16511
16539
|
}
|
|
16512
16540
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
16513
16541
|
try {
|
|
16514
|
-
const skillModule = await import("./skill-generator-
|
|
16542
|
+
const skillModule = await import("./skill-generator-8dswjh14.js");
|
|
16515
16543
|
for (const cand of skillCandidates) {
|
|
16516
16544
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
16517
16545
|
continue;
|
|
@@ -16912,7 +16940,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
16912
16940
|
} catch {}
|
|
16913
16941
|
}
|
|
16914
16942
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
16915
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
16943
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-b3b91k0t.js");
|
|
16916
16944
|
for (const { id } of contradictedEntries) {
|
|
16917
16945
|
try {
|
|
16918
16946
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -17720,7 +17748,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
17720
17748
|
warnings.push("Failed to collect knowledge summary.");
|
|
17721
17749
|
}
|
|
17722
17750
|
try {
|
|
17723
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
17751
|
+
const { getScanStatus } = await import("./scan-cursor-gcd771kn.js");
|
|
17724
17752
|
const scanStatus = await getScanStatus(directory);
|
|
17725
17753
|
if (scanStatus.remaining_estimate > 0) {
|
|
17726
17754
|
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.`);
|
|
@@ -17892,9 +17920,9 @@ var _internals23 = {
|
|
|
17892
17920
|
verifyPostMortemKnowledgeActions,
|
|
17893
17921
|
repairPostMortemActions,
|
|
17894
17922
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
17895
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
17923
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-6eghf6gt.js");
|
|
17896
17924
|
try {
|
|
17897
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
17925
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-1bytvz73.js");
|
|
17898
17926
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
17899
17927
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
17900
17928
|
} catch {
|
|
@@ -17902,11 +17930,11 @@ var _internals23 = {
|
|
|
17902
17930
|
}
|
|
17903
17931
|
},
|
|
17904
17932
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
17905
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
17933
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-njzxdyav.js");
|
|
17906
17934
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
17907
17935
|
},
|
|
17908
17936
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
17909
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
17937
|
+
const { checkHivePromotions } = await import("./hive-promoter-nrxjatdx.js");
|
|
17910
17938
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
17911
17939
|
},
|
|
17912
17940
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -17915,7 +17943,7 @@ var _internals23 = {
|
|
|
17915
17943
|
activateProposal,
|
|
17916
17944
|
listSkills: listSkills2,
|
|
17917
17945
|
sanitizeSlug
|
|
17918
|
-
} = await import("./skill-generator-
|
|
17946
|
+
} = await import("./skill-generator-8dswjh14.js");
|
|
17919
17947
|
const result = {
|
|
17920
17948
|
approved: [],
|
|
17921
17949
|
rejected: [],
|
|
@@ -17957,7 +17985,7 @@ var _internals23 = {
|
|
|
17957
17985
|
return result;
|
|
17958
17986
|
},
|
|
17959
17987
|
readPriorDriftReports: async (directory) => {
|
|
17960
|
-
const { readPriorDriftReports } = await import("./curator-drift-
|
|
17988
|
+
const { readPriorDriftReports } = await import("./curator-drift-9q6f85bm.js");
|
|
17961
17989
|
return readPriorDriftReports(directory);
|
|
17962
17990
|
},
|
|
17963
17991
|
readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
|
|
@@ -20542,9 +20570,9 @@ function hashContent(content) {
|
|
|
20542
20570
|
return createHash8("sha1").update(content).digest("hex");
|
|
20543
20571
|
}
|
|
20544
20572
|
async function loadConfigForPolicyCurator(directory) {
|
|
20545
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
20573
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-6eghf6gt.js");
|
|
20546
20574
|
try {
|
|
20547
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
20575
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-1bytvz73.js");
|
|
20548
20576
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
20549
20577
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
20550
20578
|
} catch {
|
|
@@ -23889,7 +23917,7 @@ async function runFinalizeStage(ctx) {
|
|
|
23889
23917
|
}
|
|
23890
23918
|
}
|
|
23891
23919
|
try {
|
|
23892
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
23920
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-6eghf6gt.js");
|
|
23893
23921
|
const { config: pmLoadedConfig } = _internals33.loadPluginConfigWithMeta(ctx.directory);
|
|
23894
23922
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
23895
23923
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -26007,9 +26035,9 @@ var _internals37 = {
|
|
|
26007
26035
|
loadPluginConfigWithMeta,
|
|
26008
26036
|
loadCuratorDeps: async () => {
|
|
26009
26037
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
26010
|
-
import("./schema-
|
|
26011
|
-
import("./curator-
|
|
26012
|
-
import("./curator-llm-factory-
|
|
26038
|
+
import("./schema-6eghf6gt.js"),
|
|
26039
|
+
import("./curator-njzxdyav.js"),
|
|
26040
|
+
import("./curator-llm-factory-tpc0qg6x.js")
|
|
26013
26041
|
]);
|
|
26014
26042
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
26015
26043
|
}
|
|
@@ -26910,7 +26938,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
26910
26938
|
let scanCompleted = false;
|
|
26911
26939
|
let scanRemaining = 0;
|
|
26912
26940
|
try {
|
|
26913
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
26941
|
+
const { getScanStatus } = await import("./scan-cursor-gcd771kn.js");
|
|
26914
26942
|
const status = await getScanStatus(directory);
|
|
26915
26943
|
scanGeneration = status.generation;
|
|
26916
26944
|
scanCompleted = status.completed;
|
|
@@ -26920,17 +26948,17 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
26920
26948
|
try {
|
|
26921
26949
|
const { isLinked: isLinked2 } = await import("./knowledge-link-nc4y2zkq.js");
|
|
26922
26950
|
if (isLinked2(directory)) {
|
|
26923
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
26951
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-6eghf6gt.js");
|
|
26924
26952
|
let config;
|
|
26925
26953
|
try {
|
|
26926
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
26954
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-1bytvz73.js");
|
|
26927
26955
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
26928
26956
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
26929
26957
|
} catch {
|
|
26930
26958
|
config = KnowledgeConfigSchema2.parse({});
|
|
26931
26959
|
}
|
|
26932
26960
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
26933
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
26961
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-npgspa14.js");
|
|
26934
26962
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
26935
26963
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
26936
26964
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -28141,7 +28169,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
28141
28169
|
const result = runConfigDoctor(config, directory);
|
|
28142
28170
|
let output;
|
|
28143
28171
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
28144
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
28172
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-wk7xzrma.js");
|
|
28145
28173
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
28146
28174
|
applyLossy: true
|
|
28147
28175
|
});
|
|
@@ -28978,7 +29006,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
28978
29006
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
28979
29007
|
}
|
|
28980
29008
|
async function handleEvidenceSummaryCommand(directory) {
|
|
28981
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
29009
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-pay9409b.js");
|
|
28982
29010
|
const artifact = await buildEvidenceSummary(directory);
|
|
28983
29011
|
if (!artifact) {
|
|
28984
29012
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -34420,6 +34448,7 @@ function serializeAgentSession(s) {
|
|
|
34420
34448
|
reviewerCallCount[String(phase)] = count;
|
|
34421
34449
|
}
|
|
34422
34450
|
const partialGateWarningsIssuedForTask = Array.from(s.partialGateWarningsIssuedForTask ?? new Set);
|
|
34451
|
+
const completionGateWarnedForTask = Array.from(s.completionGateWarnedForTask ?? new Set);
|
|
34423
34452
|
const catastrophicPhaseWarnings = Array.from(s.catastrophicPhaseWarnings ?? new Set);
|
|
34424
34453
|
const phaseAgentsDispatched = Array.from(s.phaseAgentsDispatched ?? new Set);
|
|
34425
34454
|
const lastCompletedPhaseAgentsDispatched = Array.from(s.lastCompletedPhaseAgentsDispatched ?? new Set);
|
|
@@ -34473,6 +34502,7 @@ function serializeAgentSession(s) {
|
|
|
34473
34502
|
reviewerCallCount,
|
|
34474
34503
|
lastGateFailure: s.lastGateFailure ?? null,
|
|
34475
34504
|
partialGateWarningsIssuedForTask,
|
|
34505
|
+
completionGateWarnedForTask,
|
|
34476
34506
|
selfFixAttempted: s.selfFixAttempted ?? false,
|
|
34477
34507
|
selfCodingWarnedAtCount: s.selfCodingWarnedAtCount ?? 0,
|
|
34478
34508
|
catastrophicPhaseWarnings,
|
|
@@ -44756,6 +44786,7 @@ function resetPrmSessionState(session, sessionId) {
|
|
|
44756
44786
|
session.prmLastPatternDetected = null;
|
|
44757
44787
|
session.prmHardStopPending = false;
|
|
44758
44788
|
session.prmTrajectoryStep = 0;
|
|
44789
|
+
session.prmInjectedAdvisoryKeys = new Set;
|
|
44759
44790
|
session.replayArtifactPath = null;
|
|
44760
44791
|
if (sessionId) {
|
|
44761
44792
|
_internals67.clearTrajectoryCache(sessionId);
|
|
@@ -49419,7 +49450,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
49419
49450
|
async function handleHelpCommand(ctx) {
|
|
49420
49451
|
const targetCommand = ctx.args.join(" ");
|
|
49421
49452
|
if (!targetCommand) {
|
|
49422
|
-
const { buildHelpText } = await import("./index-
|
|
49453
|
+
const { buildHelpText } = await import("./index-225t7m1j.js");
|
|
49423
49454
|
return buildHelpText();
|
|
49424
49455
|
}
|
|
49425
49456
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -49428,7 +49459,7 @@ async function handleHelpCommand(ctx) {
|
|
|
49428
49459
|
return _internals10.buildDetailedHelp(resolved.key, resolved.entry);
|
|
49429
49460
|
}
|
|
49430
49461
|
const similar = _internals10.findSimilarCommands(targetCommand);
|
|
49431
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
49462
|
+
const { buildHelpText: fullHelp } = await import("./index-225t7m1j.js");
|
|
49432
49463
|
if (similar.length > 0) {
|
|
49433
49464
|
return `Command '/swarm ${targetCommand}' not found.
|
|
49434
49465
|
|
|
@@ -49567,7 +49598,7 @@ var COMMAND_REGISTRY = {
|
|
|
49567
49598
|
},
|
|
49568
49599
|
"guardrail explain": {
|
|
49569
49600
|
handler: async (ctx) => {
|
|
49570
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
49601
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-75pr3e9z.js");
|
|
49571
49602
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
49572
49603
|
},
|
|
49573
49604
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -49577,7 +49608,7 @@ var COMMAND_REGISTRY = {
|
|
|
49577
49608
|
},
|
|
49578
49609
|
"guardrail-explain": {
|
|
49579
49610
|
handler: async (ctx) => {
|
|
49580
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
49611
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-75pr3e9z.js");
|
|
49581
49612
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
49582
49613
|
},
|
|
49583
49614
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -49587,7 +49618,7 @@ var COMMAND_REGISTRY = {
|
|
|
49587
49618
|
},
|
|
49588
49619
|
"guardrail-log": {
|
|
49589
49620
|
handler: async (ctx) => {
|
|
49590
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
49621
|
+
const { handleGuardrailLog } = await import("./guardrail-log-783svw0e.js");
|
|
49591
49622
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
49592
49623
|
},
|
|
49593
49624
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-a0nk83rk.js";
|
|
6
6
|
import {
|
|
7
7
|
computeOutcomeSignal,
|
|
8
8
|
readKnowledge,
|
|
9
9
|
resolveHiveKnowledgePath,
|
|
10
10
|
resolveSwarmKnowledgePath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-x60gpbt5.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveRetrievalOutcomes,
|
|
15
15
|
readKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-asd9n0ms.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
|
@@ -19,7 +19,7 @@ var package_default;
|
|
|
19
19
|
var init_package = __esm(() => {
|
|
20
20
|
package_default = {
|
|
21
21
|
name: "opencode-swarm",
|
|
22
|
-
version: "7.134.
|
|
22
|
+
version: "7.134.2",
|
|
23
23
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
24
24
|
main: "dist/index.js",
|
|
25
25
|
types: "dist/index.d.ts",
|
|
@@ -702,7 +702,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
702
702
|
const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
|
|
703
703
|
if (atFloor.length === 0 && recovered.length === 0)
|
|
704
704
|
return;
|
|
705
|
-
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-
|
|
705
|
+
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-kyw0s745.js");
|
|
706
706
|
const rollups = await readKnowledgeCounterRollups(directory);
|
|
707
707
|
const flagIds = new Set;
|
|
708
708
|
for (const e of atFloor) {
|
|
@@ -769,11 +769,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
769
769
|
});
|
|
770
770
|
}
|
|
771
771
|
if (action === "quarantine" && toQuarantine.length > 0) {
|
|
772
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
773
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
772
|
+
const { quarantineEntry } = await import("./knowledge-validator-a4wxkgbc.js");
|
|
773
|
+
const { KnowledgeConfigSchema } = await import("./schema-6eghf6gt.js");
|
|
774
774
|
let config;
|
|
775
775
|
try {
|
|
776
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
776
|
+
const { loadPluginConfigWithMeta } = await import("./index-1bytvz73.js");
|
|
777
777
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
778
778
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
779
779
|
} catch {
|
package/dist/cli/index.js
CHANGED
|
@@ -6,30 +6,30 @@ import {
|
|
|
6
6
|
getPluginConfigDir,
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
resolveCommand
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-cav39zjt.js";
|
|
10
10
|
import"./index-13xxjfhn.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
import"./index-0dszfjf3.js";
|
|
12
|
+
import"./index-ss26e2d4.js";
|
|
13
|
+
import"./index-8fhg2nt2.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
16
|
+
import"./index-njfcm1tn.js";
|
|
17
|
+
import"./index-4cnwvmsm.js";
|
|
18
|
+
import"./index-y8vqsm2g.js";
|
|
19
19
|
import"./index-vxv732ex.js";
|
|
20
20
|
import"./index-c8s9a3zh.js";
|
|
21
21
|
import"./index-9ss2m4rs.js";
|
|
22
22
|
import"./index-wk1h5ec2.js";
|
|
23
23
|
import"./index-1j3682j8.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-a0nk83rk.js";
|
|
25
|
+
import"./index-ca44jww3.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-x60gpbt5.js";
|
|
28
|
+
import"./index-asd9n0ms.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-cfkvc5q9.js";
|
|
31
31
|
import"./index-dd7ttx8x.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-n48xwynh.js";
|
|
33
33
|
import"./index-k5jrywpr.js";
|
|
34
34
|
import"./index-n832052r.js";
|
|
35
35
|
import {
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
init_constants,
|
|
38
38
|
init_package,
|
|
39
39
|
package_default
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-v8m282zt.js";
|
|
41
41
|
import"./index-bk5tah7q.js";
|
|
42
42
|
import"./index-8fwhhayc.js";
|
|
43
43
|
import"./index-q1exe2b3.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-4cnwvmsm.js";
|
|
12
|
+
import"./index-x60gpbt5.js";
|
|
13
|
+
import"./index-asd9n0ms.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-cfkvc5q9.js";
|
|
16
16
|
import"./index-dd7ttx8x.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-asd9n0ms.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-cfkvc5q9.js";
|
|
32
32
|
import"./index-dd7ttx8x.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-a0nk83rk.js";
|
|
27
|
+
import"./index-ca44jww3.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-x60gpbt5.js";
|
|
30
|
+
import"./index-asd9n0ms.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-cfkvc5q9.js";
|
|
33
33
|
import"./index-dd7ttx8x.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-y8vqsm2g.js";
|
|
8
|
+
import"./index-x60gpbt5.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-cfkvc5q9.js";
|
|
11
11
|
import"./index-dd7ttx8x.js";
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-njfcm1tn.js";
|
|
37
|
+
import"./index-a0nk83rk.js";
|
|
38
|
+
import"./index-ca44jww3.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-x60gpbt5.js";
|
|
41
|
+
import"./index-asd9n0ms.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-cfkvc5q9.js";
|
|
44
44
|
import"./index-dd7ttx8x.js";
|
|
@@ -39,6 +39,16 @@ type ChatMessageLike = {
|
|
|
39
39
|
* never contained, making the guard permanently inert.
|
|
40
40
|
*/
|
|
41
41
|
export declare const RUNAWAY_OUTPUT_ADVISORY_MARKER = "Model is generating analysis without taking action";
|
|
42
|
+
/**
|
|
43
|
+
* Bound a set of advisory strings to a total byte budget, keeping the latest
|
|
44
|
+
* (dropping oldest from the front). Returns the kept entries and whether any
|
|
45
|
+
* were dropped. Never drops below a single entry (a single oversized advisory
|
|
46
|
+
* is kept verbatim rather than rendered empty).
|
|
47
|
+
*/
|
|
48
|
+
export declare function boundAdvisoryBytes(advisories: string[], maxBytes: number): {
|
|
49
|
+
kept: string[];
|
|
50
|
+
truncated: boolean;
|
|
51
|
+
};
|
|
42
52
|
export declare function getMostRecentAssistantText(messages: ChatMessageLike[]): string;
|
|
43
53
|
export declare function isTransientProviderFailureText(text: string): boolean;
|
|
44
54
|
export declare function getProviderFailureFingerprint(text: string): string;
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
* input args by callID, used by guardrails for delegation detection
|
|
6
6
|
* and exposed via safe accessor helpers.
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Max stored callID->args entries before the oldest-inserted is evicted
|
|
10
|
+
* (invariant 8). Larger than the per-session cap because callIDs are per
|
|
11
|
+
* tool-call, not per-session.
|
|
12
|
+
*/
|
|
13
|
+
export declare const MAX_STORED_INPUT_ARGS = 2000;
|
|
8
14
|
/**
|
|
9
15
|
* Retrieves stored input args for a given callID.
|
|
10
16
|
* Used by other hooks (e.g., delegation-gate) to access tool input args.
|
|
@@ -68,7 +68,7 @@ export declare function detectInteractiveSession(command: string, shell: 'posix'
|
|
|
68
68
|
*
|
|
69
69
|
* Detects:
|
|
70
70
|
* - Redirection operators: >, >>, >|, <<, <<- (here-docs)
|
|
71
|
-
* - Write-effect builtins: cp, mv, install, ln, truncate, dd (of=)
|
|
71
|
+
* - Write-effect builtins: cp, mv, install, ln, truncate, dd (of=), tee
|
|
72
72
|
* - In-place editors: sed -i, perl -i, awk -i
|
|
73
73
|
* - Interpreter eval: python -c, node -e, bun -e, ruby -e, perl -e, php -r
|
|
74
74
|
* - Network downloaders: curl -o, wget -O, scp
|