@lmzhen/dsh-evolution-core 0.3.35 → 0.3.36
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/index.js +25 -4
- package/lib/types/curator.d.ts +8 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -746,7 +746,8 @@ function buildCuratorRunReport(input) {
|
|
|
746
746
|
failed: [...input.failed],
|
|
747
747
|
...input.consolidated === void 0 ? {} : { consolidated: [...input.consolidated] },
|
|
748
748
|
...input.snapshotPath === void 0 ? {} : { snapshotPath: input.snapshotPath },
|
|
749
|
-
...input.llmReviewEnabled === void 0 ? {} : { llmReviewEnabled: input.llmReviewEnabled }
|
|
749
|
+
...input.llmReviewEnabled === void 0 ? {} : { llmReviewEnabled: input.llmReviewEnabled },
|
|
750
|
+
...input.nominationsWarnings === void 0 ? {} : { nominationsWarnings: [...input.nominationsWarnings] }
|
|
750
751
|
};
|
|
751
752
|
}
|
|
752
753
|
/**
|
|
@@ -765,7 +766,8 @@ function renderCuratorReportMarkdown(report) {
|
|
|
765
766
|
`- **Archived**: ${report.archived.length}`,
|
|
766
767
|
`- **Failed**: ${report.failed.length}`,
|
|
767
768
|
...report.snapshotPath === void 0 ? [] : [`- **Snapshot**: ${report.snapshotPath}`],
|
|
768
|
-
...report.llmReviewEnabled === void 0 ? [] : [`- **llmReview**: ${report.llmReviewEnabled}`]
|
|
769
|
+
...report.llmReviewEnabled === void 0 ? [] : [`- **llmReview**: ${report.llmReviewEnabled}`],
|
|
770
|
+
...report.nominationsWarnings === void 0 || report.nominationsWarnings.length === 0 ? [] : [`- **Nomination warnings**: ${report.nominationsWarnings.join("; ")}`]
|
|
769
771
|
];
|
|
770
772
|
const section = (title, items) => items.length === 0 ? [] : [
|
|
771
773
|
"",
|
|
@@ -791,10 +793,16 @@ const NOMINATION_NAME_RE = /^[a-z0-9][a-z0-9-]*$/;
|
|
|
791
793
|
function parseCuratorNominations(text) {
|
|
792
794
|
const prunings = [];
|
|
793
795
|
const consolidations = [];
|
|
796
|
+
const warnings = [];
|
|
794
797
|
let section = null;
|
|
795
798
|
let currentFrom = "";
|
|
796
799
|
let currentMode;
|
|
797
800
|
for (const line of text.split("\n")) {
|
|
801
|
+
const header = /^\s*(consolidations|prunings)\s*:\s*$/.exec(line);
|
|
802
|
+
if (header) {
|
|
803
|
+
section = header[1] === "consolidations" ? "consolidations" : "prunings";
|
|
804
|
+
continue;
|
|
805
|
+
}
|
|
798
806
|
const consolidated = /^\s*-\s*from:\s*([a-z0-9][a-z0-9-]*)\s*$/.exec(line);
|
|
799
807
|
if (consolidated) {
|
|
800
808
|
section = "consolidations";
|
|
@@ -805,6 +813,7 @@ function parseCuratorNominations(text) {
|
|
|
805
813
|
const mode = /^\s*mode:\s*(append|reference)\s*$/.exec(line);
|
|
806
814
|
if (mode) {
|
|
807
815
|
if (currentFrom !== "") currentMode = mode[1] === "reference" ? "reference" : "append";
|
|
816
|
+
else warnings.push(`mode: ${mode[1]} ignored — no preceding "- from:" entry (the consolidation falls back to append)`);
|
|
808
817
|
continue;
|
|
809
818
|
}
|
|
810
819
|
const into = /^\s*into:\s*([a-z0-9][a-z0-9-]*)\s*$/.exec(line);
|
|
@@ -821,6 +830,7 @@ function parseCuratorNominations(text) {
|
|
|
821
830
|
}
|
|
822
831
|
const pruned = /^\s*-\s*name:\s*([a-z0-9][a-z0-9-]*)\s*$/.exec(line);
|
|
823
832
|
if (pruned) {
|
|
833
|
+
if (section === "consolidations") warnings.push("\"- name:\" inside the consolidations section flips the parse to prunings");
|
|
824
834
|
section = "prunings";
|
|
825
835
|
const name = pruned[1];
|
|
826
836
|
if (name) prunings.push(name);
|
|
@@ -829,7 +839,8 @@ function parseCuratorNominations(text) {
|
|
|
829
839
|
const valid = (name) => NOMINATION_NAME_RE.test(name);
|
|
830
840
|
return {
|
|
831
841
|
prunings: prunings.filter(valid),
|
|
832
|
-
consolidations: consolidations.filter((item) => valid(item.from) && valid(item.into))
|
|
842
|
+
consolidations: consolidations.filter((item) => valid(item.from) && valid(item.into)),
|
|
843
|
+
warnings
|
|
833
844
|
};
|
|
834
845
|
}
|
|
835
846
|
/**
|
|
@@ -864,7 +875,8 @@ function computeScopeView(usage, config, protectedNames, gates) {
|
|
|
864
875
|
}
|
|
865
876
|
const bundled = config.bundledNames?.has(name) === true;
|
|
866
877
|
const suppressed = gateSet.suppressed.has(name);
|
|
867
|
-
|
|
878
|
+
const isBuiltin = PROTECTED_BUILTIN_SKILLS.has(name);
|
|
879
|
+
if (record.pinned || bundled || suppressed || protectedNames?.has(name) === true || isBuiltin) protectedSet.add(name);
|
|
868
880
|
if (lifecycleCandidate(name, record, config, bundled, gateSet)) {
|
|
869
881
|
managed.push(name);
|
|
870
882
|
if (record.state === "stale" || record.quality_warn === true) watched.push(name);
|
|
@@ -4502,6 +4514,15 @@ var SkillLibrary = class {
|
|
|
4502
4514
|
};
|
|
4503
4515
|
const target = join(dir, ...filePath.replace(/\\/g, "/").split("/").filter(Boolean));
|
|
4504
4516
|
return await this.runSingleWrite(target, (current) => {
|
|
4517
|
+
if (current !== null && content.trimEnd() === current.trimEnd()) return {
|
|
4518
|
+
result: {
|
|
4519
|
+
ok: true,
|
|
4520
|
+
message: `Support file "${filePath}" unchanged: the supplied content already matches the current file; nothing written.`,
|
|
4521
|
+
noop: true,
|
|
4522
|
+
path: target
|
|
4523
|
+
},
|
|
4524
|
+
write: null
|
|
4525
|
+
};
|
|
4505
4526
|
return {
|
|
4506
4527
|
result: {
|
|
4507
4528
|
ok: true,
|
package/lib/types/curator.d.ts
CHANGED
|
@@ -63,6 +63,8 @@ export interface CuratorRunReport {
|
|
|
63
63
|
snapshotPath?: string;
|
|
64
64
|
/** Whether the LLM nomination pass was enabled for this run (decision visibility). */
|
|
65
65
|
llmReviewEnabled?: boolean;
|
|
66
|
+
/** V6-35 (0.3.36): lenient-parse shape notes from the LLM nomination block. */
|
|
67
|
+
nominationsWarnings?: string[];
|
|
66
68
|
}
|
|
67
69
|
export interface CuratorReportInput {
|
|
68
70
|
runId: string;
|
|
@@ -76,6 +78,7 @@ export interface CuratorReportInput {
|
|
|
76
78
|
consolidated?: readonly CuratorConsolidation[];
|
|
77
79
|
snapshotPath?: string;
|
|
78
80
|
llmReviewEnabled?: boolean;
|
|
81
|
+
nominationsWarnings?: readonly string[];
|
|
79
82
|
}
|
|
80
83
|
export declare function buildCuratorRunReport(input: CuratorReportInput): CuratorRunReport;
|
|
81
84
|
/**
|
|
@@ -97,6 +100,11 @@ export interface CuratorConsolidation {
|
|
|
97
100
|
export interface CuratorNominations {
|
|
98
101
|
prunings: string[];
|
|
99
102
|
consolidations: CuratorConsolidation[];
|
|
103
|
+
/** V6-35 (0.3.36): lenient-parse shape notes (an entry the lenient logic
|
|
104
|
+
* silently dropped or re-routed). Parsing stays lenient — these are advisory
|
|
105
|
+
* and flow into the run report so the operator sees why a mode or a pruning
|
|
106
|
+
* went somewhere unexpected. */
|
|
107
|
+
warnings: string[];
|
|
100
108
|
}
|
|
101
109
|
/**
|
|
102
110
|
* Parse the curator LLM's YAML nomination block (consolidations + prunings).
|
package/package.json
CHANGED