From c21a979c0cb88d3ba477bbbaf16530894ce57913 Mon Sep 17 00:00:00 2001 From: ringo Date: Fri, 11 Sep 2026 15:12:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(plugin):=20=E6=8A=80=E8=83=BD=E5=86=99?= =?UTF-8?q?=E5=85=A5=20open=5Fstudio=20=E6=89=A7=E8=A1=8C=E5=99=A8?= =?UTF-8?q?=E7=94=A8=E6=B3=95=EF=BC=8C=E7=89=88=E6=9C=AC=200.2.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 「打开 Studio」主路径改为 open_studio(签发免密链接 + 轮询等 executor_online),studio_link 降为只要链接时用 - 新增说明:模拟/可视化类工具依赖 Studio 浏览器执行器在线,标签页关闭即离线并 fail fast - 工具一览补 open_studio - 版本 0.2.5 → 0.2.6,便于重装拉取技能更新 --- plugins/deta/.codex-plugin/plugin.json | 2 +- plugins/deta/package-lock.json | 4 ++-- plugins/deta/package.json | 2 +- plugins/deta/skills/aml-design/SKILL.md | 24 +++++++++++++++++------- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/plugins/deta/.codex-plugin/plugin.json b/plugins/deta/.codex-plugin/plugin.json index 52ff22a..387e613 100644 --- a/plugins/deta/.codex-plugin/plugin.json +++ b/plugins/deta/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "deta", - "version": "0.2.5", + "version": "0.2.6", "description": "DETA 建筑性能设计插件:以 AML 为唯一事实源编辑建筑模型,经 GSA 编译为建筑模型并做规则校验。", "author": { "name": "DETA", diff --git a/plugins/deta/package-lock.json b/plugins/deta/package-lock.json index b6c3757..6e6f81d 100644 --- a/plugins/deta/package-lock.json +++ b/plugins/deta/package-lock.json @@ -1,12 +1,12 @@ { "name": "deta-plugin", - "version": "0.2.5", + "version": "0.2.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "deta-plugin", - "version": "0.2.5", + "version": "0.2.6", "license": "Proprietary" } } diff --git a/plugins/deta/package.json b/plugins/deta/package.json index 341035a..79f096e 100644 --- a/plugins/deta/package.json +++ b/plugins/deta/package.json @@ -1,6 +1,6 @@ { "name": "deta-plugin", - "version": "0.2.5", + "version": "0.2.6", "description": "DETA 建筑性能设计:AML 建筑模型读写与编译校验(Codex 插件 / dsh 组合包 双壳)", "type": "module", "license": "Proprietary", diff --git a/plugins/deta/skills/aml-design/SKILL.md b/plugins/deta/skills/aml-design/SKILL.md index f692263..d3a1624 100644 --- a/plugins/deta/skills/aml-design/SKILL.md +++ b/plugins/deta/skills/aml-design/SKILL.md @@ -21,8 +21,13 @@ description: 以 AML 为唯一事实源读写建筑模型并编译校验。当 - 校验不通过(`gate: failed`)就按 `validation` 明细改 AML 后重跑,直到通过; - 冲突(`version_conflict`)说明云工作区被其它会话改过:确认要覆盖才传 `force: true`。 -**看模型 / 打开 Studio**:`studio_link` 拿一次性免密链接,再用宿主内置浏览器(`iab`)打开—— -不要手工在面板登录,也不要用 playwright 逐步点击。 +**看模型 / 打开 Studio**:`open_studio`(推荐)或 `studio_link` 拿一次性免密链接,再用宿主内置 +浏览器(`iab`)打开——不要手工在面板登录,也不要用 playwright 逐步点击。 + +**执行器在线是模拟类工具的前置条件**:`simulate` / `studio_command` / `query_simulation_db` / +`view_canvas` 的算力在 ant-model 浏览器里的执行器,经网关 host-call 中继干活;项目标签页一关 +就离线,工具会 fail fast 报「执行器离线」。`open_studio` 会回报 `executor_online`,遇到离线提示 +就再调一次它,不要改用手工登录。 ## 何时使用 @@ -92,11 +97,15 @@ Studio 就是deta.city 上的建筑性能应用。在 Codex 右侧内置浏览 打开步骤(用宿主内置浏览器 = browser 插件的 `iab`): -1. **先调 `studio_link` 拿一次性链接**(推荐路径,免手工登录):返回 `url` +1. **先调 `open_studio` 拿链接并确认执行器上线**(推荐路径,免手工登录;工具面里没有它时用 + `studio_link`,但 `studio_link` 只给链接、不报执行器状态)。返回 `url` (`https://deta.city/mcp-api/portal-session/landing?ticket=…&next=/design/`)、 - `studioUrl`、`expiresInSeconds`(180)。该链接在面板内会自动完成 deta.city 登录并跳到 Studio。 - 若返回 `auth_required` → 先让用户完成 MCP 授权(`codex mcp login deta_mcp`)再重试; - 若 `url` 报「票据无效或已过期」→ 重新调一次 `studio_link`,不要改成手工登录。 + `studioUrl`、`executor_online`、`expiresInSeconds`(180)。该链接在面板内会自动完成 + deta.city 登录并跳到 Studio。 + - 典型节奏:`open_studio()` 拿 `url` → 面板打开 → `open_studio({ waitSeconds: 20 })` + 确认 `executor_online: true` → 再调 `simulate` / `studio_command` 等执行器侧工具。 + - 若返回 `auth_required` → 先让用户完成 MCP 授权(`codex mcp login deta_mcp`)再重试; + 若 `url` 报「票据无效或已过期」→ 重新调一次,不要改成手工登录。 2. 按 browser 插件技能(`control-in-app-browser`)的 Bootstrap 初始化,再取内置浏览器句柄: `const iab = await agent.browsers.get("iab");`,并先读一次 `await iab.documentation()`。 3. 先 `await iab.tabs.list()` 看是否已有该 URL 的标签:**有就复用,不要调 `goto` 重载** @@ -179,4 +188,5 @@ Studio 就是deta.city 上的建筑性能应用。在 Codex 右侧内置浏览 同步:`push_project`、`pull_project` 脚本与参考:`run_script`、`run_scripts`、`read_reference` 项目与查询:`list_projects`、`list_buildings`、`query_knowledge`、`parameter_sweep` -面板与 Studio:`studio_link`(面板免密登录链接,见「在右侧面板打开 Studio」一节) +面板与 Studio:`open_studio`(打开 Studio 执行器:免密链接 + 轮询等上线,见「在右侧面板打开 Studio」一节)、 +`studio_link`(只要链接时用)