@microi.net/cli 5.7.4 → 5.7.6

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 (40) hide show
  1. package/.codebuddy-plugin/marketplace.json +2 -2
  2. package/.codebuddy-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/.mcp.json +1 -1
  5. package/.workbuddy-plugin/marketplace.json +2 -2
  6. package/.workbuddy-plugin/plugin.json +1 -1
  7. package/README.md +71 -71
  8. package/assets/build-meta.json +7 -7
  9. package/cordis.patch.yml +2 -2
  10. package/package.json +1 -1
  11. package/scripts/mcp-server.js +101 -101
  12. package/scripts/microi-cli.js +5 -5
  13. package/scripts/microi-codex-broker.js +2 -2
  14. package/scripts/microi-codex-router.js +2 -2
  15. package/scripts/microi-skills.meta.json +221 -218
  16. package/skills/.microi-skills-version.json +3 -3
  17. package/skills/.progressive-disclosure-manifest.json +25 -25
  18. package/skills/ai-engine/SKILL.md +37 -37
  19. package/skills/ai-engine/references/ai-employees.md +6 -4
  20. package/skills/app-store/SKILL.md +253 -249
  21. package/skills/job-engine/SKILL.md +21 -20
  22. package/skills/message-notification/SKILL.md +156 -155
  23. package/skills/microi-ai-application/SKILL.md +7 -3
  24. package/skills/microi-client-frontend/SKILL.md +39 -35
  25. package/skills/microi-codex/SKILL.md +11 -9
  26. package/skills/microi-codex-installer/SKILL.md +5 -5
  27. package/skills/microi-datasource-mapping/SKILL.md +5 -1
  28. package/skills/microi-microservice/SKILL.md +35 -34
  29. package/skills/module-engine/SKILL.md +59 -46
  30. package/skills/page-engine/SKILL.md +11 -1
  31. package/skills/playwright-e2e/SKILL.md +3 -3
  32. package/skills/v8-explorer-tree/SKILL.md +228 -228
  33. package/skills/v8-file-upload/SKILL.md +189 -182
  34. package/skills/v8-mq-mqtt/SKILL.md +2 -1
  35. package/skills/v8-tcp-integration/SKILL.md +2 -2
  36. package/skills/v8-workflow/SKILL.md +93 -66
  37. package/skills/v8-workflow/references/workflow-configuration.md +49 -0
  38. package/skills/workspace-conventions/SKILL.md +261 -261
  39. package/skills/workspace-conventions/references/progressive-01-/347/211/210/346/234/254/346/233/264/346/226/260/346/227/245/345/277/227/344/277/235/346/212/244/350/247/204/345/210/231-/345/274/272/345/210/266.md +208 -208
  40. package/skills/workspace-conventions/references/progressive-02-microi-net-api-/346/234/254/345/234/260/345/220/257/345/212/250/347/272/246/345/256/232.md +7 -7
@@ -5,13 +5,13 @@
5
5
  "url": "https://microi.net"
6
6
  },
7
7
  "description": "Microi吾码官方 AI 插件市场",
