@lmzhen/dsh-evolution-core 0.53.0 → 0.55.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/lib/{extract-plan-D4zO7dmD.js → extract-plan-ihQznLVT.js} +2 -1
- package/lib/extract.js +7 -7
- package/lib/index.js +795 -546
- package/lib/{limits-TD4Pv92Q.js → limits-DBg3UMkw.js} +11 -6
- package/lib/{skill-history-CZp8vhyL.js → mutation-storage-adapter-BM7mIJKp.js} +4 -647
- package/lib/mutations-1wLISSrY.js +592 -0
- package/lib/policy.js +9 -3
- package/lib/{quality-BLc6UQQb.js → quality-DNUVRbUm.js} +1 -1
- package/lib/{skill-health-BIpiPvw6.js → review-context-CXKwGGd8.js} +124 -183
- package/lib/runtime/plugin.js +92 -1
- package/lib/{session-projection-ByNxQi9O.js → session-projection-CbIKvDfJ.js} +3 -2
- package/lib/skill-history-B-DyIedq.js +646 -0
- package/lib/skills.js +12 -8
- package/lib/text-metrics-CyJhxWBs.js +132 -0
- package/lib/types/constants.d.ts +10 -5
- package/lib/types/constants.js +10 -5
- package/lib/types/drift-signals.d.ts +1 -4
- package/lib/types/drift-signals.js +14 -23
- package/lib/types/extract-request.js +3 -2
- package/lib/types/frontmatter.js +12 -8
- package/lib/types/index.d.ts +2 -1
- package/lib/types/index.js +2 -1
- package/lib/types/memory-store.d.ts +32 -6
- package/lib/types/memory-store.js +86 -30
- package/lib/types/mutation-unit.js +2 -1
- package/lib/types/params.js +6 -3
- package/lib/types/policy.d.ts +5 -0
- package/lib/types/policy.js +8 -2
- package/lib/types/prompts.d.ts +1 -1
- package/lib/types/prompts.js +1 -1
- package/lib/types/runtime/coherence.d.ts +27 -0
- package/lib/types/runtime/coherence.js +115 -0
- package/lib/types/runtime/plugin.js +2 -0
- package/lib/types/signals.js +3 -2
- package/lib/types/skill-health.d.ts +8 -5
- package/lib/types/skill-health.js +27 -28
- package/lib/types/skill-history.d.ts +2 -2
- package/lib/types/skill-history.js +7 -7
- package/lib/types/skill-lint.d.ts +1 -1
- package/lib/types/skill-lint.js +4 -4
- package/lib/types/skill-stats.d.ts +3 -1
- package/lib/types/skill-stats.js +2 -0
- package/lib/types/skill-store.js +2 -1
- package/lib/types/text-budgets.d.ts +150 -0
- package/lib/types/text-budgets.js +65 -0
- package/lib/types/text-metrics.d.ts +88 -0
- package/lib/types/text-metrics.js +131 -0
- package/lib/{usage-B1qveKi9.js → usage-e34VZPmK.js} +2 -515
- package/lib/write.js +3 -2
- package/package.json +1 -1
- package/lib/mutations-DQXddSJd.js +0 -75
- package/lib/types/cost.d.ts +0 -63
- package/lib/types/cost.js +0 -67
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as planReferenceRewrite, L as planRehoming, M as externalRefs, N as supportRefs, O as selectSections, P as applyReferenceRewrite } from "./usage-e34VZPmK.js";
|
|
2
|
+
import { u as frontmatterBlock } from "./mutations-1wLISSrY.js";
|
|
2
3
|
import { createHash } from "node:crypto";
|
|
3
4
|
//#region lib/types/extract-plan.js
|
|
4
5
|
const LF = String.fromCharCode(10);
|
package/lib/extract.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { p as isPresent } from "./io-GxghO3Ip.js";
|
|
2
|
-
import { i as DEFAULT_SKILL_LIMITS } from "./limits-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { n as projectExtractBodies, t as planExtract } from "./extract-plan-
|
|
2
|
+
import { i as DEFAULT_SKILL_LIMITS } from "./limits-DBg3UMkw.js";
|
|
3
|
+
import { a as measureUnit } from "./text-metrics-CyJhxWBs.js";
|
|
4
|
+
import { p as parseFrontmatter, r as contentHash } from "./mutations-1wLISSrY.js";
|
|
5
|
+
import { C as EXTRACT_PROMPT_VERSION, S as EXTRACT_PROMPT_V1, T as ownerCandidatesFromSummaries, _ as readProposalReport, b as proposalFromPlan, d as nearDuplicateSummaries, m as readExternalSupport, v as readProposalReports, w as findOwnerCandidate, x as EXTRACT_PROMPT_HASH, y as writeProposalReport } from "./quality-DNUVRbUm.js";
|
|
6
|
+
import { n as projectExtractBodies, t as planExtract } from "./extract-plan-ihQznLVT.js";
|
|
7
7
|
import { dirname, join } from "node:path";
|
|
8
8
|
//#region lib/types/extract-request.js
|
|
9
9
|
/** The one human-readable owner decision shared by tool and CLI. */
|
|
@@ -108,7 +108,7 @@ async function buildExtractPlanFromLibrary(library, input) {
|
|
|
108
108
|
candidates: lookup.candidates
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
if (targetMd
|
|
111
|
+
if (measureUnit(targetMd, "codePoints") > DEFAULT_SKILL_LIMITS.maxSkillContentChars) return {
|
|
112
112
|
ok: false,
|
|
113
113
|
message: "目标技能「" + target + "」已超过 " + DEFAULT_SKILL_LIMITS.maxSkillContentChars + " 字符,拒绝继续提取。"
|
|
114
114
|
};
|
|
@@ -224,7 +224,7 @@ async function buildExtractPlanFromLibrary(library, input) {
|
|
|
224
224
|
ok: false,
|
|
225
225
|
message: plan.message
|
|
226
226
|
};
|
|
227
|
-
const projectedChars = targetMd
|
|
227
|
+
const projectedChars = measureUnit(targetMd, "codePoints") + plan.plan.parts.reduce((sum, part) => sum + measureUnit(part.movedText, "codePoints") + 2, 0);
|
|
228
228
|
if (projectedChars > DEFAULT_SKILL_LIMITS.maxSkillContentChars) return {
|
|
229
229
|
ok: false,
|
|
230
230
|
message: "目标「" + target + "」投影后约 " + projectedChars + " 字符,超过 " + DEFAULT_SKILL_LIMITS.maxSkillContentChars + " 上限;拒绝提取。"
|