zcode-app-cli 3.14.5-34 → 3.15.3-35

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 (75) hide show
  1. package/README.md +13 -2
  2. package/bin/zcode.js +4 -0
  3. package/docs/CONFIGURATION.md +36 -5
  4. package/docs/CONFIGURATION.zh-CN.md +29 -3
  5. package/docs/PROVIDER_CONFIG.md +25 -0
  6. package/docs/PROVIDER_CONFIG.zh-CN.md +20 -0
  7. package/package.json +4 -2
  8. package/vendor/cli-config.cjs +88 -0
  9. package/vendor/extraction.json +24 -6
  10. package/vendor/node_modules/@zcode/tui/dist/index.js +457 -85
  11. package/vendor/packages/browser-use-plugin/README.md +1 -1
  12. package/vendor/packages/browser-use-plugin/docs/api.json +1 -1
  13. package/vendor/packages/browser-use-plugin/docs/overview.md +6 -6
  14. package/vendor/packages/browser-use-plugin/docs/playwright.md +3 -3
  15. package/vendor/packages/browser-use-plugin/docs/workflow.md +2 -2
  16. package/vendor/packages/browser-use-plugin/scripts/browser-client.mjs +5 -7
  17. package/vendor/packages/browser-use-plugin/scripts/build.mjs +0 -1
  18. package/vendor/packages/browser-use-plugin/skills/control-browser/SKILL.md +9 -9
  19. package/vendor/packages/bundled-skills/skills/dynamic-workflows/SKILL.md +760 -687
  20. package/vendor/packages/bundled-skills/skills/dynamic-workflows/examples.md +310 -1
  21. package/vendor/packages/bundled-skills/skills/dynamic-workflows/patterns.md +336 -4
  22. package/vendor/packages/documents-plugin/.zcode-plugin/plugin.json +2 -2
  23. package/vendor/packages/documents-plugin/package.json +2 -2
  24. package/vendor/packages/documents-plugin/skills/docx/LICENSE.txt +10 -10
  25. package/vendor/packages/node-repl-host/.zcode-plugin/plugin.json +1 -1
  26. package/vendor/packages/node-repl-host/dist/mcp/server.js +116 -48
  27. package/vendor/packages/node-repl-host/package.json +1 -1
  28. package/vendor/packages/node-repl-host/scripts/build.mjs +4 -4
  29. package/vendor/packages/pdf-plugin/.zcode-plugin/plugin.json +2 -2
  30. package/vendor/packages/pdf-plugin/package.json +2 -2
  31. package/vendor/packages/pdf-plugin/skills/pdf/LICENSE.txt +10 -10
  32. package/vendor/packages/pdf-plugin/skills/pdf/references/resume-altacv.tex +1 -1
  33. package/vendor/packages/plugin-creator-plugin/skills/plugin-creator/SKILL.md +1 -1
  34. package/vendor/packages/plugin-creator-plugin/skills/plugin-creator/references/plugin-json-spec.md +1 -1
  35. package/vendor/packages/presentations-plugin/.zcode-plugin/plugin.json +2 -2
  36. package/vendor/packages/presentations-plugin/package.json +2 -2
  37. package/vendor/packages/presentations-plugin/skills/pptx/LICENSE.txt +10 -10
  38. package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/SKILL.md +1 -1
  39. package/vendor/packages/spreadsheets-plugin/.zcode-plugin/plugin.json +2 -2
  40. package/vendor/packages/spreadsheets-plugin/package.json +2 -2
  41. package/vendor/packages/spreadsheets-plugin/skills/xlsx/LICENSE.txt +10 -10
  42. package/vendor/packages/visualize-plugin/.zcode-plugin/plugin.json +10 -0
  43. package/vendor/packages/visualize-plugin/package.json +8 -0
  44. package/vendor/packages/visualize-plugin/skills/visualize/LICENSE.md +5 -0
  45. package/vendor/packages/visualize-plugin/skills/visualize/SKILL.md +277 -0
  46. package/vendor/packages/visualize-plugin/skills/visualize/assets/calendar.js +273 -0
  47. package/vendor/packages/visualize-plugin/skills/visualize/assets/runtime-manifest.json +16 -0
  48. package/vendor/packages/visualize-plugin/skills/visualize/assets/standalone-host-bridge.js +256 -0
  49. package/vendor/packages/visualize-plugin/skills/visualize/assets/standalone-shell.js +183 -0
  50. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/d3-7.9.0.min.js +2 -0
  51. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/d3-7.9.0.min.js.LICENSE +13 -0
  52. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/floating-ui-core-1.7.3.min.js +1 -0
  53. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/floating-ui-core-1.7.3.min.js.LICENSE +20 -0
  54. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/floating-ui-dom-1.7.4.min.js +1 -0
  55. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/floating-ui-dom-1.7.4.min.js.LICENSE +20 -0
  56. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/lucide-1.17.0.js +19521 -0
  57. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/lucide-1.17.0.js.LICENSE +43 -0
  58. package/vendor/packages/visualize-plugin/skills/visualize/assets/vendor/manifest.json +57 -0
  59. package/vendor/packages/visualize-plugin/skills/visualize/assets/visualize.css +1222 -0
  60. package/vendor/packages/visualize-plugin/skills/visualize/assets/visualize.html +517 -0
  61. package/vendor/packages/visualize-plugin/skills/visualize/examples/calendar.html +10 -0
  62. package/vendor/packages/visualize-plugin/skills/visualize/references/api.md +128 -0
  63. package/vendor/packages/visualize-plugin/skills/visualize/references/styles.md +3 -0
  64. package/vendor/packages/visualize-plugin/skills/visualize/scripts/render.py +248 -0
  65. package/vendor/packages/visualize-plugin/skills/visualize/scripts/vendor.py +56 -0
  66. package/vendor/packages/visualize-plugin/skills/visualize/tweak.md +62 -0
  67. package/vendor/packages/visualize-plugin/skills/visualize/widgets/calendar.md +90 -0
  68. package/vendor/packages/zcode-cua-plugin/.zcode-plugin/plugin.json +1 -1
  69. package/vendor/packages/zcode-cua-plugin/docs/computer-use.md +1 -1
  70. package/vendor/packages/zcode-cua-plugin/package.json +1 -1
  71. package/vendor/packages/zcode-cua-plugin/scripts/computer-use-client.mjs +35 -41
  72. package/vendor/packages/zcode-guide-plugin/skills/zcode-configuration-guide/SKILL.md +2 -2
  73. package/vendor/provider/zcode-builtin.json +96 -1
  74. package/vendor/zcode.cjs +1622 -1425
  75. package/zcode-runtime.lock.json +3 -3
@@ -1,22 +1,21 @@
1
1
  /**
2
- * Computer Use SDK —— 模型可见面与 Codex 的 `cua` 逐字同构(去掉 browser 半边)。
2
+ * Computer Use SDK —— 模型可见的 `cua` 对象面(只含 computer 部分,不含 browser)。
3
3
  *
4
4
  * 设计文档:zcode-cua/docs/refactor-port-specs/2026-09-10-cua-sdk-v3-api.md
5
- * 逆向基线:@oai/cua@0.2.4 的 tinysky_alt/types.d.ts 与 docs/tinysky-alt-core-node-repl.md
6
5
  *
7
6
  * 三条原则(文档 §1):
8
- * R1 同名同签 —— Codex 有的方法,名字、位置参数顺序、选项键名、返回类型逐字一致。
9
- * R2 Codex 没有的能力先问能不能删;留下的只能出现在可选选项键、尾部可选参数,
7
+ * R1 同名同签 —— 公开方法的名字、位置参数顺序、选项键名、返回类型保持冻结。
8
+ * R2 公开面之外的能力先问能不能删;留下的只能出现在可选选项键、尾部可选参数,
10
9
  * 或 `cua.computer` 逃逸口里。`Target` 上的附加成员数必须为 0。
11
10
  * R3 安全语义只藏不删 —— state_id 强校验、frame 精确栅格、possibly_sent 防重放、
12
11
  * controller lease、kill switch 全部保留,改为内部字段或类型化错误。
13
12
  *
14
- * 与 Codex 的两处不可对齐(文档 §5):
13
+ * 两处刻意的语义选择(文档 §5):
15
14
  * 1. node_repl 的 Worker 每次 `js` 调用都是全新的,`const app` 活不到下一个 cell。
16
15
  * stateId / frameId / diff 基线由 shared host 的 runtime session 持有,所以下一个
17
16
  * cell 里 `getApp` 是重新绑定而非重新观察。
18
- * 2. 动作失败抛 ComputerUseError 并带 actionSent —— Codex 的动作全是 Promise<void>,
19
- * 把「可能已下发」的信息扔了;ZCode 这条语义是事故驱动的,必须保留。
17
+ * 2. 动作失败抛 ComputerUseError 并带 actionSent —— 不能把动作做成单纯的 Promise<void>,
18
+ * 那样会丢掉「可能已下发」的信息;这条语义是事故驱动的,必须保留。
20
19
  *
21
20
  * 不融合 Browser Use:这里不存在 browsers / getBrowser / createBrowserTab / getTab;
22
21
  * `State` 没有 `browsers` 键;`Target` 只被 App 实现,不与 browser 的 Tab 共享类型。
@@ -52,7 +51,7 @@ const COMPUTER_METHOD_NAMES = Object.freeze([
52
51
  *
53
52
  * 2026-09-16:`open_application` 已在 producer 侧**整体删除**(不再只是 darwin 排除)——
54
53
  * 启动与激活并入 get_app_state 的透明拉起(见 zcode-cua/src/tools/manifest.ts 的说明),
55
- * 与 codex 一致(其 `targets/mac` 本来就没有启动/激活原语)。于是这张表暂时为空:
54
+ * 模型面不再有单独的启动/激活原语。于是这张表暂时为空:
56
55
  * 留着它是因为「按平台收缩」这个机制本身还需要,下一个平台专属工具直接往里加。
57
56
  */
