opencode-swarm 7.135.3 → 7.135.5
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/agents/explorer.d.ts +1 -1
- package/dist/cli/{config-doctor-4nznqeca.js → config-doctor-exj26ryt.js} +2 -2
- package/dist/cli/{curation-policy-81m14519.js → curation-policy-mbv3b27c.js} +2 -2
- package/dist/cli/{curator-e0z5gcww.js → curator-7ycd6x29.js} +13 -13
- package/dist/cli/{curator-llm-factory-fem13y9n.js → curator-llm-factory-4d5pzh47.js} +13 -13
- package/dist/cli/{explorer-15gqzxh8.js → explorer-swjc297z.js} +1 -1
- package/dist/cli/{guardrail-explain-wgaj23hd.js → guardrail-explain-2jrqv2zf.js} +14 -14
- package/dist/cli/{guardrail-log-04p1z1vt.js → guardrail-log-c843gxnm.js} +3 -3
- package/dist/cli/{hive-promoter-k345z42k.js → hive-promoter-epnj14q8.js} +13 -13
- package/dist/cli/{index-30pg2rs3.js → index-09w3ezq2.js} +1 -1
- package/dist/cli/{index-36v55ryg.js → index-0csbx1wc.js} +1 -1
- package/dist/cli/{index-dg1njnms.js → index-6mjf4vr1.js} +1 -1
- package/dist/cli/{index-kb7qy7an.js → index-6yk6ezvj.js} +1 -1
- package/dist/cli/{index-yf30m841.js → index-8et4bx6j.js} +3 -3
- package/dist/cli/{index-dwargd10.js → index-9s5b8wrs.js} +54 -42
- package/dist/cli/{index-rv7s2k9y.js → index-bx10dq60.js} +21 -4
- package/dist/cli/{index-a01r818w.js → index-db52969t.js} +1 -1
- package/dist/cli/{index-5436jxnw.js → index-gvfw2y6v.js} +2 -2
- package/dist/cli/{index-p9ngg568.js → index-hw6yt4rs.js} +4 -4
- package/dist/cli/{index-168phrs7.js → index-jnemjn16.js} +2 -2
- package/dist/cli/{index-p5kr35wh.js → index-k8arazbb.js} +1 -1
- package/dist/cli/{index-wygxzvtf.js → index-kjg6vgqs.js} +1 -1
- package/dist/cli/{index-y47crdg9.js → index-kq9zb1cv.js} +15 -15
- package/dist/cli/{index-bcmrg4t4.js → index-qyn0b2jj.js} +1 -1
- package/dist/cli/{index-gxxxmajn.js → index-t1gszcwg.js} +2 -2
- package/dist/cli/{index-f52jt0am.js → index-ym516a9a.js} +5 -5
- package/dist/cli/index.js +13 -13
- package/dist/cli/{knowledge-escalator-42ecv7m3.js → knowledge-escalator-3tjhpwjf.js} +3 -3
- package/dist/cli/{knowledge-events-zhna7v3g.js → knowledge-events-0akk3p15.js} +5 -1
- package/dist/cli/{knowledge-store-56jcfc5k.js → knowledge-store-7nvfh2n3.js} +1 -1
- package/dist/cli/{knowledge-validator-8zk0pnb6.js → knowledge-validator-z618vhda.js} +4 -4
- package/dist/cli/{scan-cursor-h3ndxd41.js → scan-cursor-5zqr3afj.js} +2 -2
- package/dist/cli/{schema-r6wmd7zp.js → schema-n1cj94m0.js} +1 -1
- package/dist/cli/{skill-generator-12cftsx4.js → skill-generator-560ksca8.js} +5 -5
- package/dist/hooks/curator-postmortem.d.ts +8 -0
- package/dist/hooks/delegate-ack-collector.d.ts +21 -0
- package/dist/hooks/knowledge-events.d.ts +33 -1
- package/dist/hooks/pr-workflow-gate.d.ts +5 -5
- package/dist/hooks/pr-workflow-response-gate.d.ts +32 -1
- package/dist/index.js +24 -23
- package/dist/services/knowledge-diagnostics.d.ts +2 -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-db52969t.js";
|
|
15
15
|
import {
|
|
16
16
|
EvaluationTaskV1Schema,
|
|
17
17
|
GateAuditManifestV1Schema,
|
|
@@ -92,20 +92,20 @@ import {
|
|
|
92
92
|
retireSkill,
|
|
93
93
|
selectCandidateEntries,
|
|
94
94
|
syncBundledProjectSkillsIfMissingAsync
|
|
95
|
-
} from "./index-
|
|
95
|
+
} from "./index-8et4bx6j.js";
|
|
96
96
|
import {
|
|
97
97
|
readRecentEscalations
|
|
98
|
-
} from "./index-
|
|
98
|
+
} from "./index-ym516a9a.js";
|
|
99
99
|
import {
|
|
100
100
|
alreadyCuratedThisGeneration,
|
|
101
101
|
claimNextScanBatch,
|
|
102
102
|
resolveCohortId
|
|
103
|
-
} from "./index-
|
|
103
|
+
} from "./index-0csbx1wc.js";
|
|
104
104
|
import {
|
|
105
105
|
CURATOR_INIT_PROMPT,
|
|
106
106
|
CURATOR_PHASE_PROMPT,
|
|
107
107
|
READ_ONLY_LANE_GUIDANCE
|
|
108
|
-
} from "./index-
|
|
108
|
+
} from "./index-6mjf4vr1.js";
|
|
109
109
|
import {
|
|
110
110
|
getGlobalEventBus
|
|
111
111
|
} from "./index-c8s9a3zh.js";
|
|
@@ -150,11 +150,11 @@ import {
|
|
|
150
150
|
validateActionability,
|
|
151
151
|
validateActionableFields,
|
|
152
152
|
validateLesson
|
|
153
|
-
} from "./index-
|
|
153
|
+
} from "./index-t1gszcwg.js";
|
|
154
154
|
import {
|
|
155
155
|
authorizeCuration,
|
|
156
156
|
buildConfigFingerprintInput
|
|
157
|
-
} from "./index-
|
|
157
|
+
} from "./index-09w3ezq2.js";
|
|
158
158
|
import {
|
|
159
159
|
cohortConfigFingerprint
|
|
160
160
|
} from "./index-rtry5xyf.js";
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
transactFile,
|
|
188
188
|
transactKnowledge,
|
|
189
189
|
wordBigrams
|
|
190
|
-
} from "./index-
|
|
190
|
+
} from "./index-hw6yt4rs.js";
|
|
191
191
|
import {
|
|
192
192
|
MAX_EVENT_LOG_ENTRIES,
|
|
193
193
|
_internals,
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
recordHiveKnowledgeEvent,
|
|
198
198
|
recordKnowledgeEvent,
|
|
199
199
|
resolveKnowledgeEventsPath
|
|
200
|
-
} from "./index-
|
|
200
|
+
} from "./index-bx10dq60.js";
|
|
201
201
|
import {
|
|
202
202
|
resolveHiveDataDir,
|
|
203
203
|
resolveHiveEventsPath,
|
|
@@ -222,7 +222,7 @@ import {
|
|
|
222
222
|
init_loader,
|
|
223
223
|
loadPluginConfig,
|
|
224
224
|
loadPluginConfigWithMeta
|
|
225
|
-
} from "./index-
|
|
225
|
+
} from "./index-kjg6vgqs.js";
|
|
226
226
|
import {
|
|
227
227
|
RetrospectiveEvidenceSchema
|
|
228
228
|
} from "./index-k5jrywpr.js";
|
|
@@ -237,7 +237,7 @@ import {
|
|
|
237
237
|
package_default,
|
|
238
238
|
resolveAutoReviewConfig,
|
|
239
239
|
stripKnownSwarmPrefix
|
|
240
|
-
} from "./index-
|
|
240
|
+
} from "./index-k8arazbb.js";
|
|
241
241
|
import {
|
|
242
242
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
243
243
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -17503,7 +17503,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
17503
17503
|
};
|
|
17504
17504
|
}
|
|
17505
17505
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
17506
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
17506
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-jnemjn16.js");
|
|
17507
17507
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
17508
17508
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
17509
17509
|
if (sweepConfig?.enabled === false)
|
|
@@ -19096,7 +19096,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
19096
19096
|
}
|
|
19097
19097
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
19098
19098
|
try {
|
|
19099
|
-
const skillModule = await import("./skill-generator-
|
|
19099
|
+
const skillModule = await import("./skill-generator-560ksca8.js");
|
|
19100
19100
|
for (const cand of skillCandidates) {
|
|
19101
19101
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
19102
19102
|
continue;
|
|
@@ -19497,7 +19497,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
19497
19497
|
} catch {}
|
|
19498
19498
|
}
|
|
19499
19499
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
19500
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
19500
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-3tjhpwjf.js");
|
|
19501
19501
|
for (const { id } of contradictedEntries) {
|
|
19502
19502
|
try {
|
|
19503
19503
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -19637,25 +19637,33 @@ async function collectKnowledgeSummary(directory, scope = "project", sessionID,
|
|
|
19637
19637
|
}
|
|
19638
19638
|
const countsMap = new Map;
|
|
19639
19639
|
for (const e of events) {
|
|
19640
|
-
if (e.type !== "applied" && e.type !== "violated" && e.type !== "ignored")
|
|
19640
|
+
if (e.type !== "applied" && e.type !== "violated" && e.type !== "ignored" && e.type !== "unacknowledged")
|
|
19641
19641
|
continue;
|
|
19642
19642
|
const kid = e.knowledge_id ?? e.entry_id;
|
|
19643
19643
|
if (!kid)
|
|
19644
19644
|
continue;
|
|
19645
|
-
const c = countsMap.get(kid) ?? {
|
|
19645
|
+
const c = countsMap.get(kid) ?? {
|
|
19646
|
+
applied: 0,
|
|
19647
|
+
violated: 0,
|
|
19648
|
+
ignored: 0,
|
|
19649
|
+
unacknowledged: 0
|
|
19650
|
+
};
|
|
19646
19651
|
if (e.type === "applied")
|
|
19647
19652
|
c.applied++;
|
|
19648
19653
|
else if (e.type === "violated")
|
|
19649
19654
|
c.violated++;
|
|
19650
19655
|
else if (e.type === "ignored")
|
|
19651
19656
|
c.ignored++;
|
|
19657
|
+
else
|
|
19658
|
+
c.unacknowledged++;
|
|
19652
19659
|
countsMap.set(kid, c);
|
|
19653
19660
|
}
|
|
19654
19661
|
return entries.map((entry) => {
|
|
19655
19662
|
const c = countsMap.get(entry.id) ?? {
|
|
19656
19663
|
applied: 0,
|
|
19657
19664
|
violated: 0,
|
|
19658
|
-
ignored: 0
|
|
19665
|
+
ignored: 0,
|
|
19666
|
+
unacknowledged: 0
|
|
19659
19667
|
};
|
|
19660
19668
|
return {
|
|
19661
19669
|
id: entry.id,
|
|
@@ -19663,6 +19671,7 @@ async function collectKnowledgeSummary(directory, scope = "project", sessionID,
|
|
|
19663
19671
|
applied: c.applied,
|
|
19664
19672
|
violated: c.violated,
|
|
19665
19673
|
ignored: c.ignored,
|
|
19674
|
+
unacknowledged: c.unacknowledged,
|
|
19666
19675
|
confidence: entry.confidence ?? 0.5,
|
|
19667
19676
|
status: entry.status ?? "active"
|
|
19668
19677
|
};
|
|
@@ -20140,9 +20149,11 @@ function buildDataOnlyReport(planId, planSummary, knowledgeSummary, curatorDiges
|
|
|
20140
20149
|
const totalApplied = knowledgeSummary.reduce((s, e) => s + e.applied, 0);
|
|
20141
20150
|
const totalViolated = knowledgeSummary.reduce((s, e) => s + e.violated, 0);
|
|
20142
20151
|
const totalIgnored = knowledgeSummary.reduce((s, e) => s + e.ignored, 0);
|
|
20152
|
+
const totalUnacknowledged = knowledgeSummary.reduce((s, e) => s + e.unacknowledged, 0);
|
|
20143
20153
|
const neverApplied = knowledgeSummary.filter((e) => e.applied === 0 && e.violated === 0 && e.ignored === 0);
|
|
20144
20154
|
lines.push(`- Total entries: ${totalEntries}`);
|
|
20145
20155
|
lines.push(`- Application events: ${totalApplied} applied, ${totalViolated} violated, ${totalIgnored} ignored`);
|
|
20156
|
+
lines.push(`- Unacknowledged deliveries: ${totalUnacknowledged} (shown to a delegate that filed no ack/receipt)`);
|
|
20146
20157
|
lines.push(`- Never-applied entries: ${neverApplied.length}`);
|
|
20147
20158
|
if (totalApplied + totalViolated > 0) {
|
|
20148
20159
|
const appRate = (totalApplied / (totalApplied + totalViolated) * 100).toFixed(1);
|
|
@@ -20206,7 +20217,7 @@ function assembleLLMInput(planId, scope, sessionID, planSummary, knowledgeSummar
|
|
|
20206
20217
|
sections.push(`SCOPE: ${scope}${sessionID ? ` (${sessionID})` : ""}`);
|
|
20207
20218
|
sections.push(`PLAN_SUMMARY: ${planSummary}`);
|
|
20208
20219
|
sections.push(`CURATOR_DIGESTS: ${curatorDigest ?? "none"}`);
|
|
20209
|
-
const eventsSummary = knowledgeSummary.map((e) => `${e.id}: applied=${e.applied} violated=${e.violated} ignored=${e.ignored} confidence=${e.confidence.toFixed(2)} status=${e.status}`).join(`
|
|
20220
|
+
const eventsSummary = knowledgeSummary.map((e) => `${e.id}: applied=${e.applied} violated=${e.violated} ignored=${e.ignored} unacknowledged=${e.unacknowledged} confidence=${e.confidence.toFixed(2)} status=${e.status}`).join(`
|
|
20210
20221
|
`);
|
|
20211
20222
|
sections.push(`KNOWLEDGE_EVENTS_SUMMARY:
|
|
20212
20223
|
${eventsSummary || "none"}`);
|
|
@@ -20305,7 +20316,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
20305
20316
|
warnings.push("Failed to collect knowledge summary.");
|
|
20306
20317
|
}
|
|
20307
20318
|
try {
|
|
20308
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
20319
|
+
const { getScanStatus } = await import("./scan-cursor-5zqr3afj.js");
|
|
20309
20320
|
const scanStatus = await getScanStatus(directory);
|
|
20310
20321
|
if (scanStatus.remaining_estimate > 0) {
|
|
20311
20322
|
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.`);
|
|
@@ -20347,7 +20358,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
20347
20358
|
let actionResult;
|
|
20348
20359
|
if (options.llmDelegate) {
|
|
20349
20360
|
try {
|
|
20350
|
-
const { CURATOR_POSTMORTEM_PROMPT } = await import("./explorer-
|
|
20361
|
+
const { CURATOR_POSTMORTEM_PROMPT } = await import("./explorer-swjc297z.js");
|
|
20351
20362
|
const userInput = assembleLLMInput(effectivePlanId, scope, options.sessionID, planSummary, knowledgeSummary, curatorDigest, proposals, unactionable, retrospectives, driftReports);
|
|
20352
20363
|
const ac = new AbortController;
|
|
20353
20364
|
const timer = setTimeout(() => ac.abort(), options.llmTimeoutMs ?? 300000);
|
|
@@ -20477,9 +20488,9 @@ var _internals24 = {
|
|
|
20477
20488
|
verifyPostMortemKnowledgeActions,
|
|
20478
20489
|
repairPostMortemActions,
|
|
20479
20490
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
20480
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
20491
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-n1cj94m0.js");
|
|
20481
20492
|
try {
|
|
20482
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
20493
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-jnemjn16.js");
|
|
20483
20494
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
20484
20495
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
20485
20496
|
} catch {
|
|
@@ -20487,11 +20498,11 @@ var _internals24 = {
|
|
|
20487
20498
|
}
|
|
20488
20499
|
},
|
|
20489
20500
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
20490
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
20501
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-7ycd6x29.js");
|
|
20491
20502
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
20492
20503
|
},
|
|
20493
20504
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
20494
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
20505
|
+
const { checkHivePromotions } = await import("./hive-promoter-epnj14q8.js");
|
|
20495
20506
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
20496
20507
|
},
|
|
20497
20508
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -20500,7 +20511,7 @@ var _internals24 = {
|
|
|
20500
20511
|
activateProposal,
|
|
20501
20512
|
listSkills: listSkills2,
|
|
20502
20513
|
sanitizeSlug
|
|
20503
|
-
} = await import("./skill-generator-
|
|
20514
|
+
} = await import("./skill-generator-560ksca8.js");
|
|
20504
20515
|
const result = {
|
|
20505
20516
|
approved: [],
|
|
20506
20517
|
rejected: [],
|
|
@@ -23127,9 +23138,9 @@ function hashContent(content) {
|
|
|
23127
23138
|
return createHash9("sha1").update(content).digest("hex");
|
|
23128
23139
|
}
|
|
23129
23140
|
async function loadConfigForPolicyCurator(directory) {
|
|
23130
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
23141
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-n1cj94m0.js");
|
|
23131
23142
|
try {
|
|
23132
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
23143
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-jnemjn16.js");
|
|
23133
23144
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
23134
23145
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
23135
23146
|
} catch {
|
|
@@ -26474,7 +26485,7 @@ async function runFinalizeStage(ctx) {
|
|
|
26474
26485
|
}
|
|
26475
26486
|
}
|
|
26476
26487
|
try {
|
|
26477
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
26488
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-n1cj94m0.js");
|
|
26478
26489
|
const { config: pmLoadedConfig } = _internals34.loadPluginConfigWithMeta(ctx.directory);
|
|
26479
26490
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
26480
26491
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -28704,9 +28715,9 @@ var _internals39 = {
|
|
|
28704
28715
|
loadPluginConfigWithMeta,
|
|
28705
28716
|
loadCuratorDeps: async () => {
|
|
28706
28717
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
28707
|
-
import("./schema-
|
|
28708
|
-
import("./curator-
|
|
28709
|
-
import("./curator-llm-factory-
|
|
28718
|
+
import("./schema-n1cj94m0.js"),
|
|
28719
|
+
import("./curator-7ycd6x29.js"),
|
|
28720
|
+
import("./curator-llm-factory-4d5pzh47.js")
|
|
28710
28721
|
]);
|
|
28711
28722
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
28712
28723
|
}
|
|
@@ -29510,7 +29521,8 @@ async function computeKnowledgeDebug(directory) {
|
|
|
29510
29521
|
ignored: eventsByType.ignored ?? 0,
|
|
29511
29522
|
contradicted: eventsByType.contradicted ?? 0,
|
|
29512
29523
|
violated: eventsByType.violated ?? 0,
|
|
29513
|
-
no_relevant: eventsByType.no_relevant ?? 0
|
|
29524
|
+
no_relevant: eventsByType.no_relevant ?? 0,
|
|
29525
|
+
unacknowledged: eventsByType.unacknowledged ?? 0
|
|
29514
29526
|
}
|
|
29515
29527
|
},
|
|
29516
29528
|
cohort: {
|
|
@@ -29607,7 +29619,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
29607
29619
|
let scanCompleted = false;
|
|
29608
29620
|
let scanRemaining = 0;
|
|
29609
29621
|
try {
|
|
29610
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
29622
|
+
const { getScanStatus } = await import("./scan-cursor-5zqr3afj.js");
|
|
29611
29623
|
const status = await getScanStatus(directory);
|
|
29612
29624
|
scanGeneration = status.generation;
|
|
29613
29625
|
scanCompleted = status.completed;
|
|
@@ -29617,17 +29629,17 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
29617
29629
|
try {
|
|
29618
29630
|
const { isLinked: isLinked2 } = await import("./knowledge-link-mm1w967j.js");
|
|
29619
29631
|
if (isLinked2(directory)) {
|
|
29620
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
29632
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-n1cj94m0.js");
|
|
29621
29633
|
let config;
|
|
29622
29634
|
try {
|
|
29623
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
29635
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-jnemjn16.js");
|
|
29624
29636
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
29625
29637
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
29626
29638
|
} catch {
|
|
29627
29639
|
config = KnowledgeConfigSchema2.parse({});
|
|
29628
29640
|
}
|
|
29629
29641
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
29630
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
29642
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-mbv3b27c.js");
|
|
29631
29643
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
29632
29644
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
29633
29645
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -30838,7 +30850,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
30838
30850
|
const result = runConfigDoctor(config, directory);
|
|
30839
30851
|
let output;
|
|
30840
30852
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
30841
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
30853
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-exj26ryt.js");
|
|
30842
30854
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
30843
30855
|
applyLossy: true
|
|
30844
30856
|
});
|
|
@@ -52259,7 +52271,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
52259
52271
|
async function handleHelpCommand(ctx) {
|
|
52260
52272
|
const targetCommand = ctx.args.join(" ");
|
|
52261
52273
|
if (!targetCommand) {
|
|
52262
|
-
const { buildHelpText } = await import("./index-
|
|
52274
|
+
const { buildHelpText } = await import("./index-kq9zb1cv.js");
|
|
52263
52275
|
return buildHelpText();
|
|
52264
52276
|
}
|
|
52265
52277
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -52268,7 +52280,7 @@ async function handleHelpCommand(ctx) {
|
|
|
52268
52280
|
return _internals14.buildDetailedHelp(resolved.key, resolved.entry);
|
|
52269
52281
|
}
|
|
52270
52282
|
const similar = _internals14.findSimilarCommands(targetCommand);
|
|
52271
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
52283
|
+
const { buildHelpText: fullHelp } = await import("./index-kq9zb1cv.js");
|
|
52272
52284
|
if (similar.length > 0) {
|
|
52273
52285
|
return `Command '/swarm ${targetCommand}' not found.
|
|
52274
52286
|
|
|
@@ -52445,7 +52457,7 @@ var COMMAND_REGISTRY = {
|
|
|
52445
52457
|
},
|
|
52446
52458
|
"guardrail explain": {
|
|
52447
52459
|
handler: async (ctx) => {
|
|
52448
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
52460
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-2jrqv2zf.js");
|
|
52449
52461
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
52450
52462
|
},
|
|
52451
52463
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -52455,7 +52467,7 @@ var COMMAND_REGISTRY = {
|
|
|
52455
52467
|
},
|
|
52456
52468
|
"guardrail-explain": {
|
|
52457
52469
|
handler: async (ctx) => {
|
|
52458
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
52470
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-2jrqv2zf.js");
|
|
52459
52471
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
52460
52472
|
},
|
|
52461
52473
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -52465,7 +52477,7 @@ var COMMAND_REGISTRY = {
|
|
|
52465
52477
|
},
|
|
52466
52478
|
"guardrail-log": {
|
|
52467
52479
|
handler: async (ctx) => {
|
|
52468
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
52480
|
+
const { handleGuardrailLog } = await import("./guardrail-log-c843gxnm.js");
|
|
52469
52481
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
52470
52482
|
},
|
|
52471
52483
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -66,7 +66,13 @@ function withDefaults(event) {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
async function appendKnowledgeEvent(directory, event) {
|
|
69
|
-
const populated =
|
|
69
|
+
const [populated] = await appendKnowledgeEventsBatch(directory, [event]);
|
|
70
|
+
return populated;
|
|
71
|
+
}
|
|
72
|
+
async function appendKnowledgeEventsBatch(directory, events) {
|
|
73
|
+
if (events.length === 0)
|
|
74
|
+
return [];
|
|
75
|
+
const populated = events.map(withDefaults);
|
|
70
76
|
const filePath = resolveKnowledgeEventsPath(directory);
|
|
71
77
|
const dirPath = path.dirname(filePath);
|
|
72
78
|
await mkdir(dirPath, { recursive: true });
|
|
@@ -75,7 +81,8 @@ async function appendKnowledgeEvent(directory, event) {
|
|
|
75
81
|
release = await import_proper_lockfile.default.lock(dirPath, {
|
|
76
82
|
retries: { retries: 200, minTimeout: 10, maxTimeout: 100 }
|
|
77
83
|
});
|
|
78
|
-
await appendFile(filePath, `${JSON.stringify(
|
|
84
|
+
await appendFile(filePath, `${populated.map((e) => JSON.stringify(e)).join(`
|
|
85
|
+
`)}
|
|
79
86
|
`, "utf-8");
|
|
80
87
|
try {
|
|
81
88
|
const content = await readFile(filePath, "utf-8");
|
|
@@ -106,6 +113,14 @@ async function recordKnowledgeEvent(directory, event) {
|
|
|
106
113
|
return null;
|
|
107
114
|
}
|
|
108
115
|
}
|
|
116
|
+
async function recordKnowledgeEventsBatch(directory, events) {
|
|
117
|
+
try {
|
|
118
|
+
return await appendKnowledgeEventsBatch(directory, events);
|
|
119
|
+
} catch (err) {
|
|
120
|
+
warn(`[knowledge-events] recordKnowledgeEventsBatch failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
109
124
|
async function appendHiveKnowledgeEvent(event) {
|
|
110
125
|
const populated = withDefaults(event);
|
|
111
126
|
const filePath = resolveHiveEventsPath2();
|
|
@@ -408,6 +423,8 @@ function recomputeCounters(events, legacyRecords = [], baseline = new Map) {
|
|
|
408
423
|
break;
|
|
409
424
|
case "no_relevant":
|
|
410
425
|
break;
|
|
426
|
+
case "unacknowledged":
|
|
427
|
+
break;
|
|
411
428
|
case "outcome": {
|
|
412
429
|
if (!e.knowledge_id)
|
|
413
430
|
break;
|
|
@@ -608,7 +625,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
608
625
|
deltas.push({ id, delta });
|
|
609
626
|
}
|
|
610
627
|
if (deltas.length > 0) {
|
|
611
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
628
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-7nvfh2n3.js");
|
|
612
629
|
await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
613
630
|
}
|
|
614
631
|
return {
|
|
@@ -643,4 +660,4 @@ var _internals = {
|
|
|
643
660
|
mergeRollupInto
|
|
644
661
|
};
|
|
645
662
|
|
|
646
|
-
export { KNOWLEDGE_EVENT_SCHEMA_VERSION, MAX_EVENT_LOG_ENTRIES, RECEIPT_EVENT_TYPES, resolveKnowledgeEventsPath, resolveKnowledgeCounterBaselinePath, resolveHiveEventsPath2 as resolveHiveEventsPath, resolveLegacyApplicationLogPath, newTraceId, newEventId, appendKnowledgeEvent, recordKnowledgeEvent, appendHiveKnowledgeEvent, recordHiveKnowledgeEvent, readKnowledgeEvents, readHiveKnowledgeEvents, readLegacyApplicationRecords, MAX_VIOLATION_TIMESTAMPS, recomputeCounters, countViolationsInWindow, countEmptyTraceTerminals, countEntryViolationsInWindow, countEntryContradictionsInWindow, readKnowledgeCounterRollups, effectiveRetrievalOutcomes, applyKnowledgeVerdictFeedback, _internals };
|
|
663
|
+
export { KNOWLEDGE_EVENT_SCHEMA_VERSION, MAX_EVENT_LOG_ENTRIES, RECEIPT_EVENT_TYPES, resolveKnowledgeEventsPath, resolveKnowledgeCounterBaselinePath, resolveHiveEventsPath2 as resolveHiveEventsPath, resolveLegacyApplicationLogPath, newTraceId, newEventId, appendKnowledgeEvent, appendKnowledgeEventsBatch, recordKnowledgeEvent, recordKnowledgeEventsBatch, appendHiveKnowledgeEvent, recordHiveKnowledgeEvent, readKnowledgeEvents, readHiveKnowledgeEvents, readLegacyApplicationRecords, MAX_VIOLATION_TIMESTAMPS, recomputeCounters, countViolationsInWindow, countEmptyTraceTerminals, countEntryViolationsInWindow, countEntryContradictionsInWindow, readKnowledgeCounterRollups, effectiveRetrievalOutcomes, applyKnowledgeVerdictFeedback, _internals };
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-9s5b8wrs.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-6yk6ezvj.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
|
@@ -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-0akk3p15.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-z618vhda.js");
|
|
773
|
+
const { KnowledgeConfigSchema } = await import("./schema-n1cj94m0.js");
|
|
774
774
|
let config;
|
|
775
775
|
try {
|
|
776
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
776
|
+
const { loadPluginConfigWithMeta } = await import("./index-jnemjn16.js");
|
|
777
777
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
778
778
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
779
779
|
} catch {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadPluginConfigWithMeta,
|
|
8
8
|
loadPluginConfigWithMetaAsync,
|
|
9
9
|
resolveWorktreeIsolationConfig
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-kjg6vgqs.js";
|
|
11
11
|
import {
|
|
12
12
|
ApprovalEvidenceSchema,
|
|
13
13
|
BaseEvidenceSchema,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
TurboConfigSchema,
|
|
55
55
|
WorktreeIsolationConfigSchema,
|
|
56
56
|
resolveAutoReviewConfig
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-k8arazbb.js";
|
|
58
58
|
import"./index-bk5tah7q.js";
|
|
59
59
|
import {
|
|
60
60
|
MigrationStatusSchema,
|
|
@@ -21,7 +21,7 @@ var package_default;
|
|
|
21
21
|
var init_package = __esm(() => {
|
|
22
22
|
package_default = {
|
|
23
23
|
name: "opencode-swarm",
|
|
24
|
-
version: "7.135.
|
|
24
|
+
version: "7.135.5",
|
|
25
25
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
26
26
|
main: "dist/index.js",
|
|
27
27
|
types: "dist/index.d.ts",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-gvfw2y6v.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-qyn0b2jj.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -84,36 +84,36 @@ import {
|
|
|
84
84
|
handleWriteRetroCommand,
|
|
85
85
|
normalizeSwarmCommandInput,
|
|
86
86
|
resolveCommand
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-9s5b8wrs.js";
|
|
88
88
|
import"./index-vm4xw9z3.js";
|
|
89
|
-
import"./index-
|
|
90
|
-
import"./index-
|
|
89
|
+
import"./index-6yk6ezvj.js";
|
|
90
|
+
import"./index-db52969t.js";
|
|
91
91
|
import"./index-cggqh2dz.js";
|
|
92
92
|
import"./index-4905hd2m.js";
|
|
93
93
|
import"./index-134d35c1.js";
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
96
|
-
import"./index-
|
|
97
|
-
import"./index-
|
|
94
|
+
import"./index-8et4bx6j.js";
|
|
95
|
+
import"./index-ym516a9a.js";
|
|
96
|
+
import"./index-0csbx1wc.js";
|
|
97
|
+
import"./index-6mjf4vr1.js";
|
|
98
98
|
import"./index-c8s9a3zh.js";
|
|
99
99
|
import"./index-9ss2m4rs.js";
|
|
100
100
|
import"./index-y6a7gjtj.js";
|
|
101
101
|
import"./index-mrtms113.js";
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
102
|
+
import"./index-t1gszcwg.js";
|
|
103
|
+
import"./index-09w3ezq2.js";
|
|
104
104
|
import"./index-rtry5xyf.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
105
|
+
import"./index-hw6yt4rs.js";
|
|
106
|
+
import"./index-bx10dq60.js";
|
|
107
107
|
import"./index-ae75rja9.js";
|
|
108
108
|
import"./index-dzyjb33e.js";
|
|
109
109
|
import"./index-ey29aap6.js";
|
|
110
|
-
import"./index-
|
|
110
|
+
import"./index-kjg6vgqs.js";
|
|
111
111
|
import"./index-k5jrywpr.js";
|
|
112
112
|
import"./index-n832052r.js";
|
|
113
113
|
import {
|
|
114
114
|
init_schema,
|
|
115
115
|
stripKnownSwarmPrefix
|
|
116
|
-
} from "./index-
|
|
116
|
+
} from "./index-k8arazbb.js";
|
|
117
117
|
import"./index-bk5tah7q.js";
|
|
118
118
|
import"./index-8fwhhayc.js";
|
|
119
119
|
import"./index-q1exe2b3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-09w3ezq2.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-hw6yt4rs.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
15
|
} from "./index-dzyjb33e.js";
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-hw6yt4rs.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-bx10dq60.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-z618vhda.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-n1cj94m0.js");
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-jnemjn16.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|