@microi.net/cli 4.6.7 → 4.6.8

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.
@@ -1,13 +1,13 @@
1
1
  {
2
- "builtAt": "2026-08-05T14:09:50.477Z",
2
+ "builtAt": "2026-08-05T14:59:24.152Z",
3
3
  "source": "../microi.skills",
4
4
  "extension": {
5
5
  "name": "v8-engine",
6
- "version": "4.6.7",
6
+ "version": "4.6.8",
7
7
  "publisher": "Microi"
8
8
  },
9
9
  "skills": {
10
- "version": "4.6.7",
10
+ "version": "4.6.8",
11
11
  "versionRule": "Microi version uses three numeric parts. Each publish increments the last part; when a part exceeds 9 it carries to the previous part: 1.0.9 -> 1.1.0, 1.9.9 -> 2.0.0.",
12
12
  "managedBy": "Microi.VSCode/bump-version.js"
13
13
  },
@@ -15,10 +15,10 @@
15
15
  "dir": "dist/microi.skills",
16
16
  "files": 105,
17
17
  "skills": 58,
18
- "bytes": 1605303
18
+ "bytes": 1608004
19
19
  },
20
20
  "fileHashes": {
21
- ".microi-skills-version.json": "7bbf166e985d6a885f4d713912e6d6950d3e9d3a619f323c33ddae533c046bdb",
21
+ ".microi-skills-version.json": "a8c4b504f7a817a3691276d226a7025f0711350cda0793c0f96c1b8edda77c82",
22
22
  "README.md": "f88db8f5a0ad3788583b1a0787cb4c485f1027e50a5c21997da41334e2be3b82",
23
23
  "ai-engine/SKILL.md": "371b00ce9860d1516f6eb7eeaed001cbfa852c52e7c0cfccbedc4a71a113e568",
24
24
  "ai-engine/agents/openai.yaml": "40deb07801006a46b9a7f0020d13251955eeadd04c8e591160210479936f8b5b",
@@ -38,7 +38,7 @@
38
38
  "microi-ai-application/SKILL.md": "b267798bd59cedca874ccbefdd6fd3f9be48d383d2aacb151c3fa6e880905e30",
39
39
  "microi-ai-application/agents/openai.yaml": "d3dfc4d0f2fda3391e90e661ca9d8d051cb43824b011d1a88e99db135870454f",
40
40
  "microi-ai-application/references/frontend-baseline.md": "c21a2d38292fd8d445a7538afb45d609881f624f32d39c0fc4bbbb3c2fa64a74",
41
- "microi-client-frontend/SKILL.md": "a5a0a93fa70df02bb696f83bd812cb01f23aa9141303dcb8f93017ac3e8b8f96",
41
+ "microi-client-frontend/SKILL.md": "e634ce51f3e3a52fc1b3638e24cf7e7fa9065d2c16bbdeef0acfdd42851067ed",
42
42
  "microi-datasource-mapping/SKILL.md": "1626bdf242038838028aa1235c5a6262e22680984583c47a8fc4e5fffb24b7df",
43
43
  "microi-db-schema/SKILL.md": "2e4dfd98d7e10bad0e8f68682725e88ebbaa5518bc548f8780685e2cd248defd",
44
44
  "microi-db-schema/agents/openai.yaml": "c725a2be4c904472f9e46dc4b49aa642c9f3a4437c91a28ba7cc27167497ede7",
@@ -58,7 +58,7 @@
58
58
  "microi-form-layout/SKILL.md": "48814c2c138e2c0fb6a11d39cf458df6a1cc28a3156c7540db1fa482a2ce6aec",
59
59
  "microi-frontend-sdk/SKILL.md": "0ff6e2df0dc01a42ca875bb6eeb92a4397c5dd4ecae0f808ccf36f1f549c58f0",
60
60
  "microi-left-right-layout/SKILL.md": "d8c482224846477b6c3068bdf94930cca6d699570f59b09f946601b0a65715f6",
61
- "microi-microservice/SKILL.md": "c173ce95bd0a61e7de1bec95e0b72eff6cf61de53702b02703ef9319b539fd2f",
61
+ "microi-microservice/SKILL.md": "909b0cd048734a21369b1f13ed8291038883aa09f7c451854f27262865e00109",
62
62
  "microi-microservice/references/runtime-delivery.md": "704ed30623d91c971bed359403caa1f848edd07528ecbf211fa3b619ccec117d",
63
63
  "microi-mobile-app-quality/SKILL.md": "810bc23f3cfd4ee47ff3a51917b9aaa46cad8d59d2e3a880ed5f4c41b70eb1d7",
64
64
  "microi-solution-quotation/SKILL.md": "1bd47bd019a62bdc904612a7d8e2501c76df66eed9ef247544dd7fe38eba02e4",
@@ -125,111 +125,111 @@
125
125
  "workspace-conventions/SKILL.md": "a498653fca2c3f1b43241b789a3f07f6aece36d89609999a5177a42705615b0d"
126
126
  },
