@microi.net/cli 5.8.3 → 5.8.5
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.
- package/.codebuddy-plugin/marketplace.json +2 -2
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.workbuddy-plugin/marketplace.json +2 -2
- package/.workbuddy-plugin/plugin.json +1 -1
- package/assets/build-meta.json +6 -6
- package/cordis.patch.yml +1 -1
- package/package.json +1 -1
- package/scripts/mcp-server.js +6 -1
- package/scripts/microi-cli.js +2 -2
- package/scripts/microi-codex-router.js +39 -3
- package/scripts/microi-skills.meta.json +265 -265
- package/skills/.microi-skills-version.json +2 -2
- package/skills/.progressive-disclosure-manifest.json +73 -73
- package/skills/ai-engine/SKILL.md +1 -1
- package/skills/ai-platform-governance/SKILL.md +1 -1
- package/skills/app-store/SKILL.md +9 -1
- package/skills/business-blueprint/SKILL.md +1 -1
- package/skills/datasource-engine/SKILL.md +1 -1
- package/skills/dos-orm/SKILL.md +1 -1
- package/skills/email-engine/SKILL.md +1 -1
- package/skills/job-engine/SKILL.md +1 -1
- package/skills/message-notification/SKILL.md +1 -1
- package/skills/microi/SKILL.md +1 -1
- package/skills/microi-ai-application/SKILL.md +1 -1
- package/skills/microi-client-frontend/SKILL.md +1 -1
- package/skills/microi-codex/SKILL.md +8 -0
- package/skills/microi-codex-installer/SKILL.md +5 -1
- package/skills/microi-datasource-mapping/SKILL.md +1 -1
- package/skills/microi-db-schema/SKILL.md +1 -1
- package/skills/microi-deployment/SKILL.md +1 -1
- package/skills/microi-docs-coverage/SKILL.md +1 -1
- package/skills/microi-form-engine/SKILL.md +1 -1
- package/skills/microi-form-layout/SKILL.md +1 -1
- package/skills/microi-frontend-sdk/SKILL.md +1 -1
- package/skills/microi-left-right-layout/SKILL.md +1 -1
- package/skills/microi-microservice/SKILL.md +1 -1
- package/skills/microi-mobile-app-quality/SKILL.md +1 -1
- package/skills/microi-solution-quotation/SKILL.md +1 -1
- package/skills/microi-sso/SKILL.md +1 -1
- package/skills/microi-system-delivery/SKILL.md +1 -1
- package/skills/microi-ui/SKILL.md +1 -1
- package/skills/microi-uniapp-frontend/SKILL.md +1 -1
- package/skills/module-engine/SKILL.md +1 -1
- package/skills/ocr-engine/SKILL.md +1 -1
- package/skills/page-engine/SKILL.md +1 -1
- package/skills/performance-testing/SKILL.md +1 -1
- package/skills/playwright-e2e/SKILL.md +1 -1
- package/skills/print-engine/SKILL.md +1 -1
- package/skills/production-readonly-audit/SKILL.md +1 -1
- package/skills/report-engine/SKILL.md +1 -1
- package/skills/search-engine/SKILL.md +1 -1
- package/skills/spider-engine/SKILL.md +1 -1
- package/skills/system-observability/SKILL.md +1 -1
- package/skills/translate-engine/SKILL.md +1 -1
- package/skills/ui-design/SKILL.md +1 -1
- package/skills/uniapp-mall-assets/SKILL.md +1 -1
- package/skills/unity-integration/SKILL.md +1 -1
- package/skills/v8-api-config/SKILL.md +1 -1
- package/skills/v8-cache-pattern/SKILL.md +7 -1
- package/skills/v8-crud-api/SKILL.md +1 -1
- package/skills/v8-debugging/SKILL.md +1 -1
- package/skills/v8-explorer-tree/SKILL.md +1 -1
- package/skills/v8-export-import/SKILL.md +1 -1
- package/skills/v8-file-upload/SKILL.md +3 -3
- package/skills/v8-file-upload/references/progressive-01-/345/205/254/346/234/211/346/241/266-vs-/347/247/201/346/234/211/346/241/266.md +7 -1
- package/skills/v8-formengine-http/SKILL.md +1 -1
- package/skills/v8-frontend-events/SKILL.md +1 -1
- package/skills/v8-http-integration/SKILL.md +1 -1
- package/skills/v8-image-processing/SKILL.md +1 -1
- package/skills/v8-menu-buttons/SKILL.md +1 -1
- package/skills/v8-mongodb/SKILL.md +1 -1
- package/skills/v8-mq-mqtt/SKILL.md +1 -1
- package/skills/v8-saas-multi-tenant/SKILL.md +29 -2
- package/skills/v8-security/SKILL.md +1 -1
- package/skills/v8-sql-query/SKILL.md +1 -1
- package/skills/v8-table-event/SKILL.md +1 -1
- package/skills/v8-tcp-integration/SKILL.md +1 -1
- package/skills/v8-template-engine/SKILL.md +1 -1
- package/skills/v8-utilities/SKILL.md +1 -1
- package/skills/v8-workflow/SKILL.md +1 -1
- package/skills/vision-engine/SKILL.md +1 -1
- package/skills/workspace-conventions/SKILL.md +6 -3
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
"url": "https://microi.net"
|
|
6
6
|
},
|
|
7
7
|
"description": "Microi吾码官方 AI 插件市场",
|
|
8
|
-
"version": "5.8.
|
|
8
|
+
"version": "5.8.5",
|
|
9
9
|
"plugins": [
|
|
10
10
|
{
|
|
11
11
|
"name": "microi",
|
|
12
12
|
"source": ".",
|
|
13
13
|
"description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
|
|
14
|
-
"version": "5.8.
|
|
14
|
+
"version": "5.8.5",
|
|
15
15
|
"strict": true
|
|
16
16
|
}
|
|
17
17
|
]
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
"url": "https://microi.net"
|
|
6
6
|
},
|
|
7
7
|
"description": "Microi吾码官方 AI 插件市场",
|
|
8
|
-
"version": "5.8.
|
|
8
|
+
"version": "5.8.5",
|
|
9
9
|
"plugins": [
|
|
10
10
|
{
|
|
11
11
|
"name": "microi",
|
|
12
12
|
"source": ".",
|
|
13
13
|
"description": "Microi吾码 AI 开发插件:服务器连接、Skills、MCP、V8 全量同步与低代码交付",
|
|
14
|
-
"version": "5.8.
|
|
14
|
+
"version": "5.8.5",
|
|
15
15
|
"strict": true
|
|
16
16
|
}
|
|
17
17
|
]
|
package/assets/build-meta.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"builtAt": "2026-10-
|
|
3
|
-
"version": "5.8.
|
|
2
|
+
"builtAt": "2026-10-08T15:41:24.762Z",
|
|
3
|
+
"version": "5.8.5",
|
|
4
4
|
"sourceProducts": [
|
|
5
5
|
"vscode-extension",
|
|
6
6
|
"microi-cli",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"commands": 55,
|
|
11
11
|
"skills": 68,
|
|
12
12
|
"hashes": {
|
|
13
|
-
"mcpServer": "
|
|
14
|
-
"cli": "
|
|
15
|
-
"router": "
|
|
13
|
+
"mcpServer": "ccc7697b5032db3ceb2851066cb5871515fae5d22348891f3f1d65dfd9d4eab1",
|
|
14
|
+
"cli": "b9ac4c15cb0a8f27a578b6fa4e1c59eb6620e3fec4e1c767dbc47612ddb75a51",
|
|
15
|
+
"router": "ffe2c1fd90f966da07b936e10cd2c4da7106d960b38f71a5c5721e58fa45299e",
|
|
16
16
|
"broker": "e4f21ac938950af5a446a2f5f39acc6e6e73535eab6e644fac6e04e73c4069e9",
|
|
17
|
-
"dshBundle": "
|
|
17
|
+
"dshBundle": "343fbe1c839863fdd6cb505bb61c5055b8196fc23da66e3214d6f46b5234547a"
|
|
18
18
|
}
|
|
19
19
|
}
|
package/cordis.patch.yml
CHANGED
|
@@ -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.8.
|
|
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.8.5';\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
package/scripts/mcp-server.js
CHANGED
|
@@ -259,6 +259,11 @@ ${e}`).digest("hex").slice(0,46)}`}function Mte(t,e){if(t.Code!==1)throw new Err
|
|
|
259
259
|
- API Server: ${t.apiBaseUrl}
|
|
260
260
|
- OsClient (tenant): ${t.osClient}
|
|
261
261
|
|
|
262
|
+
## Microi\u543E\u7801\u57FA\u7840\u89C4\u8303\uFF08\u4EFB\u4F55 AI \u6A21\u578B\u5F3A\u5236\u8BFB\u53D6\uFF09
|
|
263
|
+
\u6BCF\u6B21\u65B0\u5EFA\u6216\u63A5\u7EED\u543E\u7801\u4EFB\u52A1\uFF0C\u5FC5\u987B\u5148\u5B8C\u6574\u8BFB\u53D6\u5DE5\u4F5C\u533A microi.skills/workspace-conventions/SKILL.md\uFF1B\u672A\u521D\u59CB\u5316\u65F6\u8BFB\u53D6\u5DF2\u5B89\u88C5\u543E\u7801\u63D2\u4EF6\u4E2D\u7684 skills/workspace-conventions/SKILL.md\u3002\u8FDB\u5EA6\u64AD\u62A5\u548C\u975E\u963B\u585E\u81EA\u52A8\u66F4\u65B0\u90FD\u662F\u65E0\u6761\u4EF6\u57FA\u7840\u89C4\u5219\uFF0C\u4E0D\u80FD\u7B49\u7528\u6237\u63D0\u9192\u3002
|
|
264
|
+
\u9996\u6B21\u5DE5\u4F5C\u8BF4\u660E\u4EE5\u201CMicroi\u543E\u7801\u5F00\u53D1\u5DE5\u5177\u7248\u672C\u201D\u62A5\u544A\u5B9E\u9645 CLI \u7248\u672C\u3001npm \u5B98\u65B9 latest\uFF08\u9644\u67E5\u8BE2\u65F6\u95F4\uFF09\u3001\u81EA\u52A8\u66F4\u65B0\u4E0E Skills/MCP \u540C\u6B65\u72B6\u6001\uFF1B\u7528 microi version --json \u56DE\u8BFB CLI\uFF0C\u7528 npm \u5B98\u65B9 registry \u67E5\u8BE2 latest\u3002\u672A\u77E5\u9879\u5199\u68C0\u6D4B\u4E2D\uFF0C\u4E0D\u5F97\u628A\u672C MCP \u534F\u8BAE\u7248\u672C\u6216 expectedVersion \u5F53\u6210 CLI/npm \u6700\u65B0\u7248\u3002
|
|
265
|
+
\u5DF2\u6709 CLI \u65F6\u5FC5\u987B\u6295\u9012 microi update --background --workspace "<\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84>" --json\uFF0C\u81EA\u52A8\u5347\u7EA7 @microi.net/cli \u5E76\u540C\u6B65 Skills\u3001AI \u89C4\u5219\u548C MCP\u3002\u66F4\u65B0\u5931\u8D25\u5EF6\u540E\u91CD\u8BD5\u5E76\u51C6\u786E\u62A5\u544A\uFF0C\u4E0D\u963B\u65AD\u5F53\u524D\u5DE5\u4F5C\u3001\u4E0D\u5F3A\u5236\u91CD\u8F7D\u3001\u4E0D\u7EC8\u6B62\u6B63\u5728\u8FD0\u884C\u7684 MCP\uFF1B\u7528\u6237\u660E\u786E\u5173\u95ED\u6216\u5BBF\u4E3B\u65E0\u6267\u884C\u6743\u9650\u65F6\u62A5\u544A\u9650\u5236\uFF0C\u7B7E\u540D\u684C\u9762\u5B89\u88C5\u76EE\u5F55\u901A\u8FC7\u684C\u9762\u5B98\u65B9\u6E20\u9053\u66F4\u65B0\u3002\u5B8C\u6574\u6267\u884C\u53CA\u9A8C\u6536\u89C4\u5219\u4EE5\u57FA\u7840\u5165\u53E3\u4E3A\u51C6\u3002
|
|
266
|
+
|
|
262
267
|
IMPORTANT: This server ONLY manages OsClient tenant "${t.osClient}". "${t.label||t.osClient}" is only a display name. When the user specifies a different tenant name, do NOT use this server.
|
|
263
268
|
THIRD-PARTY SECRETS: For App Secret, client_secret, API keys or credentials such as Chanjet, FIRST inspect microi_manage_server_private_secret (List) and reuse System Settings > Security and Service Access. Save through that tool only when authorized, then read back HasSecret/IsSecret/IsEnabled. Backend V8 uses the existing protected settings capability. Do not invent environment variables, hardcode secrets, or block integration merely because the existing protected setting has not yet been populated. Never return plaintext or ciphertext values.
|
|
264
269
|
PAGE DESIGN: Dashboards default to themeMode=system, density=compact and wrapper heightMode=content. Use native summary/detail statistic appearances and platform colour variables. Match reference panel proportions and verify light/dark screenshots; do not turn one-line metrics into large fixed-height colour blocks.
|
|
@@ -610,7 +615,7 @@ ${JSON.stringify(u,null,2)}
|
|
|
610
615
|
`,"| # | Title | Number | Description | Updated |","|---|-------|--------|-------------|---------|"];return c.forEach((u,p)=>{l.push(`| ${p+1} | ${u.Title||""} | ${u.Number||""} | ${u.Desc||""} | ${u.UpdateTime||""} |`)}),{content:[{type:"text",text:l.join(`
|
|
611
616
|
`)}]}}catch(s){return{content:[{type:"text",text:`Error: ${s instanceof Error?s.message:String(s)}`}],isError:!0}}}),i.tool("microi_get_page",`Get page engine detail including full JSON configuration for OsClient "${r}". The JsonObj field contains the complete page structure with formData, wrapperList, and widgetList.`,{pageId:d.string().describe("The page Id to retrieve")},async({pageId:a})=>{try{let s=await t.getPageEngineDetail(a);if(s.Code!==1)return{content:[{type:"text",text:`Error: ${s.Msg}`}],isError:!0};let c=s.Data;return{content:[{type:"text",text:[`## Page: ${c?.Title||a}`,c?.Number?`- **Number**: ${c.Number}`:"",c?.Desc?`- **Description**: ${c.Desc}`:"","","### JSON Configuration","```json",typeof c?.JsonObj=="string"?c.JsonObj:JSON.stringify(c?.JsonObj,null,2),"```"].filter(Boolean).join(`
|
|
612
617
|
`)}]}}catch(s){return{content:[{type:"text",text:`Error: ${s instanceof Error?s.message:String(s)}`}],isError:!0}}}),i.tool("microi_save_page",`Create or update a page engine page for OsClient "${r}". Accepts raw JsonObj, {JsonObj}, {JsonStr}, a mic_page row, or {formData:{JsonObj}} and normalizes it to the canonical JsonObj saved in mic_page.JsonObj. Pass pageId to update an existing page, or omit to create a new one.`,{pageId:d.string().optional().describe("Page Id to update. Omit to create a new page."),title:d.string().describe('Page title (e.g. "\u9500\u552E\u4EEA\u8868\u76D8", "\u6570\u636E\u6982\u89C8")'),number:d.string().optional().describe("Page number/code (auto-generated if omitted)"),desc:d.string().optional().describe("Page description"),jsonStr:d.string().optional().describe("Page Engine JsonObj string. Prefer json for object input."),json:d.unknown().optional().describe("Page Engine JSON object/string in any common AI output shape."),routePath:d.string().optional().describe("Optional route path saved to mic_page.RoutePath."),componentPath:d.string().optional().describe("Optional component path saved to mic_page.ComponentPath.")},async({pageId:a,title:s,number:c,desc:l,jsonStr:u,json:p,routePath:f,componentPath:m})=>{try{let h=ti(p??u);if(!h.ok||!h.json)return{content:[{type:"text",text:JSON.stringify(h,null,2)}],isError:!0};let g=await t.savePageEngine({PageId:a,Title:s,Number:c,Desc:l,JsonStr:h.json,RoutePath:f,ComponentPath:m});if(g.Code!==1)return{content:[{type:"text",text:`Error: ${g.Msg}`}],isError:!0};let y=g.Data;return{content:[{type:"text",text:`\u2705 ${y?.Message||"Page saved successfully."}
|
|
613
|
-
- PageId: ${y?.PageId}`}]}}catch(h){return{content:[{type:"text",text:`Error: ${h instanceof Error?h.message:String(h)}`}],isError:!0}}}),i.tool("microi_list_applications",`List every online AI application for OsClient "${r}" across Web, UniApp and MicroService, including each app's complete source-file manifest by default. AI agents should call this at the beginning of application/page work so they understand existing apps before creating duplicates. For complex custom dialogs/pages, prefer extending an existing MicroService or creating one with microi_create_microservice + microi_sync_microservice_source; do not embed large HTML in V8.ConfirmTips.`,{appType:d.enum(["Web","UniApp","MicroService"]).optional().describe("Optional exact application type filter."),keyword:d.string().optional().describe("Optional case-insensitive search across name, AppKey, type and description."),includeFiles:d.boolean().optional().default(!0).describe("Include the complete file manifest for every app. Defaults to true.")},async({appType:a,keyword:s,includeFiles:c})=>{try{let l=await t.listApplications({AppType:a,Keyword:s,IncludeFiles:c!==!1});return l.Code!==1?{content:[{type:"text",text:`Error: ${l.Msg}`}],isError:!0}:{content:[{type:"text",text:JSON.stringify(l.Data,null,2)}]}}catch(l){return{content:[{type:"text",text:`Error: ${l instanceof Error?l.message:String(l)}`}],isError:!0}}}),i.tool("microi_get_application_context",`Get one Web, UniApp or MicroService application by Id/AppKey for OsClient "${r}". It returns metadata and the full file manifest by default without embedding source bodies; set includeContents=true only when the complete source is actually needed, or use microi_get_application_file for one exact file. MicroService responses also include sys_microiservice runtime/pages.`,{appIdOrKey:d.string().describe("sys_microistore.Id or AppKey."),includeContents:d.boolean().optional().default(!1).describe("Read private HDFS source contents. Defaults to false; prefer microi_get_application_file for targeted reads."),maxFileBytes:d.number().int().positive().optional().describe("Maximum bytes read per source file. Default 2MB."),maxTotalBytes:d.number().int().positive().optional().describe("Maximum total bytes read for this app. Default 50MB.")},async({appIdOrKey:a,includeContents:s,maxFileBytes:c,maxTotalBytes:l})=>{try{let u=await t.getApplicationContext({AppIdOrKey:a,IncludeContents:s===!0,...c?{MaxFileBytes:c}:{},...l?{MaxTotalBytes:l}:{}});if(u.Code!==1)return{content:[{type:"text",text:`Error: ${u.Msg}`}],isError:!0};let p=u.Data,m=(Array.isArray(p?.Files)?p.Files:[]).filter(g=>typeof g?.ContentReadError=="string"&&g.ContentReadError).length,h={...p,McpReadSummary:{RequestedContents:s===!0,ContentsComplete:s!==!0||m===0,ContentErrorCount:m}};return{content:[{type:"text",text:JSON.stringify(h,null,2)}]}}catch(u){return{content:[{type:"text",text:`Error: ${u instanceof Error?u.message:String(u)}`}],isError:!0}}}),i.tool("microi_get_application_file",`Read one exact source file from a Web, UniApp or MicroService online AI application for OsClient "${r}". Text code is returned as UTF-8 Content; binary files are returned as FileByteBase64.`,{appIdOrKey:d.string().describe("sys_microistore.Id or AppKey."),filePath:d.string().describe("Exact relative source path from the application file manifest."),maxFileBytes:d.number().int().positive().optional().describe("Maximum bytes read. Default 10MB.")},async({appIdOrKey:a,filePath:s,maxFileBytes:c})=>{try{let l=await t.getApplicationFile({AppIdOrKey:a,FilePath:s,IncludeContents:!0,...c?{MaxFileBytes:c}:{}});return l.Code!==1?{content:[{type:"text",text:`Error: ${l.Msg}`}],isError:!0}:{content:[{type:"text",text:JSON.stringify(l.Data,null,2)}]}}catch(l){return{content:[{type:"text",text:`Error: ${l instanceof Error?l.message:String(l)}`}],isError:!0}}}),i.tool("microi_scaffold_vue_microservice",`Create a safe, maintainable MicroService scaffold for OsClient "${r}" using the stable Vue 3.5.40 + Vite 7.3.6 + TypeScript 5.9.3 baseline, @vitejs/plugin-vue 6.0.8, vue-tsc 3.3.9, Composition API and <script setup lang="ts">. The minimal template keeps Microi SDK and host/internal-route integration but does not force Pinia or Vue Router; add either only when application complexity needs it. It writes .microi-micro-app.json, microi.routes.json and exactly one Vue component per declared route inside the local tenant AI\u5E94\u7528 directory. It only accepts a real absolute directory whose basename is AI\u5E94\u7528, never overwrites a different existing project, and performs a dry run until confirmExecution exactly equals appKey. After scaffolding, run npm install and npm run build, then use microi_create_microservice, microi_sync_microservice_source and microi_publish_application_directory_stream (or the legacy publisher for a tiny compatibility payload).`,{appKey:d.string().regex(/^[a-z0-9](?:[a-z0-9_-]{0,62}[a-z0-9])?$/u).describe("Stable lowercase application key and local directory name."),name:d.string().min(1).max(120).describe("Human-readable MicroService name."),description:d.string().optional().describe("Optional application description."),aiApplicationsDirectory:d.string().optional().describe("Absolute tenant AI\u5E94\u7528 directory. Defaults to MICROI_AI_APPLICATIONS_DIR injected by Microi.Agent."),buildVersion:d.string().regex(/^v\d+\.\d+\.\d+$/u).optional().default("v0.1.0").describe("Initial semantic build version. Default v0.1.0."),routes:d.array(d.object({path:d.string().describe("Internal route path such as /context-test."),name:d.string().describe("Stable route key such as context-test."),title:d.string().describe("Page/menu title."),description:d.string().optional().describe("Optional visible page explanation."),isHome:d.boolean().optional().describe("Mark one route as the default page. The first route is used when omitted.")})).min(1).max(50).describe("Vue pages and MicroService internal routes. One .vue file is generated per item."),confirmExecution:d.string().optional().describe("Required for filesystem writes and must exactly equal appKey. Omit for a local preflight only.")},async({appKey:a,name:s,description:c,aiApplicationsDirectory:l,buildVersion:u,routes:p,confirmExecution:f})=>{try{let m=String(l||process.env.MICROI_AI_APPLICATIONS_DIR||"").trim();if(!m)return{content:[{type:"text",text:"Error: \u7F3A\u5C11 AI \u5E94\u7528\u76EE\u5F55\u3002\u8BF7\u7531 Microi.Agent \u6CE8\u5165 MICROI_AI_APPLICATIONS_DIR\uFF0C\u6216\u663E\u5F0F\u4F20\u5165 aiApplicationsDirectory\u3002"}],isError:!0};if(f&&f!==a)return{content:[{type:"text",text:`Error: confirmExecution \u5FC5\u987B\u7CBE\u786E\u7B49\u4E8E ${a}`}],isError:!0};let h={aiApplicationsDirectory:m,appKey:a,name:s,description:c,apiBaseUrl:e.apiBaseUrl,osClient:r,buildVersion:u,routes:p,sdkSource:RO(process.env.MICROI_WORKSPACE_ROOT)},g=xw(h);if(f!==a)return{content:[{type:"text",text:JSON.stringify({dryRun:!0,confirmationRequired:a,targetDirectory:g.targetDirectory,appKey:g.appKey,buildVersion:g.buildVersion,routeCount:g.routes.length,routes:g.routes.map(x=>({path:x.path,name:x.name,title:x.title,sourceFile:x.sourceFile,isHome:x.isHome})),fileCount:g.files.length,files:g.files.map(x=>({Path:x.relativePath,Size:x.size,Sha256:x.sha256}))},null,2)}]};let y=PO(h);return{content:[{type:"text",text:JSON.stringify(y,null,2)}]}}catch(m){return{content:[{type:"text",text:`Error: ${m instanceof Error?m.message:String(m)}`}],isError:!0}}}),i.tool("microi_get_microservice",`Get one Microi microservice / micro-app by MsKey for OsClient "${r}". Use this before publishing to inspect current BuildVersion, EntryPath and asset manifest.`,{msKey:d.string().describe("Microservice key, stored in sys_microiservice.MsKey")},async({msKey:a})=>{try{let s=await t.getMicroService(a);return s.Code!==1?{content:[{type:"text",text:`Error: ${s.Msg}`}],isError:!0}:{content:[{type:"text",text:JSON.stringify(s.Data,null,2)}]}}catch(s){return{content:[{type:"text",text:`Error: ${s instanceof Error?s.message:String(s)}`}],isError:!0}}}),i.tool("microi_create_microservice",`Create or update sys_microiservice metadata for OsClient "${r}". This only writes metadata. For generated app source/dist files, use microi_publish_microservice.`,{microService:Nt.describe("Microservice metadata. Required: MsKey and MsName/Name. Optional: MsType, Runtime, StorageMode, SourceDirName, EntryPath, BuildVersion."),confirmExecution:d.string().optional().describe("Required for real writes. Pass any non-empty confirmation string after reviewing the payload.")},async({microService:a,confirmExecution:s})=>{if(!s)return{content:[{type:"text",text:JSON.stringify({dryRun:!0,microService:a},null,2)}]};try{let c=await t.createMicroService(a);return c.Code!==1?{content:[{type:"text",text:`Error: ${c.Msg}`}],isError:!0}:{content:[{type:"text",text:JSON.stringify(c.Data,null,2)}]}}catch(c){return{content:[{type:"text",text:`Error: ${c instanceof Error?c.message:String(c)}`}],isError:!0}}}),i.tool("microi_sync_microservice_source",`Sync a local Web, UniApp or MicroService source directory into the online AI Application for OsClient "${r}". Prefer directory: MCP detects SourceStreamPublish, streams each original file into the private staged prefix, then atomically finalizes the complete manifest with CurrentVersion/AppVersion/SourceManifestHash CAS. Transport failures are read back before any exact replay. Old servers use bounded legacy JSON only for at most 256 files and 8MiB. AI agents must never read large files into Base64, create .sync-seg-* files, create sync-source-files.json, or split one source file across tool calls.`,{microService:Nt.describe("Microservice metadata. Required: MsKey and MsName/Name. Optional: Description and SourceDirName."),directory:d.string().optional().describe("Preferred. Absolute local project directory; MCP reads it directly and excludes node_modules, dist, build, coverage, caches and VCS data."),sourceFiles:d.array(Nt).optional().describe("Legacy compatibility only. Do not construct this array from manually split files when a local directory is available."),replace:d.boolean().optional().describe("Complete directory sync defaults to exact private-source replacement. Explicit false is rejected by the stream protocol; public runtime/build rows are always preserved."),confirmExecution:d.string().optional().describe("Required for real writes. Pass any non-empty confirmation string after reviewing the payload.")},async({microService:a,directory:s,sourceFiles:c,replace:l,confirmExecution:u})=>Fte(t,{microService:a,directory:s,sourceFiles:c,replace:l,confirmExecution:u})),i.tool("microi_clear_application_source",`Remove an AI application's private HDFS source objects, private mci_ai_app_file rows, public SourceZip objects and source-delivery flags while preserving compiled runtime/build assets for OsClient "${r}". This is intentionally destructive and two-phase: first call without confirmExecution to obtain the exact target list and confirmationSha256, then pass that hash unchanged. Keep a verified local source checkout before executing.`,{appIdOrKey:d.string().min(1).describe("Exact AppId or AppKey. No wildcard or bulk deletion is supported."),confirmExecution:d.string().optional().describe("Exact confirmationSha256 returned by the backend dry run.")},async({appIdOrKey:a,confirmExecution:s})=>{try{let c=await t.clearApplicationSource({AppIdOrKey:a,...s?{ConfirmExecution:s}:{}});return{content:[{type:"text",text:JSON.stringify(c,null,2)}],structuredContent:c,...c.Code!==1?{isError:!0}:{}}}catch(c){return{content:[{type:"text",text:`Clear application source failed: ${c instanceof Error?c.message:String(c)}`}],isError:!0}}}),i.tool("microi_upload_application_asset_stream",`Stream one local built asset directly to the immutable HDFS version directory for OsClient "${r}". Protocol v3 uses durable HDFS multipart sessions with status readback and reconnect resume for ordinary files through multi-GiB installers; bytes are never encoded as Base64 and never enter Jint. This is a low-level primitive inside a frozen release contract; normally use microi_publish_application_directory_stream to upload and atomically promote a complete directory.`,{appIdOrKey:d.string().min(1).describe("Existing sys_microistore Id or AppKey."),versionNo:d.string().regex(/^v?\d+\.\d+\.\d+$/u).describe("Immutable semantic version, e.g. v1.2.3."),relativePath:d.string().min(1).describe("POSIX-style path inside the compiled output, e.g. assets/index-abcd.js."),localFilePath:d.string().min(1).describe("Absolute or workspace-relative path of one local ordinary file."),sha256:d.string().regex(/^[a-fA-F0-9]{64}$/u).optional().describe("Optional expected SHA-256. MCP computes and verifies it when omitted."),routes:d.array(Nt).optional().default([]).describe("Canonical v3 route snapshot input; missing routes are frozen explicitly as []."),routeSnapshotJson:d.string().max(1024*1024).optional().describe("Protocol v3 requires the exact recursive-key-sorted, array-order-preserving UTF-8 canonical JSON for routes."),routeSnapshotHash:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 requires the lowercase SHA-256 of RouteSnapshotJson."),sourceManifestHash:d.string().regex(/^[a-fA-F0-9]{64}$/u).optional().describe("Protocol v3 source-manifest SHA-256 tying this asset to the release."),runtimeManifestHash:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 exact runtime-manifest SHA-256 for the frozen release."),deliveryBatchId:d.string().min(8).max(50).optional().describe("Protocol v3 stable delivery batch id."),protocolVersion:d.literal(3).optional().describe("Enable durable v3 multipart/resume. All v3 release identity and CAS fields then become required."),expectedGateEpoch:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 gate epoch as a canonical decimal bigint string."),requestId:d.string().regex(/^[A-Za-z0-9._:-]{8,100}$/u).optional().describe("Protocol v3 stable release RequestId; every asset and stage/finalize replay must reuse it exactly."),requestFingerprint:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 immutable release fingerprint."),expectedCurrentVersion:d.number().int().min(0).optional().describe("Protocol v3 application CurrentVersion baseline."),expectedAppVersion:d.string().nullable().optional().describe("Protocol v3 application AppVersion baseline; explicit null means empty."),expectedPublishFence:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 sys_microistore.PublishFence baseline."),expectedPublishRowVersion:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 sys_microistore.PublishRowVersion baseline."),expectedVersionRowVersion:d.string().regex(/^(0|[1-9]\d*)$/u).nullable().optional().describe("Protocol v3 target version RowVersion; explicit null means absent."),expectedActivePublishVersionId:d.string().min(1).nullable().optional().describe("Protocol v3 active version id baseline; explicit null means empty."),expectedCommittedPublishVersionId:d.string().min(1).nullable().optional().describe("Protocol v3 committed version id baseline; explicit null means empty."),timeoutMs:d.number().int().min(1e3).max(2*60*6e4).optional().describe("Per-file upload timeout. Default 30 minutes; maximum 2 hours."),confirmExecution:d.string().optional().describe("Required for the real upload and must exactly equal appIdOrKey.")},async a=>Bte(t,a)),i.tool("microi_publish_application_directory_stream",`Publish a real Web, UniApp or MicroService build directory for OsClient "${r}" using deterministic RequestId evidence. Protocol v3 automatically switches files above the legacy 128 MiB request boundary to durable HDFS multipart sessions with per-part SHA-256, status readback and reconnect resume; logical files such as 5 GiB installers never enter Base64/Jint or whole-file memory. publishMode=stage uploads immutable version assets only; finalize rebuilds the same local manifest and promotes it without uploading; stage-and-finalize keeps the original one-call flow. Paths, hashes, sizes, request ids, version preconditions and final manifest evidence are verified strictly. Old API nodes without the resumable endpoints fail closed for oversized assets. \u6807\u51C6stdio\u7684128MiB\u672A\u89E3\u6790JSON-RPC\u7F13\u51B2\u53EA\u627F\u8F7D\u5DE5\u5177\u53C2\u6570/\u56DE\u6267\uFF1B\u76EE\u5F55\u8D44\u4EA7\u7EE7\u7EED\u539F\u59CB\u5B57\u8282\u6D41\u4E0A\u4F20\uFF0C\u4E0D\u628A\u5927\u6587\u4EF6\u6216\u6E90\u7801ZIP\u585E\u5165Base64\u5DE5\u5177\u53C2\u6570\u3002`,{appIdOrKey:d.string().min(1).describe("Existing sys_microistore Id or AppKey."),versionNo:d.string().regex(/^v?\d+\.\d+\.\d+$/u).describe("Immutable semantic version, e.g. v1.2.3."),directory:d.string().min(1).describe("Local compiled output directory such as dist or unpackage/dist/build/h5."),entryPath:d.string().optional().default("index.html").describe("Entry file relative to directory. Default index.html."),routes:d.array(Nt).optional().default([]).describe("Canonical v3 route snapshot input; missing routes are frozen explicitly as []."),routeSnapshotJson:d.string().max(1024*1024).optional().describe("Protocol v3 requires the exact recursive-key-sorted, array-order-preserving UTF-8 canonical JSON for routes."),routeSnapshotHash:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 requires the lowercase SHA-256 of RouteSnapshotJson."),changeSummary:d.string().max(2e3).optional().describe("Version change summary stored in mci_ai_app_version on first stage insert. Maximum 2000 characters; retries preserve the original summary."),sourceManifestHash:d.string().regex(/^[a-fA-F0-9]{64}$/u).optional().describe("Optional source-manifest SHA-256 returned by microi_sync_microservice_source, tying source and runtime to one delivery."),runtimeManifestHash:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 requires the exact lowercase runtime-manifest SHA-256 computed during the local dry run."),deliveryBatchId:d.string().min(8).max(50).optional().describe("Optional stable delivery batch id (8-50 characters, matching the API and LastBuildTaskId). When omitted MCP derives a deterministic id from app/version/manifest so retries remain stable."),publishMode:d.enum(["stage","finalize","stage-and-finalize"]).optional().default("stage-and-finalize").describe("stage uploads immutable assets only; finalize submits the local manifest only; stage-and-finalize preserves the original one-call behavior."),verificationOnly:d.boolean().optional().default(!1).describe("Protocol v3 stage only: submit/read the same frozen verification task without uploading files again. Pending is not ReleaseVerified and never permits finalize."),protocolVersion:d.literal(3).optional().describe("Explicit protocol v3 gate. When set, publishMode must be explicit stage or finalize and every v3 precondition is required."),expectedGateEpoch:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 gate epoch as a canonical decimal bigint string."),requestId:d.string().regex(/^[A-Za-z0-9._:-]{8,100}$/u).optional().describe("Protocol v3 stable release RequestId; stage/finalize and all Pending replays must reuse it exactly."),requestFingerprint:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 immutable release fingerprint."),expectedCurrentVersion:d.number().int().min(0).optional().describe("Required for finalize/stage-and-finalize and omitted only during stage. Must equal the application CurrentVersion read before staging."),expectedAppVersion:d.string().nullable().optional().describe("Application AppVersion baseline. Protocol v3 requires explicit string or null for both stage and finalize."),expectedPublishFence:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 sys_microistore.PublishFence canonical decimal bigint string."),expectedPublishRowVersion:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 sys_microistore.PublishRowVersion canonical decimal bigint string."),expectedVersionRowVersion:d.string().regex(/^(0|[1-9]\d*)$/u).nullable().optional().describe("Protocol v3 target mci_ai_app_version.RowVersion; explicit null means the row must not exist."),expectedActivePublishVersionId:d.string().min(1).nullable().optional().describe("Protocol v3 active version id baseline; explicit null means empty."),expectedCommittedPublishVersionId:d.string().min(1).nullable().optional().describe("Protocol v3 committed version id baseline; explicit null means empty."),includeSourceMaps:d.boolean().optional().default(!1).describe("Publish *.map source maps. Defaults to false to avoid source disclosure."),maxFiles:d.number().int().min(1).max(2e4).optional().describe("Safety cap checked before upload. Default and hard maximum 20,000."),maxTotalMegabytes:d.number().positive().max(Number.MAX_SAFE_INTEGER/(1024*1024)).optional().describe("Optional caller safety cap checked before upload. Omit for the platform maximum; 5 GiB and larger builds use resumable HDFS multipart."),timeoutMsPerFile:d.number().int().min(1e3).max(2*60*6e4).optional().describe("Per-file upload timeout. Default 30 minutes."),allowLegacyFallback:d.boolean().optional().default(!1).describe("Deprecated compatibility flag. RequestId-capable two-phase publishing fails closed on old API nodes instead of publishing through the legacy payload."),confirmExecution:d.string().optional().describe("Required for real publishing and must exactly equal appIdOrKey. Omit for a local preflight manifest only.")},async({appIdOrKey:a,versionNo:s,directory:c,entryPath:l,routes:u,routeSnapshotJson:p,routeSnapshotHash:f,changeSummary:m,sourceManifestHash:h,runtimeManifestHash:g,deliveryBatchId:y,publishMode:x,verificationOnly:b,protocolVersion:v,expectedGateEpoch:_,requestId:w,requestFingerprint:C,expectedCurrentVersion:E,expectedAppVersion:T,expectedPublishFence:A,expectedPublishRowVersion:I,expectedVersionRowVersion:R,expectedActivePublishVersionId:F,expectedCommittedPublishVersionId:z,includeSourceMaps:j,maxFiles:K,maxTotalMegabytes:ee,timeoutMsPerFile:_e,allowLegacyFallback:me,confirmExecution:Ht})=>Vte(t,{appIdOrKey:a,versionNo:s,directory:c,entryPath:l,routes:u,routeSnapshotJson:p,routeSnapshotHash:f,changeSummary:m,sourceManifestHash:h,runtimeManifestHash:g,deliveryBatchId:y,publishMode:x,verificationOnly:b,protocolVersion:v,expectedGateEpoch:_,requestId:w,requestFingerprint:C,expectedCurrentVersion:E,expectedAppVersion:T,expectedPublishFence:A,expectedPublishRowVersion:I,expectedVersionRowVersion:R,expectedActivePublishVersionId:F,expectedCommittedPublishVersionId:z,includeSourceMaps:j,maxFiles:K,maxTotalMegabytes:ee,timeoutMsPerFile:_e,allowLegacyFallback:me,confirmExecution:Ht})),i.tool("microi_publish_microservice","Legacy small-payload publisher for generated microservice / micro-app files in Base64. For real compiled directories or large assets, use microi_publish_application_directory_stream so bytes stream directly to HDFS and never enter JSON/Jint.",{microService:Nt.describe("Microservice metadata. Required: MsKey and MsName/Name. Optional: BuildVersion, EntryPath, SourceDirName."),assets:d.array(Nt).describe("Built asset files. Each item needs Path/RelativePath/FileName and FileByteBase64/ContentBase64. Mark the main HTML/JS entry with IsEntry=true or Entry=true."),routes:d.array(Nt).optional().describe("Optional route/page records for sys_microiservice_page. Fields: PageKey, PageName, PageTitle, RoutePath, EntryPath, SourceDirName, SourceFile, RouteMetaJson, Sort, IsHome."),sourceManifestHash:d.string().regex(/^[a-fA-F0-9]{64}$/u).optional().describe("Optional source-manifest SHA-256 returned by source sync."),deliveryBatchId:d.string().min(8).max(50).optional().describe("Optional stable delivery batch id (8-50 characters, matching the API and LastBuildTaskId). MCP generates one when omitted."),confirmExecution:d.string().optional().describe("Required for real writes. Pass any non-empty confirmation string after reviewing the payload.")},async({microService:a,assets:s,routes:c,sourceManifestHash:l,deliveryBatchId:u,confirmExecution:p})=>{if(!p)return{content:[{type:"text",text:JSON.stringify({dryRun:!0,microService:a,assetCount:s.length,routes:c||[]},null,2)}]};try{let f=await t.publishMicroService({microService:a,assets:s,routes:c||[],DeliveryBatchId:u||nt.default.randomUUID(),SourceManifestHash:l||""});if(f.Code!==1)return{content:[{type:"text",text:`Error: ${f.Msg}`}],isError:!0};let m=String(a.MsKey||a.MicroServiceKey||a.AppKey||"").trim(),h=m?await t.probeMicroAppEntry(m):{ok:!1,url:"",error:"Cannot probe runtime because MsKey is missing"};for(let y of[250,750,1500]){if(h.ok||!m)break;await new Promise(x=>setTimeout(x,y)),h=await t.probeMicroAppEntry(m)}let g={...f.Data&&typeof f.Data=="object"?f.Data:{},RuntimeProbe:h,PublishedButUnavailable:!h.ok,...h.ok?{}:{Warning:"\u53D1\u5E03\u5143\u6570\u636E\u548C\u8D44\u4EA7\u5199\u5165\u5DF2\u5B8C\u6210\uFF0C\u4F46\u7A33\u5B9A\u5165\u53E3\u4E0D\u53EF\u7528\u3002\u8BF7\u68C0\u67E5 API \u8282\u70B9\u5230\u79DF\u6237 HDFS/MinIO \u516C\u6709\u6876\u7684\u670D\u52A1\u7AEF\u8BFB\u53D6\u94FE\u8DEF\uFF1B\u4E0D\u8981\u65E0\u5224\u65AD\u91CD\u590D\u53D1\u5E03\u3002"}};return{content:[{type:"text",text:JSON.stringify(g,null,2)}],...h.ok?{}:{isError:!0}}}catch(f){return{content:[{type:"text",text:`Error: ${f instanceof Error?f.message:String(f)}`}],isError:!0}}}),U2(i,t,e),F2(i,t,e),z2(i,t,e),j2(i,t,e),V2(i,t,e),K4(i,t),o.flush(e.codexMode?["microi_codex"]:void 0),i}function nre(t){let e=t.trim();if(!e||!/^[A-Za-z0-9+/]+={0,2}$/.test(e)||e.length%4!==0)return"";let r=Buffer.from(e,"base64");return r.toString("base64").replace(/=+$/,"")!==e.replace(/=+$/,"")?"":r.toString("utf8")}function iN(t){let e=t.MICROI_LABEL_BASE64||"";if(e){let r=nre(e);if(r)return r}return t.MICROI_LABEL||""}function oN(t,e,r,n="",i=""){try{let o=JSON.parse(Kl.default.readFileSync(t,"utf-8")),a=String(e||"").replace(/\/+$/,""),s=xd(e,r,n,i),c=r?s.filter(u=>u!==a):s;return sd(c.map(u=>Ua(o[u])))||Ua(o[a])}catch{return}}function ire(t){let e=t.body,r=String(t.headers["content-type"]||"");if(typeof e=="string"){/^application\/json\b/i.test(r)||(t.headers["content-type"]="application/json");try{return JSON.parse(e)}catch{return e}}if(e&&typeof e=="object")return/^application\/json\b/i.test(r)||(t.headers["content-type"]="application/json"),e}async function ore(){let t={apiBaseUrl:(process.env.MICROI_API_URL||"").replace(/\/+$/,""),username:process.env.MICROI_USERNAME||"",password:process.env.MICROI_PASSWORD||"",osClient:process.env.MICROI_OS_CLIENT||"",osClientType:process.env.MICROI_OS_CLIENT_TYPE||"",osClientNetwork:process.env.MICROI_OS_CLIENT_NETWORK||"",rsaPublicKey:process.env.MICROI_RSA_PUBLIC_KEY||void 0,token:process.env.MICROI_TOKEN||void 0,workspaceCredentialFilePath:process.env.MICROI_WORKSPACE_CREDENTIAL_FILE||void 0,workspaceCredentialUsernameKey:process.env.MICROI_WORKSPACE_USERNAME_KEY||void 0,workspaceCredentialPasswordKey:process.env.MICROI_WORKSPACE_PASSWORD_KEY||void 0};/^https:\/\/(localhost|127\.0\.0\.1)(:\d+)?/i.test(t.apiBaseUrl)&&(process.env.NODE_TLS_REJECT_UNAUTHORIZED="0",console.error("[microi-mcp] Detected localhost HTTPS, disabled TLS certificate verification"));let e=process.env.MICROI_TOKEN_FILE;if(e){t.tokenFilePath=e,t.authRecoveryRequestDir=process.env.MICROI_AUTH_RECOVERY_DIR||void 0;let n=oN(e,t.apiBaseUrl,t.osClient||"",t.osClientType||"",t.osClientNetwork||"");n&&(t.token=n)}if((process.env.MCP_TRANSPORT||"stdio")==="sse")t.apiBaseUrl||(console.error("Missing required: MICROI_API_URL (Microi backend API URL)"),process.exit(1)),await sre(parseInt(process.env.MCP_PORT||"3000",10),t);else{t.apiBaseUrl||(console.error("Missing required: MICROI_API_URL"),process.exit(1));let n=!!t.workspaceCredentialFilePath&&!!t.workspaceCredentialUsernameKey&&!!t.workspaceCredentialPasswordKey&&Kl.default.existsSync(t.workspaceCredentialFilePath);!t.token&&(!t.username||!t.password)&&!n&&(console.error("Missing required environment variables:"),console.error(" MICROI_API_URL - Microi backend API URL (e.g. https://api.example.com)"),console.error(" MICROI_TOKEN_FILE - Token file path (preferred, auto-managed by VS Code extension)"),console.error(" MICROI_AUTH_RECOVERY_DIR - Optional credential-free VS Code recovery request directory"),console.error(" MICROI_WORKSPACE_CREDENTIAL_FILE - Optional Windows DPAPI workspace credential vault"),console.error(" MICROI_TOKEN - JWT token (fallback)"),console.error(" MICROI_USERNAME - Login username (fallback if no token)"),console.error(" MICROI_PASSWORD - Login password (fallback if no token)"),console.error("Optional:"),console.error(" MICROI_OS_CLIENT - OsClient identifier"),console.error(" MICROI_OS_CLIENT_TYPE - Optional OsClient type for exact transport/token identity"),console.error(" MICROI_OS_CLIENT_NETWORK - Optional OsClient network for exact transport/token identity"),process.exit(1));let i=new Kc(t);await i.login();let o={osClient:t.osClient||"",osClientType:t.osClientType||"",osClientNetwork:t.osClientNetwork||"",apiBaseUrl:t.apiBaseUrl,label:iN(process.env),codexMode:process.env.MICROI_CODEX_MODE==="1"},a=Cw(i,o);await are(a),e&&Kl.default.watchFile(e,{interval:5e3},()=>{let c=oN(e,t.apiBaseUrl,t.osClient||"",t.osClientType||"",t.osClientNetwork||"");c&&(i.updateToken(c),console.error("[microi-mcp] Token updated from file"))});let s=()=>{e&&Kl.default.unwatchFile(e),i.destroy(),process.exit(0)};process.on("SIGINT",s),process.on("SIGTERM",s)}}async function are(t){let e=new Bu(process.stdin,process.stdout,{maxBufferSize:134217728});await t.connect(e),console.error("[microi-mcp] Server started (stdio mode)")}async function sre(t,e){let r=(0,Kf.default)();r.use(Kf.default.json({type:["application/json","application/*+json"],limit:"4mb"})),r.use(Kf.default.text({type:["text/plain","application/json-rpc"],limit:"4mb"}));let n=new Map;r.get("/sse",async(o,a)=>{let s=o.headers["x-microi-username"]||e.username,c=o.headers["x-microi-password"]||e.password;if(!s||!c){a.status(401).json({error:"Authentication required",message:"Provide X-Microi-Username and X-Microi-Password in request headers, or set MICROI_USERNAME / MICROI_PASSWORD environment variables."});return}try{let l=HR(o.headers,e),u=l.osClient||"",p=new Kc({apiBaseUrl:e.apiBaseUrl,username:s,password:c,...l,rsaPublicKey:e.rsaPublicKey});await p.login();let f={osClient:u||"",osClientType:l.osClientType||"",osClientNetwork:l.osClientNetwork||"",apiBaseUrl:e.apiBaseUrl,label:""},m=Cw(p,f),h=new op("/messages",a);n.set(h.sessionId,{transport:h,client:p}),a.on("close",()=>{let g=n.get(h.sessionId);g&&(g.client.destroy(),n.delete(h.sessionId),console.error(`[microi-mcp] Session ${h.sessionId} disconnected (user: ${s})`))}),console.error(`[microi-mcp] New session ${h.sessionId} (user: ${s}, osClient: ${u||"default"})`),await m.connect(h)}catch(l){let u=l instanceof Error?l.message:String(l);console.error(`[microi-mcp] SSE auth failed (user: ${s}): ${u}`),a.headersSent||a.status(401).json({error:"Authentication failed",message:u})}}),r.post("/messages",async(o,a)=>{let s=o.query.sessionId,c=n.get(s);if(!c){a.status(404).json({error:"Session not found"});return}await c.transport.handlePostMessage(o,a,ire(o))}),r.get("/health",(o,a)=>{a.json({status:"ok",server:"microi-mcp-server",version:"1.0.0",activeSessions:n.size})});let i=()=>{for(let[o,a]of n)a.client.destroy(),n.delete(o);process.exit(0)};process.on("SIGINT",i),process.on("SIGTERM",i),r.listen(t,()=>{console.error(`[microi-mcp] Server started (SSE mode) on http://localhost:${t}`),console.error(`[microi-mcp] SSE endpoint: http://localhost:${t}/sse`),console.error(`[microi-mcp] Auth: ${e.username?"env defaults available":"headers required"}`)})}ore().catch(t=>{console.error("[microi-mcp] Fatal error:",t instanceof Error?t.message:t),process.exit(1)});
|
|
618
|
+
- PageId: ${y?.PageId}`}]}}catch(h){return{content:[{type:"text",text:`Error: ${h instanceof Error?h.message:String(h)}`}],isError:!0}}}),i.tool("microi_list_applications",`List every online AI application for OsClient "${r}" across Web, UniApp and MicroService, including each app's complete source-file manifest by default. AI agents should call this at the beginning of application/page work so they understand existing apps before creating duplicates. For complex custom dialogs/pages, prefer extending an existing MicroService or creating one with microi_create_microservice + microi_sync_microservice_source; do not embed large HTML in V8.ConfirmTips.`,{appType:d.enum(["Web","UniApp","MicroService"]).optional().describe("Optional exact application type filter."),keyword:d.string().optional().describe("Optional case-insensitive search across name, AppKey, type and description."),includeFiles:d.boolean().optional().default(!0).describe("Include the complete file manifest for every app. Defaults to true.")},async({appType:a,keyword:s,includeFiles:c})=>{try{let l=await t.listApplications({AppType:a,Keyword:s,IncludeFiles:c!==!1});return l.Code!==1?{content:[{type:"text",text:`Error: ${l.Msg}`}],isError:!0}:{content:[{type:"text",text:JSON.stringify(l.Data,null,2)}]}}catch(l){return{content:[{type:"text",text:`Error: ${l instanceof Error?l.message:String(l)}`}],isError:!0}}}),i.tool("microi_get_application_context",`Get one Web, UniApp or MicroService application by Id/AppKey for OsClient "${r}". It returns metadata and the full file manifest by default without embedding source bodies; set includeContents=true only when the complete source is actually needed, or use microi_get_application_file for one exact file. MicroService responses also include sys_microiservice runtime/pages.`,{appIdOrKey:d.string().describe("sys_microistore.Id or AppKey."),includeContents:d.boolean().optional().default(!1).describe("Read private HDFS source contents. Defaults to false; prefer microi_get_application_file for targeted reads."),maxFileBytes:d.number().int().positive().optional().describe("Maximum bytes read per source file. Default 2MB."),maxTotalBytes:d.number().int().positive().optional().describe("Maximum total bytes read for this app. Default 50MB.")},async({appIdOrKey:a,includeContents:s,maxFileBytes:c,maxTotalBytes:l})=>{try{let u=await t.getApplicationContext({AppIdOrKey:a,IncludeContents:s===!0,...c?{MaxFileBytes:c}:{},...l?{MaxTotalBytes:l}:{}});if(u.Code!==1)return{content:[{type:"text",text:`Error: ${u.Msg}`}],isError:!0};let p=u.Data,m=(Array.isArray(p?.Files)?p.Files:[]).filter(g=>typeof g?.ContentReadError=="string"&&g.ContentReadError).length,h={...p,McpReadSummary:{RequestedContents:s===!0,ContentsComplete:s!==!0||m===0,ContentErrorCount:m}};return{content:[{type:"text",text:JSON.stringify(h,null,2)}]}}catch(u){return{content:[{type:"text",text:`Error: ${u instanceof Error?u.message:String(u)}`}],isError:!0}}}),i.tool("microi_get_application_file",`Read one exact source file from a Web, UniApp or MicroService online AI application for OsClient "${r}". Text code is returned as UTF-8 Content; binary files are returned as FileByteBase64.`,{appIdOrKey:d.string().describe("sys_microistore.Id or AppKey."),filePath:d.string().describe("Exact relative source path from the application file manifest."),maxFileBytes:d.number().int().positive().optional().describe("Maximum bytes read. Default 10MB.")},async({appIdOrKey:a,filePath:s,maxFileBytes:c})=>{try{let l=await t.getApplicationFile({AppIdOrKey:a,FilePath:s,IncludeContents:!0,...c?{MaxFileBytes:c}:{}});return l.Code!==1?{content:[{type:"text",text:`Error: ${l.Msg}`}],isError:!0}:{content:[{type:"text",text:JSON.stringify(l.Data,null,2)}]}}catch(l){return{content:[{type:"text",text:`Error: ${l instanceof Error?l.message:String(l)}`}],isError:!0}}}),i.tool("microi_scaffold_vue_microservice",`Create a safe, maintainable MicroService scaffold for OsClient "${r}" using the stable Vue 3.5.40 + Vite 7.3.6 + TypeScript 5.9.3 baseline, @vitejs/plugin-vue 6.0.8, vue-tsc 3.3.9, Composition API and <script setup lang="ts">. The minimal template keeps Microi SDK and host/internal-route integration but does not force Pinia or Vue Router; add either only when application complexity needs it. It writes .microi-micro-app.json, microi.routes.json and exactly one Vue component per declared route inside the local tenant AI\u5E94\u7528 directory. It only accepts a real absolute directory whose basename is AI\u5E94\u7528, never overwrites a different existing project, and performs a dry run until confirmExecution exactly equals appKey. After scaffolding, run npm install and npm run build, then use microi_create_microservice, microi_sync_microservice_source and microi_publish_application_directory_stream (or the legacy publisher for a tiny compatibility payload).`,{appKey:d.string().regex(/^[a-z0-9](?:[a-z0-9_-]{0,62}[a-z0-9])?$/u).describe("Stable lowercase application key and local directory name."),name:d.string().min(1).max(120).describe("Human-readable MicroService name."),description:d.string().optional().describe("Optional application description."),aiApplicationsDirectory:d.string().optional().describe("Absolute tenant AI\u5E94\u7528 directory. Defaults to MICROI_AI_APPLICATIONS_DIR injected by Microi.Agent."),buildVersion:d.string().regex(/^v\d+\.\d+\.\d+$/u).optional().default("v0.1.0").describe("Initial semantic build version. Default v0.1.0."),routes:d.array(d.object({path:d.string().describe("Internal route path such as /context-test."),name:d.string().describe("Stable route key such as context-test."),title:d.string().describe("Page/menu title."),description:d.string().optional().describe("Optional visible page explanation."),isHome:d.boolean().optional().describe("Mark one route as the default page. The first route is used when omitted.")})).min(1).max(50).describe("Vue pages and MicroService internal routes. One .vue file is generated per item."),confirmExecution:d.string().optional().describe("Required for filesystem writes and must exactly equal appKey. Omit for a local preflight only.")},async({appKey:a,name:s,description:c,aiApplicationsDirectory:l,buildVersion:u,routes:p,confirmExecution:f})=>{try{let m=String(l||process.env.MICROI_AI_APPLICATIONS_DIR||"").trim();if(!m)return{content:[{type:"text",text:"Error: \u7F3A\u5C11 AI \u5E94\u7528\u76EE\u5F55\u3002\u8BF7\u7531 Microi.Agent \u6CE8\u5165 MICROI_AI_APPLICATIONS_DIR\uFF0C\u6216\u663E\u5F0F\u4F20\u5165 aiApplicationsDirectory\u3002"}],isError:!0};if(f&&f!==a)return{content:[{type:"text",text:`Error: confirmExecution \u5FC5\u987B\u7CBE\u786E\u7B49\u4E8E ${a}`}],isError:!0};let h={aiApplicationsDirectory:m,appKey:a,name:s,description:c,apiBaseUrl:e.apiBaseUrl,osClient:r,buildVersion:u,routes:p,sdkSource:RO(process.env.MICROI_WORKSPACE_ROOT)},g=xw(h);if(f!==a)return{content:[{type:"text",text:JSON.stringify({dryRun:!0,confirmationRequired:a,targetDirectory:g.targetDirectory,appKey:g.appKey,buildVersion:g.buildVersion,routeCount:g.routes.length,routes:g.routes.map(x=>({path:x.path,name:x.name,title:x.title,sourceFile:x.sourceFile,isHome:x.isHome})),fileCount:g.files.length,files:g.files.map(x=>({Path:x.relativePath,Size:x.size,Sha256:x.sha256}))},null,2)}]};let y=PO(h);return{content:[{type:"text",text:JSON.stringify(y,null,2)}]}}catch(m){return{content:[{type:"text",text:`Error: ${m instanceof Error?m.message:String(m)}`}],isError:!0}}}),i.tool("microi_get_microservice",`Get one Microi microservice / micro-app by MsKey for OsClient "${r}". Use this before publishing to inspect current BuildVersion, EntryPath and asset manifest.`,{msKey:d.string().describe("Microservice key, stored in sys_microiservice.MsKey")},async({msKey:a})=>{try{let s=await t.getMicroService(a);return s.Code!==1?{content:[{type:"text",text:`Error: ${s.Msg}`}],isError:!0}:{content:[{type:"text",text:JSON.stringify(s.Data,null,2)}]}}catch(s){return{content:[{type:"text",text:`Error: ${s instanceof Error?s.message:String(s)}`}],isError:!0}}}),i.tool("microi_create_microservice",`Create or update sys_microiservice metadata for OsClient "${r}". This only writes metadata. For generated app source/dist files, use microi_publish_microservice.`,{microService:Nt.describe("Microservice metadata. Required: MsKey and MsName/Name. Optional: MsType, Runtime, StorageMode, SourceDirName, EntryPath, BuildVersion."),confirmExecution:d.string().optional().describe("Required for real writes. Pass any non-empty confirmation string after reviewing the payload.")},async({microService:a,confirmExecution:s})=>{if(!s)return{content:[{type:"text",text:JSON.stringify({dryRun:!0,microService:a},null,2)}]};try{let c=await t.createMicroService(a);return c.Code!==1?{content:[{type:"text",text:`Error: ${c.Msg}`}],isError:!0}:{content:[{type:"text",text:JSON.stringify(c.Data,null,2)}]}}catch(c){return{content:[{type:"text",text:`Error: ${c instanceof Error?c.message:String(c)}`}],isError:!0}}}),i.tool("microi_sync_microservice_source",`Sync a local Web, UniApp or MicroService source directory into the online AI Application for OsClient "${r}". Prefer directory: MCP detects SourceStreamPublish, streams each original file into the private staged prefix, then atomically finalizes the complete manifest with CurrentVersion/AppVersion/SourceManifestHash CAS. Transport failures are read back before any exact replay. Old servers use bounded legacy JSON only for at most 256 files and 8MiB. AI agents must never read large files into Base64, create .sync-seg-* files, create sync-source-files.json, or split one source file across tool calls.`,{microService:Nt.describe("Microservice metadata. Required: MsKey and MsName/Name. Optional: Description and SourceDirName."),directory:d.string().optional().describe("Preferred. Absolute local project directory; MCP reads it directly and excludes node_modules, dist, build, coverage, caches and VCS data."),sourceFiles:d.array(Nt).optional().describe("Legacy compatibility only. Do not construct this array from manually split files when a local directory is available."),replace:d.boolean().optional().describe("Complete directory sync defaults to exact private-source replacement. Explicit false is rejected by the stream protocol; public runtime/build rows are always preserved."),confirmExecution:d.string().optional().describe("Required for real writes. Pass any non-empty confirmation string after reviewing the payload.")},async({microService:a,directory:s,sourceFiles:c,replace:l,confirmExecution:u})=>Fte(t,{microService:a,directory:s,sourceFiles:c,replace:l,confirmExecution:u})),i.tool("microi_clear_application_source",`Remove an AI application's private HDFS source objects, private mci_ai_app_file rows, public SourceZip objects and source-delivery flags while preserving compiled runtime/build assets for OsClient "${r}". This is intentionally destructive and two-phase: first call without confirmExecution to obtain the exact target list and confirmationSha256, then pass that hash unchanged. Keep a verified local source checkout before executing.`,{appIdOrKey:d.string().min(1).describe("Exact AppId or AppKey. No wildcard or bulk deletion is supported."),confirmExecution:d.string().optional().describe("Exact confirmationSha256 returned by the backend dry run.")},async({appIdOrKey:a,confirmExecution:s})=>{try{let c=await t.clearApplicationSource({AppIdOrKey:a,...s?{ConfirmExecution:s}:{}});return{content:[{type:"text",text:JSON.stringify(c,null,2)}],structuredContent:c,...c.Code!==1?{isError:!0}:{}}}catch(c){return{content:[{type:"text",text:`Clear application source failed: ${c instanceof Error?c.message:String(c)}`}],isError:!0}}}),i.tool("microi_upload_application_asset_stream",`Stream one local built asset directly to the immutable HDFS version directory for OsClient "${r}". Protocol v3 uses durable HDFS multipart sessions with status readback and reconnect resume for ordinary files through multi-GiB installers; bytes are never encoded as Base64 and never enter Jint. This is a low-level primitive inside a frozen release contract; normally use microi_publish_application_directory_stream to upload and atomically promote a complete directory.`,{appIdOrKey:d.string().min(1).describe("Existing sys_microistore Id or AppKey."),versionNo:d.string().regex(/^v?\d+\.\d+\.\d+$/u).describe("Immutable semantic version, e.g. v1.2.3."),relativePath:d.string().min(1).describe("POSIX-style path inside the compiled output, e.g. assets/index-abcd.js."),localFilePath:d.string().min(1).describe("Absolute or workspace-relative path of one local ordinary file."),sha256:d.string().regex(/^[a-fA-F0-9]{64}$/u).optional().describe("Optional expected SHA-256. MCP computes and verifies it when omitted."),routes:d.array(Nt).optional().default([]).describe("Canonical v3 route snapshot input; missing routes are frozen explicitly as []."),routeSnapshotJson:d.string().max(1024*1024).optional().describe("Protocol v3 requires the exact recursive-key-sorted, array-order-preserving UTF-8 canonical JSON for routes."),routeSnapshotHash:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 requires the lowercase SHA-256 of RouteSnapshotJson."),sourceManifestHash:d.string().regex(/^[a-fA-F0-9]{64}$/u).optional().describe("Protocol v3 source-manifest SHA-256 tying this asset to the release."),runtimeManifestHash:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 exact runtime-manifest SHA-256 for the frozen release."),deliveryBatchId:d.string().min(8).max(50).optional().describe("Protocol v3 stable delivery batch id."),protocolVersion:d.literal(3).optional().describe("Enable durable v3 multipart/resume. All v3 release identity and CAS fields then become required."),expectedGateEpoch:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 gate epoch as a canonical decimal bigint string."),requestId:d.string().regex(/^[A-Za-z0-9._:-]{8,100}$/u).optional().describe("Protocol v3 stable release RequestId; every asset and stage/finalize replay must reuse it exactly."),requestFingerprint:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 immutable release fingerprint."),expectedCurrentVersion:d.number().int().min(0).optional().describe("Protocol v3 application CurrentVersion baseline."),expectedAppVersion:d.string().nullable().optional().describe("Protocol v3 application AppVersion baseline; explicit null means empty."),expectedPublishFence:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 sys_microistore.PublishFence baseline."),expectedPublishRowVersion:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 sys_microistore.PublishRowVersion baseline."),expectedVersionRowVersion:d.string().regex(/^(0|[1-9]\d*)$/u).nullable().optional().describe("Protocol v3 target version RowVersion; explicit null means absent."),expectedActivePublishVersionId:d.string().min(1).nullable().optional().describe("Protocol v3 active version id baseline; explicit null means empty."),expectedCommittedPublishVersionId:d.string().min(1).nullable().optional().describe("Protocol v3 committed version id baseline; explicit null means empty."),timeoutMs:d.number().int().min(1e3).max(2*60*6e4).optional().describe("Per-file upload timeout. Default 30 minutes; maximum 2 hours."),confirmExecution:d.string().optional().describe("Required for the real upload and must exactly equal appIdOrKey.")},async a=>Bte(t,a)),i.tool("microi_publish_application_directory_stream",`Publish a real Web, UniApp or MicroService build directory for OsClient "${r}" using deterministic RequestId evidence. Protocol v3 automatically switches files above the legacy 128 MiB request boundary to durable HDFS multipart sessions with per-part SHA-256, status readback and reconnect resume; logical files such as 5 GiB installers never enter Base64/Jint or whole-file memory. publishMode=stage uploads immutable version assets only; finalize rebuilds the same local manifest and promotes it without uploading; stage-and-finalize keeps the original one-call flow. Paths, hashes, sizes, request ids, version preconditions and final manifest evidence are verified strictly. Old API nodes without the resumable endpoints fail closed for oversized assets. \u6807\u51C6stdio\u7684128MiB\u672A\u89E3\u6790JSON-RPC\u7F13\u51B2\u53EA\u627F\u8F7D\u5DE5\u5177\u53C2\u6570/\u56DE\u6267\uFF1B\u76EE\u5F55\u8D44\u4EA7\u7EE7\u7EED\u539F\u59CB\u5B57\u8282\u6D41\u4E0A\u4F20\uFF0C\u4E0D\u628A\u5927\u6587\u4EF6\u6216\u6E90\u7801ZIP\u585E\u5165Base64\u5DE5\u5177\u53C2\u6570\u3002`,{appIdOrKey:d.string().min(1).describe("Existing sys_microistore Id or AppKey."),versionNo:d.string().regex(/^v?\d+\.\d+\.\d+$/u).describe("Immutable semantic version, e.g. v1.2.3."),directory:d.string().min(1).describe("Local compiled output directory such as dist or unpackage/dist/build/h5."),entryPath:d.string().optional().default("index.html").describe("Entry file relative to directory. Default index.html."),routes:d.array(Nt).optional().default([]).describe("Canonical v3 route snapshot input; missing routes are frozen explicitly as []."),routeSnapshotJson:d.string().max(1024*1024).optional().describe("Protocol v3 requires the exact recursive-key-sorted, array-order-preserving UTF-8 canonical JSON for routes."),routeSnapshotHash:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 requires the lowercase SHA-256 of RouteSnapshotJson."),changeSummary:d.string().max(2e3).optional().describe("Version change summary stored in mci_ai_app_version on first stage insert. Maximum 2000 characters; retries preserve the original summary."),sourceManifestHash:d.string().regex(/^[a-fA-F0-9]{64}$/u).optional().describe("Optional source-manifest SHA-256 returned by microi_sync_microservice_source, tying source and runtime to one delivery."),runtimeManifestHash:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 requires the exact lowercase runtime-manifest SHA-256 computed during the local dry run."),deliveryBatchId:d.string().min(8).max(50).optional().describe("Optional stable delivery batch id (8-50 characters, matching the API and LastBuildTaskId). When omitted MCP derives a deterministic id from app/version/manifest so retries remain stable."),publishMode:d.enum(["stage","finalize","stage-and-finalize"]).optional().default("stage-and-finalize").describe("stage uploads immutable assets only; finalize submits the local manifest only; stage-and-finalize preserves the original one-call behavior."),verificationOnly:d.boolean().optional().default(!1).describe("Protocol v3 stage only: submit/read the same frozen verification task without uploading files again. Pending is not ReleaseVerified and never permits finalize."),protocolVersion:d.literal(3).optional().describe("Explicit protocol v3 gate. When set, publishMode must be explicit stage or finalize and every v3 precondition is required."),expectedGateEpoch:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 gate epoch as a canonical decimal bigint string."),requestId:d.string().regex(/^[A-Za-z0-9._:-]{8,100}$/u).optional().describe("Protocol v3 stable release RequestId; stage/finalize and all Pending replays must reuse it exactly."),requestFingerprint:d.string().regex(/^[a-f0-9]{64}$/u).optional().describe("Protocol v3 immutable release fingerprint."),expectedCurrentVersion:d.number().int().min(0).optional().describe("Required for finalize/stage-and-finalize and omitted only during stage. Must equal the application CurrentVersion read before staging."),expectedAppVersion:d.string().nullable().optional().describe("Application AppVersion baseline. Protocol v3 requires explicit string or null for both stage and finalize."),expectedPublishFence:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 sys_microistore.PublishFence canonical decimal bigint string."),expectedPublishRowVersion:d.string().regex(/^(0|[1-9]\d*)$/u).optional().describe("Protocol v3 sys_microistore.PublishRowVersion canonical decimal bigint string."),expectedVersionRowVersion:d.string().regex(/^(0|[1-9]\d*)$/u).nullable().optional().describe("Protocol v3 target mci_ai_app_version.RowVersion; explicit null means the row must not exist."),expectedActivePublishVersionId:d.string().min(1).nullable().optional().describe("Protocol v3 active version id baseline; explicit null means empty."),expectedCommittedPublishVersionId:d.string().min(1).nullable().optional().describe("Protocol v3 committed version id baseline; explicit null means empty."),includeSourceMaps:d.boolean().optional().default(!1).describe("Publish *.map source maps. Defaults to false to avoid source disclosure."),maxFiles:d.number().int().min(1).max(2e4).optional().describe("Safety cap checked before upload. Default and hard maximum 20,000."),maxTotalMegabytes:d.number().positive().max(Number.MAX_SAFE_INTEGER/(1024*1024)).optional().describe("Optional caller safety cap checked before upload. Omit for the platform maximum; 5 GiB and larger builds use resumable HDFS multipart."),timeoutMsPerFile:d.number().int().min(1e3).max(2*60*6e4).optional().describe("Per-file upload timeout. Default 30 minutes."),allowLegacyFallback:d.boolean().optional().default(!1).describe("Deprecated compatibility flag. RequestId-capable two-phase publishing fails closed on old API nodes instead of publishing through the legacy payload."),confirmExecution:d.string().optional().describe("Required for real publishing and must exactly equal appIdOrKey. Omit for a local preflight manifest only.")},async({appIdOrKey:a,versionNo:s,directory:c,entryPath:l,routes:u,routeSnapshotJson:p,routeSnapshotHash:f,changeSummary:m,sourceManifestHash:h,runtimeManifestHash:g,deliveryBatchId:y,publishMode:x,verificationOnly:b,protocolVersion:v,expectedGateEpoch:_,requestId:w,requestFingerprint:C,expectedCurrentVersion:E,expectedAppVersion:T,expectedPublishFence:A,expectedPublishRowVersion:I,expectedVersionRowVersion:R,expectedActivePublishVersionId:F,expectedCommittedPublishVersionId:z,includeSourceMaps:j,maxFiles:K,maxTotalMegabytes:ee,timeoutMsPerFile:_e,allowLegacyFallback:me,confirmExecution:Ht})=>Vte(t,{appIdOrKey:a,versionNo:s,directory:c,entryPath:l,routes:u,routeSnapshotJson:p,routeSnapshotHash:f,changeSummary:m,sourceManifestHash:h,runtimeManifestHash:g,deliveryBatchId:y,publishMode:x,verificationOnly:b,protocolVersion:v,expectedGateEpoch:_,requestId:w,requestFingerprint:C,expectedCurrentVersion:E,expectedAppVersion:T,expectedPublishFence:A,expectedPublishRowVersion:I,expectedVersionRowVersion:R,expectedActivePublishVersionId:F,expectedCommittedPublishVersionId:z,includeSourceMaps:j,maxFiles:K,maxTotalMegabytes:ee,timeoutMsPerFile:_e,allowLegacyFallback:me,confirmExecution:Ht})),i.tool("microi_publish_microservice","Legacy small-payload publisher for generated microservice / micro-app files in Base64. For real compiled directories or large assets, use microi_publish_application_directory_stream so bytes stream directly to HDFS and never enter JSON/Jint.",{microService:Nt.describe("Microservice metadata. Required: MsKey and MsName/Name. Optional: BuildVersion, EntryPath, SourceDirName."),assets:d.array(Nt).describe("Built asset files. Each item needs Path/RelativePath/FileName and FileByteBase64/ContentBase64. Mark the main HTML/JS entry with IsEntry=true or Entry=true."),routes:d.array(Nt).optional().describe("Optional route/page records for sys_microiservice_page. Fields: PageKey, PageName, PageTitle, RoutePath, EntryPath, SourceDirName, SourceFile, RouteMetaJson, Sort, IsHome."),sourceManifestHash:d.string().regex(/^[a-fA-F0-9]{64}$/u).optional().describe("Optional source-manifest SHA-256 returned by source sync."),deliveryBatchId:d.string().min(8).max(50).optional().describe("Optional stable delivery batch id (8-50 characters, matching the API and LastBuildTaskId). MCP generates one when omitted."),confirmExecution:d.string().optional().describe("Required for real writes. Pass any non-empty confirmation string after reviewing the payload.")},async({microService:a,assets:s,routes:c,sourceManifestHash:l,deliveryBatchId:u,confirmExecution:p})=>{if(!p)return{content:[{type:"text",text:JSON.stringify({dryRun:!0,microService:a,assetCount:s.length,routes:c||[]},null,2)}]};try{let f=await t.publishMicroService({microService:a,assets:s,routes:c||[],DeliveryBatchId:u||nt.default.randomUUID(),SourceManifestHash:l||""});if(f.Code!==1)return{content:[{type:"text",text:`Error: ${f.Msg}`}],isError:!0};let m=String(a.MsKey||a.MicroServiceKey||a.AppKey||"").trim(),h=m?await t.probeMicroAppEntry(m):{ok:!1,url:"",error:"Cannot probe runtime because MsKey is missing"};for(let y of[250,750,1500]){if(h.ok||!m)break;await new Promise(x=>setTimeout(x,y)),h=await t.probeMicroAppEntry(m)}let g={...f.Data&&typeof f.Data=="object"?f.Data:{},RuntimeProbe:h,PublishedButUnavailable:!h.ok,...h.ok?{}:{Warning:"\u53D1\u5E03\u5143\u6570\u636E\u548C\u8D44\u4EA7\u5199\u5165\u5DF2\u5B8C\u6210\uFF0C\u4F46\u7A33\u5B9A\u5165\u53E3\u4E0D\u53EF\u7528\u3002\u8BF7\u68C0\u67E5 API \u8282\u70B9\u5230\u79DF\u6237 HDFS/MinIO \u516C\u6709\u6876\u7684\u670D\u52A1\u7AEF\u8BFB\u53D6\u94FE\u8DEF\uFF1B\u4E0D\u8981\u65E0\u5224\u65AD\u91CD\u590D\u53D1\u5E03\u3002"}};return{content:[{type:"text",text:JSON.stringify(g,null,2)}],...h.ok?{}:{isError:!0}}}catch(f){return{content:[{type:"text",text:`Error: ${f instanceof Error?f.message:String(f)}`}],isError:!0}}}),U2(i,t,e),F2(i,t,e),z2(i,t,e),j2(i,t,e),V2(i,t,e),K4(i,t),o.flush(e.codexMode?["microi_codex"]:void 0),i}function nre(t){let e=t.trim();if(!e||!/^[A-Za-z0-9+/]+={0,2}$/.test(e)||e.length%4!==0)return"";let r=Buffer.from(e,"base64");return r.toString("base64").replace(/=+$/,"")!==e.replace(/=+$/,"")?"":r.toString("utf8")}function iN(t){let e=t.MICROI_LABEL_BASE64||"";if(e){let r=nre(e);if(r)return r}return t.MICROI_LABEL||""}function oN(t,e,r,n="",i=""){try{let o=JSON.parse(Kl.default.readFileSync(t,"utf-8")),a=String(e||"").replace(/\/+$/,""),s=xd(e,r,n,i),c=r?s.filter(u=>u!==a):s;return sd(c.map(u=>Ua(o[u])))||Ua(o[a])}catch{return}}function ire(t){let e=t.body,r=String(t.headers["content-type"]||"");if(typeof e=="string"){/^application\/json\b/i.test(r)||(t.headers["content-type"]="application/json");try{return JSON.parse(e)}catch{return e}}if(e&&typeof e=="object")return/^application\/json\b/i.test(r)||(t.headers["content-type"]="application/json"),e}async function ore(){let t={apiBaseUrl:(process.env.MICROI_API_URL||"").replace(/\/+$/,""),username:process.env.MICROI_USERNAME||"",password:process.env.MICROI_PASSWORD||"",osClient:process.env.MICROI_OS_CLIENT||"",osClientType:process.env.MICROI_OS_CLIENT_TYPE||"",osClientNetwork:process.env.MICROI_OS_CLIENT_NETWORK||"",rsaPublicKey:process.env.MICROI_RSA_PUBLIC_KEY||void 0,token:process.env.MICROI_TOKEN||void 0,workspaceCredentialFilePath:process.env.MICROI_WORKSPACE_CREDENTIAL_FILE||void 0,workspaceCredentialUsernameKey:process.env.MICROI_WORKSPACE_USERNAME_KEY||void 0,workspaceCredentialPasswordKey:process.env.MICROI_WORKSPACE_PASSWORD_KEY||void 0},e=process.env.MICROI_TOKEN_FILE;if(e){t.tokenFilePath=e,t.authRecoveryRequestDir=process.env.MICROI_AUTH_RECOVERY_DIR||void 0;let n=oN(e,t.apiBaseUrl,t.osClient||"",t.osClientType||"",t.osClientNetwork||"");n&&(t.token=n)}if((process.env.MCP_TRANSPORT||"stdio")==="sse")t.apiBaseUrl||(console.error("Missing required: MICROI_API_URL (Microi backend API URL)"),process.exit(1)),await sre(parseInt(process.env.MCP_PORT||"3000",10),t);else{t.apiBaseUrl||(console.error("Missing required: MICROI_API_URL"),process.exit(1));let n=!!t.workspaceCredentialFilePath&&!!t.workspaceCredentialUsernameKey&&!!t.workspaceCredentialPasswordKey&&Kl.default.existsSync(t.workspaceCredentialFilePath);!t.token&&(!t.username||!t.password)&&!n&&(console.error("Missing required environment variables:"),console.error(" MICROI_API_URL - Microi backend API URL (e.g. https://api.example.com)"),console.error(" MICROI_TOKEN_FILE - Token file path (preferred, auto-managed by VS Code extension)"),console.error(" MICROI_AUTH_RECOVERY_DIR - Optional credential-free VS Code recovery request directory"),console.error(" MICROI_WORKSPACE_CREDENTIAL_FILE - Optional Windows DPAPI workspace credential vault"),console.error(" MICROI_TOKEN - JWT token (fallback)"),console.error(" MICROI_USERNAME - Login username (fallback if no token)"),console.error(" MICROI_PASSWORD - Login password (fallback if no token)"),console.error("Optional:"),console.error(" MICROI_OS_CLIENT - OsClient identifier"),console.error(" MICROI_OS_CLIENT_TYPE - Optional OsClient type for exact transport/token identity"),console.error(" MICROI_OS_CLIENT_NETWORK - Optional OsClient network for exact transport/token identity"),process.exit(1));let i=new Kc(t);await i.login();let o={osClient:t.osClient||"",osClientType:t.osClientType||"",osClientNetwork:t.osClientNetwork||"",apiBaseUrl:t.apiBaseUrl,label:iN(process.env),codexMode:process.env.MICROI_CODEX_MODE==="1"},a=Cw(i,o);await are(a),e&&Kl.default.watchFile(e,{interval:5e3},()=>{let c=oN(e,t.apiBaseUrl,t.osClient||"",t.osClientType||"",t.osClientNetwork||"");c&&(i.updateToken(c),console.error("[microi-mcp] Token updated from file"))});let s=()=>{e&&Kl.default.unwatchFile(e),i.destroy(),process.exit(0)};process.on("SIGINT",s),process.on("SIGTERM",s)}}async function are(t){let e=new Bu(process.stdin,process.stdout,{maxBufferSize:134217728});await t.connect(e),console.error("[microi-mcp] Server started (stdio mode)")}async function sre(t,e){let r=(0,Kf.default)();r.use(Kf.default.json({type:["application/json","application/*+json"],limit:"4mb"})),r.use(Kf.default.text({type:["text/plain","application/json-rpc"],limit:"4mb"}));let n=new Map;r.get("/sse",async(o,a)=>{let s=o.headers["x-microi-username"]||e.username,c=o.headers["x-microi-password"]||e.password;if(!s||!c){a.status(401).json({error:"Authentication required",message:"Provide X-Microi-Username and X-Microi-Password in request headers, or set MICROI_USERNAME / MICROI_PASSWORD environment variables."});return}try{let l=HR(o.headers,e),u=l.osClient||"",p=new Kc({apiBaseUrl:e.apiBaseUrl,username:s,password:c,...l,rsaPublicKey:e.rsaPublicKey});await p.login();let f={osClient:u||"",osClientType:l.osClientType||"",osClientNetwork:l.osClientNetwork||"",apiBaseUrl:e.apiBaseUrl,label:""},m=Cw(p,f),h=new op("/messages",a);n.set(h.sessionId,{transport:h,client:p}),a.on("close",()=>{let g=n.get(h.sessionId);g&&(g.client.destroy(),n.delete(h.sessionId),console.error(`[microi-mcp] Session ${h.sessionId} disconnected (user: ${s})`))}),console.error(`[microi-mcp] New session ${h.sessionId} (user: ${s}, osClient: ${u||"default"})`),await m.connect(h)}catch(l){let u=l instanceof Error?l.message:String(l);console.error(`[microi-mcp] SSE auth failed (user: ${s}): ${u}`),a.headersSent||a.status(401).json({error:"Authentication failed",message:u})}}),r.post("/messages",async(o,a)=>{let s=o.query.sessionId,c=n.get(s);if(!c){a.status(404).json({error:"Session not found"});return}await c.transport.handlePostMessage(o,a,ire(o))}),r.get("/health",(o,a)=>{a.json({status:"ok",server:"microi-mcp-server",version:"1.0.0",activeSessions:n.size})});let i=()=>{for(let[o,a]of n)a.client.destroy(),n.delete(o);process.exit(0)};process.on("SIGINT",i),process.on("SIGTERM",i),r.listen(t,()=>{console.error(`[microi-mcp] Server started (SSE mode) on http://localhost:${t}`),console.error(`[microi-mcp] SSE endpoint: http://localhost:${t}/sse`),console.error(`[microi-mcp] Auth: ${e.username?"env defaults available":"headers required"}`)})}ore().catch(t=>{console.error("[microi-mcp] Fatal error:",t instanceof Error?t.message:t),process.exit(1)});
|
|
614
619
|
/*! Bundled license information:
|
|
615
620
|
|
|
616
621
|
bytes/index.js:
|
package/scripts/microi-cli.js
CHANGED
|
@@ -1336,9 +1336,9 @@ declare function JSON_Decode(json: string): any;
|
|
|
1336
1336
|
|
|
1337
1337
|
## Microi \u5DE5\u4F5C\u533A\u5F3A\u5236\u89C4\u5219\u552F\u4E00\u6765\u6E90
|
|
1338
1338
|
|
|
1339
|
-
\u6BCF\u6B21\u65B0\u5BF9\u8BDD\u6216\u63A5\u7EED Microi \u4EFB\u52A1\uFF0C\u5148\u5B8C\u6574\u8BFB\u53D6 \`microi.skills/workspace-conventions/SKILL.md\`\uFF0C\u6309\u9996\u90E8\u6267\u884C\u521B\u59CB\u4EBA\u8EAB\u4EFD\u8BC6\u522B\u53CA\u5E73\u53F0\u529F\u80FD\u56DB\u9879\u540C\u6B65\u68C0\u67E5\uFF08\u5E94\u7528\u5546\u57CE\u3001\u5B98\u65B9\u6587\u6863\u3001Skills\u3001MCP\uFF09\uFF0C\u518D\u8BFB\u53D6\u5F53\u524D\u4EFB\u52A1\u6240\u9700\u4E13\u9879 Skill\u3002\u5B8C\u6574\u89C4\u5219\u4EC5\u7EF4\u62A4\u5728\u8BE5\u57FA\u7840\u5165\u53E3\uFF1B\u672C\u6587\u4EF6\u4E0E\u751F\u6210\u6A21\u677F\u4E0D\u590D\u5236\u89C4\u5219\u6B63\u6587\uFF0C\u4E5F\u4E0D\u628A\u53EA\u8BFB\u4EFB\u52A1\u6216\u5B98\u65B9\u53D1\u5E03\u6269\u5F20\u4E3A\u5BA2\u6237\u81EA\u52A8\u90E8\u7F72\u3002
|
|
1339
|
+
\u6BCF\u6B21\u65B0\u5BF9\u8BDD\u6216\u63A5\u7EED Microi \u4EFB\u52A1\uFF0C\u5148\u5B8C\u6574\u8BFB\u53D6 \`microi.skills/workspace-conventions/SKILL.md\`\uFF0C\u6309\u9996\u90E8\u6267\u884C\u521B\u59CB\u4EBA\u8EAB\u4EFD\u8BC6\u522B\u53CA\u5E73\u53F0\u529F\u80FD\u56DB\u9879\u540C\u6B65\u68C0\u67E5\uFF08\u5E94\u7528\u5546\u57CE\u3001\u5B98\u65B9\u6587\u6863\u3001Skills\u3001MCP\uFF09\uFF0C\u5E76\u5BF9\u4EFB\u4F55 AI \u6A21\u578B\u5F3A\u5236\u6267\u884C\u7248\u672C\u68C0\u67E5\u3001\u81EA\u52A8\u5347\u7EA7\u53CA\u8FDB\u5EA6\u64AD\u62A5\uFF0C\u518D\u8BFB\u53D6\u5F53\u524D\u4EFB\u52A1\u6240\u9700\u4E13\u9879 Skill\u3002\u5B8C\u6574\u89C4\u5219\u4EC5\u7EF4\u62A4\u5728\u8BE5\u57FA\u7840\u5165\u53E3\uFF1B\u672C\u6587\u4EF6\u4E0E\u751F\u6210\u6A21\u677F\u4E0D\u590D\u5236\u89C4\u5219\u6B63\u6587\uFF0C\u4E5F\u4E0D\u628A\u53EA\u8BFB\u4EFB\u52A1\u6216\u5B98\u65B9\u53D1\u5E03\u6269\u5F20\u4E3A\u5BA2\u6237\u81EA\u52A8\u90E8\u7F72\u3002
|
|
1340
1340
|
`,lt=`<!-- Generated by Microi\u543E\u7801 VSCode Extension - DO NOT REMOVE THIS LINE -->
|
|
1341
|
-
`,qn="\n\n## Microi\u543E\u7801\u975E\u963B\u585E\u81EA\u52A8\u66F4\u65B0\u89C4\u8303\uFF08\u5F3A\u5236\uFF09\n\n- VS Code \u6269\u5C55\u3001`@microi.net/cli`\u3001Codex \u63D2\u4EF6\u4E0E\u68C0\u6D4B\u5230\u7684 DeepSeek Harness profile bundle \u9ED8\u8BA4\u5728\u540E\u53F0\u4ECE\u5B98\u65B9\u5206\u53D1\u6E90\u68C0\u67E5\u548C\u5B89\u88C5\u66F4\u65B0\uFF1B\u66F4\u65B0\u68C0\u67E5\u4E0D\u5F97\u6210\u4E3A\u5206\u6790\u3001MCP \u8C03\u7528\u3001\u6E90\u7801\u4FEE\u6539\u3001\u6784\u5EFA\u3001\u53D1\u5E03\u6216\u4EFB\u4F55\u65B0\u4EFB\u52A1\u7684\u524D\u7F6E\u95E8\u7981\u3002\n- CLI \u4F7F\u7528 npm \u5B98\u65B9 registry\uFF1A`npm view '@microi.net/cli' version --json --prefer-online --registry=https://registry.npmjs.org/`\uFF1BVS Code \u6269\u5C55\u4F7F\u7528\u5B98\u65B9\u6269\u5C55\u5BBF\u4E3B\u7684\u5B89\u88C5/\u81EA\u52A8\u66F4\u65B0\u80FD\u529B\u3002\u7981\u6B62\u7528\u7B2C\u4E09\u65B9 registry \u6216\u4E0D\u660E\u955C\u50CF\u5192\u5145\u5B98\u65B9\u66F4\u65B0\u3002\n- \u81EA\u52A8\u66F4\u65B0\u7531 `microi update --background --workspace \"<\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84>\" --json` \u6295\u9012\u3002\u5B83\u4F1A\u5728\u540E\u53F0\u5347\u7EA7\u5168\u5C40 CLI\u3001\u66F4\u65B0 Codex \u63D2\u4EF6\u4E0E DeepSeek Harness bundle\uFF1B\u4EC5\u5F53\u5DE5\u4F5C\u533A\u5DF2\u6709\u6709\u6548 Microi \u670D\u52A1\u5668\u8FDE\u63A5\u65F6\uFF0C\u624D\u5E42\u7B49\u6267\u884C `microi ai init` \u4E0E `microi doctor`\uFF0C\u968F\u540E\u6267\u884C `microi codex status` \u4E0E `microi dsh status`\uFF1B\u672A\u68C0\u6D4B\u5230 DSH \u65F6\u5B89\u9759\u8DF3\u8FC7\u3002`codex install --yes` \u4E2D\u7684 `--yes` \u53EA\u4E3A\u517C\u5BB9\u65E7\u811A\u672C\uFF0C\u4E0D\u518D\u4EE3\u8868\u5DE5\u4F5C\u6388\u6743\u95E8\u69DB\u3002\n- \u5F53\u524D\u8FD0\u884C\u4E2D\u7684\u6269\u5C55\u3001CLI\u3001Codex Router\u3001DSH \u4F1A\u8BDD\u548C MCP \u7EE7\u7EED\u4F7F\u7528\u5DF2\u52A0\u8F7D\u7248\u672C\uFF1B\u4E0D\u5F97\u4E3A\u4E86\u5347\u7EA7\u6740\u8FDB\u7A0B\u3001\u5F3A\u5236\u91CD\u8F7D\u7A97\u53E3\u3001\u7EC8\u6B62\u5BF9\u8BDD\u6216\u6682\u505C\u7528\u6237\u4EFB\u52A1\u3002\u65B0\u7248\u672C\u53EA\u5728\u540E\u7EED\u65B0\u8FDB\u7A0B\u6216\u5BBF\u4E3B\u81EA\u7136\u91CD\u542F\u65F6\u63A5\u7BA1\u3002\n- registry \u4E0D\u53EF\u7528\u3001\u6743\u9650\u4E0D\u8DB3\u3001\u6587\u4EF6\u88AB\u8FD0\u884C\u4E2D\u4EFB\u52A1\u5360\u7528\u3001\u5B89\u88C5\u5931\u8D25\u6216\u5BBF\u4E3B\u6682\u4E0D\u652F\u6301\u70ED\u66F4\u65B0\u65F6\uFF0C\u8BB0\u5F55\u53EF\u8BCA\u65AD\u72B6\u6001\u5E76\u5728\u540E\u53F0\u5EF6\u540E\u91CD\u8BD5\uFF1B\u53EF\u4EE5\u975E\u6A21\u6001\u63D0\u793A\u7528\u6237\u201C\u7ACB\u5373\u91CD\u8BD5/\u67E5\u770B\u65E5\u5FD7\u201D\uFF0C\u4F46\u65E0\u8BBA\u7528\u6237\u662F\u5426\u5904\u7406\uFF0C\u90FD\u5FC5\u987B\u5141\u8BB8\u5F53\u524D\u3001\u6B63\u5728\u8FDB\u884C\u548C\u65B0\u5EFA\u5DE5\u4F5C\u7EE7\u7EED\u3002\n",ns="\n\n## \u63A5\u53E3\u5F15\u64CE\u4E0E\u5E94\u7528\u5546\u57CE\u4F18\u5148\u89C4\u8303\uFF08\u5F3A\u5236\uFF09\n\n- \u65B0\u589E\u4E1A\u52A1\u903B\u8F91\u5148\u5224\u65AD\u73B0\u6709\u4F4E\u4EE3\u7801 CRUD/\u8868\u5355\u4E8B\u4EF6\u80FD\u5426\u5B8C\u6210\uFF1B\u5176\u6B21\u4F7F\u7528\u63A5\u53E3\u5F15\u64CE\u3002\u53EA\u6709\u7F3A\u5C11\u53EF\u590D\u7528\u5E95\u5C42\u539F\u5B50\u80FD\u529B\u65F6\u624D\u6269\u5C55 V8\uFF0C\u5E76\u7EE7\u7EED\u7531\u63A5\u53E3\u5F15\u64CE\u7F16\u6392\uFF1B\u5E73\u53F0\u534F\u8BAE\u3001\u53EF\u4FE1\u9274\u6743\u3001\u5BC6\u94A5\u9694\u79BB\u3001\u5B58\u50A8/\u7F51\u7EDC\u8FB9\u754C\u548C\u8FD0\u884C\u65F6\u5185\u6838\u624D\u5141\u8BB8\u76F4\u63A5\u5199 C# Controller/Service\u3002\n- \u4FEE\u6539 `Microi.Server` \u524D\u5FC5\u987B\u8BF4\u660E\u4E3A\u4EC0\u4E48\u4E0D\u80FD\u4F7F\u7528\u63A5\u53E3\u5F15\u64CE\u3002\u7B2C\u4E09\u65B9 HTTP \u96C6\u6210\u9ED8\u8BA4\u4F7F\u7528 `V8.Http`\uFF1B\u5BC6\u94A5\u4E0D\u80FD\u66B4\u9732\u7ED9\u53EF\u7F16\u8F91 V8 \u65F6\uFF0C\u53EA\u5728 C# \u63D0\u4F9B\u6700\u5C0F\u3001\u79DF\u6237\u9694\u79BB\u4E14\u4E0D\u53EF\u8986\u76D6\u5BC6\u94A5\u7684\u5B89\u5168\u539F\u5B50\u65B9\u6CD5\u3002\u7B2C\u4E09\u65B9\u56DE\u8C03\u91C7\u7528\u201CC# \u6700\u5C0F\u534F\u8BAE\u7F51\u5173 + `Managed` \u6838\u5FC3\u63A5\u53E3\u5F15\u64CE + `CreateIfMissing` \u79DF\u6237 Hook\u201D\uFF0CC# \u4E0D\u627F\u8F7D\u65E5\u5FD7\u3001\u5199\u8868\u3001\u901A\u77E5\u7B49\u4E1A\u52A1\u3002\n- \u7B2C\u4E09\u65B9\u4E0D\u652F\u6301 QueryString \u65F6\u4F7F\u7528 `/path--OsClient--{OsClient}--`\uFF1B\u652F\u6301 Query \u65F6\u56FA\u5B9A\u4F7F\u7528 `?OsClient=`\uFF0C\u7981\u6B62 `?o=`\u3002\u8DEF\u5F84\u4E0E Query \u540C\u65F6\u51FA\u73B0\u65F6\u5FC5\u987B\u4E00\u81F4\u3002\n- \u8868\u3001\u5B57\u6BB5\u3001Tab\u3001\u83DC\u5355\u3001\u6743\u9650\u3001\u63A5\u53E3\u5F15\u64CE\u3001\u4E8B\u4EF6\u3001\u6570\u636E\u6E90\u3001\u9875\u9762\u3001\u6253\u5370\u3001\u5DE5\u4F5C\u6D41\u3001\u4EFB\u52A1\u548C\u53EF\u5E42\u7B49\u79CD\u5B50\u6570\u636E\u5FC5\u987B\u4F18\u5148\u901A\u8FC7\u5E94\u7528\u5546\u57CE\u5347\u7EA7\uFF0C\u4E0D\u5F97\u4E3A\u8FD9\u4E9B\u8D44\u6E90\u5728 `Microi.Server/Microi.Upgrade/` \u65B0\u589E\u5B9A\u5236 .NET \u8FC1\u79FB\u3002\n- \u5E94\u7528\u5305\u63A5\u53E3\u5F15\u64CE\u5FC5\u987B\u58F0\u660E `ResourcePolicies.ApiEngines`\u3002\u5B98\u65B9\u6838\u5FC3\u4F7F\u7528 `Managed`\uFF0C\u4EC5\u5F53\u76EE\u6807\u7AEF `Local == Base` \u624D\u66F4\u65B0\uFF1B\u79DF\u6237\u6269\u5C55\u4F7F\u7528 `CreateIfMissing`\uFF0C\u9996\u6B21\u521B\u5EFA\u540E\u6C38\u4E0D\u8986\u76D6\uFF0C\u540C\u4E00 Key \u540E\u7EED\u4E5F\u7981\u6B62\u6539\u56DE `Managed`\uFF0C\u786E\u9700\u5B98\u65B9\u63A5\u7BA1\u65F6\u53D1\u5E03\u65B0 Key\u3002\u53D1\u73B0\u6838\u5FC3\u88AB\u5BA2\u6237\u4FEE\u6539\u65F6\u6574\u5305\u51B2\u7A81\u56DE\u6EDA\uFF0C\u4E0D\u81EA\u52A8\u5408\u5E76\u53EF\u6267\u884C\u4EE3\u7801\u3002\n- \u6709\u5B98\u65B9\u6743\u9650\u65F6\u4F7F\u7528\u7ED1\u5B9A `https://api.itdos.com`\u3001`OsClient=iTdos` \u7684 `microi_itdos` \u66F4\u65B0\u5E76\u53D1\u5E03\u5B98\u65B9\u5E94\u7528\uFF0C\u518D\u7531\u76EE\u6807\u79DF\u6237 MCP \u5B89\u88C5/\u66F4\u65B0\u548C\u56DE\u8BFB\uFF1B\u65E0\u5B98\u65B9\u6743\u9650\u65F6\u53EA\u901A\u8FC7\u5F53\u524D\u7528\u6237\u81EA\u5DF1\u7684 MCP/Manifest \u5347\u7EA7\u5176\u6570\u636E\u5E93\u3002\n- `Microi.Upgrade` \u53EA\u4FDD\u7559\u5E94\u7528\u5546\u57CE\u8FD0\u884C\u524D\u5FC5\u9700\u7684\u6838\u5FC3\u7269\u7406\u517C\u5BB9/\u534F\u8BAE\u8FC1\u79FB\uFF0C\u5E76\u8981\u6C42\u7248\u672C\u95E8\u3001\u5171\u4EAB\u79DF\u7EA6\u3001\u5E42\u7B49\u548C\u5931\u8D25\u4E0D\u63A8\u8FDB\u7248\u672C\u3002\u7981\u6B62\u6BCF\u6B21\u542F\u52A8\u6309\u79DF\u6237\u91CD\u8DD1\u4E0D\u65AD\u589E\u957F\u7684\u5386\u53F2\u8FC1\u79FB\u6E05\u5355\u3002\u8BE6\u7EC6\u89C4\u5219\u8BFB\u53D6 `microi.skills/workspace-conventions/SKILL.md` \u4E0E `microi.skills/app-store/SKILL.md`\u3002\n",bi="\n\n## \u540E\u7AEF API \u914D\u7F6E\u767D\u540D\u5355\u4E0E SaaS \u5355\u4E00\u4E8B\u5B9E\u6E90\uFF08\u5F3A\u5236\uFF09\n\n- `Microi.net.Api` \u7684 `AppSettings` \u4E0E\u540C\u540D\u5BB9\u5668\u73AF\u5883\u53D8\u91CF\u53EA\u5141\u8BB8\uFF1A`OsClient`\u3001`OsClientType`\u3001`OsClientNetwork`\u3001`OsClientDbType`\u3001`OsClientDbConn`\u3001`OsClientRedisHost`\u3001`OsClientRedisPort`\u3001`OsClientRedisPwd`\u3001`OsClientRedisDataBase`\u3001`OsClientDbMongoConn`\u3002\n- \u9664\u4E0A\u8FF0\u5341\u9879\u5916\uFF0C\u4E1A\u52A1\u5F00\u5173\u3001\u91CD\u8BD5\u3001\u8D85\u65F6\u3001\u9650\u989D\u3001\u5B89\u5168\u7B56\u7565\u3001\u5BC6\u94A5\u548C\u53EF\u6267\u884C\u6587\u4EF6\u8DEF\u5F84\u5FC5\u987B\u8FDB\u5165 SaaS \u5F15\u64CE `sys_osclients` \u7684\u5408\u9002 Tab\uFF1B\u7981\u6B62\u65B0\u589E `MICROI_*`\u3001`DOS_ORM_*`\u3001\u989D\u5916 `AppSettings` \u8282\u70B9\u6216\u52A8\u6001\u73AF\u5883\u53D8\u91CF\u8BFB\u53D6\u3002\n- `ASPNETCORE_*`\u3001`DOTNET_*` \u53EA\u5C5E\u4E8E .NET \u5BBF\u4E3B\uFF1B\u6D4B\u8BD5\u3001\u6784\u5EFA\u3001\u5B89\u88C5\u3001MCP \u548C\u53D1\u5E03\u811A\u672C\u53EF\u4F7F\u7528\u81EA\u8EAB\u8FDB\u7A0B\u53D8\u91CF\uFF0C\u4F46\u751F\u4EA7 API \u4E0D\u5F97\u8BFB\u53D6\u5B83\u4EEC\u63A7\u5236\u4E1A\u52A1\u884C\u4E3A\u3002\n- \u65B0\u914D\u7F6E\u5FC5\u987B\u914D\u5957\u5E42\u7B49\u5347\u7EA7\u3001\u9ED8\u8BA4\u503C\u3001\u7F13\u5B58\u5237\u65B0\u3001\u654F\u611F\u5B57\u6BB5\u8131\u654F\u3001\u5B50\u79DF\u6237\u9694\u79BB\u3001\u6587\u6863\u548C\u6E90\u7801\u626B\u63CF\u6D4B\u8BD5\uFF1B\u9A8C\u6536\u9700\u626B\u63CF\u751F\u4EA7\u6E90\u7801\u3001API \u914D\u7F6E\u53CA\u5728\u7EBF/\u79BB\u7EBF Compose\u3002\n",ki="\n\n---\n\n## \u6570\u636E\u5E93\u7ED3\u6784\n\n\u6570\u636E\u5E93\u7ED3\u6784\u4E0D\u4F1A\u5199\u5165\u672C\u57FA\u7840\u77E5\u8BC6\u5E93\u6587\u4EF6\uFF0C\u907F\u514D\u4E0D\u540C\u5F00\u53D1\u8005\u8FDE\u63A5\u4E0D\u540C\u670D\u52A1\u5668\u540E\u4EA7\u751F\u63D0\u4EA4\u51B2\u7A81\u3002\n\n\u7F16\u5199 `V8.FormEngine` \u6216 `V8.Db` \u4EE3\u7801\u65F6\uFF1A\n- \u4F18\u5148\u901A\u8FC7 MCP \u5DE5\u5177 `microi_get_db_schema` \u83B7\u53D6\u5F53\u524D\u670D\u52A1\u5668\u7684\u5B9E\u65F6\u8868\u7ED3\u6784\u3002\n- \u5982\u9700\u8BFB\u53D6\u672C\u5730\u5FEB\u7167\uFF0C\u8BF7\u67E5\u770B\u5F53\u524D\u5F15\u64CE\u6587\u4EF6\u6240\u5C5E OsClient \u76EE\u5F55\u4E0B\u7684 `.microi-db-schema.md`\u3002\n\n\u4ECE\u81EA\u7136\u8BED\u8A00\u9700\u6C42\u521B\u5EFA\u5B8C\u6574 Microi \u4F4E\u4EE3\u7801\u7CFB\u7EDF\u65F6\uFF1A\n- \u5148\u8C03\u7528 `microi_get_db_schema` \u4E86\u89E3\u5DF2\u6709\u8868\u3001\u83DC\u5355\u3001\u5B57\u6BB5\uFF0C\u907F\u514D\u91CD\u590D\u5EFA\u6A21\u3002\n- \u518D\u8C03\u7528 `microi_get_manifest_schema` \u83B7\u53D6\u5B8C\u6574 Manifest \u534F\u8BAE\u548C\u793A\u4F8B\u3002\n- \u5C06\u9700\u6C42\u6574\u7406\u4E3A Manifest\uFF0C\u6A21\u5757\u914D\u7F6E\u4F18\u5148\u5199\u5B57\u6BB5\u540D\uFF1A`listFields`\u3001`searchFields`\u3001`sortFields`\u3001`hiddenFields`\u3001`mobileFields`\u3001`cardTitleFields`\u3001`cardBottomFields`\u3002MCP \u4F1A\u81EA\u52A8\u89E3\u6790\u4E3A `diy_field.Id`\u3001`SelectFields`\u3001`SearchFieldIds` \u7B49 `sys_menu` \u6240\u9700\u683C\u5F0F\u3002\n- \u521B\u5EFA\u7ED1\u5B9A `diyTableId` \u7684\u540E\u53F0\u83DC\u5355\u65F6\uFF0C\u5FC5\u987B\u914D\u7F6E\u6216\u5141\u8BB8 MCP/\u540E\u7AEF\u81EA\u52A8\u63A8\u65AD `TableDiyFieldIds`\u3001`SelectFields`\u3001`SearchFieldIds`\u3001`SortFieldIds`\u3001`NotShowFields`\u3001`StatisticsFields`\u3001`MobileListFields`\u3001`CardTitleTagFields`\u3001`CardBottomTagFields`\u3001`DefaultOrderBy`\u3002\n- `NotShowFields` \u9ED8\u8BA4\u9690\u85CF Id/\u5916\u952E/\u7CFB\u7EDF\u5B57\u6BB5/\u5E03\u5C40\u63A7\u4EF6/\u4E0A\u4F20\u5BCC\u6587\u672C\u5730\u56FE\u5B50\u8868\u7B49\u91CD\u5B57\u6BB5\uFF1B`SearchFieldIds` \u9ED8\u8BA4\u9009\u62E9\u540D\u79F0\u3001\u6807\u9898\u3001\u7F16\u53F7\u3001\u72B6\u6001\u3001\u5206\u7C7B\u3001\u8D1F\u8D23\u4EBA\u3001\u65F6\u95F4\u7B49\u5E38\u7528\u7B5B\u9009\uFF1B`StatisticsFields` \u9ED8\u8BA4\u9009\u62E9\u91D1\u989D\u3001\u4EF7\u683C\u3001\u6570\u91CF\u3001\u79EF\u5206\u3001\u4F59\u989D\u7B49\u6570\u503C\u5B57\u6BB5\uFF1B\u79FB\u52A8\u7AEF/\u5361\u7247\u5217\u9ED8\u8BA4\u4FDD\u7559 3-4 \u4E2A\u6838\u5FC3\u53EF\u8BFB\u5B57\u6BB5\u3002\n- \u8868\u5355\u63A7\u4EF6\u4EE5 `Microi.Client/src/views/form-engine/diy-field-component/diy-component-list.json` \u4E3A\u4E8B\u5B9E\u6E90\u3002\u5B57\u6BB5\u8F83\u591A\u65F6\u4F18\u5148\u4F7F\u7528 `diy_table.Tabs` \u548C\u5B57\u6BB5 `Tab` \u5206\u7EC4\uFF0C\u5C40\u90E8\u590D\u6742\u533A\u57DF\u518D\u7528 `CollapseGroup` \u6216\u5B57\u6BB5\u7EA7 `Tabs` \u63A7\u4EF6\u6298\u53E0/\u5206\u6BB5\u3002\n- \u751F\u6210\u6216\u65B0\u589E\u5B57\u6BB5\u65F6\uFF0C\u666E\u901A\u5B57\u6BB5\u9ED8\u8BA4\u4E0D\u8981\u8BBE\u7F6E `diy_field.FormWidth`\uFF08\u4FDD\u6301 null/\u7701\u7565\uFF09\uFF1B\u53EA\u6709 `CodeEditor`\u3001`Textarea`\u3001`RichText`\u3001\u4E0A\u4F20\u3001\u5B50\u8868\u3001\u5730\u56FE/\u5E03\u5C40/\u81EA\u5B9A\u4E49\u7B49\u9700\u8981\u72EC\u5360\u6574\u884C\u7684\u63A7\u4EF6\u624D\u8BBE\u7F6E\u4E3A `24`\u3002\n- \u751F\u6210\u5BA1\u6279\u6D41\u65F6\uFF0CManifest \u7684 workflows \u9700\u5305\u542B FlowDesign\u3001Nodes\u3001Lines\uFF1B\u8FDE\u7EBF\u6807\u9898\u9ED8\u8BA4\u4F7F\u7528 `{\u8D77\u70B9\u8282\u70B9} \u5230 {\u7EC8\u70B9\u8282\u70B9}`\uFF0C\u591A\u8DEF\u7EBF\u8282\u70B9\u4F18\u5148\u751F\u6210\u8BBE\u7F6E `V8.NextNodeId` \u7684 `LineValueV8`\u3002\n- \u4FDD\u5B58\u5DE5\u4F5C\u6D41\u524D\u8C03\u7528 `microi_check_workflow_package` \u68C0\u67E5\u62D3\u6251\uFF0C\u5FC5\u8981\u65F6\u7528 `microi_test_workflow_condition` \u5E26\u6837\u4F8B\u8868\u5355\u6570\u636E\u6D4B\u8BD5\u56FE\u5F62\u6761\u4EF6\u8DEF\u7EBF\u3002\n- \u8C03\u7528 `microi_plan_system` \u505A\u672C\u5730\u7ED3\u6784\u68C0\u67E5\uFF0C\u518D\u8C03\u7528 `microi_generate_system` \u4E14\u4FDD\u6301 `dryRun:true`\u3002\n- \u53EA\u6709\u7528\u6237\u660E\u786E\u540C\u610F\u5199\u5165\u65F6\uFF0C\u624D\u7528 `dryRun:false` \u5E76\u4F20 `confirmExecution`\uFF0C\u968F\u540E\u8C03\u7528 `microi_validate_system` \u9A8C\u6536\u3002\n",Pi='\n\n## JoinForm \u4E0E TableChild \u5173\u7CFB\u95E8\u7981\uFF08\u5F3A\u5236\uFF09\n\n- \u5148\u786E\u5B9A\u5173\u7CFB\u57FA\u6570\uFF1A`JoinForm` \u53EA\u5141\u8BB8 1:1/N:1\uFF0C\u76EE\u6807\u8868\u5FC5\u987B\u4E0E\u5F53\u524D\u8868\u4E0D\u540C\uFF0C`joinFieldName` \u5FC5\u987B\u662F\u5F53\u524D\u4E3B\u8868\u4E2D\u5DF2\u5B58\u5728\u4E14\u771F\u5B9E\u4FDD\u5B58\u76EE\u6807\u8BB0\u5F55 Id \u7684\u5B57\u6BB5\uFF1B\u7981\u6B62\u9ED8\u8BA4\u5199\u6210 `Name`\u3002\n- \u201C\u5B50\u8868\u3001\u660E\u7EC6\u3001\u6E05\u5355\u3001\u6761\u76EE\u3001\u884C\u9879\u76EE\u3001\u591A\u4E2A\u8BB0\u5F55\u201D\u9ED8\u8BA4\u662F 1:N\uFF0C\u5FC5\u987B\u4F7F\u7528 `TableChild`\u3002\u5728\u72EC\u7ACB\u5B50\u8868\u521B\u5EFA\u771F\u5B9E\u7236\u7EA7\u5916\u952E\u548C\u4EE5 `(OsClient, FK)` \u5F00\u5934\u7684\u7EC4\u5408\u7D22\u5F15\uFF0C\u5E76\u521B\u5EFA\u7ED1\u5B9A\u5B50\u8868\u4E14 `display=0\u3001appDisplay=0\u3001hasChild=0` \u7684\u9690\u85CF\u6A21\u5757\u3002\n- \u5B8C\u6574\u7CFB\u7EDF Manifest \u7684\u5173\u7CFB\u5B57\u6BB5\u5FC5\u987B\u5199\u53EF\u79FB\u690D `relation`\uFF1AJoinForm \u4F7F\u7528 `{cardinality:"N:1",targetTable,joinFieldName}`\uFF1BTableChild \u4F7F\u7528 `{cardinality:"1:N",targetTable,childForeignKey,childModule,primaryTableFieldName:"Id"}`\u3002\u7981\u6B62\u5728 Manifest \u4E2D\u7F16\u9020 `diy_table.Id` \u6216 `sys_menu.Id`\u3002\n- `microi_plan_system` / `microi_generate_system` \u4F1A\u5728\u4EFB\u4F55\u5199\u5165\u524D\u62D2\u7EDD\u81EA\u5173\u8054\u3001\u57FA\u6570/\u7EC4\u4EF6\u4E0D\u7B26\u3001\u7F3A\u5916\u952E\u3001\u7F3A\u9690\u85CF\u5B50\u83DC\u5355\u6216\u7F3A\u56DE\u67E5\u7D22\u5F15\uFF1B\u751F\u6210\u5668\u4F1A\u5728\u8868\u3001\u666E\u901A\u5B57\u6BB5\u548C\u83DC\u5355\u5C31\u7EEA\u540E\u624D\u89E3\u6790\u5F53\u524D\u79DF\u6237\u771F\u5B9E Id \u5E76\u5199\u5173\u7CFB\u5B57\u6BB5\u3002\u4E0D\u5F97\u6539\u7528\u5355\u5B57\u6BB5\u5DE5\u5177\u7ED5\u8FC7\uFF1B\u540E\u7AEF MCP \u8FB9\u754C\u4F1A\u518D\u6B21\u6821\u9A8C\u3002\n',Di="\n\n## \u6570\u636E\u5E93\u7D22\u5F15 MCP \u89C4\u8303\uFF08\u5F3A\u5236\uFF09\n\n- \u9700\u6C42\u3001\u84DD\u56FE\u3001\u63A5\u53E3\u3001Job \u6216\u8BC4\u5BA1\u4E00\u65E6\u660E\u786E\u67D0\u8868\u5B57\u6BB5\u9700\u8981\u7D22\u5F15\uFF0C\u5FC5\u987B\u5199\u5165 Manifest `tables[].indexes`\uFF0C\u5E76\u8C03\u7528 `microi_create_table_index`\uFF1B\u7981\u6B62\u5728 V8\u3001\u63A5\u53E3\u5F15\u64CE\u3001FormEngine \u6216\u4E00\u6B21\u6027 SQL \u4E2D\u624B\u5199 CREATE/DROP INDEX\u3002\n- \u521B\u5EFA\u524D\u540E\u8C03\u7528 `microi_get_table_indexes` \u56DE\u8BFB\u771F\u5B9E\u7269\u7406\u7D22\u5F15\u3002\u5220\u9664\u53EA\u80FD\u7528 `microi_drop_table_index`\uFF0C\u4E3B\u952E\u7D22\u5F15\u7981\u6B62\u5220\u9664\u3002\n- \u79DF\u6237\u4E1A\u52A1\u7EC4\u5408\u7D22\u5F15\u901A\u5E38\u4EE5 `OsClient` \u5F00\u5934\uFF1B\u4E1A\u52A1\u552F\u4E00\u952E\u3001\u5E42\u7B49\u952E\u7528\u79DF\u6237\u8303\u56F4\u552F\u4E00\u7D22\u5F15\uFF1B\u5916\u952E\u3001\u5B50\u8868\u3001Job/outbox/\u5F85\u529E\u626B\u63CF\u6309\u771F\u5B9E WHERE/JOIN/ORDER BY \u8BBE\u8BA1\u3002\n- \u4E0D\u5F97\u628A SearchFieldIds\u3001SortFieldIds\u3001StatisticsFields \u673A\u68B0\u8F6C\u6362\u6210\u4E00\u6279\u5355\u5217\u7D22\u5F15\uFF1B\u4F4E\u57FA\u6570\u5B57\u6BB5\u3001LIKE '%keyword%' \u548C\u957F\u6587\u672C\u4E0D\u80FD\u6EE5\u7528\u666E\u901A B-tree \u7D22\u5F15\u3002\n- DIY \u8868\u7D22\u5F15\u56DE\u8BFB\u540E\u8FD8\u5FC5\u987B\u80FD\u5728 Microi.Client \u201C\u5F00\u53D1\u8BBE\u8BA1 \u2192 \u7D22\u5F15\u7BA1\u7406\u201D\u770B\u5230\u76F8\u540C\u540D\u79F0\u3001\u6709\u5E8F\u5B57\u6BB5\u4E0E\u552F\u4E00\u6027\u3002\n",Ri="\n\n## MCP \u9ED8\u8BA4\u663E\u9690\u89C4\u5219\n\n- \u521B\u5EFA `sys_menu` \u83DC\u5355\u6A21\u5757\u65F6\uFF0C\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\u9690\u85CF\uFF0C\u5426\u5219 `Display` \u548C `AppDisplay` \u9ED8\u8BA4\u8BBE\u4E3A `1`\u3002\n- \u7ED1\u5B9A `diyTableId` \u7684\u83DC\u5355\u9ED8\u8BA4\u8865\u9F50\u5217\u8868\u5217\u3001\u641C\u7D22\u5217\u3001\u9690\u85CF\u5217\u3001\u6392\u5E8F\u5217\u3001\u7EDF\u8BA1\u5217\u3001\u79FB\u52A8\u7AEF/\u5361\u7247\u5217\u548C\u9ED8\u8BA4\u6392\u5E8F\uFF1B\u7528\u6237\u663E\u5F0F\u4F20\u5165\u7684 `sys_menu` JSON \u4F18\u5148\u3002\n- \u521B\u5EFA `diy_field` \u5B57\u6BB5\u65F6\uFF0C\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\u9690\u85CF\uFF0C\u5426\u5219 `Visible` \u548C `AppVisible` \u9ED8\u8BA4\u8BBE\u4E3A `1`\u3002\n- \u5B57\u6BB5\u8F83\u591A\u7684\u8868\u5355\u9ED8\u8BA4\u4F18\u5148\u751F\u6210 `diy_table.Tabs`\uFF0C\u5E76\u7ED9\u5B57\u6BB5\u5199\u5165 `Tab`\uFF1B\u6574\u884C\u63A7\u4EF6\u624D\u4F7F\u7528 `FormWidth=24`\u3002\n",Qn="\n\n## AI \u83DC\u5355\u6A21\u5757\u89C6\u89C9\u4EA4\u4ED8\u95E8\u7981\uFF08\u5F3A\u5236\uFF09\n\n- \u6BCF\u4E2A\u53EF\u89C1\u3001\u7ED1\u5B9A\u8868\u7684\u6A21\u5757\u90FD\u5FC5\u987B\u914D\u7F6E\u7D27\u51D1 Hero \u6807\u9898\u3001\u4E1A\u52A1\u526F\u6807\u9898\u548C 2-4 \u4E2A\u771F\u5B9E\u52A8\u6001\u6307\u6807\u3002\u6307\u6807\u4F18\u5148\u9009\u62E9\u91D1\u989D\u3001\u6570\u91CF\u3001\u4F59\u989D\u3001\u8FDB\u5EA6\u3001\u903E\u671F\u3001\u5F85\u5904\u7406\u7B49\u4E1A\u52A1\u805A\u5408\uFF1B\u6CA1\u6709\u5408\u9002\u6570\u503C\u5B57\u6BB5\u65F6\u4F7F\u7528\u771F\u5B9E `DataCount`\u3001`PageCount` \u6216\u771F\u5B9E\u72B6\u6001\u5206\u5E03\u515C\u5E95\u3002\u7981\u6B62\u968F\u673A\u6570\u3001\u56FA\u5B9A\u6F14\u793A\u6570\u3001\u4F2A\u7EDF\u8BA1\u6216\u53EA\u5199\u6BEB\u65E0\u4E1A\u52A1\u610F\u4E49\u7684\u603B\u6570\u3002\n- \u6BCF\u4E2A\u5217\u8868\u5B57\u6BB5\u90FD\u8981\u6309\u5B57\u6BB5\u8BED\u4E49\u8BBE\u7F6E\u5408\u7406 `TableWidth`\u3002PC \u590D\u5408\u5217\u5FC5\u987B\u7ED9\u8DB3 `MinWidth`\uFF0C\u7EC4\u7EC7\u4E3B\u5B57\u6BB5\u3001\u591A\u884C\u526F\u5B57\u6BB5\u3001\u53F3\u4FA7\u56FE\u6807/\u72B6\u6001\uFF0C\u5E76\u4ECE\u666E\u901A\u5217\u4E2D\u6392\u9664\u5DF2\u7ECF\u5C55\u793A\u7684\u91CD\u590D\u5B57\u6BB5\uFF0C\u540C\u65F6\u4FDD\u7559\u67E5\u8BE2\u4F9D\u8D56\u5B57\u6BB5\u3002\n- \u79FB\u52A8\u7AEF\u5361\u7247\u5E94\u6309\u771F\u5B9E\u4E1A\u52A1\u5B57\u6BB5\u8BBE\u8BA1\u56FE\u7247\u3001\u6807\u9898\u3001\u526F\u6807\u9898\u3001\u9876\u90E8\u6807\u7B7E\u3001\u53F3\u4FA7\u91D1\u989D/\u72B6\u6001\u3001\u5185\u5BB9\u3001Meta \u4E0E\u5E95\u90E8\u5B57\u6BB5\uFF1B\u540C\u4E00\u5B57\u6BB5\u4E0D\u5F97\u8DE8\u533A\u57DF\u91CD\u590D\u5806\u53E0\u3002\n- \u83DC\u5355\u52A8\u6001\u7EDF\u8BA1\u89D2\u6807\u53EA\u7528\u4E8E\u5C11\u6570\u9AD8\u4EF7\u503C\u5F85\u529E/\u5F02\u5E38/\u672A\u8BFB\u5165\u53E3\uFF1B\u9875\u9762\u591A Tab \u548C\u66F4\u591A V8 \u6309\u94AE\u6709\u771F\u5B9E\u4E1A\u52A1\u8BA1\u6570\u65F6\u4E5F\u5E94\u914D\u7F6E\u89D2\u6807\u3002\u6279\u91CF\u89D2\u6807\u5FC5\u987B\u907F\u514D N+1 \u67E5\u8BE2\u5E76\u63D0\u4F9B\u5B89\u5168\u964D\u7EA7\u3002\n- \u6A21\u5757\u8BBE\u8BA1\u5668\u56FA\u5B9A\u63D0\u4F9B\u201C\u6A21\u5757\u6807\u9898\u4E0E\u7EDF\u8BA1\u3001PC \u590D\u5408\u5217\u3001\u79FB\u52A8\u7AEF\u5361\u7247\u3001\u81EA\u5B9A\u4E49\u8868\u5355\u3001\u9AD8\u7EA7 JSON\u201D\u4E94\u4E2A\u5165\u53E3\u3002`EnableViewSchema` \u53EA\u63A7\u5236 Detail/Edit \u81EA\u5B9A\u4E49\u8868\u5355\uFF1B\u5173\u95ED\u540E\u7D27\u51D1\u6807\u9898\u3001\u52A8\u6001\u6307\u6807\u3001\u5217\u8868\u5BC6\u5EA6\u3001PC \u590D\u5408\u5217\u548C\u79FB\u52A8\u7AEF\u5361\u7247\u4ECD\u7136\u751F\u6548\u3002\n- \u5E73\u53F0\u81EA\u52A8\u751F\u6210\u7684 List/Card \u4E0E\u771F\u5B9E\u6570\u636E\u515C\u5E95\u53EA\u662F\u6700\u4F4E\u4FDD\u969C\u3002AI \u4EA4\u4ED8\u65F6\u4ECD\u987B\u6839\u636E\u4E1A\u52A1\u8BED\u4E49\u4E3B\u52A8\u5B8C\u5584\u5E76\u56DE\u8BFB\u9A8C\u8BC1\uFF0C\u4E0D\u5F97\u56E0\u4E3A\u5E73\u53F0\u5DF2\u6709\u9ED8\u8BA4\u503C\u800C\u7701\u7565\u8BBE\u8BA1\u3002\n",Ii="\n\n## MCP \u5199\u5165\u8D85\u65F6\u3001\u6E90\u7801\u5B8C\u6574\u6027\u4E0E\u56DE\u8BFB\u89C4\u5219\n\n- \u4F18\u5148\u4F7F\u7528\u8BED\u4E49\u660E\u786E\u7684\u6807\u51C6 MCP \u5DE5\u5177\uFF1A\u63A5\u53E3\u5F15\u64CE\u4EE3\u7801\u7528 `microi_save_engine_code`\uFF0C\u8868\u5355\u4E8B\u4EF6\u7528 `microi_save_event_code`\uFF0C\u83DC\u5355\u6309\u94AE\u3001Tab\u3001SqlJoin\u3001SqlWhere \u7528 `microi_update_module`\u3002\u4E0D\u8981\u5148\u7ED5\u5230\u539F\u751F HTTP\u3001FormEngine \u6216 SQL\u3002\n- MCP \u5199\u8BF7\u6C42\u8D85\u65F6\u53EA\u8868\u793A\u5BA2\u6237\u7AEF\u672A\u53CA\u65F6\u6536\u5230\u54CD\u5E94\uFF0C\u4E0D\u8868\u793A\u670D\u52A1\u5668\u4E00\u5B9A\u6CA1\u6709\u5199\u5165\u3002\u4E0A\u8FF0\u6807\u51C6\u5199\u5DE5\u5177\u4EE5\u53CA `microi_create_engine` \u4F1A\u81EA\u52A8\u77ED\u8D85\u65F6\u56DE\u8BFB\uFF1B\u8FD4\u56DE `RecoveredAfterTransportError:true` \u65F6\u5E94\u89C6\u4E3A\u5DF2\u786E\u8BA4\u6210\u529F\u3002\n- \u6062\u590D\u6027\u56DE\u8BFB\u5FC5\u987B\u4F7F\u7528\u72EC\u7ACB\u77ED\u8D85\u65F6\uFF0C\u4E0D\u80FD\u6CBF\u7528\u666E\u901A\u67E5\u8BE2\u957F\u8D85\u65F6\u5E76\u957F\u671F\u505C\u7559\u5728\u201C\u7B49\u5F85\u8FDC\u7AEF\u56DE\u8BFB\u201D\u3002\u5982\u679C\u6807\u51C6\u5DE5\u5177\u8FD4\u56DE\u201C\u5199\u5165\u7ED3\u679C\u4E0D\u786E\u5B9A\u201D\uFF0C\u53EA\u7528\u5BF9\u5E94 get \u5DE5\u5177\u7EE7\u7EED\u56DE\u8BFB\u4E00\u6B21\u5E76\u62A5\u544A\u771F\u5B9E\u5DEE\u5F02\u3002\n- `\u2026N tokens truncated\u2026`\u3001`Exit code:`\u3001`Chunk ID:`\u3001`Wall time:` \u662F AI/\u7EC8\u7AEF\u5DE5\u5177\u5305\u88C5\u6587\u672C\uFF0C\u4E0D\u662F V8 \u6E90\u7801\u3002\u8BFB\u53D6\u957F\u6E90\u7801\u5FC5\u987B\u6309 MCP \u8FD4\u56DE\u7684\u5B57\u7B26\u533A\u95F4\u53D6\u5B8C\u5E76\u6838\u5BF9 SHA-256\uFF1B\u63D2\u4EF6\u63A8\u9001\u548C MCP \u5199\u5DE5\u5177\u68C0\u6D4B\u5230\u8FD9\u4E9B\u6807\u8BB0\u65F6\u5FC5\u987B\u62D2\u7EDD\u5199\u5165\u3002\u8FDC\u7AEF\u6E90\u7801\u4E0D\u5C11\u4E8E 8000 \u5B57\u7B26\u4E14\u65B0\u6E90\u7801\u7A81\u7136\u51CF\u5C11\u8D85\u8FC7 15% \u65F6\uFF0C\u672A\u6838\u5BF9\u5B8C\u6574\u6E90\u7801\u524D\u4E0D\u5F97\u786E\u8BA4\u5927\u5E45\u5220\u51CF\u3002\n- \u7981\u6B62\u56E0\u4E3A\u8D85\u65F6\u91CD\u590D\u5EFA\u8868\u3001\u91CD\u590D\u52A0\u5B57\u6BB5\u3001\u91CD\u590D\u521B\u5EFA\u63A5\u53E3\u5F15\u64CE\uFF0C\u6216\u65B0\u5EFA\u4E00\u6B21\u6027\u7EF4\u62A4\u5F15\u64CE\u7ED5\u8FC7\u539F\u64CD\u4F5C\u3002\u521B\u5EFA\u63A5\u53E3\u5F15\u64CE\u6570\u636E\u5E93\u5165\u5E93\u6210\u529F\u4F46\u8DEF\u7531\u7F13\u5B58\u5237\u65B0\u8D85\u65F6\u65F6\uFF0C\u5E94\u4FDD\u7559\u6210\u529F\u7ED3\u679C\u5E76\u68C0\u67E5 `CacheRefresh`\uFF0C\u4E0D\u80FD\u5F53\u4F5C\u521B\u5EFA\u5931\u8D25\u91CD\u590D\u63D0\u4EA4\u3002\n- `MoreBtns`\u3001`FormBtns`\u3001`PageTabs`\u3001`BatchSelectMoreBtns` \u7B49\u83DC\u5355\u5B57\u6BB5\u59CB\u7EC8\u5411 MCP \u4F20\u660E\u6587 JSON \u6570\u7EC4\u3002\u79DF\u6237\u8868\u5355\u4E8B\u4EF6\u4E2D\u7684 Base64 \u517C\u5BB9\u903B\u8F91\u5C5E\u4E8E\u5E73\u53F0\u5185\u90E8\u7EC6\u8282\uFF0CAI \u4E0D\u5F97\u81EA\u884C\u7F16\u7801\u3002\n- VS Code \u8BBE\u7F6E\u91CC\u663E\u793A MCP \u5DF2\u542F\u7528\u53EA\u4EE3\u8868\u914D\u7F6E\u5B58\u5728\u3002\u63D2\u4EF6\u201C\u8BCA\u65AD MCP \u53EF\u8C03\u7528\u6027\u201D\u5FC5\u987B\u5B8C\u6210 `initialize`\u3001`tools/list` \u548C\u771F\u5B9E `microi_get_status`\u3002\n- \u9047\u5230 `ByteString` \u6216 `greater than 255` \u65F6\uFF0C\u5148\u6309\u5F02\u5E38\u5B57\u7B26\u7D22\u5F15\u68C0\u67E5 HTTP Header\u3002Microi MCP \u7684\u8BBE\u5907\u6807\u8BC6\u6765\u81EA `did` / `MICROI_MCP_DID`\uFF1B\u4E2D\u6587 Windows \u4E3B\u673A\u540D\u4F1A\u4ECE `MCP:` \u540E\u7B2C 4 \u4E2A\u5B57\u7B26\u89E6\u53D1\u9519\u8BEF\u3002`MICROI_LABEL_BASE64` \u53EA\u7528\u4E8E\u663E\u793A\uFF0C\u4E0D\u662F\u8BF7\u6C42 Header\uFF0C\u4E0D\u5F97\u5148\u731C\u6D4B\u6216\u6539\u5199\u4E2D\u6587 Label\u3002\u8FDE\u63A5\u6062\u590D\u524D\u7981\u6B62\u8FDC\u7AEF\u5199\u5165\uFF0C\u6062\u590D\u540E\u5148\u505A\u53EA\u8BFB\u57FA\u7EBF\u76D8\u70B9\u3002\n- Codex \u672A\u6CE8\u5165\u666E\u901A MCP \u5DE5\u5177\u65F6\uFF0C\u5148\u8C03\u7528 `list_mcp_resources` \u5E76\u8BFB\u53D6 `microi://codex/status`\uFF1B\u901A\u7528\u8C03\u7528\u4F7F\u7528 `list_mcp_resource_templates` \u53D1\u73B0 `microi://codex/action/{action}/{params}`\uFF0C\u5176\u4E2D params \u662F URI \u7F16\u7801 JSON\u3002\u8BE5\u8D44\u6E90\u6A21\u677F\u4ECD\u590D\u7528\u539F\u5DE5\u5177\u7684 schema\u3001\u786E\u8BA4\u53E3\u4EE4\u3001\u5BA1\u8BA1\u548C\u56DE\u8BFB\u89C4\u5219\uFF0C\u4E0D\u5F97\u6539\u8D70\u539F\u751F HTTP/SQL\u3002\n",_i="\n\n## V8 \u6E90\u7801\u540C\u6B65\u4FDD\u62A4\u89C4\u5219\uFF08\u5F3A\u5236\uFF09\n\n- \u591A\u4EBA\u5F00\u53D1\u65F6\uFF0C\u6BCF\u6B21\u51C6\u5907\u63A8\u9001\u63A5\u53E3\u5F15\u64CE\u3001\u8868\u5355/\u5B57\u6BB5 V8\u3001\u6A21\u5757\u6309\u94AE\u3001\u6A21\u5757 SqlJoin/SqlWhere \u6216\u6D41\u7A0B\u8282\u70B9 V8 \u524D\uFF0C\u5FC5\u987B\u5148\u6309\u5F53\u524D\u670D\u52A1\u5668\u548C\u5F15\u64CE\u5206\u7C7B\u68C0\u67E5\u540C\u6B65\u72B6\u6001\u3002\u4E0D\u5F97\u51ED\u672C\u5730\u6587\u4EF6\u65F6\u95F4\u6216\u4E0A\u6B21\u5BF9\u8BDD\u7ED3\u8BBA\u76F4\u63A5\u8986\u76D6\u8FDC\u7AEF\u3002\n- \u53EA\u6709 `localModified` \u53EF\u4EE5\u63A8\u9001\uFF1B`remoteModified` \u5FC5\u987B\u5148\u62C9\u53D6\uFF1B`remoteDeleted` \u8868\u793A\u670D\u52A1\u5668\u5DF2\u5220\u9664\u4E14\u672C\u5730\u672A\u6539\uFF0C\u62C9\u53D6\u65F6\u5148\u5907\u4EFD\u518D\u6E05\u7406\uFF1B\u670D\u52A1\u5668\u5DF2\u5220\u9664\u4F46\u672C\u5730\u4E5F\u4FEE\u6539\u65F6\u6309 `conflict` \u5904\u7406\uFF1B`conflict` \u5FC5\u987B\u6BD4\u8F83\u540C\u6B65\u57FA\u7EBF\u3001\u672C\u5730\u548C\u8FDC\u7AEF\u540E\u5408\u5E76\u3002\u65E0\u540C\u6B65\u57FA\u7EBF\u6216\u9884\u68C0\u5931\u8D25\u65F6\u505C\u6B62\u63A8\u9001\u3002\n- \u63D2\u4EF6\u201C\u63A8\u9001\u5F53\u524D\u6587\u4EF6\u201D\u5FC5\u987B\u81EA\u52A8\u6267\u884C\u4E0A\u8FF0\u9884\u68C0\uFF1B\u4E00\u952E\u540C\u6B65\u53EF\u4EE5\u590D\u7528\u521A\u5B8C\u6210\u4E14\u65E0\u51B2\u7A81\u7684\u5B8C\u6574\u5FEB\u7167\uFF0C\u5E76\u8986\u76D6\u63A5\u53E3\u5F15\u64CE\u3001\u8868\u5355\u4E8B\u4EF6\u3001\u5B57\u6BB5 V8\u3001\u6A21\u5757\u6309\u94AE\u3001\u6A21\u5757 SqlJoin/SqlWhere \u548C\u6D41\u7A0B\u8282\u70B9\u3002\u6B63\u6587\u4E00\u81F4\u4EC5 meta/mtime \u4E0D\u4E00\u81F4\u65F6\u81EA\u52A8\u6821\u51C6\u3002\n- AI \u901A\u8FC7 MCP \u76F4\u63A5\u5199\u8FDC\u7AEF\u540E\uFF0C\u8981\u56DE\u8BFB\u751F\u6548\u4EE3\u7801\u5E76\u540C\u6B65\u672C\u5730\u6587\u4EF6\u3001`.microi-meta.json` \u548C mtime\u3002\u5DE5\u4F5C\u7ED3\u675F\u524D\u518D\u6B21\u68C0\u67E5\uFF0C\u5E76\u62A5\u544A\u672C\u5730\u672A\u63A8\u9001\u3001\u8FDC\u7AEF\u8F83\u65B0\u3001\u670D\u52A1\u5668\u5DF2\u5220\u9664\u3001\u51B2\u7A81\u662F\u5426\u4E3A 0\u3002\n",Mi="\n\n## MCP \u5728\u7EBF\u5E94\u7528\u9ED8\u8BA4\u53D1\u73B0\u4E0E\u590D\u6742\u9875\u9762\u89C4\u5219\n\n- \u5904\u7406 Web\u3001UniApp\u3001MicroService\u3001\u5B9A\u5236\u5F39\u7A97\u6216\u590D\u6742\u9875\u9762\u524D\uFF0C\u5148\u8C03\u7528 `microi_list_applications` \u83B7\u53D6\u5F53\u524D\u79DF\u6237\u6240\u6709\u5728\u7EBF\u5E94\u7528\u53CA\u5B8C\u6574\u6587\u4EF6\u6E05\u5355\uFF0C\u518D\u5BF9\u76EE\u6807\u5E94\u7528\u8C03\u7528 `microi_get_application_context` \u8BFB\u53D6\u5143\u6570\u636E\u3001\u54C8\u5E0C\u3001\u8FD0\u884C\u65F6\u548C\u5FC5\u8981\u7684\u5C0F\u6587\u4EF6\uFF1B\u5355\u6587\u4EF6\u6309\u9700\u4F7F\u7528 `microi_get_application_file`\u3002\u8FD4\u56DE\u6E05\u5355\u540E\u8FD8\u5FC5\u987B\u68C0\u67E5 `ContentsComplete/ContentErrorCount` \u548C\u9010\u6587\u4EF6 `ContentReadError`\uFF0C\u4E0D\u80FD\u628A\u201C\u6709\u6E05\u5355\u201D\u8BEF\u62A5\u6210\u201C\u6E90\u7801\u5B8C\u6574\u53EF\u8BFB\u201D\u3002\n- \u5DF2\u6709\u5408\u9002 MicroService \u65F6\u4F18\u5148\u65B0\u589E\u9875\u9762/\u8DEF\u7531\uFF1B\u6CA1\u6709\u65F6\u5148\u7528 `microi_scaffold_vue_microservice` \u5728\u5F53\u524D\u79DF\u6237 `AI\u5E94\u7528/{appKey}` \u76EE\u5F55\u9884\u6F14\u5E76\u786E\u8BA4\u751F\u6210 Vue \u811A\u624B\u67B6\uFF0C\u518D\u4F9D\u6B21\u8C03\u7528 `microi_create_microservice`\u3001`microi_sync_microservice_source`\u3001`microi_publish_application_directory_stream`\u3002\n- \u6D41\u5F0F\u53D1\u5E03\u5931\u8D25\u65F6\u5FC5\u987B\u8BFB\u53D6 `uploadedCount/retrySafe`\uFF1B\u53EA\u6709\u5C1A\u672A\u4E0A\u4F20\u4EFB\u4F55\u6587\u4EF6\u3001\u660E\u786E\u53EF\u5B89\u5168\u91CD\u8BD5\u4E14\u7F16\u8BD1\u4EA7\u7269\u8F83\u5C0F\u65F6\uFF0C\u624D\u53EF\u4E34\u65F6\u56DE\u9000 `microi_publish_microservice`\uFF0C\u5E76\u5728\u7ED3\u8BBA\u4E2D\u8BB0\u5F55\u8FDC\u7AEF\u7248\u672C\u7F3A\u53E3\u3002\n- \u6BCF\u4E2A\u5FAE\u670D\u52A1\u9875\u9762\u83DC\u5355\u5FC5\u987B\u901A\u8FC7 `microi_create_module` \u7ED1\u5B9A `MicroServiceId/MicroServicePageId/MicroServiceRoutePath/MicroServiceKey`\uFF0C\u968F\u540E\u7528 `microi_get_module` \u56DE\u8BFB\uFF1B\u666E\u901A URL \u83DC\u5355\u6210\u529F\u4E0D\u7B49\u4E8E\u5FAE\u670D\u52A1\u83DC\u5355\u5DF2\u4EA4\u4ED8\u3002\n- \u62C9\u53D6\u5DF2\u6709 MicroService \u6E90\u7801\u524D\u5FC5\u987B\u6BD4\u8F83\u4E0A\u6B21\u540C\u6B65\u57FA\u7EBF\u3001\u672C\u5730\u6587\u4EF6\u548C\u79C1\u6709 HDFS \u6E90\u7801\uFF0C\u5148\u5C55\u793A\u4EC5\u672C\u5730\u3001\u4EC5\u8FDC\u7AEF\u548C\u51B2\u7A81\u6587\u4EF6\uFF1B\u7528\u6237\u660E\u786E\u786E\u8BA4\u540E\u624D\u80FD\u5F3A\u5236\u8986\u76D6\u3002\n- \u6784\u5EFA\u5E76\u63A8\u9001 MicroService \u65F6\u5FC5\u987B\u5148\u6210\u529F\u540C\u6B65\u5B8C\u6574\u6E90\u7801\u5230\u5F53\u524D\u79DF\u6237\u79C1\u6709 HDFS\uFF0C\u518D\u53D1\u5E03\u516C\u6709\u7F16\u8BD1\u4EA7\u7269\uFF1B\u6E90\u7801\u5931\u8D25\u65F6\u7981\u6B62\u7EE7\u7EED\u53D1\u5E03\u3002\n- `V8.ConfirmTips` \u53EA\u7528\u4E8E\u7EAF\u6587\u672C\u786E\u8BA4\u6216\u6781\u5C11\u91CF\u4E00\u6B21\u6027\u8F93\u5165\u3002\u4E09\u4E2A\u4EE5\u4E0A\u5B57\u6BB5\u3001\u8054\u52A8\u6821\u9A8C\u3001\u4E0A\u4F20\u3001\u8868\u683C\u3001Tab\u3001\u6B65\u9AA4\u6761\u3001\u4EE3\u7801\u7F16\u8F91\u5668\u6216\u9700\u957F\u671F\u7EF4\u62A4\u7684\u5F39\u7A97\uFF0C\u5FC5\u987B\u4F7F\u7528\u5FAE\u670D\u52A1\u9875\u9762\u5E76\u901A\u8FC7 `V8.OpenAppDialog` \u6253\u5F00\uFF0C\u7981\u6B62\u5728 V8 \u4EE3\u7801\u91CC\u62FC\u63A5\u5927\u6BB5 HTML\u3002\n- \u5E94\u7528\u5546\u57CE\u5386\u53F2\u5B57\u6BB5 `AppType` \u8868\u793A\u5B98\u65B9/\u793E\u533A\u5206\u7C7B\uFF1B\u8FD0\u884C\u5E94\u7528\u7C7B\u578B\u4F7F\u7528 `ApplicationType`\uFF0C\u503C\u4E3A `Regular / MicroService / UniApp / Web`\u3002\n",Ai="\n\n## \u5B98\u65B9\u6587\u6863\u539F\u4F4D\u589E\u8865\u4E0E\u4E2D\u6587\u5355\u6E90\u89C4\u5219\n\n- \u4FEE\u6539\u5B98\u65B9\u6587\u6863\u524D\u5148\u641C\u7D22\u5DF2\u6709\u9875\u9762\u5E76\u539F\u4F4D\u8865\u5145\uFF1B\u9664\u975E\u786E\u6709\u957F\u671F\u72EC\u7ACB\u4E3B\u9898\uFF0C\u4E0D\u5F97\u65B0\u5EFA\u76F8\u8FD1 Markdown \u9875\u9762\u3001\u5BFC\u822A\u9879\u6216\u9875\u9762\u8DEF\u7531\u3002\n- \u524D\u7AEF V8 API \u56FA\u5B9A\u7EF4\u62A4 `microi.doc/docs/doc/v8-engine/v8-client.md`\uFF0C\u540E\u7AEF V8 / \u63A5\u53E3\u5F15\u64CE API \u56FA\u5B9A\u7EF4\u62A4 `microi.doc/docs/doc/v8-engine/v8-server.md`\u3002\n- \u65E5\u5E38\u529F\u80FD\u5F00\u53D1\u53EA\u7EF4\u62A4 `microi.doc/docs/doc/` \u4E2D\u6587\u6587\u6863\uFF1B`microi.doc/docs/en/` \u7531\u5B98\u7F51\u7EDF\u4E00\u7FFB\u8BD1\u751F\u6210\uFF0C\u4E0D\u624B\u5DE5\u91CD\u590D\u7F16\u5199\u82F1\u6587\u7248\u3002\n- \u524D\u7AEF\u65B0 HTTP \u4EE3\u7801\u4F18\u5148\u4F7F\u7528\u4E0E\u540E\u7AEF\u53C2\u6570\u57FA\u672C\u4E00\u81F4\u7684 `V8.Http`\uFF1B\u65E7 `V8.Post/Get` \u53EA\u4F5C\u517C\u5BB9\u4FDD\u7559\u3002\n",Ni=`
|
|
1341
|
+
`,qn="\n\n## Microi\u543E\u7801\u975E\u963B\u585E\u81EA\u52A8\u66F4\u65B0\u89C4\u8303\uFF08\u5F3A\u5236\uFF09\n\n- \u6BCF\u6B21\u65B0\u5EFA\u6216\u63A5\u7EED\u543E\u7801\u4EFB\u52A1\uFF0C\u4EFB\u4F55 AI \u6A21\u578B\u5FC5\u987B\u8BFB\u53D6\u57FA\u7840\u89C4\u8303\u5E76\u68C0\u67E5\u7248\u672C\uFF1B\u9996\u6B21\u8BF4\u660E\u4EE5\u201CMicroi\u543E\u7801\u5F00\u53D1\u5DE5\u5177\u7248\u672C\u201D\u62A5\u544A\u5B9E\u9645 CLI\u3001npm \u5B98\u65B9 latest\uFF08\u9644\u67E5\u8BE2\u65F6\u95F4\uFF09\u3001\u81EA\u52A8\u66F4\u65B0\u4E0E Skills/MCP \u540C\u6B65\u72B6\u6001\u3002\u672A\u77E5\u9879\u5199\u68C0\u6D4B\u4E2D\uFF0C\u4E0D\u80FD\u731C\u6D4B\u6216\u628A\u5DF2\u5B89\u88C5\u7248\u672C\u5F53\u6210\u5F53\u524D\u4F1A\u8BDD\u5DF2\u52A0\u8F7D\u7248\u672C\u3002\n- \u5DF2\u6709 CLI \u65F6\u5FC5\u987B\u6295\u9012\u4E0B\u8FF0\u540E\u53F0\u66F4\u65B0\uFF0C\u81EA\u52A8\u5347\u7EA7 `@microi.net/cli` \u5E76\u91CD\u65B0\u540C\u6B65 Skills\u3001AI \u89C4\u5219\u4E0E MCP\uFF1B\u4E0D\u80FD\u53EA\u67E5\u8BE2\u7248\u672C\u6216\u4E34\u65F6\u8FD0\u884C npx \u5C31\u58F0\u79F0\u5168\u5C40\u5347\u7EA7\u3002\u5B8C\u6210\u540E\u56DE\u8BFB\u7248\u672C\u3001\u5DE5\u4F5C\u533A Skills/MCP provider \u5E76\u91CD\u65B0\u8BFB\u53D6\u66F4\u65B0\u540E\u7684\u57FA\u7840\u4E0E\u4E13\u9879 Skill\uFF1B\u7528\u6237\u660E\u786E\u5173\u95ED\u3001\u7B7E\u540D\u684C\u9762\u5B89\u88C5\u76EE\u5F55\u6216\u5BBF\u4E3B\u65E0\u6267\u884C\u6743\u9650\u65F6\u6309\u57FA\u7840\u89C4\u8303\u62A5\u544A\u9650\u5236\u3002\n- VS Code \u6269\u5C55\u3001`@microi.net/cli`\u3001Codex \u63D2\u4EF6\u4E0E\u68C0\u6D4B\u5230\u7684 DeepSeek Harness profile bundle \u9ED8\u8BA4\u5728\u540E\u53F0\u4ECE\u5B98\u65B9\u5206\u53D1\u6E90\u68C0\u67E5\u548C\u5B89\u88C5\u66F4\u65B0\uFF1B\u66F4\u65B0\u68C0\u67E5\u4E0D\u5F97\u6210\u4E3A\u5206\u6790\u3001MCP \u8C03\u7528\u3001\u6E90\u7801\u4FEE\u6539\u3001\u6784\u5EFA\u3001\u53D1\u5E03\u6216\u4EFB\u4F55\u65B0\u4EFB\u52A1\u7684\u524D\u7F6E\u95E8\u7981\u3002\n- CLI \u4F7F\u7528 npm \u5B98\u65B9 registry\uFF1A`npm view '@microi.net/cli' version --json --prefer-online --registry=https://registry.npmjs.org/`\uFF1BVS Code \u6269\u5C55\u4F7F\u7528\u5B98\u65B9\u6269\u5C55\u5BBF\u4E3B\u7684\u5B89\u88C5/\u81EA\u52A8\u66F4\u65B0\u80FD\u529B\u3002\u7981\u6B62\u7528\u7B2C\u4E09\u65B9 registry \u6216\u4E0D\u660E\u955C\u50CF\u5192\u5145\u5B98\u65B9\u66F4\u65B0\u3002\n- \u81EA\u52A8\u66F4\u65B0\u7531 `microi update --background --workspace \"<\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84>\" --json` \u6295\u9012\u3002\u5B83\u4F1A\u5728\u540E\u53F0\u5347\u7EA7\u5168\u5C40 CLI\u3001\u66F4\u65B0 Codex \u63D2\u4EF6\u4E0E DeepSeek Harness bundle\uFF1B\u4EC5\u5F53\u5DE5\u4F5C\u533A\u5DF2\u6709\u6709\u6548 Microi \u670D\u52A1\u5668\u8FDE\u63A5\u65F6\uFF0C\u624D\u5E42\u7B49\u6267\u884C `microi ai init` \u4E0E `microi doctor`\uFF0C\u968F\u540E\u6267\u884C `microi codex status` \u4E0E `microi dsh status`\uFF1B\u672A\u68C0\u6D4B\u5230 DSH \u65F6\u5B89\u9759\u8DF3\u8FC7\u3002`codex install --yes` \u4E2D\u7684 `--yes` \u53EA\u4E3A\u517C\u5BB9\u65E7\u811A\u672C\uFF0C\u4E0D\u518D\u4EE3\u8868\u5DE5\u4F5C\u6388\u6743\u95E8\u69DB\u3002\n- \u5F53\u524D\u8FD0\u884C\u4E2D\u7684\u6269\u5C55\u3001CLI\u3001Codex Router\u3001DSH \u4F1A\u8BDD\u548C MCP \u7EE7\u7EED\u4F7F\u7528\u5DF2\u52A0\u8F7D\u7248\u672C\uFF1B\u4E0D\u5F97\u4E3A\u4E86\u5347\u7EA7\u6740\u8FDB\u7A0B\u3001\u5F3A\u5236\u91CD\u8F7D\u7A97\u53E3\u3001\u7EC8\u6B62\u5BF9\u8BDD\u6216\u6682\u505C\u7528\u6237\u4EFB\u52A1\u3002\u65B0\u7248\u672C\u53EA\u5728\u540E\u7EED\u65B0\u8FDB\u7A0B\u6216\u5BBF\u4E3B\u81EA\u7136\u91CD\u542F\u65F6\u63A5\u7BA1\u3002\n- registry \u4E0D\u53EF\u7528\u3001\u6743\u9650\u4E0D\u8DB3\u3001\u6587\u4EF6\u88AB\u8FD0\u884C\u4E2D\u4EFB\u52A1\u5360\u7528\u3001\u5B89\u88C5\u5931\u8D25\u6216\u5BBF\u4E3B\u6682\u4E0D\u652F\u6301\u70ED\u66F4\u65B0\u65F6\uFF0C\u8BB0\u5F55\u53EF\u8BCA\u65AD\u72B6\u6001\u5E76\u5728\u540E\u53F0\u5EF6\u540E\u91CD\u8BD5\uFF1B\u53EF\u4EE5\u975E\u6A21\u6001\u63D0\u793A\u7528\u6237\u201C\u7ACB\u5373\u91CD\u8BD5/\u67E5\u770B\u65E5\u5FD7\u201D\uFF0C\u4F46\u65E0\u8BBA\u7528\u6237\u662F\u5426\u5904\u7406\uFF0C\u90FD\u5FC5\u987B\u5141\u8BB8\u5F53\u524D\u3001\u6B63\u5728\u8FDB\u884C\u548C\u65B0\u5EFA\u5DE5\u4F5C\u7EE7\u7EED\u3002\n",ns="\n\n## \u63A5\u53E3\u5F15\u64CE\u4E0E\u5E94\u7528\u5546\u57CE\u4F18\u5148\u89C4\u8303\uFF08\u5F3A\u5236\uFF09\n\n- \u65B0\u589E\u4E1A\u52A1\u903B\u8F91\u5148\u5224\u65AD\u73B0\u6709\u4F4E\u4EE3\u7801 CRUD/\u8868\u5355\u4E8B\u4EF6\u80FD\u5426\u5B8C\u6210\uFF1B\u5176\u6B21\u4F7F\u7528\u63A5\u53E3\u5F15\u64CE\u3002\u53EA\u6709\u7F3A\u5C11\u53EF\u590D\u7528\u5E95\u5C42\u539F\u5B50\u80FD\u529B\u65F6\u624D\u6269\u5C55 V8\uFF0C\u5E76\u7EE7\u7EED\u7531\u63A5\u53E3\u5F15\u64CE\u7F16\u6392\uFF1B\u5E73\u53F0\u534F\u8BAE\u3001\u53EF\u4FE1\u9274\u6743\u3001\u5BC6\u94A5\u9694\u79BB\u3001\u5B58\u50A8/\u7F51\u7EDC\u8FB9\u754C\u548C\u8FD0\u884C\u65F6\u5185\u6838\u624D\u5141\u8BB8\u76F4\u63A5\u5199 C# Controller/Service\u3002\n- \u4FEE\u6539 `Microi.Server` \u524D\u5FC5\u987B\u8BF4\u660E\u4E3A\u4EC0\u4E48\u4E0D\u80FD\u4F7F\u7528\u63A5\u53E3\u5F15\u64CE\u3002\u7B2C\u4E09\u65B9 HTTP \u96C6\u6210\u9ED8\u8BA4\u4F7F\u7528 `V8.Http`\uFF1B\u5BC6\u94A5\u4E0D\u80FD\u66B4\u9732\u7ED9\u53EF\u7F16\u8F91 V8 \u65F6\uFF0C\u53EA\u5728 C# \u63D0\u4F9B\u6700\u5C0F\u3001\u79DF\u6237\u9694\u79BB\u4E14\u4E0D\u53EF\u8986\u76D6\u5BC6\u94A5\u7684\u5B89\u5168\u539F\u5B50\u65B9\u6CD5\u3002\u7B2C\u4E09\u65B9\u56DE\u8C03\u91C7\u7528\u201CC# \u6700\u5C0F\u534F\u8BAE\u7F51\u5173 + `Managed` \u6838\u5FC3\u63A5\u53E3\u5F15\u64CE + `CreateIfMissing` \u79DF\u6237 Hook\u201D\uFF0CC# \u4E0D\u627F\u8F7D\u65E5\u5FD7\u3001\u5199\u8868\u3001\u901A\u77E5\u7B49\u4E1A\u52A1\u3002\n- \u7B2C\u4E09\u65B9\u4E0D\u652F\u6301 QueryString \u65F6\u4F7F\u7528 `/path--OsClient--{OsClient}--`\uFF1B\u652F\u6301 Query \u65F6\u56FA\u5B9A\u4F7F\u7528 `?OsClient=`\uFF0C\u7981\u6B62 `?o=`\u3002\u8DEF\u5F84\u4E0E Query \u540C\u65F6\u51FA\u73B0\u65F6\u5FC5\u987B\u4E00\u81F4\u3002\n- \u8868\u3001\u5B57\u6BB5\u3001Tab\u3001\u83DC\u5355\u3001\u6743\u9650\u3001\u63A5\u53E3\u5F15\u64CE\u3001\u4E8B\u4EF6\u3001\u6570\u636E\u6E90\u3001\u9875\u9762\u3001\u6253\u5370\u3001\u5DE5\u4F5C\u6D41\u3001\u4EFB\u52A1\u548C\u53EF\u5E42\u7B49\u79CD\u5B50\u6570\u636E\u5FC5\u987B\u4F18\u5148\u901A\u8FC7\u5E94\u7528\u5546\u57CE\u5347\u7EA7\uFF0C\u4E0D\u5F97\u4E3A\u8FD9\u4E9B\u8D44\u6E90\u5728 `Microi.Server/Microi.Upgrade/` \u65B0\u589E\u5B9A\u5236 .NET \u8FC1\u79FB\u3002\n- \u5E94\u7528\u5305\u63A5\u53E3\u5F15\u64CE\u5FC5\u987B\u58F0\u660E `ResourcePolicies.ApiEngines`\u3002\u5B98\u65B9\u6838\u5FC3\u4F7F\u7528 `Managed`\uFF0C\u4EC5\u5F53\u76EE\u6807\u7AEF `Local == Base` \u624D\u66F4\u65B0\uFF1B\u79DF\u6237\u6269\u5C55\u4F7F\u7528 `CreateIfMissing`\uFF0C\u9996\u6B21\u521B\u5EFA\u540E\u6C38\u4E0D\u8986\u76D6\uFF0C\u540C\u4E00 Key \u540E\u7EED\u4E5F\u7981\u6B62\u6539\u56DE `Managed`\uFF0C\u786E\u9700\u5B98\u65B9\u63A5\u7BA1\u65F6\u53D1\u5E03\u65B0 Key\u3002\u53D1\u73B0\u6838\u5FC3\u88AB\u5BA2\u6237\u4FEE\u6539\u65F6\u6574\u5305\u51B2\u7A81\u56DE\u6EDA\uFF0C\u4E0D\u81EA\u52A8\u5408\u5E76\u53EF\u6267\u884C\u4EE3\u7801\u3002\n- \u6709\u5B98\u65B9\u6743\u9650\u65F6\u4F7F\u7528\u7ED1\u5B9A `https://api.itdos.com`\u3001`OsClient=iTdos` \u7684 `microi_itdos` \u66F4\u65B0\u5E76\u53D1\u5E03\u5B98\u65B9\u5E94\u7528\uFF0C\u518D\u7531\u76EE\u6807\u79DF\u6237 MCP \u5B89\u88C5/\u66F4\u65B0\u548C\u56DE\u8BFB\uFF1B\u65E0\u5B98\u65B9\u6743\u9650\u65F6\u53EA\u901A\u8FC7\u5F53\u524D\u7528\u6237\u81EA\u5DF1\u7684 MCP/Manifest \u5347\u7EA7\u5176\u6570\u636E\u5E93\u3002\n- `Microi.Upgrade` \u53EA\u4FDD\u7559\u5E94\u7528\u5546\u57CE\u8FD0\u884C\u524D\u5FC5\u9700\u7684\u6838\u5FC3\u7269\u7406\u517C\u5BB9/\u534F\u8BAE\u8FC1\u79FB\uFF0C\u5E76\u8981\u6C42\u7248\u672C\u95E8\u3001\u5171\u4EAB\u79DF\u7EA6\u3001\u5E42\u7B49\u548C\u5931\u8D25\u4E0D\u63A8\u8FDB\u7248\u672C\u3002\u7981\u6B62\u6BCF\u6B21\u542F\u52A8\u6309\u79DF\u6237\u91CD\u8DD1\u4E0D\u65AD\u589E\u957F\u7684\u5386\u53F2\u8FC1\u79FB\u6E05\u5355\u3002\u8BE6\u7EC6\u89C4\u5219\u8BFB\u53D6 `microi.skills/workspace-conventions/SKILL.md` \u4E0E `microi.skills/app-store/SKILL.md`\u3002\n",bi="\n\n## \u540E\u7AEF API \u914D\u7F6E\u767D\u540D\u5355\u4E0E SaaS \u5355\u4E00\u4E8B\u5B9E\u6E90\uFF08\u5F3A\u5236\uFF09\n\n- `Microi.net.Api` \u7684 `AppSettings` \u4E0E\u540C\u540D\u5BB9\u5668\u73AF\u5883\u53D8\u91CF\u53EA\u5141\u8BB8\uFF1A`OsClient`\u3001`OsClientType`\u3001`OsClientNetwork`\u3001`OsClientDbType`\u3001`OsClientDbConn`\u3001`OsClientRedisHost`\u3001`OsClientRedisPort`\u3001`OsClientRedisPwd`\u3001`OsClientRedisDataBase`\u3001`OsClientDbMongoConn`\u3002\n- \u9664\u4E0A\u8FF0\u5341\u9879\u5916\uFF0C\u4E1A\u52A1\u5F00\u5173\u3001\u91CD\u8BD5\u3001\u8D85\u65F6\u3001\u9650\u989D\u3001\u5B89\u5168\u7B56\u7565\u3001\u5BC6\u94A5\u548C\u53EF\u6267\u884C\u6587\u4EF6\u8DEF\u5F84\u5FC5\u987B\u8FDB\u5165 SaaS \u5F15\u64CE `sys_osclients` \u7684\u5408\u9002 Tab\uFF1B\u7981\u6B62\u65B0\u589E `MICROI_*`\u3001`DOS_ORM_*`\u3001\u989D\u5916 `AppSettings` \u8282\u70B9\u6216\u52A8\u6001\u73AF\u5883\u53D8\u91CF\u8BFB\u53D6\u3002\n- `ASPNETCORE_*`\u3001`DOTNET_*` \u53EA\u5C5E\u4E8E .NET \u5BBF\u4E3B\uFF1B\u6D4B\u8BD5\u3001\u6784\u5EFA\u3001\u5B89\u88C5\u3001MCP \u548C\u53D1\u5E03\u811A\u672C\u53EF\u4F7F\u7528\u81EA\u8EAB\u8FDB\u7A0B\u53D8\u91CF\uFF0C\u4F46\u751F\u4EA7 API \u4E0D\u5F97\u8BFB\u53D6\u5B83\u4EEC\u63A7\u5236\u4E1A\u52A1\u884C\u4E3A\u3002\n- \u65B0\u914D\u7F6E\u5FC5\u987B\u914D\u5957\u5E42\u7B49\u5347\u7EA7\u3001\u9ED8\u8BA4\u503C\u3001\u7F13\u5B58\u5237\u65B0\u3001\u654F\u611F\u5B57\u6BB5\u8131\u654F\u3001\u5B50\u79DF\u6237\u9694\u79BB\u3001\u6587\u6863\u548C\u6E90\u7801\u626B\u63CF\u6D4B\u8BD5\uFF1B\u9A8C\u6536\u9700\u626B\u63CF\u751F\u4EA7\u6E90\u7801\u3001API \u914D\u7F6E\u53CA\u5728\u7EBF/\u79BB\u7EBF Compose\u3002\n",ki="\n\n---\n\n## \u6570\u636E\u5E93\u7ED3\u6784\n\n\u6570\u636E\u5E93\u7ED3\u6784\u4E0D\u4F1A\u5199\u5165\u672C\u57FA\u7840\u77E5\u8BC6\u5E93\u6587\u4EF6\uFF0C\u907F\u514D\u4E0D\u540C\u5F00\u53D1\u8005\u8FDE\u63A5\u4E0D\u540C\u670D\u52A1\u5668\u540E\u4EA7\u751F\u63D0\u4EA4\u51B2\u7A81\u3002\n\n\u7F16\u5199 `V8.FormEngine` \u6216 `V8.Db` \u4EE3\u7801\u65F6\uFF1A\n- \u4F18\u5148\u901A\u8FC7 MCP \u5DE5\u5177 `microi_get_db_schema` \u83B7\u53D6\u5F53\u524D\u670D\u52A1\u5668\u7684\u5B9E\u65F6\u8868\u7ED3\u6784\u3002\n- \u5982\u9700\u8BFB\u53D6\u672C\u5730\u5FEB\u7167\uFF0C\u8BF7\u67E5\u770B\u5F53\u524D\u5F15\u64CE\u6587\u4EF6\u6240\u5C5E OsClient \u76EE\u5F55\u4E0B\u7684 `.microi-db-schema.md`\u3002\n\n\u4ECE\u81EA\u7136\u8BED\u8A00\u9700\u6C42\u521B\u5EFA\u5B8C\u6574 Microi \u4F4E\u4EE3\u7801\u7CFB\u7EDF\u65F6\uFF1A\n- \u5148\u8C03\u7528 `microi_get_db_schema` \u4E86\u89E3\u5DF2\u6709\u8868\u3001\u83DC\u5355\u3001\u5B57\u6BB5\uFF0C\u907F\u514D\u91CD\u590D\u5EFA\u6A21\u3002\n- \u518D\u8C03\u7528 `microi_get_manifest_schema` \u83B7\u53D6\u5B8C\u6574 Manifest \u534F\u8BAE\u548C\u793A\u4F8B\u3002\n- \u5C06\u9700\u6C42\u6574\u7406\u4E3A Manifest\uFF0C\u6A21\u5757\u914D\u7F6E\u4F18\u5148\u5199\u5B57\u6BB5\u540D\uFF1A`listFields`\u3001`searchFields`\u3001`sortFields`\u3001`hiddenFields`\u3001`mobileFields`\u3001`cardTitleFields`\u3001`cardBottomFields`\u3002MCP \u4F1A\u81EA\u52A8\u89E3\u6790\u4E3A `diy_field.Id`\u3001`SelectFields`\u3001`SearchFieldIds` \u7B49 `sys_menu` \u6240\u9700\u683C\u5F0F\u3002\n- \u521B\u5EFA\u7ED1\u5B9A `diyTableId` \u7684\u540E\u53F0\u83DC\u5355\u65F6\uFF0C\u5FC5\u987B\u914D\u7F6E\u6216\u5141\u8BB8 MCP/\u540E\u7AEF\u81EA\u52A8\u63A8\u65AD `TableDiyFieldIds`\u3001`SelectFields`\u3001`SearchFieldIds`\u3001`SortFieldIds`\u3001`NotShowFields`\u3001`StatisticsFields`\u3001`MobileListFields`\u3001`CardTitleTagFields`\u3001`CardBottomTagFields`\u3001`DefaultOrderBy`\u3002\n- `NotShowFields` \u9ED8\u8BA4\u9690\u85CF Id/\u5916\u952E/\u7CFB\u7EDF\u5B57\u6BB5/\u5E03\u5C40\u63A7\u4EF6/\u4E0A\u4F20\u5BCC\u6587\u672C\u5730\u56FE\u5B50\u8868\u7B49\u91CD\u5B57\u6BB5\uFF1B`SearchFieldIds` \u9ED8\u8BA4\u9009\u62E9\u540D\u79F0\u3001\u6807\u9898\u3001\u7F16\u53F7\u3001\u72B6\u6001\u3001\u5206\u7C7B\u3001\u8D1F\u8D23\u4EBA\u3001\u65F6\u95F4\u7B49\u5E38\u7528\u7B5B\u9009\uFF1B`StatisticsFields` \u9ED8\u8BA4\u9009\u62E9\u91D1\u989D\u3001\u4EF7\u683C\u3001\u6570\u91CF\u3001\u79EF\u5206\u3001\u4F59\u989D\u7B49\u6570\u503C\u5B57\u6BB5\uFF1B\u79FB\u52A8\u7AEF/\u5361\u7247\u5217\u9ED8\u8BA4\u4FDD\u7559 3-4 \u4E2A\u6838\u5FC3\u53EF\u8BFB\u5B57\u6BB5\u3002\n- \u8868\u5355\u63A7\u4EF6\u4EE5 `Microi.Client/src/views/form-engine/diy-field-component/diy-component-list.json` \u4E3A\u4E8B\u5B9E\u6E90\u3002\u5B57\u6BB5\u8F83\u591A\u65F6\u4F18\u5148\u4F7F\u7528 `diy_table.Tabs` \u548C\u5B57\u6BB5 `Tab` \u5206\u7EC4\uFF0C\u5C40\u90E8\u590D\u6742\u533A\u57DF\u518D\u7528 `CollapseGroup` \u6216\u5B57\u6BB5\u7EA7 `Tabs` \u63A7\u4EF6\u6298\u53E0/\u5206\u6BB5\u3002\n- \u751F\u6210\u6216\u65B0\u589E\u5B57\u6BB5\u65F6\uFF0C\u666E\u901A\u5B57\u6BB5\u9ED8\u8BA4\u4E0D\u8981\u8BBE\u7F6E `diy_field.FormWidth`\uFF08\u4FDD\u6301 null/\u7701\u7565\uFF09\uFF1B\u53EA\u6709 `CodeEditor`\u3001`Textarea`\u3001`RichText`\u3001\u4E0A\u4F20\u3001\u5B50\u8868\u3001\u5730\u56FE/\u5E03\u5C40/\u81EA\u5B9A\u4E49\u7B49\u9700\u8981\u72EC\u5360\u6574\u884C\u7684\u63A7\u4EF6\u624D\u8BBE\u7F6E\u4E3A `24`\u3002\n- \u751F\u6210\u5BA1\u6279\u6D41\u65F6\uFF0CManifest \u7684 workflows \u9700\u5305\u542B FlowDesign\u3001Nodes\u3001Lines\uFF1B\u8FDE\u7EBF\u6807\u9898\u9ED8\u8BA4\u4F7F\u7528 `{\u8D77\u70B9\u8282\u70B9} \u5230 {\u7EC8\u70B9\u8282\u70B9}`\uFF0C\u591A\u8DEF\u7EBF\u8282\u70B9\u4F18\u5148\u751F\u6210\u8BBE\u7F6E `V8.NextNodeId` \u7684 `LineValueV8`\u3002\n- \u4FDD\u5B58\u5DE5\u4F5C\u6D41\u524D\u8C03\u7528 `microi_check_workflow_package` \u68C0\u67E5\u62D3\u6251\uFF0C\u5FC5\u8981\u65F6\u7528 `microi_test_workflow_condition` \u5E26\u6837\u4F8B\u8868\u5355\u6570\u636E\u6D4B\u8BD5\u56FE\u5F62\u6761\u4EF6\u8DEF\u7EBF\u3002\n- \u8C03\u7528 `microi_plan_system` \u505A\u672C\u5730\u7ED3\u6784\u68C0\u67E5\uFF0C\u518D\u8C03\u7528 `microi_generate_system` \u4E14\u4FDD\u6301 `dryRun:true`\u3002\n- \u53EA\u6709\u7528\u6237\u660E\u786E\u540C\u610F\u5199\u5165\u65F6\uFF0C\u624D\u7528 `dryRun:false` \u5E76\u4F20 `confirmExecution`\uFF0C\u968F\u540E\u8C03\u7528 `microi_validate_system` \u9A8C\u6536\u3002\n",Pi='\n\n## JoinForm \u4E0E TableChild \u5173\u7CFB\u95E8\u7981\uFF08\u5F3A\u5236\uFF09\n\n- \u5148\u786E\u5B9A\u5173\u7CFB\u57FA\u6570\uFF1A`JoinForm` \u53EA\u5141\u8BB8 1:1/N:1\uFF0C\u76EE\u6807\u8868\u5FC5\u987B\u4E0E\u5F53\u524D\u8868\u4E0D\u540C\uFF0C`joinFieldName` \u5FC5\u987B\u662F\u5F53\u524D\u4E3B\u8868\u4E2D\u5DF2\u5B58\u5728\u4E14\u771F\u5B9E\u4FDD\u5B58\u76EE\u6807\u8BB0\u5F55 Id \u7684\u5B57\u6BB5\uFF1B\u7981\u6B62\u9ED8\u8BA4\u5199\u6210 `Name`\u3002\n- \u201C\u5B50\u8868\u3001\u660E\u7EC6\u3001\u6E05\u5355\u3001\u6761\u76EE\u3001\u884C\u9879\u76EE\u3001\u591A\u4E2A\u8BB0\u5F55\u201D\u9ED8\u8BA4\u662F 1:N\uFF0C\u5FC5\u987B\u4F7F\u7528 `TableChild`\u3002\u5728\u72EC\u7ACB\u5B50\u8868\u521B\u5EFA\u771F\u5B9E\u7236\u7EA7\u5916\u952E\u548C\u4EE5 `(OsClient, FK)` \u5F00\u5934\u7684\u7EC4\u5408\u7D22\u5F15\uFF0C\u5E76\u521B\u5EFA\u7ED1\u5B9A\u5B50\u8868\u4E14 `display=0\u3001appDisplay=0\u3001hasChild=0` \u7684\u9690\u85CF\u6A21\u5757\u3002\n- \u5B8C\u6574\u7CFB\u7EDF Manifest \u7684\u5173\u7CFB\u5B57\u6BB5\u5FC5\u987B\u5199\u53EF\u79FB\u690D `relation`\uFF1AJoinForm \u4F7F\u7528 `{cardinality:"N:1",targetTable,joinFieldName}`\uFF1BTableChild \u4F7F\u7528 `{cardinality:"1:N",targetTable,childForeignKey,childModule,primaryTableFieldName:"Id"}`\u3002\u7981\u6B62\u5728 Manifest \u4E2D\u7F16\u9020 `diy_table.Id` \u6216 `sys_menu.Id`\u3002\n- `microi_plan_system` / `microi_generate_system` \u4F1A\u5728\u4EFB\u4F55\u5199\u5165\u524D\u62D2\u7EDD\u81EA\u5173\u8054\u3001\u57FA\u6570/\u7EC4\u4EF6\u4E0D\u7B26\u3001\u7F3A\u5916\u952E\u3001\u7F3A\u9690\u85CF\u5B50\u83DC\u5355\u6216\u7F3A\u56DE\u67E5\u7D22\u5F15\uFF1B\u751F\u6210\u5668\u4F1A\u5728\u8868\u3001\u666E\u901A\u5B57\u6BB5\u548C\u83DC\u5355\u5C31\u7EEA\u540E\u624D\u89E3\u6790\u5F53\u524D\u79DF\u6237\u771F\u5B9E Id \u5E76\u5199\u5173\u7CFB\u5B57\u6BB5\u3002\u4E0D\u5F97\u6539\u7528\u5355\u5B57\u6BB5\u5DE5\u5177\u7ED5\u8FC7\uFF1B\u540E\u7AEF MCP \u8FB9\u754C\u4F1A\u518D\u6B21\u6821\u9A8C\u3002\n',Di="\n\n## \u6570\u636E\u5E93\u7D22\u5F15 MCP \u89C4\u8303\uFF08\u5F3A\u5236\uFF09\n\n- \u9700\u6C42\u3001\u84DD\u56FE\u3001\u63A5\u53E3\u3001Job \u6216\u8BC4\u5BA1\u4E00\u65E6\u660E\u786E\u67D0\u8868\u5B57\u6BB5\u9700\u8981\u7D22\u5F15\uFF0C\u5FC5\u987B\u5199\u5165 Manifest `tables[].indexes`\uFF0C\u5E76\u8C03\u7528 `microi_create_table_index`\uFF1B\u7981\u6B62\u5728 V8\u3001\u63A5\u53E3\u5F15\u64CE\u3001FormEngine \u6216\u4E00\u6B21\u6027 SQL \u4E2D\u624B\u5199 CREATE/DROP INDEX\u3002\n- \u521B\u5EFA\u524D\u540E\u8C03\u7528 `microi_get_table_indexes` \u56DE\u8BFB\u771F\u5B9E\u7269\u7406\u7D22\u5F15\u3002\u5220\u9664\u53EA\u80FD\u7528 `microi_drop_table_index`\uFF0C\u4E3B\u952E\u7D22\u5F15\u7981\u6B62\u5220\u9664\u3002\n- \u79DF\u6237\u4E1A\u52A1\u7EC4\u5408\u7D22\u5F15\u901A\u5E38\u4EE5 `OsClient` \u5F00\u5934\uFF1B\u4E1A\u52A1\u552F\u4E00\u952E\u3001\u5E42\u7B49\u952E\u7528\u79DF\u6237\u8303\u56F4\u552F\u4E00\u7D22\u5F15\uFF1B\u5916\u952E\u3001\u5B50\u8868\u3001Job/outbox/\u5F85\u529E\u626B\u63CF\u6309\u771F\u5B9E WHERE/JOIN/ORDER BY \u8BBE\u8BA1\u3002\n- \u4E0D\u5F97\u628A SearchFieldIds\u3001SortFieldIds\u3001StatisticsFields \u673A\u68B0\u8F6C\u6362\u6210\u4E00\u6279\u5355\u5217\u7D22\u5F15\uFF1B\u4F4E\u57FA\u6570\u5B57\u6BB5\u3001LIKE '%keyword%' \u548C\u957F\u6587\u672C\u4E0D\u80FD\u6EE5\u7528\u666E\u901A B-tree \u7D22\u5F15\u3002\n- DIY \u8868\u7D22\u5F15\u56DE\u8BFB\u540E\u8FD8\u5FC5\u987B\u80FD\u5728 Microi.Client \u201C\u5F00\u53D1\u8BBE\u8BA1 \u2192 \u7D22\u5F15\u7BA1\u7406\u201D\u770B\u5230\u76F8\u540C\u540D\u79F0\u3001\u6709\u5E8F\u5B57\u6BB5\u4E0E\u552F\u4E00\u6027\u3002\n",Ri="\n\n## MCP \u9ED8\u8BA4\u663E\u9690\u89C4\u5219\n\n- \u521B\u5EFA `sys_menu` \u83DC\u5355\u6A21\u5757\u65F6\uFF0C\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\u9690\u85CF\uFF0C\u5426\u5219 `Display` \u548C `AppDisplay` \u9ED8\u8BA4\u8BBE\u4E3A `1`\u3002\n- \u7ED1\u5B9A `diyTableId` \u7684\u83DC\u5355\u9ED8\u8BA4\u8865\u9F50\u5217\u8868\u5217\u3001\u641C\u7D22\u5217\u3001\u9690\u85CF\u5217\u3001\u6392\u5E8F\u5217\u3001\u7EDF\u8BA1\u5217\u3001\u79FB\u52A8\u7AEF/\u5361\u7247\u5217\u548C\u9ED8\u8BA4\u6392\u5E8F\uFF1B\u7528\u6237\u663E\u5F0F\u4F20\u5165\u7684 `sys_menu` JSON \u4F18\u5148\u3002\n- \u521B\u5EFA `diy_field` \u5B57\u6BB5\u65F6\uFF0C\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\u9690\u85CF\uFF0C\u5426\u5219 `Visible` \u548C `AppVisible` \u9ED8\u8BA4\u8BBE\u4E3A `1`\u3002\n- \u5B57\u6BB5\u8F83\u591A\u7684\u8868\u5355\u9ED8\u8BA4\u4F18\u5148\u751F\u6210 `diy_table.Tabs`\uFF0C\u5E76\u7ED9\u5B57\u6BB5\u5199\u5165 `Tab`\uFF1B\u6574\u884C\u63A7\u4EF6\u624D\u4F7F\u7528 `FormWidth=24`\u3002\n",Qn="\n\n## AI \u83DC\u5355\u6A21\u5757\u89C6\u89C9\u4EA4\u4ED8\u95E8\u7981\uFF08\u5F3A\u5236\uFF09\n\n- \u6BCF\u4E2A\u53EF\u89C1\u3001\u7ED1\u5B9A\u8868\u7684\u6A21\u5757\u90FD\u5FC5\u987B\u914D\u7F6E\u7D27\u51D1 Hero \u6807\u9898\u3001\u4E1A\u52A1\u526F\u6807\u9898\u548C 2-4 \u4E2A\u771F\u5B9E\u52A8\u6001\u6307\u6807\u3002\u6307\u6807\u4F18\u5148\u9009\u62E9\u91D1\u989D\u3001\u6570\u91CF\u3001\u4F59\u989D\u3001\u8FDB\u5EA6\u3001\u903E\u671F\u3001\u5F85\u5904\u7406\u7B49\u4E1A\u52A1\u805A\u5408\uFF1B\u6CA1\u6709\u5408\u9002\u6570\u503C\u5B57\u6BB5\u65F6\u4F7F\u7528\u771F\u5B9E `DataCount`\u3001`PageCount` \u6216\u771F\u5B9E\u72B6\u6001\u5206\u5E03\u515C\u5E95\u3002\u7981\u6B62\u968F\u673A\u6570\u3001\u56FA\u5B9A\u6F14\u793A\u6570\u3001\u4F2A\u7EDF\u8BA1\u6216\u53EA\u5199\u6BEB\u65E0\u4E1A\u52A1\u610F\u4E49\u7684\u603B\u6570\u3002\n- \u6BCF\u4E2A\u5217\u8868\u5B57\u6BB5\u90FD\u8981\u6309\u5B57\u6BB5\u8BED\u4E49\u8BBE\u7F6E\u5408\u7406 `TableWidth`\u3002PC \u590D\u5408\u5217\u5FC5\u987B\u7ED9\u8DB3 `MinWidth`\uFF0C\u7EC4\u7EC7\u4E3B\u5B57\u6BB5\u3001\u591A\u884C\u526F\u5B57\u6BB5\u3001\u53F3\u4FA7\u56FE\u6807/\u72B6\u6001\uFF0C\u5E76\u4ECE\u666E\u901A\u5217\u4E2D\u6392\u9664\u5DF2\u7ECF\u5C55\u793A\u7684\u91CD\u590D\u5B57\u6BB5\uFF0C\u540C\u65F6\u4FDD\u7559\u67E5\u8BE2\u4F9D\u8D56\u5B57\u6BB5\u3002\n- \u79FB\u52A8\u7AEF\u5361\u7247\u5E94\u6309\u771F\u5B9E\u4E1A\u52A1\u5B57\u6BB5\u8BBE\u8BA1\u56FE\u7247\u3001\u6807\u9898\u3001\u526F\u6807\u9898\u3001\u9876\u90E8\u6807\u7B7E\u3001\u53F3\u4FA7\u91D1\u989D/\u72B6\u6001\u3001\u5185\u5BB9\u3001Meta \u4E0E\u5E95\u90E8\u5B57\u6BB5\uFF1B\u540C\u4E00\u5B57\u6BB5\u4E0D\u5F97\u8DE8\u533A\u57DF\u91CD\u590D\u5806\u53E0\u3002\n- \u83DC\u5355\u52A8\u6001\u7EDF\u8BA1\u89D2\u6807\u53EA\u7528\u4E8E\u5C11\u6570\u9AD8\u4EF7\u503C\u5F85\u529E/\u5F02\u5E38/\u672A\u8BFB\u5165\u53E3\uFF1B\u9875\u9762\u591A Tab \u548C\u66F4\u591A V8 \u6309\u94AE\u6709\u771F\u5B9E\u4E1A\u52A1\u8BA1\u6570\u65F6\u4E5F\u5E94\u914D\u7F6E\u89D2\u6807\u3002\u6279\u91CF\u89D2\u6807\u5FC5\u987B\u907F\u514D N+1 \u67E5\u8BE2\u5E76\u63D0\u4F9B\u5B89\u5168\u964D\u7EA7\u3002\n- \u6A21\u5757\u8BBE\u8BA1\u5668\u56FA\u5B9A\u63D0\u4F9B\u201C\u6A21\u5757\u6807\u9898\u4E0E\u7EDF\u8BA1\u3001PC \u590D\u5408\u5217\u3001\u79FB\u52A8\u7AEF\u5361\u7247\u3001\u81EA\u5B9A\u4E49\u8868\u5355\u3001\u9AD8\u7EA7 JSON\u201D\u4E94\u4E2A\u5165\u53E3\u3002`EnableViewSchema` \u53EA\u63A7\u5236 Detail/Edit \u81EA\u5B9A\u4E49\u8868\u5355\uFF1B\u5173\u95ED\u540E\u7D27\u51D1\u6807\u9898\u3001\u52A8\u6001\u6307\u6807\u3001\u5217\u8868\u5BC6\u5EA6\u3001PC \u590D\u5408\u5217\u548C\u79FB\u52A8\u7AEF\u5361\u7247\u4ECD\u7136\u751F\u6548\u3002\n- \u5E73\u53F0\u81EA\u52A8\u751F\u6210\u7684 List/Card \u4E0E\u771F\u5B9E\u6570\u636E\u515C\u5E95\u53EA\u662F\u6700\u4F4E\u4FDD\u969C\u3002AI \u4EA4\u4ED8\u65F6\u4ECD\u987B\u6839\u636E\u4E1A\u52A1\u8BED\u4E49\u4E3B\u52A8\u5B8C\u5584\u5E76\u56DE\u8BFB\u9A8C\u8BC1\uFF0C\u4E0D\u5F97\u56E0\u4E3A\u5E73\u53F0\u5DF2\u6709\u9ED8\u8BA4\u503C\u800C\u7701\u7565\u8BBE\u8BA1\u3002\n",Ii="\n\n## MCP \u5199\u5165\u8D85\u65F6\u3001\u6E90\u7801\u5B8C\u6574\u6027\u4E0E\u56DE\u8BFB\u89C4\u5219\n\n- \u4F18\u5148\u4F7F\u7528\u8BED\u4E49\u660E\u786E\u7684\u6807\u51C6 MCP \u5DE5\u5177\uFF1A\u63A5\u53E3\u5F15\u64CE\u4EE3\u7801\u7528 `microi_save_engine_code`\uFF0C\u8868\u5355\u4E8B\u4EF6\u7528 `microi_save_event_code`\uFF0C\u83DC\u5355\u6309\u94AE\u3001Tab\u3001SqlJoin\u3001SqlWhere \u7528 `microi_update_module`\u3002\u4E0D\u8981\u5148\u7ED5\u5230\u539F\u751F HTTP\u3001FormEngine \u6216 SQL\u3002\n- MCP \u5199\u8BF7\u6C42\u8D85\u65F6\u53EA\u8868\u793A\u5BA2\u6237\u7AEF\u672A\u53CA\u65F6\u6536\u5230\u54CD\u5E94\uFF0C\u4E0D\u8868\u793A\u670D\u52A1\u5668\u4E00\u5B9A\u6CA1\u6709\u5199\u5165\u3002\u4E0A\u8FF0\u6807\u51C6\u5199\u5DE5\u5177\u4EE5\u53CA `microi_create_engine` \u4F1A\u81EA\u52A8\u77ED\u8D85\u65F6\u56DE\u8BFB\uFF1B\u8FD4\u56DE `RecoveredAfterTransportError:true` \u65F6\u5E94\u89C6\u4E3A\u5DF2\u786E\u8BA4\u6210\u529F\u3002\n- \u6062\u590D\u6027\u56DE\u8BFB\u5FC5\u987B\u4F7F\u7528\u72EC\u7ACB\u77ED\u8D85\u65F6\uFF0C\u4E0D\u80FD\u6CBF\u7528\u666E\u901A\u67E5\u8BE2\u957F\u8D85\u65F6\u5E76\u957F\u671F\u505C\u7559\u5728\u201C\u7B49\u5F85\u8FDC\u7AEF\u56DE\u8BFB\u201D\u3002\u5982\u679C\u6807\u51C6\u5DE5\u5177\u8FD4\u56DE\u201C\u5199\u5165\u7ED3\u679C\u4E0D\u786E\u5B9A\u201D\uFF0C\u53EA\u7528\u5BF9\u5E94 get \u5DE5\u5177\u7EE7\u7EED\u56DE\u8BFB\u4E00\u6B21\u5E76\u62A5\u544A\u771F\u5B9E\u5DEE\u5F02\u3002\n- `\u2026N tokens truncated\u2026`\u3001`Exit code:`\u3001`Chunk ID:`\u3001`Wall time:` \u662F AI/\u7EC8\u7AEF\u5DE5\u5177\u5305\u88C5\u6587\u672C\uFF0C\u4E0D\u662F V8 \u6E90\u7801\u3002\u8BFB\u53D6\u957F\u6E90\u7801\u5FC5\u987B\u6309 MCP \u8FD4\u56DE\u7684\u5B57\u7B26\u533A\u95F4\u53D6\u5B8C\u5E76\u6838\u5BF9 SHA-256\uFF1B\u63D2\u4EF6\u63A8\u9001\u548C MCP \u5199\u5DE5\u5177\u68C0\u6D4B\u5230\u8FD9\u4E9B\u6807\u8BB0\u65F6\u5FC5\u987B\u62D2\u7EDD\u5199\u5165\u3002\u8FDC\u7AEF\u6E90\u7801\u4E0D\u5C11\u4E8E 8000 \u5B57\u7B26\u4E14\u65B0\u6E90\u7801\u7A81\u7136\u51CF\u5C11\u8D85\u8FC7 15% \u65F6\uFF0C\u672A\u6838\u5BF9\u5B8C\u6574\u6E90\u7801\u524D\u4E0D\u5F97\u786E\u8BA4\u5927\u5E45\u5220\u51CF\u3002\n- \u7981\u6B62\u56E0\u4E3A\u8D85\u65F6\u91CD\u590D\u5EFA\u8868\u3001\u91CD\u590D\u52A0\u5B57\u6BB5\u3001\u91CD\u590D\u521B\u5EFA\u63A5\u53E3\u5F15\u64CE\uFF0C\u6216\u65B0\u5EFA\u4E00\u6B21\u6027\u7EF4\u62A4\u5F15\u64CE\u7ED5\u8FC7\u539F\u64CD\u4F5C\u3002\u521B\u5EFA\u63A5\u53E3\u5F15\u64CE\u6570\u636E\u5E93\u5165\u5E93\u6210\u529F\u4F46\u8DEF\u7531\u7F13\u5B58\u5237\u65B0\u8D85\u65F6\u65F6\uFF0C\u5E94\u4FDD\u7559\u6210\u529F\u7ED3\u679C\u5E76\u68C0\u67E5 `CacheRefresh`\uFF0C\u4E0D\u80FD\u5F53\u4F5C\u521B\u5EFA\u5931\u8D25\u91CD\u590D\u63D0\u4EA4\u3002\n- `MoreBtns`\u3001`FormBtns`\u3001`PageTabs`\u3001`BatchSelectMoreBtns` \u7B49\u83DC\u5355\u5B57\u6BB5\u59CB\u7EC8\u5411 MCP \u4F20\u660E\u6587 JSON \u6570\u7EC4\u3002\u79DF\u6237\u8868\u5355\u4E8B\u4EF6\u4E2D\u7684 Base64 \u517C\u5BB9\u903B\u8F91\u5C5E\u4E8E\u5E73\u53F0\u5185\u90E8\u7EC6\u8282\uFF0CAI \u4E0D\u5F97\u81EA\u884C\u7F16\u7801\u3002\n- VS Code \u8BBE\u7F6E\u91CC\u663E\u793A MCP \u5DF2\u542F\u7528\u53EA\u4EE3\u8868\u914D\u7F6E\u5B58\u5728\u3002\u63D2\u4EF6\u201C\u8BCA\u65AD MCP \u53EF\u8C03\u7528\u6027\u201D\u5FC5\u987B\u5B8C\u6210 `initialize`\u3001`tools/list` \u548C\u771F\u5B9E `microi_get_status`\u3002\n- \u9047\u5230 `ByteString` \u6216 `greater than 255` \u65F6\uFF0C\u5148\u6309\u5F02\u5E38\u5B57\u7B26\u7D22\u5F15\u68C0\u67E5 HTTP Header\u3002Microi MCP \u7684\u8BBE\u5907\u6807\u8BC6\u6765\u81EA `did` / `MICROI_MCP_DID`\uFF1B\u4E2D\u6587 Windows \u4E3B\u673A\u540D\u4F1A\u4ECE `MCP:` \u540E\u7B2C 4 \u4E2A\u5B57\u7B26\u89E6\u53D1\u9519\u8BEF\u3002`MICROI_LABEL_BASE64` \u53EA\u7528\u4E8E\u663E\u793A\uFF0C\u4E0D\u662F\u8BF7\u6C42 Header\uFF0C\u4E0D\u5F97\u5148\u731C\u6D4B\u6216\u6539\u5199\u4E2D\u6587 Label\u3002\u8FDE\u63A5\u6062\u590D\u524D\u7981\u6B62\u8FDC\u7AEF\u5199\u5165\uFF0C\u6062\u590D\u540E\u5148\u505A\u53EA\u8BFB\u57FA\u7EBF\u76D8\u70B9\u3002\n- Codex \u672A\u6CE8\u5165\u666E\u901A MCP \u5DE5\u5177\u65F6\uFF0C\u5148\u8C03\u7528 `list_mcp_resources` \u5E76\u8BFB\u53D6 `microi://codex/status`\uFF1B\u901A\u7528\u8C03\u7528\u4F7F\u7528 `list_mcp_resource_templates` \u53D1\u73B0 `microi://codex/action/{action}/{params}`\uFF0C\u5176\u4E2D params \u662F URI \u7F16\u7801 JSON\u3002\u8BE5\u8D44\u6E90\u6A21\u677F\u4ECD\u590D\u7528\u539F\u5DE5\u5177\u7684 schema\u3001\u786E\u8BA4\u53E3\u4EE4\u3001\u5BA1\u8BA1\u548C\u56DE\u8BFB\u89C4\u5219\uFF0C\u4E0D\u5F97\u6539\u8D70\u539F\u751F HTTP/SQL\u3002\n",_i="\n\n## V8 \u6E90\u7801\u540C\u6B65\u4FDD\u62A4\u89C4\u5219\uFF08\u5F3A\u5236\uFF09\n\n- \u591A\u4EBA\u5F00\u53D1\u65F6\uFF0C\u6BCF\u6B21\u51C6\u5907\u63A8\u9001\u63A5\u53E3\u5F15\u64CE\u3001\u8868\u5355/\u5B57\u6BB5 V8\u3001\u6A21\u5757\u6309\u94AE\u3001\u6A21\u5757 SqlJoin/SqlWhere \u6216\u6D41\u7A0B\u8282\u70B9 V8 \u524D\uFF0C\u5FC5\u987B\u5148\u6309\u5F53\u524D\u670D\u52A1\u5668\u548C\u5F15\u64CE\u5206\u7C7B\u68C0\u67E5\u540C\u6B65\u72B6\u6001\u3002\u4E0D\u5F97\u51ED\u672C\u5730\u6587\u4EF6\u65F6\u95F4\u6216\u4E0A\u6B21\u5BF9\u8BDD\u7ED3\u8BBA\u76F4\u63A5\u8986\u76D6\u8FDC\u7AEF\u3002\n- \u53EA\u6709 `localModified` \u53EF\u4EE5\u63A8\u9001\uFF1B`remoteModified` \u5FC5\u987B\u5148\u62C9\u53D6\uFF1B`remoteDeleted` \u8868\u793A\u670D\u52A1\u5668\u5DF2\u5220\u9664\u4E14\u672C\u5730\u672A\u6539\uFF0C\u62C9\u53D6\u65F6\u5148\u5907\u4EFD\u518D\u6E05\u7406\uFF1B\u670D\u52A1\u5668\u5DF2\u5220\u9664\u4F46\u672C\u5730\u4E5F\u4FEE\u6539\u65F6\u6309 `conflict` \u5904\u7406\uFF1B`conflict` \u5FC5\u987B\u6BD4\u8F83\u540C\u6B65\u57FA\u7EBF\u3001\u672C\u5730\u548C\u8FDC\u7AEF\u540E\u5408\u5E76\u3002\u65E0\u540C\u6B65\u57FA\u7EBF\u6216\u9884\u68C0\u5931\u8D25\u65F6\u505C\u6B62\u63A8\u9001\u3002\n- \u63D2\u4EF6\u201C\u63A8\u9001\u5F53\u524D\u6587\u4EF6\u201D\u5FC5\u987B\u81EA\u52A8\u6267\u884C\u4E0A\u8FF0\u9884\u68C0\uFF1B\u4E00\u952E\u540C\u6B65\u53EF\u4EE5\u590D\u7528\u521A\u5B8C\u6210\u4E14\u65E0\u51B2\u7A81\u7684\u5B8C\u6574\u5FEB\u7167\uFF0C\u5E76\u8986\u76D6\u63A5\u53E3\u5F15\u64CE\u3001\u8868\u5355\u4E8B\u4EF6\u3001\u5B57\u6BB5 V8\u3001\u6A21\u5757\u6309\u94AE\u3001\u6A21\u5757 SqlJoin/SqlWhere \u548C\u6D41\u7A0B\u8282\u70B9\u3002\u6B63\u6587\u4E00\u81F4\u4EC5 meta/mtime \u4E0D\u4E00\u81F4\u65F6\u81EA\u52A8\u6821\u51C6\u3002\n- AI \u901A\u8FC7 MCP \u76F4\u63A5\u5199\u8FDC\u7AEF\u540E\uFF0C\u8981\u56DE\u8BFB\u751F\u6548\u4EE3\u7801\u5E76\u540C\u6B65\u672C\u5730\u6587\u4EF6\u3001`.microi-meta.json` \u548C mtime\u3002\u5DE5\u4F5C\u7ED3\u675F\u524D\u518D\u6B21\u68C0\u67E5\uFF0C\u5E76\u62A5\u544A\u672C\u5730\u672A\u63A8\u9001\u3001\u8FDC\u7AEF\u8F83\u65B0\u3001\u670D\u52A1\u5668\u5DF2\u5220\u9664\u3001\u51B2\u7A81\u662F\u5426\u4E3A 0\u3002\n",Mi="\n\n## MCP \u5728\u7EBF\u5E94\u7528\u9ED8\u8BA4\u53D1\u73B0\u4E0E\u590D\u6742\u9875\u9762\u89C4\u5219\n\n- \u5904\u7406 Web\u3001UniApp\u3001MicroService\u3001\u5B9A\u5236\u5F39\u7A97\u6216\u590D\u6742\u9875\u9762\u524D\uFF0C\u5148\u8C03\u7528 `microi_list_applications` \u83B7\u53D6\u5F53\u524D\u79DF\u6237\u6240\u6709\u5728\u7EBF\u5E94\u7528\u53CA\u5B8C\u6574\u6587\u4EF6\u6E05\u5355\uFF0C\u518D\u5BF9\u76EE\u6807\u5E94\u7528\u8C03\u7528 `microi_get_application_context` \u8BFB\u53D6\u5143\u6570\u636E\u3001\u54C8\u5E0C\u3001\u8FD0\u884C\u65F6\u548C\u5FC5\u8981\u7684\u5C0F\u6587\u4EF6\uFF1B\u5355\u6587\u4EF6\u6309\u9700\u4F7F\u7528 `microi_get_application_file`\u3002\u8FD4\u56DE\u6E05\u5355\u540E\u8FD8\u5FC5\u987B\u68C0\u67E5 `ContentsComplete/ContentErrorCount` \u548C\u9010\u6587\u4EF6 `ContentReadError`\uFF0C\u4E0D\u80FD\u628A\u201C\u6709\u6E05\u5355\u201D\u8BEF\u62A5\u6210\u201C\u6E90\u7801\u5B8C\u6574\u53EF\u8BFB\u201D\u3002\n- \u5DF2\u6709\u5408\u9002 MicroService \u65F6\u4F18\u5148\u65B0\u589E\u9875\u9762/\u8DEF\u7531\uFF1B\u6CA1\u6709\u65F6\u5148\u7528 `microi_scaffold_vue_microservice` \u5728\u5F53\u524D\u79DF\u6237 `AI\u5E94\u7528/{appKey}` \u76EE\u5F55\u9884\u6F14\u5E76\u786E\u8BA4\u751F\u6210 Vue \u811A\u624B\u67B6\uFF0C\u518D\u4F9D\u6B21\u8C03\u7528 `microi_create_microservice`\u3001`microi_sync_microservice_source`\u3001`microi_publish_application_directory_stream`\u3002\n- \u6D41\u5F0F\u53D1\u5E03\u5931\u8D25\u65F6\u5FC5\u987B\u8BFB\u53D6 `uploadedCount/retrySafe`\uFF1B\u53EA\u6709\u5C1A\u672A\u4E0A\u4F20\u4EFB\u4F55\u6587\u4EF6\u3001\u660E\u786E\u53EF\u5B89\u5168\u91CD\u8BD5\u4E14\u7F16\u8BD1\u4EA7\u7269\u8F83\u5C0F\u65F6\uFF0C\u624D\u53EF\u4E34\u65F6\u56DE\u9000 `microi_publish_microservice`\uFF0C\u5E76\u5728\u7ED3\u8BBA\u4E2D\u8BB0\u5F55\u8FDC\u7AEF\u7248\u672C\u7F3A\u53E3\u3002\n- \u6BCF\u4E2A\u5FAE\u670D\u52A1\u9875\u9762\u83DC\u5355\u5FC5\u987B\u901A\u8FC7 `microi_create_module` \u7ED1\u5B9A `MicroServiceId/MicroServicePageId/MicroServiceRoutePath/MicroServiceKey`\uFF0C\u968F\u540E\u7528 `microi_get_module` \u56DE\u8BFB\uFF1B\u666E\u901A URL \u83DC\u5355\u6210\u529F\u4E0D\u7B49\u4E8E\u5FAE\u670D\u52A1\u83DC\u5355\u5DF2\u4EA4\u4ED8\u3002\n- \u62C9\u53D6\u5DF2\u6709 MicroService \u6E90\u7801\u524D\u5FC5\u987B\u6BD4\u8F83\u4E0A\u6B21\u540C\u6B65\u57FA\u7EBF\u3001\u672C\u5730\u6587\u4EF6\u548C\u79C1\u6709 HDFS \u6E90\u7801\uFF0C\u5148\u5C55\u793A\u4EC5\u672C\u5730\u3001\u4EC5\u8FDC\u7AEF\u548C\u51B2\u7A81\u6587\u4EF6\uFF1B\u7528\u6237\u660E\u786E\u786E\u8BA4\u540E\u624D\u80FD\u5F3A\u5236\u8986\u76D6\u3002\n- \u6784\u5EFA\u5E76\u63A8\u9001 MicroService \u65F6\u5FC5\u987B\u5148\u6210\u529F\u540C\u6B65\u5B8C\u6574\u6E90\u7801\u5230\u5F53\u524D\u79DF\u6237\u79C1\u6709 HDFS\uFF0C\u518D\u53D1\u5E03\u516C\u6709\u7F16\u8BD1\u4EA7\u7269\uFF1B\u6E90\u7801\u5931\u8D25\u65F6\u7981\u6B62\u7EE7\u7EED\u53D1\u5E03\u3002\n- `V8.ConfirmTips` \u53EA\u7528\u4E8E\u7EAF\u6587\u672C\u786E\u8BA4\u6216\u6781\u5C11\u91CF\u4E00\u6B21\u6027\u8F93\u5165\u3002\u4E09\u4E2A\u4EE5\u4E0A\u5B57\u6BB5\u3001\u8054\u52A8\u6821\u9A8C\u3001\u4E0A\u4F20\u3001\u8868\u683C\u3001Tab\u3001\u6B65\u9AA4\u6761\u3001\u4EE3\u7801\u7F16\u8F91\u5668\u6216\u9700\u957F\u671F\u7EF4\u62A4\u7684\u5F39\u7A97\uFF0C\u5FC5\u987B\u4F7F\u7528\u5FAE\u670D\u52A1\u9875\u9762\u5E76\u901A\u8FC7 `V8.OpenAppDialog` \u6253\u5F00\uFF0C\u7981\u6B62\u5728 V8 \u4EE3\u7801\u91CC\u62FC\u63A5\u5927\u6BB5 HTML\u3002\n- \u5E94\u7528\u5546\u57CE\u5386\u53F2\u5B57\u6BB5 `AppType` \u8868\u793A\u5B98\u65B9/\u793E\u533A\u5206\u7C7B\uFF1B\u8FD0\u884C\u5E94\u7528\u7C7B\u578B\u4F7F\u7528 `ApplicationType`\uFF0C\u503C\u4E3A `Regular / MicroService / UniApp / Web`\u3002\n",Ai="\n\n## \u5B98\u65B9\u6587\u6863\u539F\u4F4D\u589E\u8865\u4E0E\u4E2D\u6587\u5355\u6E90\u89C4\u5219\n\n- \u4FEE\u6539\u5B98\u65B9\u6587\u6863\u524D\u5148\u641C\u7D22\u5DF2\u6709\u9875\u9762\u5E76\u539F\u4F4D\u8865\u5145\uFF1B\u9664\u975E\u786E\u6709\u957F\u671F\u72EC\u7ACB\u4E3B\u9898\uFF0C\u4E0D\u5F97\u65B0\u5EFA\u76F8\u8FD1 Markdown \u9875\u9762\u3001\u5BFC\u822A\u9879\u6216\u9875\u9762\u8DEF\u7531\u3002\n- \u524D\u7AEF V8 API \u56FA\u5B9A\u7EF4\u62A4 `microi.doc/docs/doc/v8-engine/v8-client.md`\uFF0C\u540E\u7AEF V8 / \u63A5\u53E3\u5F15\u64CE API \u56FA\u5B9A\u7EF4\u62A4 `microi.doc/docs/doc/v8-engine/v8-server.md`\u3002\n- \u65E5\u5E38\u529F\u80FD\u5F00\u53D1\u53EA\u7EF4\u62A4 `microi.doc/docs/doc/` \u4E2D\u6587\u6587\u6863\uFF1B`microi.doc/docs/en/` \u7531\u5B98\u7F51\u7EDF\u4E00\u7FFB\u8BD1\u751F\u6210\uFF0C\u4E0D\u624B\u5DE5\u91CD\u590D\u7F16\u5199\u82F1\u6587\u7248\u3002\n- \u524D\u7AEF\u65B0 HTTP \u4EE3\u7801\u4F18\u5148\u4F7F\u7528\u4E0E\u540E\u7AEF\u53C2\u6570\u57FA\u672C\u4E00\u81F4\u7684 `V8.Http`\uFF1B\u65E7 `V8.Post/Get` \u53EA\u4F5C\u517C\u5BB9\u4FDD\u7559\u3002\n",Ni=`
|
|
1342
1342
|
|
|
1343
1343
|
## MicroService \u53D1\u5E03\u540E\u8FD0\u884C\u63A2\u6D4B\u4E0E 502 \u6062\u590D\u89C4\u5219
|
|
1344
1344
|
|
|
@@ -407,10 +407,45 @@ function resultText(value, isError = false) {
|
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
+
function toolchainStatus(workspaceRoot) {
|
|
411
|
+
// 状态文件可能由另一工作区的后台更新器写入,只回读有限的诊断字段,
|
|
412
|
+
// 不透传日志/错误正文或未知字段,也不把安装版本冒充当前已加载版本。
|
|
413
|
+
const statusPath = path.join(path.resolve(process.env.MICROI_UPDATE_HOME || path.join(os.homedir(), '.microi', 'updater')), 'status.json');
|
|
414
|
+
let status = {};
|
|
415
|
+
try {
|
|
416
|
+
if (fs.statSync(statusPath).size <= 64 * 1024) status = readJson(statusPath, {});
|
|
417
|
+
} catch { /* 缺失/损坏状态不阻断连接发现 */ }
|
|
418
|
+
const version = value => /^\d+(?:\.\d+){2}$/.test(String(value || '')) ? String(value) : 'unknown';
|
|
419
|
+
const states = ['scheduled', 'running', 'completed', 'completed-with-warnings', 'deferred'];
|
|
420
|
+
const skills = readJson(path.join(workspaceRoot, 'microi.skills', '.microi-skills-manifest.json'), {});
|
|
421
|
+
return {
|
|
422
|
+
package: '@microi.net/cli',
|
|
423
|
+
loadedVersion: pluginVersion,
|
|
424
|
+
workspaceSkillsVersion: version(skills.bundleVersion),
|
|
425
|
+
automaticUpdate: {
|
|
426
|
+
enabled: process.env.MICROI_DISABLE_AUTO_UPDATE !== '1',
|
|
427
|
+
statusPath,
|
|
428
|
+
state: states.includes(status.state) ? status.state : 'unknown',
|
|
429
|
+
latestObservedVersion: version(status.latestVersion),
|
|
430
|
+
globalVersion: version(status.globalVersion),
|
|
431
|
+
checkedAt: typeof status.attemptedAt === 'string' && /^\d{4}-\d{2}-\d{2}T[\d:.]+Z$/.test(status.attemptedAt) ? status.attemptedAt : null,
|
|
432
|
+
// 共享状态只证明记录中的工作区;其它目录须单独 doctor 验证。
|
|
433
|
+
appliesToWorkspace: typeof status.workspace === 'string' && path.resolve(status.workspace) === path.resolve(workspaceRoot),
|
|
434
|
+
},
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function baseInstructions() {
|
|
439
|
+
return `先调用 microi_codex action="profiles";多连接时把返回的 name 作为 profile。所有业务动作由同源 Microi MCP 工具处理。
|
|
440
|
+
每次新建或接续吾码任务必须先完整读取工作区 microi.skills/workspace-conventions/SKILL.md;尚未初始化时读取插件 skills/workspace-conventions/SKILL.md。同样强制执行其中的进度播报与非阻塞自动更新规范,适用于任何 AI 模型。
|
|
441
|
+
首次说明必须以“Microi吾码开发工具版本”报告实际版本、官方最新版本及自动更新/Skills/MCP 同步状态;profiles.toolchain.loadedVersion=${pluginVersion} 只代表本进程,历史 latestObservedVersion 必须附 checkedAt,未知项写检测中,禁止猜测全局 CLI 或 npm 最新版。
|
|
442
|
+
已有 CLI 时必须执行 microi update --background --workspace "<工作区绝对路径>" --json,自动升级 @microi.net/cli 到 npm 官方 latest 并同步 Skills/AI/MCP;不得等更新结束才继续工作,不终止或强制重载当前会话。用户明确关闭或宿主禁止执行时报告限制。`;
|
|
443
|
+
}
|
|
444
|
+
|
|
410
445
|
function toolCatalog() {
|
|
411
446
|
return [{
|
|
412
447
|
name: 'microi_codex',
|
|
413
|
-
description: 'Microi
|
|
448
|
+
description: 'Microi吾码统一入口。每次吾码任务先用 action="profiles" 查看连接与 toolchain 版本/自动更新状态,并读取 workspace-conventions/SKILL.md 执行强制版本播报与后台升级;多连接时传 profile=name。其余 action 复用原工具验证、确认、审计和回读。',
|
|
414
449
|
inputSchema: {
|
|
415
450
|
type: 'object',
|
|
416
451
|
additionalProperties: false,
|
|
@@ -434,6 +469,7 @@ async function callRouterTool(args) {
|
|
|
434
469
|
configPath: state.workspace.configPath,
|
|
435
470
|
count: state.profiles.length,
|
|
436
471
|
profiles: state.profiles.map(publicProfile),
|
|
472
|
+
toolchain: toolchainStatus(state.workspace.workspaceRoot),
|
|
437
473
|
next: state.profiles.length > 1 ? '后续调用请传 profile=name。' : '后续调用可省略 profile。',
|
|
438
474
|
});
|
|
439
475
|
}
|
|
@@ -468,7 +504,7 @@ function resourceList() {
|
|
|
468
504
|
async function readResource(uri) {
|
|
469
505
|
if (uri === 'microi://codex/profiles') {
|
|
470
506
|
const state = loadProfiles();
|
|
471
|
-
return { contents: [{ uri, mimeType: 'application/json', text: JSON.stringify({ profiles: state.profiles.map(publicProfile) }, null, 2) }] };
|
|
507
|
+
return { contents: [{ uri, mimeType: 'application/json', text: JSON.stringify({ profiles: state.profiles.map(publicProfile), toolchain: toolchainStatus(state.workspace.workspaceRoot) }, null, 2) }] };
|
|
472
508
|
}
|
|
473
509
|
const match = /^microi:\/\/codex\/([^/]+)\/(status|tools|action\/([^/]+)\/(.*))$/.exec(uri);
|
|
474
510
|
if (!match) throw new Error(`不支持的 Microi 资源 URI:${uri}`);
|
|
@@ -509,7 +545,7 @@ async function handle(message) {
|
|
|
509
545
|
protocolVersion: params?.protocolVersion || PROTOCOL_VERSION,
|
|
510
546
|
capabilities: { tools: {}, resources: {} },
|
|
511
547
|
serverInfo: { name: 'Microi-Codex-Plugin', version: pluginVersion },
|
|
512
|
-
instructions:
|
|
548
|
+
instructions: baseInstructions(),
|
|
513
549
|
});
|
|
514
550
|
return;
|
|
515
551
|
}
|