8
- "version": "5.7.4",
8
+ "version": "5.7.6",
9
9
  "plugins": [
10
10
  {
11
11
  "name": "microi",
12
12
  "source": ".",
13
13
  "description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
14
- "version": "5.7.4",
14
+ "version": "5.7.6",
15
15
  "strict": true
16
16
  }
17
17
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microi",
3
- "version": "5.7.4",
3
+ "version": "5.7.6",
4
4
  "description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
5
5
  "author": {
6
6
  "name": "Microi.Net",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microi",
3
- "version": "5.7.4",
3
+ "version": "5.7.6",
4
4
  "description": "Microi吾码低代码平台的 Codex 开发插件,共享 VS Code/CLI 的连接、同步、MCP、V8 与交付能力。",
5
5
  "author": {
6
6
  "name": "Microi.Net",
package/.mcp.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "command": "node",
5
5
  "args": [
6
6
  "-e",
7
- "/*\n * Codex CLI 仍不会把 plugin .mcp.json 的相对路径定位到插件根。\n * 本脚本作为 `node -e` 内容运行:CodeBuddy/WorkBuddy 优先使用宿主注入的\n * plugin root;Codex 则回退到官方 plugin cache,并统一执行双清单校验。\n */\nconst fs = require('node:fs');\nconst os = require('node:os');\nconst path = require('node:path');\nconst primaryPackageName = '@microi.net/cli';\nconst legacyPackageName = '@microi.net/codex-plugin';\n\nfunction readJson(filePath) {\n try { return JSON.parse(fs.readFileSync(filePath, 'utf8')); }\n catch { return undefined; }\n}\nfunction validPluginRoot(root) {\n const manifest = readJson(path.join(root, '.codex-plugin', 'plugin.json'));\n const pkg = readJson(path.join(root, 'package.json'));\n const adapter = path.join(root, 'scripts', 'mcp-codex-stdio-adapter.js');\n const router = path.join(root, 'scripts', 'microi-codex-router.js');\n if (manifest?.name !== 'microi' || ![primaryPackageName, legacyPackageName].includes(pkg?.name)) return undefined;\n if (!manifest.version || manifest.version !== pkg.version) return undefined;\n if (!fs.existsSync(adapter) || !fs.existsSync(router)) return undefined;\n return {\n root,\n adapter,\n router,\n packagePriority: pkg.name === primaryPackageName ? 1 : 0,\n modifiedAt: Math.max(fs.statSync(adapter).mtimeMs, fs.statSync(router).mtimeMs),\n };\n}\n\nfunction findPluginRoot() {\n const explicitRoots = [\n ['MICROI_CODEX_PLUGIN_ROOT', process.env.MICROI_CODEX_PLUGIN_ROOT],\n ['CODEBUDDY_PLUGIN_ROOT', process.env.CODEBUDDY_PLUGIN_ROOT],\n ['WORKBUDDY_PLUGIN_ROOT', process.env.WORKBUDDY_PLUGIN_ROOT],\n ['CLAUDE_PLUGIN_ROOT', process.env.CLAUDE_PLUGIN_ROOT],\n ];\n for (const [source, value] of explicitRoots) {\n const explicit = String(value || '').trim();\n if (!explicit) continue;\n const validated = validPluginRoot(path.resolve(explicit));\n if (!validated) throw new Error(`${source} 不是有效的 Microi Plugin:${explicit}`);\n return validated;\n }\n\n const codexHome = path.resolve(process.env.CODEX_HOME || path.join(os.homedir(), '.codex'));\n const cacheRoot = path.join(codexHome, 'plugins', 'cache');\n const candidates = [];\n if (fs.existsSync(cacheRoot)) {\n for (const marketplace of fs.readdirSync(cacheRoot, { withFileTypes: true }).filter(entry => entry.isDirectory())) {\n const pluginDir = path.join(cacheRoot, marketplace.name, 'microi');\n if (!fs.existsSync(pluginDir)) continue;\n for (const version of fs.readdirSync(pluginDir, { withFileTypes: true }).filter(entry => entry.isDirectory())) {\n const candidateRoot = path.resolve(pluginDir, version.name);\n const relative = path.relative(cacheRoot, candidateRoot);\n if (relative.startsWith('..') || path.isAbsolute(relative)) continue;\n const validated = validPluginRoot(candidateRoot);\n if (validated) candidates.push(validated);\n }\n }\n }\n candidates.sort((left, right) => right.packagePriority - left.packagePriority || right.modifiedAt - left.modifiedAt);\n if (!candidates[0]) {\n throw new Error(`未在 Codex plugin cache 找到有效的 Microi Codex Plugin:${cacheRoot}`);\n }\n return candidates[0];\n}\n\ntry {\n const plugin = findPluginRoot();\n process.env.MICROI_CODEX_PLUGIN_ROOT = plugin.root;\n process.argv[2] = plugin.router;\n require(plugin.adapter);\n} catch (error) {\n console.error(`[microi-codex-bootstrap] ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n}\n"
7
+ "/*\n * Codex CLI 仍不会把 plugin .mcp.json 的相对路径定位到插件根。\n * 本脚本作为 `node -e` 内容运行:CodeBuddy/WorkBuddy 优先使用宿主注入的\n * plugin root;Codex 则回退到官方 plugin cache,并统一执行双清单校验。\n */\nconst fs = require('node:fs');\nconst os = require('node:os');\nconst path = require('node:path');\nconst primaryPackageName = '@microi.net/cli';\nconst legacyPackageName = '@microi.net/codex-plugin';\n\nfunction readJson(filePath) {\n try { return JSON.parse(fs.readFileSync(filePath, 'utf8')); }\n catch { return undefined; }\n}\nfunction validPluginRoot(root) {\n const manifest = readJson(path.join(root, '.codex-plugin', 'plugin.json'));\n const pkg = readJson(path.join(root, 'package.json'));\n const adapter = path.join(root, 'scripts', 'mcp-codex-stdio-adapter.js');\n const router = path.join(root, 'scripts', 'microi-codex-router.js');\n if (manifest?.name !== 'microi' || ![primaryPackageName, legacyPackageName].includes(pkg?.name)) return undefined;\n if (!manifest.version || manifest.version !== pkg.version) return undefined;\n if (!fs.existsSync(adapter) || !fs.existsSync(router)) return undefined;\n return {\n root,\n adapter,\n router,\n packagePriority: pkg.name === primaryPackageName ? 1 : 0,\n modifiedAt: Math.max(fs.statSync(adapter).mtimeMs, fs.statSync(router).mtimeMs),\n };\n}\n\nfunction findPluginRoot() {\n const explicitRoots = [\n ['MICROI_CODEX_PLUGIN_ROOT', process.env.MICROI_CODEX_PLUGIN_ROOT],\n ['CODEBUDDY_PLUGIN_ROOT', process.env.CODEBUDDY_PLUGIN_ROOT],\n ['WORKBUDDY_PLUGIN_ROOT', process.env.WORKBUDDY_PLUGIN_ROOT],\n ['CLAUDE_PLUGIN_ROOT', process.env.CLAUDE_PLUGIN_ROOT],\n ];\n for (const [source, value] of explicitRoots) {\n const explicit = String(value || '').trim();\n if (!explicit) continue;\n const validated = validPluginRoot(path.resolve(explicit));\n if (!validated) throw new Error(`${source} 不是有效的 Microi Plugin:${explicit}`);\n return validated;\n }\n\n const codexHome = path.resolve(process.env.CODEX_HOME || path.join(os.homedir(), '.codex'));\n const cacheRoot = path.join(codexHome, 'plugins', 'cache');\n const candidates = [];\n if (fs.existsSync(cacheRoot)) {\n for (const marketplace of fs.readdirSync(cacheRoot, { withFileTypes: true }).filter(entry => entry.isDirectory())) {\n const pluginDir = path.join(cacheRoot, marketplace.name, 'microi');\n if (!fs.existsSync(pluginDir)) continue;\n for (const version of fs.readdirSync(pluginDir, { withFileTypes: true }).filter(entry => entry.isDirectory())) {\n const candidateRoot = path.resolve(pluginDir, version.name);\n const relative = path.relative(cacheRoot, candidateRoot);\n if (relative.startsWith('..') || path.isAbsolute(relative)) continue;\n const validated = validPluginRoot(candidateRoot);\n if (validated) candidates.push(validated);\n }\n }\n }\n candidates.sort((left, right) => right.packagePriority - left.packagePriority || right.modifiedAt - left.modifiedAt);\n if (!candidates[0]) {\n throw new Error(`未在 Codex plugin cache 找到有效的 Microi Agentx Plugin:${cacheRoot}`);\n }\n return candidates[0];\n}\n\ntry {\n const plugin = findPluginRoot();\n process.env.MICROI_CODEX_PLUGIN_ROOT = plugin.root;\n process.argv[2] = plugin.router;\n require(plugin.adapter);\n} catch (error) {\n console.error(`[microi-codex-bootstrap] ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n}\n"
8
8
  ]
9
9
  }
10
10
  }
@@ -5,13 +5,13 @@
5
5
  "url": "https://microi.net"
6
6
  },
