@lmzhen/dsh-evolution-commands 0.4.0 → 0.5.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/index.js +18 -4
- package/lib/types/doctor.d.ts +5 -0
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { effectiveSessionPolicy } from "@lmzhen/dsh-evolution-approval";
|
|
4
4
|
import { createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
5
|
-
import { MAX_TIMER_DELAY_MS, appendEvolutionEvent, assertSkillsRootAliasRetired, buildLearnPrompt, clampedNumber, composePresetComposition, eventsFile, evolutionRoot, isMissingPath, newSkillLibrary, resolveRootConfig, scopedProbeReport } from "@lmzhen/dsh-evolution-core";
|
|
5
|
+
import { DEFAULT_SKILL_LIMITS, MAX_TIMER_DELAY_MS, appendEvolutionEvent, assertSkillsRootAliasRetired, buildLearnPrompt, clampedNumber, composePresetComposition, eventsFile, evolutionRoot, isMissingPath, newSkillLibrary, policyStageLimits, resolveRootConfig, scopedProbeReport } from "@lmzhen/dsh-evolution-core";
|
|
6
6
|
import { buildEnrichment, buildMaintainFacts, runMaintain, snapshotFromLibrary } from "@lmzhen/dsh-evolution-maintenance";
|
|
7
7
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { dirname, join } from "node:path";
|
|
@@ -21,6 +21,10 @@ import { fileURLToPath } from "node:url";
|
|
|
21
21
|
/** D-6 (v18): exact-segment tail match (the loose substring form matched a
|
|
22
22
|
* hypothetical `dsh-evolution-allowlist`). */
|
|
23
23
|
const tailOf = (name) => name.slice(name.lastIndexOf("/") + 1);
|
|
24
|
+
/** P2-20 (audit): the TS-side copy of the install-target tails. The script
|
|
25
|
+
* side (install-layered.mjs, verify-profile-bundles.mjs) imports the list
|
|
26
|
+
* from packages/scripts/lib-family-packages.mjs; guard-scripts.spec.ts pins
|
|
27
|
+
* the two sides to each other. */
|
|
24
28
|
const EVOLUTION_BUNDLE_TAILS = new Set([
|
|
25
29
|
"dsh-evolution-all",
|
|
26
30
|
"dsh-evolution-host",
|
|
@@ -857,6 +861,9 @@ function apply(ctx, rawConfig = {}) {
|
|
|
857
861
|
quality: enrichment.quality,
|
|
858
862
|
protected: enrichment.protected,
|
|
859
863
|
catalogInvalid: enrichment.catalogInvalid,
|
|
864
|
+
demand: enrichment.demand,
|
|
865
|
+
liveness: enrichment.liveness,
|
|
866
|
+
supportChars: enrichment.supportChars,
|
|
860
867
|
onReadError: (name, error) => {
|
|
861
868
|
readFailures.push(name);
|
|
862
869
|
ctx.logger.warn(`evolution-maintenance: skipping unreadable skill "${name}": ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -906,7 +913,10 @@ function apply(ctx, rawConfig = {}) {
|
|
|
906
913
|
quality: () => enrichment.quality,
|
|
907
914
|
protected: () => enrichment.protected,
|
|
908
915
|
catalogInvalid: () => enrichment.catalogInvalid,
|
|
909
|
-
usageObserved: () => enrichment.usageObservedValue
|
|
916
|
+
usageObserved: () => enrichment.usageObservedValue,
|
|
917
|
+
demand: () => enrichment.demand,
|
|
918
|
+
liveness: () => enrichment.liveness,
|
|
919
|
+
supportChars: () => enrichment.supportChars
|
|
910
920
|
});
|
|
911
921
|
if (outcome.ok) lastMaintainRunId = outcome.runId ?? "";
|
|
912
922
|
if (!outcome.ok) return err(outcome.error ?? "Maintenance scan failed.");
|
|
@@ -976,7 +986,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
976
986
|
name: "agent.cordis.yml",
|
|
977
987
|
content: composition
|
|
978
988
|
}, {
|
|
979
|
-
name:
|
|
989
|
+
name: "preset.yml",
|
|
980
990
|
content: readFileSync(presetPath)
|
|
981
991
|
}], void 0, (message) => {
|
|
982
992
|
ctx.logger.warn(message);
|
|
@@ -1034,7 +1044,11 @@ function apply(ctx, rawConfig = {}) {
|
|
|
1034
1044
|
config: { root: skillsRootValue },
|
|
1035
1045
|
io: ioRegistry.provider(),
|
|
1036
1046
|
ctx,
|
|
1037
|
-
threatExemptLabels: config.threatExemptLabels
|
|
1047
|
+
threatExemptLabels: config.threatExemptLabels,
|
|
1048
|
+
limits: {
|
|
1049
|
+
...DEFAULT_SKILL_LIMITS,
|
|
1050
|
+
...policyStageLimits(ctx.get("evolutionPolicy")?.get?.())
|
|
1051
|
+
}
|
|
1038
1052
|
}).restructure(name, [{
|
|
1039
1053
|
heading,
|
|
1040
1054
|
toFile
|
package/lib/types/doctor.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type ScopedProbeReport } from '@lmzhen/dsh-evolution-core';
|
|
2
|
+
/** P2-20 (audit): the TS-side copy of the install-target tails. The script
|
|
3
|
+
* side (install-layered.mjs, verify-profile-bundles.mjs) imports the list
|
|
4
|
+
* from packages/scripts/lib-family-packages.mjs; guard-scripts.spec.ts pins
|
|
5
|
+
* the two sides to each other. */
|
|
6
|
+
export declare const EVOLUTION_BUNDLE_TAILS: Set<string>;
|
|
2
7
|
/** G3-② (B2): one delivered preset variant compared against a fresh generation.
|
|
3
8
|
* "absent" is the user simply not using that base (never an action); "unknown"
|
|
4
9
|
* is a comparison that could not run, kept distinct from a verified "fresh". */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-commands",
|
|
3
3
|
"description": "Human commands for the evolution family (/evolution pending|curator|maintain|doctor) (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
30
|
-
"@lmzhen/dsh-evolution-approval": "^0.
|
|
31
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
32
|
-
"@lmzhen/dsh-evolution-maintenance": "^0.
|
|
30
|
+
"@lmzhen/dsh-evolution-approval": "^0.5.0",
|
|
31
|
+
"@lmzhen/dsh-evolution-core": "^0.5.0",
|
|
32
|
+
"@lmzhen/dsh-evolution-maintenance": "^0.5.0"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@lmzhen/dsh-evolution-agent-preset": "^0.
|
|
35
|
+
"@lmzhen/dsh-evolution-agent-preset": "^0.5.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": "^4.0.1",
|