@lmzhen/dsh-evolution-commands 0.27.1 → 0.27.3

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.
Files changed (2) hide show
  1. package/lib/index.js +40 -22
  2. package/package.json +5 -5
package/lib/index.js CHANGED
@@ -50,30 +50,48 @@ const FACT_LABELS = {
50
50
  "platform-line": "平台兼容线",
51
51
  "family-version": "家族版本",
52
52
  "install-form": "安装形态",
53
- "preset-ids": "受限 preset id",
54
- "readonly-contract": "只读契约",
53
+ "preset-ids": "受限预设",
54
+ "readonly-contract": "只读说明",
55
55
  "upgrade-order": "升级顺序",
56
56
  "fallback-map": "命令兜底"
57
57
  };
58
58
  const RUNTIME_LABELS = {
59
59
  "subagent-channel": "子代理通道",
60
- "restricted-preset": "受限 preset",
61
- "host-surface": "Host 数据面",
62
- "session-fold": "会话事件 fold 单入口",
63
- "platform-services": "平台服务探测",
60
+ "restricted-preset": "受限预设",
61
+ "host-surface": "数据面连接",
62
+ "session-fold": "会话事件读取",
63
+ "platform-services": "平台服务",
64
64
  runs: "运行登记",
65
- "platform-pairing": "平台/家族配对",
65
+ "platform-pairing": "版本兼容",
66
66
  "install-form-detected": "实际安装形态"
67
67
  };
