@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.
- package/lib/index.js +40 -22
- 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": "
|
|
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": "
|
|
61
|
-
"host-surface": "
|
|
62
|
-
"session-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 + "
|
|
88
|
+
"platform-line": inputs.platformLine.version + "(最低兼容 " + inputs.platformLine.floor + ")",
|
|
71
89
|
"family-version": inputs.familyVersion,
|
|
72
|
-
"install-form": inputs.form.id + "(" + inputs.form.confidence
|
|
73
|
-
"preset-ids": REVIEWER_PRESET_ID + " / " + MAINTAINER_PRESET_ID + "
|
|
74
|
-
"readonly-contract":
|
|
75
|
-
"upgrade-order": "
|
|
76
|
-
"fallback-map": Object.keys(COMMAND_FALLBACKS).
|
|
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: "
|
|
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: "
|
|
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: "
|
|
125
|
-
remedy: "
|
|
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: "
|
|
214
|
+
detail: "事件读取通道正常:对话内容会被读取,其余记录忽略。"
|
|
197
215
|
} : {
|
|
198
216
|
key: "session-fold",
|
|
199
217
|
label: RUNTIME_LABELS["session-fold"] ?? "会话事件 fold 单入口",
|
|
200
218
|
status: "fail",
|
|
201
|
-
detail: "
|
|
202
|
-
remedy: "
|
|
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 + "
|
|
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.
|
|
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.
|
|
31
|
-
"@lmzhen/dsh-evolution-core": "^0.27.
|
|
32
|
-
"@lmzhen/dsh-evolution-maintenance": "^0.27.
|
|
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.
|
|
35
|
+
"@lmzhen/dsh-evolution-agent-preset": "^0.27.3"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": "^4.0.5",
|