@doubao-dev/cli 1.0.0-rc.1 → 1.0.0-rc.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +12 -6
  2. package/dist/691.js +96 -0
  3. package/dist/build.js +1 -0
  4. package/dist/categories.js +1 -1
  5. package/dist/command.js +9 -3
  6. package/dist/command~1.js +4 -4
  7. package/dist/command~2.js +1 -1
  8. package/dist/command~3.js +2 -1
  9. package/dist/command~4.js +1 -1
  10. package/dist/command~5.js +6 -5
  11. package/dist/dist.js +1 -1
  12. package/dist/draft.js +2 -2
  13. package/dist/index.d.ts +886 -8
  14. package/dist/index.js +1 -1
  15. package/dist/main.d.ts +886 -8
  16. package/dist/main.js +1 -1
  17. package/dist/mcp-apps-inspector.js +1 -0
  18. package/dist/multipart-parser.js +1 -1
  19. package/dist/open.js +2 -0
  20. package/dist/plugin.js +2 -2
  21. package/dist/preview.js +5 -5
  22. package/dist/progress.js +1 -1
  23. package/dist/ratatui-ui.js +1 -1
  24. package/dist/session.js +1 -1
  25. package/dist/skills/doubao-plugin-cli/SKILL.md +45 -40
  26. package/dist/skills/doubao-plugin-cli/references/cli/development.md +128 -0
  27. package/dist/skills/doubao-plugin-cli/references/cli/project.md +190 -0
  28. package/dist/skills/doubao-plugin-cli/references/cli/release.md +144 -0
  29. package/dist/skills/doubao-plugin-cli/references/examples/todo-example.md +114 -0
  30. package/dist/skills/doubao-plugin-cli/references/examples/workbench-example.md +130 -0
  31. package/dist/skills/doubao-plugin-cli/references/protocols/business-skills.md +49 -0
  32. package/dist/skills/doubao-plugin-cli/references/protocols/cli-connectors.md +56 -0
  33. package/dist/skills/doubao-plugin-cli/references/protocols/managed-agents.md +46 -0
  34. package/dist/skills/doubao-plugin-cli/references/protocols/mcp-apps/integration.md +207 -0
  35. package/dist/skills/doubao-plugin-cli/references/protocols/mcp-apps/runtime.md +318 -0
  36. package/dist/skills/doubao-plugin-cli/references/protocols/mcp-apps/workbench.md +180 -0
  37. package/dist/skills/doubao-plugin-cli/references/protocols/mcp-auth.md +73 -0
  38. package/dist/skills/doubao-plugin-cli/references/protocols/mcp-config.md +145 -0
  39. package/dist/skills/doubao-plugin-cli/references/protocols/mcp-events.md +260 -0
  40. package/dist/skills/doubao-plugin-cli/references/protocols/plugin-json.md +95 -0
  41. package/dist/skills/doubao-plugin-cli/references/protocols/workbench.md +120 -0
  42. package/dist/skills/doubao-plugin-cli/references/upstream/SOURCES.md +32 -0
  43. package/dist/skills/doubao-plugin-cli/references/upstream/mcp-apps.LICENSE +216 -0
  44. package/dist/skills/doubao-plugin-cli/references/upstream/mcp-apps.mdx +1760 -0
  45. package/dist/skills/doubao-plugin-cli/references/upstream/mcp-events.LICENSE +216 -0
  46. package/dist/skills/doubao-plugin-cli/references/upstream/mcp-events.md +1231 -0
  47. package/dist/skills/doubao-plugin-cli/references/upstream/standard-webhooks.LICENSE +201 -0
  48. package/dist/skills/doubao-plugin-cli/references/upstream/standard-webhooks.md +349 -0
  49. package/dist/skills/miaoda-mcp-dev/SKILL.md +20 -0
  50. package/dist/skills/miaoda-mcp-dev/references/app-plugin-mcp.md +9 -0
  51. package/dist/skills/miaoda-mcp-dev/references/development.md +62 -0
  52. package/dist/skills/miaoda-mcp-dev/references/todo-example.md +128 -0
  53. package/dist/templates/standard/AGENTS.md +1 -1
  54. package/dist/templates/workbench/README.md.template +9 -0
  55. package/dist/templates/workbench/com.doubao/workbench/manifest.json +10 -0
  56. package/dist/uninstall.js +1 -1
  57. package/dist/versions~1.js +1 -1
  58. package/dist/web/index.html +1 -0
  59. package/dist/web/sandbox-proxy.html +101 -0
  60. package/dist/web/static/css/index.b3102f16b9.css +1 -0
  61. package/dist/web/static/js/155.747f5232dc.js +69 -0
  62. package/dist/web/static/js/async/970.86106314b5.js +1 -0
  63. package/dist/web/static/js/index.c1186260b9.js +4 -0
  64. package/dist/web/static/js/lib-react.00514652bf.js +2 -0
  65. package/dist/web/static/js/lib-react.00514652bf.js.LICENSE.txt +39 -0
  66. package/dist/workbench-search.js +1 -0
  67. package/dist/xdg-open +1267 -0
  68. package/package.json +14 -15
  69. package/dist/21.js +0 -101
  70. package/dist/schema.js +0 -1
  71. package/dist/skills/doubao-plugin-cli/references/cli-connectors.md +0 -29
  72. package/dist/skills/doubao-plugin-cli/references/development.md +0 -29
  73. package/dist/skills/doubao-plugin-cli/references/mcp-apps.md +0 -40
  74. package/dist/skills/doubao-plugin-cli/references/mcp-auth.md +0 -23
  75. package/dist/skills/doubao-plugin-cli/references/project-config.md +0 -139
  76. package/dist/skills/doubao-plugin-cli/references/upload.md +0 -77
  77. /package/dist/{21.js.LICENSE.txt → 691.js.LICENSE.txt} +0 -0
