opencode-swarm 7.158.1 → 7.159.0
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/README.md +4 -2
- package/dist/cli/{coder-settlement-nrtcjr0h.js → coder-settlement-66mqw0xt.js} +3 -3
- package/dist/cli/{config-doctor-hs0x10ty.js → config-doctor-nkx61b9e.js} +2 -2
- package/dist/cli/{core-a42bexs1.js → core-b3db7gf6.js} +1 -1
- package/dist/cli/{curator-llm-factory-21vqqvn3.js → curator-llm-factory-c4y1mrr5.js} +19 -19
- package/dist/cli/{curator-yawrnk3t.js → curator-w4ntvkz5.js} +19 -19
- package/dist/cli/{evidence-summary-service-kmc92b95.js → evidence-summary-service-vadgnzk6.js} +6 -6
- package/dist/cli/{gate-evidence-6tzhdxb2.js → gate-evidence-0chatz5e.js} +2 -2
- package/dist/cli/{guardrail-explain-7xrdp18c.js → guardrail-explain-ax2qmsp4.js} +20 -20
- package/dist/cli/{guardrail-log-f16sdc3p.js → guardrail-log-t3c9g8tc.js} +3 -3
- package/dist/cli/{guardrail-reset-0ks08s0t.js → guardrail-reset-wvdb5sv5.js} +19 -19
- package/dist/cli/{hive-promoter-d661k3qq.js → hive-promoter-mfq3ee0n.js} +19 -19
- package/dist/cli/{index-ff8xjr1c.js → index-04yrxg0z.js} +1 -1
- package/dist/cli/{index-hrrzxz3q.js → index-1sdb57jv.js} +3 -3
- package/dist/cli/{index-5erwyk1b.js → index-35grv4jg.js} +3 -3
- package/dist/cli/{index-ac8rwjsg.js → index-3e8600a7.js} +130 -61
- package/dist/cli/{index-86vvhe8m.js → index-6e6qxf5q.js} +15 -1
- package/dist/cli/{index-nphnjeh8.js → index-8jnzp5ct.js} +2 -2
- package/dist/cli/{index-4wy9kzjg.js → index-8kfbdrxa.js} +21 -21
- package/dist/cli/{index-xzhk2hav.js → index-9vt2hknx.js} +1 -1
- package/dist/cli/{index-mt6qjp4c.js → index-b1tenv2s.js} +75 -72
- package/dist/cli/{index-203fqkqk.js → index-b82tq895.js} +1 -1
- package/dist/cli/{index-zy60xd05.js → index-e2s08v0q.js} +1 -1
- package/dist/cli/{index-xscjecyq.js → index-erdsawqz.js} +4 -4
- package/dist/cli/{index-tc14d2zy.js → index-fcp41snp.js} +3 -3
- package/dist/cli/{index-ygxb3jw4.js → index-ghjs1n7k.js} +3 -3
- package/dist/cli/{index-6x9jq0cd.js → index-hte1e31d.js} +2 -2
- package/dist/cli/{index-azx50qge.js → index-k48kgm6z.js} +5 -5
- package/dist/cli/{index-7qvfkgyk.js → index-k4arrwrz.js} +3 -3
- package/dist/cli/{index-t8g88esk.js → index-pvzaryhr.js} +1 -1
- package/dist/cli/{index-jz216dhj.js → index-tcbjjppb.js} +26 -2
- package/dist/cli/{index-tppnfxkm.js → index-vywbn766.js} +1 -1
- package/dist/cli/{index-2j07670d.js → index-we3nf5as.js} +1 -1
- package/dist/cli/{index-mfv7mfgg.js → index-xmz69g65.js} +1 -1
- package/dist/cli/{index-dr2tfawg.js → index-ynjy98vv.js} +2 -2
- package/dist/cli/index.js +27 -35
- package/dist/cli/{knowledge-escalator-9py5r6c9.js → knowledge-escalator-x85t1e66.js} +6 -6
- package/dist/cli/{knowledge-events-vcbece74.js → knowledge-events-bwx99mxc.js} +4 -4
- package/dist/cli/{knowledge-store-0rdfjv20.js → knowledge-store-21m81zsa.js} +1 -1
- package/dist/cli/{knowledge-validator-nwjnjgf5.js → knowledge-validator-yxcadg1p.js} +2 -2
- package/dist/cli/{pending-delegations-ht1vgaze.js → pending-delegations-b8qka5nf.js} +1 -1
- package/dist/cli/{pr-review-reentry-authorization-857b9rvv.js → pr-review-reentry-authorization-wv3ck5kh.js} +19 -19
- package/dist/cli/{scan-cursor-59yj7tp9.js → scan-cursor-m3w0tapb.js} +2 -2
- package/dist/cli/{schema-8a7fyp87.js → schema-0b0dqn28.js} +1 -1
- package/dist/cli/{scope-persistence-prdxtcr3.js → scope-persistence-199f7yqc.js} +4 -4
- package/dist/cli/{skill-generator-v2jkgp63.js → skill-generator-a2ekcbe2.js} +7 -7
- package/dist/cli/{worktree-collision-ownership-6x03w8h7.js → worktree-collision-ownership-5qaab3q7.js} +1 -1
- package/dist/cli/{worktree-isolation-s0setq2a.js → worktree-isolation-esesc842.js} +19 -19
- package/dist/commands/close.d.ts +2 -0
- package/dist/config/loader.d.ts +3 -0
- package/dist/config/project-init.d.ts +11 -7
- package/dist/config/schema.d.ts +1 -0
- package/dist/index.js +445 -442
- package/dist/tools/repo-graph/query.d.ts +1 -0
- package/dist/tools/repo-graph/symbol-query.d.ts +47 -0
- package/dist/tools/repo-graph/types.d.ts +267 -1
- package/dist/tools/repo-graph.d.ts +3 -1
- package/opencode-swarm.schema.json +5160 -0
- package/package.json +4 -2
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
protectedRoots,
|
|
16
16
|
redactDecisionLineForArchive,
|
|
17
17
|
stableCanonicalStringify
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-04yrxg0z.js";
|
|
19
19
|
import {
|
|
20
20
|
detectStraySwarmDirs,
|
|
21
21
|
readDoctorArtifact,
|
|
22
22
|
removeStraySwarmDir,
|
|
23
23
|
runConfigDoctor
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-6e6qxf5q.js";
|
|
25
25
|
import {
|
|
26
26
|
MAX_TRANSIENT_RETRIES,
|
|
27
27
|
archiveEvidence,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
validateProjectRoot,
|
|
69
69
|
validateSymlinkBoundary,
|
|
70
70
|
validateTargetWithinRoot
|
|
71
|
-
} from "./index-
|
|
71
|
+
} from "./index-k4arrwrz.js";
|
|
72
72
|
import {
|
|
73
73
|
EvaluationTaskV1Schema,
|
|
74
74
|
GateAuditManifestV1Schema,
|
|
@@ -129,15 +129,15 @@ import {
|
|
|
129
129
|
retireSkill,
|
|
130
130
|
selectCandidateEntries,
|
|
131
131
|
syncBundledProjectSkillsIfMissingAsync
|
|
132
|
-
} from "./index-
|
|
132
|
+
} from "./index-fcp41snp.js";
|
|
133
133
|
import {
|
|
134
134
|
readRecentEscalations
|
|
135
|
-
} from "./index-
|
|
135
|
+
} from "./index-k48kgm6z.js";
|
|
136
136
|
import {
|
|
137
137
|
alreadyCuratedThisGeneration,
|
|
138
138
|
claimNextScanBatch,
|
|
139
139
|
resolveCohortId
|
|
140
|
-
} from "./index-
|
|
140
|
+
} from "./index-xmz69g65.js";
|
|
141
141
|
import {
|
|
142
142
|
CURATOR_INIT_PROMPT,
|
|
143
143
|
CURATOR_PHASE_PROMPT,
|
|
@@ -173,7 +173,7 @@ import {
|
|
|
173
173
|
listCoderSettlementWalStates,
|
|
174
174
|
recoverCoderSettlement,
|
|
175
175
|
recoverStaleCoderSettlements
|
|
176
|
-
} from "./index-
|
|
176
|
+
} from "./index-1sdb57jv.js";
|
|
177
177
|
import {
|
|
178
178
|
parsePorcelainV2Snapshot,
|
|
179
179
|
resolveCommitCountSince,
|
|
@@ -217,7 +217,7 @@ import {
|
|
|
217
217
|
validateActionableFields,
|
|
218
218
|
validateLesson,
|
|
219
219
|
validateSkillPath
|
|
220
|
-
} from "./index-
|
|
220
|
+
} from "./index-vywbn766.js";
|
|
221
221
|
import {
|
|
222
222
|
authorizeCuration,
|
|
223
223
|
buildConfigFingerprintInput
|
|
@@ -252,12 +252,12 @@ import {
|
|
|
252
252
|
transitionTaskWorkflowEvidence,
|
|
253
253
|
withTaskEvidenceTransaction,
|
|
254
254
|
writeWorkflowWalFile
|
|
255
|
-
} from "./index-
|
|
255
|
+
} from "./index-we3nf5as.js";
|
|
256
256
|
import {
|
|
257
257
|
makeWorktreeBranchName,
|
|
258
258
|
provisionWorktree,
|
|
259
259
|
removeWorktree
|
|
260
|
-
} from "./index-
|
|
260
|
+
} from "./index-pvzaryhr.js";
|
|
261
261
|
import {
|
|
262
262
|
DEFAULT_STALE_DELEGATION_TIMEOUT_MS,
|
|
263
263
|
DELEGATION_COMPACTION_HIGH_WATER_BYTES,
|
|
@@ -272,7 +272,7 @@ import {
|
|
|
272
272
|
scanBackgroundCoderReservationsForAdmission,
|
|
273
273
|
scanDelegationsForRecovery,
|
|
274
274
|
sweepStaleDelegations
|
|
275
|
-
} from "./index-
|
|
275
|
+
} from "./index-e2s08v0q.js";
|
|
276
276
|
import {
|
|
277
277
|
compositeSessionKey,
|
|
278
278
|
sessionKeySuffix
|
|
@@ -283,7 +283,7 @@ import {
|
|
|
283
283
|
clearAllScopes,
|
|
284
284
|
clearScopeBindingFromDisk,
|
|
285
285
|
clearScopeBindings
|
|
286
|
-
} from "./index-
|
|
286
|
+
} from "./index-ynjy98vv.js";
|
|
287
287
|
import {
|
|
288
288
|
appendLedgerEvent,
|
|
289
289
|
computePlanHash,
|
|
@@ -298,7 +298,7 @@ import {
|
|
|
298
298
|
readPlanEpochIdentity,
|
|
299
299
|
replayFromLedgerWithStatus,
|
|
300
300
|
takeSnapshotEvent
|
|
301
|
-
} from "./index-
|
|
301
|
+
} from "./index-b82tq895.js";
|
|
302
302
|
import {
|
|
303
303
|
CORE_EVENT_LOCKED,
|
|
304
304
|
appendCoreEventSync,
|
|
@@ -357,7 +357,7 @@ import {
|
|
|
357
357
|
transactFile,
|
|
358
358
|
transactKnowledge,
|
|
359
359
|
wordBigrams
|
|
360
|
-
} from "./index-
|
|
360
|
+
} from "./index-erdsawqz.js";
|
|
361
361
|
import {
|
|
362
362
|
MAX_EVENT_LOG_ENTRIES,
|
|
363
363
|
_internals as _internals2,
|
|
@@ -373,10 +373,10 @@ import {
|
|
|
373
373
|
recordKnowledgeEvent,
|
|
374
374
|
recordPhaseCloseIntent,
|
|
375
375
|
resolveKnowledgeEventsPath
|
|
376
|
-
} from "./index-
|
|
376
|
+
} from "./index-35grv4jg.js";
|
|
377
377
|
import {
|
|
378
378
|
resolveWorktreeIsolationConfig
|
|
379
|
-
} from "./index-
|
|
379
|
+
} from "./index-hte1e31d.js";
|
|
380
380
|
import {
|
|
381
381
|
RetrospectiveEvidenceSchema
|
|
382
382
|
} from "./index-gprxjmm7.js";
|
|
@@ -399,7 +399,7 @@ import {
|
|
|
399
399
|
init_loader,
|
|
400
400
|
loadPluginConfig,
|
|
401
401
|
loadPluginConfigWithMeta
|
|
402
|
-
} from "./index-
|
|
402
|
+
} from "./index-tcbjjppb.js";
|
|
403
403
|
import {
|
|
404
404
|
DEFAULT_HARNESS_EVOLUTION_CONFIG,
|
|
405
405
|
DEFAULT_PR_REVIEW_RESILIENCE_CONFIG,
|
|
@@ -415,7 +415,7 @@ import {
|
|
|
415
415
|
package_default,
|
|
416
416
|
resolveAutoReviewConfig,
|
|
417
417
|
stripKnownSwarmPrefix
|
|
418
|
-
} from "./index-
|
|
418
|
+
} from "./index-b1tenv2s.js";
|
|
419
419
|
import {
|
|
420
420
|
init_git_executable,
|
|
421
421
|
resolveGitExecutable,
|
|
@@ -21040,7 +21040,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
|
|
|
21040
21040
|
};
|
|
21041
21041
|
}
|
|
21042
21042
|
async function sweepActiveNearDuplicates(directory, options = {}) {
|
|
21043
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
21043
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ghjs1n7k.js");
|
|
21044
21044
|
const { config } = loadPluginConfigWithMeta2(directory);
|
|
21045
21045
|
const sweepConfig = config.learning?.dedup_sweep;
|
|
21046
21046
|
if (sweepConfig?.enabled === false)
|
|
@@ -22170,7 +22170,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
|
|
|
22170
22170
|
}
|
|
22171
22171
|
if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
|
|
22172
22172
|
try {
|
|
22173
|
-
const skillModule = await import("./skill-generator-
|
|
22173
|
+
const skillModule = await import("./skill-generator-a2ekcbe2.js");
|
|
22174
22174
|
for (const cand of skillCandidates) {
|
|
22175
22175
|
if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
|
|
22176
22176
|
continue;
|
|
@@ -22642,7 +22642,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
22642
22642
|
} catch {}
|
|
22643
22643
|
}
|
|
22644
22644
|
if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
|
|
22645
|
-
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-
|
|
22645
|
+
const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-x85t1e66.js");
|
|
22646
22646
|
for (const { id } of contradictedEntries) {
|
|
22647
22647
|
try {
|
|
22648
22648
|
await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
|
|
@@ -23461,7 +23461,7 @@ async function runCuratorPostMortem(directory, options = {}) {
|
|
|
23461
23461
|
warnings.push("Failed to collect knowledge summary.");
|
|
23462
23462
|
}
|
|
23463
23463
|
try {
|
|
23464
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
23464
|
+
const { getScanStatus } = await import("./scan-cursor-m3w0tapb.js");
|
|
23465
23465
|
const scanStatus = await getScanStatus(directory);
|
|
23466
23466
|
if (scanStatus.remaining_estimate > 0) {
|
|
23467
23467
|
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.`);
|
|
@@ -23633,9 +23633,9 @@ var _internals27 = {
|
|
|
23633
23633
|
verifyPostMortemKnowledgeActions,
|
|
23634
23634
|
repairPostMortemActions,
|
|
23635
23635
|
loadDefaultKnowledgeConfig: async (directory) => {
|
|
23636
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
23636
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-0b0dqn28.js");
|
|
23637
23637
|
try {
|
|
23638
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
23638
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ghjs1n7k.js");
|
|
23639
23639
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
23640
23640
|
return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
23641
23641
|
} catch {
|
|
@@ -23643,11 +23643,11 @@ var _internals27 = {
|
|
|
23643
23643
|
}
|
|
23644
23644
|
},
|
|
23645
23645
|
applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
|
|
23646
|
-
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-
|
|
23646
|
+
const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-w4ntvkz5.js");
|
|
23647
23647
|
return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
|
|
23648
23648
|
},
|
|
23649
23649
|
checkHivePromotions: async (entries, knowledgeConfig, directory) => {
|
|
23650
|
-
const { checkHivePromotions } = await import("./hive-promoter-
|
|
23650
|
+
const { checkHivePromotions } = await import("./hive-promoter-mfq3ee0n.js");
|
|
23651
23651
|
return checkHivePromotions(entries, knowledgeConfig, directory);
|
|
23652
23652
|
},
|
|
23653
23653
|
applyProposalTriage: async (directory, triage) => {
|
|
@@ -23656,7 +23656,7 @@ var _internals27 = {
|
|
|
23656
23656
|
activateProposal,
|
|
23657
23657
|
listSkills: listSkills2,
|
|
23658
23658
|
sanitizeSlug
|
|
23659
|
-
} = await import("./skill-generator-
|
|
23659
|
+
} = await import("./skill-generator-a2ekcbe2.js");
|
|
23660
23660
|
const result = {
|
|
23661
23661
|
approved: [],
|
|
23662
23662
|
rejected: [],
|
|
@@ -24986,9 +24986,9 @@ function hashContent(content) {
|
|
|
24986
24986
|
return createHash13("sha1").update(content).digest("hex");
|
|
24987
24987
|
}
|
|
24988
24988
|
async function loadConfigForPolicyCurator(directory) {
|
|
24989
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
24989
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-0b0dqn28.js");
|
|
24990
24990
|
try {
|
|
24991
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
24991
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ghjs1n7k.js");
|
|
24992
24992
|
const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
|
|
24993
24993
|
return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
|
|
24994
24994
|
} catch {
|
|
@@ -25466,12 +25466,15 @@ RETRY: your last output was missing ${result.missing.join("; ")}; produce valid
|
|
|
25466
25466
|
}
|
|
25467
25467
|
async function appendCuratorSkippedEvent(directory, record) {
|
|
25468
25468
|
try {
|
|
25469
|
+
const redactedLesson = redactSecrets(record.lesson);
|
|
25469
25470
|
appendCoreEventSync(directory, {
|
|
25470
25471
|
timestamp: new Date().toISOString(),
|
|
25471
25472
|
event: "curator_skipped",
|
|
25472
25473
|
entry_id: record.entry_id,
|
|
25473
|
-
|
|
25474
|
-
|
|
25474
|
+
content_hash: hashContent(redactedLesson),
|
|
25475
|
+
lesson: redactedLesson.slice(0, 200),
|
|
25476
|
+
reason: record.reason,
|
|
25477
|
+
...record.duplicate_target_id ? { duplicate_target_id: record.duplicate_target_id } : {}
|
|
25475
25478
|
});
|
|
25476
25479
|
} catch {}
|
|
25477
25480
|
}
|
|
@@ -25624,12 +25627,6 @@ async function curateAndStoreSwarm(lessons, projectName, phaseInfo, directory, c
|
|
|
25624
25627
|
continue;
|
|
25625
25628
|
}
|
|
25626
25629
|
}
|
|
25627
|
-
const duplicate = findActiveSwarmNearDuplicate(lesson, snapshotPlusNew, config.dedup_threshold);
|
|
25628
|
-
if (duplicate) {
|
|
25629
|
-
pendingReinforcementIds.add(duplicate.id);
|
|
25630
|
-
skipped++;
|
|
25631
|
-
continue;
|
|
25632
|
-
}
|
|
25633
25630
|
const entry = {
|
|
25634
25631
|
id: crypto.randomUUID(),
|
|
25635
25632
|
tier: "swarm",
|
|
@@ -25657,6 +25654,18 @@ async function curateAndStoreSwarm(lessons, projectName, phaseInfo, directory, c
|
|
|
25657
25654
|
project_name: projectName,
|
|
25658
25655
|
auto_generated: true
|
|
25659
25656
|
};
|
|
25657
|
+
const duplicate = findActiveSwarmNearDuplicate(lesson, snapshotPlusNew, config.dedup_threshold);
|
|
25658
|
+
if (duplicate) {
|
|
25659
|
+
pendingReinforcementIds.add(duplicate.id);
|
|
25660
|
+
skipped++;
|
|
25661
|
+
await appendCuratorSkippedEvent(directory, {
|
|
25662
|
+
entry_id: entry.id,
|
|
25663
|
+
lesson,
|
|
25664
|
+
reason: "near_duplicate",
|
|
25665
|
+
duplicate_target_id: duplicate.id
|
|
25666
|
+
});
|
|
25667
|
+
continue;
|
|
25668
|
+
}
|
|
25660
25669
|
const actionability = validateActionability(entry);
|
|
25661
25670
|
if (!actionability.actionable && options?.llmDelegate) {
|
|
25662
25671
|
pendingBatchEnrichment.push({ entry, lesson, category, tags });
|
|
@@ -25730,17 +25739,35 @@ async function curateAndStoreSwarm(lessons, projectName, phaseInfo, directory, c
|
|
|
25730
25739
|
try {
|
|
25731
25740
|
await appendUnactionable(directory, entry, "insight_unactionable");
|
|
25732
25741
|
} catch {}
|
|
25742
|
+
await appendCuratorSkippedEvent(directory, {
|
|
25743
|
+
entry_id: entry.id,
|
|
25744
|
+
lesson: entry.lesson,
|
|
25745
|
+
reason: "insight_unactionable"
|
|
25746
|
+
});
|
|
25733
25747
|
continue;
|
|
25734
25748
|
}
|
|
25735
25749
|
const marker = insightAdmissionMarker(resolveInsightCandidateId(cand));
|
|
25736
|
-
|
|
25750
|
+
const admitted = findActiveEntryWithInsightMarker(snapshotPlusNew, marker);
|
|
25751
|
+
if (admitted) {
|
|
25737
25752
|
skipped++;
|
|
25753
|
+
await appendCuratorSkippedEvent(directory, {
|
|
25754
|
+
entry_id: entry.id,
|
|
25755
|
+
lesson: entry.lesson,
|
|
25756
|
+
reason: "already_admitted",
|
|
25757
|
+
duplicate_target_id: admitted.id
|
|
25758
|
+
});
|
|
25738
25759
|
continue;
|
|
25739
25760
|
}
|
|
25740
25761
|
const duplicate = findActiveSwarmNearDuplicate(entry.lesson, snapshotPlusNew, config.dedup_threshold);
|
|
25741
25762
|
if (duplicate) {
|
|
25742
25763
|
insightReinforcements.push({ entryId: duplicate.id, marker });
|
|
25743
25764
|
skipped++;
|
|
25765
|
+
await appendCuratorSkippedEvent(directory, {
|
|
25766
|
+
entry_id: entry.id,
|
|
25767
|
+
lesson: entry.lesson,
|
|
25768
|
+
reason: "near_duplicate",
|
|
25769
|
+
duplicate_target_id: duplicate.id
|
|
25770
|
+
});
|
|
25744
25771
|
continue;
|
|
25745
25772
|
}
|
|
25746
25773
|
toAdd.push(entry);
|
|
@@ -25749,6 +25776,7 @@ async function curateAndStoreSwarm(lessons, projectName, phaseInfo, directory, c
|
|
|
25749
25776
|
} catch {}
|
|
25750
25777
|
let stored = 0;
|
|
25751
25778
|
let reinforced = 0;
|
|
25779
|
+
const transactionSkipEvents = [];
|
|
25752
25780
|
if (toAdd.length > 0 || pendingReinforcementIds.size > 0 || insightReinforcements.length > 0) {
|
|
25753
25781
|
await transactKnowledge(knowledgePath, (current) => {
|
|
25754
25782
|
let changed = false;
|
|
@@ -25787,13 +25815,26 @@ async function curateAndStoreSwarm(lessons, projectName, phaseInfo, directory, c
|
|
|
25787
25815
|
const trulyNew = [];
|
|
25788
25816
|
for (const entry of toAdd) {
|
|
25789
25817
|
const marker = findInsightAdmissionMarker(entry.source_knowledge_ids);
|
|
25790
|
-
|
|
25818
|
+
const admitted = marker ? findActiveEntryWithInsightMarker(current, marker) : undefined;
|
|
25819
|
+
if (admitted) {
|
|
25791
25820
|
skipped++;
|
|
25821
|
+
transactionSkipEvents.push({
|
|
25822
|
+
entry_id: entry.id,
|
|
25823
|
+
lesson: entry.lesson,
|
|
25824
|
+
reason: "already_admitted",
|
|
25825
|
+
duplicate_target_id: admitted.id
|
|
25826
|
+
});
|
|
25792
25827
|
continue;
|
|
25793
25828
|
}
|
|
25794
25829
|
const duplicate = findActiveSwarmNearDuplicate(entry.lesson, current, config.dedup_threshold);
|
|
25795
25830
|
if (duplicate) {
|
|
25796
25831
|
skipped++;
|
|
25832
|
+
transactionSkipEvents.push({
|
|
25833
|
+
entry_id: entry.id,
|
|
25834
|
+
lesson: entry.lesson,
|
|
25835
|
+
reason: "near_duplicate",
|
|
25836
|
+
duplicate_target_id: duplicate.id
|
|
25837
|
+
});
|
|
25797
25838
|
const result = reinforceSwarmKnowledgeEntry(duplicate, {
|
|
25798
25839
|
phase_number: phaseInfo.phase_number,
|
|
25799
25840
|
confirmed_at: new Date().toISOString(),
|
|
@@ -25816,6 +25857,9 @@ async function curateAndStoreSwarm(lessons, projectName, phaseInfo, directory, c
|
|
|
25816
25857
|
}
|
|
25817
25858
|
return changed ? current : null;
|
|
25818
25859
|
});
|
|
25860
|
+
for (const event of transactionSkipEvents) {
|
|
25861
|
+
await appendCuratorSkippedEvent(directory, event);
|
|
25862
|
+
}
|
|
25819
25863
|
}
|
|
25820
25864
|
await enforceKnowledgeCap(knowledgePath, config.swarm_max_entries);
|
|
25821
25865
|
if (stored > 0) {
|
|
@@ -26022,7 +26066,7 @@ function safeRealpathSync(targetPath, fallback, realpathResolver = realpathSync3
|
|
|
26022
26066
|
}
|
|
26023
26067
|
|
|
26024
26068
|
// src/tools/repo-graph/types.ts
|
|
26025
|
-
var GRAPH_SCHEMA_VERSION = "1.
|
|
26069
|
+
var GRAPH_SCHEMA_VERSION = "1.6.0";
|
|
26026
26070
|
var DEFAULT_MAX_SOURCE_BYTES = 1024 * 1024;
|
|
26027
26071
|
var FILE_ROLE_VALUES = [
|
|
26028
26072
|
"api_route",
|
|
@@ -26111,6 +26155,15 @@ var SYMBOL_EDGE_RESOLUTION_VALUES = [
|
|
|
26111
26155
|
"heuristic",
|
|
26112
26156
|
"unresolved"
|
|
26113
26157
|
];
|
|
26158
|
+
var GRAPH_SYMBOL_KIND_VALUES = [
|
|
26159
|
+
"function",
|
|
26160
|
+
"class",
|
|
26161
|
+
"const",
|
|
26162
|
+
"type",
|
|
26163
|
+
"interface",
|
|
26164
|
+
"enum",
|
|
26165
|
+
"method"
|
|
26166
|
+
];
|
|
26114
26167
|
var PACKAGE_BOUNDARY_ROOTS = new Set([
|
|
26115
26168
|
"packages",
|
|
26116
26169
|
"crates",
|
|
@@ -26154,6 +26207,7 @@ var SECURITY_KIND_SET = new Set(SECURITY_KIND_VALUES);
|
|
|
26154
26207
|
var SECURITY_CONFIDENCE_SET = new Set(SECURITY_CONFIDENCE_VALUES);
|
|
26155
26208
|
var ONTOLOGY_FINDING_SEVERITY_SET = new Set(ONTOLOGY_FINDING_SEVERITY_VALUES);
|
|
26156
26209
|
var IMPORT_TYPE_SET = new Set(IMPORT_TYPE_VALUES);
|
|
26210
|
+
var GRAPH_SYMBOL_KIND_SET = new Set(GRAPH_SYMBOL_KIND_VALUES);
|
|
26157
26211
|
function validateWorkspace(workspace) {
|
|
26158
26212
|
if (!workspace || typeof workspace !== "string" || workspace.trim() === "") {
|
|
26159
26213
|
throw new Error("Invalid workspace: must be a non-empty string");
|
|
@@ -33127,7 +33181,7 @@ function buildReflectionDataSummary(data) {
|
|
|
33127
33181
|
lines.push("KNOWLEDGE DELTA:");
|
|
33128
33182
|
lines.push(` - ${kd.sessionKnowledgeCreated} knowledge entries created this session.`);
|
|
33129
33183
|
if (kd.curation) {
|
|
33130
|
-
lines.push(` - Curation (finalize batch): ${kd.curation.stored} stored, ${kd.curation.reinforced} reinforced, ${kd.curation.skipped} skipped, ${kd.curation.rejected} rejected, ${kd.curation.quarantined} quarantined.`);
|
|
33184
|
+
lines.push(` - Curation (finalize batch): ${kd.curation.stored} stored, ${kd.curation.reinforced} reinforced, ${kd.curation.skipped} skipped (dedup/already-admitted; audit: .swarm/events.jsonl curator_skipped), ${kd.curation.rejected} rejected (validator-refused; ledger: .swarm/knowledge-rejected.jsonl), ${kd.curation.quarantined} quarantined (actionability-gated; queue: .swarm/knowledge-unactionable.jsonl; audit: .swarm/events.jsonl curator_skipped).`);
|
|
33131
33185
|
}
|
|
33132
33186
|
if (kd.admitted !== undefined || kd.reinforcedRealtime !== undefined || kd.rejectedCurator !== undefined) {
|
|
33133
33187
|
lines.push(` - Realtime admission: ${kd.admitted ?? 0} admitted, ${kd.reinforcedRealtime ?? 0} reinforced, ${kd.rejectedCurator ?? 0} curator-rejected (from durable markers).`);
|
|
@@ -33163,7 +33217,7 @@ function buildSignalsBlock(data) {
|
|
|
33163
33217
|
lines.push("**Knowledge Delta**");
|
|
33164
33218
|
lines.push(`- ${kd.sessionKnowledgeCreated} knowledge entries created this session.`);
|
|
33165
33219
|
if (kd.curation) {
|
|
33166
|
-
lines.push(`- Curation (finalize batch): ${kd.curation.stored} stored, ${kd.curation.reinforced} reinforced, ${kd.curation.skipped} skipped, ${kd.curation.rejected} rejected, ${kd.curation.quarantined} quarantined.`);
|
|
33220
|
+
lines.push(`- Curation (finalize batch): ${kd.curation.stored} stored, ${kd.curation.reinforced} reinforced, ${kd.curation.skipped} skipped (dedup/already-admitted; audit: .swarm/events.jsonl curator_skipped), ${kd.curation.rejected} rejected (validator-refused; ledger: .swarm/knowledge-rejected.jsonl), ${kd.curation.quarantined} quarantined (actionability-gated; queue: .swarm/knowledge-unactionable.jsonl; audit: .swarm/events.jsonl curator_skipped).`);
|
|
33167
33221
|
}
|
|
33168
33222
|
if (kd.admitted !== undefined || kd.reinforcedRealtime !== undefined || kd.rejectedCurator !== undefined) {
|
|
33169
33223
|
lines.push(`- Realtime admission: ${kd.admitted ?? 0} admitted, ${kd.reinforcedRealtime ?? 0} reinforced, ${kd.rejectedCurator ?? 0} curator-rejected (from durable markers).`);
|
|
@@ -36682,6 +36736,17 @@ async function runAbortableSkillReview(req, timeoutMs) {
|
|
|
36682
36736
|
clearTimeout(timeout);
|
|
36683
36737
|
}
|
|
36684
36738
|
}
|
|
36739
|
+
async function archiveCloseSummary(ctx, closeSummaryPath, summaryWritten) {
|
|
36740
|
+
if (!summaryWritten || ctx.archiveStageFailed || !ctx.archiveDir)
|
|
36741
|
+
return;
|
|
36742
|
+
try {
|
|
36743
|
+
await fs17.copyFile(closeSummaryPath, path47.join(ctx.archiveDir, "close-summary.md"));
|
|
36744
|
+
} catch (error2) {
|
|
36745
|
+
const msg = error2 instanceof Error ? error2.message : String(error2);
|
|
36746
|
+
ctx.warnings.push(`Failed to archive close-summary.md: ${msg}`);
|
|
36747
|
+
log("[close-command] Failed to archive close-summary.md:", error2);
|
|
36748
|
+
}
|
|
36749
|
+
}
|
|
36685
36750
|
function normalizeLessonText(text) {
|
|
36686
36751
|
return (text ?? "").trim().toLowerCase();
|
|
36687
36752
|
}
|
|
@@ -37176,7 +37241,7 @@ async function runFinalizeStage(ctx) {
|
|
|
37176
37241
|
}
|
|
37177
37242
|
}
|
|
37178
37243
|
try {
|
|
37179
|
-
const { CuratorConfigSchema: CCS } = await import("./schema-
|
|
37244
|
+
const { CuratorConfigSchema: CCS } = await import("./schema-0b0dqn28.js");
|
|
37180
37245
|
const { config: pmLoadedConfig } = _internals41.loadPluginConfigWithMeta(ctx.directory);
|
|
37181
37246
|
const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
|
|
37182
37247
|
if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
|
|
@@ -37919,13 +37984,16 @@ No active state was archived or removed. Fix the reported durable-state problem,
|
|
|
37919
37984
|
...ctx.warnings.length > 0 ? ["## Warnings", ...ctx.warnings.map((w) => `- ${w}`), ""] : []
|
|
37920
37985
|
].join(`
|
|
37921
37986
|
`);
|
|
37987
|
+
let closeSummaryWritten = false;
|
|
37922
37988
|
try {
|
|
37923
37989
|
await atomicWriteSwarmFile(closeSummaryPath, summaryContent);
|
|
37990
|
+
closeSummaryWritten = true;
|
|
37924
37991
|
} catch (error2) {
|
|
37925
37992
|
const msg = error2 instanceof Error ? error2.message : String(error2);
|
|
37926
37993
|
ctx.warnings.push(`Failed to write close-summary.md: ${msg}`);
|
|
37927
37994
|
log("[close-command] Failed to write close-summary.md:", error2);
|
|
37928
37995
|
}
|
|
37996
|
+
await archiveCloseSummary(ctx, closeSummaryPath, closeSummaryWritten);
|
|
37929
37997
|
try {
|
|
37930
37998
|
const sessionIdsToEnd = [...swarmState.agentSessions.keys()];
|
|
37931
37999
|
for (const sessionId of sessionIdsToEnd) {
|
|
@@ -38050,6 +38118,7 @@ var _internals41 = {
|
|
|
38050
38118
|
runFinalizeRewardSweep,
|
|
38051
38119
|
acquireFinalizeLock,
|
|
38052
38120
|
runArchiveStage,
|
|
38121
|
+
archiveCloseSummary,
|
|
38053
38122
|
runArchiveEvidenceRetention,
|
|
38054
38123
|
runCleanStage,
|
|
38055
38124
|
runAlignStage,
|
|
@@ -39395,9 +39464,9 @@ var _internals45 = {
|
|
|
39395
39464
|
loadPluginConfigWithMeta,
|
|
39396
39465
|
loadCuratorDeps: async () => {
|
|
39397
39466
|
const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
|
|
39398
|
-
import("./schema-
|
|
39399
|
-
import("./curator-
|
|
39400
|
-
import("./curator-llm-factory-
|
|
39467
|
+
import("./schema-0b0dqn28.js"),
|
|
39468
|
+
import("./curator-w4ntvkz5.js"),
|
|
39469
|
+
import("./curator-llm-factory-c4y1mrr5.js")
|
|
39401
39470
|
]);
|
|
39402
39471
|
return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
|
|
39403
39472
|
}
|
|
@@ -40406,7 +40475,7 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
40406
40475
|
let scanCompleted = false;
|
|
40407
40476
|
let scanRemaining = 0;
|
|
40408
40477
|
try {
|
|
40409
|
-
const { getScanStatus } = await import("./scan-cursor-
|
|
40478
|
+
const { getScanStatus } = await import("./scan-cursor-m3w0tapb.js");
|
|
40410
40479
|
const status = await getScanStatus(directory);
|
|
40411
40480
|
scanGeneration = status.generation;
|
|
40412
40481
|
scanCompleted = status.completed;
|
|
@@ -40416,10 +40485,10 @@ async function computeCurationDiagnostics(directory, entries) {
|
|
|
40416
40485
|
try {
|
|
40417
40486
|
const { isLinked: isLinked2 } = await import("./knowledge-link-cj2abbae.js");
|
|
40418
40487
|
if (isLinked2(directory)) {
|
|
40419
|
-
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-
|
|
40488
|
+
const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-0b0dqn28.js");
|
|
40420
40489
|
let config;
|
|
40421
40490
|
try {
|
|
40422
|
-
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-
|
|
40491
|
+
const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ghjs1n7k.js");
|
|
40423
40492
|
const loaded = loadPluginConfigWithMeta2(directory);
|
|
40424
40493
|
config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
|
|
40425
40494
|
} catch {
|
|
@@ -41739,7 +41808,7 @@ async function handleDoctorCommand(directory, args) {
|
|
|
41739
41808
|
const result = runConfigDoctor(config, directory);
|
|
41740
41809
|
let output;
|
|
41741
41810
|
if (enableAutoFix && result.hasAutoFixableIssues) {
|
|
41742
|
-
const { runConfigDoctorWithFixes } = await import("./config-doctor-
|
|
41811
|
+
const { runConfigDoctorWithFixes } = await import("./config-doctor-nkx61b9e.js");
|
|
41743
41812
|
const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
|
|
41744
41813
|
applyLossy: true
|
|
41745
41814
|
});
|
|
@@ -42679,7 +42748,7 @@ async function handleEvidenceCommand(directory, args) {
|
|
|
42679
42748
|
return formatTaskEvidenceMarkdown(evidenceData);
|
|
42680
42749
|
}
|
|
42681
42750
|
async function handleEvidenceSummaryCommand(directory) {
|
|
42682
|
-
const { buildEvidenceSummary } = await import("./evidence-summary-service-
|
|
42751
|
+
const { buildEvidenceSummary } = await import("./evidence-summary-service-vadgnzk6.js");
|
|
42683
42752
|
const artifact = await buildEvidenceSummary(directory);
|
|
42684
42753
|
if (!artifact) {
|
|
42685
42754
|
return "No plan found. Run `/swarm plan` to check plan status.";
|
|
@@ -79786,7 +79855,7 @@ function buildDetailedHelp(commandName, entry) {
|
|
|
79786
79855
|
async function handleHelpCommand(ctx) {
|
|
79787
79856
|
const targetCommand = ctx.args.join(" ");
|
|
79788
79857
|
if (!targetCommand) {
|
|
79789
|
-
const { buildHelpText } = await import("./index-
|
|
79858
|
+
const { buildHelpText } = await import("./index-8kfbdrxa.js");
|
|
79790
79859
|
return buildHelpText();
|
|
79791
79860
|
}
|
|
79792
79861
|
const tokens = targetCommand.split(/\s+/);
|
|
@@ -79795,7 +79864,7 @@ async function handleHelpCommand(ctx) {
|
|
|
79795
79864
|
return _internals100.buildDetailedHelp(resolved.key, resolved.entry);
|
|
79796
79865
|
}
|
|
79797
79866
|
const similar = _internals100.findSimilarCommands(targetCommand);
|
|
79798
|
-
const { buildHelpText: fullHelp } = await import("./index-
|
|
79867
|
+
const { buildHelpText: fullHelp } = await import("./index-8kfbdrxa.js");
|
|
79799
79868
|
if (similar.length > 0) {
|
|
79800
79869
|
return `Command '/swarm ${targetCommand}' not found.
|
|
79801
79870
|
|
|
@@ -80126,7 +80195,7 @@ var COMMAND_REGISTRY = {
|
|
|
80126
80195
|
},
|
|
80127
80196
|
"guardrail explain": {
|
|
80128
80197
|
handler: async (ctx) => {
|
|
80129
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
80198
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-ax2qmsp4.js");
|
|
80130
80199
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
80131
80200
|
},
|
|
80132
80201
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -80136,7 +80205,7 @@ var COMMAND_REGISTRY = {
|
|
|
80136
80205
|
},
|
|
80137
80206
|
"guardrail reset": {
|
|
80138
80207
|
handler: async (ctx) => {
|
|
80139
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
80208
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-wvdb5sv5.js");
|
|
80140
80209
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
80141
80210
|
},
|
|
80142
80211
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -80145,7 +80214,7 @@ var COMMAND_REGISTRY = {
|
|
|
80145
80214
|
},
|
|
80146
80215
|
"guardrail-explain": {
|
|
80147
80216
|
handler: async (ctx) => {
|
|
80148
|
-
const { handleGuardrailExplain } = await import("./guardrail-explain-
|
|
80217
|
+
const { handleGuardrailExplain } = await import("./guardrail-explain-ax2qmsp4.js");
|
|
80149
80218
|
return handleGuardrailExplain(ctx.directory, ctx.args);
|
|
80150
80219
|
},
|
|
80151
80220
|
description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
|
|
@@ -80155,7 +80224,7 @@ var COMMAND_REGISTRY = {
|
|
|
80155
80224
|
},
|
|
80156
80225
|
"guardrail-reset": {
|
|
80157
80226
|
handler: async (ctx) => {
|
|
80158
|
-
const { handleGuardrailReset } = await import("./guardrail-reset-
|
|
80227
|
+
const { handleGuardrailReset } = await import("./guardrail-reset-wvdb5sv5.js");
|
|
80159
80228
|
return handleGuardrailReset(ctx.args, ctx.sessionID);
|
|
80160
80229
|
},
|
|
80161
80230
|
description: "Reset one exact active invocation/action circuit after repair",
|
|
@@ -80165,7 +80234,7 @@ var COMMAND_REGISTRY = {
|
|
|
80165
80234
|
},
|
|
80166
80235
|
"guardrail-log": {
|
|
80167
80236
|
handler: async (ctx) => {
|
|
80168
|
-
const { handleGuardrailLog } = await import("./guardrail-log-
|
|
80237
|
+
const { handleGuardrailLog } = await import("./guardrail-log-t3c9g8tc.js");
|
|
80169
80238
|
return handleGuardrailLog(ctx.directory, ctx.args);
|
|
80170
80239
|
},
|
|
80171
80240
|
description: "Read the guardrail decision log (use --blocks-only for blocks)",
|
|
@@ -86604,7 +86673,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
|
|
|
86604
86673
|
return extracted === expectedSessionId;
|
|
86605
86674
|
}
|
|
86606
86675
|
async function inspectStandardWorktreeCollisionOwnership(identity) {
|
|
86607
|
-
const collisionOwnership = await import("./worktree-collision-ownership-
|
|
86676
|
+
const collisionOwnership = await import("./worktree-collision-ownership-5qaab3q7.js");
|
|
86608
86677
|
return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
|
|
86609
86678
|
}
|
|
86610
86679
|
async function runRecoveryGit(directory, args, timeoutMs = 15000) {
|
|
@@ -87013,7 +87082,7 @@ async function precreateStandardWorktreeSession(args) {
|
|
|
87013
87082
|
const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
|
|
87014
87083
|
if (laneProfile) {
|
|
87015
87084
|
try {
|
|
87016
|
-
const { writeLaneProfileToDiskReal } = await import("./core-
|
|
87085
|
+
const { writeLaneProfileToDiskReal } = await import("./core-b3db7gf6.js");
|
|
87017
87086
|
await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
|
|
87018
87087
|
} catch {}
|
|
87019
87088
|
}
|
|
@@ -87938,7 +88007,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
|
|
|
87938
88007
|
}
|
|
87939
88008
|
clearWorktreeMergeStatus(statusKey);
|
|
87940
88009
|
try {
|
|
87941
|
-
const { removeLaneProfileFromDiskReal } = await import("./core-
|
|
88010
|
+
const { removeLaneProfileFromDiskReal } = await import("./core-b3db7gf6.js");
|
|
87942
88011
|
await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
|
|
87943
88012
|
} catch {}
|
|
87944
88013
|
const state = serializationStateBySessionID.get(dispatch.parentSessionID);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
PluginConfigSchema,
|
|
7
7
|
init_schema,
|
|
8
8
|
stripKnownSwarmPrefix
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-b1tenv2s.js";
|
|
10
10
|
import {
|
|
11
11
|
ALL_AGENT_NAMES,
|
|
12
12
|
init_constants
|
|
@@ -1183,6 +1183,20 @@ function validateConfigKey(path2, value) {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
1186
|
+
case "$schema": {
|
|
1187
|
+
if (value !== undefined && typeof value !== "string") {
|
|
1188
|
+
findings.push({
|
|
1189
|
+
id: "invalid-$schema-type",
|
|
1190
|
+
title: "Invalid $schema type",
|
|
1191
|
+
description: `"$schema" must be a string (JSON Schema URL), got ${typeof value}`,
|
|
1192
|
+
severity: "error",
|
|
1193
|
+
path: "$schema",
|
|
1194
|
+
currentValue: value,
|
|
1195
|
+
autoFixable: false
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
break;
|
|
1199
|
+
}
|
|
1186
1200
|
case "full_auto": {
|
|
1187
1201
|
emitObjectTypeMismatch("full_auto", value, findings);
|
|
1188
1202
|
break;
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
detectWindowsWrites,
|
|
15
15
|
getSharedClassifierGuardrailBlock,
|
|
16
16
|
resolveWriteTargets
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-3e8600a7.js";
|
|
18
18
|
import {
|
|
19
19
|
checkFileAuthority,
|
|
20
20
|
classifyFile,
|
|
21
21
|
isInDeclaredScope,
|
|
22
22
|
redactPath,
|
|
23
23
|
redactShellCommand
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-04yrxg0z.js";
|
|
25
25
|
|
|
26
26
|
// src/services/guardrail-explain-service.ts
|
|
27
27
|
import path from "path";
|