pi-subagents 0.76.0 → 0.77.0

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 (347) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/README.md +1 -1
  3. package/agents/oracle.md +8 -19
  4. package/agents/researcher.md +0 -3
  5. package/agents/reviewer.md +17 -61
  6. package/agents/scout.md +1 -4
  7. package/agents/worker.md +8 -25
  8. package/docs/agents.md +70 -3
  9. package/docs/configuration.md +55 -6
  10. package/docs/extension-api.md +36 -11
  11. package/docs/missions.md +24 -17
  12. package/docs/models.md +1 -1
  13. package/docs/observability.md +10 -5
  14. package/docs/tool-reference.md +101 -83
  15. package/docs/watchdog.md +8 -6
  16. package/docs/workflows.md +15 -6
  17. package/index.d.ts.map +1 -1
  18. package/index.js +5 -0
  19. package/index.js.map +1 -1
  20. package/package.json +2 -1
  21. package/prompts/council.md +1 -1
  22. package/skills/pi-subagents/SKILL.md +1 -1
  23. package/skills/pi-subagents/references/constraints-and-recipes.md +1 -1
  24. package/skills/pi-subagents/references/execution-controls.md +16 -16
  25. package/skills/pi-subagents/references/management-authoring-rpc.md +16 -12
  26. package/skills/pi-subagents/references/prompting-and-roles.md +3 -3
  27. package/src/agents/advertised-agent-prompt.d.ts +5 -1
  28. package/src/agents/advertised-agent-prompt.d.ts.map +1 -1
  29. package/src/agents/advertised-agent-prompt.js +8 -2
  30. package/src/agents/advertised-agent-prompt.js.map +1 -1
  31. package/src/agents/agent-management.d.ts.map +1 -1
  32. package/src/agents/agent-management.js +5 -0
  33. package/src/agents/agent-management.js.map +1 -1
  34. package/src/agents/agent-scope.d.ts +1 -0
  35. package/src/agents/agent-scope.d.ts.map +1 -1
  36. package/src/agents/agent-scope.js +3 -0
  37. package/src/agents/agent-scope.js.map +1 -1
  38. package/src/agents/agent-serializer.d.ts.map +1 -1
  39. package/src/agents/agent-serializer.js +3 -0
  40. package/src/agents/agent-serializer.js.map +1 -1
  41. package/src/agents/agents.d.ts +14 -2
  42. package/src/agents/agents.d.ts.map +1 -1
  43. package/src/agents/agents.js +94 -36
  44. package/src/agents/agents.js.map +1 -1
  45. package/src/api/preflight.d.ts +2 -0
  46. package/src/api/preflight.d.ts.map +1 -1
  47. package/src/api/preflight.js +6 -2
  48. package/src/api/preflight.js.map +1 -1
  49. package/src/extension/config.d.ts.map +1 -1
  50. package/src/extension/config.js +23 -2
  51. package/src/extension/config.js.map +1 -1
  52. package/src/extension/control-notices.d.ts +0 -2
  53. package/src/extension/control-notices.d.ts.map +1 -1
  54. package/src/extension/control-notices.js +1 -7
  55. package/src/extension/control-notices.js.map +1 -1
  56. package/src/extension/declaration-pinning.d.ts +14 -0
  57. package/src/extension/declaration-pinning.d.ts.map +1 -0
  58. package/src/extension/declaration-pinning.js +147 -0
  59. package/src/extension/declaration-pinning.js.map +1 -0
  60. package/src/extension/doctor.d.ts +3 -1
  61. package/src/extension/doctor.d.ts.map +1 -1
  62. package/src/extension/doctor.js +3 -9
  63. package/src/extension/doctor.js.map +1 -1
  64. package/src/extension/fanout-child.d.ts.map +1 -1
  65. package/src/extension/fanout-child.js +6 -8
  66. package/src/extension/fanout-child.js.map +1 -1
  67. package/src/extension/index.d.ts +1 -1
  68. package/src/extension/index.d.ts.map +1 -1
  69. package/src/extension/index.js +68 -116
  70. package/src/extension/index.js.map +1 -1
  71. package/src/extension/rpc.d.ts.map +1 -1
  72. package/src/extension/rpc.js +12 -6
  73. package/src/extension/rpc.js.map +1 -1
  74. package/src/extension/schemas.d.ts +137 -1
  75. package/src/extension/schemas.d.ts.map +1 -1
  76. package/src/extension/schemas.js +22 -22
  77. package/src/extension/schemas.js.map +1 -1
  78. package/src/extension/subagent-guide.d.ts +1 -0
  79. package/src/extension/subagent-guide.d.ts.map +1 -1
  80. package/src/extension/subagent-guide.js +80 -6
  81. package/src/extension/subagent-guide.js.map +1 -1
  82. package/src/extension/subagent-options.d.ts +8 -0
  83. package/src/extension/subagent-options.d.ts.map +1 -0
  84. package/src/extension/subagent-options.js +52 -0
  85. package/src/extension/subagent-options.js.map +1 -0
  86. package/src/extension/tool-activation.d.ts.map +1 -1
  87. package/src/extension/tool-activation.js +3 -2
  88. package/src/extension/tool-activation.js.map +1 -1
  89. package/src/extension/tool-description.d.ts +4 -7
  90. package/src/extension/tool-description.d.ts.map +1 -1
  91. package/src/extension/tool-description.js +45 -59
  92. package/src/extension/tool-description.js.map +1 -1
  93. package/src/inspectors/actions.d.ts +2 -0
  94. package/src/inspectors/actions.d.ts.map +1 -1
  95. package/src/inspectors/actions.js +41 -13
  96. package/src/inspectors/actions.js.map +1 -1
  97. package/src/inspectors/plugins.d.ts.map +1 -1
  98. package/src/inspectors/plugins.js +3 -2
  99. package/src/inspectors/plugins.js.map +1 -1
  100. package/src/inspectors/tmux/actions.d.ts +26 -0
  101. package/src/inspectors/tmux/actions.d.ts.map +1 -0
  102. package/src/inspectors/tmux/actions.js +182 -0
  103. package/src/inspectors/tmux/actions.js.map +1 -0
  104. package/src/inspectors/tmux/client.d.ts +28 -0
  105. package/src/inspectors/tmux/client.d.ts.map +1 -0
  106. package/src/inspectors/tmux/client.js +65 -0
  107. package/src/inspectors/tmux/client.js.map +1 -0
  108. package/src/inspectors/tmux/plugin.d.ts +8 -0
  109. package/src/inspectors/tmux/plugin.d.ts.map +1 -0
  110. package/src/inspectors/tmux/plugin.js +15 -0
  111. package/src/inspectors/tmux/plugin.js.map +1 -0
  112. package/src/integrations/herdr-status.d.ts +0 -1
  113. package/src/integrations/herdr-status.d.ts.map +1 -1
  114. package/src/integrations/herdr-status.js +18 -52
  115. package/src/integrations/herdr-status.js.map +1 -1
  116. package/src/integrations/program-status.d.ts +31 -0
  117. package/src/integrations/program-status.d.ts.map +1 -0
  118. package/src/integrations/program-status.js +189 -0
  119. package/src/integrations/program-status.js.map +1 -0
  120. package/src/intercom/native-supervisor-channel.d.ts +1 -0
  121. package/src/intercom/native-supervisor-channel.d.ts.map +1 -1
  122. package/src/intercom/native-supervisor-channel.js +77 -3
  123. package/src/intercom/native-supervisor-channel.js.map +1 -1
  124. package/src/intercom/result-intercom.js +1 -1
  125. package/src/intercom/result-intercom.js.map +1 -1
  126. package/src/intercom/supervisor-ui.d.ts +2 -12
  127. package/src/intercom/supervisor-ui.d.ts.map +1 -1
  128. package/src/intercom/supervisor-ui.js +2 -154
  129. package/src/intercom/supervisor-ui.js.map +1 -1
  130. package/src/missions/store.d.ts.map +1 -1
  131. package/src/missions/store.js +27 -5
  132. package/src/missions/store.js.map +1 -1
  133. package/src/runs/background/async-execution.d.ts +9 -1
  134. package/src/runs/background/async-execution.d.ts.map +1 -1
  135. package/src/runs/background/async-execution.js +250 -141
  136. package/src/runs/background/async-execution.js.map +1 -1
  137. package/src/runs/background/async-job-tracker.d.ts +4 -1
  138. package/src/runs/background/async-job-tracker.d.ts.map +1 -1
  139. package/src/runs/background/async-job-tracker.js +3 -2
  140. package/src/runs/background/async-job-tracker.js.map +1 -1
  141. package/src/runs/background/async-resume.d.ts.map +1 -1
  142. package/src/runs/background/async-resume.js +6 -2
  143. package/src/runs/background/async-resume.js.map +1 -1
  144. package/src/runs/background/await-async-run.d.ts +8 -4
  145. package/src/runs/background/await-async-run.d.ts.map +1 -1
  146. package/src/runs/background/await-async-run.js +14 -8
  147. package/src/runs/background/await-async-run.js.map +1 -1
  148. package/src/runs/background/binary-bootstrap.d.ts.map +1 -1
  149. package/src/runs/background/binary-bootstrap.js +2 -1
  150. package/src/runs/background/binary-bootstrap.js.map +1 -1
  151. package/src/runs/background/chain-root-attachment.d.ts +2 -0
  152. package/src/runs/background/chain-root-attachment.d.ts.map +1 -1
  153. package/src/runs/background/chain-root-attachment.js +5 -2
  154. package/src/runs/background/chain-root-attachment.js.map +1 -1
  155. package/src/runs/background/fleet-view.js +5 -5
  156. package/src/runs/background/fleet-view.js.map +1 -1
  157. package/src/runs/background/notify.d.ts +12 -2
  158. package/src/runs/background/notify.d.ts.map +1 -1
  159. package/src/runs/background/notify.js +148 -13
  160. package/src/runs/background/notify.js.map +1 -1
  161. package/src/runs/background/result-files.d.ts +29 -0
  162. package/src/runs/background/result-files.d.ts.map +1 -1
  163. package/src/runs/background/result-files.js +104 -6
  164. package/src/runs/background/result-files.js.map +1 -1
  165. package/src/runs/background/result-watcher.d.ts.map +1 -1
  166. package/src/runs/background/result-watcher.js +60 -64
  167. package/src/runs/background/result-watcher.js.map +1 -1
  168. package/src/runs/background/resume-guidance.js +2 -2
  169. package/src/runs/background/resume-guidance.js.map +1 -1
  170. package/src/runs/background/run-child-session.d.ts.map +1 -1
  171. package/src/runs/background/run-child-session.js +2 -1
  172. package/src/runs/background/run-child-session.js.map +1 -1
  173. package/src/runs/background/run-id-resolver.d.ts.map +1 -1
  174. package/src/runs/background/run-id-resolver.js +9 -6
  175. package/src/runs/background/run-id-resolver.js.map +1 -1
  176. package/src/runs/background/run-status.d.ts.map +1 -1
  177. package/src/runs/background/run-status.js +19 -15
  178. package/src/runs/background/run-status.js.map +1 -1
  179. package/src/runs/background/runner-child-launch.d.ts.map +1 -1
  180. package/src/runs/background/runner-child-launch.js +1 -0
  181. package/src/runs/background/runner-child-launch.js.map +1 -1
  182. package/src/runs/background/runner-http-dispatcher.d.ts +3 -0
  183. package/src/runs/background/runner-http-dispatcher.d.ts.map +1 -1
  184. package/src/runs/background/runner-http-dispatcher.js +2 -0
  185. package/src/runs/background/runner-http-dispatcher.js.map +1 -1
  186. package/src/runs/background/scheduled-runs.d.ts +9 -0
  187. package/src/runs/background/scheduled-runs.d.ts.map +1 -1
  188. package/src/runs/background/scheduled-runs.js +124 -36
  189. package/src/runs/background/scheduled-runs.js.map +1 -1
  190. package/src/runs/background/subagent-runner-bootstrap.d.ts.map +1 -1
  191. package/src/runs/background/subagent-runner-bootstrap.js +5 -1
  192. package/src/runs/background/subagent-runner-bootstrap.js.map +1 -1
  193. package/src/runs/background/subagent-runner.d.ts +3 -1
  194. package/src/runs/background/subagent-runner.d.ts.map +1 -1
  195. package/src/runs/background/subagent-runner.js +15 -6
  196. package/src/runs/background/subagent-runner.js.map +1 -1
  197. package/src/runs/background/subagent-wait.d.ts +2 -0
  198. package/src/runs/background/subagent-wait.d.ts.map +1 -1
  199. package/src/runs/background/subagent-wait.js +34 -20
  200. package/src/runs/background/subagent-wait.js.map +1 -1
  201. package/src/runs/background/terminal-run-index.d.ts +1 -0
  202. package/src/runs/background/terminal-run-index.d.ts.map +1 -1
  203. package/src/runs/background/terminal-run-index.js +47 -1
  204. package/src/runs/background/terminal-run-index.js.map +1 -1
  205. package/src/runs/background/wait-tool.d.ts.map +1 -1
  206. package/src/runs/background/wait-tool.js +36 -23
  207. package/src/runs/background/wait-tool.js.map +1 -1
  208. package/src/runs/foreground/async-stop-action.d.ts +7 -1
  209. package/src/runs/foreground/async-stop-action.d.ts.map +1 -1
  210. package/src/runs/foreground/async-stop-action.js +49 -25
  211. package/src/runs/foreground/async-stop-action.js.map +1 -1
  212. package/src/runs/foreground/execution.d.ts.map +1 -1
  213. package/src/runs/foreground/execution.js +50 -24
  214. package/src/runs/foreground/execution.js.map +1 -1
  215. package/src/runs/foreground/subagent-executor.d.ts +5 -1
  216. package/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  217. package/src/runs/foreground/subagent-executor.js +174 -65
  218. package/src/runs/foreground/subagent-executor.js.map +1 -1
  219. package/src/runs/shared/child-hooks.js +6 -5
  220. package/src/runs/shared/child-hooks.js.map +1 -1
  221. package/src/runs/shared/child-launch.d.ts +2 -0
  222. package/src/runs/shared/child-launch.d.ts.map +1 -1
  223. package/src/runs/shared/child-launch.js +1 -0
  224. package/src/runs/shared/child-launch.js.map +1 -1
  225. package/src/runs/shared/child-session.d.ts +4 -0
  226. package/src/runs/shared/child-session.d.ts.map +1 -1
  227. package/src/runs/shared/child-session.js +28 -23
  228. package/src/runs/shared/child-session.js.map +1 -1
  229. package/src/runs/shared/child-tool-plan.d.ts.map +1 -1
  230. package/src/runs/shared/child-tool-plan.js +11 -10
  231. package/src/runs/shared/child-tool-plan.js.map +1 -1
  232. package/src/runs/shared/dynamic-fanout.js +1 -1
  233. package/src/runs/shared/dynamic-fanout.js.map +1 -1
  234. package/src/runs/shared/herdr-placed-run.d.ts +1 -0
  235. package/src/runs/shared/herdr-placed-run.d.ts.map +1 -1
  236. package/src/runs/shared/herdr-placed-run.js +10 -6
  237. package/src/runs/shared/herdr-placed-run.js.map +1 -1
  238. package/src/runs/shared/model-resolution-diagnostic.d.ts +10 -0
  239. package/src/runs/shared/model-resolution-diagnostic.d.ts.map +1 -1
  240. package/src/runs/shared/model-resolution-diagnostic.js +24 -0
  241. package/src/runs/shared/model-resolution-diagnostic.js.map +1 -1
  242. package/src/runs/shared/model-resolution.d.ts.map +1 -1
  243. package/src/runs/shared/model-resolution.js +29 -1
  244. package/src/runs/shared/model-resolution.js.map +1 -1
  245. package/src/runs/shared/nested-events.d.ts +2 -0
  246. package/src/runs/shared/nested-events.d.ts.map +1 -1
  247. package/src/runs/shared/nested-events.js +4 -0
  248. package/src/runs/shared/nested-events.js.map +1 -1
  249. package/src/runs/shared/parallel-handoff.js +2 -2
  250. package/src/runs/shared/parallel-handoff.js.map +1 -1
  251. package/src/runs/shared/parallel-utils.d.ts +2 -0
  252. package/src/runs/shared/parallel-utils.d.ts.map +1 -1
  253. package/src/runs/shared/parallel-utils.js.map +1 -1
  254. package/src/runs/shared/runner-launcher.d.ts +12 -0
  255. package/src/runs/shared/runner-launcher.d.ts.map +1 -0
  256. package/src/runs/shared/runner-launcher.js +25 -0
  257. package/src/runs/shared/runner-launcher.js.map +1 -0
  258. package/src/runs/shared/single-output.d.ts +20 -0
  259. package/src/runs/shared/single-output.d.ts.map +1 -1
  260. package/src/runs/shared/single-output.js +57 -0
  261. package/src/runs/shared/single-output.js.map +1 -1
  262. package/src/runs/shared/structured-output.d.ts.map +1 -1
  263. package/src/runs/shared/structured-output.js +17 -8
  264. package/src/runs/shared/structured-output.js.map +1 -1
  265. package/src/runs/shared/subagent-control.js +3 -3
  266. package/src/runs/shared/subagent-control.js.map +1 -1
  267. package/src/runs/shared/subagent-prompt-runtime.d.ts +8 -2
  268. package/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
  269. package/src/runs/shared/subagent-prompt-runtime.js +43 -20
  270. package/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
  271. package/src/runs/shared/workflow-async-child-guidance.js +1 -1
  272. package/src/runs/shared/workflow-async-child-guidance.js.map +1 -1
  273. package/src/runs/shared/worktree-cleanup-plan.js +1 -1
  274. package/src/runs/shared/worktree-cleanup-plan.js.map +1 -1
  275. package/src/shared/atomic-json.d.ts +4 -3
  276. package/src/shared/atomic-json.d.ts.map +1 -1
  277. package/src/shared/atomic-json.js +3 -1
  278. package/src/shared/atomic-json.js.map +1 -1
  279. package/src/shared/edit-distance.d.ts +5 -0
  280. package/src/shared/edit-distance.d.ts.map +1 -0
  281. package/src/shared/edit-distance.js +33 -0
  282. package/src/shared/edit-distance.js.map +1 -0
  283. package/src/shared/formatters.d.ts.map +1 -1
  284. package/src/shared/formatters.js +1 -6
  285. package/src/shared/formatters.js.map +1 -1
  286. package/src/shared/model-info.d.ts +8 -0
  287. package/src/shared/model-info.d.ts.map +1 -1
  288. package/src/shared/model-info.js +22 -0
  289. package/src/shared/model-info.js.map +1 -1
  290. package/src/shared/package-version.d.ts +3 -0
  291. package/src/shared/package-version.d.ts.map +1 -0
  292. package/src/shared/package-version.js +15 -0
  293. package/src/shared/package-version.js.map +1 -0
  294. package/src/shared/parent-wake.d.ts +18 -0
  295. package/src/shared/parent-wake.d.ts.map +1 -0
  296. package/src/shared/parent-wake.js +60 -0
  297. package/src/shared/parent-wake.js.map +1 -0
  298. package/src/shared/pruned-fork.d.ts +1 -1
  299. package/src/shared/pruned-fork.d.ts.map +1 -1
  300. package/src/shared/pruned-fork.js +6 -0
  301. package/src/shared/pruned-fork.js.map +1 -1
  302. package/src/shared/runtime-module-path.d.ts +11 -0
  303. package/src/shared/runtime-module-path.d.ts.map +1 -0
  304. package/src/shared/runtime-module-path.js +17 -0
  305. package/src/shared/runtime-module-path.js.map +1 -0
  306. package/src/shared/types.d.ts +26 -2
  307. package/src/shared/types.d.ts.map +1 -1
  308. package/src/shared/types.js +3 -0
  309. package/src/shared/types.js.map +1 -1
  310. package/src/shared/utils.d.ts.map +1 -1
  311. package/src/shared/utils.js +8 -7
  312. package/src/shared/utils.js.map +1 -1
  313. package/src/slash/slash-commands.js +3 -3
  314. package/src/slash/slash-commands.js.map +1 -1
  315. package/src/slash/subagents-admin.d.ts.map +1 -1
  316. package/src/slash/subagents-admin.js +2 -1
  317. package/src/slash/subagents-admin.js.map +1 -1
  318. package/src/tui/fleet-transcript.d.ts +2 -0
  319. package/src/tui/fleet-transcript.d.ts.map +1 -1
  320. package/src/tui/fleet-transcript.js +7 -2
  321. package/src/tui/fleet-transcript.js.map +1 -1
  322. package/src/tui/fleet.d.ts.map +1 -1
  323. package/src/tui/fleet.js +9 -4
  324. package/src/tui/fleet.js.map +1 -1
  325. package/src/tui/render.d.ts +2 -2
  326. package/src/tui/render.d.ts.map +1 -1
  327. package/src/tui/render.js +19 -17
  328. package/src/tui/render.js.map +1 -1
  329. package/src/tui/subagent-messages.d.ts +23 -0
  330. package/src/tui/subagent-messages.d.ts.map +1 -0
  331. package/src/tui/subagent-messages.js +270 -0
  332. package/src/tui/subagent-messages.js.map +1 -0
  333. package/src/watchdog/register-main.d.ts.map +1 -1
  334. package/src/watchdog/register-main.js +1 -19
  335. package/src/watchdog/register-main.js.map +1 -1
  336. package/src/watchdog/render.d.ts +2 -10
  337. package/src/watchdog/render.d.ts.map +1 -1
  338. package/src/watchdog/render.js +1 -19
  339. package/src/watchdog/render.js.map +1 -1
  340. package/src/watchdog/tool-actions.js +2 -2
  341. package/src/watchdog/tool-actions.js.map +1 -1
  342. package/src/workflows/scripted-workflow.d.ts.map +1 -1
  343. package/src/workflows/scripted-workflow.js +20 -6
  344. package/src/workflows/scripted-workflow.js.map +1 -1
  345. package/src/workflows/workflow-resources.d.ts.map +1 -1
  346. package/src/workflows/workflow-resources.js +12 -0
  347. package/src/workflows/workflow-resources.js.map +1 -1