7
7
  "description": "Microi吾码官方 AI 插件市场",
8
- "version": "5.7.4",
8
+ "version": "5.7.6",
9
9
  "plugins": [
10
10
  {
11
11
  "name": "microi",
12
12
  "source": ".",
13
13
  "description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
14
- "version": "5.7.4",
14
+ "version": "5.7.6",
15
15
  "strict": true
16
16
  }
17
17
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microi",
3
- "version": "5.7.4",
3
+ "version": "5.7.6",
4
4
  "description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
5
5
  "author": {
6
6
  "name": "Microi.Net",
package/README.md CHANGED
@@ -1,71 +1,71 @@
1
- # @microi.net/cli — Microi吾码 CLI + 多宿主 AI Plugin
2
-
3
- `@microi.net/cli` 是 Microi吾码唯一的 AI/npm 产品,同时提供:
4
-
5
- - 全局命令 `microi`;
6
- - Codex Plugin、DeepSeek Harness 原生 profile bundle,以及 WorkBuddy/CodeBuddy 兼容 plugin 与 marketplace 清单;
7
- - 与 Microi.Code 同源的 MCP Server、连接/Token/同步协议;
8
- - 支持多服务器、租户、产品类型和网络环境的 `microi_codex` 路由;
9
- - 全套 Microi Skills 与 VS Code 命令覆盖矩阵。
10
-
11
- ## 安装与空工作区初始化
12
-
13
- ```bash
14
- npm install -g @microi.net/cli
15
- microi init --workspace <工作区> --pull
16
- ```
17
-
18
- 未全局安装时,也可以一次执行:
19
-
20
- ```bash
21
- npx --yes @microi.net/cli@latest init --workspace <工作区> --pull
22
- ```
23
-
24
- 命令会引导添加服务器、登录、生成 AI 指令/Skills/类型提示,并同时配置 Codex、VS Code、Cursor、Trae、Claude Code、WorkBuddy、CodeBuddy、Qoder、Comate MCP;密码仅在当前进程中隐式输入,不写入命令参数或配置文件。
25
-
26
- 在这些 AI 软件的空工作区中,可以直接说:
27
-
28
- ```text
29
- 安装 @microi.net/cli@latest,初始化 Microi吾码插件;添加指定服务器和 MCP,登录后拉取该连接的所有 V8 代码。
30
- ```
31
-
32
- 初始化会生成 `.workbuddy/mcp.json`、根 `.mcp.json`、`.comate/mcp.json`,以及 CodeBuddy/Qoder/Comate 项目 Skill。当前会话不支持热加载时继续使用已加载版本,新版在下一次自然启动时生效。
33
-
34
- ## 安装 Codex Plugin
35
-
36
- ```bash
37
- microi version --json
38
- microi codex status --json
39
- microi codex install --yes
40
- ```
41
-
42
- marketplace 固定为 `microi-net`,插件选择器固定为 `microi@microi-net`。安装器会迁移旧的 `microi-official` 标识,以及曾指向 `@microi.net/codex-plugin` 的吾码 marketplace 文件。安装不终止当前 Codex Router,新版在后续新进程中生效。
43
-
44
- 全新 Codex 的空目录中可直接对 AI 说“通过 `@microi.net/cli@latest` 安装吾码 Codex 插件”。AI 应执行 `npx --yes @microi.net/cli@latest codex install --yes`:npm 仅负责下载,安装器将本包完整复制到 `${CODEX_HOME:-~/.codex}/microi-net-marketplace/plugins/microi`,生成官方支持的本地 marketplace 并安装启用插件。Codex 下次自然启动后,插件页显示 **Microi吾码**,来源为 **microi-net**。
45
-
46
- Codex Router、VS Code 扩展与 CLI 会自动投递统一后台更新:
47
-
48
- ```bash
49
- microi update --background --workspace "<工作区绝对路径>" --json
50
- ```
51
-
52
- 更新器只使用 npm 官方 registry,并自动升级 CLI、Codex/DeepSeek Harness 插件、AI 指令、Skills 与 MCP。当前进程继续使用旧版本;断网、权限不足、文件占用或安装失败只会延后重试和非阻塞提示,不影响当前、正在进行或新建工作。
53
-
54
- 本 npm 包根目录本身就是有效的 Codex Plugin。发布到 npm 只完成 CLI 下载与用户本地 marketplace 安装能力,不代表已经进入 ChatGPT/Codex 通用公开插件目录;公开目录仍需按 OpenAI 官方流程提交审核。
55
-
56
- ## 安装 DeepSeek Harness Plugin
57
-
58
- DeepSeek Harness 已安装且 `dsh`、`pnpm` 可用时执行:
59
-
60
- ```bash
61
- microi dsh status --json
62
- microi dsh install
63
- ```
64
-
65
- 默认幂等安装到 DSH 官方 `web` 与 `headless` profile;也可用 `--profile <名称>` 指定一个 profile。本包通过 `dsh.bundle.patch` 和 `cordis.patch.yml` 接入官方 `@deepseek-ai/dsh-mcp-client`,不是向 DSH 写入无效的 `.mcp.json`。安装后新建 DSH 会话,工具入口为 `mcp__microi__microi_codex`。开发源码可用 `microi dsh install --source <Microi.Code目录> --force` 验收。
66
-
67
- 后台更新会在检测到 DSH 时自动幂等升级 bundle;DSH 或 pnpm 不存在、网络失败时只记录延后状态,不影响其它宿主和当前任务。
68
-
69
- ## WorkBuddy / CodeBuddy 原生插件
70
-
71
- 包根同时包含 `.workbuddy-plugin/`、`.codebuddy-plugin/`、`.mcp.json` 和全部 `skills/`。运行 `microi plugin path --json` 可取得本机真实包根与清单路径,供 WorkBuddy 插件页或 CodeBuddy 本地 marketplace 导入。宿主自身的安装、启用和工作区信任仍需由用户授权,CLI 不伪造 UI 安装状态。
1
+ # @microi.net/cli — Microi吾码 CLI + 多宿主 AI Plugin
2
+
3
+ `@microi.net/cli` 是 Microi吾码唯一的 AI/npm 产品,同时提供:
4
+
5
+ - 全局命令 `microi`;
6
+ - Codex Plugin、DeepSeek Harness 原生 profile bundle,以及 WorkBuddy/CodeBuddy 兼容 plugin 与 marketplace 清单;
7
+ - 与 Microi.Agent 同源的 MCP Server、连接/Token/同步协议;
8
+ - 支持多服务器、租户、产品类型和网络环境的 `microi_codex` 路由;
9
+ - 全套 Microi Skills 与 VS Code 命令覆盖矩阵。
10
+
11
+ ## 安装与空工作区初始化
12
+
13
+ ```bash
14
+ npm install -g @microi.net/cli
15
+ microi init --workspace <工作区> --pull
16
+ ```
17
+
18
+ 未全局安装时,也可以一次执行:
19
+
20
+ ```bash
21
+ npx --yes @microi.net/cli@latest init --workspace <工作区> --pull
22
+ ```
23
+
24
+ 命令会引导添加服务器、登录、生成 AI 指令/Skills/类型提示,并同时配置 Codex、VS Code、Cursor、Trae、Claude Code、WorkBuddy、CodeBuddy、Qoder、Comate MCP;密码仅在当前进程中隐式输入,不写入命令参数或配置文件。
25
+
26
+ 在这些 AI 软件的空工作区中,可以直接说:
27
+
28
+ ```text
29
+ 安装 @microi.net/cli@latest,初始化 Microi吾码插件;添加指定服务器和 MCP,登录后拉取该连接的所有 V8 代码。
30
+ ```
31
+
32
+ 初始化会生成 `.workbuddy/mcp.json`、根 `.mcp.json`、`.comate/mcp.json`,以及 CodeBuddy/Qoder/Comate 项目 Skill。当前会话不支持热加载时继续使用已加载版本,新版在下一次自然启动时生效。
33
+
34
+ ## 安装 Codex Plugin
35
+
36
+ ```bash
37
+ microi version --json
38
+ microi codex status --json
39
+ microi codex install --yes
40
+ ```
41
+
42
+ marketplace 固定为 `microi-net`,插件选择器固定为 `microi@microi-net`。安装器会迁移旧的 `microi-official` 标识,以及曾指向 `@microi.net/codex-plugin` 的吾码 marketplace 文件。安装不终止当前 Codex Router,新版在后续新进程中生效。
43
+
44
+ 全新 Codex 的空目录中可直接对 AI 说“通过 `@microi.net/cli@latest` 安装吾码 Codex 插件”。AI 应执行 `npx --yes @microi.net/cli@latest codex install --yes`:npm 仅负责下载,安装器将本包完整复制到 `${CODEX_HOME:-~/.codex}/microi-net-marketplace/plugins/microi`,生成官方支持的本地 marketplace 并安装启用插件。Codex 下次自然启动后,插件页显示 **Microi吾码**,来源为 **microi-net**。
45
+
46
+ Codex Router、VS Code 扩展与 CLI 会自动投递统一后台更新:
47
+
48
+ ```bash
49
+ microi update --background --workspace "<工作区绝对路径>" --json
50
+ ```
51
+
52
+ 更新器只使用 npm 官方 registry,并自动升级 CLI、Codex/DeepSeek Harness 插件、AI 指令、Skills 与 MCP。当前进程继续使用旧版本;断网、权限不足、文件占用或安装失败只会延后重试和非阻塞提示,不影响当前、正在进行或新建工作。
53
+
54
+ 本 npm 包根目录本身就是有效的 Codex Plugin。发布到 npm 只完成 CLI 下载与用户本地 marketplace 安装能力,不代表已经进入 ChatGPT/Codex 通用公开插件目录;公开目录仍需按 OpenAI 官方流程提交审核。
55
+
56
+ ## 安装 DeepSeek Harness Plugin
57
+
58
+ DeepSeek Harness 已安装且 `dsh`、`pnpm` 可用时执行:
59
+
60
+ ```bash
61
+ microi dsh status --json
62
+ microi dsh install
63
+ ```
64
+
65
+ 默认幂等安装到 DSH 官方 `web` 与 `headless` profile;也可用 `--profile <名称>` 指定一个 profile。本包通过 `dsh.bundle.patch` 和 `cordis.patch.yml` 接入官方 `@deepseek-ai/dsh-mcp-client`,不是向 DSH 写入无效的 `.mcp.json`。安装后新建 DSH 会话,工具入口为 `mcp__microi__microi_codex`。开发源码可用 `microi dsh install --source <Microi.Agent目录> --force` 验收。
66
+
67
+ 后台更新会在检测到 DSH 时自动幂等升级 bundle;DSH 或 pnpm 不存在、网络失败时只记录延后状态,不影响其它宿主和当前任务。
68
+
69
+ ## WorkBuddy / CodeBuddy 原生插件
70
+
71
+ 包根同时包含 `.workbuddy-plugin/`、`.codebuddy-plugin/`、`.mcp.json` 和全部 `skills/`。运行 `microi plugin path --json` 可取得本机真实包根与清单路径,供 WorkBuddy 插件页或 CodeBuddy 本地 marketplace 导入。宿主自身的安装、启用和工作区信任仍需由用户授权,CLI 不伪造 UI 安装状态。
@@ -1,6 +1,6 @@
1
1
  {
2
- "builtAt": "2026-09-27T14:56:29.619Z",
3
- "version": "5.7.4",
2
+ "builtAt": "2026-09-30T05:07:30.024Z",
3
+ "version": "5.7.6",
4
4
  "sourceProducts": [
5
5
  "vscode-extension",
6
6
  "microi-cli",
@@ -10,10 +10,10 @@
10
10
  "commands": 55,
11
11
  "skills": 67,
12
12
  "hashes": {
13
- "mcpServer": "31ceca75e0566a2060431963e38f5045c8e4f1e311ea0b72d0d8dbbcc1124c44",
14
- "cli": "89f95c3bb4a8433788a816df70d7dbc3a7620ba754465953ceffd0f2d3d7563a",
15
- "router": "ffc14787fc2d3d6173b7a779b77139b759eb1d482cea787f71283f4017a4e223",
16
- "broker": "9c5f895788279f1b73afcb135bfa459f2089e652bab9c7eb8a2103bedcf82197",
17
- "dshBundle": "edbb9e589b5cc58a6bc78699d250384e6bf8b934d369c5ff0f13d915f4c94d62"
13
+ "mcpServer": "d3ca0608d91040cbcc5867ffc3dfb2bfb167803a1ce9585bdaa12f1074ee7502",
14
+ "cli": "bd1adffcb4dfd430780c5424a1587f6f07fb6027b525634e7172c70f70214931",
15
+ "router": "1cb624a05b38ea717601b4dc678426840fbd39220014fc5316f09f2e6b50f733",
16
+ "broker": "fffe3a7bbbc0c842d69c2eda09a0490ce0055a060f56d6a6d6230046e8952749",
17
+ "dshBundle": "c35755bb2bbef613d4684299c75966cb2a0f89cd0e05775579aa175bfe724971"
18
18
  }
19
19
  }
package/cordis.patch.yml CHANGED
@@ -1,4 +1,4 @@
1
- # Generated from Microi.Code/codex/src/microi-dsh-profile-bootstrap.js.
1
+ # Generated from Microi.Agent/codex/src/microi-dsh-profile-bootstrap.js.
2
2
  # Installed by: dsh plugin --profile <name> add @microi.net/cli
3
3
  - insert:
4
4
  - id: microi-mcp
@@ -7,7 +7,7 @@
7
7
  serverName: microi
8
8
  transport: stdio
9
9
  command: !!js process.execPath
10
- args: ["-e","/*\n * DeepSeek Harness 通过 profile bundle 加载此 `node -e` 引导脚本。\n * DSH 不保证 MCP 子进程 cwd 位于 npm 包根,因此按 DSH_HOME/profile 定位\n * 当前版本的 @microi.net/cli,再复用 Codex 同源适配器与多连接路由器。\n */\nconst fs = require('node:fs');\nconst os = require('node:os');\nconst path = require('node:path');\nconst packageName = '@microi.net/cli';\nconst expectedVersion = '5.7.4';\n\nfunction readJson(filePath) {\n try { return JSON.parse(fs.readFileSync(filePath, 'utf8')); }\n catch { return undefined; }\n}\n\nfunction expandHome(value) {\n if (value === '~') return os.homedir();\n if (value.startsWith('~/') || value.startsWith('~\\\\')) return path.join(os.homedir(), value.slice(2));\n return value;\n}\n\nfunction validRoot(value) {\n const root = path.resolve(value);\n const pkg = readJson(path.join(root, 'package.json'));\n const patch = path.join(root, 'cordis.patch.yml');\n const adapter = path.join(root, 'scripts', 'mcp-codex-stdio-adapter.js');\n const router = path.join(root, 'scripts', 'microi-codex-router.js');\n if (pkg?.name !== packageName || pkg?.version !== expectedVersion) return undefined;\n if (pkg?.dsh?.bundle?.patch !== './cordis.patch.yml') return undefined;\n if (![patch, adapter, router].every(filePath => fs.existsSync(filePath))) return undefined;\n return { root: fs.realpathSync(root), adapter, router, modifiedAt: fs.statSync(router).mtimeMs };\n}\n\nfunction findPlugin() {\n const explicit = String(process.env.MICROI_DSH_PLUGIN_ROOT || '').trim();\n if (explicit) {\n const plugin = validRoot(explicit);\n if (!plugin) throw new Error(`MICROI_DSH_PLUGIN_ROOT 不是版本 ${expectedVersion} 的有效 Microi DSH bundle:${explicit}`);\n return plugin;\n }\n const configuredHome = String(process.env.DSH_HOME || '').trim();\n const dshHome = path.resolve(expandHome(configuredHome || path.join(os.homedir(), '.dsh')));\n const profilesRoot = path.join(dshHome, 'profiles');\n const candidates = [];\n if (fs.existsSync(profilesRoot)) {\n for (const entry of fs.readdirSync(profilesRoot, { withFileTypes: true })) {\n if (!entry.isDirectory() || entry.name === 'node_modules') continue;\n const root = path.join(profilesRoot, entry.name, 'node_modules', '@microi.net', 'cli');\n const plugin = validRoot(root);\n if (plugin) candidates.push(plugin);\n }\n }\n candidates.sort((left, right) => right.modifiedAt - left.modifiedAt);\n if (!candidates[0]) throw new Error(`未在 ${profilesRoot} 找到版本 ${expectedVersion} 的 ${packageName}`);\n return candidates[0];\n}\n\ntry {\n const plugin = findPlugin();\n process.env.MICROI_DSH_PLUGIN_ROOT = plugin.root;\n process.env.MICROI_CODEX_PLUGIN_ROOT = plugin.root;\n process.env.MICROI_TOOL_SOURCE = 'dsh';\n process.env.MICROI_TOOL_VERSION = expectedVersion;\n process.env.MICROI_WORKSPACE_ROOT = process.env.MICROI_WORKSPACE_ROOT || process.cwd();\n process.argv[2] = plugin.router;\n require(plugin.adapter);\n} catch (error) {\n console.error(`[microi-dsh-bootstrap] ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n}\n"]
10
+ args: ["-e","/*\n * DeepSeek Harness 通过 profile bundle 加载此 `node -e` 引导脚本。\n * DSH 不保证 MCP 子进程 cwd 位于 npm 包根,因此按 DSH_HOME/profile 定位\n * 当前版本的 @microi.net/cli,再复用 Codex 同源适配器与多连接路由器。\n */\nconst fs = require('node:fs');\nconst os = require('node:os');\nconst path = require('node:path');\nconst packageName = '@microi.net/cli';\nconst expectedVersion = '5.7.6';\n\nfunction readJson(filePath) {\n try { return JSON.parse(fs.readFileSync(filePath, 'utf8')); }\n catch { return undefined; }\n}\n\nfunction expandHome(value) {\n if (value === '~') return os.homedir();\n if (value.startsWith('~/') || value.startsWith('~\\\\')) return path.join(os.homedir(), value.slice(2));\n return value;\n}\n\nfunction validRoot(value) {\n const root = path.resolve(value);\n const pkg = readJson(path.join(root, 'package.json'));\n const patch = path.join(root, 'cordis.patch.yml');\n const adapter = path.join(root, 'scripts', 'mcp-codex-stdio-adapter.js');\n const router = path.join(root, 'scripts', 'microi-codex-router.js');\n if (pkg?.name !== packageName || pkg?.version !== expectedVersion) return undefined;\n if (pkg?.dsh?.bundle?.patch !== './cordis.patch.yml') return undefined;\n if (![patch, adapter, router].every(filePath => fs.existsSync(filePath))) return undefined;\n return { root: fs.realpathSync(root), adapter, router, modifiedAt: fs.statSync(router).mtimeMs };\n}\n\nfunction findPlugin() {\n const explicit = String(process.env.MICROI_DSH_PLUGIN_ROOT || '').trim();\n if (explicit) {\n const plugin = validRoot(explicit);\n if (!plugin) throw new Error(`MICROI_DSH_PLUGIN_ROOT 不是版本 ${expectedVersion} 的有效 Microi DSH bundle:${explicit}`);\n return plugin;\n }\n const configuredHome = String(process.env.DSH_HOME || '').trim();\n const dshHome = path.resolve(expandHome(configuredHome || path.join(os.homedir(), '.dsh')));\n const profilesRoot = path.join(dshHome, 'profiles');\n const candidates = [];\n if (fs.existsSync(profilesRoot)) {\n for (const entry of fs.readdirSync(profilesRoot, { withFileTypes: true })) {\n if (!entry.isDirectory() || entry.name === 'node_modules') continue;\n const root = path.join(profilesRoot, entry.name, 'node_modules', '@microi.net', 'cli');\n const plugin = validRoot(root);\n if (plugin) candidates.push(plugin);\n }\n }\n candidates.sort((left, right) => right.modifiedAt - left.modifiedAt);\n if (!candidates[0]) throw new Error(`未在 ${profilesRoot} 找到版本 ${expectedVersion} 的 ${packageName}`);\n return candidates[0];\n}\n\ntry {\n const plugin = findPlugin();\n process.env.MICROI_DSH_PLUGIN_ROOT = plugin.root;\n process.env.MICROI_CODEX_PLUGIN_ROOT = plugin.root;\n process.env.MICROI_TOOL_SOURCE = 'dsh';\n process.env.MICROI_TOOL_VERSION = expectedVersion;\n process.env.MICROI_WORKSPACE_ROOT = process.env.MICROI_WORKSPACE_ROOT || process.cwd();\n process.argv[2] = plugin.router;\n require(plugin.adapter);\n} catch (error) {\n console.error(`[microi-dsh-bootstrap] ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n}\n"]
11
11
  env:
12
12
  MICROI_TOOL_SOURCE: dsh
13
13
  cwd: !!js process.cwd()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microi.net/cli",
3
- "version": "5.7.4",
3
+ "version": "5.7.6",
4
4
  "description": "Microi吾码 AI 开发 CLI 与多宿主 Plugin:服务器连接、Skills、MCP、V8 同步和低代码交付",
5
5
  "license": "MIT",
6
6
  "homepage": "https://microi.net/doc/v8-engine/vs-code-plugin.html",