@@ -0,0 +1,62 @@
1
+ # 妙搭 MCP 开发
2
+
3
+ ## 平台交互
4
+
5
+ 使用 `lark-cli apps` 管理妙搭,参数不明时查询对应子命令的 `--help`。只有父级帮助、没有子命令签名时,即使退出码为 0 也不能认定命令可用。
6
+
7
+ 缺少 CLI 时按 [lark-cli 官方仓库](https://github.com/larksuite/cli) 的安装说明准备;宿主提供 `lark-apps`、`lark-shared` Skill 时复用其平台操作与认证指引。已有 CLI 与登录态直接复用,不依赖豆包专有工具。
8
+
9
+ ## 定位应用与源码
10
+
11
+ 修改已有应用时,使用 `apps +list` 查找原应用,`+get` 读取详情,沿用原应用身份。使用当前可用的 `+init` 或 `+export` 获取源码;`+export` 导出默认分支最近一次提交,不含沙箱未提交改动。生成器尚未提交的内容由原生成会话回收,不能用旧归档覆盖。
12
+
13
+ 源码查询失败时按实际错误核对账号和项目权限。文件存储通过 `+file-list` / `+file-download` 获取,与源码归档分别处理。
14
+
15
+ ## 工程接线
16
+
17
+ 本地开发入口见[发布与代码来源](#发布授权与代码来源)。NestJS 全栈模板生成 `.agents/skills/mcp-guide/SKILL.md`,按需读取工具、界面、身份、调试及客户端接入章节,SDK 导入与构建方式以工程指引及已安装类型为准。
18
+
19
+ 模板内置 `POST /__innerapi__/mcp`。工具类加入 NestJS 模块的 `providers`,模块接入 `app.module.ts`。MCP Apps 位于 `server/mcp/ui/<entry>/`,构建生成单文件 HTML,通过 UI Resource 返回,沿用模板接线。
20
+
21
+ MCP 标准与宿主扩展使用 `doubao-plugin-cli` Skill;平台 CLI 用于开发管理,运行时使用平台 SDK/API 和实际用户身份。
22
+
23
+ 需要 Web 首页时,在 `client/src/app.tsx` 的首页路由实现服务名称、用途和使用入口。Web 页面与 MCP Apps 资源分别验证,页面上线不表示 MCP 已接通。
24
+
25
+ ## 开发态验证
26
+
27
+ NestJS 模板用 `npm run dev` 启动;`apps +env-pull` 提供本地开发身份,启动与代理方式按工程 `mcp-guide`。
28
+
29
+ 开发态地址为 `http://localhost:<CLIENT_DEV_PORT><CLIENT_BASE_PATH>/__innerapi__/mcp`,端口与前缀取实际启动日志及工程配置。身份由开发代理注入,直连 NestJS 端口不具备该身份。
30
+
31
+ 使用 `dbx inspect --mcp-server <开发态地址> --no-open` 检查工具、资源和界面交互。开发态代理验证、线上用户授权与目标宿主体验分别记录。
32
+
33
+ ## 发布授权与代码来源
34
+
35
+ 用户已授权发布且目标应用、环境和范围明确时执行;需要发布但缺少授权时,完成开发准备后交接具体目标与影响。
36
+
37
+ | 当前命令集 | 工程与发布方式 |
38
+ | --- | --- |
39
+ | `+create`、`+init`、`+release-create` | 应用类型为 `full_stack`,`+init` 获取工程,身份保存在 `.spark/meta.json`;源码提交并推送到 `sprint/default` 后发布该分支,`main` 为平台发布快照 |
40
+ | `+init-template`、`+deploy` | 使用 `--type full_stack` 初始化本地工程,身份绑定与发布参数按生成模板及命令帮助处理 |
41
+
42
+ 按当前 CLI 帮助选用一条流程,不混用两种工程配置。具体命令示例见 [TODO 适配](todo-example.md#发布)。已有生成器完成发布时核对本次回执即可;转为本地发布前确认已取得完整的本次源码。
43
+
44
+ MCP Apps UI 随服务构建与发布,不另走静态 HTML 发布流程。
45
+
46
+ ## 发布结果
47
+
48
+ 查询本次 `release_id` 的成功终态与真实 `online_url`。异步发布约每 20 秒查一次;结果未知先查原发布,不重复创建。历史 `is_published` 不证明本次已上线。长时间等待时说明进展,失败或需要用户操作时交接实际状态。
49
+
50
+ ## 连接地址与鉴权
51
+
52
+ 从同一应用、同一环境的发布结果或工程 `mcp-guide` 取得 MCP 连接方式。当前 NestJS 模板发布并获准启用后,可用当前 CLI 支持的 `apps +mcp-get --app-id <app_id>` 获取连接信息。保持正式 URL 原样,不从 Web 预览地址或应用 ID 拼接。
53
+
54
+ `+mcp-get` 与 `+mcp-key-create` 可能创建运行态凭据,仅在已授权接入范围内执行,不作为只读探针。含凭据的 URL 按秘密处理,不放入聊天或可分发包。
55
+
56
+ 用真实 MCP 初始化响应或有效 OAuth 发现元数据核对连接;有效 OAuth challenge 的 401 进入客户端授权,普通网页登录跳转不能代替 MCP 授权。飞书用户 OAuth 由目标客户端完成,管理登录与业务用户授权分别验证。
57
+
58
+ ## 服务交接
59
+
60
+ 交回应用 ID、环境、发布回执、正式 MCP endpoint、传输和鉴权方式、实际工具与 UI 验证结果及缺项。引用既有部署结果或生成回执时确认服务归属;不回传凭据。
61
+
62
+ 按目标验收核心业务工具,MCP Apps 还需验证资源读取、工具结果进入 UI 及一次真实交互。主流程接入插件后继续目标宿主验证,不将发布成功或 Inspector 通过视为宿主体验通过。
@@ -0,0 +1,128 @@
1
+ # TODO 妙搭实现
2
+
3
+ 实现 `doubao-plugin-cli` Skill 的 `references/examples/todo-example.md` 所定义的业务契约与验收目标。本页仅说明 NestJS 模板中的平台实现,API 写法以工程 `mcp-guide` 和已安装 SDK 类型为准。
4
+
5
+ ## 创建工程与目录
6
+
7
+ 宿主提供 `+init` 与 `+release-create` 时:
8
+
9
+ ```sh
10
+ lark-cli apps +create --name "我的待办 MCP" --app-type full_stack --as user
11
+ # app_id 使用上一步返回值;已有应用跳过创建
12
+ lark-cli apps +init --app-id <app_id> --dir ./todo-mcp --as user
13
+ cd ./todo-mcp
14
+ ```
15
+
16
+ 初始化后读取工程 `.agents/skills/mcp-guide/SKILL.md`。本例新增或修改的位置:
17
+
18
+ ```text
19
+ todo-mcp/
20
+ ├── client/src/app.tsx # Web 预览首页路由
21
+ ├── server/
22
+ │ ├── app.module.ts # 配置 MCP 名称、说明,注册 TodoTools
23
+ │ ├── database/schema.ts # 平台生成的数据库类型
24
+ │ └── mcp/
25
+ │ ├── tools/todo.tools.ts # 四个工具及可选 UI Resource
26
+ │ ├── skills/todo-list/SKILL.md # 给消费方 Agent 的待办使用说明
27
+ │ └── ui/todos/ # 仅 MCP Apps 需要
28
+ │ ├── index.html
29
+ │ └── main.tsx
30
+ └── .spark/meta.json # 初始化器写入的应用身份
31
+ ```
32
+
33
+ 界面的 TypeScript 配置及构建入口按工程 `mcp-guide` 的 MCP Apps 章节准备。工具类加入 `app.module.ts` 的 `providers`;在已有 `PlatformModule.forRoot()` 中合并 `mcp.serverName: 'todo-list'` 和 `mcp.instructions`,例如“管理个人待办,从 todo_list 查询开始”。
34
+
35
+ ## 数据与工具适配
36
+
37
+ 通过 `lark-cli apps +db-execute` 按通用业务契约建立 `todos` 表,以 UUID 为主键,`owner_id` 保存所属用户。审计列、RLS 和 Schema 生成沿用工程数据库指引;Drizzle 字段名以 `server/database/schema.ts` 为准。
38
+
39
+ 身份取 `ctx.user.userId`。查询、更新和删除都同时限制所属用户;创建时写入该用户。工具只返回表中的业务字段,不把整行审计信息传给模型。
40
+
41
+ 以下是 `todo.tools.ts` 中创建工具的完整片段;其余工具按通用示例的契约在同一类中实现。`todos` 从平台生成的 Schema 导入,数据库由平台注入:
42
+
43
+ ```ts
44
+ import { Inject } from '@nestjs/common';
45
+ import { z } from 'zod';
46
+ import {
47
+ DRIZZLE_DATABASE, McpTools, McpTool,
48
+ type PostgresJsDatabase, type Infer, type McpContext, type McpToolResult
49
+ } from '@lark-apaas/fullstack-nestjs-core';
50
+ import { todos } from '../../database/schema';
51
+
52
+ const CreateInput = {
53
+ title: z.string().trim().min(1).max(200).describe('待办标题')
54
+ };
55
+ const TodoOutput = {
56
+ todo: z.object({ id: z.string(), title: z.string(), completed: z.boolean() })
57
+ };
58
+
59
+ @McpTools()
60
+ export class TodoTools {
61
+ constructor(@Inject(DRIZZLE_DATABASE) private readonly db: PostgresJsDatabase) {}
62
+
63
+ @McpTool({
64
+ name: 'todo_create',
65
+ title: '添加待办',
66
+ description: '用户要求添加任务时创建本人待办,返回 ID、标题和完成状态;重复调用会新增。',
67
+ inputSchema: CreateInput,
68
+ outputSchema: TodoOutput,
69
+ annotations: {
70
+ readOnlyHint: false, destructiveHint: false,
71
+ idempotentHint: false, openWorldHint: false
72
+ }
73
+ })
74
+ async create(
75
+ input: Infer<typeof CreateInput>, ctx: McpContext
76
+ ): Promise<McpToolResult<typeof TodoOutput>> {
77
+ const [todo] = await this.db.insert(todos)
78
+ .values({ title: input.title, ownerId: ctx.user.userId! })
79
+ .returning({ id: todos.id, title: todos.title, completed: todos.completed });
80
+ return { structuredContent: { todo } };
81
+ }
82
+ }
83
+ ```
84
+
85
+ 本模板默认要求用户身份,SDK 自动把 `structuredContent` 补充为可读文本结果。`server/mcp/skills/todo-list/SKILL.md` 描述四个工具的用法、ID 来源和错误处理;它由妙搭 SDK 提供给消费方,豆包插件包内的业务 Skill 由插件主流程维护。
86
+
87
+ ## 可选 MCP Apps 界面
88
+
89
+ `todo_list` 的 `@McpTool` 增加 `ui: { resourceUri: 'ui://todo/list' }`。在同一工具类注册资源,相关符号从平台 SDK 导入:
90
+
91
+ ```ts
92
+ @McpUiResource({
93
+ uri: 'ui://todo/list', title: '我的待办',
94
+ description: '查看、添加和完成个人待办。',
95
+ csp: { connectDomains: [], resourceDomains: [] }
96
+ })
97
+ view() { return readMcpUiTemplate('todos'); }
98
+ ```
99
+
100
+ 上例空 CSP 适用于构建后的 HTML 无外部网络依赖的情况。接入外链资源或直接联网时,按 `doubao-plugin-cli` Skill 的 `references/protocols/mcp-apps/integration.md` 中「CSP 域名清单」补齐声明,并核对资源响应和宿主渲染。
101
+
102
+ `server/mcp/ui/todos/index.html` 提供 `root` 节点并加载 `main.tsx`。前端使用工程指引中的 `useApp` 连接宿主,在 `onAppCreated` 中注册 `ontoolresult`,按通用示例约定渲染 `structuredContent.items`。表单、勾选、删除与分页通过 `app.callServerTool` 调用相同业务工具。UI Resource 读取模板构建的 HTML,具体 `useApp` 接线按工程 `mcp-guide`;不另建网页 API 或 MCP 路由。
103
+
104
+ ## 可选 Web 首页
105
+
106
+ 本次交付需要 Web 预览时,在 `client/src/app.tsx` 首页路由展示服务名称、用途和实际使用入口。该页面与 MCP Apps 资源独立;宿主提出其他交付要求时一并实现。
107
+
108
+ ## 验证
109
+
110
+ 运行 `npm run dev`,从启动日志和工程配置取得开发态 MCP 地址,按 [开发态验证](development.md#开发态验证) 使用 Inspector,执行通用 TODO 示例的业务与 UI 检查。平台代理身份仅用于开发态,发布后继续验证实际用户授权。
111
+
112
+ ## 发布
113
+
114
+ 以下适用于已核实提供 `+init` 与 `+release-create` 的 CLI;另一命令集见 [发布入口](development.md#发布授权与代码来源)。
115
+
116
+ 在工程目录提交本次源码与必要配置并发布:
117
+
118
+ ```sh
119
+ git add <本次源码与配置>
120
+ git commit -m "feat: add todo MCP service"
121
+ git push origin sprint/default
122
+ lark-cli apps +release-create --app-id <app_id> --branch sprint/default --as user
123
+ lark-cli apps +release-get --app-id <app_id> --release-id <release_id> --as user
124
+ ```
125
+
126
+ 命令差异和发布授权见[发布流程](development.md#发布授权与代码来源)。发布完成后按[连接地址与鉴权](development.md#连接地址与鉴权)取得线上 MCP endpoint,再交接插件接入;发布返回的 `online_url` 不作为 MCP endpoint。
127
+
128
+ 发布完成后,由插件接入流程执行通用示例中的账号同步和目标宿主验收。
@@ -2,4 +2,4 @@
2
2
 
3
3
  先阅读 [CLI 开发 Skill](.agents/skills/doubao-plugin-cli/SKILL.md),按任务选择其中的配置、上传或 MCP Apps 指引。
4
4
 
5
- 链接缺失时运行 `dbx skills`。业务 Skill 放在 `skills/`,开发指引不进入上传包。
5
+ 链接缺失时运行 `dbx skills`。普通插件的业务 Skill 放在 `skills/`。定制工作台的界面、上下文和资源预装配置见[工作台包协议](.agents/skills/doubao-plugin-cli/references/protocols/workbench.md)。开发指引不进入上传包。
@@ -0,0 +1,9 @@
1
+ # __PLUGIN_NAME__
2
+
3
+ 在 `com.doubao/workbench/manifest.json` 配置首页,按需填写 `additionalContext`。接入 MCP 时在项目根目录添加 `mcp.json`。预装已有 Skill 或插件时添加 `com.doubao/workbench/preinstall-resources.json`。
4
+
5
+ ```sh
6
+ dbx dev --workbench
7
+ ```
8
+
9
+ 操作指引见 [开发调试](.agents/skills/doubao-plugin-cli/references/cli/development.md) 和 [版本交付与审核](.agents/skills/doubao-plugin-cli/references/cli/release.md),完整配置见 [合同工作台示例](.agents/skills/doubao-plugin-cli/references/examples/workbench-example.md)。
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "additionalContext": "",
4
+ "reconfig": {
5
+ "home": {
6
+ "mode": "overlay",
7
+ "welcome": { "title": "欢迎使用我的工作台" }
8
+ }
9
+ }
10
+ }
package/dist/uninstall.js CHANGED
@@ -1 +1 @@
1
- import{log as _,updateUserPlugin as t}from"./21.js";import{withProgress as i}from"./progress.js";import{ensureLogin as n}from"./command~1.js";async function o(o){await n(!1);let{name:a}=o.plugin;await i("从当前用户卸载插件开发包",()=>t({name:a,action:"Uninstall"})),_.success(`插件开发包已卸载:${a}`)}export{o as runUninstall};
1
+ import{log as _,updateUserPlugin as i}from"./691.js";import{withProgress as t}from"./progress.js";import{ensureLogin as n}from"./command~1.js";async function o(a,r=!1){await n(!1);let{name:l}=a.plugin,m=r?"定制工作台":"应用插件";await t(`从当前账号卸载${m}开发包`,()=>i({name:l,action:"Uninstall"},void 0,r)),_.success(`${m}开发包已卸载:${l}`)}export{o as runUninstall};
@@ -1 +1 @@
1
- import{listPluginVersions as e}from"./21.js";async function*i(i){let t,n=i.plugin.id?{ability_id:i.plugin.id}:{name:i.plugin.name},a=new Set;do{let{items:i=[],page:o}=await e({...n,page_size:20,page_token:t}),_=o?.next_page_token;if(_&&a.has(_))throw Error("版本列表返回了重复的分页标记,请稍后重试");_&&a.add(_),yield{items:i},t=_}while(t)}export{i as listProjectVersionPages};
1
+ import{listPluginVersions as e,getApproval as t,projectIdentity as i,resolvePublicationType as n}from"./691.js";async function*a(t,a){let o,r=a?.isWorkbench??t.hasWorkbench;!a&&r&&t.plugin.id&&!t.plugin.publicationType&&await n(t);let l=a?.identity??i(t),p=new Set;do{let{items:t=[],page:i}=await e({...l,page_size:20,page_token:o},void 0,r),n=i?.next_page_token;if(n&&p.has(n))throw Error("版本列表返回了重复的分页标记,请稍后重试");n&&p.add(n),yield{items:t},o=n}while(o)}async function o(e,i){let n=new Set;for await(let{items:o}of a(e))for(let a of o){let o=a.current_approval?.approval_id;if(!o||n.has(o))continue;n.add(o);let{approval:r}=await t(o,{publicationType:i,workbench:e.hasWorkbench});if(!r)throw Error(`服务端未返回审核记录:${o}`);if(null==r.handled_at_ms)return o}}export{o as findPendingApproval,a as listProjectVersionPages};
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html><head><title>MCP Apps Inspector</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.00514652bf.js"></script><script defer src="/static/js/155.747f5232dc.js"></script><script defer src="/static/js/index.c1186260b9.js"></script><link href="/static/css/index.b3102f16b9.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -0,0 +1,101 @@
1
+ <!doctype html>
2
+ <!--
3
+ Adapted from the official MCP Inspector (MIT):
4
+ https://github.com/modelcontextprotocol/inspector/blob/main/clients/web/static/sandbox_proxy.html
5
+ Keep the default srcdoc double-iframe isolation and standard proxy handshake.
6
+ DBX serves this template with an exact loopback embedder allow-list.
7
+ -->
8
+ <html>
9
+ <head>
10
+ <meta charset="utf-8" />
11
+ <meta name="color-scheme" content="light dark" />
12
+ <title>MCP-UI Proxy</title>
13
+ <style>
14
+ html,
15
+ body {
16
+ margin: 0;
17
+ width: 100%;
18
+ height: 100%;
19
+ background: transparent;
20
+ }
21
+ iframe {
22
+ display: block;
23
+ width: 100%;
24
+ height: 100%;
25
+ border: 0;
26
+ background: transparent;
27
+ }
28
+ </style>
29
+ </head>
30
+ <body>
31
+ <script>
32
+ const allowedOrigins = /*INSPECTOR_EMBEDDER_ORIGINS*/ null;
33
+ if (window.self === window.top || !document.referrer) {
34
+ throw new Error('The sandbox proxy must be embedded by the Inspector');
35
+ }
36
+ const hostOrigin = new URL(document.referrer).origin;
37
+ if (!allowedOrigins?.includes(hostOrigin) || hostOrigin === window.location.origin) {
38
+ throw new Error('Unexpected or same-origin sandbox embedder');
39
+ }
40
+
41
+ // Match the official proxy's cross-origin self-test.
42
+ let canAccessHost = false;
43
+ try {
44
+ canAccessHost = Boolean(window.parent.document);
45
+ } catch {
46
+ // Expected: the host and proxy must be different origins.
47
+ }
48
+ if (canAccessHost) {
49
+ throw new Error('The sandbox proxy is not isolated from the Inspector');
50
+ }
51
+
52
+ const inner = document.createElement('iframe');
53
+ inner.title = 'MCP App';
54
+ inner.setAttribute('sandbox', 'allow-scripts allow-forms');
55
+ document.body.appendChild(inner);
56
+
57
+ function buildAllowAttribute(permissions) {
58
+ const allow = [];
59
+ if (permissions?.camera) allow.push('camera');
60
+ if (permissions?.microphone) allow.push('microphone');
61
+ if (permissions?.geolocation) allow.push('geolocation');
62
+ if (permissions?.clipboardWrite) allow.push('clipboard-write');
63
+ return allow.join('; ');
64
+ }
65
+
66
+ window.addEventListener('message', (event) => {
67
+ if (event.source === window.parent) {
68
+ if (event.origin !== hostOrigin) return;
69
+ if (event.data?.method === 'ui/notifications/sandbox-resource-ready') {
70
+ const { html, sandbox, permissions } = event.data.params;
71
+ if (typeof sandbox === 'string') {
72
+ // srcdoc must never inherit this trusted proxy's origin.
73
+ const tokens = sandbox
74
+ .split(/\s+/)
75
+ .filter((token) => token && token.toLowerCase() !== 'allow-same-origin');
76
+ if (!tokens.some((token) => token.toLowerCase() === 'allow-scripts')) {
77
+ console.warn('[Sandbox] App scripts are disabled by the requested sandbox');
78
+ }
79
+ inner.setAttribute('sandbox', tokens.join(' '));
80
+ }
81
+ const allow = buildAllowAttribute(permissions);
82
+ if (allow) inner.setAttribute('allow', allow);
83
+ else inner.removeAttribute('allow');
84
+ // The host already wrapped HTML with the per-app CSP. Do not parse it
85
+ // or inject markup ahead of that policy in the proxy.
86
+ if (typeof html === 'string') inner.srcdoc = html;
87
+ } else {
88
+ inner.contentWindow.postMessage(event.data, '*');
89
+ }
90
+ } else if (event.source === inner.contentWindow && event.origin === 'null') {
91
+ // Relay protocol messages and DBX diagnostics from this exact view only.
92
+ window.parent.postMessage(event.data, hostOrigin);
93
+ }
94
+ });
95
+ window.parent.postMessage(
96
+ { jsonrpc: '2.0', method: 'ui/notifications/sandbox-proxy-ready', params: {} },
97
+ hostOrigin
98
+ );
99
+ </script>
100
+ </body>
101
+ </html>
@@ -0,0 +1 @@
1
+ :root{--background-page:#f7f7f7;--background-base-1:#fff;--line-subtle:#0000000f;--line-default:#0000001a;--text-100:#000;--text-80:#333;--text-60:#666;--text-40:#999;--text-30:#bababa;--text-transparent-6:#0000000f;--fill-subtle:#00000008;--support-success:#34c759;--support-success-text:#1f9d45;--support-success-bg:#34c7591f;--support-warning:#ff9500;--support-warning-bg:#ff95001f;--support-error:#ff3b30;--support-error-text:#e5352b;--support-error-bg:#ff3b301a;--theme:#1664ff;--theme-bg:#ebf2ff;--tok-key:#c41a16;--tok-string:#1a55d6;--tok-number:#1a55d6;--tok-literal:#9b2393;--font-sans:"PingFang SC", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Microsoft YaHei", sans-serif;--font-mono:"SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}#root{overflow:auto}body{font-family:var(--font-sans);color:var(--text-100);background:var(--background-page);-webkit-font-smoothing:antialiased;font-size:12px;overflow:hidden}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:0;padding:0}button:disabled{cursor:not-allowed}input,textarea,select{font:inherit;color:inherit}h2,h3{margin:0}.mono{font-family:var(--font-mono)}.layout{flex-direction:column;min-width:1080px;height:100%;display:flex}.workspace-columns{flex:1;min-height:0;display:flex}.canvas-pane{background:var(--background-page);border-right:1px solid var(--line-subtle);flex-direction:column;flex:none;min-width:360px;display:flex;position:relative;container-type:inline-size}.server-pane{background:var(--background-page);flex-direction:column;flex:1;min-width:420px;display:flex}.card{background:var(--background-base-1);border-radius:12px}.pane-topbar{background:var(--background-base-1);border-bottom:1px solid var(--line-subtle);flex:none;justify-content:space-between;align-items:center;height:36px;padding:0 8px;display:flex;position:relative}.pane-topbar-side{justify-content:flex-end;align-items:center;margin-left:auto;display:flex}.pane-topbar-tabs{position:absolute;left:50%;transform:translate(-50%)}.pane-topbar.is-devtools{justify-content:flex-start;padding:0 20px}.pane-topbar.is-devtools .tabs{gap:28px}.tab-count{color:var(--text-40);margin-left:6px;font-size:10px}[hidden]{display:none!important}.tabs{align-items:stretch;gap:24px;height:100%;display:flex}.tab{color:var(--text-40);white-space:nowrap;align-items:center;font-size:12px;font-weight:500;line-height:25px;display:flex;position:relative}.tab:hover{color:var(--text-60)}.tab.is-active{color:var(--text-100)}.tab.is-active:after{content:"";background:var(--text-100);border-radius:2px;width:32px;height:2px;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.icon-btn{color:var(--text-40);border-radius:6px;justify-content:center;align-items:center;padding:8px;transition:background .15s,color .15s;display:inline-flex}.icon-btn:hover:not(:disabled){color:var(--text-80);background:var(--fill-subtle)}.icon-btn:disabled{opacity:.4}.btn{white-space:nowrap;border-radius:6px;justify-content:center;align-items:center;gap:6px;height:28px;padding:0 12px;font-size:12px;font-weight:500;transition:background .15s,opacity .15s;display:inline-flex}.btn-default{background:var(--background-base-1);border:1px solid var(--line-default);color:var(--text-100)}.btn-default:hover:not(:disabled){background:var(--fill-subtle)}.btn-primary{background:var(--text-100);color:#fff;height:32px;padding:0 16px;font-size:13px}.btn-primary:hover:not(:disabled){background:#262626}.btn:disabled{opacity:.4}.tag{white-space:nowrap;border-radius:6px;align-items:center;height:22px;padding:0 6px;font-size:11px;font-weight:500;line-height:12px;display:inline-flex}.tag-gray{background:var(--text-transparent-6);color:var(--text-60)}.tag-success{background:var(--support-success-bg);color:var(--support-success-text)}.tag-error{background:var(--support-error-bg);color:var(--support-error-text)}.tag-xs{border-radius:4px;height:16px;padding:0 5px;font-size:10px;font-weight:600}.dot{border-radius:50%;flex:none;width:6px;height:6px;display:inline-block}.dot-success{background:var(--support-success)}.dot-error{background:var(--support-error)}.dot-warning{background:var(--support-warning)}.dot-idle{background:var(--text-30)}.pill{white-space:nowrap;border-radius:12px;align-items:center;gap:6px;height:24px;padding:0 10px;font-size:12px;font-weight:500;display:inline-flex}.pill-success{background:var(--support-success-bg);color:var(--support-success-text)}.pill-warning{background:var(--support-warning-bg);color:var(--support-warning)}.pill-error{background:var(--support-error-bg);color:var(--support-error-text)}.pill-idle{background:var(--text-transparent-6);color:var(--text-60)}.search{border:1px solid var(--line-default);background:var(--background-base-1);height:32px;color:var(--text-40);border-radius:6px;align-items:center;gap:6px;padding:0 10px;display:flex}.search:focus-within{border-color:#0000004d}.search input{min-width:0;color:var(--text-100);background:0 0;border:0;outline:0;flex:1;font-size:12px}.search input::placeholder{color:var(--text-40)}.segmented{border:1px solid var(--line-default);background:var(--background-base-1);border-radius:6px;padding:2px;display:inline-flex}.segmented button{min-width:56px;height:22px;color:var(--text-60);border-radius:4px;padding:0 12px;font-size:11px;font-weight:500}.segmented button.is-active{background:var(--text-100);color:#fff}.dropdown{display:inline-flex;position:relative}.dropdown-trigger{border:1px solid var(--line-default);background:var(--background-base-1);width:100%;height:28px;color:var(--text-100);border-radius:6px;justify-content:space-between;align-items:center;gap:8px;padding:0 10px;font-size:12px;font-weight:500;display:inline-flex}.dropdown-trigger svg{color:var(--text-30);flex:none}.dropdown-trigger .is-placeholder{color:var(--text-40)}.dropdown-menu{z-index:20;background:var(--background-base-1);min-width:100%;max-height:280px;box-shadow:0 6px 24px #0000001f, 0 0 0 1px var(--line-subtle);border-radius:8px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;overflow:auto}.dropdown-menu button{text-align:left;white-space:nowrap;border-radius:6px;width:100%;padding:6px 10px;font-size:12px;display:block}.dropdown-menu button:hover{background:var(--fill-subtle)}.dropdown-menu button.is-active{color:var(--theme);font-weight:500}.dropdown-empty{color:var(--text-40);padding:6px 10px}.code{background:var(--background-page);border:1px solid var(--line-subtle);font-family:var(--font-mono);border-radius:6px;font-size:12px;line-height:18px;position:relative;overflow:hidden}.code-scroll{height:100%;padding:6px 0;overflow:auto}.code-line{min-width:max-content;display:flex}.code-gutter,.code-gutter-col{text-align:right;width:36px;color:var(--text-40);-webkit-user-select:none;user-select:none;flex:none;padding-right:12px}.code-text{white-space:pre;color:var(--text-80);padding-right:12px}.tok-key{color:var(--tok-key)}.tok-string{color:var(--tok-string)}.tok-number{color:var(--tok-number)}.tok-literal{color:var(--tok-literal)}.code-editor{display:flex}.code-editor .code-gutter-col{padding-top:6px;padding-bottom:6px;overflow:hidden}.code-editor textarea{resize:none;min-width:0;font-family:inherit;font-size:inherit;line-height:inherit;color:var(--text-80);white-space:pre;background:0 0;border:0;outline:0;flex:1;padding:6px 12px 6px 0;overflow:auto}.code-editor:focus-within{border-color:#00000040}.code-editor.is-invalid{border-color:#ff3b3080}.canvas-stage{background-image:radial-gradient(#00000012 1px,#0000 1px);background-size:16px 16px;flex-direction:column;flex:1;align-items:center;min-height:0;padding:32px 20px;display:flex;position:relative;overflow:auto}.canvas-pane:-webkit-full-screen{width:100%!important}.canvas-pane:fullscreen{width:100%!important}.canvas-empty{color:var(--text-40);flex-direction:column;align-items:center;gap:12px;margin:auto;font-size:13px;display:flex}.canvas-frame-wrap{flex-direction:column;flex:1;min-height:0;display:flex}.canvas-frame-label{height:18px;color:var(--text-80);flex:none;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:11px;font-weight:500;display:flex}.canvas-frame-state{color:var(--text-60);align-items:center;gap:6px;display:inline-flex}.canvas-frame{background:var(--background-base-1);border-radius:8px;flex:1;min-height:0;position:relative;overflow:hidden;box-shadow:0 4px 24px #00000014}.canvas-frame-content{transform-origin:0 0}.app-iframe{background:0 0;border:0;width:100%;height:100%;display:block}.canvas-frame-issues{color:var(--text-60);border-radius:4px;align-items:center;gap:4px;padding:0 4px;display:inline-flex}.canvas-frame-issues svg{color:var(--support-error)}.canvas-frame-issues:hover{background:var(--text-transparent-6)}.canvas-statusbar{height:44px;color:var(--text-60);flex:none;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;margin:12px 12px 0;padding:0 12px;font-size:11px;display:grid}.canvas-statusbar-left{align-items:center;gap:8px;min-width:0;display:flex}.canvas-status{white-space:nowrap;flex:none;align-items:center;gap:8px;font-weight:500;display:inline-flex}.canvas-uri{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.canvas-statusbar-right{text-align:right;white-space:nowrap;align-items:center;gap:4px;display:flex}@container (width<=440px){.canvas-dimensions{display:none}}.zoom-group{border:1px solid var(--line-default);border-radius:6px;align-items:center;height:28px;display:inline-flex}.zoom-group button{width:28px;height:100%;color:var(--text-60);justify-content:center;align-items:center;display:flex}.zoom-group button:hover{color:var(--text-100)}.zoom-group .icon-btn{border-left:1px solid var(--line-default);border-radius:0 5px 5px 0;width:32px;padding:0}.zoom-group span{text-align:center;min-width:44px;color:var(--text-80);font-size:11px}.server-body{flex-direction:column;flex:1;min-height:0;padding:12px;display:flex;overflow:hidden}.connection-bar{flex:none;align-items:center;gap:12px;margin-bottom:12px;padding:10px 12px 10px 16px;display:flex}.connection-summary{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.connection-summary strong{font-size:13px;font-weight:600;line-height:20px}.connection-summary>*{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.connection-summary>span{color:var(--text-40);font-family:var(--font-mono);font-size:11px;line-height:16px}.loading-line{vertical-align:middle;background:var(--text-transparent-6);border-radius:4px;width:112px;max-width:100%;height:1em;display:inline-block}.connection-bar .pill{flex:none}.server-error{background:var(--support-error-bg);max-height:72px;color:var(--support-error-text);word-break:break-word;border-radius:6px;flex:none;margin:0 0 12px;padding:8px 12px;overflow:auto}.inspector-panel{flex:1;min-height:0;display:flex;overflow:hidden}.inspector-panel>.debug-log{flex:1;min-width:0}.explorer{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.explorer-body{flex-direction:column;flex:1;min-height:0;display:flex}.explorer-loading-picker{border:1px solid var(--line-default);border-radius:6px;align-items:center;height:32px;padding:0 10px;display:flex}.explorer-loading-editor{background:var(--background-page);border-radius:6px;flex:1}.explorer-picker{border-bottom:1px solid var(--line-subtle);flex:none;padding:10px 12px;position:relative}.explorer-picker-head{align-items:center;gap:8px;display:flex}.explorer-picker-trigger{border:1px solid var(--line-default);text-align:left;border-radius:6px;flex:1;align-items:center;gap:8px;min-width:0;height:32px;padding:0 10px;display:flex}.explorer-picker-trigger>span{white-space:nowrap;text-overflow:ellipsis;flex:1;overflow:hidden}.explorer-picker-trigger>.tag{flex:none}.explorer-picker-trigger>svg{color:var(--text-60);flex:none}.explorer-picker-menu{z-index:30;background:var(--background-base-1);border:1px solid var(--line-default);border-radius:8px;flex-direction:column;gap:8px;max-height:min(360px,50vh);padding:8px;display:flex;position:absolute;top:calc(100% - 6px);left:12px;right:12px;box-shadow:0 8px 24px #0000001f}.explorer-picker-menu .search{flex:none}.explorer-items{flex-direction:column;flex:1;gap:4px;min-height:0;display:flex;overflow:auto}.explorer-empty{color:var(--text-40);padding:16px 4px}.explorer-item{text-align:left;border-radius:8px;align-items:center;gap:8px;width:100%;padding:9px 8px;transition:background .15s;display:flex}.explorer-item:hover{background:var(--fill-subtle)}.explorer-item.is-active{background:var(--theme-bg)}.explorer-item-icon{color:var(--text-60);flex:none}.explorer-item.is-active .explorer-item-icon,.explorer-item.is-active .explorer-item-title{color:var(--theme)}.explorer-item-text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.explorer-item-title{text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;line-height:20px;overflow:hidden}.explorer-item-sub{color:var(--text-40);text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;overflow:hidden}.tool-ui-tag{color:var(--theme);background:var(--theme-bg);flex:none;font-size:10px}.detail{flex-direction:column;flex:1;min-width:0;min-height:0;padding:14px 16px;display:flex;overflow:auto}.detail-empty{color:var(--text-40);justify-content:center;align-items:center;font-size:13px}.detail-head{flex:none;justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.detail-head>.btn{flex:none}.detail-title{min-width:0}.detail-title-row{align-items:center;gap:8px;display:flex}.detail-title-row h3{text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:600;line-height:26px;overflow:hidden}.detail-desc{color:var(--text-40);margin:2px 0 0;font-size:12px;line-height:18px}.detail-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:8px;display:grid}.field{flex-direction:column;gap:4px;min-width:0;display:flex}.field.is-wide{grid-column:1/-1}.field-label{color:var(--text-60);font-size:12px;line-height:16px}.field-box{border:1px solid var(--line-subtle);background:var(--background-page);height:32px;color:var(--text-80);border-radius:6px;justify-content:space-between;align-items:center;gap:8px;padding:0 4px 0 14px;font-size:12px;display:flex}.field-box-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.section-head{justify-content:space-between;align-items:center;margin:8px 0 4px;display:flex}.section-title{font-size:13px;font-weight:600}.tool-detail{overflow:auto}.tool-overview{flex:0 0 72px;min-width:0;height:72px}.tool-overview>.detail-head{height:46px}.tool-overview .detail-title-row{height:26px}.tool-overview .detail-desc{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tool-loading-action{background:var(--text-transparent-6);border-radius:6px;width:78px;height:32px}.tool-loading-splitter{flex:none;height:12px}.tool-metadata{color:var(--text-60);flex:none;margin-top:8px;font-size:12px;line-height:18px;position:relative}.tool-metadata summary{cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tool-metadata-body{z-index:20;border:1px solid var(--line-default);background:var(--background-base-1);border-radius:8px;max-height:180px;padding:8px 12px;position:absolute;top:calc(100% + 6px);left:0;right:0;overflow:auto;box-shadow:0 8px 24px #0000001f}.tool-metadata p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0;line-height:18px}.resource-link{max-width:100%;color:var(--theme);text-align:left;overflow-wrap:anywhere;align-items:center;gap:6px;display:flex}.resource-link svg{flex:none}.tool-workspace{flex-direction:column;flex:1;min-height:320px;margin-top:8px;display:flex}.tool-input{flex-direction:column;flex:none;min-height:140px;display:flex}.tool-input .section-head{flex:none;min-height:28px;margin:0 0 8px}.args-editor{flex:1;min-height:0}.tool-form-scroll{flex:1;min-height:0;overflow:auto}.tool-form-scroll .args-form,.tool-form-scroll .args-form-empty{min-height:100%}.tool-output{flex-direction:column;flex:1;min-height:150px;display:flex}.tool-output .result-head{flex:none;margin-top:0}.result-summary{flex-wrap:wrap;flex:none;justify-content:space-between;align-items:center;gap:4px;margin-top:8px;display:flex}.result-summary .synced-note{margin-top:0}.tool-output .result-code,.tool-output .result-placeholder{min-height:0}.args-error{color:var(--support-error-text);margin-top:6px;font-size:11px}.args-form,.args-form-empty{border:1px solid var(--line-subtle);background:var(--background-page);border-radius:6px;padding:10px 12px}.args-form{flex-direction:column;gap:10px;display:flex}.args-form-empty{color:var(--text-40)}.form-row{flex-direction:column;gap:4px;display:flex}.form-label{color:var(--text-80);align-items:center;gap:6px;font-size:12px;font-weight:500;display:flex}.form-label em{color:var(--support-error);font-style:normal}.form-type{color:var(--text-40);font-size:11px;font-weight:400}.form-input{border:1px solid var(--line-default);background:var(--background-base-1);border-radius:6px;outline:0;height:30px;padding:0 10px;font-size:12px}textarea.form-input{resize:vertical;height:auto;padding:6px 10px}.form-input:focus{border-color:#0000004d}.form-input.is-invalid{border-color:#ff3b3099}.form-help{color:var(--text-40);font-size:11px}.result-head{border-bottom:1px solid var(--line-subtle);height:32px;margin-bottom:0}.result-head .tabs{gap:0}.result-head .tab{color:var(--text-60);padding:0 10px;font-size:13px}.result-head .tab.is-active{color:var(--text-100);font-weight:600}.result-head .tab.is-active:after{width:100%}.result-status{align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex}.result-status.is-success{color:var(--support-success-text)}.result-status.is-success svg{color:var(--support-success)}.result-status.is-error{color:var(--support-error-text)}.result-status.is-running{color:var(--text-40)}.result-code{flex:1 1 0;min-height:48px;margin-top:6px}.result-code.is-tall{min-height:160px}.result-placeholder{background:var(--background-page);min-height:48px;color:var(--text-40);border-radius:6px;flex:1 1 0;justify-content:center;align-items:center;margin-top:6px;display:flex}.synced-note{color:var(--text-60);align-items:center;gap:8px;margin-top:6px;font-size:11px;display:flex}.debug-log{flex-direction:column;height:100%;padding:10px 12px 12px;display:flex}.debug-log-body{flex-direction:column;flex:1;min-height:0;margin-top:8px;display:flex}.debug-log-actions{flex-wrap:wrap;flex:none;align-items:center;gap:8px;width:100%;display:flex}.debug-log-search{width:100%;height:28px}.debug-log-order{width:100px;margin-right:auto}.debug-log-order .dropdown-trigger{height:28px}.debug-log-actions .btn{min-width:64px;height:28px}.log-table{border-top:1px solid var(--line-subtle);flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.log-rows{flex:1;min-height:0;overflow:auto}.log-row{border-bottom:1px solid var(--line-subtle);text-align:left;width:100%;color:var(--text-80);flex-direction:column;gap:5px;padding:9px 8px;font-size:12px;display:flex}.log-row-main,.log-row-meta{justify-content:space-between;align-items:center;gap:8px;display:flex}.log-row-main .log-cell-main{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.log-row-main .tag{flex:none}.log-row-meta{color:var(--text-40);font-size:10px}.log-cell-main.is-error{color:var(--support-error-text)}.log-dir{color:var(--theme);margin-right:4px;font-weight:600}.log-kind{color:var(--text-40);margin-left:6px;font-size:10px}button.log-row:hover{background:var(--fill-subtle)}button.log-row.is-active{background:var(--theme-bg)}.log-empty{color:var(--text-40);padding:16px 4px}.log-detail-pane{flex:none;width:100%;min-width:0;min-height:0}.log-detail{border:1px solid var(--line-subtle);border-radius:6px;flex-direction:column;height:100%;display:flex;overflow:hidden}.log-detail-head{border-bottom:1px solid var(--line-subtle);flex:none;align-items:center;gap:4px;height:30px;padding:0 4px;display:flex}.log-detail-head .icon-btn{padding:4px}.log-detail-head .tabs{gap:0}.log-detail-title{flex:none;align-items:center;gap:8px;min-width:0;padding:8px 12px 4px;font-size:12px;font-weight:600;display:flex}.log-detail-title>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.kv-view{flex:1;min-height:0;padding:4px 12px 12px;overflow:auto}.kv-section+.kv-section{border-top:1px solid var(--line-subtle);margin-top:4px}.kv-section h4{color:var(--text-100);margin:0;padding:8px 0 4px;font-size:12px;font-weight:600}.kv-row{grid-template-columns:minmax(96px,32%) 1fr;gap:12px;padding:2px 0;font-size:12px;line-height:18px;display:grid}.kv-key{color:var(--text-60);word-break:break-all}.kv-value{color:var(--text-100);font-family:var(--font-mono);word-break:break-all;font-size:11.5px}.kv-empty{color:var(--text-40);padding:2px 0}.log-detail-head .tab{color:var(--text-60);padding:0 14px;font-size:11px}.log-detail-head .tab.is-active{color:var(--text-100);font-weight:600}.log-detail-head .tab.is-active:after{width:100%}.log-detail-code{background:var(--background-base-1);border:0;border-radius:0;flex:1;min-height:0}.log-detail-code .code-scroll{padding:6px 0}.splitter{z-index:5;touch-action:none;flex:none;position:relative}.splitter:after{content:"";background:0 0;border-radius:1px;transition:background .15s;position:absolute}.splitter:hover:after,.splitter.is-dragging:after{background:var(--theme)}.splitter-x{cursor:col-resize}.splitter-x:after{width:2px;top:0;bottom:0;left:50%;transform:translate(-50%)}.splitter-y{cursor:row-resize;height:9px}.splitter-y:after{height:2px;top:50%;left:0;right:0;transform:translateY(-50%)}.splitter-edge{width:8px;position:absolute;top:0;bottom:0;right:-4px}.splitter-y.splitter-gap{height:12px}.splitter-y.splitter-gap:after{left:40%;right:40%}body.is-resizing-x,body.is-resizing-x *{-webkit-user-select:none;user-select:none;cursor:col-resize!important}body.is-resizing-y,body.is-resizing-y *{-webkit-user-select:none;user-select:none;cursor:row-resize!important}body.is-resizing-x iframe,body.is-resizing-y iframe{pointer-events:none}.requests-pane{border-left:1px solid var(--line-subtle);flex-direction:column;flex:none;min-width:300px;display:flex;position:relative}.requests-topbar{padding:0 16px;font-size:12px;font-weight:500}.requests-protocol{color:var(--text-40);font-size:10px;font-weight:400}.requests-body{flex:1;min-height:0;padding:12px;display:flex}.splitter-edge.is-leading{left:-4px;right:auto}.console-dock{flex:none;min-height:0}.console-drawer{background:var(--background-base-1);border-top:1px solid var(--line-default);flex-direction:column;min-height:180px;display:flex;position:relative}.console-resize{z-index:20;position:absolute;top:-5px;left:0;right:0}.console-drawer-head{border-bottom:1px solid var(--line-subtle);flex:none;justify-content:space-between;align-items:center;height:32px;padding:0 12px 0 16px;font-size:12px;font-weight:500;display:flex}.workspace-statusbar{border-top:1px solid var(--line-subtle);background:var(--background-base-1);height:30px;color:var(--text-60);justify-content:space-between;align-items:center;padding:0 10px 0 16px;font-size:11px;display:flex}.workspace-connection{align-items:center;gap:8px;display:flex}.workspace-transport{color:var(--text-40);margin-left:8px}.console-indicators{align-items:center;gap:4px;height:100%;display:flex}.console-indicator{height:24px;color:var(--text-80);border-radius:4px;align-items:center;gap:4px;padding:0 5px;font-size:12px;display:flex}.console-indicator:hover,.console-toggle:hover{background:var(--fill-subtle)}.console-indicator.is-error svg{color:var(--support-error)}.console-indicator.is-warn svg{color:var(--support-warning)}.console-indicator.is-info svg{color:var(--theme)}.console-toggle{border-left:1px solid var(--line-default);align-items:center;gap:8px;height:24px;margin-left:4px;padding:0 8px;font-size:11px;display:flex}.console-toggle svg{transform:rotate(180deg)}.console-toggle.is-active svg{transform:none}.dialog-mask{z-index:100;background:#00000040;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.dialog{background:var(--background-base-1);border-radius:12px;width:480px;box-shadow:0 12px 48px #0000002e}.dialog-head{border-bottom:1px solid var(--line-subtle);justify-content:space-between;align-items:center;padding:12px 12px 12px 20px;display:flex}.dialog-head h2{font-size:15px;font-weight:600}.dialog-body{flex-direction:column;gap:16px;padding:20px;display:flex}.dialog-body .form-input{height:34px}.dialog-body textarea.form-input{height:auto}.endpoint-input{position:relative}.endpoint-input .form-input{width:100%;padding-right:34px}.endpoint-clear{position:absolute;top:3px;right:3px}.endpoint-hint{align-items:center;gap:6px;height:20px;display:flex}.endpoint-hint kbd{border:1px solid var(--line-default);border-radius:4px;flex:none;padding:0 4px;line-height:16px}.endpoint-hint span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dialog-foot{justify-content:flex-end;gap:12px;padding:0 20px 20px;display:flex}.dialog-foot .btn{height:32px}.console-panel{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.console-toolbar{border-bottom:1px solid var(--line-subtle);flex-wrap:wrap;flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.console-toolbar .search{flex:0 360px;min-width:120px}.console-toolbar .dropdown{width:110px}.console-list{flex:1;min-height:0;overflow:auto}.console-empty{color:var(--text-40);text-align:center;padding:32px 20px;line-height:20px}.console-entry{border-bottom:1px solid var(--line-subtle);font-family:var(--font-mono);align-items:flex-start;gap:8px;padding:4px 16px;font-size:11px;display:flex}.console-entry time{color:var(--text-40);flex:none;line-height:20px}.console-entry-level{width:34px;color:var(--text-60);flex:none;line-height:20px}.console-entry.is-error{background:var(--support-error-bg)}.console-entry.is-error .console-entry-level{color:var(--support-error-text)}.console-entry.is-warn{background:var(--support-warning-bg)}.console-entry.is-debug{color:var(--text-60)}.console-entry-source{flex:none;align-items:center;width:52px;height:20px;display:flex}.console-entry-context{text-overflow:ellipsis;white-space:nowrap;max-width:144px;color:var(--text-40);flex:0 auto;line-height:20px;overflow:hidden}.console-source-host{color:var(--theme);background:var(--theme-bg)}.console-source-iframe{color:var(--support-success-text);background:var(--support-success-bg)}.console-entry pre{min-width:0;font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;flex:1;margin:0;line-height:20px}.console-footnote{border-top:1px solid var(--line-subtle);color:var(--text-40);flex:none;padding:5px 16px;font-size:11px}