personal-bot 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/README.md +4 -1
  4. package/README.zh-CN.md +4 -1
  5. package/docs/README.md +2 -3
  6. package/docs/architecture/design.md +41 -2
  7. package/docs/architecture/extensibility.md +3 -3
  8. package/docs/architecture/model-context.md +10 -4
  9. package/docs/architecture/principles.md +2 -2
  10. package/docs/guides/cross-harness-workers.md +27 -2
  11. package/docs/guides/workspace-configuration.md +3 -1
  12. package/docs/hosts/claude-code.md +1 -1
  13. package/docs/hosts/codex-qoder.md +3 -1
  14. package/hooks/hooks.json +3 -0
  15. package/lib/antigravity-plugin/lib/extension/acp-worker.js +22 -6
  16. package/lib/antigravity-plugin/lib/extension/cli.js +169 -95
  17. package/lib/antigravity-plugin/lib/extension/hosts/plugin-runtime.js +3 -1
  18. package/lib/antigravity-plugin/lib/extension/mcp.js +163 -119
  19. package/lib/antigravity-plugin/lib/integrations/agent-resources.d.ts +4 -2
  20. package/lib/antigravity-plugin/lib/integrations/agent-resources.js +23 -5
  21. package/lib/antigravity-plugin/lib/integrations/hosts/antigravity/adapter.js +0 -1
  22. package/lib/antigravity-plugin/lib/integrations/hosts/claude/adapter.js +1 -2
  23. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/resources.d.ts +2 -1
  24. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/resources.js +12 -13
  25. package/lib/antigravity-plugin/lib/integrations/hosts/prompt-hooks.js +4 -7
  26. package/lib/antigravity-plugin/lib/model/worker-template.d.ts +21 -0
  27. package/lib/antigravity-plugin/lib/model/worker-template.js +1 -0
  28. package/lib/antigravity-plugin/lib/services/history/summary-dimensions/monthly.js +1 -1
  29. package/lib/antigravity-plugin/lib/services/history/summary-dimensions/session.js +6 -3
  30. package/lib/antigravity-plugin/lib/services/history/summary-runner.js +3 -3
  31. package/lib/antigravity-plugin/lib/services/workspace/worker-templates.d.ts +17 -0
  32. package/lib/antigravity-plugin/lib/services/workspace/worker-templates.js +88 -0
  33. package/lib/antigravity-plugin/lib/storage/history-files.js +3 -2
  34. package/lib/antigravity-plugin/package.json +1 -1
  35. package/lib/antigravity-plugin/plugin.json +2 -2
  36. package/lib/antigravity-plugin/resources/agents/coordinator.md +2 -4
  37. package/lib/antigravity-plugin/resources/agents/general-purpose.md +2 -4
  38. package/lib/antigravity-plugin/resources/prompts/history-monthly-summary.md +6 -11
  39. package/lib/antigravity-plugin/resources/prompts/history-summary.md +6 -11
  40. package/lib/antigravity-plugin/resources/prompts/plugin-coordinator.md +1 -1
  41. package/lib/antigravity-plugin/resources/prompts/workspace.md +16 -23
  42. package/lib/antigravity-plugin/resources/skills/project-maintenance/SKILL.md +14 -21
  43. package/lib/antigravity-plugin/resources/skills/provider-connections/SKILL.md +23 -36
  44. package/lib/antigravity-plugin/resources/templates/workspace-agents.md +5 -13
  45. package/lib/antigravity-plugin/skills/pbot/SKILL.md +6 -23
  46. package/lib/antigravity-plugin/skills/project-maintenance/SKILL.md +14 -21
  47. package/lib/antigravity-plugin/skills/provider-connections/SKILL.md +23 -36
  48. package/lib/codex-marketplace/plugins/personal-bot/.codex-plugin/plugin.json +2 -2
  49. package/lib/codex-marketplace/plugins/personal-bot/.mcp.json +2 -2
  50. package/lib/codex-marketplace/plugins/personal-bot/hooks/hooks.json +3 -3
  51. package/lib/codex-marketplace/plugins/personal-bot/skills/pbot/SKILL.md +11 -3
  52. package/lib/extension/acp-worker.js +22 -6
  53. package/lib/extension/cli.js +169 -95
  54. package/lib/extension/hosts/dsh/command.js +1 -1
  55. package/lib/extension/hosts/dsh/workspace.js +5 -2
  56. package/lib/extension/hosts/plugin-runtime.js +3 -1
  57. package/lib/extension/mcp/tool-contract.d.ts +3 -3
  58. package/lib/extension/mcp/tool-contract.js +63 -101
  59. package/lib/extension/mcp/workers.d.ts +1 -1
  60. package/lib/extension/mcp/workers.js +19 -13
  61. package/lib/extension/mcp.js +163 -119
  62. package/lib/integrations/agent-resources.d.ts +4 -2
  63. package/lib/integrations/agent-resources.js +23 -5
  64. package/lib/integrations/hosts/antigravity/adapter.js +0 -1
  65. package/lib/integrations/hosts/claude/adapter.js +1 -2
  66. package/lib/integrations/hosts/dsh/resources.d.ts +2 -1
  67. package/lib/integrations/hosts/dsh/resources.js +12 -13
  68. package/lib/integrations/hosts/prompt-hooks.js +4 -7
  69. package/lib/model/worker-template.d.ts +21 -0
  70. package/lib/model/worker-template.js +1 -0
  71. package/lib/qoder-plugin/.mcp.json +2 -2
  72. package/lib/qoder-plugin/.qoder-plugin/plugin.json +2 -2
  73. package/lib/qoder-plugin/hooks/hooks.json +3 -3
  74. package/lib/qoder-plugin/skills/pbot/SKILL.md +11 -3
  75. package/lib/services/agents/agent-service.js +2 -2
  76. package/lib/services/history/summary-dimensions/monthly.js +1 -1
  77. package/lib/services/history/summary-dimensions/session.js +6 -3
  78. package/lib/services/history/summary-runner.js +3 -3
  79. package/lib/services/workspace/worker-templates.d.ts +17 -0
  80. package/lib/services/workspace/worker-templates.js +88 -0
  81. package/lib/storage/history-files.js +3 -2
  82. package/lib/tools/history/contract.d.ts +1 -1
  83. package/lib/tools/history/contract.js +14 -16
  84. package/package.json +2 -2
  85. package/resources/agents/coordinator.md +2 -4
  86. package/resources/agents/general-purpose.md +2 -4
  87. package/resources/antigravity/skills/pbot/SKILL.md +6 -23
  88. package/resources/claude/skills/pbot/SKILL.md +6 -23
  89. package/resources/plugin/skills/pbot/SKILL.md +11 -3
  90. package/resources/prompts/history-coordinator.md +1 -1
  91. package/resources/prompts/history-monthly-summary.md +6 -11
  92. package/resources/prompts/history-summary.md +6 -11
  93. package/resources/prompts/plugin-coordinator.md +1 -1
  94. package/resources/prompts/workspace.md +16 -23
  95. package/resources/skills/project-maintenance/SKILL.md +14 -21
  96. package/resources/skills/provider-connections/SKILL.md +23 -36
  97. package/resources/templates/workspace-agents.md +5 -13
  98. package/src/extension/cli/commands/mcp.ts +1 -1
  99. package/src/extension/hosts/dsh/command.ts +1 -1
  100. package/src/extension/hosts/dsh/workspace.ts +5 -1
  101. package/src/extension/hosts/pi/command.ts +1 -1
  102. package/src/extension/hosts/pi/events.ts +3 -1
  103. package/src/extension/hosts/plugin-runtime.ts +3 -1
  104. package/src/extension/mcp/tool-contract.ts +63 -103
  105. package/src/extension/mcp/workers.ts +21 -14
  106. package/src/integrations/agent-resources.ts +27 -7
  107. package/src/integrations/hosts/antigravity/adapter.ts +0 -1
  108. package/src/integrations/hosts/claude/adapter.ts +1 -2
  109. package/src/integrations/hosts/dsh/resources.ts +14 -13
  110. package/src/integrations/hosts/prompt-hooks.ts +3 -6
  111. package/src/model/worker-template.ts +24 -0
  112. package/src/pbot.ts +2 -2
  113. package/src/services/agents/agent-service.ts +2 -2
  114. package/src/services/history/summary-dimensions/monthly.ts +1 -1
  115. package/src/services/history/summary-dimensions/session.ts +6 -3
  116. package/src/services/history/summary-runner.ts +3 -3
  117. package/src/services/workspace/worker-templates.ts +80 -0
  118. package/src/storage/history-files.ts +3 -2
  119. package/src/tools/history/contract.ts +14 -16
  120. package/docs/architecture/model-instruction-guidelines.md +0 -34
