@microi.net/cli 4.8.1 → 4.8.2

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,18 @@
1
+ {
2
+ "name": "microi-net",
3
+ "owner": {
4
+ "name": "Microi.Net",
5
+ "url": "https://microi.net"
6
+ },
7
+ "description": "Microi吾码官方 AI 插件市场",
8
+ "version": "4.8.2",
9
+ "plugins": [
10
+ {
11
+ "name": "microi",
12
+ "source": ".",
13
+ "description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
14
+ "version": "4.8.2",
15
+ "strict": true
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "microi",
3
+ "version": "4.8.2",
4
+ "description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
5
+ "author": {
6
+ "name": "Microi.Net",
7
+ "url": "https://microi.net"
8
+ },
9
+ "homepage": "https://microi.net/doc/v8-engine/vs-code-plugin.html",
10
+ "repository": "https://git.itdos.net:88/anderson/microi.vscode.git",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "microi",
14
+ "吾码",
15
+ "mcp",
16
+ "skills",
17
+ "v8",
18
+ "low-code"
19
+ ],
20
+ "skills": "./skills/",
21
+ "mcpServers": "./.mcp.json"
22
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microi",
3
- "version": "4.8.1",
3
+ "version": "4.8.2",
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 0.136 仍不会把 plugin .mcp.json 的相对路径定位到插件根,\n * 也不会展开 ${PLUGIN_ROOT}。本脚本作为 `node -e` 内容运行,只在 Codex\n * 官方 plugin cache 中查找经过 manifest/package 双重校验的 Microi 包。\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 explicit = String(process.env.MICROI_CODEX_PLUGIN_ROOT || '').trim();\n if (explicit) {\n const validated = validPluginRoot(path.resolve(explicit));\n if (!validated) throw new Error(`MICROI_CODEX_PLUGIN_ROOT 不是有效的 Microi Codex 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 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"
8
8
  ]
9
9
  }
10
10
  }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "microi-net",
3
+ "owner": {
4
+ "name": "Microi.Net",
5
+ "url": "https://microi.net"
6
+ },
7
+ "description": "Microi吾码官方 AI 插件市场",
8
+ "version": "4.8.2",
9
+ "plugins": [
10
+ {
11
+ "name": "microi",
12
+ "source": ".",
13
+ "description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
14
+ "version": "4.8.2",
15
+ "strict": true
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "microi",
3
+ "version": "4.8.2",
4
+ "description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
5
+ "author": {
6
+ "name": "Microi.Net",
7
+ "url": "https://microi.net"
8
+ },
9
+ "homepage": "https://microi.net/doc/v8-engine/vs-code-plugin.html",
10
+ "repository": "https://git.itdos.net:88/anderson/microi.vscode.git",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "microi",
14
+ "吾码",
15
+ "mcp",
16
+ "skills",
17
+ "v8",
18
+ "low-code"
19
+ ],
20
+ "skills": "./skills/",
21
+ "mcpServers": "./.mcp.json"
22
+ }
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # @microi.net/cli — Microi吾码 CLI + Codex Plugin
1
+ # @microi.net/cli — Microi吾码 CLI + 多宿主 AI Plugin
2
2
 
3
3
  `@microi.net/cli` 是 Microi吾码唯一的 AI/npm 产品,同时提供:
4
4
 
5
5
  - 全局命令 `microi`;
6
- - 可由 npm marketplace 安装的 Codex Plugin;
6
+ - Codex Plugin,以及 WorkBuddy/CodeBuddy 兼容 plugin 与 marketplace 清单;
7
7
  - 与 Microi.VSCode 同源的 MCP Server、连接/Token/同步协议;
8
8
  - 支持多服务器、租户、产品类型和网络环境的 `microi_codex` 路由;
9
9
  - 全套 Microi Skills 与 VS Code 命令覆盖矩阵。
@@ -21,7 +21,15 @@ microi init --workspace <工作区> --pull
21
21
  npx --yes @microi.net/cli@latest init --workspace <工作区> --pull
22
22
  ```
23
23
 
24
- 命令会引导添加服务器、登录、生成 AI 指令/Skills/类型提示并配置 MCP;密码仅在当前进程中隐式输入,不写入命令参数或配置文件。
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。当前会话不支持热加载时需重载或新建任务。
25
33
 
26
34
  ## 安装 Codex Plugin
27
35
 
@@ -33,3 +41,7 @@ microi codex install --yes
33
41
  marketplace 固定为 `microi-net`,插件选择器固定为 `microi@microi-net`。安装器会迁移旧的 `microi-official` 标识,以及曾指向 `@microi.net/codex-plugin` 的吾码 marketplace 文件。安装完成后新建 Codex 任务或重载 Codex,使 Skills 与 MCP 生效。
34
42
 
35
43
  本 npm 包根目录本身就是有效的 Codex Plugin。发布到 npm 只完成 CLI/npm marketplace 分发,不代表已经进入 ChatGPT/Codex 通用公开插件目录;公开目录仍需按 OpenAI 官方流程提交审核。
44
+
45
+ ## WorkBuddy / CodeBuddy 原生插件
46
+
47
+ 包根同时包含 `.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-08-08T11:14:53.869Z",
3
- "version": "4.8.1",
2
+ "builtAt": "2026-08-08T11:49:32.062Z",
3
+ "version": "4.8.2",
4
4
  "sourceProducts": [
5
5
  "vscode-extension",
6
6
  "microi-cli",
@@ -10,7 +10,7 @@
10
10
  "skills": 60,
11
11
  "hashes": {
12
12
  "mcpServer": "465860a017ea578f5b1cc8d9515ee1011cd2b42633c5d46bb8eb14cd45a0677e",
13
- "cli": "96cddc77e3dcb17e069345f359deb2cb6cf42dac6de942d2d2a331de1436cee7",
13
+ "cli": "f58f8f8aa76b5561e6cad4822e2f5cc9bba33260585b8cd9b0c8bd71b76d7cf5",
14
14
  "router": "0438d370f676410dcade8fe34f8511da8a0843d18121adeafaab0a991d7069a5"
15
15
  }
16
16
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@microi.net/cli",
3
- "version": "4.8.1",
4
- "description": "Microi吾码 AI 开发 CLI Codex Plugin:服务器连接、Skills、MCP、V8 同步和低代码交付",
3
+ "version": "4.8.2",
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",
7
7
  "repository": {
@@ -14,6 +14,10 @@
14
14
  "吾码",
15
15
  "cli",
16
16
  "codex-plugin",
17
+ "workbuddy-plugin",
18
+ "codebuddy-plugin",
19
+ "qoder",
20
+ "comate",
17
21
  "mcp",
18
22
  "skills",
19
23
  "low-code",
@@ -25,6 +29,8 @@
25
29
  },
26
30
  "files": [
27
31
  ".codex-plugin/",
32
+ ".codebuddy-plugin/",
33
+ ".workbuddy-plugin/",
28
34
  ".mcp.json",
29
35
  "assets/",
30
36
  "skills/",
@@ -9,7 +9,7 @@
9
9
  "source": {
10
10
  "source": "npm",
11
11
  "package": "@microi.net/cli",
12
- "version": "4.8.1",
12
+ "version": "4.8.2",
13
13
  "registry": "https://registry.npmjs.org"
14
14
  },
15
15
  "policy": {