personal-bot 0.3.2 → 0.3.3

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 (298) 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 +8 -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 +7 -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 +31 -23
  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 +20127 -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 +3 -0
  88. package/lib/antigravity-plugin/lib/services/workspace/plugin-releases.js +78 -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 +31 -23
  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 +3 -0
  151. package/lib/extension/workspace-cli.js +20127 -0
  152. package/lib/integrations/acp/agents.d.ts +2 -3
  153. package/lib/integrations/acp/harnesses/dsh.js +1 -1
  154. package/lib/integrations/acp/harnesses/presets.js +8 -0
  155. package/lib/integrations/acp/history-summary.js +2 -1
  156. package/lib/integrations/acp/launch.d.ts +2 -2
  157. package/lib/integrations/agent-resources.js +1 -1
  158. package/lib/integrations/hosts/claude/adapter.js +7 -59
  159. package/lib/integrations/hosts/codex/adapter.d.ts +2 -0
  160. package/lib/integrations/hosts/codex/adapter.js +14 -0
  161. package/lib/integrations/hosts/pi/agent-tools.d.ts +3 -0
  162. package/lib/integrations/hosts/pi/agent-tools.js +32 -0
  163. package/lib/integrations/hosts/pi/mcp.d.ts +4 -0
  164. package/lib/integrations/hosts/pi/mcp.js +23 -0
  165. package/lib/integrations/hosts/plugin-registry.d.ts +1 -0
  166. package/lib/integrations/hosts/plugin-registry.js +8 -1
  167. package/lib/integrations/hosts/prompt-hooks.d.ts +76 -0
  168. package/lib/integrations/hosts/prompt-hooks.js +76 -0
  169. package/lib/integrations/hosts/qoder/adapter.d.ts +2 -0
  170. package/lib/integrations/hosts/qoder/adapter.js +16 -0
  171. package/lib/model/acp.d.ts +7 -3
  172. package/lib/model/acp.js +8 -0
  173. package/lib/model/agent.d.ts +18 -4
  174. package/lib/model/agent.js +4 -1
  175. package/lib/model/history.d.ts +10 -0
  176. package/lib/model/history.js +4 -1
  177. package/lib/model/installation.js +1 -0
  178. package/lib/model/plugin-host.d.ts +5 -0
  179. package/lib/model/workspace-config.d.ts +8 -12
  180. package/lib/model/workspace-config.js +2 -1
  181. package/lib/plugin.d.ts +2 -1
  182. package/lib/plugin.js +2 -2
  183. package/lib/qoder-plugin/.mcp.json +17 -0
  184. package/lib/qoder-plugin/.qoder-plugin/plugin.json +7 -0
  185. package/lib/qoder-plugin/DISCLAIMER.md +17 -0
  186. package/lib/qoder-plugin/LICENSE +21 -0
  187. package/lib/qoder-plugin/hooks/hooks.json +37 -0
  188. package/lib/qoder-plugin/skills/pbot/SKILL.md +9 -0
  189. package/lib/services/agents/agent-service.d.ts +15 -45
  190. package/lib/services/agents/agent-service.js +22 -3
  191. package/lib/services/history/history-capture.js +34 -22
  192. package/lib/services/history/history-migrate.js +26 -60
  193. package/lib/services/history/history-query.js +38 -57
  194. package/lib/services/history/summary-command.d.ts +1 -1
  195. package/lib/services/history/summary-command.js +8 -7
  196. package/lib/services/history/summary-registry.js +2 -3
  197. package/lib/services/history/summary-runner.d.ts +2 -5
  198. package/lib/services/history/summary-runner.js +72 -74
  199. package/lib/services/history/workspace-history.d.ts +3 -0
  200. package/lib/services/history/workspace-history.js +6 -0
  201. package/lib/services/workspace/plugin-releases.d.ts +3 -0
  202. package/lib/services/workspace/plugin-releases.js +78 -0
  203. package/lib/services/workspace/workspace-config.js +9 -8
  204. package/lib/services/workspace/workspace-mcp.js +22 -29
  205. package/lib/services/workspace/workspace-skills.d.ts +1 -0
  206. package/lib/services/workspace/workspace-skills.js +4 -2
  207. package/lib/storage/acp-files.js +7 -12
  208. package/lib/storage/agent-files.js +6 -5
  209. package/lib/storage/atomic-json.d.ts +3 -1
  210. package/lib/storage/atomic-json.js +43 -3
  211. package/lib/storage/history-files.d.ts +2 -1
  212. package/lib/storage/history-files.js +21 -15
  213. package/lib/storage/history-format.d.ts +2 -3
  214. package/lib/storage/history-format.js +5 -7
  215. package/lib/tools/history/contract.d.ts +3 -11
  216. package/lib/tools/history/contract.js +8 -7
  217. package/lib/ui/dsh/elements.d.ts +2 -5
  218. package/lib/ui/dsh/elements.js +3 -16
  219. package/lib/ui/dsh/management.js +9 -9
  220. package/lib/ui/dsh/styles.d.ts +1 -1
  221. package/lib/ui/dsh/styles.js +5 -33
  222. package/package.json +4 -1
  223. package/resources/antigravity/skills/pbot/SKILL.md +11 -1
  224. package/resources/claude/skills/pbot/SKILL.md +11 -1
  225. package/resources/plugin/skills/pbot/SKILL.md +9 -0
  226. package/resources/prompts/history-coordinator.md +1 -0
  227. package/resources/prompts/plugin-coordinator.md +1 -0
  228. package/scripts/README.md +3 -2
  229. package/src/common/validation.ts +10 -0
  230. package/src/dsh.ts +2 -2
  231. package/src/extension/history/command.ts +68 -0
  232. package/src/extension/hosts/dsh/acp-entry.ts +21 -0
  233. package/src/extension/hosts/dsh/acp-member.ts +4 -15
  234. package/src/extension/hosts/dsh/command.ts +6 -46
  235. package/src/extension/hosts/dsh/workspace.ts +12 -38
  236. package/src/extension/hosts/pi/acp-member.ts +4 -10
  237. package/src/extension/hosts/pi/command.ts +14 -63
  238. package/src/extension/hosts/pi/events.ts +2 -8
  239. package/src/extension/hosts/pi/lifecycle.ts +3 -2
  240. package/src/extension/hosts/plugin-runtime.ts +32 -19
  241. package/src/extension/hosts/workspace-mcp.ts +25 -0
  242. package/src/extension/mcp/bridge.ts +80 -80
  243. package/src/extension/mcp/tool-contract.ts +462 -0
  244. package/src/extension/mcp/workers.ts +81 -551
  245. package/src/extension/setup/cli.ts +4 -1
  246. package/src/extension/setup/workspace-cli.ts +159 -0
  247. package/src/integrations/acp/agents.ts +2 -3
  248. package/src/integrations/acp/harnesses/dsh.ts +1 -1
  249. package/src/integrations/acp/harnesses/presets.ts +8 -0
  250. package/src/integrations/acp/history-summary.ts +2 -1
  251. package/src/integrations/agent-resources.ts +1 -1
  252. package/src/integrations/hosts/claude/adapter.ts +7 -53
  253. package/src/integrations/hosts/codex/adapter.ts +16 -0
  254. package/src/integrations/hosts/plugin-registry.ts +9 -1
  255. package/src/integrations/hosts/prompt-hooks.ts +72 -0
  256. package/src/integrations/hosts/qoder/adapter.ts +19 -0
  257. package/src/integrations/installation/cli-update.ts +116 -0
  258. package/src/integrations/installation/pi-bridge.ts +1 -1
  259. package/src/integrations/installation/pi-setup.ts +1 -1
  260. package/src/integrations/installation/processes.ts +1 -1
  261. package/src/model/acp.ts +11 -3
  262. package/src/model/agent.ts +20 -4
  263. package/src/model/history.ts +5 -0
  264. package/src/model/installation.ts +41 -0
  265. package/src/model/plugin-host.ts +5 -1
  266. package/src/model/workspace-config.ts +6 -12
  267. package/src/pbot.ts +13 -32
  268. package/src/plugin.ts +3 -3
  269. package/src/services/agents/agent-service.ts +29 -17
  270. package/src/services/history/history-capture.ts +30 -22
  271. package/src/services/history/history-migrate.ts +23 -50
  272. package/src/services/history/history-query.ts +34 -48
  273. package/src/services/history/summary-command.ts +9 -8
  274. package/src/services/history/summary-registry.ts +2 -3
  275. package/src/services/history/summary-runner.ts +72 -81
  276. package/src/services/history/workspace-history.ts +8 -0
  277. package/src/services/installation/setup-service.ts +2 -41
  278. package/src/services/workspace/plugin-releases.ts +68 -0
  279. package/src/services/workspace/workspace-config.ts +9 -8
  280. package/src/services/workspace/workspace-mcp.ts +23 -28
  281. package/src/services/workspace/workspace-skills.ts +5 -2
  282. package/src/storage/acp-files.ts +7 -12
  283. package/src/storage/agent-files.ts +6 -5
  284. package/src/storage/atomic-json.ts +31 -4
  285. package/src/storage/history-files.ts +22 -15
  286. package/src/storage/history-format.ts +6 -8
  287. package/src/tools/history/contract.ts +9 -9
  288. package/src/tools/history/pi-tool.ts +6 -4
  289. package/src/ui/dsh/elements.ts +5 -12
  290. package/src/ui/dsh/management.ts +10 -10
  291. package/src/ui/dsh/styles.ts +5 -33
  292. package/lib/antigravity-plugin/lib/services/history/history-migrate.d.ts +0 -12
  293. package/lib/antigravity-plugin/lib/services/history/history-migrate.js +0 -88
  294. package/lib/ui/presentation.d.ts +0 -3
  295. package/lib/ui/presentation.js +0 -12
  296. package/src/tools/access.ts +0 -7
  297. package/src/tools/register.ts +0 -21
  298. package/src/ui/presentation.ts +0 -12
