@lmzhen/dsh-evolution-commands 0.3.71 → 0.3.73

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 CHANGED
@@ -15,6 +15,11 @@ Human commands for the evolution family
15
15
  P2-22 (v11) correction: this package's **only** direct model-visible token is the
16
16
  `/evolution learn` injection — the full learning guidance is injected as a user
17
17
  message in this session. Everything else adds no tokens; consumers add their own.
18
+ The injection goes through the agent's waking primitive (`followup`, falling back
19
+ to `inject` when the host lacks it), **called on the agent instance**: the
20
+ platform's `Agent.followup` is a prototype method (`this.send(...)`), so a
21
+ detached reference throws and queues nothing (0.3.73 fix; the same shape is
22
+ pinned by `evolution-host/tests/wake-delivery-guard.spec.ts`).
18
23
 
19
24
  #### KV Cache effect
20
25
 
package/lib/index.js CHANGED
@@ -108,10 +108,12 @@ async function diagnose(ctx, options = {}) {
108
108
  pendingCount = null;
109
109
  executingCount = null;
110
110
  }
111
- const installForm = full ? "full" : preset ? "preset" : layered ? "layered" : host ? "host" : "none";
111
+ const installForm = full ? "full" : preset ? "preset" : layered ? "layered" : host ? "host" : presetDirInstalled ? "preset-only" : "none";
112
+ const mountConflicts = conflicts.filter((row) => !row.includes("DEGRADED"));
112
113
  const actions = [];
113
- if (conflicts.length > 0) actions.push("Resolve the conflict first: keep exactly one of evolution-all / evolution-host / evolution-preset / layered.");
114
+ if (mountConflicts.length > 0) actions.push("Resolve the conflict first: keep exactly one of evolution-all / evolution-host / evolution-preset / layered.");
114
115
  else if (installForm === "none") actions.push("Install the default full bundle: dsh plugin --profile web add @lmzhen/dsh-evolution-all");
116
+ 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.");
115
117
  else if (installForm === "layered") actions.push("Model tools follow the Evolution preset per session; add @lmzhen/dsh-evolution-all instead if every session should have them.");
116
118
  const env = envIssues();
117
119
  if (env.length > 0) actions.push("Fix the DSH_EVOLUTION_* variable listed above.");
@@ -415,9 +417,8 @@ function apply(ctx, rawConfig = {}) {
415
417
  summary: "learn request"
416
418
  }
417
419
  });
418
- const followup = invocation.agent.followup;
419
- const woke = typeof followup === "function";
420
- if (woke) followup(message);
420
+ const woke = typeof invocation.agent.followup === "function";
421
+ if (woke) invocation.agent.followup(message);
421
422
  else invocation.agent.inject(message);
422
423
  const eventIo = ctx.get("evolutionIo")?.provider();
423
424
  if (eventIo) appendEvolutionEvent(eventIo, eventsFile(evolutionRoot()), {
@@ -721,10 +722,19 @@ function atomicWriteFiles(targetDir, writes, fs = defaultFs, logger = console.wa
721
722
  }
722
723
  }
723
724
  } catch (error) {
724
- for (const { name } of writes) fs.rmSync(stage(name), {
725
- force: true,
726
- recursive: true
727
- });
725
+ const cleanupFailures = [];
726
+ for (const { name } of writes) try {
727
+ fs.rmSync(stage(name), {
728
+ force: true,
729
+ recursive: true
730
+ });
731
+ } catch (cleanupError) {
732
+ cleanupFailures.push(`${name}: ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);
733
+ }
734
+ if (cleanupFailures.length > 0) {
735
+ const original = error instanceof Error ? error.message : String(error);
736
+ throw new Error(`${original} (staged-temp cleanup also failed: ${cleanupFailures.join("; ")})`);
737
+ }
728
738
  throw error;
729
739
  }
730
740
  }
@@ -1,5 +1,11 @@
1
1
  export interface DoctorReport {
2
- installForm: 'full' | 'host' | 'preset' | 'layered' | 'none';
2
+ /** OPT-23 (2026-09): `preset-only` — the delivered Evolution preset
3
+ * artifact exists but NO profile carries an evolution bundle (e.g. the
4
+ * host bundle was removed after a layered install). Before, this healthy
5
+ * per-session install reported `none` and the action ladder advised
6
+ * installing `all` — which double-mounts the preset's model rows (the
7
+ * exact conflict this report flags). */
8
+ installForm: 'full' | 'host' | 'preset' | 'layered' | 'preset-only' | 'none';
3
9
  /** Aggregated across ALL profiles under `home` (N13, v12): doctor answers
4
10
  * "is any profile carrying an evolution bundle / which install forms exist"
5
11
  * — not "what this runtime mounted". `services.review` is the runtime-side
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.71",
4
+ "version": "0.3.73",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -31,12 +31,12 @@
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
33
  "@deepseek-ai/schemastery": "^3.18.1",
34
- "@lmzhen/dsh-evolution-approval": "^0.3.71",
35
- "@lmzhen/dsh-evolution-core": "^0.3.71",
36
- "@lmzhen/dsh-evolution-maintenance": "^0.3.71"
34
+ "@lmzhen/dsh-evolution-approval": "^0.3.73",
35
+ "@lmzhen/dsh-evolution-core": "^0.3.73",
36
+ "@lmzhen/dsh-evolution-maintenance": "^0.3.73"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@lmzhen/dsh-evolution-agent-preset": "^0.3.71"
39
+ "@lmzhen/dsh-evolution-agent-preset": "^0.3.73"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@deepseek-ai/cordis": "^4.0.1",