@@ -211,19 +211,19 @@ return runs.run("correctness", { agent: "reviewer", task: "Review the current di
211
211
  ```
212
212
 
213
213
  ```typescript
214
- const run = subagent({ workflow: true, async: true, context: "fresh" })
214
+ const run = subagent({ workflow: true, async: true, options: { context: "fresh" } })
215
215
  // Continue local inspection, then later call status with the returned id.
216
216
  ```
217
217
 
218
218
  While children run, the persistent FleetView and the collapsed foreground tool-result card show live per-child detail: resolved model and thinking level, `[fresh]`/`[fork]` context, tool/token/elapsed counters, and current activity. The collapsed running card also prints the configured expand-key hint ("Press … for live detail"); expanding it shows nested children, recent tools, and recent output. Model badges appear once the child's model resolves at first attempt start. `/subagents-fleet` opens the live fleet inspector, which also has per-child controls (`s` steer, `D` stop with confirmation). When optional Herdr 0.7.5+ is available, `H` opens a raw inspector dashboard for the selected active async child; this mirrors artifacts rather than attaching to the headless child. When optional Orca progress tabs are enabled, Pi creates one passive Orca observer tab for the top-level subagent call. Parallel and chain children share that tab and write child section headers into the mirrored log instead of opening one tab per child. Pi remains authoritative for lifecycle, status, control, artifacts, and results; the Orca tab is display-only. Pi also writes passive display metadata under `.pi/subagents/views/orca/` when possible, so other surfaces can discover the observer without treating it as an owned child run. Use visual panes for confusing or long-running active async work when the human wants a dedicated surface or FleetView is insufficient, not for routine headless runs.
219
219
 
220
- Inspect async runs with `subagent({ action: "status", id: "..." })` or `subagent({ action: "status" })` for active runs. Use `subagent({ action: "status", view: "fleet" })` when supervising several active foreground/background runs and `subagent({ action: "status", id: "...", view: "transcript", index: 0 })` when you need the latest child output without digging through artifacts. If a delegated fanout child launches nested runs, the parent status view shows them as a tree and you can target a nested run directly with its nested id.
220
+ Inspect async runs with `subagent({ action: "status", id: "..." })` or `subagent({ action: "status" })` for active runs. Use `subagent({ action: "status", options: { view: "fleet" } })` when supervising several active foreground/background runs and `subagent({ action: "status", id: "...", options: { view: "transcript", index: 0 } })` when you need the latest child output without digging through artifacts. If a delegated fanout child launches nested runs, the parent status view shows them as a tree and you can target a nested run directly with its nested id.
221
221
 
222
222
  Stop a current-session top-level async run with `stop` (or `/subagents-stop`). Stopped runs finish as `stopped`/cancelled and are not resumable. For an active foreground single-subagent run, `/subagents-detach [run-id]` leaves the child running without terminating it and returns the eventual result through status/wait.
223
223
 
224
224
  ```typescript
225
225
  subagent({ action: "stop", id: "run-id" })
226
- subagent({ action: "stop", id: "run-id", childId: "child-id" })
226
+ subagent({ action: "stop", id: "run-id", options: { childId: "child-id" } })
227
227
  ```
228
228
 
229
229
  Use `childId` only for active async/workflow runs whose status snapshot shows a
@@ -237,7 +237,7 @@ Use `steer` for top-level live async guidance and `resume` after a delegated run
237
237
  ```typescript
238
238
  subagent({ action: "steer", id: "run-id", message: "Focus on the failing test." })
239
239
  subagent({ action: "resume", id: "run-id", message: "Follow up on this point." })
240
- subagent({ action: "resume", id: "run-id", index: 1, message: "Continue reviewer 2." })
240
+ subagent({ action: "resume", id: "run-id", message: "Continue reviewer 2.", options: { index: 1 } })
241
241
  subagent({ action: "resume", id: "nested-run-id", message: "Continue this nested reviewer." })
242
242
  ```
243
243
 
@@ -275,10 +275,10 @@ Schedules are durable project records under `.pi/subagents/schedules/`. They are
275
275
 
276
276
  ```typescript
277
277
  // One-shot reviewer, after a ```js workflow block with the script
278
- subagent({ action: "schedule.create", id: "evening-review", name: "Evening review", at: "+30m", workflow: true })
278
+ subagent({ action: "schedule.create", id: "evening-review", workflow: true, options: { name: "Evening review", at: "+30m" } })
279
279
 
280
280
  // Fixed recurring workflow from a script file
281
- subagent({ action: "schedule.create", id: "backlog", every: "6h", catchUp: "latest", workflow: "./.pi/workflows/backlog.js" })
281
+ subagent({ action: "schedule.create", id: "backlog", workflow: "./.pi/workflows/backlog.js", options: { every: "6h", catchUp: "latest" } })
282
282
 
283
283
  subagent({ action: "schedule.list" })
284
284
  subagent({ action: "schedule.show", id: "backlog" })
@@ -345,8 +345,8 @@ Steering supports three delivery modes via the `mode` parameter (`steer` is the
345
345
  - `mode: "auto"` — same next-safe-point delivery path as `steer`, but without the automatic pause-and-revive recovery after a missed acknowledgment.
346
346
 
347
347
  ```typescript
348
- subagent({ action: "steer", id: "abc123", mode: "follow_up", message: "After this step, also validate the config file." })
349
- subagent({ action: "steer", id: "abc123", mode: "auto", message: "Switch to the failing test now." })
348
+ subagent({ action: "steer", id: "abc123", message: "After this step, also validate the config file.", options: { mode: "follow_up" } })
349
+ subagent({ action: "steer", id: "abc123", message: "Switch to the failing test now.", options: { mode: "auto" } })
350
350
  ```
351
351
 
352
352
  For async runs, `delivered` records that the child consumed the correlated user input; foreground `delivered` records in-process transport acceptance. Neither is proof of model compliance. A live foreground follow-up acknowledgment reports `queued`, meaning Pi accepted it into its follow-up queue, not that it was delivered. The foreground transport does not provide a later correlated queued-to-delivered receipt.
@@ -384,7 +384,7 @@ GPT 5.5 main session, or the reverse). Recommendation and configuration:
384
384
  ```typescript
385
385
  subagent({ action: "watchdog.status" })
386
386
  subagent({ action: "watchdog.recommend-model" })
387
- subagent({ action: "watchdog.configure", model: "recommended", scope: "session" })
387
+ subagent({ action: "watchdog.configure", model: "recommended", options: { scope: "session" } })
388
388
  subagent({ action: "watchdog.check" })
389
389
  ```
390
390
 
@@ -426,15 +426,15 @@ Routing rule:
426
426
  Project panes run a separate Pi session from the target directory. Subagents launched inside that pane use that project's config, agents, skills, files, git state, and mission records. The pane binding lives under `<projectRoot>/.pi/subagents/project-panes/herdr.json`. When Pi runs inside Herdr, the owning pane reports compact active-work status and title suffixes, and the parent inline status counts opened project panes. Use Herdr itself or `project.status` / `project.close` for pane-level follow-up. For ordinary headless delegation to another repo, prefer explicit `cwd` first; reserve project panes for visible or persistent project ownership.
427
427
 
428
428
  ```typescript
429
- subagent({ action: "mission.create", mission: { title: "Ship auth refresh", objective: "Implement and validate refresh handling" } })
430
- subagent({ workflow: true, missionId: "<mission-id>" }) // after a ```js workflow block
431
- subagent({ workflow: true, mission: false }) // after a ```js workflow block
432
- subagent({ action: "mission.list", missionScope: "global" })
433
- subagent({ action: "mission.resolve-decision", missionId: "<mission-id>", id: "<decision-id>", summary: "Settled: ship the v2 API; no schema freeze needed." })
429
+ subagent({ action: "mission.create", options: { mission: { title: "Ship auth refresh", objective: "Implement and validate refresh handling" } } })
430
+ subagent({ workflow: true, options: { missionId: "<mission-id>" } }) // after a ```js workflow block
431
+ subagent({ workflow: true, options: { mission: false } }) // after a ```js workflow block
432
+ subagent({ action: "mission.list", options: { missionScope: "global" } })
433
+ subagent({ action: "mission.resolve-decision", id: "<decision-id>", options: { missionId: "<mission-id>", summary: "Settled: ship the v2 API; no schema freeze needed." } })
434
434
  subagent({ action: "project.open", cwd: "/path/to/other-repo", message: "Own this mission for the project and report back with receipts." })
435
435
  subagent({ action: "project.status", cwd: "/path/to/other-repo" })
436
436
  subagent({ action: "project.close", cwd: "/path/to/other-repo" })
437
- subagent({ action: "mission.close", missionId: "<mission-id>", missionStatus: "completed", summary: "Auth refresh shipped and tests pass." })
437
+ subagent({ action: "mission.close", options: { missionId: "<mission-id>", missionStatus: "completed", summary: "Auth refresh shipped and tests pass." } })
438
438
  ```
439
439
 
440
440
  ## Worktree Isolation
@@ -457,7 +457,7 @@ requires a clean git state and is mainly for intentionally parallel write
457
457
  workflows. On completion, use each child's handoff path from its
458
458
  `artifactPaths` instead of scraping combined text. Each manifest records child status and output references, full
459
459
  patch paths and stats, and whether each temporary worktree and branch was
460
- removed. The manifest is journaled immediately after managed worktree setup, before children run, so abrupt exits retain owned paths and branches for recovery. Dirty or divergent work without a successfully captured patch is preserved with a partial-cleanup warning. Permanently discard recorded preserved work with `subagent({ action: "worktree.discard", handoffPath: "<child handoff path>" })`; authority defaults to interactive confirmation and refuses headlessly, and partial results print manual Git recovery commands. If you want one writer thread and several advisory agents, prefer a
460
+ removed. The manifest is journaled immediately after managed worktree setup, before children run, so abrupt exits retain owned paths and branches for recovery. Dirty or divergent work without a successfully captured patch is preserved with a partial-cleanup warning. Permanently discard recorded preserved work with `subagent({ action: "worktree.discard", options: { handoffPath: "<child handoff path>" } })`; authority defaults to interactive confirmation and refuses headlessly, and partial results print manual Git recovery commands. If you want one writer thread and several advisory agents, prefer a
461
461
  single-writer pattern instead.
462
462
 
463
463
  Git worktrees start from tracked files, so ignored or untracked build state
@@ -35,14 +35,16 @@ subagent({ action: "refine.rollback", agent: "reviewer" })
35
35
  ```typescript
36
36
  subagent({
37
37
  action: "create",
38
- config: {
39
- name: "my-agent",
40
- package: "code-analysis",
41
- description: "Project-specific implementation helper",
42
- systemPrompt: "Your system prompt here.",
43
- systemPromptMode: "replace",
44
- model: "provider/model-id",
45
- tools: "read,grep,find,ls,bash"
38
+ options: {
39
+ config: {
40
+ name: "my-agent",
41
+ package: "code-analysis",
42
+ description: "Project-specific implementation helper",
43
+ systemPrompt: "Your system prompt here.",
44
+ systemPromptMode: "replace",
45
+ model: "provider/model-id",
46
+ tools: "read,grep,find,ls,bash"
47
+ }
46
48
  }
47
49
  })
48
50
  ```
@@ -53,8 +55,10 @@ subagent({
53
55
  subagent({
54
56
  action: "update",
55
57
  agent: "code-analysis.my-agent",
56
- config: {
57
- thinking: "high"
58
+ options: {
59
+ config: {
60
+ thinking: "high"
61
+ }
58
62
  }
59
63
  })
60
64
  ```
@@ -70,11 +74,11 @@ subagent({ action: "delete", agent: "code-analysis.my-agent" })
70
74
  ```typescript
71
75
  // Copy a bundled builtin/package agent to user scope as an editable custom file.
72
76
  subagent({ action: "eject", agent: "reviewer" })
73
- subagent({ action: "eject", agent: "reviewer", agentScope: "project" })
77
+ subagent({ action: "eject", agent: "reviewer", options: { agentScope: "project" } })
74
78
 
75
79
  // Hide an agent from runtime discovery without deleting it (reversible).
76
80
  subagent({ action: "disable", agent: "reviewer" })
77
- subagent({ action: "enable", agent: "reviewer", agentScope: "project" })
81
+ subagent({ action: "enable", agent: "reviewer", options: { agentScope: "project" } })
78
82
 
79
83
  // Delete the scope's custom agent file and/or settings override, restoring the bundled default.
80
84
  subagent({ action: "reset", agent: "reviewer" })
@@ -92,7 +92,7 @@ return results.map(result => result.output);
92
92
  ```
93
93
 
94
94
  ```typescript
95
- subagent({ workflow: true, context: "fresh" })
95
+ subagent({ workflow: true, options: { context: "fresh" } })
96
96
  ```
97
97
 
98
98
  ### Review-loop technique
@@ -166,7 +166,7 @@ return { worker: worker.output, validations: validations.map(v => v.output) };
166
166
  ```
167
167
 
168
168
  ```typescript
169
- subagent({ workflow: true, async: true, context: "fresh" })
169
+ subagent({ workflow: true, async: true, options: { context: "fresh" } })
170
170
  ```
171
171
 
172
172
  ## Builtin Agents
@@ -294,4 +294,4 @@ override can opt one builtin back in or replace custom-agent frontmatter thinkin
294
294
 
295
295
  Set `subagents.defaultExtensions` to give agents without an `extensions` field a shared child extension allowlist. Omit it to preserve ambient extension discovery, set it to `[]` to disable ambient extensions by default, or use `agentOverrides.<name>.extensions` for one agent. Set `subagents.defaultSubagentOnlyExtensions` to add shared child-only paths without disabling ambient discovery. For either field, explicit frontmatter suppresses the default and a matching override replaces or false-clears it; lists are not combined.
296
296
 
297
- Tool description modes live in `~/.pi/agent/extensions/subagent/config.json`, not `subagents` settings. The default uses split prompt metadata: a short tool description plus active `promptSnippet` and `promptGuidelines`. Set `toolDescriptionMode` to `full` or `compact` to force one description string, or `custom` to read `subagent-tool-description.md` from the project config dir or agent dir; invalid custom files fall back to full mode and the safety guidance is still appended.
297
+ Tool description modes live in `~/.pi/agent/extensions/subagent/config.json`, not `subagents` settings. The default uses a short tool description plus an active `promptSnippet`. Set `toolDescriptionMode` to `full` or `compact` to force one description string, or `custom` to read `subagent-tool-description.md` from the project config dir or agent dir; invalid custom files fall back to full mode and the safety guidance is still appended.
@@ -4,7 +4,11 @@ import type { AgentConfig } from "./agents.ts";
4
4
  * The catalog body without its `<advertised_subagents>` wrapper, for Pi's structured
5
5
  * prompt sections, which add the tag from the section key. The byte budget applies to
6
6
  * the wrapped form, so both deliveries carry the same entries.
7
+ *
8
+ * `recordedCatalog` is the body a session already sent. Its first line, the introduction,
9
+ * is kept so a release that rewords the introduction does not change the section of a
10
+ * resumed session and cost it the provider's prompt cache. The entries are always current.
7
11
  */
8
- export declare function buildAdvertisedAgentCatalog(agents: readonly AgentConfig[], capabilityCeiling?: ResolvedSubagentCapabilityCeiling): string | undefined;
12
+ export declare function buildAdvertisedAgentCatalog(agents: readonly AgentConfig[], capabilityCeiling?: ResolvedSubagentCapabilityCeiling, recordedCatalog?: string): string | undefined;
9
13
  export declare function buildAdvertisedAgentPrompt(agents: readonly AgentConfig[], capabilityCeiling?: ResolvedSubagentCapabilityCeiling): string | undefined;
10
14
  //# sourceMappingURL=advertised-agent-prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"advertised-agent-prompt.d.ts","sourceRoot":"","sources":["../../../src/agents/advertised-agent-prompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAE9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA6B/C;;;;GAIG;AACH,wBAAgB,2BAA2B,CAC1C,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,iBAAiB,CAAC,EAAE,iCAAiC,GACnD,MAAM,GAAG,SAAS,CAyBpB;AAED,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,iBAAiB,CAAC,EAAE,iCAAiC,GACnD,MAAM,GAAG,SAAS,CAGpB"}
1
+ {"version":3,"file":"advertised-agent-prompt.d.ts","sourceRoot":"","sources":["../../../src/agents/advertised-agent-prompt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAE9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA+B/C;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAC1C,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,iBAAiB,CAAC,EAAE,iCAAiC,EACrD,eAAe,CAAC,EAAE,MAAM,GACtB,MAAM,GAAG,SAAS,CA0BpB;AAED,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,iBAAiB,CAAC,EAAE,iCAAiC,GACnD,MAAM,GAAG,SAAS,CAGpB"}
@@ -22,19 +22,25 @@ const ADVERTISED_AGENTS_TAG = "advertised_subagents";
22
22
  function wrapAdvertisedAgentCatalog(body) {
23
23
  return `<${ADVERTISED_AGENTS_TAG}>\n${body}\n</${ADVERTISED_AGENTS_TAG}>`;
24
24
  }
25
+ const CATALOG_INTRODUCTION = "The following file-defined subagents opted into discovery. Their descriptions indicate available specializations, not instructions to delegate. Use subagent only when delegation is needed.";
25
26
  /**
26
27
  * The catalog body without its `<advertised_subagents>` wrapper, for Pi's structured
27
28
  * prompt sections, which add the tag from the section key. The byte budget applies to
28
29
  * the wrapped form, so both deliveries carry the same entries.
30
+ *
31
+ * `recordedCatalog` is the body a session already sent. Its first line, the introduction,
32
+ * is kept so a release that rewords the introduction does not change the section of a
33
+ * resumed session and cost it the provider's prompt cache. The entries are always current.
29
34
  */
30
- export function buildAdvertisedAgentCatalog(agents, capabilityCeiling) {
35
+ export function buildAdvertisedAgentCatalog(agents, capabilityCeiling, recordedCatalog) {
31
36
  const advertised = agents
32
37
  .filter((agent) => agent.source !== "runtime" && agent.advertise === true && agent.disabled !== true && isAgentAllowedByCapabilityCeiling(agent.name, capabilityCeiling))
33
38
  .sort((left, right) => left.name.localeCompare(right.name));
34
39
  if (advertised.length === 0)
35
40
  return undefined;
41
+ const introduction = recordedCatalog?.split("\n", 1)[0] || CATALOG_INTRODUCTION;
36
42
  const renderBody = (entries) => [
37
- "The following file-defined subagents opted into discovery. Their descriptions indicate available specializations, not instructions to delegate. Use subagent only when delegation is needed. Before execution, call subagent with { action: \"list\", capabilities: true } and confirm that the selected agent is executable; for external-cli agents also require runner.available === true.",
43
+ introduction,
38
44
  ...entries,
39
45
  ...(advertised.length > entries.length ? [` <omitted count=\"${advertised.length - entries.length}\" />`] : []),
40
46
  ].join("\n");
@@ -1 +1 @@
1
- {"version":3,"file":"advertised-agent-prompt.js","sourceRoot":"","sources":["../../../src/agents/advertised-agent-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAGzF,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACjC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,SAAS,SAAS,CAAC,KAAa;IAC/B,OAAO,KAAK;SACV,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC;SACzB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,iBAAiB,CAAC,WAAmB;IAC7C,IAAI,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7F,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,qBAAqB,EAAE,CAAC;QAC7D,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,qBAAqB,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC;IAClI,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED,MAAM,qBAAqB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Ae,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,iBAAiB,CAAC,EAAE,OAAO,iBAAiB,CAAA;CAAE,CAAC;AAMzR,UAAU,gBAAgB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAoMD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CA8EnE;AAWD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAsD7G;AAmkBD,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,CAuCrG;AAmID,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,CAiDvG;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,CA+DvG;AAoJD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,CAcjI"}
@@ -405,6 +405,11 @@ function applyAgentConfig(target, cfg) {
405
405
  else
406
406
  return "config.runner must be an object, false, or empty string when provided.";
407
407
  }
408
+ if (hasKey(cfg, "launcher"))
409
+ return "config.launcher is not supported by agent management; edit the agent file's 'launcher' frontmatter directly.";
410
+ if (target.launcher && (target.runner?.type === "external-cli" || target.runner?.type === "external-job")) {
411
+ return `config.runner type '${target.runner.type}' cannot be combined with this agent's 'launcher' frontmatter.`;
412
+ }
408
413
  if (hasKey(cfg, "model")) {
409
414
  if (cfg.model === false || cfg.model === "")
410
415
  delete target.model;