@lmzhen/dsh-evolution-commands 0.3.74 → 0.3.77
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 +3 -1
- package/lib/index.js +127 -28
- package/lib/types/doctor.d.ts +13 -0
- package/package.json +6 -12
- package/lib/invariant.js +0 -8
- package/lib/types/invariant.d.ts +0 -5
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ The injection goes through the agent's waking primitive (`followup`, falling bac
|
|
|
19
19
|
to `inject` when the host lacks it), **called on the agent instance**: the
|
|
20
20
|
platform's `Agent.followup` is a prototype method (`this.send(...)`), so a
|
|
21
21
|
detached reference throws and queues nothing (0.3.73 fix; the same shape is
|
|
22
|
-
pinned by `
|
|
22
|
+
pinned by rule N13b in `packages/scripts/verify-arch-guards.mjs`, which masks comments and string literals before matching and self-tests its detector at startup).
|
|
23
23
|
|
|
24
24
|
#### KV Cache effect
|
|
25
25
|
|
|
@@ -29,3 +29,5 @@ Independent of request-prefix construction. This package does not alter the asse
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
- No known durable consumer gaps at this time. Runtime contracts are covered by package and boundary tests.
|
|
32
|
+
|
|
33
|
+
**Runtime invariant:** No companion is published. The platform auto-assembles nothing and the family mounts no `<pkg>/invariant` cordis row, so a companion here would never execute (v37 S2.1 / I-3).
|
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,
|
|
5
|
+
import { MAX_TIMER_DELAY_MS, appendEvolutionEvent, assertSkillsRootAliasRetired, buildLearnPrompt, clampedNumber, composePresetComposition, eventsFile, evolutionRoot, newSkillLibrary, resolveRootConfig } 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";
|
|
@@ -46,8 +46,17 @@ function collectEvolutionBundles(home, onReadError) {
|
|
|
46
46
|
}
|
|
47
47
|
for (const profile of profileEntries) {
|
|
48
48
|
if (!profile.isDirectory()) continue;
|
|
49
|
+
if (profile.name === "node_modules" || profile.name.startsWith(".")) continue;
|
|
50
|
+
let raw;
|
|
49
51
|
try {
|
|
50
|
-
|
|
52
|
+
raw = readFileSync(join(profilesDir, profile.name, "package.json"), "utf8");
|
|
53
|
+
} catch (error) {
|
|
54
|
+
if (error?.code === "ENOENT") continue;
|
|
55
|
+
onReadError?.(error, "profile-manifest");
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
const manifest = JSON.parse(raw);
|
|
51
60
|
for (const name of manifest.dsh?.profile?.bundles ?? []) if (EVOLUTION_BUNDLE_TAILS.has(tailOf(name))) bundles.push(name);
|
|
52
61
|
} catch (error) {
|
|
53
62
|
onReadError?.(error, "profile-manifest");
|
|
@@ -66,6 +75,33 @@ function envIssues() {
|
|
|
66
75
|
if (query && !SESSION_QUERY_MODES.has(query)) issues.push(`DSH_EVOLUTION_SESSION_QUERY="${query}" is not one of startup|first-search|never — the patch normalizes it to 'startup' silently; set it to a listed mode.`);
|
|
67
76
|
return issues;
|
|
68
77
|
}
|
|
78
|
+
/** S0.2 (v37 P0-1): memory files that still carry the platform's `{{` prompt
|
|
79
|
+
* variable syntax. The platform interpolates EVERY `systemPrompt.context` text
|
|
80
|
+
* once per model step and throws on an unknown/malformed reference, so one such
|
|
81
|
+
* entry used to fail every turn of every session under this home. Current
|
|
82
|
+
* builds neutralize the injected text (`MemoryStore.renderContext`), which is
|
|
83
|
+
* why this is a residual-risk report instead of a hard failure: an older
|
|
84
|
+
* still-running process is still bricked, and an operator may prefer to clean
|
|
85
|
+
* the file. Read-only; an unreadable file is skipped (the doctor never throws).
|
|
86
|
+
* @param home - resolved DSH_HOME.
|
|
87
|
+
* @returns one message per affected memory file.
|
|
88
|
+
*/
|
|
89
|
+
function memoryInterpolationIssues(home) {
|
|
90
|
+
const issues = [];
|
|
91
|
+
for (const file of ["MEMORY.md", "USER.md"]) {
|
|
92
|
+
const path = join(home, "memories", file);
|
|
93
|
+
if (!existsSync(path)) continue;
|
|
94
|
+
let raw;
|
|
95
|
+
try {
|
|
96
|
+
raw = readFileSync(path, "utf8");
|
|
97
|
+
} catch {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
const hits = raw.split("{{").length - 1;
|
|
101
|
+
if (hits > 0) issues.push(`${file}: ${hits} "{{" occurrence(s) — the platform interpolates this syntax in prompt context and throws on an unknown reference, so a build without the render-time neutralization fails every later turn; rewrite the affected entries`);
|
|
102
|
+
}
|
|
103
|
+
return issues;
|
|
104
|
+
}
|
|
69
105
|
/**
|
|
70
106
|
* Diagnose the deployment. `ctx` supplies service presence (a bare stub with
|
|
71
107
|
* only `get` is enough); `home` defaults to the evolution root so tests can
|
|
@@ -109,22 +145,29 @@ async function diagnose(ctx, options = {}) {
|
|
|
109
145
|
executingCount = null;
|
|
110
146
|
}
|
|
111
147
|
const installForm = full ? "full" : preset ? "preset" : layered ? "layered" : host ? "host" : presetDirInstalled ? "preset-only" : "none";
|
|
148
|
+
const deploymentForm = installForm === "layered" ? "variant" : installForm === "full" || installForm === "preset" ? "attach" : installForm === "host" ? "host-only" : installForm === "preset-only" ? "preset-only" : "none";
|
|
112
149
|
const mountConflicts = conflicts.filter((row) => !row.includes("DEGRADED"));
|
|
150
|
+
const undecidable = mountConflicts.length !== conflicts.length;
|
|
113
151
|
const actions = [];
|
|
114
152
|
if (mountConflicts.length > 0) actions.push("Resolve the conflict first: keep exactly one of evolution-all / evolution-host / evolution-preset / layered.");
|
|
153
|
+
else if (undecidable) actions.push("The install form is UNDECIDABLE (see the DEGRADED row above): an unreadable profiles directory or profile manifest hides whatever is installed, so this report must not add or remove a bundle. Fix the reported read failure, then re-run /evolution doctor.");
|
|
115
154
|
else if (installForm === "none") actions.push("Install the default full bundle: dsh plugin --profile web add @lmzhen/dsh-evolution-all");
|
|
116
155
|
else if (installForm === "preset-only") actions.push("The Evolution preset is delivered but no profile mounts an evolution bundle — re-add @lmzhen/dsh-evolution-host for the layered layout (do NOT add all on top of the preset: that double-mounts the model rows), or remove .agent-presets/evolution if the layered layout is no longer wanted.");
|
|
117
|
-
else if (installForm === "layered") actions.push("
|
|
156
|
+
else if (installForm === "layered") actions.push("Variant form (session opt-in): model tools follow the Evolution preset, and a session on a platform original preset carries no family rows; add @lmzhen/dsh-evolution-all instead if every session should have them.");
|
|
118
157
|
const env = envIssues();
|
|
119
158
|
if (env.length > 0) actions.push("Fix the DSH_EVOLUTION_* variable listed above.");
|
|
120
159
|
if (services.review && !services.curator) actions.push("Curator service is not mounted — automatic curation is off; verify the host/all bundle row set is complete.");
|
|
121
160
|
if (pendingCount === null && services.approval) actions.push("Approval service is mounted but pending listing failed — check the evolution state service.");
|
|
161
|
+
const memoryIssues = memoryInterpolationIssues(home);
|
|
162
|
+
if (memoryIssues.length > 0) actions.push("Rewrite the memory entries listed above (or run a build with the render-time neutralization) — they broke prompt assembly on older builds.");
|
|
122
163
|
if ((executingCount ?? 0) > 0) actions.push(`${executingCount} staged write(s) are EXECUTING (an approve crashed mid-run — or one is still in flight). Inspect with /evolution pending: if you started the approve, verify the landed write and do not reject it; only reject after verifying no write is intended.`);
|
|
123
164
|
return {
|
|
124
165
|
installForm,
|
|
166
|
+
deploymentForm,
|
|
125
167
|
bundles,
|
|
126
168
|
conflicts,
|
|
127
169
|
envIssues: env,
|
|
170
|
+
memoryIssues,
|
|
128
171
|
services,
|
|
129
172
|
pendingCount,
|
|
130
173
|
executingCount,
|
|
@@ -133,7 +176,7 @@ async function diagnose(ctx, options = {}) {
|
|
|
133
176
|
}
|
|
134
177
|
function renderDoctorText(report) {
|
|
135
178
|
const lines = [
|
|
136
|
-
`Evolution doctor — install form: ${report.installForm}`,
|
|
179
|
+
`Evolution doctor — install form: ${report.installForm} (deployment: ${report.deploymentForm})`,
|
|
137
180
|
`bundles (all profiles): ${report.bundles.length > 0 ? report.bundles.join(", ") : "(none)"}`,
|
|
138
181
|
`services: review=${report.services.review} (inferred from bundles, all profiles) curator=${report.services.curator} approval=${report.services.approval} skillUsage=${report.services.skillUsage} io=${report.services.io}`,
|
|
139
182
|
`pending: ${report.pendingCount === null ? "unknown" : report.pendingCount}`,
|
|
@@ -141,6 +184,7 @@ function renderDoctorText(report) {
|
|
|
141
184
|
];
|
|
142
185
|
if (report.conflicts.length > 0) lines.push("conflicts:", ...report.conflicts.map((line) => ` ! ${line}`));
|
|
143
186
|
if (report.envIssues.length > 0) lines.push("env:", ...report.envIssues.map((line) => ` ! ${line}`));
|
|
187
|
+
if (report.memoryIssues.length > 0) lines.push("memory:", ...report.memoryIssues.map((line) => ` ! ${line}`));
|
|
144
188
|
if (report.actions.length > 0) lines.push("next steps:", ...report.actions.map((line) => ` → ${line}`));
|
|
145
189
|
return lines.join("\n");
|
|
146
190
|
}
|
|
@@ -200,8 +244,8 @@ const COMMAND_ENTRIES = [
|
|
|
200
244
|
summary: "run a maintenance scan (--facts: 0-token preview)"
|
|
201
245
|
},
|
|
202
246
|
{
|
|
203
|
-
usage: "preset install",
|
|
204
|
-
summary: "generate
|
|
247
|
+
usage: "preset install [--base <name>[,<name>...]]",
|
|
248
|
+
summary: "generate one Evolution agent preset per named base into the user root (bases from the agent package's bases.json)"
|
|
205
249
|
},
|
|
206
250
|
{
|
|
207
251
|
usage: "restructure <name> \"<heading>\" <to_file> [--plan <runId>]",
|
|
@@ -350,11 +394,15 @@ function apply(ctx, rawConfig = {}) {
|
|
|
350
394
|
const reportAny = report;
|
|
351
395
|
const nameOf = (item) => typeof item === "object" && item !== null && typeof item.name === "string" ? item.name : "?";
|
|
352
396
|
const reasonOf = (item) => typeof item === "object" && item !== null && typeof item.reason === "string" ? item.reason : "?";
|
|
397
|
+
const aborted = typeof reportAny.aborted === "string" ? reportAny.aborted : void 0;
|
|
398
|
+
const unattributed = Array.isArray(reportAny.unattributed) ? reportAny.unattributed.length : 0;
|
|
353
399
|
return ok([
|
|
354
400
|
`runId=${reportAny.runId}`,
|
|
355
401
|
`startedAt=${reportAny.startedAt}`,
|
|
356
402
|
`archived=${reportAny.archived.map(nameOf).join(", ") || "(none)"}`,
|
|
357
|
-
`failed=${reportAny.failed.map((item) => `${nameOf(item)}: ${reasonOf(item)}`).join(", ") || "(none)"}
|
|
403
|
+
`failed=${reportAny.failed.map((item) => `${nameOf(item)}: ${reasonOf(item)}`).join(", ") || "(none)"}`,
|
|
404
|
+
...aborted === void 0 ? [] : [`aborted=${aborted}`],
|
|
405
|
+
...unattributed === 0 ? [] : [`unattributed=${unattributed}`]
|
|
358
406
|
].join("\n"));
|
|
359
407
|
}
|
|
360
408
|
if (input === "restore" || input.startsWith("restore ")) {
|
|
@@ -433,7 +481,10 @@ function apply(ctx, rawConfig = {}) {
|
|
|
433
481
|
if (input === "maintain --facts") {
|
|
434
482
|
const ioRegistry = ctx.get("evolutionIo");
|
|
435
483
|
if (!ioRegistry) return err("Evolution IO registry not mounted — maintenance facts unavailable.");
|
|
436
|
-
const library =
|
|
484
|
+
const library = newSkillLibrary({
|
|
485
|
+
config: { root: skillsRootValue },
|
|
486
|
+
io: ioRegistry.provider()
|
|
487
|
+
});
|
|
437
488
|
const enrichment = await buildEnrichment(ctx, library);
|
|
438
489
|
const { facts } = buildMaintainFacts(await snapshotFromLibrary(library, {
|
|
439
490
|
descriptions: enrichment.descriptions,
|
|
@@ -458,7 +509,10 @@ function apply(ctx, rawConfig = {}) {
|
|
|
458
509
|
if (!subagents) return err("Subagents service not mounted — maintenance scan unavailable.");
|
|
459
510
|
try {
|
|
460
511
|
maintainInFlightSince = Date.now();
|
|
461
|
-
const library =
|
|
512
|
+
const library = newSkillLibrary({
|
|
513
|
+
config: { root: skillsRootValue },
|
|
514
|
+
io: ioRegistry.provider()
|
|
515
|
+
});
|
|
462
516
|
const enrichment = await buildEnrichment(ctx, library);
|
|
463
517
|
const outcome = await runMaintain({
|
|
464
518
|
library,
|
|
@@ -501,7 +555,9 @@ function apply(ctx, rawConfig = {}) {
|
|
|
501
555
|
}
|
|
502
556
|
}
|
|
503
557
|
if (/^maintain\b/.test(input)) return err("Unknown maintain arguments: expected bare `maintain`, `maintain --timeout <ms>` or `maintain --timeout=<ms>` (a positive integer). Got: " + input);
|
|
504
|
-
|
|
558
|
+
const presetInstall = /^preset install(?: --base (\S+))?$/.exec(input);
|
|
559
|
+
if (presetInstall !== null || /^preset\b/.test(input)) {
|
|
560
|
+
if (presetInstall === null) return err("Unknown preset arguments: expected `preset install` or `preset install --base <name>[,<name>...]` (the names live in the agent package's bases.json). Got: " + input);
|
|
505
561
|
{
|
|
506
562
|
let installedBundles;
|
|
507
563
|
try {
|
|
@@ -515,26 +571,41 @@ function apply(ctx, rawConfig = {}) {
|
|
|
515
571
|
const presetBundle = installedBundles.find((name) => name === "dsh-evolution-preset" || name.endsWith("/dsh-evolution-preset"));
|
|
516
572
|
if (allBundle || presetBundle) return err(`Refusing to install the layered Evolution preset: "${allBundle ?? presetBundle}" is installed in this home — its model rows (tool-memory / tool-skill-manage / tool-session-query / skill-catalog) would double-mount with the preset's and the profile fails loud at startup. Keep ONE: remove the ${allBundle ? "evolution-all bundle" : "evolution-preset bundle"} before installing the layered preset (see /evolution doctor).`);
|
|
517
573
|
}
|
|
518
|
-
const target = join(evolutionRoot(), ".agent-presets", "evolution");
|
|
519
574
|
try {
|
|
520
575
|
const source = resolveAgentPresetDir(import.meta.url);
|
|
576
|
+
const table = readAgentPresetBases(source);
|
|
577
|
+
const requestedRaw = presetInstall[1] ?? table.defaultBase;
|
|
578
|
+
const requested = [...new Set(requestedRaw.split(",").map((part) => part.trim()).filter((part) => part !== ""))];
|
|
579
|
+
if (requested.length === 0) return err(`No agent-preset base named — ${join(source, "bases.json")} lists ${table.entries.map((entry) => entry.name).join(", ")}`);
|
|
580
|
+
const selected = [];
|
|
581
|
+
for (const name of requested) {
|
|
582
|
+
const entry = table.entries.find((candidate) => candidate.name === name);
|
|
583
|
+
if (entry === void 0) return err(`Unknown agent-preset base "${name}" — ${join(source, "bases.json")} lists ${table.entries.map((candidate) => candidate.name).join(", ")}`);
|
|
584
|
+
selected.push(entry);
|
|
585
|
+
}
|
|
521
586
|
const deltaPath = join(source, "agent.cordis.yml");
|
|
522
|
-
|
|
523
|
-
if (!existsSync(deltaPath) || !existsSync(presetPath)) return err(`Preset file missing from ${source} — is the dsh-evolution-agent-preset package installed?`);
|
|
587
|
+
if (!existsSync(deltaPath)) return err(`Preset file missing from ${source} — is the dsh-evolution-agent-preset package installed?`);
|
|
524
588
|
const registry = ctx.get("agentPresets");
|
|
525
589
|
if (!registry) return err("Agent preset registry not mounted — cannot compose the Evolution preset against the runtime standard.");
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
590
|
+
const written = [];
|
|
591
|
+
for (const base of selected) {
|
|
592
|
+
const target = join(evolutionRoot(), ".agent-presets", base.id);
|
|
593
|
+
const presetPath = join(source, base.metadata);
|
|
594
|
+
if (!existsSync(presetPath)) return err(`Preset file missing from ${source} — is the dsh-evolution-agent-preset package installed?`);
|
|
595
|
+
const composition = composePresetComposition(await registry.read(base.name), readFileSync(deltaPath, "utf8"));
|
|
596
|
+
mkdirSync(target, { recursive: true });
|
|
597
|
+
atomicWriteFiles(target, [{
|
|
598
|
+
name: "agent.cordis.yml",
|
|
599
|
+
content: composition
|
|
600
|
+
}, {
|
|
601
|
+
name: base.metadata,
|
|
602
|
+
content: readFileSync(presetPath)
|
|
603
|
+
}], void 0, (message) => {
|
|
604
|
+
ctx.logger.warn(message);
|
|
605
|
+
});
|
|
606
|
+
written.push(`${base.name} → ${target}`);
|
|
607
|
+
}
|
|
608
|
+
return ok(`Evolution agent preset installed (${written.join("; ")}). Restart the session switcher to select it.`);
|
|
538
609
|
} catch (error) {
|
|
539
610
|
return err(`Preset install failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
540
611
|
}
|
|
@@ -577,9 +648,12 @@ function apply(ctx, rawConfig = {}) {
|
|
|
577
648
|
});
|
|
578
649
|
if (decision.action === "staged") return ok(`${decision.message}${planRunId ? `\n[audit] plan=${planRunId}` : ""}`);
|
|
579
650
|
}
|
|
580
|
-
const result = await
|
|
581
|
-
|
|
582
|
-
|
|
651
|
+
const result = await newSkillLibrary({
|
|
652
|
+
config: { root: skillsRootValue },
|
|
653
|
+
io: ioRegistry.provider(),
|
|
654
|
+
ctx,
|
|
655
|
+
threatExemptLabels: config.threatExemptLabels
|
|
656
|
+
}).restructure(name, [{
|
|
583
657
|
heading,
|
|
584
658
|
toFile
|
|
585
659
|
}], "foreground");
|
|
@@ -615,6 +689,31 @@ function apply(ctx, rawConfig = {}) {
|
|
|
615
689
|
* name (`evolution-agent` vs `@lmzhen/dsh-evolution-agent-preset` — the rc.44
|
|
616
690
|
* dir≠name trap), so BOTH sibling shapes are probed.
|
|
617
691
|
*/
|
|
692
|
+
/** The agent-preset base table (evolution-agent/bases.json). The installer
|
|
693
|
+
* (install-layered.mjs) reads the SAME file — the literal that used to live in
|
|
694
|
+
* each of them is what kept this path on `standard` while the installer knew
|
|
695
|
+
* `ptc` too. Fails loud: a missing table is an incomplete install, never a
|
|
696
|
+
* silent fallback to the default base. */
|
|
697
|
+
function readAgentPresetBases(source) {
|
|
698
|
+
const path = join(source, "bases.json");
|
|
699
|
+
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
700
|
+
if (!Array.isArray(parsed.bases) || parsed.bases.length === 0) throw new Error(`${path} carries no bases[]`);
|
|
701
|
+
const entries = parsed.bases.map((raw) => {
|
|
702
|
+
const entry = raw;
|
|
703
|
+
if (typeof entry.name !== "string" || typeof entry.id !== "string" || typeof entry.metadata !== "string") throw new Error(`${path} entry ${JSON.stringify(raw)} needs name/id/metadata strings`);
|
|
704
|
+
return {
|
|
705
|
+
name: entry.name,
|
|
706
|
+
id: entry.id,
|
|
707
|
+
metadata: entry.metadata
|
|
708
|
+
};
|
|
709
|
+
});
|
|
710
|
+
const declared = parsed.default;
|
|
711
|
+
if (typeof declared !== "string" || !entries.some((entry) => entry.name === declared)) throw new Error(`${path} default ${JSON.stringify(declared)} is not one of ${entries.map((entry) => entry.name).join(", ")}`);
|
|
712
|
+
return {
|
|
713
|
+
defaultBase: declared,
|
|
714
|
+
entries
|
|
715
|
+
};
|
|
716
|
+
}
|
|
618
717
|
function resolveAgentPresetDir(importMetaUrl) {
|
|
619
718
|
const overlayCandidate = join(dirname(fileURLToPath(importMetaUrl)), "..", "..", "evolution-agent");
|
|
620
719
|
if (existsSync(join(overlayCandidate, "agent.cordis.yml")) && existsSync(join(overlayCandidate, "preset.yml"))) return overlayCandidate;
|
package/lib/types/doctor.d.ts
CHANGED
|
@@ -6,6 +6,13 @@ export interface DoctorReport {
|
|
|
6
6
|
* installing `all` — which double-mounts the preset's model rows (the
|
|
7
7
|
* exact conflict this report flags). */
|
|
8
8
|
installForm: 'full' | 'host' | 'preset' | 'layered' | 'preset-only' | 'none';
|
|
9
|
+
/** The PRODUCT form the install form implies (0.3.77, C axis). `variant` =
|
|
10
|
+
* session-level opt-in: the model tools live in the Evolution preset, so a
|
|
11
|
+
* session on any platform original preset carries none of the family and the
|
|
12
|
+
* cross-session consumers skip it (config `sessionScoped`). `attach` =
|
|
13
|
+
* profile-level: the model rows sit at profile root and every session carries
|
|
14
|
+
* them. The two are mutually exclusive install targets (E-33). */
|
|
15
|
+
deploymentForm: 'variant' | 'attach' | 'host-only' | 'preset-only' | 'none';
|
|
9
16
|
/** Aggregated across ALL profiles under `home` (N13, v12): doctor answers
|
|
10
17
|
* "is any profile carrying an evolution bundle / which install forms exist"
|
|
11
18
|
* — not "what this runtime mounted". `services.review` is the runtime-side
|
|
@@ -14,6 +21,12 @@ export interface DoctorReport {
|
|
|
14
21
|
bundles: string[];
|
|
15
22
|
conflicts: string[];
|
|
16
23
|
envIssues: string[];
|
|
24
|
+
/** S0.2 (v37 P0-1): memory files carrying the platform's `{{` prompt-variable
|
|
25
|
+
* syntax. Residual-risk detector — current builds neutralize the INJECTED text
|
|
26
|
+
* (`MemoryStore.renderContext`), but a still-running older build fails every
|
|
27
|
+
* pre-step of every session under this home, and an operator may want to clean
|
|
28
|
+
* the file regardless. */
|
|
29
|
+
memoryIssues: string[];
|
|
17
30
|
services: {
|
|
18
31
|
review: boolean;
|
|
19
32
|
curator: boolean;
|
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.3.
|
|
4
|
+
"version": "0.3.77",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./package.json": "./package.json"
|
|
26
22
|
},
|
|
27
23
|
"files": [
|
|
@@ -31,21 +27,19 @@
|
|
|
31
27
|
"license": "MIT",
|
|
32
28
|
"dependencies": {
|
|
33
29
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
35
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
36
|
-
"@lmzhen/dsh-evolution-maintenance": "^0.3.
|
|
30
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.77",
|
|
31
|
+
"@lmzhen/dsh-evolution-core": "^0.3.77",
|
|
32
|
+
"@lmzhen/dsh-evolution-maintenance": "^0.3.77"
|
|
37
33
|
},
|
|
38
34
|
"optionalDependencies": {
|
|
39
|
-
"@lmzhen/dsh-evolution-agent-preset": "^0.3.
|
|
35
|
+
"@lmzhen/dsh-evolution-agent-preset": "^0.3.77"
|
|
40
36
|
},
|
|
41
37
|
"peerDependencies": {
|
|
42
38
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
43
39
|
"@deepseek-ai/dsh-commands": "^0.1.5-rc.2",
|
|
44
|
-
"@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
|
|
45
40
|
"@deepseek-ai/dsh-llm": "^0.1.5-rc.2"
|
|
46
41
|
},
|
|
47
42
|
"devDependencies": {
|
|
48
|
-
"@deepseek-ai/dsh-commands": "^0.1.5-rc.2"
|
|
49
|
-
"@deepseek-ai/dsh-invariants": "^0.1.5-rc.2"
|
|
43
|
+
"@deepseek-ai/dsh-commands": "^0.1.5-rc.2"
|
|
50
44
|
}
|
|
51
45
|
}
|
package/lib/invariant.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
const PACKAGE_NAME = "@lmzhen/dsh-evolution-commands";
|
|
3
|
-
const name = "evolution-commands-invariant";
|
|
4
|
-
const inject = ["invariants"];
|
|
5
|
-
const install = () => {};
|
|
6
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
7
|
-
//#endregion
|
|
8
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED