zcode-app-cli 3.9.2-16 → 3.10.1-17

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 (36) hide show
  1. package/bin/zcode.js +1 -0
  2. package/config.example.json +1 -0
  3. package/package.json +3 -3
  4. package/vendor/extraction.json +4 -4
  5. package/vendor/node_modules/@zcode/tui/dist/index.js +750 -188
  6. package/vendor/node_modules/@zcode/tui/package.json +1 -1
  7. package/vendor/packages/browser-use-plugin/.zcode-plugin/plugin.json +1 -1
  8. package/vendor/packages/browser-use-plugin/dist/mcp/server.js +660 -220
  9. package/vendor/packages/browser-use-plugin/docs/api.json +2 -2
  10. package/vendor/packages/browser-use-plugin/docs/overview.md +1 -1
  11. package/vendor/packages/browser-use-plugin/docs/playwright.md +4 -6
  12. package/vendor/packages/browser-use-plugin/docs/safety.md +1 -1
  13. package/vendor/packages/browser-use-plugin/docs/workflow.md +1 -1
  14. package/vendor/packages/browser-use-plugin/package.json +1 -1
  15. package/vendor/packages/browser-use-plugin/scripts/browser-client.mjs +2 -2
  16. package/vendor/packages/browser-use-plugin/skills/control-browser/SKILL.md +2 -2
  17. package/vendor/packages/document-skills-plugin/.zcode-plugin/plugin.json +2 -2
  18. package/vendor/packages/document-skills-plugin/agents/judge.md +51 -0
  19. package/vendor/packages/document-skills-plugin/package.json +4 -4
  20. package/vendor/packages/document-skills-plugin/skills/pptx/SKILL.md +6 -3
  21. package/vendor/packages/zcode-cua-plugin/.zcode-plugin/plugin.json +2 -2
  22. package/vendor/packages/zcode-cua-plugin/dist/mcp/server.js +2 -2
  23. package/vendor/packages/zcode-cua-plugin/node_modules/koffi/build/koffi/linux_x64/koffi.node +0 -0
  24. package/vendor/packages/zcode-cua-plugin/node_modules/koffi/index.d.ts +288 -0
  25. package/vendor/packages/zcode-cua-plugin/node_modules/koffi/index.js +634 -0
  26. package/vendor/packages/zcode-cua-plugin/node_modules/koffi/package.json +38 -0
  27. package/vendor/packages/zcode-cua-plugin/package.json +1 -1
  28. package/vendor/packages/zcode-cua-plugin/scripts/build-mcp.mjs +3 -1
  29. package/vendor/packages/zcode-cua-plugin/scripts/bump-zcode-cua-producer.mjs +4 -4
  30. package/vendor/packages/zcode-cua-plugin/scripts/check-cua-baseline.mjs +2 -2
  31. package/vendor/packages/zcode-cua-plugin/scripts/check-version-coherence.mjs +4 -4
  32. package/vendor/packages/zcode-cua-plugin/scripts/sync-cache.mjs +9 -2
  33. package/vendor/packages/zcode-cua-plugin/scripts/sync-skill-from-zcode-cua.mjs +7 -7
  34. package/vendor/packages/zcode-cua-plugin/skills/{zcode-computer-use → computer-use}/SKILL.md +1 -1
  35. package/vendor/zcode.cjs +773 -771
  36. package/zcode-runtime.lock.json +3 -3
@@ -2,7 +2,7 @@
2
2
  // 唯一的原子 producer bump 命令 —— 一次调用完成全部 producer 记录的同步更新:
3
3
  // pnpm-workspace.yaml catalog(两个别名)
4
4
  // pnpm-lock.yaml(通过 pnpm install)
5
- // bundled Skill(skills/zcode-computer-use/SKILL.md)
5
+ // bundled Skill(skills/computer-use/SKILL.md)
6
6
  // upstream.json(commit/ref/skillSha256 provenance)