127
127
  "fileVersions": {
128
- ".microi-skills-version.json": "4.6.7",
129
- "README.md": "4.6.7",
130
- "ai-engine/SKILL.md": "4.6.7",
131
- "ai-engine/agents/openai.yaml": "4.6.7",
132
- "app-store/SKILL.md": "4.6.7",
133
- "app-store/agents/openai.yaml": "4.6.7",
134
- "business-blueprint/SKILL.md": "4.6.7",
135
- "datasource-engine/SKILL.md": "4.6.7",
136
- "datasource-engine/agents/openai.yaml": "4.6.7",
137
- "dos-orm/SKILL.md": "4.6.7",
138
- "dos-orm/references/api-reference.md": "4.6.7",
139
- "job-engine/SKILL.md": "4.6.7",
140
- "job-engine/agents/openai.yaml": "4.6.7",
141
- "message-notification/SKILL.md": "4.6.7",
142
- "message-notification/agents/openai.yaml": "4.6.7",
143
- "message-notification/references/contracts.md": "4.6.7",
144
- "microi-ai-app-auth.js": "4.6.7",
145
- "microi-ai-application/SKILL.md": "4.6.7",
146
- "microi-ai-application/agents/openai.yaml": "4.6.7",
147
- "microi-ai-application/references/frontend-baseline.md": "4.6.7",
148
- "microi-client-frontend/SKILL.md": "4.6.7",
149
- "microi-datasource-mapping/SKILL.md": "4.6.7",
150
- "microi-db-schema/SKILL.md": "4.6.7",
151
- "microi-db-schema/agents/openai.yaml": "4.6.7",
152
- "microi-db-schema/references/core-tables.md": "4.6.7",
153
- "microi-db-schema/references/form-component-options.md": "4.6.7",
154
- "microi-db-schema/references/schema-overview.md": "4.6.7",
155
- "microi-db-schema/references/schema.md": "4.6.7",
156
- "microi-db-schema/references/table-catalog.md": "4.6.7",
157
- "microi-deployment/SKILL.md": "4.6.7",
158
- "microi-deployment/references/deployment-matrix.md": "4.6.7",
159
- "microi-docs-coverage/SKILL.md": "4.6.7",
160
- "microi-docs-coverage/references/capability-map.md": "4.6.7",
161
- "microi-docs-coverage/scripts/audit-doc-skill-coverage.mjs": "4.6.7",
162
- "microi-form-engine/SKILL.md": "4.6.7",
163
- "microi-form-engine/references/component-catalog.md": "4.6.7",
164
- "microi-form-engine/references/data-source-events.md": "4.6.7",
165
- "microi-form-layout/SKILL.md": "4.6.7",
166
- "microi-frontend-sdk/SKILL.md": "4.6.7",
167
- "microi-left-right-layout/SKILL.md": "4.6.7",
168
- "microi-microservice/SKILL.md": "4.6.7",
169
- "microi-microservice/references/runtime-delivery.md": "4.6.7",
170
- "microi-mobile-app-quality/SKILL.md": "4.6.7",
171
- "microi-solution-quotation/SKILL.md": "4.6.7",
172
- "microi-solution-quotation/agents/openai.yaml": "4.6.7",
173
- "microi-solution-quotation/scripts/build_solution_quote.py": "4.6.7",
174
- "microi-system-delivery/SKILL.md": "4.6.7",
175
- "microi-ui/SKILL.md": "4.6.7",
176
- "microi-uniapp-frontend/SKILL.md": "4.6.7",
177
- "microi.v8.js": "4.6.7",
178
- "module-engine/SKILL.md": "4.6.7",
179
- "module-engine/references/module-config.md": "4.6.7",
180
- "ocr-engine/SKILL.md": "4.6.7",
181
- "ocr-engine/agents/openai.yaml": "4.6.7",
182
- "page-engine/SKILL.md": "4.6.7",
183
- "performance-testing/SKILL.md": "4.6.7",
184
- "playwright-e2e/SKILL.md": "4.6.7",
185
- "print-engine/SKILL.md": "4.6.7",
186
- "production-readonly-audit/SKILL.md": "4.6.7",
187
- "report-engine/SKILL.md": "4.6.7",
188
- "report-engine/agents/openai.yaml": "4.6.7",
189
- "search-engine/SKILL.md": "4.6.7",
190
- "search-engine/agents/openai.yaml": "4.6.7",
191
- "spider-engine/SKILL.md": "4.6.7",
192
- "translate-engine/SKILL.md": "4.6.7",
193
- "translate-engine/agents/openai.yaml": "4.6.7",
194
- "ui-design/SKILL.md": "4.6.7",
195
- "ui-design/assets/pattern-showcase/app.js": "4.6.7",
196
- "ui-design/assets/pattern-showcase/index.html": "4.6.7",
197
- "ui-design/assets/pattern-showcase/styles.css": "4.6.7",
198
- "ui-design/assets/templates/MCI-DESIGN.md": "4.6.7",
199
- "ui-design/references/design-pattern-library.md": "4.6.7",
200
- "ui-design/references/mci-design-contract.md": "4.6.7",
201
- "ui-design/references/motion-and-media.md": "4.6.7",
202
- "ui-design/references/product-flow-recipes.md": "4.6.7",
203
- "uniapp-mall-assets/SKILL.md": "4.6.7",
204
- "v8-api-config/SKILL.md": "4.6.7",
205
- "v8-cache-pattern/SKILL.md": "4.6.7",
206
- "v8-crud-api/SKILL.md": "4.6.7",
207
- "v8-debugging/SKILL.md": "4.6.7",
208
- "v8-explorer-tree/SKILL.md": "4.6.7",
209
- "v8-export-import/SKILL.md": "4.6.7",
210
- "v8-file-upload/SKILL.md": "4.6.7",
211
- "v8-formengine-http/SKILL.md": "4.6.7",
212
- "v8-frontend-events/SKILL.md": "4.6.7",
213
- "v8-frontend-events/references/bluetooth-print-api.md": "4.6.7",
214
- "v8-frontend-events/references/bluetooth-print.md": "4.6.7",
215
- "v8-http-integration/SKILL.md": "4.6.7",
216
- "v8-image-processing/SKILL.md": "4.6.7",
217
- "v8-image-processing/agents/openai.yaml": "4.6.7",
218
- "v8-image-processing/references/api-reference.md": "4.6.7",
219
- "v8-menu-buttons/SKILL.md": "4.6.7",
220
- "v8-mongodb/SKILL.md": "4.6.7",
221
- "v8-mq-mqtt/SKILL.md": "4.6.7",
222
- "v8-saas-multi-tenant/SKILL.md": "4.6.7",
223
- "v8-security/SKILL.md": "4.6.7",
224
- "v8-sql-query/SKILL.md": "4.6.7",
225
- "v8-table-event/SKILL.md": "4.6.7",
226
- "v8-template-engine/SKILL.md": "4.6.7",
227
- "v8-utilities/SKILL.md": "4.6.7",
228
- "v8-utilities/references/client-api-index.md": "4.6.7",
229
- "v8-utilities/references/platform-http-routes.md": "4.6.7",
230
- "v8-utilities/references/server-api-index.md": "4.6.7",
231
- "v8-workflow/SKILL.md": "4.6.7",
232
- "workspace-conventions/SKILL.md": "4.6.7"
128
+ ".microi-skills-version.json": "4.6.8",
129
+ "README.md": "4.6.8",
130
+ "ai-engine/SKILL.md": "4.6.8",
131
+ "ai-engine/agents/openai.yaml": "4.6.8",
132
+ "app-store/SKILL.md": "4.6.8",
133
+ "app-store/agents/openai.yaml": "4.6.8",
134
+ "business-blueprint/SKILL.md": "4.6.8",
135
+ "datasource-engine/SKILL.md": "4.6.8",
136
+ "datasource-engine/agents/openai.yaml": "4.6.8",
137
+ "dos-orm/SKILL.md": "4.6.8",
138
+ "dos-orm/references/api-reference.md": "4.6.8",
139
+ "job-engine/SKILL.md": "4.6.8",
140
+ "job-engine/agents/openai.yaml": "4.6.8",
141
+ "message-notification/SKILL.md": "4.6.8",
142
+ "message-notification/agents/openai.yaml": "4.6.8",
143
+ "message-notification/references/contracts.md": "4.6.8",
144
+ "microi-ai-app-auth.js": "4.6.8",
145
+ "microi-ai-application/SKILL.md": "4.6.8",
146
+ "microi-ai-application/agents/openai.yaml": "4.6.8",
147
+ "microi-ai-application/references/frontend-baseline.md": "4.6.8",
148
+ "microi-client-frontend/SKILL.md": "4.6.8",
149
+ "microi-datasource-mapping/SKILL.md": "4.6.8",
150
+ "microi-db-schema/SKILL.md": "4.6.8",
151
+ "microi-db-schema/agents/openai.yaml": "4.6.8",
152
+ "microi-db-schema/references/core-tables.md": "4.6.8",
153
+ "microi-db-schema/references/form-component-options.md": "4.6.8",
154
+ "microi-db-schema/references/schema-overview.md": "4.6.8",
155
+ "microi-db-schema/references/schema.md": "4.6.8",
156
+ "microi-db-schema/references/table-catalog.md": "4.6.8",
157
+ "microi-deployment/SKILL.md": "4.6.8",
158
+ "microi-deployment/references/deployment-matrix.md": "4.6.8",
159
+ "microi-docs-coverage/SKILL.md": "4.6.8",
160
+ "microi-docs-coverage/references/capability-map.md": "4.6.8",
161
+ "microi-docs-coverage/scripts/audit-doc-skill-coverage.mjs": "4.6.8",
162
+ "microi-form-engine/SKILL.md": "4.6.8",
163
+ "microi-form-engine/references/component-catalog.md": "4.6.8",
164
+ "microi-form-engine/references/data-source-events.md": "4.6.8",
165
+ "microi-form-layout/SKILL.md": "4.6.8",
166
+ "microi-frontend-sdk/SKILL.md": "4.6.8",
167
+ "microi-left-right-layout/SKILL.md": "4.6.8",
168
+ "microi-microservice/SKILL.md": "4.6.8",
169
+ "microi-microservice/references/runtime-delivery.md": "4.6.8",
170
+ "microi-mobile-app-quality/SKILL.md": "4.6.8",
171
+ "microi-solution-quotation/SKILL.md": "4.6.8",
172
+ "microi-solution-quotation/agents/openai.yaml": "4.6.8",
173
+ "microi-solution-quotation/scripts/build_solution_quote.py": "4.6.8",
174
+ "microi-system-delivery/SKILL.md": "4.6.8",
175
+ "microi-ui/SKILL.md": "4.6.8",
176
+ "microi-uniapp-frontend/SKILL.md": "4.6.8",
177
+ "microi.v8.js": "4.6.8",
178
+ "module-engine/SKILL.md": "4.6.8",
179
+ "module-engine/references/module-config.md": "4.6.8",
180
+ "ocr-engine/SKILL.md": "4.6.8",
181
+ "ocr-engine/agents/openai.yaml": "4.6.8",
182
+ "page-engine/SKILL.md": "4.6.8",
183
+ "performance-testing/SKILL.md": "4.6.8",
184
+ "playwright-e2e/SKILL.md": "4.6.8",
185
+ "print-engine/SKILL.md": "4.6.8",
186
+ "production-readonly-audit/SKILL.md": "4.6.8",
187
+ "report-engine/SKILL.md": "4.6.8",
188
+ "report-engine/agents/openai.yaml": "4.6.8",
189
+ "search-engine/SKILL.md": "4.6.8",
190
+ "search-engine/agents/openai.yaml": "4.6.8",
191
+ "spider-engine/SKILL.md": "4.6.8",
192
+ "translate-engine/SKILL.md": "4.6.8",
193
+ "translate-engine/agents/openai.yaml": "4.6.8",
194
+ "ui-design/SKILL.md": "4.6.8",
195
+ "ui-design/assets/pattern-showcase/app.js": "4.6.8",
196
+ "ui-design/assets/pattern-showcase/index.html": "4.6.8",
197
+ "ui-design/assets/pattern-showcase/styles.css": "4.6.8",
198
+ "ui-design/assets/templates/MCI-DESIGN.md": "4.6.8",
199
+ "ui-design/references/design-pattern-library.md": "4.6.8",
200
+ "ui-design/references/mci-design-contract.md": "4.6.8",
201
+ "ui-design/references/motion-and-media.md": "4.6.8",
202
+ "ui-design/references/product-flow-recipes.md": "4.6.8",
203
+ "uniapp-mall-assets/SKILL.md": "4.6.8",
204
+ "v8-api-config/SKILL.md": "4.6.8",
205
+ "v8-cache-pattern/SKILL.md": "4.6.8",
206
+ "v8-crud-api/SKILL.md": "4.6.8",
207
+ "v8-debugging/SKILL.md": "4.6.8",
208
+ "v8-explorer-tree/SKILL.md": "4.6.8",
209
+ "v8-export-import/SKILL.md": "4.6.8",
210
+ "v8-file-upload/SKILL.md": "4.6.8",
211
+ "v8-formengine-http/SKILL.md": "4.6.8",
212
+ "v8-frontend-events/SKILL.md": "4.6.8",
213
+ "v8-frontend-events/references/bluetooth-print-api.md": "4.6.8",
214
+ "v8-frontend-events/references/bluetooth-print.md": "4.6.8",
215
+ "v8-http-integration/SKILL.md": "4.6.8",
216
+ "v8-image-processing/SKILL.md": "4.6.8",
217
+ "v8-image-processing/agents/openai.yaml": "4.6.8",
218
+ "v8-image-processing/references/api-reference.md": "4.6.8",
219
+ "v8-menu-buttons/SKILL.md": "4.6.8",
220
+ "v8-mongodb/SKILL.md": "4.6.8",
221
+ "v8-mq-mqtt/SKILL.md": "4.6.8",
222
+ "v8-saas-multi-tenant/SKILL.md": "4.6.8",
223
+ "v8-security/SKILL.md": "4.6.8",
224
+ "v8-sql-query/SKILL.md": "4.6.8",
225
+ "v8-table-event/SKILL.md": "4.6.8",
226
+ "v8-template-engine/SKILL.md": "4.6.8",
227
+ "v8-utilities/SKILL.md": "4.6.8",
228
+ "v8-utilities/references/client-api-index.md": "4.6.8",
229
+ "v8-utilities/references/platform-http-routes.md": "4.6.8",
230
+ "v8-utilities/references/server-api-index.md": "4.6.8",
231
+ "v8-workflow/SKILL.md": "4.6.8",
232
+ "workspace-conventions/SKILL.md": "4.6.8"
233
233
  },