@@ -1,734 +1,8 @@
1
- import { type AcpCommands, type McpWorkerToolName } from "../../model/acp.js";
1
+ import { type McpWorkerToolName } from "../../model/acp.js";
2
+ export { buildHistoryMcpTools, buildPbotWorkerTools, buildWorkspaceMcpTools, pbotWorkerTools } from "./tool-contract.js";
2
3
  export type ProgressReporter = (message: string) => void;
3
4
  export declare const mcpWorkerOnlyInstructions: string;
4
5
  export declare const mcpInstructions: string;
5
- export declare function buildPbotWorkerTools(commands?: AcpCommands, defaultBackend?: string, workspaceBound?: boolean): ({
6
- name: string;
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: string;
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: string;
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: string;
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: string;
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: string;
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: string;
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: string;
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: string;
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: number;
393
- description: string;
394
- };
395
- workspace: {
396
- type: string;
397
- description: string;
398
- };
399
- id?: never;
400
- childrenOffset?: never;
401
- };
402
- };
403
- } | {
404
- name: string;
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: number;
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: string;
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: string;
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: string;
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: string;
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: string;
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: string;
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
6
  export declare function defaultWorkerDirectory(): string;
733
7
  /** Parse Pi/dsh `/pbot worker ...` CLI arguments into a canonical MCP tool call. */
734
8
  export declare function parseWorkerCommand(raw: string): {
@@ -738,13 +12,26 @@ export declare function parseWorkerCommand(raw: string): {
738
12
  export declare class McpWorkerRuntime {
739
13
  #private;
740
14
  constructor(directory?: string, sessionId?: string, defaultBackend?: string | undefined, nativeWorkspaceMcp?: boolean, nativeHistory?: boolean);
15
+ /** Mount the stdio sibling with the same worker ownership as the native host command. */
16
+ nativeServer(root: string): {
17
+ command: string;
18
+ args: string[];
19
+ env: {
20
+ PBOT_HOST: string;
21
+ PBOT_WORKSPACE_ROOT: string;
22
+ PBOT_MCP_AGENT_DIR: string;
23
+ PBOT_MCP_SESSION_ID: string;
24
+ PBOT_NATIVE_WORKSPACE_MCP: string;
25
+ PBOT_NATIVE_HISTORY: string;
26
+ };
27
+ } | undefined;
741
28
  get nativeWorkspaceMcp(): boolean;
742
29
  get nativeHistory(): boolean;
743
30
  private resolveBackend;
744
31
  private resolveWorkspace;
745
- private workspace;
32
+ private workerService;
746
33
  toolDefinitions(): Promise<({
747
- name: string;
34
+ name: "worker_create";
748
35
  description: string;
749
36
  annotations: {
750
37
  title: string;
@@ -790,7 +77,7 @@ export declare class McpWorkerRuntime {
790
77
  };
791
78
  };
792
79
  } | {
793
- name: string;
80
+ name: "worker_close";
794
81
  description: string;
795
82
  annotations: {
796
83
  title: string;
@@ -827,7 +114,7 @@ export declare class McpWorkerRuntime {
827
114
  };
828
115
  };
829
116
  } | {
830
- name: string;
117
+ name: "worker_request";
831
118
  description: string;
832
119
  annotations: {
833
120
  title: string;
@@ -872,7 +159,7 @@ export declare class McpWorkerRuntime {
872
159
  };
873
160
  };
874
161
  } | {
875
- name: string;
162
+ name: "worker_response";
876
163
  description: string;
877
164
  annotations: {
878
165
  title: string;
@@ -928,7 +215,7 @@ export declare class McpWorkerRuntime {
928
215
  };
929
216
  };
930
217
  } | {
931
- name: string;
218
+ name: "worker_output";
932
219
  description: string;
933
220
  annotations: {
934
221
  title: string;
@@ -974,7 +261,7 @@ export declare class McpWorkerRuntime {
974
261
  };
975
262
  };
976
263
  } | {
977
- name: string;
264
+ name: "worker_discover";
978
265
  description: string;
979
266
  annotations: {
980
267
  title: string;
@@ -1021,7 +308,7 @@ export declare class McpWorkerRuntime {
1021
308
  };
1022
309
  };
1023
310
  } | {
1024
- name: string;
311
+ name: "workspace_mcp_discover";
1025
312
  description: string;
1026
313
  annotations: {
1027
314
  title: string;
@@ -1048,7 +335,7 @@ export declare class McpWorkerRuntime {
1048
335
  };
1049
336
  };
1050
337
  } | {
1051
- name: string;
338
+ name: "workspace_mcp_call";
1052
339
  description: string;
1053
340
  annotations: {
1054
341
  title: string;
@@ -1082,7 +369,7 @@ export declare class McpWorkerRuntime {
1082
369
  };
1083
370
  };
1084
371
  } | {
1085
- name: string;
372
+ name: "history_search";
1086
373
  description: string;
1087
374
  annotations: {
1088
375
  title: string;
@@ -1128,7 +415,7 @@ export declare class McpWorkerRuntime {
1128
415
  limit: {
1129
416
  type: string;
1130
417
  minimum: number;
1131
- maximum: number;
418
+ maximum: 50;
1132
419
  description: string;
1133
420
  };
1134
421
  workspace: {
@@ -1140,7 +427,7 @@ export declare class McpWorkerRuntime {
1140
427
  };
1141
428
  };
1142
429
  } | {
1143
- name: string;
430
+ name: "history_read";
1144
431
  description: string;
1145
432
  annotations: {
1146
433
  title: string;
@@ -1170,7 +457,7 @@ export declare class McpWorkerRuntime {
1170
457
  limit: {
1171
458
  type: string;
1172
459
  minimum: number;
1173
- maximum: number;
460
+ maximum: 24000;
1174
461
  description: string;
1175
462
  };
1176
463
  childrenOffset: {
@@ -1193,7 +480,7 @@ export declare class McpWorkerRuntime {
1193
480
  /** Wait until ACP handshake and model/thinking configuration finish so invalid options fail synchronously on create/resume. */
1194
481
  private waitReady;
1195
482
  private waitFor;
1196
- callTool(name: string, rawArgs: unknown, progress?: ProgressReporter): Promise<unknown>;
483
+ callTool(toolName: string, input: unknown, progress?: ProgressReporter): Promise<unknown>;
1197
484
  close(preserve?: boolean): Promise<void>;
1198
485
  }
1199
486
  export declare function handleMcpRequest(runtime: McpWorkerRuntime, message: unknown, notify?: (notification: Record<string, unknown>) => void): Promise<Record<string, unknown> | null>;