opencode-swarm 7.136.1 → 7.136.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/brainstorm/SKILL.md +1 -1
- package/.opencode/skills/clarify/SKILL.md +3 -3
- package/.opencode/skills/clarify-spec/SKILL.md +2 -2
- package/.opencode/skills/consult/SKILL.md +1 -1
- package/.opencode/skills/council/SKILL.md +1 -1
- package/.opencode/skills/critic-gate/SKILL.md +8 -3
- package/.opencode/skills/discover/SKILL.md +1 -1
- package/.opencode/skills/execute/SKILL.md +1 -1
- package/.opencode/skills/gate-attribution/SKILL.md +1 -1
- package/.opencode/skills/issue-ingest/SKILL.md +3 -3
- package/.opencode/skills/phase-wrap/SKILL.md +1 -1
- package/.opencode/skills/plan/SKILL.md +3 -3
- package/.opencode/skills/pre-phase-briefing/SKILL.md +1 -1
- package/.opencode/skills/resume/SKILL.md +1 -1
- package/.opencode/skills/specify/SKILL.md +1 -1
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +41 -1
- package/.opencode/skills/swarm-pr-review/SKILL.md +72 -24
- package/README.md +18 -0
- package/dist/background/workspace-snapshot.d.ts +54 -0
- package/dist/cli/{config-doctor-6fphg5xm.js → config-doctor-g71mz50j.js} +2 -2
- package/dist/cli/{core-4z1s2ak1.js → core-jpjk2qvt.js} +1 -1
- package/dist/cli/{curation-policy-m24jbyag.js → curation-policy-zhyttjpa.js} +6 -6
- package/dist/cli/{curator-zrt5sqj2.js → curator-36dxw38r.js} +27 -24
- package/dist/cli/{curator-llm-factory-w5arq7tr.js → curator-llm-factory-k2a7cv41.js} +27 -24
- package/dist/cli/{evidence-summary-service-w006jnpg.js → evidence-summary-service-nse06dqr.js} +8 -6
- package/dist/cli/{gate-evidence-aenyz6vt.js → gate-evidence-kdygjr56.js} +4 -4
- package/dist/cli/{guardrail-explain-462jwhbh.js → guardrail-explain-1k337z5d.js} +28 -25
- package/dist/cli/{guardrail-log-ax21jd9e.js → guardrail-log-xbc9bvdt.js} +3 -3
- package/dist/cli/hashing-mjwn6j4y.js +34 -0
- package/dist/cli/{hive-promoter-2vacnbws.js → hive-promoter-daxrn62p.js} +27 -24
- package/dist/cli/{index-r9v98d0y.js → index-0vq9gnqd.js} +46 -5
- package/dist/cli/{index-jwrydqjp.js → index-176zwqcq.js} +2 -2
- package/dist/cli/{index-cggqh2dz.js → index-45y0y3xh.js} +57 -1000
- package/dist/cli/{index-gf7hqbmz.js → index-68tjkaqk.js} +5 -1
- package/dist/cli/{index-dyy3hvk3.js → index-79pgzj9a.js} +4 -4
- package/dist/cli/{index-45t7w06b.js → index-7t3vjw5e.js} +1 -1
- package/dist/cli/{index-ey29aap6.js → index-b3jfcptk.js} +1 -1
- package/dist/cli/{index-prnjt2jr.js → index-brtg922w.js} +4576 -2316
- package/dist/cli/{index-7a2hm51h.js → index-cze4bq1x.js} +41 -0
- package/dist/cli/{index-mrtms113.js → index-d2sf9an1.js} +2 -2
- package/dist/cli/{index-wxyxf0bd.js → index-d61h3f3h.js} +2 -2
- package/dist/cli/{index-rhgctfn3.js → index-g2kpqpvh.js} +29 -26
- package/dist/cli/{index-g7g4hqh3.js → index-g5rtcb1n.js} +1 -1
- package/dist/cli/{index-1sq47n6t.js → index-gj5jerzz.js} +12 -6
- package/dist/cli/{index-c9ddxv4k.js → index-hh34tyv7.js} +1 -1
- package/dist/cli/{index-h3bweb88.js → index-kp5h245k.js} +5 -5
- package/dist/cli/{index-tcn457d5.js → index-kym0cctr.js} +1 -1
- package/dist/cli/{index-kzc2ygea.js → index-mgbpbs1f.js} +3 -3
- package/dist/cli/{index-tfa40hwb.js → index-n89fdxwg.js} +19 -2
- package/dist/cli/index-ne28wyyc.js +783 -0
- package/dist/cli/index-nfm9f10v.js +1100 -0
- package/dist/cli/{index-zkddc5ye.js → index-pff46kfv.js} +2 -2
- package/dist/cli/{index-f4cmtd89.js → index-rtgqy0yg.js} +2 -2
- package/dist/cli/{index-09b9zncg.js → index-tncy55bp.js} +1 -1
- package/dist/cli/{index-vg3yx648.js → index-w6j1n5az.js} +1 -1
- package/dist/cli/{index-hzkvbycn.js → index-wbdxmf1a.js} +6 -6
- package/dist/cli/{index-y6a7gjtj.js → index-wsdnttf4.js} +228 -81
- package/dist/cli/index-y8552snf.js +264 -0
- package/dist/cli/{index-9gxp450h.js → index-zcrvn579.js} +2 -2
- package/dist/cli/{index-p1pqqwgp.js → index-zwh5dewz.js} +1 -1
- package/dist/cli/{index-dzyjb33e.js → index-zzhyws9g.js} +1 -1
- package/dist/cli/index.js +27 -24
- package/dist/cli/{knowledge-escalator-1zt8qy1c.js → knowledge-escalator-h7fspgph.js} +7 -7
- package/dist/cli/{knowledge-events-ej3s9tsm.js → knowledge-events-vkf7an5n.js} +5 -5
- package/dist/cli/{knowledge-link-mm1w967j.js → knowledge-link-zr40rnwr.js} +4 -4
- package/dist/cli/{knowledge-store-ey4cbkp4.js → knowledge-store-s4976v9c.js} +5 -5
- package/dist/cli/{knowledge-validator-zwmq7s2c.js → knowledge-validator-64ppqy4y.js} +8 -8
- package/dist/cli/{pending-delegations-qajsxct0.js → pending-delegations-0h5b18p7.js} +3 -3
- package/dist/cli/{pr-subscriptions-qhr41epq.js → pr-subscriptions-jn0h047q.js} +3 -3
- package/dist/cli/runner-deeswadt.js +21 -0
- package/dist/cli/{scan-cursor-809hf2n1.js → scan-cursor-xbkae12h.js} +6 -6
- package/dist/cli/{schema-mhd7xqwr.js → schema-7jm70cab.js} +5 -1
- package/dist/cli/{scope-persistence-h2fpgxww.js → scope-persistence-5xc9ntdh.js} +4 -4
- package/dist/cli/{skill-generator-yyc8zd9j.js → skill-generator-8gtq1ajr.js} +9 -9
- package/dist/cli/{telemetry-859khp82.js → telemetry-6678gya0.js} +1 -1
- package/dist/cli/{workspace-snapshot-jmyamqnv.js → workspace-snapshot-h5rzw37b.js} +5 -1
- package/dist/cli/{worktree-collision-ownership-13btcj9g.js → worktree-collision-ownership-wt7cc850.js} +3 -3
- package/dist/commands/registry.d.ts +72 -0
- package/dist/commands/skill-opt.d.ts +41 -0
- package/dist/config/schema.d.ts +57 -0
- package/dist/hooks/delegation-gate.d.ts +12 -1
- package/dist/hooks/gate-denial-tracker.d.ts +175 -0
- package/dist/hooks/guardrails/execution-episode.d.ts +41 -0
- package/dist/hooks/guardrails/execution-stall.d.ts +285 -0
- package/dist/hooks/guardrails/file-authority.d.ts +11 -2
- package/dist/hooks/guardrails/internals-guard.d.ts +117 -0
- package/dist/hooks/guardrails/messages-transform.d.ts +85 -0
- package/dist/hooks/pr-workflow-gate.d.ts +261 -4
- package/dist/hooks/pr-workflow-response-gate.d.ts +27 -9
- package/dist/hooks/trajectory-logger.d.ts +76 -0
- package/dist/hooks/write-target-resolver.d.ts +19 -0
- package/dist/index.js +511 -462
- package/dist/memory/schema.d.ts +3 -3
- package/dist/prm/index.d.ts +2 -0
- package/dist/services/skill-evaluator.d.ts +17 -0
- package/dist/services/skill-optimizer/activation.d.ts +58 -0
- package/dist/services/skill-optimizer/candidates.d.ts +88 -0
- package/dist/services/skill-optimizer/controller.d.ts +146 -0
- package/dist/services/skill-optimizer/deterministic-seed.d.ts +29 -0
- package/dist/services/skill-optimizer/lifecycle.d.ts +70 -0
- package/dist/services/skill-optimizer/promoted-external-staleness.d.ts +98 -0
- package/dist/services/skill-optimizer/retirement.d.ts +54 -0
- package/dist/services/skill-optimizer/skill-eval-tasks.d.ts +47 -0
- package/dist/services/skill-optimizer/smoke.d.ts +46 -0
- package/dist/services/skill-optimizer/store.d.ts +118 -0
- package/dist/state.d.ts +32 -0
- package/dist/telemetry.d.ts +66 -1
- package/dist/tools/write-pr-review-trigger-eval.d.ts +2 -1
- package/dist/types/events.d.ts +14 -1
- package/dist/utils/stable-stringify.d.ts +46 -0
- package/evaluation-fixtures/skill-eval/scoring/score-skill-eval.cjs +97 -0
- package/package.json +2 -1
|
@@ -245,6 +245,39 @@ var telemetry = {
|
|
|
245
245
|
loopDetected(sessionId, agentName, loopType) {
|
|
246
246
|
_internals.emit("loop_detected", { sessionId, agentName, loopType });
|
|
247
247
|
},
|
|
248
|
+
noOpStrongWarning(sessionId, agentName, count, threshold) {
|
|
249
|
+
_internals.emit("no_op_strong_warning", {
|
|
250
|
+
sessionId,
|
|
251
|
+
agentName,
|
|
252
|
+
count,
|
|
253
|
+
threshold
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
gateDenialLoop(sessionId, tool, code, count) {
|
|
257
|
+
_internals.emit("gate_denial_loop", { sessionId, tool, code, count });
|
|
258
|
+
},
|
|
259
|
+
executionStallWarning(sessionId, count, threshold) {
|
|
260
|
+
_internals.emit("execution_stall_warning", {
|
|
261
|
+
sessionId,
|
|
262
|
+
count,
|
|
263
|
+
threshold
|
|
264
|
+
});
|
|
265
|
+
},
|
|
266
|
+
executionStallDenied(sessionId, tool, count, threshold) {
|
|
267
|
+
_internals.emit("execution_stall_denied", {
|
|
268
|
+
sessionId,
|
|
269
|
+
tool,
|
|
270
|
+
count,
|
|
271
|
+
threshold
|
|
272
|
+
});
|
|
273
|
+
},
|
|
274
|
+
swarmInternalsReadDenied(sessionId, tool, target) {
|
|
275
|
+
_internals.emit("swarm_internals_read_denied", {
|
|
276
|
+
sessionId,
|
|
277
|
+
tool,
|
|
278
|
+
target
|
|
279
|
+
});
|
|
280
|
+
},
|
|
248
281
|
scopeViolation(sessionId, agentName, file, reason) {
|
|
249
282
|
_internals.emit("scope_violation", { sessionId, agentName, file, reason });
|
|
250
283
|
},
|
|
@@ -305,6 +338,14 @@ var telemetry = {
|
|
|
305
338
|
level,
|
|
306
339
|
occurrenceCount
|
|
307
340
|
});
|
|
341
|
+
},
|
|
342
|
+
prmHardStopDelivered(sessionId, pattern, level, occurrenceCount) {
|
|
343
|
+
_internals.emit("prm_hard_stop_delivered", {
|
|
344
|
+
sessionId,
|
|
345
|
+
pattern,
|
|
346
|
+
level,
|
|
347
|
+
occurrenceCount
|
|
348
|
+
});
|
|
308
349
|
}
|
|
309
350
|
};
|
|
310
351
|
var _internals = {
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
atomicWriteFile,
|
|
4
4
|
taskEvidencePath,
|
|
5
5
|
withTaskEvidenceLock
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-b3jfcptk.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_external,
|
|
9
9
|
init_zod
|
|
10
10
|
} from "./index-bpmtbmy9.js";
|
|
11
11
|
import {
|
|
12
12
|
telemetry
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-cze4bq1x.js";
|
|
14
14
|
|
|
15
15
|
// src/gate-evidence.ts
|
|
16
16
|
init_zod();
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./index-1kz6da87.js";
|
|
7
7
|
import {
|
|
8
8
|
withEvidenceLock
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-tncy55bp.js";
|
|
10
10
|
import {
|
|
11
11
|
emit
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-cze4bq1x.js";
|
|
13
13
|
import {
|
|
14
14
|
criticalWarn,
|
|
15
15
|
init_logger,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-pff46kfv.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-g5rtcb1n.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -84,59 +84,62 @@ import {
|
|
|
84
84
|
handleWriteRetroCommand,
|
|
85
85
|
normalizeSwarmCommandInput,
|
|
86
86
|
resolveCommand
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-brtg922w.js";
|
|
88
88
|
import"./index-vm4xw9z3.js";
|
|
89
|
-
import"./index-
|
|
90
|
-
import"./index-
|
|
91
|
-
import"./index-
|
|
89
|
+
import"./index-nfm9f10v.js";
|
|
90
|
+
import"./index-n89fdxwg.js";
|
|
91
|
+
import"./index-68tjkaqk.js";
|
|
92
|
+
import"./index-45y0y3xh.js";
|
|
93
|
+
import"./index-ne28wyyc.js";
|
|
94
|
+
import"./index-y8552snf.js";
|
|
92
95
|
import"./index-4905hd2m.js";
|
|
93
96
|
import"./index-134d35c1.js";
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
96
|
-
import"./index-
|
|
97
|
+
import"./index-gj5jerzz.js";
|
|
98
|
+
import"./index-kp5h245k.js";
|
|
99
|
+
import"./index-zcrvn579.js";
|
|
97
100
|
import"./index-6mjf4vr1.js";
|
|
98
101
|
import"./index-c8s9a3zh.js";
|
|
99
102
|
import"./index-9ss2m4rs.js";
|
|
100
|
-
import"./index-
|
|
101
|
-
import"./index-
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
103
|
+
import"./index-wsdnttf4.js";
|
|
104
|
+
import"./index-d2sf9an1.js";
|
|
105
|
+
import"./index-79pgzj9a.js";
|
|
106
|
+
import"./index-176zwqcq.js";
|
|
104
107
|
import"./index-rtry5xyf.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
108
|
+
import"./index-wbdxmf1a.js";
|
|
109
|
+
import"./index-mgbpbs1f.js";
|
|
107
110
|
import"./index-ae75rja9.js";
|
|
108
|
-
import"./index-
|
|
109
|
-
import"./index-
|
|
110
|
-
import"./index-
|
|
111
|
+
import"./index-zzhyws9g.js";
|
|
112
|
+
import"./index-b3jfcptk.js";
|
|
113
|
+
import"./index-zwh5dewz.js";
|
|
111
114
|
import"./index-k5jrywpr.js";
|
|
112
115
|
import"./index-n832052r.js";
|
|
113
116
|
import {
|
|
114
117
|
init_schema,
|
|
115
118
|
stripKnownSwarmPrefix
|
|
116
|
-
} from "./index-
|
|
119
|
+
} from "./index-0vq9gnqd.js";
|
|
117
120
|
import"./index-bk5tah7q.js";
|
|
118
121
|
import"./index-8fwhhayc.js";
|
|
119
122
|
import"./index-q1exe2b3.js";
|
|
120
|
-
import"./index-
|
|
121
|
-
import"./index-
|
|
122
|
-
import"./index-
|
|
123
|
+
import"./index-kym0cctr.js";
|
|
124
|
+
import"./index-w6j1n5az.js";
|
|
125
|
+
import"./index-d61h3f3h.js";
|
|
123
126
|
import"./index-1kz6da87.js";
|
|
124
127
|
import"./index-x20cgr2q.js";
|
|
125
128
|
import"./index-b8zgtz81.js";
|
|
126
|
-
import"./index-
|
|
129
|
+
import"./index-hh34tyv7.js";
|
|
127
130
|
import"./index-4rhhvd1a.js";
|
|
128
131
|
import {
|
|
129
132
|
AGENT_TOOL_MAP,
|
|
130
133
|
ORCHESTRATOR_NAME,
|
|
131
134
|
init_constants
|
|
132
135
|
} from "./index-3jcyn8g6.js";
|
|
133
|
-
import"./index-
|
|
136
|
+
import"./index-7t3vjw5e.js";
|
|
134
137
|
import"./index-4qzeef9h.js";
|
|
135
138
|
import"./index-fsrp8wp3.js";
|
|
136
|
-
import"./index-
|
|
139
|
+
import"./index-tncy55bp.js";
|
|
137
140
|
import"./index-7g4c7s5r.js";
|
|
138
141
|
import"./index-bpmtbmy9.js";
|
|
139
|
-
import"./index-
|
|
142
|
+
import"./index-cze4bq1x.js";
|
|
140
143
|
import"./index-z6xqpmqg.js";
|
|
141
144
|
import"./index-zjygnfay.js";
|
|
142
145
|
import"./index-y111zefa.js";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-79pgzj9a.js";
|
|
6
6
|
import {
|
|
7
7
|
computeOutcomeSignal,
|
|
8
8
|
readKnowledge,
|
|
9
9
|
resolveHiveKnowledgePath,
|
|
10
10
|
resolveSwarmKnowledgePath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-wbdxmf1a.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveRetrievalOutcomes,
|
|
15
15
|
readKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-mgbpbs1f.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
|
@@ -588,9 +588,15 @@ function includesPhrase(content, phrase) {
|
|
|
588
588
|
return content.toLowerCase().includes(phrase.toLowerCase());
|
|
589
589
|
}
|
|
590
590
|
function evaluateContent(content, testCase) {
|
|
591
|
+
return scoreSkillPhrases({
|
|
592
|
+
content,
|
|
593
|
+
required: testCase.required_phrases,
|
|
594
|
+
forbidden: testCase.forbidden_phrases
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
function scoreSkillPhrases(args) {
|
|
598
|
+
const { content, required = [], forbidden = [] } = args;
|
|
591
599
|
const failures = [];
|
|
592
|
-
const required = testCase.required_phrases ?? [];
|
|
593
|
-
const forbidden = testCase.forbidden_phrases ?? [];
|
|
594
600
|
let requiredHits = 0;
|
|
595
601
|
for (const phrase of required) {
|
|
596
602
|
if (includesPhrase(content, phrase)) {
|
|
@@ -2135,4 +2141,4 @@ var _internals = {
|
|
|
2135
2141
|
clearRetiredSkillLinks
|
|
2136
2142
|
};
|
|
2137
2143
|
|
|
2138
|
-
export { BUNDLED_PROJECT_SKILL_ROOT, bundledProjectSkillFileReference, syncBundledProjectSkillsIfMissingAsync, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, proposalRepoRelativePath, generateEvalStub, writeEvalStub, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, buildKnowledgeCluster, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, clearDraftSkillLinks, clearRetiredSkillLinks, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
|
|
2144
|
+
export { BUNDLED_PROJECT_SKILL_ROOT, bundledProjectSkillFileReference, syncBundledProjectSkillsIfMissingAsync, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, isRejectedSkillContent, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, proposalRepoRelativePath, generateEvalStub, writeEvalStub, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, buildKnowledgeCluster, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, clearDraftSkillLinks, clearRetiredSkillLinks, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
|
|
@@ -86,7 +86,7 @@ var _internals = {
|
|
|
86
86
|
symlinkSync: fs.symlinkSync
|
|
87
87
|
},
|
|
88
88
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
89
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
89
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-5xc9ntdh.js");
|
|
90
90
|
return realWrite(directory, taskId, files);
|
|
91
91
|
},
|
|
92
92
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-wbdxmf1a.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-mgbpbs1f.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-64ppqy4y.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-7jm70cab.js");
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-rtgqy0yg.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./index-ae75rja9.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveKnowledgeStoreDir
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-zzhyws9g.js";
|
|
8
8
|
import {
|
|
9
9
|
atomicWriteFile
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-b3jfcptk.js";
|
|
11
11
|
import {
|
|
12
12
|
require_proper_lockfile
|
|
13
13
|
} from "./index-7g4c7s5r.js";
|
|
@@ -625,7 +625,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
625
625
|
deltas.push({ id, delta });
|
|
626
626
|
}
|
|
627
627
|
if (deltas.length > 0) {
|
|
628
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
628
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-s4976v9c.js");
|
|
629
629
|
await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
630
630
|
}
|
|
631
631
|
return {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_schema,
|
|
4
4
|
stripKnownSwarmPrefix
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-0vq9gnqd.js";
|
|
6
6
|
import {
|
|
7
7
|
init_constants
|
|
8
8
|
} from "./index-3jcyn8g6.js";
|
|
@@ -2032,6 +2032,23 @@ class QuickLRU extends Map {
|
|
|
2032
2032
|
|
|
2033
2033
|
// src/hooks/guardrails/file-authority.ts
|
|
2034
2034
|
init_schema();
|
|
2035
|
+
|
|
2036
|
+
// src/utils/stable-stringify.ts
|
|
2037
|
+
function stableCanonicalStringify(value) {
|
|
2038
|
+
if (value === null)
|
|
2039
|
+
return "null";
|
|
2040
|
+
if (typeof value !== "object")
|
|
2041
|
+
return JSON.stringify(value);
|
|
2042
|
+
if (Array.isArray(value)) {
|
|
2043
|
+
return `[${value.map((el) => stableCanonicalStringify(el)).join(",")}]`;
|
|
2044
|
+
}
|
|
2045
|
+
const obj = value;
|
|
2046
|
+
const keys = Object.keys(obj).sort();
|
|
2047
|
+
const entries = keys.map((k) => `${JSON.stringify(k)}:${stableCanonicalStringify(obj[k])}`).join(",");
|
|
2048
|
+
return `{${entries}}`;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
// src/hooks/guardrails/file-authority.ts
|
|
2035
2052
|
var pathNormalizationCache = new QuickLRU({
|
|
2036
2053
|
maxSize: 500
|
|
2037
2054
|
});
|
|
@@ -2416,4 +2433,4 @@ function redactPath(filePath) {
|
|
|
2416
2433
|
return normalized;
|
|
2417
2434
|
}
|
|
2418
2435
|
|
|
2419
|
-
export { classifyFile, checkFileAuthority, isInDeclaredScope2 as isInDeclaredScope, redactShellCommand, redactPath };
|
|
2436
|
+
export { stableCanonicalStringify, classifyFile, checkFileAuthority, isInDeclaredScope2 as isInDeclaredScope, redactShellCommand, redactPath };
|