68
+ /**
69
+ * The install form in reader-facing words. The M1..M4 ids stay internal (the runtime rows and
70
+ * --json keep them); a settings reader sees what the deployment is FOR, not the code name.
71
+ */
72
+ const FORM_WORDS = Object.freeze({
73
+ M1: "完整功能包",
74
+ M2: "后台自动化包",
75
+ M3: "会话预设包",
76
+ M4: "分层安装"
77
+ });
78
+ /**
79
+ * Build the seven documentation facts. Values are READER-FACING prose: the CLI text, --json and
80
+ * the settings card all print the same strings, so internal codes, raw evidence paths and
81
+ * "declared/inferred" jargon stay out of the value (the runtime rows and the per-fact home carry
82
+ * the technical half).
83
+ * @param inputs - assembled doctor inputs.
84
+ * @returns the ordered fact rows.
85
+ */
68
86
  function factsOf(inputs) {
69
87
  const values = {
70
- "platform-line": inputs.platformLine.version + "(floor " + inputs.platformLine.floor + ")",
88
+ "platform-line": inputs.platformLine.version + "(最低兼容 " + inputs.platformLine.floor + ")",
71
89
  "family-version": inputs.familyVersion,
72
- "install-form": inputs.form.id + "(" + inputs.form.confidence + ";证据:" + inputs.form.evidence.join("、") + ")",
73
- "preset-ids": REVIEWER_PRESET_ID + " / " + MAINTAINER_PRESET_ID + "(家族 preset 集合:" + EVOLUTION_PRESET_IDS.join(", ") + ")",
74
- "readonly-contract": REVIEWER_PRESET_ID + " 的工具集由 restrictor allow 集合决定;维护行同构(" + MAINTAINER_PRESET_ID + ")",
75
- "upgrade-order": "先升平台 → 再升家族 → 最后发布(见 INSTALL runbook)",
76
- "fallback-map": Object.keys(COMMAND_FALLBACKS).join("、") + "(每面的命令见 INSTALL 命令兜底表)"
90
+ "install-form": FORM_WORDS[inputs.form.id] + "(" + (inputs.form.confidence === "declared" ? "安装内容已声明" : "按已安装内容推断") + ")",
91
+ "preset-ids": "审阅 / 维护两个受限只读预设(" + REVIEWER_PRESET_ID + " / " + MAINTAINER_PRESET_ID + ");另可选用 " + String(EVOLUTION_PRESET_IDS.length) + " 个基础预设",
92
+ "readonly-contract": "受限预设只读:可用工具由该预设声明的 allow 集合决定(审阅与维护同构)",
93
+ "upgrade-order": "先升平台,再升家族,最后发布(详见 INSTALL 的升级说明)",
94
+ "fallback-map": String(Object.keys(COMMAND_FALLBACKS).length) + " 个功能面板各有命令兜底(详见 INSTALL 命令兜底表)"
77
95
  };
78
96
  return DIAGNOSTICS_FACT_KEYS.map((key) => ({
79
97
  key,
@@ -88,7 +106,7 @@ function channelRow(channels) {
88
106
  key: "subagent-channel",
89
107
  label: RUNTIME_LABELS["subagent-channel"] ?? "子代理通道",
90
108
  status: "ok",
91
- detail: "reviewer/maintainer 通道均可用(spawn provider + agentPreset 能力)"
109
+ detail: "审阅与维护两条子代理通道均可用。"
92
110
  };
93
111
  const reasons = unavailable.map((state) => state.code + ": " + state.reason);
94
112
  return {
@@ -115,14 +133,14 @@ function presetRow(presets) {
115
133
  label: RUNTIME_LABELS["restricted-preset"] ?? "受限 preset",
116
134
  status: "fail",
117
135
  detail: errorText("e-324-restricted-preset-unavailable", { a1: broken.map((entry) => entry.broken ?? "").join(";") }),
118
- remedy: "重载插件行使 ensureRestrictedPreset 重新注册;运行 /evolution doctor 查看 preset id 与 allow 集合。"
136
+ remedy: "重新加载家族插件;若仍失败,运行 /evolution doctor 查看详情。"
119
137
  };
120
138
  if (missing.length > 0) return {
121
139
  key: "restricted-preset",
122
140
  label: RUNTIME_LABELS["restricted-preset"] ?? "受限 preset",
123
141
  status: "warn",
124
- detail: "受限 preset 尚未注册(首次显式子代理运行时创建)。",
125
- remedy: "运行一次审阅/维护,或在挂载后运行 /evolution doctor。"
142
+ detail: "受限的只读模式尚未初始化(首次使用审阅或维护时自动创建)。",
143
+ remedy: "运行一次审阅或维护,或稍后重新检查。"
126
144
  };
127
145
  return {
128
146
  key: "restricted-preset",
@@ -193,13 +211,13 @@ function runtimeOf(inputs) {
193
211
  key: "session-fold",
194
212
  label: RUNTIME_LABELS["session-fold"] ?? "会话事件 fold 单入口",
195
213
  status: "ok",
196
- detail: "classifySessionEvent/isIgnorableEvent 存在:model 消费,plugin-record/unknown 忽略。"
214
+ detail: "事件读取通道正常:对话内容会被读取,其余记录忽略。"
197
215
  } : {
198
216
  key: "session-fold",
199
217
  label: RUNTIME_LABELS["session-fold"] ?? "会话事件 fold 单入口",
200
218
  status: "fail",
201
- detail: "分类器缺失,无法证明单一 fold 入口。",
202
- remedy: "升级家族(classifySessionEvent 是 core 根导出)。"
219
+ detail: "事件读取组件缺失,无法确认读取通道正常。",
220
+ remedy: "重新安装完整功能包(evolution-all)。"
203
221
  },
204
222
  missing.length === 0 ? {
205
223
  key: "platform-services",
@@ -230,12 +248,12 @@ function runtimeOf(inputs) {
230
248
  key: "install-form-detected",
231
249
  label: RUNTIME_LABELS["install-form-detected"] ?? "实际安装形态",
232
250
  status: "ok",
233
- detail: inputs.form.id + "(声明)"
251
+ detail: FORM_WORDS[inputs.form.id] + "(已声明)"
234
252
  } : {
235
253
  key: "install-form-detected",
236
254
  label: RUNTIME_LABELS["install-form-detected"] ?? "实际安装形态",
237
255
  status: "warn",
238
- detail: inputs.form.id + "(推断:" + inputs.form.evidence.join("、") + ")",
256
+ detail: FORM_WORDS[inputs.form.id] + "(按已安装内容推断:" + inputs.form.evidence.join("、") + ")",
239
257
  remedy: "在 profile 里显式声明安装行,核对 INSTALL 的形态表。"
240
258
  }
241
259
  ].sort((a, b) => a.key.localeCompare(b.key));
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.27.1",
4
+ "version": "0.27.3",
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.5",
30
- "@lmzhen/dsh-evolution-approval": "^0.27.1",
31
- "@lmzhen/dsh-evolution-core": "^0.27.1",
32
- "@lmzhen/dsh-evolution-maintenance": "^0.27.1"
30
+ "@lmzhen/dsh-evolution-approval": "^0.27.3",
31
+ "@lmzhen/dsh-evolution-core": "^0.27.3",
32
+ "@lmzhen/dsh-evolution-maintenance": "^0.27.3"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@lmzhen/dsh-evolution-agent-preset": "^0.27.1"
35
+ "@lmzhen/dsh-evolution-agent-preset": "^0.27.3"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@deepseek-ai/cordis": "^4.0.5",