58
57
  const PLATFORM_EXCLUDED_METHODS = Object.freeze({});
@@ -302,8 +301,8 @@ function assertOk(methodName, result) {
302
301
  /**
303
302
  * number → 元素索引,[x,y] → 当前栅格像素。
304
303
  *
305
- * 索引按**该 app 最新一次观察**解析(2026-09-12 对齐 codex:它的动作形如
306
- * `set_value({app, elementIndex, value})`,索引身份只有 app + index,wire 上没有任何
304
+ * 索引按**该 app 最新一次观察**解析(2026-09-12:动作形如
305
+ * `set_value({app, elementIndex, value})`,索引身份只有 app + index,wire 上不携带
307
306
  * 「这个索引属于哪次观察」的凭证)。所以这里只发 `{type:"element", index}`,
308
307
  * 由动作自带的 app_ref 说明作用域;坐标用当前 frameId,模型永远不需要碰 frame_id。
309
308
  *
@@ -350,10 +349,10 @@ function bindTarget(binding, target, what) {
350
349
  //
351
350
  // 代价(真机 2026-09-14):node_repl 每个 cell 都是新 Worker,binding 不跨 cell,于是
352
351
  // 每个要点坐标的 cell 都得先截一次图。模型照做前先撞一次这个错误、再补截图重来,
353
- // 白花一轮。codex 的 mac 面根本没有帧凭证概念:坐标就是"最近一张 app 窗口截图的像素",
352
+ // 白花一轮。模型面本来就不需要帧凭证概念:坐标就是"最近一张 app 窗口截图的像素",
354
353
  // 只要会话已激活就能直接点。
355
354
  //
356
- // 放宽之后安全性不变,且仍比 codex 严:帧过期 / 被替换 / 非可动作,以及 app_ref 与该帧
355
+ // 放宽之后安全性不变:帧过期 / 被替换 / 非可动作,以及 app_ref 与该帧
357
356
  // 真实 owner 不一致(`frame_dispatch_identity_mismatch`),都仍然 fail-closed;一次栅格
358
357
  // 都没有过时,broker 会给出「no actionable frame is available in this transport」。
359
358
  return binding.frameId
@@ -421,7 +420,7 @@ const MOUSE_BUTTONS = { left: "left", right: "right", middle: "middle", l: "left
421
420
  // ─────────────────────────────────────────────────────────── 展示
422
421
 
423
422
  /**
424
- * 观察方法自行展示结果(对齐 Codex)。
423
+ * 观察方法自行展示结果。
425
424
  *
426
425
  * v1 把这件事写成 SKILL 里的一条纪律(「每个动作 cell 末尾必须显式
427
426
  * nodeRepl.write(state.text)」),模型忘记就整段观察丢失。纪律本该由 SDK 承担。
@@ -579,7 +578,7 @@ function advisoryTextOf(result, treeText) {
579
578
  // ─────────────────────────────────────────────────────────── Target
580
579
 
581
580
  /**
582
- * App / Window 共享的交互面 —— Codex `Target` 的 12 个成员,逐字同签。
581
+ * App / Window 共享的交互面 —— `Target` 的 12 个公开成员,签名冻结。
583
582
  * 附加成员数为 0(zoom 已在评审中删除);ZCode 的附加能力只出现在选项袋里。
584
583
  */
585
584
  function createTarget(ctx, binding) {
@@ -602,8 +601,7 @@ function createTarget(ctx, binding) {
602
601
  // 都要重新 getApp,所以这不是"首次观察"的个例,而是**每个 cell 都发生**。
603
602
  //
604
603
  // 只截图的观察同样移动了 Helper 的基线却不给树文本,所以它把 treeSeen 清掉 ——
605
- // 这和 codex 文档那条 "After a screenshot-only observation, request a full tree before
606
- // relying on accessibility indexes again" 是同一条规则,只是这里强制执行而非靠模型记住。
604
+ // 规则是「只截图观察之后,再依赖无障碍索引前必须先拿整树」,这里由 SDK 强制执行而非靠模型记住。
607
605
  if (yieldsTree === true && binding.treeSeen !== true) args.disable_diffing = true;
608
606
  if (options?.disableDiffing === true) args.disable_diffing = true;
609
607
  // yieldsTree=false(getScreenshot)不给树文本 —— 上面 binding.treeSeen 的注释里本来就写着
@@ -625,20 +623,18 @@ function createTarget(ctx, binding) {
625
623
  assertOk(methodName, result);
626
624
  // 这里原先动作后无条件 `binding.stateId = undefined`,逼下一次索引解析先重新观察。
627
625
  //
628
- // 为什么去掉(2026-09-12,逆向 codex 后):
629
- // 1. 与我们自己的文档打架。参考文档原样抄了 codex 的动作目录块(标题「Perform one or
630
- // more actions, and then fetch the latest state」,里面就是 click(42) 紧跟 setValue(42)),
626
+ // 为什么去掉(2026-09-12):
627
+ // 1. 与我们自己的文档打架。当时参考文档的动作示例就是 click(42) 紧跟 setValue(42),
631
628
  // 而这条守卫让那种写法必然失败。真机上模型正是照文档写 click(9); setValue(9, ...),
632
629
  // 然后被拒,白烧两个 cell(一个重新观察、一个重做)。
633
- // 2. codex 没有任何等价物。它的模型面里 stateId/stale/generation 出现 0 次,
634
- // set_value({app, elementIndex, value}) 不带任何新鲜度凭证;失效判定在原生服务,
635
- // 而且是被动的 —— UIElementTreeInvalidationMonitor 先尝试按特征重取元素,
636
- // 只有重取歧义/失败才报 "The element ID is no longer valid"。
630
+ // 2. 模型面不需要新鲜度凭证:set_value({app, elementIndex, value}) 不带
631
+ // stateId/stale/generation 之类的字段;失效应由持有原生元素的一侧被动判定 ——
632
+ // 先尝试按特征重取元素,只有重取歧义/失败才报错。
637
633
  // 3. 这条守卫没有信息支撑:SDK 只知道"发生过动作",不知道 UI 是否变化、也不知道那个
638
634
  // 元素还在不在。真正知道的是 Helper —— 索引在观察时就已冻结成 native token,
639
635
  // 元素消失时它本来就 fail-closed。
640
636
  //
641
- // 所以保留冻结映射 + Helper 侧校验(与 codex 同档),不再在客户端提前否决。
637
+ // 所以保留冻结映射 + Helper 侧校验,不再在客户端提前否决。
642
638
  };
643
639
 
644
640
  return {
@@ -680,8 +676,8 @@ function createTarget(ctx, binding) {
680
676
  async getAXStateAndScreenshot(options) {
681
677
  const { state, result } = await observe(options, true, true);
682
678
  const screenshot = imageBytesOf(result);
683
- // 静默丢图是本轮最后一条同类缺陷(codex 这条路径同样静默:screenshot===null 时
684
- // 直接 return {state},一句话不给)。真机上模型正是从"没收到图"推断出「截图没有
679
+ // 静默丢图是本轮最后一条同类缺陷(过去 screenshot===null 时直接 return {state},
680
+ // 一句话不给)。真机上模型正是从"没收到图"推断出「截图没有
685
681
  // 回传(窗口在副显示器上,坐标为负)」,然后去抢用户焦点——它得到的信息量是零,
686
682
  // 所以只能猜。请求了像素却没拿到,必须说清为什么、以及重试有没有用。
687
683
  const note =
@@ -768,7 +764,7 @@ function createTarget(ctx, binding) {
768
764
 
769
765
  async selectText(elementIndex, text, options) {
770
766
  const bound = bindTarget(binding, elementIndex, "selectText");
771
- // Codex 的签名是按内容匹配。range 由 SDK 在**已观察到的元素 value** 上本地算出,
767
+ // 签名按内容匹配(传要选中的文本)。range 由 SDK 在**已观察到的元素 value** 上本地算出,
772
768
  // 不需要额外的 broker 往返:value 就在上一次 getAXState 的结构化结果里。
773
769
  const range = resolveTextRange(binding, elementIndex, text, options);
774
770
  await act("select_text", { target: bound, app_ref: binding.appRef, text_range: range });
@@ -854,7 +850,7 @@ function resolveTextRange(binding, elementIndex, text, options) {
854
850
  }
855
851
 
856
852
  /**
857
- * 键位别名规范化:接受 xdotool / X keysym 写法(Codex 全线用它,模型先验也在那边),
853
+ * 键位别名规范化:接受 xdotool / X keysym 写法(模型先验多是这种写法),
858
854
  * 输出 ZCode 的内部 token 集合。只做输入侧兼容,不改跨平台修饰键规则
859
855
  * (macOS cmd,Linux / Windows ctrl)。
860
856
  */
@@ -970,7 +966,7 @@ export async function setupComputerUseRuntime({ globals }) {
970
966
  let appRef = objectRef ?? appRefFor(target, windowId);
971
967
  const binding = createBinding(label, appRef);
972
968
  const app = createTarget(ctx, binding);
973
- // 绑定即观察(对齐 Codex):返回前展示该 app 的**全量** AX 树。
969
+ // 绑定即观察:返回前展示该 app 的**全量** AX 树。
974
970
  let result = await call("get_app_state", {
975
971
  app_ref: appRef,
976
972
  include_screenshot: false,
@@ -1044,11 +1040,10 @@ export async function setupComputerUseRuntime({ globals }) {
1044
1040
  // getApp 不展示状态(2026-09-13)。它仍然做一次观察 —— 身份解析、窗口校验与索引解析
1045
1041
  // 基线都要它 —— 但不再把那棵树写进输出。
1046
1042
  //
1047
- // 根因:Codex 的 `cua.getApp()` 同样自动输出结果,但它的 kernel 是**持久**的,
1048
- // `const app = await cua.getApp(...)` 跨 cell 存活,所以一个会话只调一次 getApp,
1049
- // 那次展示确实省掉一次单独观察。ZCode 的 node_repl 每个 cell 都是全新 Worker,绑定
1050
- // 不跨 cell,于是**每个 cell 都要重新 getApp**,那次"顺便展示"就从"一次性省一个往返"
1051
- // 变成了"每个 cell 都多一棵注定作废的树"。行为照抄了 Codex,前提没跟着抄。
1043
+ // 根因:「getApp 自动输出结果」只在 kernel **持久**时划算 —— `const app = await
1044
+ // cua.getApp(...)` 跨 cell 存活,一个会话只调一次 getApp,那次展示确实省掉一次单独观察。
1045
+ // ZCode 的 node_repl 每个 cell 都是全新 Worker,绑定不跨 cell,于是**每个 cell 都要重新
1046
+ // getApp**,那次"顺便展示"就从"一次性省一个往返"变成了"每个 cell 都多一棵注定作废的树"。
1052
1047
  //
1053
1048
  // 代价不只是 token。真机实测(会话 sess_f14c07fd):8 个 cell 里 5 个吐两棵树,
1054
1049
  // 36% 的工具输出(43902/120854 字符)是被同 cell 后续观察直接覆盖的前序树;更糟的是
@@ -1059,12 +1054,12 @@ export async function setupComputerUseRuntime({ globals }) {
1059
1054
  //
1060
1055
  // 想看状态就显式 getAXState(),与其它观察方法一致。
1061
1056
  //
1062
- // 结构化元素视图。Codex 的 Target 只给字符串,但模型写的是代码,单 cell 内
1057
+ // 结构化元素视图。Target 的公开观察方法只给字符串,但模型写的是代码,单 cell 内
1063
1058
  // 「观察 → 找元素 → 动作」能省一次往返;树被按优先级裁剪(targeting/format.ts 的
1064
1059
  // `indices are sparse` 注记)时,它还是模型拿到隐藏元素索引的唯一途径。因此它已被
1065
1060
  // 提为**文档化成员**(SKILL 的 Keyboard 段 + docs/computer-use.md 的 API 段),
1066
1061
  // 保持 enumerable:false 只是为了不进 Object.keys —— R2 的「Target 附加成员为 0」
1067
- // 说的是与 Codex 逐字对齐的**可枚举**面,不是禁止具名逃逸口。
1062
+ // 说的是冻结的**可枚举**公开面,不是禁止具名逃逸口。
1068
1063
  Object.defineProperty(app, "elements", {
1069
1064
  enumerable: false,
1070
1065
  value: async () => {
@@ -1105,8 +1100,7 @@ export async function setupComputerUseRuntime({ globals }) {
1105
1100
  return state;
1106
1101
  };
1107
1102
 
1108
- // `cua.computer` —— 平台特定逃逸口。角色与 Codex 一致(官方文档:
1109
- // "cua.browsers and cua.computer expose additional platform-specific computer APIs")。
1103
+ // `cua.computer` —— 平台特定逃逸口,暴露额外的平台相关 computer API。
1110
1104
  // 内容是存活的 14 个工具,入参 schema 逐字保留。
1111
1105
  //
1112
1106
  // 返回值**解封**(2026-09-16):此前原样返回 MCP envelope,于是模型拿到的是
@@ -1169,8 +1163,8 @@ export async function setupComputerUseRuntime({ globals }) {
1169
1163
  assertOk("stop_computer_control", result);
1170
1164
  },
1171
1165
  };
1172
- // 未文档化成员:窗口绑定。Codex 把窗口概念按平台分裂(macOS 面没有窗口寻址,
1173
- // Windows 的 window2 面整套以 Window 对象寻址),ZCode 三平台统一命名做不了那种分裂,
1166
+ // 未文档化成员:窗口绑定。窗口寻址各平台差异很大(有的平台没有窗口寻址,有的整套
1167
+ // 以 Window 对象寻址),ZCode 三平台统一命名,不按平台分裂公开面,
1174
1168
  // 所以窗口寻址留在逃逸口 + 这个未文档化入口。
1175
1169
  Object.defineProperty(cua, "getWindow", {
1176
1170
  enumerable: false,
@@ -1178,7 +1172,7 @@ export async function setupComputerUseRuntime({ globals }) {
1178
1172
  });
1179
1173
 
1180
1174
  // 入口是 `agent.computerUse`(ZCode 自己的命名空间约定,与 agent.documentation /
1181
- // agent.browsers 并列)。codex 用的是裸 `cua` 全局;这一处是有意的分歧。
1175
+ // agent.browsers 并列),不注入裸 `cua` 全局。
1182
1176
  // 平铺的 14 个工具在 `agent.computerUse.computer.*` 下(COMPUTER_METHOD_NAMES)。
1183
1177
  const agent = (globals.agent ??= {});
1184
1178
  agent.computerUse = cua;
@@ -44,7 +44,7 @@ There are two ways to work with configuration in the ZCode client, and this plug
44
44
  - **Workspace scope**: `<repo>/AGENTS.md`. Use this for repository-specific rules that should be shared with the project, such as architecture boundaries, logging rules, testing requirements, and commit/MR policy.
45
45
  - **Resolution**: ZCode searches for the workspace `AGENTS.md` from the current working directory upward until the detected project root. The user default file is resolved from the user's home directory.
46
46
  - **Merge order**: when both files exist, ZCode injects `~/.zcode/AGENTS.md` first, then the resolved workspace `AGENTS.md`. Workspace instructions appear later, so they can narrow or override broad user defaults for that repository.
47
- - **Migration and creation**: onboarding can copy Claude user memory from `~/.claude/CLAUDE.md` into `~/.zcode/AGENTS.md`. The built-in `/init` command targets the current workspace `AGENTS.md`, creating or updating repository instructions instead of editing the user default file.
47
+ - **Migration and creation**: onboarding can copy existing user memory from `~/.claude/CLAUDE.md` into `~/.zcode/AGENTS.md`. The built-in `/init` command targets the current workspace `AGENTS.md`, creating or updating repository instructions instead of editing the user default file.
48
48
 
49
49
  ## Skills and commands: discovery order (identical)
50
50
 
@@ -83,7 +83,7 @@ Within a level, `.zcode` is scanned before `.agents`. A deeper working-directory
83
83
 
84
84
  - Personal, used across projects → user scope (`~/.zcode/...` or `~/.agents/...`).
85
85
  - Team- or project-shared, versioned with the repository → workspace scope (`<repo>/.zcode/...` or `.agents/...`).
86
- - Shared across tools (Claude, Codex, Cursor) → put skills in `~/.agents/skills/`; to override a same-named skill only inside ZCode, use `.zcode/skills/`.
86
+ - Shared with other coding agents that read `~/.agents/skills/` → put skills there; to override a same-named skill only inside ZCode, use `.zcode/skills/`.
87
87
  - Personal default instructions → `~/.zcode/AGENTS.md`; repository-specific instructions → `<repo>/AGENTS.md`. If both exist, keep broad preferences in the user file and project rules in the workspace file.
88
88
  - MCP servers → user configuration for personal servers, or workspace configuration to share with a team; both scopes connect automatically. Because opening a project now auto-connects the MCP servers declared in its configuration, only open workspaces you trust.
89
89
  - Secrets → never commit them to version control; use environment variables or local settings.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "revision": 30,
3
+ "revision": 31,
4
4
  "config": {
5
5
  "providerConfigRules": {
6
6
  "templateRules": [
@@ -861,6 +861,50 @@
861
861
  "key": "bigmodel"
862
862
  }
863
863
  }
864
+ },
865
+ {
866
+ "providerId": "account:zai-highspeed-card",
867
+ "providerName": "Z.AI Highspeed card",
868
+ "config": {
869
+ "group": "zai-family",
870
+ "builtinModelIds": ["GLM-5.3", "GLM-5.3-Flash"],
871
+ "visibility": "hidden",
872
+ "access": {
873
+ "type": "zhipu-account",
874
+ "mode": "highspeed",
875
+ "accountType": "zai"
876
+ },
877
+ "api": {
878
+ "type": "anthropic-messages",
879
+ "baseUrl": "https://zcode.z.ai/api/v1/highspeed/anthropic"
880
+ },
881
+ "logo": {
882
+ "type": "builtin",
883
+ "key": "zai"
884
+ }
885
+ }
886
+ },
887
+ {
888
+ "providerId": "account:bigmodel-highspeed-card",
889
+ "providerName": "BigModel Highspeed card",
890
+ "config": {
891
+ "group": "bigmodel-family",
892
+ "builtinModelIds": ["GLM-5.3", "GLM-5.3-Flash"],
893
+ "visibility": "hidden",
894
+ "access": {
895
+ "type": "zhipu-account",
896
+ "mode": "highspeed",
897
+ "accountType": "bigmodel"
898
+ },
899
+ "api": {
900
+ "type": "anthropic-messages",
901
+ "baseUrl": "https://zcode.z.ai/api/v1/highspeed/anthropic"
902
+ },
903
+ "logo": {
904
+ "type": "builtin",
905
+ "key": "bigmodel"
906
+ }
907
+ }
864
908
  }
865
909
  ]
866
910
  },
@@ -4127,6 +4171,18 @@
4127
4171
  }
4128
4172
  }
4129
4173
  },
4174
+ {
4175
+ "modelMatch": ".*",
4176
+ "baseUrlMatch": "https://zcode\\.z\\.ai/api/v1/highspeed/anthropic/?",
4177
+ "config": {
4178
+ "properties": {
4179
+ "inputFormat": {
4180
+ "supportsImage": true,
4181
+ "supportsVideo": true
4182
+ }
4183
+ }
4184
+ }
4185
+ },
4130
4186
  {
4131
4187
  "modelMatch": ".*claude-.*",
4132
4188
  "apiTypeMatch": "anthropic-messages",
@@ -4214,6 +4270,17 @@
4214
4270
  }
4215
4271
  }
4216
4272
  },
4273
+ {
4274
+ "modelMatch": ".*",
4275
+ "apiTypeMatch": "anthropic-messages",
4276
+ "baseUrlMatch": "https://zcode\\.z\\.ai/api/v1/highspeed/anthropic/?",
4277
+ "config": {
4278
+ "properties": {
4279
+ "supportsNativeWebSearch": true,
4280
+ "supportsMidConversationSystem": true
4281
+ }
4282
+ }
4283
+ },
4217
4284
  {
4218
4285
  "modelMatch": "deepseek-v4-flash",
4219
4286
  "apiTypeMatch": "openai-responses",
@@ -6289,6 +6356,34 @@
6289
6356
  "config": {
6290
6357
  "enabled": true
6291
6358
  }
6359
+ },
6360
+ {
6361
+ "providerId": "account:zai-highspeed-card",
6362
+ "modelId": "GLM-5.3-Flash",
6363
+ "config": {
6364
+ "enabled": true
6365
+ }
6366
+ },
6367
+ {
6368
+ "providerId": "account:zai-highspeed-card",
6369
+ "modelId": "GLM-5.3",
6370
+ "config": {
6371
+ "enabled": true
6372
+ }
6373
+ },
6374
+ {
6375
+ "providerId": "account:bigmodel-highspeed-card",
6376
+ "modelId": "GLM-5.3-Flash",
6377
+ "config": {
6378
+ "enabled": true
6379
+ }
6380
+ },
6381
+ {
6382
+ "providerId": "account:bigmodel-highspeed-card",
6383
+ "modelId": "GLM-5.3",
6384
+ "config": {
6385
+ "enabled": true
6386
+ }
6292
6387
  }
6293
6388
  ]
6294
6389
  }