personal-bot 0.3.2 → 0.3.4

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 (318) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -1
  3. package/DISCLAIMER.md +17 -0
  4. package/LICENSE +21 -0
  5. package/README.md +15 -5
  6. package/README.zh-CN.md +15 -5
  7. package/bin/pbot-pi-acp.mjs +1 -1
  8. package/bin/pbot.mjs +22 -2
  9. package/docs/README.md +2 -0
  10. package/docs/architecture/design.md +16 -16
  11. package/docs/architecture/extensibility.md +29 -2
  12. package/docs/architecture/model-context.md +3 -2
  13. package/docs/architecture/principles.md +2 -2
  14. package/docs/guides/capabilities.md +1 -1
  15. package/docs/guides/cross-harness-workers.md +3 -1
  16. package/docs/guides/history.md +30 -7
  17. package/docs/guides/workspace-configuration.md +20 -3
  18. package/docs/hosts/antigravity.md +1 -1
  19. package/docs/hosts/claude-code.md +1 -1
  20. package/docs/hosts/codex-qoder.md +63 -0
  21. package/docs/maintainers/architecture-governance.md +78 -0
  22. package/lib/antigravity-plugin/DISCLAIMER.md +17 -0
  23. package/lib/antigravity-plugin/LICENSE +21 -0
  24. package/lib/antigravity-plugin/bin/pbot-pi-acp.mjs +36 -0
  25. package/lib/antigravity-plugin/lib/common/files.d.ts +2 -0
  26. package/lib/antigravity-plugin/lib/common/files.js +44 -0
  27. package/lib/antigravity-plugin/lib/common/validation.d.ts +4 -0
  28. package/lib/antigravity-plugin/lib/common/validation.js +8 -0
  29. package/lib/antigravity-plugin/lib/extension/acp/member.d.ts +18 -0
  30. package/lib/antigravity-plugin/lib/extension/acp/member.js +44 -0
  31. package/lib/antigravity-plugin/lib/extension/acp-worker.js +71 -45
  32. package/lib/antigravity-plugin/lib/extension/hosts/dsh/acp-entry.d.ts +1 -0
  33. package/lib/antigravity-plugin/lib/extension/hosts/dsh/acp-entry.js +22 -0
  34. package/lib/antigravity-plugin/lib/extension/hosts/dsh/acp-member.d.ts +4 -0
  35. package/lib/antigravity-plugin/lib/extension/hosts/dsh/acp-member.js +58 -0
  36. package/lib/antigravity-plugin/lib/extension/hosts/dsh/files.d.ts +5 -0
  37. package/lib/antigravity-plugin/lib/extension/hosts/dsh/files.js +67 -0
  38. package/lib/antigravity-plugin/lib/extension/hosts/pi/acp-member.d.ts +3 -0
  39. package/lib/antigravity-plugin/lib/extension/hosts/pi/acp-member.js +100 -0
  40. package/lib/antigravity-plugin/lib/extension/hosts/plugin-runtime.d.ts +3 -1
  41. package/lib/antigravity-plugin/lib/extension/hosts/plugin-runtime.js +37 -22
  42. package/lib/antigravity-plugin/lib/extension/hosts/workspace-mcp.d.ts +6 -0
  43. package/lib/antigravity-plugin/lib/extension/hosts/workspace-mcp.js +21 -0
  44. package/lib/antigravity-plugin/lib/extension/mcp.js +2577 -2255
  45. package/lib/antigravity-plugin/lib/extension/workspace-cli.js +20171 -0
  46. package/lib/antigravity-plugin/lib/integrations/agent-resources.js +1 -1
  47. package/lib/antigravity-plugin/lib/integrations/hosts/claude/adapter.js +7 -59
  48. package/lib/antigravity-plugin/lib/integrations/hosts/codex/adapter.d.ts +2 -0
  49. package/lib/antigravity-plugin/lib/integrations/hosts/codex/adapter.js +14 -0
  50. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/mcp.d.ts +4 -0
  51. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/mcp.js +28 -0
  52. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/messages.d.ts +36 -0
  53. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/messages.js +11 -0
  54. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/resources.d.ts +6 -0
  55. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/resources.js +47 -0
  56. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/root-agents.d.ts +4 -0
  57. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/root-agents.js +3 -0
  58. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/skills.d.ts +8 -0
  59. package/lib/antigravity-plugin/lib/integrations/hosts/dsh/skills.js +31 -0
  60. package/lib/antigravity-plugin/lib/integrations/hosts/pi/agent-tools.d.ts +3 -0
  61. package/lib/antigravity-plugin/lib/integrations/hosts/pi/agent-tools.js +32 -0
  62. package/lib/antigravity-plugin/lib/integrations/hosts/pi/mcp.d.ts +4 -0
  63. package/lib/antigravity-plugin/lib/integrations/hosts/pi/mcp.js +23 -0
  64. package/lib/antigravity-plugin/lib/integrations/hosts/plugin-registry.d.ts +1 -0
  65. package/lib/antigravity-plugin/lib/integrations/hosts/plugin-registry.js +8 -1
  66. package/lib/antigravity-plugin/lib/integrations/hosts/prompt-hooks.d.ts +76 -0
  67. package/lib/antigravity-plugin/lib/integrations/hosts/prompt-hooks.js +76 -0
  68. package/lib/antigravity-plugin/lib/integrations/hosts/qoder/adapter.d.ts +2 -0
  69. package/lib/antigravity-plugin/lib/integrations/hosts/qoder/adapter.js +16 -0
  70. package/lib/antigravity-plugin/lib/model/acp.d.ts +7 -3
  71. package/lib/antigravity-plugin/lib/model/acp.js +8 -0
  72. package/lib/antigravity-plugin/lib/model/agent.d.ts +121 -0
  73. package/lib/antigravity-plugin/lib/model/agent.js +4 -0
  74. package/lib/antigravity-plugin/lib/model/history.d.ts +10 -0
  75. package/lib/antigravity-plugin/lib/model/history.js +4 -1
  76. package/lib/antigravity-plugin/lib/model/plugin-host.d.ts +5 -0
  77. package/lib/antigravity-plugin/lib/model/workspace-config.d.ts +8 -12
  78. package/lib/antigravity-plugin/lib/model/workspace-config.js +2 -1
  79. package/lib/antigravity-plugin/lib/plugin.d.ts +2 -1
  80. package/lib/antigravity-plugin/lib/plugin.js +2 -2
  81. package/lib/antigravity-plugin/lib/services/history/history-capture.js +34 -22
  82. package/lib/antigravity-plugin/lib/services/history/summary-registry.js +2 -3
  83. package/lib/antigravity-plugin/lib/services/history/summary-runner.d.ts +2 -5
  84. package/lib/antigravity-plugin/lib/services/history/summary-runner.js +72 -74
  85. package/lib/antigravity-plugin/lib/services/history/workspace-history.d.ts +3 -0
  86. package/lib/antigravity-plugin/lib/services/history/workspace-history.js +6 -0
  87. package/lib/antigravity-plugin/lib/services/workspace/plugin-releases.d.ts +15 -0
  88. package/lib/antigravity-plugin/lib/services/workspace/plugin-releases.js +126 -0
  89. package/lib/antigravity-plugin/lib/services/workspace/workspace-config.js +9 -8
  90. package/lib/antigravity-plugin/lib/services/workspace/workspace-files.d.ts +2 -0
  91. package/lib/antigravity-plugin/lib/services/workspace/workspace-files.js +17 -0
  92. package/lib/antigravity-plugin/lib/services/workspace/workspace-mcp.d.ts +14 -0
  93. package/lib/antigravity-plugin/lib/services/workspace/workspace-mcp.js +193 -0
  94. package/lib/antigravity-plugin/lib/services/workspace/workspace-skills.d.ts +1 -0
  95. package/lib/antigravity-plugin/lib/services/workspace/workspace-skills.js +4 -2
  96. package/lib/antigravity-plugin/lib/storage/acp-files.d.ts +11 -0
  97. package/lib/antigravity-plugin/lib/storage/acp-files.js +75 -0
  98. package/lib/antigravity-plugin/lib/storage/agent-files.d.ts +31 -0
  99. package/lib/antigravity-plugin/lib/storage/agent-files.js +159 -0
  100. package/lib/antigravity-plugin/lib/storage/atomic-json.d.ts +3 -1
  101. package/lib/antigravity-plugin/lib/storage/atomic-json.js +43 -3
  102. package/lib/antigravity-plugin/lib/storage/history-files.d.ts +2 -1
  103. package/lib/antigravity-plugin/lib/storage/history-files.js +21 -15
  104. package/lib/antigravity-plugin/lib/storage/history-format.d.ts +2 -3
  105. package/lib/antigravity-plugin/lib/storage/history-format.js +5 -7
  106. package/lib/antigravity-plugin/package.json +1 -1
  107. package/lib/antigravity-plugin/plugin.json +1 -1
  108. package/lib/antigravity-plugin/resources/prompts/history-monthly-summary.md +13 -0
  109. package/lib/antigravity-plugin/resources/prompts/history-summary.md +13 -0
  110. package/lib/antigravity-plugin/resources/prompts/plugin-coordinator.md +1 -0
  111. package/lib/antigravity-plugin/resources/skills/.claude-plugin/plugin.json +4 -0
  112. package/lib/antigravity-plugin/resources/skills/project-maintenance/SKILL.md +35 -0
  113. package/lib/antigravity-plugin/resources/skills/provider-connections/SKILL.md +52 -0
  114. package/lib/antigravity-plugin/skills/pbot/SKILL.md +11 -1
  115. package/lib/client.js +22 -50
  116. package/lib/codex-marketplace/.agents/plugins/marketplace.json +17 -0
  117. package/lib/codex-marketplace/plugins/personal-bot/.codex-plugin/plugin.json +7 -0
  118. package/lib/codex-marketplace/plugins/personal-bot/.mcp.json +17 -0
  119. package/lib/codex-marketplace/plugins/personal-bot/DISCLAIMER.md +17 -0
  120. package/lib/codex-marketplace/plugins/personal-bot/LICENSE +21 -0
  121. package/lib/codex-marketplace/plugins/personal-bot/hooks/hooks.json +37 -0
  122. package/lib/codex-marketplace/plugins/personal-bot/skills/pbot/SKILL.md +9 -0
  123. package/lib/codex-marketplace/plugins/personal-bot/skills/pbot/agents/openai.yaml +2 -0
  124. package/lib/common/validation.d.ts +4 -0
  125. package/lib/common/validation.js +8 -0
  126. package/lib/dsh.js +2 -2
  127. package/lib/extension/acp/member.d.ts +1 -1
  128. package/lib/extension/acp-worker.js +71 -45
  129. package/lib/extension/history/command.d.ts +37 -0
  130. package/lib/extension/history/command.js +57 -0
  131. package/lib/extension/hosts/dsh/acp-entry.d.ts +1 -0
  132. package/lib/extension/hosts/dsh/acp-entry.js +22 -0
  133. package/lib/extension/hosts/dsh/acp-member.js +4 -18
  134. package/lib/extension/hosts/dsh/command.d.ts +1 -2
  135. package/lib/extension/hosts/dsh/command.js +5 -49
  136. package/lib/extension/hosts/dsh/workspace.js +13 -44
  137. package/lib/extension/hosts/pi/acp-member.d.ts +3 -0
  138. package/lib/extension/hosts/pi/acp-member.js +100 -0
  139. package/lib/extension/hosts/plugin-runtime.d.ts +3 -1
  140. package/lib/extension/hosts/plugin-runtime.js +37 -22
  141. package/lib/extension/hosts/workspace-mcp.d.ts +6 -0
  142. package/lib/extension/hosts/workspace-mcp.js +21 -0
  143. package/lib/extension/mcp/bridge.d.ts +6 -8
  144. package/lib/extension/mcp/bridge.js +66 -84
  145. package/lib/extension/mcp/tool-contract.d.ts +735 -0
  146. package/lib/extension/mcp/tool-contract.js +441 -0
  147. package/lib/extension/mcp/workers.d.ts +29 -742
  148. package/lib/extension/mcp/workers.js +75 -525
  149. package/lib/extension/mcp.js +2577 -2255
  150. package/lib/extension/setup/cli.js +15 -0
  151. package/lib/extension/setup/upgrade.js +153 -0
  152. package/lib/extension/workspace-cli.js +20171 -0
  153. package/lib/integrations/acp/agents.d.ts +2 -3
  154. package/lib/integrations/acp/harnesses/dsh.js +1 -1
  155. package/lib/integrations/acp/harnesses/presets.js +8 -0
  156. package/lib/integrations/acp/history-summary.js +2 -1
  157. package/lib/integrations/acp/launch.d.ts +2 -2
  158. package/lib/integrations/agent-resources.js +1 -1
  159. package/lib/integrations/hosts/claude/adapter.js +7 -59
  160. package/lib/integrations/hosts/codex/adapter.d.ts +2 -0
  161. package/lib/integrations/hosts/codex/adapter.js +14 -0
  162. package/lib/integrations/hosts/pi/agent-tools.d.ts +3 -0
  163. package/lib/integrations/hosts/pi/agent-tools.js +32 -0
  164. package/lib/integrations/hosts/pi/mcp.d.ts +4 -0
  165. package/lib/integrations/hosts/pi/mcp.js +23 -0
  166. package/lib/integrations/hosts/plugin-registry.d.ts +1 -0
  167. package/lib/integrations/hosts/plugin-registry.js +8 -1
  168. package/lib/integrations/hosts/prompt-hooks.d.ts +76 -0
  169. package/lib/integrations/hosts/prompt-hooks.js +76 -0
  170. package/lib/integrations/hosts/qoder/adapter.d.ts +2 -0
  171. package/lib/integrations/hosts/qoder/adapter.js +16 -0
  172. package/lib/integrations/installation/cli-update.js +146 -0
  173. package/lib/integrations/installation/upgraders/antigravity.js +67 -0
  174. package/lib/integrations/installation/upgraders/claude.js +123 -0
  175. package/lib/integrations/installation/upgraders/codex.js +73 -0
  176. package/lib/integrations/installation/upgraders/dsh.js +62 -0
  177. package/lib/integrations/installation/upgraders/pi.js +90 -0
  178. package/lib/integrations/installation/upgraders/qoder.js +67 -0
  179. package/lib/integrations/installation/upgraders/registry.js +40 -0
  180. package/lib/model/acp.d.ts +7 -3
  181. package/lib/model/acp.js +8 -0
  182. package/lib/model/agent.d.ts +18 -4
  183. package/lib/model/agent.js +4 -1
  184. package/lib/model/history.d.ts +10 -0
  185. package/lib/model/history.js +4 -1
  186. package/lib/model/installation.js +1 -0
  187. package/lib/model/plugin-host.d.ts +5 -0
  188. package/lib/model/workspace-config.d.ts +8 -12
  189. package/lib/model/workspace-config.js +2 -1
  190. package/lib/plugin.d.ts +2 -1
  191. package/lib/plugin.js +2 -2
  192. package/lib/qoder-plugin/.mcp.json +17 -0
  193. package/lib/qoder-plugin/.qoder-plugin/plugin.json +7 -0
  194. package/lib/qoder-plugin/DISCLAIMER.md +17 -0
  195. package/lib/qoder-plugin/LICENSE +21 -0
  196. package/lib/qoder-plugin/hooks/hooks.json +37 -0
  197. package/lib/qoder-plugin/skills/pbot/SKILL.md +9 -0
  198. package/lib/services/agents/agent-service.d.ts +15 -45
  199. package/lib/services/agents/agent-service.js +22 -3
  200. package/lib/services/history/history-capture.js +34 -22
  201. package/lib/services/history/history-migrate.js +26 -60
  202. package/lib/services/history/history-query.js +38 -57
  203. package/lib/services/history/summary-command.d.ts +1 -1
  204. package/lib/services/history/summary-command.js +8 -7
  205. package/lib/services/history/summary-registry.js +2 -3
  206. package/lib/services/history/summary-runner.d.ts +2 -5
  207. package/lib/services/history/summary-runner.js +72 -74
  208. package/lib/services/history/workspace-history.d.ts +3 -0
  209. package/lib/services/history/workspace-history.js +6 -0
  210. package/lib/services/installation/setup-service.js +4 -1
  211. package/lib/services/installation/upgrade-service.js +95 -0
  212. package/lib/services/workspace/plugin-releases.d.ts +15 -0
  213. package/lib/services/workspace/plugin-releases.js +126 -0
  214. package/lib/services/workspace/workspace-config.js +9 -8
  215. package/lib/services/workspace/workspace-mcp.js +22 -29
  216. package/lib/services/workspace/workspace-skills.d.ts +1 -0
  217. package/lib/services/workspace/workspace-skills.js +4 -2
  218. package/lib/storage/acp-files.js +7 -12
  219. package/lib/storage/agent-files.js +6 -5
  220. package/lib/storage/atomic-json.d.ts +3 -1
  221. package/lib/storage/atomic-json.js +43 -3
  222. package/lib/storage/history-files.d.ts +2 -1
  223. package/lib/storage/history-files.js +21 -15
  224. package/lib/storage/history-format.d.ts +2 -3
  225. package/lib/storage/history-format.js +5 -7
  226. package/lib/tools/history/contract.d.ts +3 -11
  227. package/lib/tools/history/contract.js +8 -7
  228. package/lib/ui/dsh/elements.d.ts +2 -5
  229. package/lib/ui/dsh/elements.js +3 -16
  230. package/lib/ui/dsh/management.js +9 -9
  231. package/lib/ui/dsh/styles.d.ts +1 -1
  232. package/lib/ui/dsh/styles.js +5 -33
  233. package/package.json +4 -1
  234. package/resources/antigravity/skills/pbot/SKILL.md +11 -1
  235. package/resources/claude/skills/pbot/SKILL.md +11 -1
  236. package/resources/plugin/skills/pbot/SKILL.md +9 -0
  237. package/resources/prompts/history-coordinator.md +1 -0
  238. package/resources/prompts/plugin-coordinator.md +1 -0
  239. package/scripts/README.md +3 -2
  240. package/src/common/validation.ts +10 -0
  241. package/src/dsh.ts +2 -2
  242. package/src/extension/history/command.ts +68 -0
  243. package/src/extension/hosts/dsh/acp-entry.ts +21 -0
  244. package/src/extension/hosts/dsh/acp-member.ts +4 -15
  245. package/src/extension/hosts/dsh/command.ts +6 -46
  246. package/src/extension/hosts/dsh/workspace.ts +12 -38
  247. package/src/extension/hosts/pi/acp-member.ts +4 -10
  248. package/src/extension/hosts/pi/command.ts +14 -63
  249. package/src/extension/hosts/pi/events.ts +2 -8
  250. package/src/extension/hosts/pi/lifecycle.ts +3 -2
  251. package/src/extension/hosts/plugin-runtime.ts +39 -19
  252. package/src/extension/hosts/workspace-mcp.ts +25 -0
  253. package/src/extension/mcp/bridge.ts +80 -80
  254. package/src/extension/mcp/tool-contract.ts +462 -0
  255. package/src/extension/mcp/workers.ts +81 -551
  256. package/src/extension/setup/cli.ts +11 -1
  257. package/src/extension/setup/upgrade.ts +158 -0
  258. package/src/extension/setup/workspace-cli.ts +167 -0
  259. package/src/integrations/acp/agents.ts +2 -3
  260. package/src/integrations/acp/harnesses/dsh.ts +1 -1
  261. package/src/integrations/acp/harnesses/presets.ts +8 -0
  262. package/src/integrations/acp/history-summary.ts +2 -1
  263. package/src/integrations/agent-resources.ts +1 -1
  264. package/src/integrations/hosts/claude/adapter.ts +7 -53
  265. package/src/integrations/hosts/codex/adapter.ts +16 -0
  266. package/src/integrations/hosts/plugin-registry.ts +9 -1
  267. package/src/integrations/hosts/prompt-hooks.ts +72 -0
  268. package/src/integrations/hosts/qoder/adapter.ts +19 -0
  269. package/src/integrations/installation/cli-update.ts +144 -0
  270. package/src/integrations/installation/pi-bridge.ts +1 -1
  271. package/src/integrations/installation/pi-setup.ts +1 -1
  272. package/src/integrations/installation/processes.ts +1 -1
  273. package/src/integrations/installation/upgraders/antigravity.ts +68 -0
  274. package/src/integrations/installation/upgraders/claude.ts +123 -0
  275. package/src/integrations/installation/upgraders/codex.ts +73 -0
  276. package/src/integrations/installation/upgraders/dsh.ts +63 -0
  277. package/src/integrations/installation/upgraders/pi.ts +87 -0
  278. package/src/integrations/installation/upgraders/qoder.ts +68 -0
  279. package/src/integrations/installation/upgraders/registry.ts +48 -0
  280. package/src/model/acp.ts +11 -3
  281. package/src/model/agent.ts +20 -4
  282. package/src/model/history.ts +5 -0
  283. package/src/model/installation.ts +86 -0
  284. package/src/model/plugin-host.ts +5 -1
  285. package/src/model/workspace-config.ts +6 -12
  286. package/src/pbot.ts +13 -32
  287. package/src/plugin.ts +3 -3
  288. package/src/services/agents/agent-service.ts +29 -17
  289. package/src/services/history/history-capture.ts +30 -22
  290. package/src/services/history/history-migrate.ts +23 -50
  291. package/src/services/history/history-query.ts +34 -48
  292. package/src/services/history/summary-command.ts +9 -8
  293. package/src/services/history/summary-registry.ts +2 -3
  294. package/src/services/history/summary-runner.ts +72 -81
  295. package/src/services/history/workspace-history.ts +8 -0
  296. package/src/services/installation/setup-service.ts +9 -43
  297. package/src/services/installation/upgrade-service.ts +127 -0
  298. package/src/services/workspace/plugin-releases.ts +121 -0
  299. package/src/services/workspace/workspace-config.ts +9 -8
  300. package/src/services/workspace/workspace-mcp.ts +23 -28
  301. package/src/services/workspace/workspace-skills.ts +5 -2
  302. package/src/storage/acp-files.ts +7 -12
  303. package/src/storage/agent-files.ts +6 -5
  304. package/src/storage/atomic-json.ts +31 -4
  305. package/src/storage/history-files.ts +22 -15
  306. package/src/storage/history-format.ts +6 -8
  307. package/src/tools/history/contract.ts +9 -9
  308. package/src/tools/history/pi-tool.ts +6 -4
  309. package/src/ui/dsh/elements.ts +5 -12
  310. package/src/ui/dsh/management.ts +10 -10
  311. package/src/ui/dsh/styles.ts +5 -33
  312. package/lib/antigravity-plugin/lib/services/history/history-migrate.d.ts +0 -12
  313. package/lib/antigravity-plugin/lib/services/history/history-migrate.js +0 -88
  314. package/lib/ui/presentation.d.ts +0 -3
  315. package/lib/ui/presentation.js +0 -12
  316. package/src/tools/access.ts +0 -7
  317. package/src/tools/register.ts +0 -21
  318. package/src/ui/presentation.ts +0 -12
