opencode-swarm 7.125.0 → 7.125.1
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/swarm-pr-feedback/SKILL.md +11 -127
- package/.opencode/skills/swarm-pr-feedback/references/bot-claim-verification.md +71 -0
- package/.opencode/skills/swarm-pr-feedback/references/operational-gotchas.md +49 -0
- package/.opencode/skills/swarm-pr-review/SKILL.md +6 -346
- package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +235 -0
- package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +103 -0
- package/.opencode/skills/writing-tests/SKILL.md +4 -123
- package/.opencode/skills/writing-tests/references/mock-and-seam-inventory.md +43 -0
- package/dist/cli/{config-doctor-be9sxqx8.js → config-doctor-g3m2q646.js} +2 -2
- package/dist/cli/{curation-policy-52kt6d7t.js → curation-policy-vgbx8530.js} +2 -2
- package/dist/cli/{curator-llm-factory-frde1955.js → curator-llm-factory-7pvqy94w.js} +13 -13
- package/dist/cli/{curator-hbst8nbc.js → curator-xk4g1nx2.js} +13 -13
- package/dist/cli/{evidence-summary-service-9hq7n9k9.js → evidence-summary-service-v4h2w487.js} +1 -1
- package/dist/cli/{guardrail-explain-112kqmbc.js → guardrail-explain-wfk16bpr.js} +14 -14
- package/dist/cli/{guardrail-log-c8zcab91.js → guardrail-log-5zz9xx6z.js} +3 -3
- package/dist/cli/{hive-promoter-448xs2tp.js → hive-promoter-njwc5rt0.js} +13 -13
- package/dist/cli/{index-kt0awv1n.js → index-3k8pg467.js} +1 -1
- package/dist/cli/{index-n6chz2g8.js → index-83rwq7pb.js} +1 -1
- package/dist/cli/{index-xattnmyb.js → index-8yvqkbw7.js} +3 -1
- package/dist/cli/{index-99ed0h32.js → index-93cq8t5b.js} +5 -5
- package/dist/cli/{index-9hbwa5x1.js → index-cz6fv84h.js} +15 -15
- package/dist/cli/{index-amspa811.js → index-dsf1yv4s.js} +119 -44
- package/dist/cli/{index-4rzzzjtg.js → index-fs02c7tz.js} +277 -16
- package/dist/cli/{index-dx2c2wjt.js → index-ghteqdy1.js} +2 -2
- package/dist/cli/{index-67hqr2zv.js → index-kvrk3h8p.js} +1 -1
- package/dist/cli/{index-09vd53pz.js → index-kws8zn6y.js} +1 -1
- package/dist/cli/{index-7j3sm7h8.js → index-mhhmecsw.js} +2 -2
- package/dist/cli/{index-yt1v62pv.js → index-mwdcvh0e.js} +4 -4
- package/dist/cli/{index-6vfvc36k.js → index-pbjenws7.js} +1 -1
- package/dist/cli/{index-958hf0yr.js → index-rpg8qqjs.js} +2 -2
- package/dist/cli/{index-vtwqjr4z.js → index-tn3shyqj.js} +3 -3
- package/dist/cli/{index-jh6s75f6.js → index-txragda9.js} +1 -1
- package/dist/cli/{index-0y6tmm9v.js → index-z4sc6yxc.js} +1 -1
- package/dist/cli/index.js +13 -13
- package/dist/cli/{knowledge-escalator-htafbhxg.js → knowledge-escalator-jtyykzqc.js} +3 -3
- package/dist/cli/{knowledge-events-havw8c4t.js → knowledge-events-qhr97sy9.js} +1 -1
- package/dist/cli/{knowledge-store-hqngpt2v.js → knowledge-store-332x3pjv.js} +1 -1
- package/dist/cli/{knowledge-validator-g7mpnazh.js → knowledge-validator-3t8tgzsz.js} +4 -4
- package/dist/cli/{scan-cursor-sx7cvh8v.js → scan-cursor-q21c9k9q.js} +2 -2
- package/dist/cli/{schema-2418eqy3.js → schema-y2d7j2jk.js} +1 -1
- package/dist/cli/{skill-generator-zggy797r.js → skill-generator-3gkxx98d.js} +5 -5
- package/dist/commands/close.d.ts +4 -2
- package/dist/config/schema.d.ts +4 -0
- package/dist/evidence/documents-retention.d.ts +116 -0
- package/dist/evidence/manager.d.ts +17 -0
- package/dist/index.js +374 -366
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
readDoctorArtifact,
|
|
5
5
|
removeStraySwarmDir,
|
|
6
6
|
runConfigDoctor
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-z4sc6yxc.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-fs02c7tz.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-tn3shyqj.js";
|
|
98
98
|
import {
|
|
99
99
|
readRecentEscalations
|
|
100
|
-
} from "./index-
|
|
100
|
+
} from "./index-93cq8t5b.js";
|
|
101
101
|
import {
|
|
102
102
|
alreadyCuratedThisGeneration,
|
|
103
103
|
claimNextScanBatch,
|
|
104
104
|
resolveCohortId
|
|
105
|
-
} from "./index-
|
|
105
|
+
} from "./index-kws8zn6y.js";
|
|
106
106
|
import {
|
|
107
107
|
CURATOR_INIT_PROMPT,
|
|
108
108
|
CURATOR_PHASE_PROMPT,
|
|
@@ -135,11 +135,11 @@ import {
|
|
|
135
135
|
validateActionability,
|
|
136
136
|
validateActionableFields,
|
|
137
137
|
validateLesson
|
|
138
|
-
} from "./index-
|
|
138
|
+
} from "./index-ghteqdy1.js";
|
|
139
139
|
import {
|
|
140
140
|
authorizeCuration,
|
|
141
141
|
buildConfigFingerprintInput
|
|
142
|
-
} from "./index-
|
|
142
|
+
} from "./index-kvrk3h8p.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-mwdcvh0e.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-83rwq7pb.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-3k8pg467.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-8yvqkbw7.js";
|
|
224
224
|
import {
|
|
225
225
|
KNOWLEDGE_SCHEMA_VERSION,
|
|
226
226
|
OUTCOME_BLOCK_THRESHOLD,
|
|
@@ -6023,15 +6023,59 @@ var _internals8 = {
|
|
|
6023
6023
|
function artifactLabel(artifact) {
|
|
6024
6024
|
return `${artifact.namespace}/${artifact.id}`;
|
|
6025
6025
|
}
|
|
6026
|
+
function formatBytes(bytes) {
|
|
6027
|
+
if (bytes < 1024)
|
|
6028
|
+
return `${bytes} B`;
|
|
6029
|
+
if (bytes < 1024 * 1024)
|
|
6030
|
+
return `${(bytes / 1024).toFixed(1)} KiB`;
|
|
6031
|
+
return `${(bytes / (1024 * 1024)).toFixed(2)} MiB`;
|
|
6032
|
+
}
|
|
6033
|
+
function formatDocumentsCacheSection(cache, maxBytes, maxRecords) {
|
|
6034
|
+
const capsConfigured = typeof maxBytes === "number" && maxBytes > 0 || typeof maxRecords === "number" && maxRecords > 0;
|
|
6035
|
+
if (!capsConfigured)
|
|
6036
|
+
return "";
|
|
6037
|
+
const lines = [
|
|
6038
|
+
"",
|
|
6039
|
+
"### Documents cache (`.swarm/evidence-cache/documents.jsonl`)"
|
|
6040
|
+
];
|
|
6041
|
+
if (cache.aborted) {
|
|
6042
|
+
lines.push(`**Aborted**: file exceeds the 100 MiB read cap; left untouched. Set a tighter cap or prune manually.`);
|
|
6043
|
+
return lines.join(`
|
|
6044
|
+
`);
|
|
6045
|
+
}
|
|
6046
|
+
const capParts = [];
|
|
6047
|
+
if (typeof maxBytes === "number" && maxBytes > 0) {
|
|
6048
|
+
capParts.push(`max ${formatBytes(maxBytes)}`);
|
|
6049
|
+
}
|
|
6050
|
+
if (typeof maxRecords === "number" && maxRecords > 0) {
|
|
6051
|
+
capParts.push(`max ${maxRecords} records`);
|
|
6052
|
+
}
|
|
6053
|
+
lines.push(`**Retention caps**: ${capParts.join(", ")}`);
|
|
6054
|
+
lines.push(`**Inventory**: ${cache.inventory} record(s), ${formatBytes(cache.bytesBefore)}`);
|
|
6055
|
+
if (cache.dryRun) {
|
|
6056
|
+
lines.push(`**Would prune**: ${cache.selected} record(s) \u2192 ${formatBytes(cache.bytesAfter)}`);
|
|
6057
|
+
} else {
|
|
6058
|
+
lines.push(`**Pruned**: ${cache.archived} record(s) \u2192 ${formatBytes(cache.bytesAfter)}`);
|
|
6059
|
+
}
|
|
6060
|
+
if (cache.corrupt > 0) {
|
|
6061
|
+
lines.push(`**Corrupt rows dropped**: ${cache.corrupt} (unparseable lines removed from the cache; reported, not relocated)`);
|
|
6062
|
+
}
|
|
6063
|
+
return lines.join(`
|
|
6064
|
+
`);
|
|
6065
|
+
}
|
|
6026
6066
|
async function handleArchiveCommand(directory, args) {
|
|
6027
6067
|
const config = loadPluginConfig(directory);
|
|
6028
6068
|
const maxAgeDays = config?.evidence?.max_age_days ?? 90;
|
|
6029
6069
|
const maxBundles = config?.evidence?.max_bundles ?? 1000;
|
|
6070
|
+
const cacheMaxBytes = config?.evidence?.cache_max_bytes;
|
|
6071
|
+
const cacheMaxRecords = config?.evidence?.cache_max_records;
|
|
6030
6072
|
const dryRun = args.includes("--dry-run");
|
|
6031
6073
|
const report = await archiveEvidence(directory, maxAgeDays, maxBundles, {
|
|
6032
6074
|
report: true,
|
|
6033
6075
|
dryRun,
|
|
6034
|
-
now: _internals8.now()
|
|
6076
|
+
now: _internals8.now(),
|
|
6077
|
+
cacheMaxBytes,
|
|
6078
|
+
cacheMaxRecords
|
|
6035
6079
|
});
|
|
6036
6080
|
const evaluationSelected = report.evaluation.selected.map(artifactLabel);
|
|
6037
6081
|
const evaluationArchived = report.evaluation.archived.map(artifactLabel);
|
|
@@ -6040,13 +6084,16 @@ async function handleArchiveCommand(directory, args) {
|
|
|
6040
6084
|
const corruptCount = report.evaluation.corrupt.length;
|
|
6041
6085
|
const inventoryCount = report.inventoryEvidence.length + report.evaluation.inventory.length;
|
|
6042
6086
|
if (dryRun) {
|
|
6087
|
+
const cacheSection2 = formatDocumentsCacheSection(report.documentsCache, cacheMaxBytes, cacheMaxRecords);
|
|
6043
6088
|
if (selectedCount === 0) {
|
|
6044
|
-
|
|
6045
|
-
|
|
6089
|
+
const baseMsg = corruptCount > 0 ? `No valid evidence bundles to archive. Preserved ${corruptCount} corrupt evaluation artifact(s) for data-quality review.` : inventoryCount === 0 ? "No evidence bundles to archive." : `No evidence bundles older than ${maxAgeDays} days found, and bundle count (${inventoryCount}) is within max_bundles limit (${maxBundles}).`;
|
|
6090
|
+
if (cacheSection2) {
|
|
6091
|
+
return `${baseMsg}
|
|
6092
|
+
|
|
6093
|
+
## Archive Preview (dry run)
|
|
6094
|
+
${cacheSection2}`;
|
|
6046
6095
|
}
|
|
6047
|
-
|
|
6048
|
-
return "No evidence bundles to archive.";
|
|
6049
|
-
return `No evidence bundles older than ${maxAgeDays} days found, and bundle count (${inventoryCount}) is within max_bundles limit (${maxBundles}).`;
|
|
6096
|
+
return baseMsg;
|
|
6050
6097
|
}
|
|
6051
6098
|
const lines2 = [
|
|
6052
6099
|
"## Archive Preview (dry run)",
|
|
@@ -6072,11 +6119,24 @@ async function handleArchiveCommand(directory, args) {
|
|
|
6072
6119
|
if (report.evaluation.protected.length > 0 || corruptCount > 0) {
|
|
6073
6120
|
lines2.push("", `**Evaluation artifacts preserved**: ${report.evaluation.protected.length} lineage-protected, ${corruptCount} corrupt/data-quality`);
|
|
6074
6121
|
}
|
|
6122
|
+
if (cacheSection2)
|
|
6123
|
+
lines2.push(cacheSection2);
|
|
6075
6124
|
return lines2.join(`
|
|
6076
6125
|
`);
|
|
6077
6126
|
}
|
|
6078
6127
|
if (archivedCount === 0) {
|
|
6079
6128
|
const failedCount2 = report.failedEvidence.length + report.evaluation.failed.length;
|
|
6129
|
+
const cacheSection2 = formatDocumentsCacheSection(report.documentsCache, cacheMaxBytes, cacheMaxRecords);
|
|
6130
|
+
if (cacheSection2 && report.documentsCache.archived > 0) {
|
|
6131
|
+
const lines2 = [
|
|
6132
|
+
"## Documents Cache Pruned",
|
|
6133
|
+
"",
|
|
6134
|
+
"No evidence bundles were archived.",
|
|
6135
|
+
cacheSection2
|
|
6136
|
+
];
|
|
6137
|
+
return lines2.join(`
|
|
6138
|
+
`);
|
|
6139
|
+
}
|
|
6080
6140
|
if (failedCount2 > 0) {
|
|
6081
6141
|
return `No evidence bundles were archived; ${failedCount2} selected deletion(s) failed and remain on disk.`;
|
|
6082
6142
|
}
|
|
@@ -6100,6 +6160,9 @@ async function handleArchiveCommand(directory, args) {
|
|
|
6100
6160
|
if (failedCount > 0) {
|
|
6101
6161
|
lines.push("", `**Failed deletions preserved**: ${failedCount}`);
|
|
6102
6162
|
}
|
|
6163
|
+
const cacheSection = formatDocumentsCacheSection(report.documentsCache, cacheMaxBytes, cacheMaxRecords);
|
|
6164
|
+
if (cacheSection)
|
|
6165
|
+
lines.push(cacheSection);
|
|
6103
6166
|
return lines.join(`
|
|
6104
6167
|
`);
|
|
6105
6168
|
}
|
|
@@ -10752,7 +10815,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
10752
10815
|
}
|
|
10753
10816
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
10754
10817
|
try {
|
|
10755
|
-
const skillModule = await import("./skill-generator-
|
|
10818
|
+
const skillModule = await import("./skill-generator-3gkxx98d.js");
|
|
10756
10819
|
for (const cand of skillCandidates) {
|
|
10757
10820
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
10758
10821
|
continue;
|
|
@@ -11089,7 +11152,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
11089
11152
|
} catch {}
|
|
11090
11153
|
}
|
|
11091
11154
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
11092
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
11155
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-jtyykzqc.js");
|
|
11093
11156
|
for (const { id } of contradictedEntries) {
|
|
11094
11157
|
try {
|
|
11095
11158
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -11888,7 +11951,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
11888
11951
|
warnings.push("Failed to collect knowledge summary.");
|
|
11889
11952
|
}
|
|
11890
11953
|
try {
|
|
11891
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
11954
|
+
const { getScanStatus } = await import("./scan-cursor-q21c9k9q.js");
|
|
11892
11955
|
const scanStatus = await getScanStatus(directory);
|
|
11893
11956
|
if (scanStatus.remaining_estimate > 0) {
|
|
11894
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.`);
|
|
@@ -12060,9 +12123,9 @@ var _internals15 = {
|
|
|
12060
12123
|
verifyPostMortemKnowledgeActions,
|
|
12061
12124
|
repairPostMortemActions,
|
|
12062
12125
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
12063
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
12126
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-y2d7j2jk.js");
|
|
12064
12127
|
try {
|
|
12065
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
12128
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rpg8qqjs.js");
|
|
12066
12129
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
12067
12130
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
12068
12131
|
} catch {
|
|
@@ -12070,11 +12133,11 @@ var _internals15 = {
|
|
|
12070
12133
|
}
|
|
12071
12134
|
},
|
|
12072
12135
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
12073
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
12136
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-xk4g1nx2.js");
|
|
12074
12137
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
12075
12138
|
},
|
|
12076
12139
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
12077
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
12140
|
+
const { checkHivePromotions } = await import("./hive-promoter-njwc5rt0.js");
|
|
12078
12141
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
12079
12142
|
},
|
|
12080
12143
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -12083,7 +12146,7 @@ var _internals15 = {
|
|
|
12083
12146
|
activateProposal,
|
|
12084
12147
|
listSkills: listSkills2,
|
|
12085
12148
|
sanitizeSlug
|
|
12086
|
-
} = await import("./skill-generator-
|
|
12149
|
+
} = await import("./skill-generator-3gkxx98d.js");
|
|
12087
12150
|
const result = {
|
|
12088
12151
|
approved: [],
|
|
12089
12152
|
rejected: [],
|
|
@@ -14608,9 +14671,9 @@ function hashContent(content) {
|
|
|
14608
14671
|
return createHash7("sha1").update(content).digest("hex");
|
|
14609
14672
|
}
|
|
14610
14673
|
async function loadConfigForPolicyCurator(directory) {
|
|
14611
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
14674
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-y2d7j2jk.js");
|
|
14612
14675
|
try {
|
|
14613
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
14676
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rpg8qqjs.js");
|
|
14614
14677
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
14615
14678
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
14616
14679
|
} catch {
|
|
@@ -17771,7 +17834,7 @@ async function runFinalizeStage(ctx) {
|
|
|
17771
17834
|
}
|
|
17772
17835
|
}
|
|
17773
17836
|
try {
|
|
17774
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
17837
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-y2d7j2jk.js");
|
|
17775
17838
|
const { config: pmLoadedConfig } = _internals24.loadPluginConfigWithMeta(ctx.directory);
|
|
17776
17839
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
17777
17840
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -17968,6 +18031,8 @@ async function runArchiveStage(ctx) {
|
|
|
17968
18031
|
async function runArchiveEvidenceRetention(ctx) {
|
|
17969
18032
|
let maxAgeDays = 30;
|
|
17970
18033
|
let maxBundles = 10;
|
|
18034
|
+
let cacheMaxBytes;
|
|
18035
|
+
let cacheMaxRecords;
|
|
17971
18036
|
try {
|
|
17972
18037
|
const { config: evidenceLoadedConfig } = _internals24.loadPluginConfigWithMeta(ctx.directory);
|
|
17973
18038
|
const evidenceCfg = evidenceLoadedConfig.evidence ?? {};
|
|
@@ -17977,9 +18042,19 @@ async function runArchiveEvidenceRetention(ctx) {
|
|
|
17977
18042
|
if (typeof evidenceCfg.max_bundles === "number") {
|
|
17978
18043
|
maxBundles = evidenceCfg.max_bundles;
|
|
17979
18044
|
}
|
|
18045
|
+
if (typeof evidenceCfg.cache_max_bytes === "number") {
|
|
18046
|
+
cacheMaxBytes = evidenceCfg.cache_max_bytes;
|
|
18047
|
+
}
|
|
18048
|
+
if (typeof evidenceCfg.cache_max_records === "number") {
|
|
18049
|
+
cacheMaxRecords = evidenceCfg.cache_max_records;
|
|
18050
|
+
}
|
|
17980
18051
|
} catch {}
|
|
17981
18052
|
try {
|
|
17982
|
-
await _internals24.archiveEvidence(ctx.directory, maxAgeDays, maxBundles
|
|
18053
|
+
await _internals24.archiveEvidence(ctx.directory, maxAgeDays, maxBundles, {
|
|
18054
|
+
report: true,
|
|
18055
|
+
cacheMaxBytes,
|
|
18056
|
+
cacheMaxRecords
|
|
18057
|
+
});
|
|
17983
18058
|
} catch (error2) {
|
|
17984
18059
|
const msg = error2 instanceof Error ? error2.message : String(error2);
|
|
17985
18060
|
ctx.warnings.push(`Evidence retention archive failed: ${msg}`);
|
|
@@ -19928,9 +20003,9 @@ var _internals28 = {
|
|
|
19928
20003
|
readSwarmFileAsync,
|
|
19929
20004
|
loadCuratorDeps: async () => {
|
|
19930
20005
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
19931
|
-
import("./schema-
|
|
19932
|
-
import("./curator-
|
|
19933
|
-
import("./curator-llm-factory-
|
|
20006
|
+
import("./schema-y2d7j2jk.js"),
|
|
20007
|
+
import("./curator-xk4g1nx2.js"),
|
|
20008
|
+
import("./curator-llm-factory-7pvqy94w.js")
|
|
19934
20009
|
]);
|
|
19935
20010
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
19936
20011
|
}
|
|
@@ -20429,7 +20504,7 @@ import { fileURLToPath } from "url";
|
|
|
20429
20504
|
// package.json
|
|
20430
20505
|
var package_default = {
|
|
20431
20506
|
name: "opencode-swarm",
|
|
20432
|
-
version: "7.125.
|
|
20507
|
+
version: "7.125.1",
|
|
20433
20508
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
20434
20509
|
main: "dist/index.js",
|
|
20435
20510
|
types: "dist/index.d.ts",
|
|
@@ -20950,7 +21025,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
20950
21025
|
let scanCompleted = false;
|
|
20951
21026
|
let scanRemaining = 0;
|
|
20952
21027
|
try {
|
|
20953
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
21028
|
+
const { getScanStatus } = await import("./scan-cursor-q21c9k9q.js");
|
|
20954
21029
|
const status = await getScanStatus(directory);
|
|
20955
21030
|
scanGeneration = status.generation;
|
|
20956
21031
|
scanCompleted = status.completed;
|
|
@@ -20960,17 +21035,17 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
20960
21035
|
try {
|
|
20961
21036
|
const { isLinked: isLinked2 } = await import("./knowledge-link-4yd2z8ev.js");
|
|
20962
21037
|
if (isLinked2(directory)) {
|
|
20963
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
21038
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-y2d7j2jk.js");
|
|
20964
21039
|
let config;
|
|
20965
21040
|
try {
|
|
20966
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
21041
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rpg8qqjs.js");
|
|
20967
21042
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
20968
21043
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
20969
21044
|
} catch {
|
|
20970
21045
|
config = KnowledgeConfigSchema2.parse({});
|
|
20971
21046
|
}
|
|
20972
21047
|
const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
|
|
20973
|
-
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-
|
|
21048
|
+
const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-vgbx8530.js");
|
|
20974
21049
|
const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
|
|
20975
21050
|
const cohortFp = await readCohortConfigFingerprint(directory);
|
|
20976
21051
|
configMatch = cohortFp === null ? null : currentFp === cohortFp;
|
|
@@ -22158,7 +22233,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
22158
22233
|
const result = runConfigDoctor(config, directory);
|
|
22159
22234
|
let output;
|
|
22160
22235
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
22161
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
22236
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-g3m2q646.js");
|
|
22162
22237
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true);
|
|
22163
22238
|
output = formatDoctorMarkdown(fixResult.result);
|
|
22164
22239
|
} else {
|
|
@@ -22971,7 +23046,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
22971
23046
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
22972
23047
|
}
|
|
22973
23048
|
async function handleEvidenceSummaryCommand(directory) {
|
|
22974
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
23049
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-v4h2w487.js");
|
|
22975
23050
|
const artifact = await buildEvidenceSummary(directory);
|
|
22976
23051
|
if (!artifact) {
|
|
22977
23052
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -40933,7 +41008,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
40933
41008
|
async function handleHelpCommand(ctx) {
|
|
40934
41009
|
const targetCommand = ctx.args.join(" ");
|
|
40935
41010
|
if (!targetCommand) {
|
|
40936
|
-
const { buildHelpText } = await import("./index-
|
|
41011
|
+
const { buildHelpText } = await import("./index-cz6fv84h.js");
|
|
40937
41012
|
return buildHelpText();
|
|
40938
41013
|
}
|
|
40939
41014
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -40942,7 +41017,7 @@ async function handleHelpCommand(ctx) {
|
|
|
40942
41017
|
return _internals62.buildDetailedHelp(resolved.key, resolved.entry);
|
|
40943
41018
|
}
|
|
40944
41019
|
const similar = _internals62.findSimilarCommands(targetCommand);
|
|
40945
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
41020
|
+
const { buildHelpText: fullHelp } = await import("./index-cz6fv84h.js");
|
|
40946
41021
|
if (similar.length > 0) {
|
|
40947
41022
|
return `Command '/swarm ${targetCommand}' not found.
|
|
40948
41023
|
|
|
@@ -41081,7 +41156,7 @@ var COMMAND_REGISTRY = {
|
|
|
41081
41156
|
},
|
|
41082
41157
|
"guardrail explain": {
|
|
41083
41158
|
handler: async (ctx) => {
|
|
41084
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
41159
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-wfk16bpr.js");
|
|
41085
41160
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
41086
41161
|
},
|
|
41087
41162
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -41091,7 +41166,7 @@ var COMMAND_REGISTRY = {
|
|
|
41091
41166
|
},
|
|
41092
41167
|
"guardrail-explain": {
|
|
41093
41168
|
handler: async (ctx) => {
|
|
41094
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
41169
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-wfk16bpr.js");
|
|
41095
41170
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
41096
41171
|
},
|
|
41097
41172
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -41101,7 +41176,7 @@ var COMMAND_REGISTRY = {
|
|
|
41101
41176
|
},
|
|
41102
41177
|
"guardrail-log": {
|
|
41103
41178
|
handler: async (ctx) => {
|
|
41104
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
41179
|
+
const { handleGuardrailLog } = await import("./guardrail-log-5zz9xx6z.js");
|
|
41105
41180
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
41106
41181
|
},
|
|
41107
41182
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|