234
234
  "files": [
235
235
  ".microi-skills-version.json",
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.6.7",
2
+ "version": "4.6.8",
3
3
  "versionRule": "Microi version uses three numeric parts. Each publish increments the last part; when a part exceeds 9 it carries to the previous part: 1.0.9 -> 1.1.0, 1.9.9 -> 2.0.0.",
4
4
  "managedBy": "Microi.VSCode/bump-version.js",
5
- "updatedAt": "2026-08-05T14:09:41.443Z"
5
+ "updatedAt": "2026-08-05T14:59:15.911Z"
6
6
  }
@@ -459,9 +459,24 @@ DiyCommon.FormEngine.AddFormData("table_name", { Field: "value" }, function (res
459
459
 
460
460
  `sys_menu.OpenType=MicroService` 时,动态路由必须把 `MicroServiceId`、`MicroServicePageId`、`MicroServiceRoutePath` 和真实入口 `MicroAppUrl` 写入 route meta;浏览器侧菜单路由使用 `/#/micro-app/{MsKey}/{RoutePath}`,不要再生成 `/micro-app-host/{menuId}`,否则地址过长且刷新或直接访问菜单路由容易加载空白页。
461
461
 
462
- 同一个编译后的微服务可以绑定多个后台菜单和内部页面。`MicroAppHost` 的 `<micro-app name>` 必须包含菜单 Id、路由路径或其它实例维度,避免多个菜单共享同一个 appKey 时触发 `app name conflict`。入口 URL 中的 `microRoute/routePath` 只用于解析,最终应通过 `data.microRoute` 传给子应用,入口文件 URL 保持稳定。
463
-
464
- 后台配置必须配套维护 `sys_microiservice_page` 路由子表,并在 `sys_microiservice` 表单上用隐藏子模块 + `TableChild` 显示页面/路由。`sys_menu` 选择微服务时要由前端 V8 事件实时加载页面列表,不能完全依赖 SQL 下拉里的表单变量替换。
462
+ 同一个编译后的微服务可以绑定多个后台菜单和内部页面。`MicroAppHost` 的 `<micro-app name>` 必须包含菜单 Id、路由路径或其它实例维度,避免多个菜单共享同一个 appKey 时触发 `app name conflict`。入口 URL 中的 `microRoute/routePath` 只用于解析,最终应通过 `data.microRoute` 传给子应用,入口文件 URL 保持稳定。
463
+
464
+ 菜单型微服务的宿主操作集中维护在 `views/micro-app/host-bridge.js` `host.vue`。
465
+ `microAppData.hostCapabilities` 必须下发 `microi.host.v1` 协议、`tab` 模式、请求/结果事件名和动作清单;
466
+ 子应用只允许 dispatch `micro-app:host-action`,不能接收父页面函数或直接操作 TagsView/Router。
467
+ 标准动作包括 `closeTab/navigate/replaceTab/back/forward/reloadTab/setTabTitle/showMessage`:
468
+ 关闭当前 Tab 要复用 `useTagsViewStore` 的当前 `fullPath`,拒绝固定/最后一个 Tab;`navigate`
469
+ 保留当前 Tab,`replaceTab` 删除旧 Tab;返回/前进只使用站内 history;右键刷新和 `reloadTab`
470
+ 都重新解析并挂载当前微服务。路由输入必须拒绝外部 URL、协议相对地址、反斜杠、登录、访问密钥和
471
+ 内部 redirect,并在跳转前用当前 Router 解析,404/未注册动态路由失败关闭。宿主结果用
472
+ `micro-app:host-action-result` 尽力回传,但关闭或跳转会卸载子应用,不能承诺结果事件必达。
473
+
474
+ `OpenAppDialog` 不暴露 Tab 模式能力;弹窗成功/取消/失败继续使用
475
+ `app-dialog:success/cancel/error`。修改桥接时至少运行
476
+ `node --test tests/micro-app-host-bridge.spec.mjs tests/micro-app-runtime-contract.spec.mjs`,并同步
477
+ `microi.doc/docs/doc/system-engine/micro-app.md` 与 `microi-microservice` Skill。
478
+
479
+ 后台配置必须配套维护 `sys_microiservice_page` 路由子表,并在 `sys_microiservice` 表单上用隐藏子模块 + `TableChild` 显示页面/路由。`sys_menu` 选择微服务时要由前端 V8 事件实时加载页面列表,不能完全依赖 SQL 下拉里的表单变量替换。
465
480
 
466
481
  `sys_menu.MicroServiceId` 的字段值变更 V8 必须把 `V8.ThisValue` 传给页面列表加载函数,例如 `window.LoadMicroServicePages(V8, false, V8.ThisValue || V8.Form.MicroServiceId)`;不要只读取 `V8.Form.MicroServiceId`,因为字段变更触发瞬间表单模型可能仍是旧值或显示文本。页面列表加载函数必须支持从选中对象、保存 Id、`名称(MsKey)` 文本中解析服务,并在按 `MicroServiceId` 查询为空时按 `MicroServiceKey` 兜底查询。
467
482
 
@@ -92,6 +92,30 @@ AppKey 稳定且只含安全字符。`microi.routes.json` 是页面事实源,
92
92
  Token 只通过宿主上下文传递,不硬编码、不放 URL、不写日志。子应用回传成功/取消/
93
93
  错误事件,宿主负责提示、关闭和刷新。
94
94
 
95
+ 菜单型微服务通过 `window.microApp.getData().hostCapabilities` 发现主框架能力,禁止直接操作
96
+ 父页面 DOM、Pinia 或 Vue Router。能力协议固定为 `microi.host.v1`,请求使用:
97
+
98
+ ```js
99
+ window.microApp.dispatch({
100
+ type: 'micro-app:host-action',
101
+ action: 'closeTab',
102
+ requestId: 'optional-id',
103
+ data: {}
104
+ });
105
+ ```
106
+
107
+ AI 生成菜单微服务时,应优先封装一个 `callMicroiHost(action, data)`,先检查
108
+ `hostCapabilities.actions`,再 dispatch。当前标准动作是:`closeTab`、`navigate`、
109
+ `replaceTab`、`back`、`forward`、`reloadTab`、`setTabTitle`、`showMessage`。
110
+ `navigate/replaceTab` 只传以 `/` 开头的站内 path 或 `{name,params,query,hash}`;禁止传
111
+ 外部 URL、登录页、访问密钥页或内部 redirect。目标仍要存在于当前用户动态路由并经过路由守卫,
112
+ 宿主桥接不授予菜单或数据权限。业务保存成功后才能关闭/跳转,不能把尽力返回的
113
+ `micro-app:host-action-result` 当作业务持久化确认。
114
+
115
+ `closeTab` 与 TagsView 当前页签关闭语义一致,固定页签和最后一个页签拒绝关闭;顶部 Tab
116
+ 右键刷新与 `reloadTab` 都应重载当前微服务。`OpenAppDialog` 页面不使用 Tab 动作,继续发送
117
+ `app-dialog:success/cancel/error` 关闭弹窗并回传结果。
118
+
95
119
  `sys_microiservice_page` 是友好路由的页面事实源,`sys_menu` 只负责导航和角色权限。
96
120
  无需出现在导航中的按钮页/详情页应在页面元数据设置 `InternalOnly=true`,不创建伪隐藏菜单。
97
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microi.net/cli",
3
- "version": "4.6.7",
3
+ "version": "4.6.8",
4
4
  "description": "Microi吾码 AI 开发命令行:服务器连接、登录、AI/MCP 初始化与 V8 资源同步",
5
5
  "license": "MIT",
6
6
  "homepage": "https://microi.net/doc/v8-engine/vs-code-plugin.html",