@@ -0,0 +1,735 @@
1
+ import { type AcpCommands } from "../../model/acp.js";
2
+ export declare const defaultWaitMs = 50000;
3
+ export declare const maxWaitMs = 600000;
4
+ export declare const discoverTargets: readonly ["overview", "workers", "backends", "models"];
5
+ export declare function buildPbotWorkerTools(commands?: AcpCommands, defaultBackend?: string, workspaceBound?: boolean): ({
6
+ name: "worker_create";
7
+ description: string;
8
+ annotations: {
9
+ title: string;
10
+ readOnlyHint: boolean;
11
+ destructiveHint: boolean;
12
+ idempotentHint: boolean;
13
+ openWorldHint: boolean;
14
+ };
15
+ inputSchema: {
16
+ type: string;
17
+ additionalProperties: boolean;
18
+ required: string[];
19
+ properties: {
20
+ backend: {
21
+ type: string;
22
+ description: string;
23
+ };
24
+ model: {
25
+ type: string;
26
+ description: string;
27
+ };
28
+ thinking: {
29
+ type: string;
30
+ description: string;
31
+ };
32
+ cwd: {
33
+ type: string;
34
+ description: string;
35
+ };
36
+ workspace: {
37
+ type: string;
38
+ description: string;
39
+ };
40
+ workerId?: never;
41
+ message?: never;
42
+ waitMs?: never;
43
+ action?: never;
44
+ requestId?: never;
45
+ optionId?: never;
46
+ content?: never;
47
+ offset?: never;
48
+ target?: never;
49
+ };
50
+ };
51
+ } | {
52
+ name: "worker_close";
53
+ description: string;
54
+ annotations: {
55
+ title: string;
56
+ readOnlyHint: boolean;
57
+ destructiveHint: boolean;
58
+ idempotentHint: boolean;
59
+ openWorldHint: boolean;
60
+ };
61
+ inputSchema: {
62
+ type: string;
63
+ additionalProperties: boolean;
64
+ required: string[];
65
+ properties: {
66
+ workerId: {
67
+ type: string;
68
+ description: string;
69
+ };
70
+ workspace: {
71
+ type: string;
72
+ description: string;
73
+ };
74
+ backend?: never;
75
+ model?: never;
76
+ thinking?: never;
77
+ cwd?: never;
78
+ message?: never;
79
+ waitMs?: never;
80
+ action?: never;
81
+ requestId?: never;
82
+ optionId?: never;
83
+ content?: never;
84
+ offset?: never;
85
+ target?: never;
86
+ };
87
+ };
88
+ } | {
89
+ name: "worker_request";
90
+ description: string;
91
+ annotations: {
92
+ title: string;
93
+ readOnlyHint: boolean;
94
+ destructiveHint: boolean;
95
+ idempotentHint: boolean;
96
+ openWorldHint: boolean;
97
+ };
98
+ inputSchema: {
99
+ type: string;
100
+ additionalProperties: boolean;
101
+ required: string[];
102
+ properties: {
103
+ workerId: {
104
+ type: string;
105
+ description: string;
106
+ };
107
+ message: {
108
+ type: string;
109
+ description: string;
110
+ };
111
+ waitMs: {
112
+ type: string;
113
+ minimum: number;
114
+ maximum: number;
115
+ description: string;
116
+ };
117
+ workspace: {
118
+ type: string;
119
+ description: string;
120
+ };
121
+ backend?: never;
122
+ model?: never;
123
+ thinking?: never;
124
+ cwd?: never;
125
+ action?: never;
126
+ requestId?: never;
127
+ optionId?: never;
128
+ content?: never;
129
+ offset?: never;
130
+ target?: never;
131
+ };
132
+ };
133
+ } | {
134
+ name: "worker_response";
135
+ description: string;
136
+ annotations: {
137
+ title: string;
138
+ readOnlyHint: boolean;
139
+ destructiveHint: boolean;
140
+ idempotentHint: boolean;
141
+ openWorldHint: boolean;
142
+ };
143
+ inputSchema: {
144
+ type: string;
145
+ additionalProperties: boolean;
146
+ required: string[];
147
+ properties: {
148
+ workerId: {
149
+ type: string;
150
+ description: string;
151
+ };
152
+ action: {
153
+ type: string;
154
+ enum: ("accept" | "decline" | "cancel")[];
155
+ description: string;
156
+ };
157
+ requestId: {
158
+ type: string;
159
+ description: string;
160
+ };
161
+ optionId: {
162
+ type: string;
163
+ description: string;
164
+ };
165
+ content: {
166
+ type: string;
167
+ additionalProperties: boolean;
168
+ description: string;
169
+ };
170
+ waitMs: {
171
+ type: string;
172
+ minimum: number;
173
+ maximum: number;
174
+ description: string;
175
+ };
176
+ workspace: {
177
+ type: string;
178
+ description: string;
179
+ };
180
+ backend?: never;
181
+ model?: never;
182
+ thinking?: never;
183
+ cwd?: never;
184
+ message?: never;
185
+ offset?: never;
186
+ target?: never;
187
+ };
188
+ };
189
+ } | {
190
+ name: "worker_output";
191
+ description: string;
192
+ annotations: {
193
+ title: string;
194
+ readOnlyHint: boolean;
195
+ destructiveHint: boolean;
196
+ idempotentHint: boolean;
197
+ openWorldHint: boolean;
198
+ };
199
+ inputSchema: {
200
+ type: string;
201
+ additionalProperties: boolean;
202
+ required: string[];
203
+ properties: {
204
+ workerId: {
205
+ type: string;
206
+ description: string;
207
+ };
208
+ offset: {
209
+ type: string;
210
+ minimum: number;
211
+ description: string;
212
+ };
213
+ waitMs: {
214
+ type: string;
215
+ minimum: number;
216
+ maximum: number;
217
+ description: string;
218
+ };
219
+ workspace: {
220
+ type: string;
221
+ description: string;
222
+ };
223
+ backend?: never;
224
+ model?: never;
225
+ thinking?: never;
226
+ cwd?: never;
227
+ message?: never;
228
+ action?: never;
229
+ requestId?: never;
230
+ optionId?: never;
231
+ content?: never;
232
+ target?: never;
233
+ };
234
+ };
235
+ } | {
236
+ name: "worker_discover";
237
+ description: string;
238
+ annotations: {
239
+ title: string;
240
+ readOnlyHint: boolean;
241
+ destructiveHint: boolean;
242
+ idempotentHint: boolean;
243
+ openWorldHint: boolean;
244
+ };
245
+ inputSchema: {
246
+ type: string;
247
+ additionalProperties: boolean;
248
+ required: never[];
249
+ properties: {
250
+ target: {
251
+ type: string;
252
+ enum: ("models" | "overview" | "workers" | "backends")[];
253
+ description: string;
254
+ };
255
+ workerId: {
256
+ type: string;
257
+ description: string;
258
+ };
259
+ backend: {
260
+ type: string;
261
+ description: string;
262
+ };
263
+ model: {
264
+ type: string;
265
+ description: string;
266
+ };
267
+ workspace: {
268
+ type: string;
269
+ description: string;
270
+ };
271
+ thinking?: never;
272
+ cwd?: never;
273
+ message?: never;
274
+ waitMs?: never;
275
+ action?: never;
276
+ requestId?: never;
277
+ optionId?: never;
278
+ content?: never;
279
+ offset?: never;
280
+ };
281
+ };
282
+ })[];
283
+ export declare function buildWorkspaceMcpTools(workspaceBound?: boolean): ({
284
+ name: "workspace_mcp_discover";
285
+ description: string;
286
+ annotations: {
287
+ title: string;
288
+ readOnlyHint: boolean;
289
+ destructiveHint: boolean;
290
+ idempotentHint: boolean;
291
+ openWorldHint: boolean;
292
+ };
293
+ inputSchema: {
294
+ type: string;
295
+ additionalProperties: boolean;
296
+ required: never[];
297
+ properties: {
298
+ server: {
299
+ type: string;
300
+ description: string;
301
+ };
302
+ workspace: {
303
+ type: string;
304
+ description: string;
305
+ };
306
+ tool?: never;
307
+ arguments?: never;
308
+ };
309
+ };
310
+ } | {
311
+ name: "workspace_mcp_call";
312
+ description: string;
313
+ annotations: {
314
+ title: string;
315
+ readOnlyHint: boolean;
316
+ destructiveHint: boolean;
317
+ idempotentHint: boolean;
318
+ openWorldHint: boolean;
319
+ };
320
+ inputSchema: {
321
+ type: string;
322
+ additionalProperties: boolean;
323
+ required: string[];
324
+ properties: {
325
+ server: {
326
+ type: string;
327
+ description: string;
328
+ };
329
+ tool: {
330
+ type: string;
331
+ description: string;
332
+ };
333
+ arguments: {
334
+ type: string;
335
+ additionalProperties: boolean;
336
+ description: string;
337
+ };
338
+ workspace: {
339
+ type: string;
340
+ description: string;
341
+ };
342
+ };
343
+ };
344
+ })[];
345
+ export declare function buildHistoryMcpTools(workspaceBound?: boolean): ({
346
+ name: "history_search";
347
+ description: string;
348
+ annotations: {
349
+ title: string;
350
+ readOnlyHint: boolean;
351
+ destructiveHint: boolean;
352
+ idempotentHint: boolean;
353
+ openWorldHint: boolean;
354
+ };
355
+ inputSchema: {
356
+ type: string;
357
+ additionalProperties: boolean;
358
+ required: never[];
359
+ properties: {
360
+ host: {
361
+ type: string;
362
+ description: string;
363
+ };
364
+ dimension: {
365
+ type: string;
366
+ description: string;
367
+ };
368
+ query: {
369
+ type: string;
370
+ description: string;
371
+ };
372
+ sessionId: {
373
+ type: string;
374
+ description: string;
375
+ };
376
+ from: {
377
+ type: string;
378
+ description: string;
379
+ };
380
+ to: {
381
+ type: string;
382
+ description: string;
383
+ };
384
+ offset: {
385
+ type: string;
386
+ minimum: number;
387
+ description: string;
388
+ };
389
+ limit: {
390
+ type: string;
391
+ minimum: number;
392
+ maximum: 50;
393
+ description: string;
394
+ };
395
+ workspace: {
396
+ type: string;
397
+ description: string;
398
+ };
399
+ id?: never;
400
+ childrenOffset?: never;
401
+ };
402
+ };
403
+ } | {
404
+ name: "history_read";
405
+ description: string;
406
+ annotations: {
407
+ title: string;
408
+ readOnlyHint: boolean;
409
+ destructiveHint: boolean;
410
+ idempotentHint: boolean;
411
+ openWorldHint: boolean;
412
+ };
413
+ inputSchema: {
414
+ type: string;
415
+ additionalProperties: boolean;
416
+ required: string[];
417
+ properties: {
418
+ id: {
419
+ type: string;
420
+ description: string;
421
+ };
422
+ host: {
423
+ type: string;
424
+ description: string;
425
+ };
426
+ offset: {
427
+ type: string;
428
+ minimum: number;
429
+ description: string;
430
+ };
431
+ limit: {
432
+ type: string;
433
+ minimum: number;
434
+ maximum: 24000;
435
+ description: string;
436
+ };
437
+ childrenOffset: {
438
+ type: string;
439
+ minimum: number;
440
+ description: string;
441
+ };
442
+ workspace: {
443
+ type: string;
444
+ description: string;
445
+ };
446
+ dimension?: never;
447
+ query?: never;
448
+ sessionId?: never;
449
+ from?: never;
450
+ to?: never;
451
+ };
452
+ };
453
+ })[];
454
+ export declare const pbotWorkerTools: ({
455
+ name: "worker_create";
456
+ description: string;
457
+ annotations: {
458
+ title: string;
459
+ readOnlyHint: boolean;
460
+ destructiveHint: boolean;
461
+ idempotentHint: boolean;
462
+ openWorldHint: boolean;
463
+ };
464
+ inputSchema: {
465
+ type: string;
466
+ additionalProperties: boolean;
467
+ required: string[];
468
+ properties: {
469
+ backend: {
470
+ type: string;
471
+ description: string;
472
+ };
473
+ model: {
474
+ type: string;
475
+ description: string;
476
+ };
477
+ thinking: {
478
+ type: string;
479
+ description: string;
480
+ };
481
+ cwd: {
482
+ type: string;
483
+ description: string;
484
+ };
485
+ workspace: {
486
+ type: string;
487
+ description: string;
488
+ };
489
+ workerId?: never;
490
+ message?: never;
491
+ waitMs?: never;
492
+ action?: never;
493
+ requestId?: never;
494
+ optionId?: never;
495
+ content?: never;
496
+ offset?: never;
497
+ target?: never;
498
+ };
499
+ };
500
+ } | {
501
+ name: "worker_close";
502
+ description: string;
503
+ annotations: {
504
+ title: string;
505
+ readOnlyHint: boolean;
506
+ destructiveHint: boolean;
507
+ idempotentHint: boolean;
508
+ openWorldHint: boolean;
509
+ };
510
+ inputSchema: {
511
+ type: string;
512
+ additionalProperties: boolean;
513
+ required: string[];
514
+ properties: {
515
+ workerId: {
516
+ type: string;
517
+ description: string;
518
+ };
519
+ workspace: {
520
+ type: string;
521
+ description: string;
522
+ };
523
+ backend?: never;
524
+ model?: never;
525
+ thinking?: never;
526
+ cwd?: never;
527
+ message?: never;
528
+ waitMs?: never;
529
+ action?: never;
530
+ requestId?: never;
531
+ optionId?: never;
532
+ content?: never;
533
+ offset?: never;
534
+ target?: never;
535
+ };
536
+ };
537
+ } | {
538
+ name: "worker_request";
539
+ description: string;
540
+ annotations: {
541
+ title: string;
542
+ readOnlyHint: boolean;
543
+ destructiveHint: boolean;
544
+ idempotentHint: boolean;
545
+ openWorldHint: boolean;
546
+ };
547
+ inputSchema: {
548
+ type: string;
549
+ additionalProperties: boolean;
550
+ required: string[];
551
+ properties: {
552
+ workerId: {
553
+ type: string;
554
+ description: string;
555
+ };
556
+ message: {
557
+ type: string;
558
+ description: string;
559
+ };
560
+ waitMs: {
561
+ type: string;
562
+ minimum: number;
563
+ maximum: number;
564
+ description: string;
565
+ };
566
+ workspace: {
567
+ type: string;
568
+ description: string;
569
+ };
570
+ backend?: never;
571
+ model?: never;
572
+ thinking?: never;
573
+ cwd?: never;
574
+ action?: never;
575
+ requestId?: never;
576
+ optionId?: never;
577
+ content?: never;
578
+ offset?: never;
579
+ target?: never;
580
+ };
581
+ };
582
+ } | {
583
+ name: "worker_response";
584
+ description: string;
585
+ annotations: {
586
+ title: string;
587
+ readOnlyHint: boolean;
588
+ destructiveHint: boolean;
589
+ idempotentHint: boolean;
590
+ openWorldHint: boolean;
591
+ };
592
+ inputSchema: {
593
+ type: string;
594
+ additionalProperties: boolean;
595
+ required: string[];
596
+ properties: {
597
+ workerId: {
598
+ type: string;
599
+ description: string;
600
+ };
601
+ action: {
602
+ type: string;
603
+ enum: ("accept" | "decline" | "cancel")[];
604
+ description: string;
605
+ };
606
+ requestId: {
607
+ type: string;
608
+ description: string;
609
+ };
610
+ optionId: {
611
+ type: string;
612
+ description: string;
613
+ };
614
+ content: {
615
+ type: string;
616
+ additionalProperties: boolean;
617
+ description: string;
618
+ };
619
+ waitMs: {
620
+ type: string;
621
+ minimum: number;
622
+ maximum: number;
623
+ description: string;
624
+ };
625
+ workspace: {
626
+ type: string;
627
+ description: string;
628
+ };
629
+ backend?: never;
630
+ model?: never;
631
+ thinking?: never;
632
+ cwd?: never;
633
+ message?: never;
634
+ offset?: never;
635
+ target?: never;
636
+ };
637
+ };
638
+ } | {
639
+ name: "worker_output";
640
+ description: string;
641
+ annotations: {
642
+ title: string;
643
+ readOnlyHint: boolean;
644
+ destructiveHint: boolean;
645
+ idempotentHint: boolean;
646
+ openWorldHint: boolean;
647
+ };
648
+ inputSchema: {
649
+ type: string;
650
+ additionalProperties: boolean;
651
+ required: string[];
652
+ properties: {
653
+ workerId: {
654
+ type: string;
655
+ description: string;
656
+ };
657
+ offset: {
658
+ type: string;
659
+ minimum: number;
660
+ description: string;
661
+ };
662
+ waitMs: {
663
+ type: string;
664
+ minimum: number;
665
+ maximum: number;
666
+ description: string;
667
+ };
668
+ workspace: {
669
+ type: string;
670
+ description: string;
671
+ };
672
+ backend?: never;
673
+ model?: never;
674
+ thinking?: never;
675
+ cwd?: never;
676
+ message?: never;
677
+ action?: never;
678
+ requestId?: never;
679
+ optionId?: never;
680
+ content?: never;
681
+ target?: never;
682
+ };
683
+ };
684
+ } | {
685
+ name: "worker_discover";
686
+ description: string;
687
+ annotations: {
688
+ title: string;
689
+ readOnlyHint: boolean;
690
+ destructiveHint: boolean;
691
+ idempotentHint: boolean;
692
+ openWorldHint: boolean;
693
+ };
694
+ inputSchema: {
695
+ type: string;
696
+ additionalProperties: boolean;
697
+ required: never[];
698
+ properties: {
699
+ target: {
700
+ type: string;
701
+ enum: ("models" | "overview" | "workers" | "backends")[];
702
+ description: string;
703
+ };
704
+ workerId: {
705
+ type: string;
706
+ description: string;
707
+ };
708
+ backend: {
709
+ type: string;
710
+ description: string;
711
+ };
712
+ model: {
713
+ type: string;
714
+ description: string;
715
+ };
716
+ workspace: {
717
+ type: string;
718
+ description: string;
719
+ };
720
+ thinking?: never;
721
+ cwd?: never;
722
+ message?: never;
723
+ waitMs?: never;
724
+ action?: never;
725
+ requestId?: never;
726
+ optionId?: never;
727
+ content?: never;
728
+ offset?: never;
729
+ };
730
+ };
731
+ })[];
732
+ export declare function parseMcpToolCall(name: string, args: unknown): {
733
+ name: "worker_create" | "worker_close" | "worker_request" | "worker_response" | "worker_output" | "worker_discover" | "workspace_mcp_discover" | "workspace_mcp_call" | "history_search" | "history_read";
734
+ args: Record<string, unknown>;
735
+ };