@lynn123411/dsh-kimi-cu 0.2.0 → 0.3.0

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.
@@ -0,0 +1,317 @@
1
+ /**
2
+ * 更新链路自检:清单解析、版本比较、阶段映射、失败分类,以及更新器的行为。
3
+ *
4
+ * 纯函数部分用固定输入验;更新器用替身验「已是最新不执行」「清单读不到时 macOS 照跑、
5
+ * Windows 报错」「单飞锁」「超时不 kill」「版本变了才重连」。
6
+ *
7
+ * 跑法:node scripts/test-update.mjs
8
+ */
9
+ import assert from 'node:assert/strict';
10
+ import { dirname, join, resolve } from 'node:path';
11
+ import { fileURLToPath } from 'node:url';
12
+
13
+ import {
14
+ classifyFailure,
15
+ compareVersions,
16
+ createUpdater,
17
+ manifestUrl,
18
+ parseManifest,
19
+ parseStage,
20
+ } from '../src/server/update.ts';
21
+
22
+ const root = resolve(process.argv[2] ?? join(dirname(fileURLToPath(import.meta.url)), '..'));
23
+
24
+ let passed = 0;
25
+ let total = 0;
26
+ async function test(label, fn) {
27
+ total += 1;
28
+ try {
29
+ await fn();
30
+ passed += 1;
31
+ console.log(' ok ' + label);
32
+ } catch (error) {
33
+ console.error(' FAIL ' + label + ': ' + error.message);
34
+ throw error;
35
+ }
36
+ }
37
+
38
+ const MACOS_MANIFEST = JSON.stringify({
39
+ version: '0.7.6',
40
+ app: { url: 'https://cdn.example/KimiCU.app.zip', sha256: 'abc', team_id: '2J9472RW75' },
41
+ });
42
+ const WINDOWS_MANIFEST = JSON.stringify({
43
+ version: '0.3.14',
44
+ runtime: { url: 'https://cdn.example/runtime.zip', sha256: 'def' },
45
+ });
46
+
47
+ await test('parseManifest 取 version 字段', () => {
48
+ assert.equal(parseManifest(MACOS_MANIFEST), '0.7.6');
49
+ assert.equal(parseManifest(WINDOWS_MANIFEST), '0.3.14');
50
+ });
51
+
52
+ await test('parseManifest 对缺字段与坏 JSON 返回 null', () => {
53
+ assert.equal(parseManifest('{"app":{}}'), null);
54
+ assert.equal(parseManifest('{"version":""}'), null);
55
+ assert.equal(parseManifest('not json'), null);
56
+ });
57
+
58
+ await test('compareVersions 按数字段比较,不按字符串', () => {
59
+ assert.equal(compareVersions('0.7.10', '0.7.9'), 1);
60
+ assert.equal(compareVersions('0.7.9', '0.7.10'), -1);
61
+ assert.equal(compareVersions('0.8.0', '0.7.5'), 1);
62
+ assert.equal(compareVersions('0.7.5', '0.7.5'), 0);
63
+ assert.equal(compareVersions('1.0', '1.0.0'), 0);
64
+ });
65
+
66
+ await test('compareVersions 对非数字版本返回 null', () => {
67
+ assert.equal(compareVersions('v0.7.5', '0.7.5'), null);
68
+ assert.equal(compareVersions('0.7.5-beta', '0.7.5'), null);
69
+ assert.equal(compareVersions('', '0.7.5'), null);
70
+ });
71
+
72
+ await test('manifestUrl 两个平台各一份清单,其余平台没有', () => {
73
+ assert.match(manifestUrl('darwin'), /kimi-computer-use\/latest\/version\.json$/);
74
+ assert.match(manifestUrl('win32'), /kimi-computer-use-windows\/latest\/version\.json$/);
75
+ assert.equal(manifestUrl('other'), null);
76
+ });
77
+
78
+ await test('parseStage 把 ==> 行映射成阶段,认不出的行不报错', () => {
79
+ assert.equal(parseStage('==> 校验代码签名与 Apple 公证 …'), 'verifying');
80
+ assert.equal(parseStage('==> 当前版本 0.7.5,线上最新 0.7.6'), 'checking');
81
+ assert.equal(parseStage('==> 下载 KimiCU.app.zip'), 'downloading');
82
+ assert.equal(parseStage('==> 替换 /Applications/KimiCU.app'), 'installing');
83
+ assert.equal(parseStage('✓ 签名 + 公证校验通过。'), 'installing');
84
+ assert.equal(parseStage(''), null);
85
+ });
86
+
87
+ await test('classifyFailure 把已知失败分到五类', () => {
88
+ assert.equal(classifyFailure('', true), 'timeout');
89
+ assert.equal(classifyFailure('✗ 另一个升级正在收尾,请稍后重试;当前没有并发替换 App。', false), 'busy');
90
+ assert.equal(classifyFailure('✗ 下载包 SHA-256 与版本清单不一致,已中止。', false), 'verify');
91
+ assert.equal(
92
+ classifyFailure('Staging failed; the existing service was not stopped. Run the installer from Terminal with administrator authorization.', false),
93
+ 'permission',
94
+ );
95
+ assert.equal(classifyFailure('✗ 下载失败,请检查网络后重试。', false), 'network');
96
+ assert.equal(classifyFailure('something else entirely', false), 'unknown');
97
+ });
98
+
99
+ /** 造一个更新器替身环境:记录每次读清单与每次 upgrade 的入参。 */
100
+ function harness(overrides = {}) {
101
+ const calls = { fetch: [], upgrade: [], reconnect: 0 };
102
+ const base = {
103
+ platform: 'darwin',
104
+ current: async () => ({ path: '/Applications/KimiCU.app/Contents/MacOS/kimi-cu', version: '0.7.5' }),
105
+ fetchManifest: async () => MACOS_MANIFEST,
106
+ runUpgrade: async (input) => {
107
+ input.onLine('==> 当前版本 0.7.5,线上最新 0.7.6');
108
+ input.onLine('==> 校验代码签名与 Apple 公证 …');
109
+ return { code: 0, raw: '✓ 升级完成', timedOut: false, whenExited: Promise.resolve() };
110
+ },
111
+ reconnect: async () => { calls.reconnect += 1; return true; },
112
+ now: () => 1,
113
+ };
114
+ const merged = { ...base, ...overrides };
115
+ const deps = {
116
+ ...merged,
117
+ fetchManifest: async (url) => {
118
+ calls.fetch.push(url);
119
+ return merged.fetchManifest(url);
120
+ },
121
+ runUpgrade: async (input) => {
122
+ calls.upgrade.push({ platform: input.platform, binaryPath: input.binaryPath, version: input.version });
123
+ return merged.runUpgrade(input);
124
+ },
125
+ };
126
+ return { updater: createUpdater(deps), calls };
127
+ }
128
+
129
+ /** 收集一次 run 的全部事件。 */
130
+ async function collect(updater) {
131
+ const events = [];
132
+ await updater.run((event) => events.push(event));
133
+ return events;
134
+ }
135
+
136
+ await test('check:清单版本更高时 hasUpdate 为 true', async () => {
137
+ const { updater } = harness();
138
+ const check = await updater.check();
139
+ assert.equal(check.current, '0.7.5');
140
+ assert.equal(check.latest, '0.7.6');
141
+ assert.equal(check.hasUpdate, true);
142
+ assert.equal(check.error, null);
143
+ });
144
+
145
+ await test('check:清单与本地同版本时 hasUpdate 为 false', async () => {
146
+ const { updater } = harness({ fetchManifest: async () => JSON.stringify({ version: '0.7.5' }) });
147
+ const check = await updater.check();
148
+ assert.equal(check.hasUpdate, false);
149
+ });
150
+
151
+ await test('check:清单读不到时记下错误,不抛', async () => {
152
+ const { updater } = harness({ fetchManifest: async () => { throw new Error('offline'); } });
153
+ const check = await updater.check();
154
+ assert.equal(check.latest, null);
155
+ assert.equal(check.hasUpdate, false);
156
+ assert.equal(check.error, 'offline');
157
+ });
158
+
159
+ await test('check:Windows 读的是 Windows 那份清单', async () => {
160
+ const { updater, calls } = harness({
161
+ platform: 'win32',
162
+ current: async () => ({ path: 'C:\\KimiCU\\kimi-cu.exe', version: '0.3.13' }),
163
+ fetchManifest: async () => WINDOWS_MANIFEST,
164
+ });
165
+ await updater.check();
166
+ assert.match(calls.fetch[0], /kimi-computer-use-windows/);
167
+ });
168
+
169
+ await test('run:已是最新时不执行 upgrade', async () => {
170
+ const { updater, calls } = harness({ fetchManifest: async () => JSON.stringify({ version: '0.7.5' }) });
171
+ const events = await collect(updater);
172
+ assert.deepEqual(events.map((event) => event.type), ['stage', 'done']);
173
+ assert.equal(events[1].upToDate, true);
174
+ assert.equal(calls.upgrade.length, 0);
175
+ });
176
+
177
+ await test('run:有新版时先报阶段再执行,版本变了才重连', async () => {
178
+ let version = '0.7.5';
179
+ const { updater, calls } = harness({
180
+ current: async () => ({ path: '/Applications/KimiCU.app/Contents/MacOS/kimi-cu', version }),
181
+ runUpgrade: async (input) => {
182
+ calls.upgrade.push({ version: input.version });
183
+ input.onLine('==> 校验代码签名与 Apple 公证 …');
184
+ version = '0.7.6';
185
+ return { code: 0, raw: '✓ 升级完成', timedOut: false, whenExited: Promise.resolve() };
186
+ },
187
+ });
188
+ const events = await collect(updater);
189
+ const stages = events.filter((event) => event.type === 'stage').map((event) => event.stage);
190
+ assert.deepEqual(stages, ['checking', 'downloading', 'verifying', 'restarting']);
191
+ const done = events.at(-1);
192
+ assert.equal(done.type, 'done');
193
+ assert.equal(done.version, '0.7.6');
194
+ assert.equal(done.reconnect, 'done');
195
+ assert.equal(calls.reconnect, 1);
196
+ assert.equal(calls.upgrade[0].version, null, 'macOS 不带版本号,让 KimiCU 自己判断');
197
+ });
198
+
199
+ await test('run:版本没变就不重连', async () => {
200
+ const { updater, calls } = harness({
201
+ runUpgrade: async () => ({ code: 0, raw: '✓ 升级完成', timedOut: false, whenExited: Promise.resolve() }),
202
+ });
203
+ await collect(updater);
204
+ assert.equal(calls.reconnect, 0);
205
+ });
206
+
207
+ await test('run:清单读不到时 macOS 照跑 upgrade', async () => {
208
+ const { updater, calls } = harness({ fetchManifest: async () => { throw new Error('offline'); } });
209
+ const events = await collect(updater);
210
+ assert.equal(calls.upgrade.length, 1);
211
+ assert.equal(events.at(-1).type, 'done');
212
+ });
213
+
214
+ await test('run:清单读不到时 Windows 报网络错误,不执行', async () => {
215
+ const { updater, calls } = harness({
216
+ platform: 'win32',
217
+ current: async () => ({ path: 'C:\\KimiCU\\kimi-cu.exe', version: '0.3.13' }),
218
+ fetchManifest: async () => { throw new Error('offline'); },
219
+ });
220
+ const events = await collect(updater);
221
+ assert.equal(calls.upgrade.length, 0);
222
+ assert.deepEqual(events.at(-1), { type: 'error', kind: 'network', raw: 'offline' });
223
+ });
224
+
225
+ await test('run:Windows 带清单版本号执行 upgrade', async () => {
226
+ const { updater, calls } = harness({
227
+ platform: 'win32',
228
+ current: async () => ({ path: 'C:\\KimiCU\\kimi-cu.exe', version: '0.3.13' }),
229
+ fetchManifest: async () => WINDOWS_MANIFEST,
230
+ });
231
+ await collect(updater);
232
+ assert.equal(calls.upgrade[0].version, '0.3.14');
233
+ });
234
+
235
+ await test('run:并发调用被单飞锁挡住', async () => {
236
+ let release;
237
+ const gate = new Promise((done) => { release = done; });
238
+ const { updater } = harness({
239
+ runUpgrade: async () => { await gate; return { code: 0, raw: '', timedOut: false, whenExited: Promise.resolve() }; },
240
+ });
241
+ const first = collect(updater);
242
+ const second = await collect(updater);
243
+ assert.deepEqual(second, [{ type: 'error', kind: 'busy', raw: '' }]);
244
+ release();
245
+ await first;
246
+ const third = await collect(updater);
247
+ assert.equal(third.at(-1).type, 'done', '锁要在结束后释放');
248
+ });
249
+
250
+ await test('run:超时归类为 timeout', async () => {
251
+ const { updater } = harness({
252
+ runUpgrade: async () => ({ code: null, raw: '部分输出', timedOut: true, whenExited: Promise.resolve() }),
253
+ });
254
+ const events = await collect(updater);
255
+ assert.deepEqual(events.at(-1), { type: 'error', kind: 'timeout', raw: '部分输出' });
256
+ });
257
+
258
+ await test('run:非零退出码按输出分类', async () => {
259
+ const { updater } = harness({
260
+ runUpgrade: async () => ({ code: 1, raw: '✗ 下载包 SHA-256 与版本清单不一致,已中止。', timedOut: false, whenExited: Promise.resolve() }),
261
+ });
262
+ const events = await collect(updater);
263
+ assert.equal(events.at(-1).kind, 'verify');
264
+ });
265
+
266
+ await test('classifyFailure 跳过进度行,只看错误行', () => {
267
+ assert.equal(
268
+ classifyFailure(
269
+ '==> 校验代码签名与 Apple 公证 …\nStaging failed; the existing service was not stopped. Run the installer from Terminal with administrator authorization.',
270
+ false,
271
+ ),
272
+ 'permission',
273
+ );
274
+ });
275
+
276
+ await test('run:超时后锁留到子进程真的退出', async () => {
277
+ let exit;
278
+ const whenExited = new Promise((done) => { exit = done; });
279
+ let first = true;
280
+ const { updater } = harness({
281
+ runUpgrade: async () => {
282
+ if (!first) return { code: 0, raw: '', timedOut: false, whenExited: Promise.resolve() };
283
+ first = false;
284
+ return { code: null, raw: '部分输出', timedOut: true, whenExited };
285
+ },
286
+ });
287
+ const events = await collect(updater);
288
+ assert.equal(events.at(-1).kind, 'timeout');
289
+ const second = await collect(updater);
290
+ assert.deepEqual(second, [{ type: 'error', kind: 'busy', raw: '' }], '超时后进程还在跑,锁不能放');
291
+ exit();
292
+ await new Promise((done) => setTimeout(done, 0));
293
+ const third = await collect(updater);
294
+ assert.equal(third.at(-1).type, 'done', '进程退出后锁要放');
295
+ });
296
+
297
+ await test('run:升级后版本读不出来不算确认变化,不重连', async () => {
298
+ let reads = 0;
299
+ const { updater, calls } = harness({
300
+ current: async () => {
301
+ reads += 1;
302
+ return reads === 1
303
+ ? { path: '/Applications/KimiCU.app/Contents/MacOS/kimi-cu', version: '0.7.5' }
304
+ : { path: '/Applications/KimiCU.app/Contents/MacOS/kimi-cu', version: null };
305
+ },
306
+ });
307
+ const events = await collect(updater);
308
+ assert.equal(calls.reconnect, 0);
309
+ assert.equal(events.at(-1).reconnect, 'skipped');
310
+ });
311
+
312
+ await test('路由常量与包内约定一致', async () => {
313
+ const shared = await import('../src/shared/update.ts');
314
+ assert.equal(shared.UPDATE_ROUTE_PATH, '/api/dsh-kimi-cu/update');
315
+ });
316
+
317
+ console.log('\ntest-update: ' + passed + '/' + total + ' 条断言通过(root=' + root + ')');
@@ -32,7 +32,7 @@ DSH 把这些工具注册为 `mcp__kimi-cu__<name>`(例如 `mcp__kimi-cu__list
32
32
  - `click` / `scroll` / `drag` / 定向 `type_text` 的 x/y 是所用截图的像素坐标,不是屏幕坐标。不要自行换算缩放比例。`mode:"ax"` 的 bbox 是窗口内点坐标,不能直接当作截图像素点击;用 index 或重新取图。
33
33
  - 多窗口及浮层从 `screenshots[]` 选正确图片,传其 `window_id`;支持 `screenshot_id` 的动作同时传图片标识(主图为响应的 `screenshot_id`,数组项为 `id`)。浮窗必须用浮窗自己的图和窗口,不能省略窗口让路由猜测,也不能借用主图坐标。
34
34
  - `rect:{x,y,width,height}` 使用窗口内点坐标,并把该窗口的当前截图锚点切到局部区域。区域图内的操作直接使用区域图像素;改回全窗坐标前重新取全窗图。歧义、过期或越界报错时重新观察,不强行换算重试。
35
- - 正常观察使用 MCP(包括其 JS facade);不要用 shell 的 `kimi-cu shot` / `app-state` / `windows` 代替。开发调试 CLI 不刷新 MCP 快照缓存。
35
+ - 正常观察使用 MCP;不要用 shell 的 `kimi-cu shot` / `app-state` / `windows` 代替。开发调试 CLI 不刷新 MCP 快照缓存。
36
36
 
37
37
  ## 输入与编辑
38
38
 
@@ -49,25 +49,11 @@ DSH 把这些工具注册为 `mcp__kimi-cu__<name>`(例如 `mcp__kimi-cu__list
49
49
  - `effect:"unverifiable"` + `verified:false` 表示投递完成但效果未验证(遮挡窗口或 CEF 原生 chrome 目标;点击已不做像素校验);不能当作任务已完成,要重新观察核对是否达到预期。
50
50
  - 动作未生效时先重新观察目标和状态,再选择界面提供的等价操作。不要连续盲重试,也不要为了绕过失败改做会产生不同结果的动作。
51
51
  - 全遮挡且已节流的 Chromium/CEF 窗口会静默吞掉或分钟级延迟窗口路由事件:自动通道点击无效时,可用 `click(channel:"public")`——整段序列(hover/primer/down/up)以带窗口号的 NSEvent 工厂事件经 postToPid 投递,导航、聚焦、按钮全有效。被吞事件可能分钟级后才执行,不要因此盲目重发同一点位;先重新观察再按次决定。
52
- - 目标稳定、后续步骤能用代码判断的循环或批量操作适合 KimiCU 自带 `js`;不按步数强制合并。下一步需要模型读新截图时,先返回观察结果,再写下一段代码。同一窗口的多条笔画可用 `drag_paths`。具体用法见下文。
52
+ - 目标稳定、后续步骤能用代码判断的批量操作逐个 `await`;DSH 注册的 KimiCU MCP 只有 18 个直接工具,没有 `js` / `js_reset`。下一步需要模型读新截图时,先返回观察结果再决定下一步。同一窗口的多条笔画用 `drag_paths`,见下文。
53
53
 
54
- ## JS 与批量操作
54
+ ## 批量操作
55
55
 
56
- ### KimiCU 自带 REPL
57
-
58
- 先确认工具列表包含 **KimiCU MCP 提供的** `js` / `js_reset`。这是随 KimiCU 打包的运行时,不能把同名的其他插件 JS 工具或系统 Node 当作此入口。未提供 JS 时使用普通 MCP 工具;不为简单操作临时搭建运行时。
59
-
60
- ```js
61
- var { kimiCU } = await import("@kimi/cu");
62
- nodeRepl.write(await kimiCU.list_apps({ running_only: true }));
63
- ```
64
-
65
- - 顶层变量和函数跨 cell 持久;输出文本/对象需 `nodeRepl.write(value)`,裸表达式不显示。观察产生的图片会作为 image content 返回。
66
- - 方法对应普通工具,但 facade 有独立参数校验和别名;不要假定所有参数完全相同。例如 JS `press_key` 用 `key`,普通工具用 `keys`;窗口可写成 `window:{app,id,title}`,index 可用 `element_index`。未知参数应检查当前接口和版本,不静默删掉有语义的参数继续操作。
67
- - JS 调用失败会抛带 `code` 的异常。用 `try/catch` 输出错误并停止依赖该结果的后续动作;抛异常不代表此前动作已回滚。成功返回也仍须按前文验证实际效果。
68
- - 同一 cell 对同一应用窗口连续读取非空 AX 树时可读 `tree_diff` / `state_diff`;检查 `mode` 和基准信息。首次观察、新窗口、禁用 diff 或纯图片观察不能假定有增量补丁。
69
- - 批量只合并目标已知且稳定的动作,逐个 `await`。新菜单、页面或截图需要模型辨认时,在该观察后结束 cell,不能预写未观察界面的坐标/index。
70
- - `js_reset` 会清空 REPL 变量并重建内核,不会清理 app 草稿、撤销动作或恢复窗口。仅在运行时异常、明确提示或升级后使用。
56
+ DSH 注册的是 KimiCU MCP 的 18 个直接工具:`list_apps`、`launch_app`、`list_windows`、`get_window`、`activate_window`、`get_app_state`、`get_window_state`、`click`、`type_text`、`paste`、`press_key`、`scroll`、`set_value`、`perform_secondary_action`、`select_text`、`drag`、`drag_paths`、`debug_tap`。没有 CodeAct 的 `js` / `js_reset`,也没有浏览器标签页工具;需要批量就逐个 `await`,不要临时搭一个运行时。
71
57
 
72
58
  ### drag_paths
73
59
 
@@ -77,7 +63,7 @@ nodeRepl.write(await kimiCU.list_apps({ running_only: true }));
77
63
  - 必须显式传 `window_id`,并使用该窗口最近一次图像观察的像素坐标。当前服务的该路径不消费 `screenshot_id`,不能靠它单独选窗或恢复旧截图锚点。批内不切换窗口/坐标系。
78
64
  - 传 `abort_if_cursor_in_window:true` 保持用户操作守卫。用户在窗口内移动真实鼠标或按住鼠标时会拒投或中途停止;光标静止在窗口内本身不触发。触发后等待用户停止相关操作,重新观察再继续,不关闭守卫硬投。
79
65
  - 批量不是事务,已投笔画不回滚。普通工具返回 `results`、`delivered`、`total`,中断时可能带 `cursor_in_window:true`。结合界面核对后,仅处理未完成路径;中途止投可从第一个 false 位置续作,其他失败须逐项检查,不能整批重放。
80
- - 当前 JS 异常只保留错误码和文字,未必包含失败响应的 `results`。无法确定哪些笔画已完成时,先核对画面和错误信息;不能猜测断点或重新提交整个批次。需要程序化读取失败明细时使用普通 `drag_paths` 工具。
66
+ - 无法确定哪些笔画已完成时,先核对画面和错误信息;不能猜测断点或重新提交整个批次。
81
67
 
82
68
  ## 排障与升级
83
69
 
@@ -85,6 +71,7 @@ nodeRepl.write(await kimiCU.list_apps({ running_only: true }));
85
71
 
86
72
  - 歧义窗口、坐标越界或旧 index:按前文重新绑定窗口和观察,不重装或抢前台。
87
73
  - 缺图/黑图:先看 `screenshot_diagnosis`,区分最小化、窗口关闭、其他 Space、锁屏、未渲染和权限问题。需要用户恢复窗口或切回所在桌面时明确说明,不自行切 Space。
74
+ - 窗口在另一个 Space 或另一块屏幕上时,AX 树照常可读、动作照常可投递,但截图取不到(`screenshot_diagnosis` 报 `not on-screen` 或 `no shareable content`)。这时用 AX 文本验证结果,不要据此判断权限丢失或动作失败;`activate_window` 的 `foreground_changed:true` 也不证明窗口已经来到当前 Space。
88
75
  - 空 AX 树也可能是自绘或远程渲染控件;有可用截图时可按图操作,不直接认定权限丢失。
89
76
  - `unknown field` / `KIMI_CU_UNKNOWN_FIELD`:先核对当前入口的 schema;刚升级时优先排查旧 MCP 桥和 JS 内核,不能据此直接断言新功能不存在。
90
77
  - 怀疑某个进程收不到事件时,用 `debug_tap` 在服务侧记录它的投递事件;它不改变界面,也不是常规操作入口。排查完如实报告结论,不要靠反复投递试探。
@@ -110,8 +97,8 @@ ls /Applications/KimiCU.app/Contents/MacOS/kimi-cu
110
97
 
111
98
  ### 升级后的连接
112
99
 
113
- 收到新版本提示时转告用户,已有升级授权时可运行 `kimi-cu upgrade`。不要仅因有新版就中断任务或自行升级。
100
+ 收到新版本提示时转告用户:插件页的 KimiCU 卡片上有更新按钮,也可以运行 `kimi-cu upgrade`。不要仅因有新版就中断任务或自行升级。
114
101
 
115
- 服务升级不会自动替换长寿的 MCP 桥和 NodeRepl 内核。升级后在客户端重连 KimiCU MCP(支持 `/mcp` 的客户端可用该入口);JS 用户还需 `js_reset`,然后重新 import 和观察。reset 不代替 MCP 重连,也不会清掉应用内容。
102
+ 服务升级不会自动替换长寿的 MCP 桥。插件页的更新按钮在升级成功后会自动重连 MCP;手动升级后在客户端重连 KimiCU MCP(支持 `/mcp` 的客户端可用该入口)即可。
116
103
 
117
104
  CLI 只用于排障/安装维护;日常取图、取坐标和操作仍用 MCP。