@@ -6,12 +6,12 @@
6
6
  "plugins": [
7
7
  {
8
8
  "name": "personal-bot",
9
- "version": "0.4.0",
10
- "description": "Workspace materials, skills, and cross-harness MCP worker delegation.",
9
+ "version": "0.4.2",
10
+ "description": "Organize workspace files, search past conversations, use shared MCP tools, and delegate tasks to other assistants.",
11
11
  "source": {
12
12
  "source": "npm",
13
13
  "package": "personal-bot",
14
- "version": "0.4.0"
14
+ "version": "0.4.2"
15
15
  }
16
16
  }
17
17
  ]
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "personal-bot",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "license": "MIT",
5
- "description": "Workspace materials, skills, and cross-harness MCP worker delegation.",
5
+ "description": "Organize workspace files, search past conversations, use shared MCP tools, and delegate tasks to other assistants.",
6
6
  "skills": [
7
7
  "./resources/skills",
8
8
  "./resources/claude/skills"
package/README.md CHANGED
@@ -134,9 +134,12 @@ Ask the assistant to delegate to another harness (for example, "use Codex to imp
134
134
  /pbot worker overview
135
135
  /pbot worker backends
136
136
  /pbot worker models claude
137
+ /pbot worker discover {"target":"templates"}
137
138
  /pbot worker create {"backend":"codex"}
138
139
  ```
139
140
 
141
+ After you configure a worker template, you can delegate by name. For example, “Ask Payments Reviewer to review the refund changes.” The coordinator selects the template and sends the task to a worker in its designated workspace. [Worker template setup](docs/guides/cross-harness-workers.md#自定义-worker-模板)
142
+
140
143
  To use built-in ACP targets, install and authenticate the corresponding target CLI (`pi-acp`, `dsh`, `@agentclientprotocol/claude-agent-acp`, `agy`, `@agentclientprotocol/codex-acp`, or `qodercli`). To add any custom ACP v1 binary, declare it in `.pbot/config.json`:
141
144
 
142
145
  ```json
@@ -230,7 +233,7 @@ Remove only the components you installed:
230
233
 
231
234
  Uninstalling never deletes your workspace materials (`AGENTS.md`, `areas/`, `projects/`, `knowledge/`, `providers/`, `scratch/`, `agents/`, `.agents/skills/`) or local state. If you want to remove Personal Bot state files as well:
232
235
 
233
- - Workspace state: `.pbot/` inside the workspace (contains `config.json`, `mcp.json`, `history/`, and `subagents/`)
236
+ - The workspace stores configuration in `.pbot/config.json` and `.pbot/mcp.json`, saved worker templates in `.pbot/worker/templates.json`, worker runtime records in `.pbot/worker/runtime/`, and history in `.pbot/history/`.
234
237
 
235
238
  ## Documentation & Development
236
239
 
package/README.zh-CN.md CHANGED
@@ -134,9 +134,12 @@ pbot init --workspace /path/to/workspace
134
134
  /pbot worker overview
135
135
  /pbot worker backends
136
136
  /pbot worker models claude
137
+ /pbot worker discover {"target":"templates"}
137
138
  /pbot worker create {"backend":"codex"}
138
139
  ```
139
140
 
141
+ 配置好模板后,可以直接说「让支付审查员复核这次退款改动」。主 Agent 按职责选用模板,把任务交给指定工作区中的 worker。[配置助手模板](docs/guides/cross-harness-workers.md#自定义-worker-模板)
142
+
140
143
  使用内置 ACP 目标前,需先安装并登录对应目标程序(`pi-acp`、`dsh`、`@agentclientprotocol/claude-agent-acp`、`agy`、`@agentclientprotocol/codex-acp` 或 `qodercli`)。如需接入自定义 ACP v1 程序,在 `.pbot/config.json` 中声明即可:
141
144
 
142
145
  ```json
@@ -230,7 +233,7 @@ pbot upgrade
230
233
 
231
234
  卸载操作不会删除你的工作区资料(`AGENTS.md`、`areas/`、`projects/`、`knowledge/`、`providers/`、`scratch/`、`agents/`、`.agents/skills/`)或本地状态。如需彻底清理 Personal Bot 状态文件,可手动删除:
232
235
 
233
- - 工作区状态目录:工作区内的 `.pbot/`(含 `config.json`、`mcp.json`、`history/` 与 `subagents/`)
236
+ - 工作区配置位于 `.pbot/config.json` 和 `.pbot/mcp.json`,用户保存的 worker 模板位于 `.pbot/worker/templates.json`,实例运行记录位于 `.pbot/worker/runtime/`,历史记录位于 `.pbot/history/`。
234
237
 
235
238
  ## 文档与开发
236
239
 
package/docs/README.md CHANGED
@@ -25,11 +25,10 @@ Personal Bot 文档按使用场景与职责分为四类,根目录 [README.zh-C
25
25
 
26
26
  | 文档 | 内容 |
27
27
  | --- | --- |
28
- | [架构原则](architecture/principles.md) | 两根核心支柱、统一 MCP 调度、不干扰宿主原生 subagent、可扩展与两类文档方法论 |
29
- | [技术设计](architecture/design.md) | 模块分层与依赖边界、宿主生命周期、文件存储、精简交互界面、安装器与构建分发 |
28
+ | [架构原则](architecture/principles.md) | 两根核心支柱、统一 MCP 调度、宿主原生 subagent 的边界、扩展方式与资料归属 |
29
+ | [技术设计](architecture/design.md) | 模块分层与依赖边界、宿主生命周期、文件存储、精简交互界面、安装器与构建分发,以及[工作区 worker 模板](architecture/design.md#工作区-worker-模板) |
30
30
  | [插件宿主与 ACP 扩展设计](architecture/extensibility.md) | 运行时不感知的 `PluginHostRegistry` 与 `AcpHarnessRegistry`、薄 stdio MCP/ACP 桥接与扩展接入步骤 |
31
31
  | [模型上下文](architecture/model-context.md) | 各宿主与 ACP worker 的指令来源、加载时机与更新规则 |
32
- | [模型指令编写原则](architecture/model-instruction-guidelines.md) | 运行时模型可见资料(`resources/`)的独立编写方法论 |
33
32
 
34
33
  ## 维护与发布(`docs/maintainers/`)
35
34
 
@@ -1,6 +1,6 @@
1
1
  # 技术设计
2
2
 
3
- 本文说明 Personal Bot 的模块分层、宿主生命周期、文件存储、精简交互、安装器与构建分发边界。架构原则见[架构原则](principles.md),插件宿主与 ACP 扩展机制见[插件宿主与 ACP 扩展设计](extensibility.md)。
3
+ 本文说明 Personal Bot 的模块分层、宿主生命周期、worker 模板与跨工作区派发、文件存储、精简交互、安装器与构建分发边界。架构原则见[架构原则](principles.md),插件宿主与 ACP 扩展机制见[插件宿主与 ACP 扩展设计](extensibility.md)。
4
4
 
5
5
  ## 模块与依赖
6
6
 
@@ -54,6 +54,42 @@
54
54
  - **dsh**:按根 Agent 的原始 `cwd` 读取配置,启用后注册技能、上下文、工作区外写保护、`pbot_history` 与根会话原始问答采集,并通过 `@deepseek-ai/dsh-mcp-client` 挂载同一 `lib/extension/mcp.js`(暴露 `mcp__pbot__worker_*`)。Web 工作台仅保留**工作区**与**历史**两页,经原生 Typert Remote(`snapshot`、`history`)查询,不增设 HTTP 服务;聊天命令为 `/pbot`、`status`、`init`、`history`、`worker`。
55
55
  - **轻插件宿主(Claude Code、Antigravity 及后续扩展)**:由 `plugin-runtime.ts` 通过 `PluginHostAdapter` 处理无状态 command hook(上下文注入、技能门控与 `raw` 历史采集)及 `init`/`status` CLI,跨 Harness 调度与只读跨宿主历史查询由宿主挂载 `lib/extension/mcp.js` 完成。不设自定义面板,也不拦截宿主原生 subagent。
56
56
 
57
+ ## 工作区 worker 模板
58
+
59
+ 主工作区在 `.pbot/worker/templates.json` 中保存常用的 Harness、执行工作区、模型和思考深度组合。顶层是以稳定模板 ID 为键的 JSON 对象。主 Agent 按职责选用模板,同一模板可创建多个独立的 worker 实例。
60
+
61
+ | 字段 | 配置契约 |
62
+ | --- | --- |
63
+ | 顶层键(模板 ID) | 匹配 `^[a-z0-9][a-z0-9-]{0,63}$`。修改显示名后仍可按此 ID 引用 |
64
+ | `name`、`description` | `name` 为可选显示名,默认使用 ID。`description` 必填,说明适合委派的任务,仅供主 Agent 选择 |
65
+ | `create.backend` | 必填,接受 Harness 名称、别名或执行工作区配置的自定义 ACP 后端 |
66
+ | `create.workspace` | 省略或写 `.` 表示模板所属工作区。普通相对路径(含 `./` 和 `../`)从该工作区根目录展开,`~` 和 `~/…` 从本机用户主目录展开,绝对路径按本机规则规范化 |
67
+ | `create.model`、`create.thinking` | 均可选,省略时使用目标 Harness 的默认设置 |
68
+
69
+ 每个条目及其 `create` 对象只接受表中字段,字符串须有非空白内容且不能含 NUL。
70
+
71
+ 工作区用户维护模板。主 Agent 通过 `worker_discover` 选择模板,通过 `worker_create` 创建会话。配置文件的位置和格式属于工作区维护文档,Agent 依赖工具提供的创建参数。[配置示例](../guides/cross-harness-workers.md#自定义-worker-模板)
72
+
73
+ ### 发现与派发
74
+
75
+ `worker_discover({"target":"templates"})` 从已启用的主工作区读取清单。该查询仅接受 `target` 和可选的绝对路径 `workspace`,后者指定模板所属工作区。省略时采用宿主绑定的工作区,独立 MCP 缺少绑定时采用服务当前目录。
76
+
77
+ 发现结果按模板 ID 排序,每项包含 `id`、有效显示名 `name`、`description` 和可直接传给 `worker_create` 的 `create`。查询只读取配置并将 `create.workspace` 展开为绝对路径,即使目标目录尚未创建,也能查看模板。[模板读取与路径解析](../../src/services/workspace/worker-templates.ts)
78
+
79
+ | 清单状态 | 发现结果 |
80
+ | --- | --- |
81
+ | 文件缺失或顶层为 `{}` | 返回 `templates: []` |
82
+ | 个别条目无效 | 返回有效模板及 `errors`。每项给出不可用模板的 `id` 和说明 `message` |
83
+ | 文件不可读、JSON 损坏或顶层不是对象 | 返回 MCP 工具错误 `isError: true`,说明当前工作区的助手模板不可用 |
84
+
85
+ 主 Agent 在派发前重新查询,按模板 ID 取出最新的 `create`。`worker_create` 检查执行目录存在且已启用 Personal Bot,按该目录的 ACP 配置解析后端、命令和权限,并由目标 Harness 确定模型与思考深度。创建成功后,主 Agent 用返回的 `workerId` 调用 `worker_request` 发送本次任务与所需背景。执行 worker 使用自己的 `general-purpose` 上下文,模板编辑只影响之后的发现与创建。[MCP 工具契约](../../src/extension/mcp/tool-contract.ts)
86
+
87
+ ### 主 Agent 上下文
88
+
89
+ 宿主装配层把模板读取函数传给共享的角色组装逻辑。当工作区启用、`features.prompts` 开启且存在有效模板时,`coordinator` 角色段展示 ID、显示名、职责和启动配置。摘要保留工作区路径原写法,省略时显示 `.`。清单损坏或没有有效条目时,主会话照常加载。关闭提示词注入后仍可显式查询模板。
90
+
91
+ Pi 在 `before_agent_start`、dsh 在 `system-prompt/assemble` 重读并替换角色段。Claude Code、Antigravity、Codex 和 Qoder CLI 在已有的主会话 `SessionStart` 注入点附上摘要。纯 MCP 客户端通过发现接口读取清单。[各宿主的上下文加载时机](model-context.md)
92
+
57
93
  ## 文件存储
58
94
 
59
95
  | 位置 | 内容与所有者 |
@@ -64,7 +100,10 @@
64
100
  | `<workspace>/AGENTS.md`、`areas/`、`projects/`、`knowledge/`、`providers/`、`scratch/`、`agents/` | 用户工作区资料(`init` 只补缺、不覆盖) |
65
101
  | `<workspace>/.pbot/history/raw/[<YYYY>/<MM>/]<id>.json` | 全宿主(Pi、dsh、Claude Code、Antigravity 等)原始问答与已知分支(默认按 UTC `YYYY/MM/` 分层,可配置 `history.layout: "flat"` 切回平铺;各自只写本宿主来源) |
66
102
  | `<workspace>/.pbot/history/summaries/<dimension>/[<YYYY>/<MM>/]<id>.json` | 按维度派生的摘要产物(内置 `session` 与 `monthly` 月度汇总,由 `SummaryRunner` 按 `.write-summary-<dimension>` 锁并发生成,携带来源指纹支持去重与增量更新,可独立重建,损坏不影响原始问答查询) |
67
- | `<workspace>/.pbot/subagents/<id>/`(或 `PBOT_MCP_AGENT_DIR`) | MCP `worker_*` 的最小运行时控制记录(常驻 `worker.json`、`state.json` 与最新一轮 `output.json`;`inbox/`、`interactions/`、`acp-answer.json` 按需创建、用完即删;会话关闭时清理整个 `<id>/` 目录) |
103
+ | `<主工作区>/.pbot/worker/templates.json` | 用户维护的模板清单,生命周期独立于 worker 实例 |
104
+ | `<控制工作区>/.pbot/worker/runtime/<workerId>/` | MCP worker 的控制记录,包括 `worker.json`、`state.json`、最新一轮的 `output.json` 及按需创建的队列和交互文件 |
105
+
106
+ Pi 和 dsh 将主工作区的运行根和会话 ID 传给挂载的 MCP,聊天命令与 MCP 共享实例归属。独立 MCP 默认在执行工作区使用上述运行目录。`PBOT_MCP_AGENT_DIR` 可直接指定运行根,模板始终从主工作区读取。`worker_close` 停止实例,主会话结束时仅清理所属实例,并可回收空运行根。旧 `.pbot/subagents/` 完全排除在发现、恢复、迁移和清理范围之外,旧文件保留原位,原实例需要重新创建。
68
107
 
69
108
  - `atomic-json` 先校验对象再写入临时文件并原子替换,拒绝符号链接、路径越界与特殊文件;短目录锁(`.control` / `.write-<host>`)串行化控制写操作。
70
109
  - 兼容线规则:发布版本遵循 `package.json` 的 `MAJOR.MINOR.PATCH`,1.0 前按次版本、之后按主版本判断控制记录兼容性,不引入自动迁移或存储版本计数器。
@@ -24,7 +24,7 @@ src/extension/hosts/plugin-runtime.ts (唯一核心逻辑:init/status/hook 引
24
24
  - `nativeRootAgents: boolean`:宿主是否原生加载工作区根 `AGENTS.md`(为 `false` 时由上下文拼装附带)。
25
25
  - `nativeWorkspaceSkills?: boolean`:宿主是否原生扫描 `.agents/skills/`(为 `false` 或省略时,在 `features.skills` 开启下由上下文拼装附带技能元数据索引)。
26
26
  - `indexBundledSkills?: boolean`:宿主只注册管理技能时,通过 hook 按工作区的 `features.skills` 提供包内方法索引。Codex 与 Qoder CLI 使用此方式,其原生技能发现负责工作区自有技能。
27
- - `coordinatorPrompt?: string`:主会话协调者操作导航文件(默认使用宿主无关的 `plugin-coordinator.md`)。
27
+ - `coordinatorPrompt?: string` 可指定主会话协调者的补充提示。省略时,仅在历史功能开启时加载 `plugin-coordinator.md` 中的摘要命令。
28
28
  - `resolveRoot(cwd, rawPayload)`:从宿主环境变量或 hook 载荷解析绑定工作区根目录。
29
29
  - 宿主通过环境变量绑定工作区时,`boundWorkspaceRoot?()` 向命令、hook 与 stdio MCP 提供同一根目录。Qoder CLI 优先使用 `QODER_PROJECT_DIR`。
30
30
  - `parseEvent(payload)` 将宿主原生 hook 映射为 `ignore`、`inject-context`、`record-history` 或 `check-skill`。宿主负责原生子代理的生命周期。
@@ -36,11 +36,11 @@ src/extension/hosts/plugin-runtime.ts (唯一核心逻辑:init/status/hook 引
36
36
  | --- | --- | --- |
37
37
  | 工作区根目录 | `CLAUDE_PROJECT_DIR`(回退 `cwd`) | `workspacePaths[0]`(回退 `cwd`) |
38
38
  | 根 `AGENTS.md` | 拼装附带(`nativeRootAgents: false`) | 宿主原生加载(`nativeRootAgents: true`) |
39
- | 协调者上下文 | `UserPromptSubmit`(含 `agent_id` 的原生子代理直接忽略) | `SessionStart` → `injectSteps[].systemMessage` |
39
+ | 协调者上下文 | 新主会话的 `SessionStart` → `hookSpecificOutput.additionalContext` | `SessionStart` → `injectSteps[].systemMessage` |
40
40
  | 未启用技能门控 | `PreToolUse(Skill)` 与 `UserPromptExpansion` 拦截工作方法,放行 `pbot` | `PreToolUse(read_file)` 拦截插件工作方法技能,放行 `pbot`;其余返回 `{ decision: "allow" }` |
41
41
  | 原生 subagent | 完全不拦截、不提供覆盖性静态 agent | 完全不拦截、不提供覆盖性静态 agent |
42
42
 
43
- Codex 与 Qoder CLI 在 `SessionStart` 投递历史提示,在 `UserPromptSubmit` 注入协调者上下文,在 `Stop` 归档回复。Codex 提供原生回合 ID,用于关联同一回合的追加输入与最终回复。两个适配器共用这些事件的解析和输出。安装与工作区配置见[宿主指南](../hosts/codex-qoder.md)。
43
+ Claude Code、Codex 与 Qoder CLI 共用启动、提交和结束事件的解析。新主会话在 `SessionStart` 接收上下文和适用的历史提醒。`UserPromptSubmit` 和 `Stop` 归档问答。Codex 通过回合 ID 关联同一回合的追加输入与最终回复。安装与工作区配置见[宿主指南](../hosts/codex-qoder.md)。
44
44
 
45
45
  ### 接入新插件宿主的步骤
46
46
 
@@ -1,6 +1,6 @@
1
1
  # 模型上下文
2
2
 
3
- 本文说明各宿主主会话与跨 Harness ACP worker 的上下文来源、加载时机与刷新边界。编写规范见[模型指令编写原则](model-instruction-guidelines.md)。
3
+ 本文说明各宿主主会话与跨 Harness ACP worker 的上下文来源、加载时机与刷新边界。
4
4
 
5
5
  ## 共享内容与来源
6
6
 
@@ -8,7 +8,9 @@
8
8
  | --- | --- |
9
9
  | 公共约定与资料目录用途 | `resources/prompts/workspace.md`,已启用主会话与 ACP worker 加载 |
10
10
  | 协调者 / 通用专家职责 | `resources/agents/coordinator.md`、`general-purpose.md`,叠加工作区 `agents/<role>.md` |
11
- | 协调者操作导航 | Pi/dsh 加载 `resources/prompts/history-coordinator.md`;轻插件宿主加载 `resources/prompts/plugin-coordinator.md` |
11
+ | 协调者可选的 worker 模板 | 开启 `features.prompts` 且 `.pbot/worker/templates.json` 有有效条目时,在协调者角色段列出模板 ID、显示名、职责及启动设置。工作区路径保留配置写法 |
12
+ | 协调者的摘要命令 | 内置宿主在 `features.prompts` 和 `features.history` 都开启时加载。Pi/dsh 使用 `resources/prompts/history-coordinator.md`,插件宿主使用 `resources/prompts/plugin-coordinator.md` |
13
+ | MCP 服务、工具与参数说明 | stdio 服务在 `initialize` 中说明当前可用能力,在 `tools/list` 中提供操作和参数。Pi/dsh 的原生历史工具使用 `src/tools/history/contract.ts` |
12
14
  | 工作区自有技能 | `<workspace>/.agents/skills/*/SKILL.md`,Pi/dsh/Antigravity/Codex/Qoder CLI 原生发现;Claude Code 与未声明原生发现的 ACP worker 按需注入元数据索引(受 `features.skills` 控制) |
13
15
  | 专业方法技能 | `resources/skills/`(`project-maintenance`、`provider-connections`),只暴露元数据,按任务读取正文(受 `features.skills` 控制) |
14
16
  | 历史摘要专用提示 | `resources/prompts/history-summary.md`、`history-monthly-summary.md`,仅用于独立历史摘要调用,不注入普通对话会话 |
@@ -19,9 +21,13 @@
19
21
  | --- | --- | --- | --- |
20
22
  | **Pi** | `before_agent_start` 刷新 section;`resources_discover` 提供包内技能路径;`registerMcpServer` 挂载 `worker_*` | Pi 原生加载与去重 | 不干预 |
21
23
  | **dsh** | `system-prompt/assemble` 当次刷新 section;技能 provider 仅注册到启用主会话;`dsh-mcp-client` 挂载 `mcp__pbot__worker_*` | dsh 原生加载与去重 | 不干预原生 `subagent`/`subagent_fork` |
22
- | **Claude Code** | `UserPromptSubmit` 注入主会话上下文;`PreToolUse(Skill)` / `UserPromptExpansion` 门控未启用技能;`.mcp.json` 挂载 `worker_*` | 宿主不自动加载,由 hook 拼装附带 | 含 `agent_id` 的原生子代理直接放行,不注入 |
24
+ | **Claude Code** | 新主会话在 `SessionStart` 接收上下文。`PreToolUse(Skill)` / `UserPromptExpansion` 检查技能开关。`.mcp.json` 挂载 `worker_*` | 由启动 hook 加载 | 含 `agent_id` 的事件跳过角色注入 |
23
25
  | **Antigravity** | `SessionStart` 通过 `injectSteps` 一次性注入;`PreToolUse(read_file)` 门控未启用技能;`mcp_config.json` 挂载 `worker_*` | Antigravity 原生加载与去重 | 不拦截 `invoke_subagent`,不覆盖 Prompt |
24
- | **Codex / Qoder CLI** | `SessionStart` 按需提供历史提醒;`UserPromptSubmit` 刷新协调者上下文和包内方法索引;插件挂载 `pbot mcp` | 宿主原生加载 | 含 `agent_id` 的子代理事件直接放行 |
26
+ | **Codex / Qoder CLI** | 新主会话在 `SessionStart` 接收协调者上下文、包内方法索引和适用的历史提醒。插件挂载 `pbot mcp` | 宿主原生加载 | 含 `agent_id` 的子代理事件直接放行 |
27
+
28
+ Claude Code、Codex 和 Qoder CLI 在恢复会话或压缩上下文时跳过启动注入。`UserPromptSubmit` 和 `Stop` 分别用于记录用户输入和助手回复。
29
+
30
+ Pi 和 dsh 在各自的角色段刷新时重读模板。插件宿主在已有的启动注入点读取一次。主 Agent 派发前通过 `worker_discover({"target":"templates"})` 取得当前参数,纯 MCP 客户端也可用同一接口。[工作区 worker 模板](design.md#工作区-worker-模板)
25
31
 
26
32
  所有宿主在 `PBOT_SUBAGENT_RUN_ID` 存在时(作为 ACP worker 运行)自动跳过主会话上下文注入,避免重复叠加。
27
33
 
@@ -24,10 +24,10 @@ Personal Bot 不绑定单一宿主,所有能力按两条正交主线组织:
24
24
  - `src/extension/` 按运行域划分为 `hosts/`、`mcp/`、`acp/`、`history/`、`cli/` 和 `setup/`。宿主与 CLI 在 `history/` 共用历史命令。 `src/integrations/` 按外部集成域划分为 `hosts/`、`acp/` 和 `installation/`。具体宿主在 `hosts/` 下平级建目录。详见[技术设计](design.md)。
25
25
  - 资源的创建、状态变更和释放由同一责任主体管理。工具与服务绑定工作区实例,关闭后旧调用失效。
26
26
 
27
- ## 区分两类文档方法论
27
+ ## 开发文档与运行时资料
28
28
 
29
29
  - **技术与使用文档(`AGENTS.md`、`README*.md`、`docs/`、`scripts/README.md`)**:只维护当前设计目标、设计方法、模块边界与操作方式;直接重写或删除过时内容,历史交由 Git 保存。
30
- - **模型可见运行时资料(`resources/`)**:严格遵循[模型指令编写原则](model-instruction-guidelines.md),只写直接影响操作的规则与入口,按需加载专业方法,绝不混入仓库架构、构建方式或开发规范。
30
+ - **运行时资料**放在 `resources/`,包括各宿主主会话和 ACP worker 加载的提示词、职责、技能、参考资料和模板。
31
31
 
32
32
  ## 验证行为
33
33
 
@@ -19,9 +19,34 @@ Personal Bot 将跨 Harness 专家调度统一为单一的 stdio MCP 服务(`l
19
19
  | Codex / Qoder CLI | 插件 `.mcp.json` 自动启动 `pbot mcp` | `worker_*` |
20
20
  | Cursor / 其他 MCP 宿主 | 手动配置 stdio MCP 命令 `npx personal-bot@latest mcp`(或 `pbot mcp`) | `worker_*` |
21
21
 
22
+ ## 自定义 worker 模板
23
+
24
+ 在主工作区的 `.pbot/worker/templates.json` 中配置可复用的助手模板。每个顶层键是稳定的模板 ID,由 1–64 个小写英文字母、数字或连字符组成,首位为字母或数字。例如,下面的模板可以通过「让支付审查员复核这次退款改动」来选用。
25
+
26
+ ```json
27
+ {
28
+ "payments-review": {
29
+ "name": "支付审查员",
30
+ "description": "复核扣款、退款与幂等性",
31
+ "create": {
32
+ "backend": "claude",
33
+ "workspace": "../payments",
34
+ "model": "sonnet",
35
+ "thinking": "high"
36
+ }
37
+ }
38
+ }
39
+ ```
40
+
41
+ `description` 和 `create.backend` 必填。省略 `name` 时使用 ID,省略模型或思考深度时使用目标 Harness 的默认设置。`workspace` 省略或写为 `.` 时使用主工作区,普通相对路径从主工作区根展开,`~` 和 `~/…` 从本机用户目录展开,也可填写绝对路径。主工作区和执行工作区都需要启用 Personal Bot。
42
+
43
+ 开启工作区提示后,主 Agent 可以看到各模板的职责。派发时查询 `worker_discover({"target":"templates"})`,把选定条目的 `create` 交给 `worker_create`,再通过 `worker_request` 发送本次任务。查询返回最新配置及绝对执行目录,修改模板影响之后创建的实例。Pi 和 dsh 中可输入 `/pbot worker discover {"target":"templates"}` 检查刚保存的条目。
44
+
45
+ 实例数据默认位于 `.pbot/worker/runtime/<workerId>/`。升级后需要重新创建原先位于 `.pbot/subagents/` 的实例。旧目录中的文件保留原位。[模板契约](../architecture/design.md#工作区-worker-模板) · [存储布局](../architecture/design.md#文件存储)
46
+
22
47
  ## 6 个 MCP 工具契约
23
48
 
24
- MCP 服务在 `initialize` 返回服务级流程说明 `instructions`,`tools/list` 根据已注册预设与当前工作区 `.pbot/config.json` 的 `acp` 配置动态探测本机可用 `backend`,为每个工具提供独立的严格 Schema 与 MCP `annotations`(读写与破坏性标记):
49
+ `initialize` 的 `instructions` 说明当前可用能力及适用场景。一组工具的操作和参数见 `tools/list`。其中 `worker_create` 列出本机可用的预设及工作区 `.pbot/config.json` 中配置的可用助手。各工具提供独立的参数 Schema 和 MCP `annotations`(读写与破坏性标记)。
25
50
 
26
51
  | 工具 | 读写属性 | 必填参数 | 可选参数 | 职责与行为 |
27
52
  | --- | --- | --- | --- | --- |
@@ -30,7 +55,7 @@ MCP 服务在 `initialize` 返回服务级流程说明 `instructions`,`tools/l
30
55
  | `worker_request` | 主动写 | `workerId`, `message` | `waitMs` | 主动发送首轮任务、多轮追问或回合后问答回复(已关闭自动恢复);默认同步等待 50s 返回报告(`waitMs: 0` 立即异步),遇到挂起交互立即返回 `needsResponse: true` |
31
56
  | `worker_response` | 被动回复写 | `workerId`, `action` | `requestId`, `optionId`, `content`, `waitMs` | 回复 worker 执行中途发起的挂起请求(`pendingRequests[]`):`action` 为 `accept` / `decline` / `cancel`;权限审批(`kind: "permission"`)可用 `optionId` 指定策略,问答/选择/表单输入(`kind: "form"`,含 Claude `AskUserQuestion`)用 `content` 提交键值答案,URL 确认(`kind: "url"`)直接用 `action`;默认回复后继续等待 50s |
32
57
  | `worker_output` | **只读** | `workerId` | `offset`, `waitMs` | 获取最新一轮执行报告:运行中自动等待至结束(默认 50s,可返回 `timedOut` 或 `needsResponse`),已结束立即返回报告;超长报告(单页 16000 字符)含 `nextOffset` 时传 `offset` 立即翻页 |
33
- | `worker_discover` | **只读** | 无 | `target`, `workerId`, `backend`, `model`, `workspace` | 统一只读发现:`target` 省略或 `"overview"` 即时返回本机 `backends` 与当前会话 `workers`;`"workers"` 查全部或单个 worker 状态;`"backends"` 查可用目标与权限策略;`"models"` 临时探测目标可选模型与思考力度(省略 `backend` 回退 `PBOT_HOST`) |
58
+ | `worker_discover` | **只读** | 无 | `target`, `workerId`, `backend`, `model`, `workspace` | `overview`(默认)列出后端与当前会话的实例,`workers` 查实例状态,`backends` 查目标与权限,`models` 探测模型与思考深度,`templates` 读取工作区模板。查模板时只接受 `target` 和可选的绝对路径 `workspace` |
34
59
 
35
60
  典型调用示例:
36
61
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  所有宿主(Pi、dsh、Claude Code、Antigravity 及其他 MCP 宿主)共用工作区根目录下的 `.pbot/config.json`。宿主原生配置决定插件安装范围,该文件决定 Personal Bot 是否在当前工作区启用,并承载自定义 ACP Harness 启动配置。
4
4
 
5
+ 在 `.pbot/worker/templates.json` 中可保存常用的 Harness、执行工作区、模型和思考深度组合。模板归主工作区管理,Harness 的命令和权限取自执行工作区的 `.pbot/config.json`。[配置和选用 worker 模板](cross-harness-workers.md#自定义-worker-模板)
6
+
5
7
  ## 初始化与状态
6
8
 
7
9
  | 宿主 | 初始化 | 状态 |
@@ -140,5 +142,5 @@ pbot update [--workspace <目录>]
140
142
  | --- | --- |
141
143
  | Pi | 执行 `/reload` 或重启 Pi |
142
144
  | dsh | 重启 dsh 服务或桌面应用 |
143
- | Claude Code | 下次 hook 与 CLI/MCP 调用直接读取当前文件 |
145
+ | Claude Code、Codex、Qoder CLI | 新主会话在 `SessionStart` 加载角色提示和技能索引。历史 hook 与 CLI/MCP 调用各自读取当前配置 |
144
146
  | Antigravity | 新会话 `SessionStart`、后续 `PreToolUse` 及 CLI/MCP 调用直接读取当前文件 |
@@ -28,7 +28,7 @@ node /absolute/path/to/personal-bot/lib/claude.js status
28
28
 
29
29
  ## 资料、技能与互补协作
30
30
 
31
- - **上下文注入**:`UserPromptSubmit` hook 读取 `.pbot/config.json`,按 `features` 开关仅为主会话注入公共工作约定、协调者职责、根 `AGENTS.md`、工作区 `agents/coordinator.md`、工作区 `.agents/skills/` 技能元数据索引与环境路径;携带 `agent_id` 的原生子代理直接放行,不注入、不干扰。
31
+ - 新主会话在 `SessionStart` 按 `features` 开关加载公共约定、协调者职责、根 `AGENTS.md`、工作区 `agents/coordinator.md`、工作区技能索引和环境路径。在已有会话中执行 `init` 或修改角色文件后,新开会话即可加载。
32
32
  - **技能门控与共享技能**:包内声明 `project-maintenance` 与 `provider-connections`;未启用工作区或 `features.skills: false` 时 `PreToolUse(Skill)` 与 `UserPromptExpansion` 拦截工作方法调用,始终放行 `/personal-bot:pbot`。工作区自有技能统一维护在 `.agents/skills/<name>/SKILL.md`(由上下文元数据索引按需加载,跨所有宿主通用)。
33
33
  - **工作区统一 MCP**:`.pbot/mcp.json` 注册的跨宿主 MCP 经 [.mcp.json](../../.mcp.json) 挂载的 `pbot` MCP(`workspace_mcp_discover` / `workspace_mcp_call`)直接调用,可与 Claude 原生 `.mcp.json` 同时使用。
34
34
  - **同宿主 vs 跨 Harness 互补**:
@@ -40,7 +40,9 @@ pbot plugin qoder status
40
40
 
41
41
  两个宿主共用一份 `.pbot/config.json`,同一目录初始化一次即可。Codex hook 使用事件的 `cwd`。Qoder 的 hook、管理命令和 MCP 共用 `QODER_PROJECT_DIR`,缺失时依次使用 `PBOT_WORKSPACE_ROOT` 与工作目录。
42
42
 
43
- 启用历史后,新会话的 `SessionStart` 会提示旧布局或待更新的摘要。需要处理提醒时,在当前工作区执行 `pbot history migrate --dry-run` 预览迁移,或用 `pbot history summary` 生成摘要。提交提示时按配置注入协调者上下文和包内方法技能索引,`Stop` 配合提交事件记录主会话问答。Codex 按会话和回合 ID 关联追加输入及回复。原始记录的来源分别为 `codex` 和 `qoder`。
43
+ 新主会话在 `SessionStart` 按配置加载协调者上下文和包内方法技能索引。在已有会话中执行 `init` 或修改角色文件后,新开会话即可加载。
44
+
45
+ 启用历史后,启动时还会提示旧布局或待更新的摘要。可在工作区执行 `pbot history migrate --dry-run` 预览迁移,或用 `pbot history summary` 生成摘要。`UserPromptSubmit` 和 `Stop` 记录主会话问答。Codex 按会话和回合 ID 关联追加输入及回复。原始记录的来源分别为 `codex` 和 `qoder`。
44
46
 
45
47
  宿主原生发现根 `AGENTS.md` 与 `.agents/skills/`。包内方法按 `features.skills` 提供,管理技能可由用户显式调用。
46
48
 
package/hooks/hooks.json CHANGED
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "hooks": {
3
+ "SessionStart": [
4
+ { "hooks": [{ "type": "command", "command": "node", "args": ["${CLAUDE_PLUGIN_ROOT}/lib/claude.js", "hook"], "timeout": 30 }] }
5
+ ],
3
6
  "UserPromptSubmit": [
4
7
  { "hooks": [{ "type": "command", "command": "node", "args": ["${CLAUDE_PLUGIN_ROOT}/lib/claude.js", "hook"], "timeout": 30 }] }
5
8
  ],
@@ -11158,7 +11158,7 @@ async function readLocalRole(agent, root) {
11158
11158
  async function agentText(agent, root, coordinatorPrompt = "plugin-coordinator.md") {
11159
11159
  requireThat(agent === "coordinator" || agent === "general-purpose", "\u672A\u77E5\u804C\u8D23\u3002");
11160
11160
  let text3 = await readFile(join7(resourceRoot, "agents", agent + ".md"), "utf8");
11161
- if (agent === "coordinator") {
11161
+ if (agent === "coordinator" && coordinatorPrompt) {
11162
11162
  text3 += "\n\n" + await readFile(join7(resourceRoot, "prompts", coordinatorPrompt), "utf8");
11163
11163
  }
11164
11164
  const local = await readLocalRole(agent, root);
@@ -11169,7 +11169,21 @@ async function agentText(agent, root, coordinatorPrompt = "plugin-coordinator.md
11169
11169
  function formatWorkspaceSkills(skills) {
11170
11170
  if (!skills.length) return "";
11171
11171
  const lines = skills.map((skill) => `- **${skill.name}**\uFF08\`${skill.path}\`\uFF09\uFF1A${skill.description}`);
11172
- return "## \u53EF\u7528\u6280\u80FD\n\n\u4EFB\u52A1\u5339\u914D\u65F6\u6309\u9700\u8BFB\u53D6\u5BF9\u5E94 `SKILL.md` \u6B63\u6587\uFF1A\n" + lines.join("\n");
11172
+ return "## \u6309\u9700\u8BFB\u53D6\u7684\u6280\u80FD\n\n" + lines.join("\n");
11173
+ }
11174
+ function formatWorkerTemplates(templates) {
11175
+ if (!templates.length) return "";
11176
+ const lines = templates.map(({ id, name, description, create }) => {
11177
+ const label = name === id ? id : `${name}\uFF08${id}\uFF09`;
11178
+ const settings = [
11179
+ ["\u52A9\u624B", create.backend],
11180
+ ["\u6267\u884C\u5DE5\u4F5C\u533A", create.workspace],
11181
+ ["\u6A21\u578B", create.model],
11182
+ ["\u601D\u8003\u6DF1\u5EA6", create.thinking]
11183
+ ].filter(([, value]) => value !== void 0).map(([field, value]) => `${field} ${JSON.stringify(value)}`).join("\uFF0C");
11184
+ return `- ${label}\u3000${description}\uFF08${settings}\uFF09`;
11185
+ });
11186
+ return "## \u5DE5\u4F5C\u533A\u52A9\u624B\u6A21\u677F\n\n\u9009\u7528\u6A21\u677F\u65F6\uFF0C\u7528 worker_discover \u67E5\u8BE2\u6700\u65B0\u8BBE\u7F6E\uFF08target=templates\uFF09\u3002\n\n" + lines.join("\n");
11173
11187
  }
11174
11188
  async function loadWorkspaceContext(options) {
11175
11189
  const {
@@ -11183,13 +11197,15 @@ async function loadWorkspaceContext(options) {
11183
11197
  workspaceSkills = [],
11184
11198
  notices = []
11185
11199
  } = options;
11186
- const [workspace, roleText, rootAgents] = includePrompts ? await Promise.all([
11200
+ const [workspace, baseRole, rootAgents, catalog] = includePrompts ? await Promise.all([
11187
11201
  readFile(join7(resourceRoot, "prompts/workspace.md"), "utf8"),
11188
11202
  localRoleOnly ? readLocalRole(role, root) : agentText(role, root, coordinatorPrompt),
11189
- includeRootAgents ? readOptionalFile(join7(root, "AGENTS.md")) : Promise.resolve("")
11190
- ]) : ["", "", ""];
11203
+ includeRootAgents ? readOptionalFile(join7(root, "AGENTS.md")) : Promise.resolve(""),
11204
+ role === "coordinator" ? options.readWorkerTemplates?.(root) : void 0
11205
+ ]) : ["", "", "", void 0];
11206
+ const roleText = [baseRole, formatWorkerTemplates(catalog?.templates ?? [])].filter(Boolean).join("\n\n");
11191
11207
  const skillsSection = formatWorkspaceSkills(workspaceSkills);
11192
- const noticesSection = notices.length ? "## \u542F\u52A8\u63D0\u793A\n\n\u4EE5\u4E0B\u4E3A\u5DE5\u4F5C\u533A\u7EF4\u62A4\u63D0\u9192\uFF0C\u9002\u65F6\u987A\u5E26\u544A\u77E5\u7528\u6237\u5373\u53EF\uFF0C\u52FF\u672A\u7ECF\u7528\u6237\u8981\u6C42\u81EA\u884C\u6267\u884C\uFF1A\n" + notices.map((item) => `- ${item}`).join("\n") : "";
11208
+ const noticesSection = notices.length ? "## \u7EF4\u62A4\u63D0\u9192\n\n\u544A\u77E5\u7528\u6237\uFF0C\u6309\u7528\u6237\u8981\u6C42\u6267\u884C\u3002\n\n" + notices.map((item) => `- ${item}`).join("\n") : "";
11193
11209
  const environment = { host, workspaceRoot: root, resourceRoot };
11194
11210
  const text3 = [
11195
11211
  workspace,