@lmzhen/dsh-evolution-commands 0.3.71 → 0.3.72

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 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.");
@@ -721,10 +723,19 @@ function atomicWriteFiles(targetDir, writes, fs = defaultFs, logger = console.wa
721
723
  }
722
724
  }
723
725
  } catch (error) {
724
- for (const { name } of writes) fs.rmSync(stage(name), {
725
- force: true,
726
- recursive: true
727
- });
726
+ const cleanupFailures = [];
727
+ for (const { name } of writes) try {
728
+ fs.rmSync(stage(name), {
729
+ force: true,
730
+ recursive: true
731
+ });
732
+ } catch (cleanupError) {
733
+ cleanupFailures.push(`${name}: ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);
734
+ }
735
+ if (cleanupFailures.length > 0) {
736
+ const original = error instanceof Error ? error.message : String(error);
737
+ throw new Error(`${original} (staged-temp cleanup also failed: ${cleanupFailures.join("; ")})`);
738
+ }
728
739
  throw error;
729
740
  }
730
741
  }
@@ -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.72",
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.72",
35
+ "@lmzhen/dsh-evolution-core": "^0.3.72",
36
+ "@lmzhen/dsh-evolution-maintenance": "^0.3.72"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@lmzhen/dsh-evolution-agent-preset": "^0.3.71"
39
+ "@lmzhen/dsh-evolution-agent-preset": "^0.3.72"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@deepseek-ai/cordis": "^4.0.1",