7
7
  // wrapper 版本三处记录 + 官方插件定义 + 实现契约(复用 check-version-coherence.mjs 写回)
8
8
  // 成功后自动跑快速基线门禁与 skill-sync 不可变性测试自校验;--commit 直接产出单个
@@ -34,9 +34,9 @@ const workspacePath = resolve(repoRoot, "pnpm-workspace.yaml");
34
34
  const producerRoot = resolve(
35
35
  process.env.ZCODE_CUA_REPO ?? resolve(packageRoot, "../../../../../zcode-cua"),
36
36
  );
37
- const skillPath = "plugin/skills/zcode-computer-use/SKILL.md";
37
+ const skillPath = "plugin/skills/computer-use/SKILL.md";
38
38
  const producerManifestPath = "plugin/.zcode-plugin/plugin.json";
39
- const targetSkill = resolve(packageRoot, "skills/zcode-computer-use/SKILL.md");
39
+ const targetSkill = resolve(packageRoot, "skills/computer-use/SKILL.md");
40
40
  const provenancePath = resolve(packageRoot, "upstream.json");
41
41
  const doCommit = process.argv.includes("--commit");
42
42
  const positionalArgs = process.argv.slice(2).filter((arg) => !arg.startsWith("--"));
@@ -230,7 +230,7 @@ const commitFileSet = [
230
230
  "pnpm-workspace.yaml",
231
231
  "pnpm-lock.yaml",
232
232
  "apps/zcode-cli/packages/zcode-cua-plugin/upstream.json",
233
- "apps/zcode-cli/packages/zcode-cua-plugin/skills/zcode-computer-use/SKILL.md",
233
+ "apps/zcode-cli/packages/zcode-cua-plugin/skills/computer-use/SKILL.md",
234
234
  "apps/zcode-cli/packages/zcode-cua-plugin/package.json",
235
235
  "apps/zcode-cli/packages/zcode-cua-plugin/.zcode-plugin/plugin.json",
236
236
  "apps/zcode-cli/packages/bootstrap/src/app/official-plugin-definitions.ts",
@@ -31,7 +31,7 @@ const [
31
31
  readFile(resolve(repoRoot, "pnpm-workspace.yaml"), "utf8"),
32
32
  readFile(resolve(repoRoot, "pnpm-lock.yaml"), "utf8"),
33
33
  readFile(resolve(packageRoot, "upstream.json"), "utf8"),
34
- readFile(resolve(packageRoot, "skills/zcode-computer-use/SKILL.md")),
34
+ readFile(resolve(packageRoot, "skills/computer-use/SKILL.md")),
35
35
  readFile(
36
36
  resolve(
37
37
  repoRoot,
@@ -116,7 +116,7 @@ if (provenance.commit !== catalogCommit || provenance.ref !== catalogCommit) {
116
116
  `ref=${provenance.ref},catalog=${catalogCommit}`,
117
117
  );
118
118
  }
119
- if (provenance.skillPath !== "plugin/skills/zcode-computer-use/SKILL.md") {
119
+ if (provenance.skillPath !== "plugin/skills/computer-use/SKILL.md") {
120
120
  fail(`upstream.json.skillPath 不是 producer Skill 路径(当前 ${provenance.skillPath})`);
121
121
  }
122
122
  const skillSha256 = createHash("sha256").update(skillBytes).digest("hex");
@@ -385,7 +385,7 @@ if (pinValues.length !== 1 || !pinValues[0]) {
385
385
  const expected = pinValues[0];
386
386
 
387
387
  function readOfficialPluginVersion(source) {
388
- const block = source.match(/name:\s*"zcode-cua"[\s\S]*?version:\s*"([^"]+)"[\s\S]*?\n\s*\},/u);
388
+ const block = source.match(/name:\s*"computer-use"[\s\S]*?version:\s*"([^"]+)"[\s\S]*?\n\s*\},/u);
389
389
  return block?.[1] ?? null;
390
390
  }
391
391
 
@@ -395,7 +395,7 @@ const officialPluginDefinitions = await readFile(officialPluginDefinitionsPath,
395
395
  const records = {
396
396
  "wrapper package.json.version": wrapperPackageJson.version,
397
397
  "wrapper .zcode-plugin/plugin.json.version": (await readJson(wrapperManifestPath)).version,
398
- "official-plugin-definitions zcode-cua.version":
398
+ "official-plugin-definitions computer-use.version":
399
399
  readOfficialPluginVersion(officialPluginDefinitions),
400
400
  "installed producer package.json.version": installedRuntimePackage.version,
401
401
  ...producerPins,
@@ -447,9 +447,9 @@ const wrote = [];
447
447
  if (await writeVersionField(wrapperPackageJsonPath, expected)) wrote.push("package.json");
448
448
  if (await writeVersionField(wrapperManifestPath, expected)) wrote.push(".zcode-plugin/plugin.json");
449
449
  const officialVersionPattern =
450
- /(name:\s*"zcode-cua"[\s\S]*?version:\s*")([^"]+)("[\s\S]*?\n\s*\},)/u;
450
+ /(name:\s*"computer-use"[\s\S]*?version:\s*")([^"]+)("[\s\S]*?\n\s*\},)/u;
451
451
  if (!officialVersionPattern.test(officialPluginDefinitions)) {
452
- throw new Error("[cua-version] 未找到 official-plugin-definitions 中的 zcode-cua version");
452
+ throw new Error("[cua-version] 未找到 official-plugin-definitions 中的 computer-use version");
453
453
  }
454
454
  const updatedOfficialPluginDefinitions = officialPluginDefinitions.replace(
455
455
  officialVersionPattern,
@@ -19,6 +19,7 @@ import { dirname, join, resolve } from "node:path";
19
19
  import { fileURLToPath, pathToFileURL } from "node:url";
20
20
  import { homedir } from "node:os";
21
21
  import { stageSharpIntoBundledAgents } from "../../../../../packages/desktop/scripts/sharp-package-assets.mjs";
22
+ import { stageKoffiIntoBundledAgents } from "../../../../../packages/desktop/scripts/koffi-package-assets.mjs";
22
23
 
23
24
  const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
24
25
 
@@ -41,13 +42,13 @@ async function resolveCacheDir() {
41
42
  const text = await readFile(marketplace, "utf8");
42
43
  const parsed = JSON.parse(text);
43
44
  const entry = (parsed.plugins ?? parsed.items ?? []).find(
44
- (p) => p?.name === "zcode-cua" && p?.cachePath,
45
+ (p) => p?.name === "computer-use" && p?.cachePath,
45
46
  );
46
47
  if (entry?.cachePath && existsSync(entry.cachePath)) return entry.cachePath;
47
48
  } catch {
48
49
  // marketplace.json missing/unreadable — fall through to glob.
49
50
  }
50
- const cacheRoot = join(homedir(), ".zcode/cli/plugins/cache/zcode-plugins-official/zcode-cua");
51
+ const cacheRoot = join(homedir(), ".zcode/cli/plugins/cache/zcode-plugins-official/computer-use");
51
52
  if (existsSync(cacheRoot)) {
52
53
  const dirs = await readdir(cacheRoot);
53
54
  if (dirs.length === 1) return join(cacheRoot, dirs[0]);
@@ -91,6 +92,12 @@ stageSharpIntoBundledAgents({
91
92
  targetPlatform: { os: process.platform, arch: process.arch },
92
93
  });
93
94
  copied.push("node_modules/sharp runtime");
95
+ stageKoffiIntoBundledAgents({
96
+ koffiPackageRoot: resolve(packageRoot, "../adapters"),
97
+ glmDir: cacheDir,
98
+ targetPlatform: { os: process.platform, arch: process.arch },
99
+ });
100
+ copied.push("node_modules/koffi runtime");
94
101
 
95
102
  console.log(`sync:cache → ${cacheDir}`);
96
103
  console.log(` copied: ${copied.join(", ") || "(nothing)"}`);
@@ -12,9 +12,9 @@ const defaultRepositoryRoot = resolve(packageRoot, "../../../../../zcode-cua");
12
12
  const repositoryRoot = resolve(
13
13
  process.argv[2] ?? process.env.ZCODE_CUA_REPO ?? defaultRepositoryRoot,
14
14
  );
15
- const sourceSkill = resolve(repositoryRoot, "plugin/skills/zcode-computer-use/SKILL.md");
15
+ const sourceSkill = resolve(repositoryRoot, "plugin/skills/computer-use/SKILL.md");
16
16
  const sourceManifest = resolve(repositoryRoot, "plugin/.zcode-plugin/plugin.json");
17
- const targetSkill = resolve(packageRoot, "skills/zcode-computer-use/SKILL.md");
17
+ const targetSkill = resolve(packageRoot, "skills/computer-use/SKILL.md");
18
18
  const provenancePath = resolve(packageRoot, "upstream.json");
19
19
  // 修复:bundled wrapper 的 plugin.json / package.json 之前各自维护 0.1.0,
20
20
  // 与实际 zcode-cua MCP server 版本割裂(UI 展示、缓存路径、marketplace 条目都对不上)。
@@ -38,7 +38,7 @@ const [skillBytes, manifestText, workspaceText, revision, sourceStatus] = await
38
38
  "--porcelain",
39
39
  "--untracked-files=all",
40
40
  "--",
41
- "plugin/skills/zcode-computer-use/SKILL.md",
41
+ "plugin/skills/computer-use/SKILL.md",
42
42
  "plugin/.zcode-plugin/plugin.json",
43
43
  ],
44
44
  { encoding: "utf8" },
@@ -67,8 +67,8 @@ if (sourceStatus.stdout.trim() !== "") {
67
67
  throw new Error("Refusing to sync Skill or plugin manifest from uncommitted producer content");
68
68
  }
69
69
  const manifest = JSON.parse(manifestText);
70
- if (manifest.name !== "zcode-cua" || typeof manifest.version !== "string") {
71
- throw new Error(`Invalid zcode-cua plugin manifest at ${sourceManifest}`);
70
+ if (manifest.name !== "computer-use" || typeof manifest.version !== "string") {
71
+ throw new Error(`Invalid computer-use plugin manifest at ${sourceManifest}`);
72
72
  }
73
73
 
74
74
  /**
@@ -95,7 +95,7 @@ await writeFile(
95
95
  repository: "https://dev.aminer.cn/codegeex/zcode-cua.git",
96
96
  ref: upstreamRef,
97
97
  commit: upstreamCommit,
98
- skillPath: "plugin/skills/zcode-computer-use/SKILL.md",
98
+ skillPath: "plugin/skills/computer-use/SKILL.md",
99
99
  skillSha256: createHash("sha256").update(skillBytes).digest("hex"),
100
100
  },
101
101
  null,
@@ -106,7 +106,7 @@ await writeFile(
106
106
  const manifestUpdated = await syncVersionField(bundledManifestPath, manifest.version);
107
107
  const packageJsonUpdated = await syncVersionField(bundledPackageJsonPath, manifest.version);
108
108
 
109
- console.log(`Synced zcode-computer-use skill from zcode-cua ${manifest.version}`);
109
+ console.log(`Synced computer-use skill from zcode-cua ${manifest.version}`);
110
110
  if (manifestUpdated || packageJsonUpdated) {
111
111
  console.log(
112
112
  `Aligned bundled wrapper version to ${manifest.version} ` +
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: zcode-computer-use
2
+ name: computer-use
3
3
  description: Main-agent-only desktop control through accessibility-first semantic actions with visual pixel fallback only when accessibility cannot reach the target.
4
4
  ---
5
5