@ashx-j/lunr 0.2.11 → 0.2.13

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 (342) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +211 -236
  3. package/dist/builtin-extensions/ashxj-tui.d.ts +3 -0
  4. package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
  5. package/dist/builtin-extensions/ashxj-tui.js +28 -11
  6. package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
  7. package/dist/builtin-extensions/index.d.ts.map +1 -1
  8. package/dist/builtin-extensions/index.js +0 -2
  9. package/dist/builtin-extensions/index.js.map +1 -1
  10. package/dist/builtin-extensions/lunr-cron.d.ts +1 -1
  11. package/dist/builtin-extensions/lunr-cron.d.ts.map +1 -1
  12. package/dist/builtin-extensions/lunr-cron.js +1 -1
  13. package/dist/builtin-extensions/lunr-cron.js.map +1 -1
  14. package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.d.ts.map +1 -1
  15. package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.js +3 -3
  16. package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.js.map +1 -1
  17. package/dist/builtin-extensions/pi-subagents/src/extension/doctor.d.ts +0 -2
  18. package/dist/builtin-extensions/pi-subagents/src/extension/doctor.d.ts.map +1 -1
  19. package/dist/builtin-extensions/pi-subagents/src/extension/doctor.js +1 -23
  20. package/dist/builtin-extensions/pi-subagents/src/extension/doctor.js.map +1 -1
  21. package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.d.ts.map +1 -1
  22. package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js +6 -7
  23. package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js.map +1 -1
  24. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +1 -1
  25. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  26. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +7 -14
  27. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  28. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts +12 -9
  29. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
  30. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +38 -34
  31. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
  32. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +3 -3
  33. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
  34. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +32 -47
  35. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
  36. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts +2 -2
  37. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
  38. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
  39. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +7 -10
  40. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
  41. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +90 -109
  42. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
  43. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts +3 -2
  44. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -1
  45. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js +37 -50
  46. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js.map +1 -1
  47. package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.d.ts.map +1 -1
  48. package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.js +1 -1
  49. package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.js.map +1 -1
  50. package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.d.ts +4 -0
  51. package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.d.ts.map +1 -1
  52. package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.js +5 -5
  53. package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.js.map +1 -1
  54. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
  55. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +31 -13
  56. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
  57. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.d.ts +2 -2
  58. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.d.ts.map +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.js.map +1 -1
  60. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts +4 -3
  61. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
  62. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +48 -20
  63. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
  64. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts +2 -2
  65. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
  66. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +90 -64
  67. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
  68. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts +6 -8
  69. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  70. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +262 -161
  71. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
  72. package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts +2 -1
  73. package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts.map +1 -1
  74. package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js +24 -33
  75. package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js.map +1 -1
  76. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +25 -0
  77. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -0
  78. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +51 -0
  79. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -0
  80. package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.d.ts.map +1 -1
  81. package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.js +20 -3
  82. package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.js.map +1 -1
  83. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +4 -1
  84. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
  85. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
  86. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +5 -0
  87. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
  88. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +9 -3
  89. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
  90. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
  91. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +2 -2
  92. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
  93. package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts +2 -2
  94. package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts.map +1 -1
  95. package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js +20 -17
  96. package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js.map +1 -1
  97. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts +70 -0
  98. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -0
  99. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +153 -0
  100. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -0
  101. package/dist/builtin-extensions/pi-subagents/src/shared/settings.d.ts +13 -8
  102. package/dist/builtin-extensions/pi-subagents/src/shared/settings.d.ts.map +1 -1
  103. package/dist/builtin-extensions/pi-subagents/src/shared/settings.js +20 -51
  104. package/dist/builtin-extensions/pi-subagents/src/shared/settings.js.map +1 -1
  105. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +80 -20
  106. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
  107. package/dist/builtin-extensions/pi-subagents/src/shared/types.js +10 -2
  108. package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
  109. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +2 -2
  110. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
  111. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +20 -32
  112. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
  113. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +2 -1
  114. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
  115. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +23 -449
  116. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
  117. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
  118. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  119. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +13 -11
  120. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  121. package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.d.ts +2 -1
  122. package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.d.ts.map +1 -1
  123. package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.js +18 -17
  124. package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.js.map +1 -1
  125. package/dist/builtin-extensions/simple-pi-memory.d.ts +2 -2
  126. package/dist/builtin-extensions/simple-pi-memory.d.ts.map +1 -1
  127. package/dist/builtin-extensions/simple-pi-memory.js +41 -17
  128. package/dist/builtin-extensions/simple-pi-memory.js.map +1 -1
  129. package/dist/catalog/models.json +1 -1
  130. package/dist/catalog/providers/amazon-bedrock.json +1 -1
  131. package/dist/catalog/providers/azure-openai-responses.json +1 -1
  132. package/dist/catalog/providers/cloudflare-ai-gateway.json +1 -1
  133. package/dist/catalog/providers/cloudflare-workers-ai.json +1 -1
  134. package/dist/catalog/providers/fireworks.json +1 -1
  135. package/dist/catalog/providers/github-copilot.json +1 -1
  136. package/dist/catalog/providers/huggingface.json +1 -1
  137. package/dist/catalog/providers/minimax-cn.json +1 -1
  138. package/dist/catalog/providers/minimax.json +1 -1
  139. package/dist/catalog/providers/mistral.json +1 -1
  140. package/dist/catalog/providers/nvidia.json +1 -1
  141. package/dist/catalog/providers/openai.json +1 -1
  142. package/dist/catalog/providers/opencode-go.json +1 -1
  143. package/dist/catalog/providers/opencode.json +1 -1
  144. package/dist/catalog/providers/openrouter.json +1 -1
  145. package/dist/catalog/providers/qwen-cloud-cn.json +1 -1
  146. package/dist/catalog/providers/qwen-cloud.json +1 -1
  147. package/dist/catalog/providers/qwen-token-plan-cn.json +1 -1
  148. package/dist/catalog/providers/qwen-token-plan.json +1 -1
  149. package/dist/catalog/providers/together.json +1 -1
  150. package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
  151. package/dist/catalog/providers/zai-coding-cn.json +1 -1
  152. package/dist/catalog/providers/zai.json +1 -1
  153. package/dist/catalog/publication.json +3 -3
  154. package/dist/core/agent-session.d.ts +7 -1
  155. package/dist/core/agent-session.d.ts.map +1 -1
  156. package/dist/core/agent-session.js +34 -4
  157. package/dist/core/agent-session.js.map +1 -1
  158. package/dist/core/context-breakdown.d.ts +3 -1
  159. package/dist/core/context-breakdown.d.ts.map +1 -1
  160. package/dist/core/context-breakdown.js +5 -2
  161. package/dist/core/context-breakdown.js.map +1 -1
  162. package/dist/core/customize.d.ts +2 -0
  163. package/dist/core/customize.d.ts.map +1 -1
  164. package/dist/core/customize.js +6 -0
  165. package/dist/core/customize.js.map +1 -1
  166. package/dist/core/memory-cap.d.ts +4 -8
  167. package/dist/core/memory-cap.d.ts.map +1 -1
  168. package/dist/core/memory-cap.js +8 -8
  169. package/dist/core/memory-cap.js.map +1 -1
  170. package/dist/core/permissions.d.ts +2 -0
  171. package/dist/core/permissions.d.ts.map +1 -1
  172. package/dist/core/permissions.js +30 -14
  173. package/dist/core/permissions.js.map +1 -1
  174. package/dist/core/plan-mode.d.ts.map +1 -1
  175. package/dist/core/plan-mode.js +1 -9
  176. package/dist/core/plan-mode.js.map +1 -1
  177. package/dist/core/rollback.d.ts.map +1 -1
  178. package/dist/core/rollback.js +1 -1
  179. package/dist/core/rollback.js.map +1 -1
  180. package/dist/core/settings-manager.d.ts +16 -5
  181. package/dist/core/settings-manager.d.ts.map +1 -1
  182. package/dist/core/settings-manager.js +37 -10
  183. package/dist/core/settings-manager.js.map +1 -1
  184. package/dist/core/slash-commands.d.ts.map +1 -1
  185. package/dist/core/slash-commands.js +1 -5
  186. package/dist/core/slash-commands.js.map +1 -1
  187. package/dist/core/subagent-permission-inherit.d.ts +34 -22
  188. package/dist/core/subagent-permission-inherit.d.ts.map +1 -1
  189. package/dist/core/subagent-permission-inherit.js +37 -80
  190. package/dist/core/subagent-permission-inherit.js.map +1 -1
  191. package/dist/core/swarm.d.ts.map +1 -1
  192. package/dist/core/swarm.js +13 -7
  193. package/dist/core/swarm.js.map +1 -1
  194. package/dist/core/system-prompt.d.ts +6 -4
  195. package/dist/core/system-prompt.d.ts.map +1 -1
  196. package/dist/core/system-prompt.js +38 -48
  197. package/dist/core/system-prompt.js.map +1 -1
  198. package/dist/core/usage-adapters/openai-codex.d.ts +1 -1
  199. package/dist/core/usage-adapters/openai-codex.d.ts.map +1 -1
  200. package/dist/core/usage-adapters/openai-codex.js +22 -17
  201. package/dist/core/usage-adapters/openai-codex.js.map +1 -1
  202. package/dist/core/usage-service.d.ts +10 -1
  203. package/dist/core/usage-service.d.ts.map +1 -1
  204. package/dist/core/usage-service.js +17 -6
  205. package/dist/core/usage-service.js.map +1 -1
  206. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  207. package/dist/gateway/agent-bridge.js +1 -4
  208. package/dist/gateway/agent-bridge.js.map +1 -1
  209. package/dist/gateway/cron.d.ts.map +1 -1
  210. package/dist/gateway/cron.js +1 -4
  211. package/dist/gateway/cron.js.map +1 -1
  212. package/dist/index.d.ts +1 -1
  213. package/dist/index.d.ts.map +1 -1
  214. package/dist/index.js.map +1 -1
  215. package/dist/main.d.ts.map +1 -1
  216. package/dist/main.js +0 -5
  217. package/dist/main.js.map +1 -1
  218. package/dist/migrations.d.ts +2 -0
  219. package/dist/migrations.d.ts.map +1 -1
  220. package/dist/migrations.js +21 -0
  221. package/dist/migrations.js.map +1 -1
  222. package/dist/modes/interactive/components/settings-selector.d.ts +7 -4
  223. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  224. package/dist/modes/interactive/components/settings-selector.js +122 -162
  225. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  226. package/dist/modes/interactive/components/usage-view.d.ts +1 -1
  227. package/dist/modes/interactive/components/usage-view.d.ts.map +1 -1
  228. package/dist/modes/interactive/components/usage-view.js +7 -4
  229. package/dist/modes/interactive/components/usage-view.js.map +1 -1
  230. package/dist/modes/interactive/interactive-mode.d.ts +1 -2
  231. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  232. package/dist/modes/interactive/interactive-mode.js +55 -96
  233. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  234. package/dist/modes/interactive/skill-tag-autocomplete.d.ts +13 -0
  235. package/dist/modes/interactive/skill-tag-autocomplete.d.ts.map +1 -0
  236. package/dist/modes/interactive/skill-tag-autocomplete.js +72 -0
  237. package/dist/modes/interactive/skill-tag-autocomplete.js.map +1 -0
  238. package/docs/compaction.md +23 -23
  239. package/docs/containerization.md +24 -24
  240. package/docs/custom-provider.md +18 -18
  241. package/docs/development.md +16 -15
  242. package/docs/docs.json +6 -2
  243. package/docs/extensions.md +82 -80
  244. package/docs/features.md +102 -0
  245. package/docs/index.md +25 -19
  246. package/docs/json.md +7 -7
  247. package/docs/keybindings.md +4 -4
  248. package/docs/models.md +2 -2
  249. package/docs/packages.md +38 -42
  250. package/docs/prompt-templates.md +4 -4
  251. package/docs/providers.md +22 -10
  252. package/docs/quickstart.md +81 -46
  253. package/docs/rpc.md +7 -13
  254. package/docs/sdk.md +43 -41
  255. package/docs/security.md +18 -18
  256. package/docs/session-format.md +9 -9
  257. package/docs/sessions.md +13 -12
  258. package/docs/settings.md +63 -24
  259. package/docs/shell-aliases.md +2 -2
  260. package/docs/skills.md +21 -11
  261. package/docs/terminal-setup.md +5 -5
  262. package/docs/termux.md +7 -7
  263. package/docs/themes.md +12 -14
  264. package/docs/tmux.md +4 -4
  265. package/docs/tui.md +23 -23
  266. package/docs/usage.md +112 -87
  267. package/docs/windows.md +10 -2
  268. package/examples/README.md +3 -1
  269. package/examples/extensions/README.md +6 -6
  270. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  271. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  272. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  273. package/examples/extensions/doom-overlay/README.md +2 -2
  274. package/examples/extensions/gondolin/package-lock.json +2 -2
  275. package/examples/extensions/gondolin/package.json +1 -1
  276. package/examples/extensions/plan-mode/README.md +3 -1
  277. package/examples/extensions/sandbox/package-lock.json +2 -2
  278. package/examples/extensions/sandbox/package.json +1 -1
  279. package/examples/extensions/subagent/README.md +13 -11
  280. package/examples/extensions/todo.ts +2 -1
  281. package/examples/extensions/with-deps/package-lock.json +2 -2
  282. package/examples/extensions/with-deps/package.json +1 -1
  283. package/examples/sdk/README.md +9 -5
  284. package/package.json +6 -7
  285. package/dist/builtin-extensions/lunr-behavior.d.ts +0 -44
  286. package/dist/builtin-extensions/lunr-behavior.d.ts.map +0 -1
  287. package/dist/builtin-extensions/lunr-behavior.js +0 -213
  288. package/dist/builtin-extensions/lunr-behavior.js.map +0 -1
  289. package/dist/builtin-extensions/pi-subagents/agents/context-builder.md +0 -46
  290. package/dist/builtin-extensions/pi-subagents/agents/deep-researcher.md +0 -36
  291. package/dist/builtin-extensions/pi-subagents/agents/delegate.md +0 -12
  292. package/dist/builtin-extensions/pi-subagents/agents/oracle.md +0 -73
  293. package/dist/builtin-extensions/pi-subagents/agents/planner.md +0 -55
  294. package/dist/builtin-extensions/pi-subagents/agents/research-writer.md +0 -37
  295. package/dist/builtin-extensions/pi-subagents/agents/researcher.md +0 -52
  296. package/dist/builtin-extensions/pi-subagents/agents/reviewer.md +0 -79
  297. package/dist/builtin-extensions/pi-subagents/agents/scout.md +0 -50
  298. package/dist/builtin-extensions/pi-subagents/agents/worker.md +0 -55
  299. package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.d.ts +0 -20
  300. package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.d.ts.map +0 -1
  301. package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.js +0 -1273
  302. package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.js.map +0 -1
  303. package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.d.ts +0 -49
  304. package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.d.ts.map +0 -1
  305. package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.js +0 -252
  306. package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.js.map +0 -1
  307. package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.d.ts +0 -3
  308. package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.d.ts.map +0 -1
  309. package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.js +0 -6
  310. package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.js.map +0 -1
  311. package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.d.ts +0 -3
  312. package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.d.ts.map +0 -1
  313. package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.js +0 -23
  314. package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.js.map +0 -1
  315. package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.d.ts +0 -8
  316. package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.d.ts.map +0 -1
  317. package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.js +0 -143
  318. package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.js.map +0 -1
  319. package/dist/builtin-extensions/pi-subagents/src/agents/agents.d.ts +0 -176
  320. package/dist/builtin-extensions/pi-subagents/src/agents/agents.d.ts.map +0 -1
  321. package/dist/builtin-extensions/pi-subagents/src/agents/agents.js +0 -1326
  322. package/dist/builtin-extensions/pi-subagents/src/agents/agents.js.map +0 -1
  323. package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.d.ts +0 -7
  324. package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.d.ts.map +0 -1
  325. package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.js +0 -307
  326. package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.js.map +0 -1
  327. package/dist/builtin-extensions/pi-subagents/src/agents/identity.d.ts +0 -8
  328. package/dist/builtin-extensions/pi-subagents/src/agents/identity.d.ts.map +0 -1
  329. package/dist/builtin-extensions/pi-subagents/src/agents/identity.js +0 -30
  330. package/dist/builtin-extensions/pi-subagents/src/agents/identity.js.map +0 -1
  331. package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.d.ts +0 -35
  332. package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.d.ts.map +0 -1
  333. package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.js +0 -151
  334. package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.js.map +0 -1
  335. package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.d.ts +0 -131
  336. package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.d.ts.map +0 -1
  337. package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.js +0 -491
  338. package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.js.map +0 -1
  339. package/dist/core/behavior-preset.d.ts +0 -60
  340. package/dist/core/behavior-preset.d.ts.map +0 -1
  341. package/dist/core/behavior-preset.js +0 -257
  342. package/dist/core/behavior-preset.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/builtin-extensions/pi-subagents/src/extension/schemas.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,SAAS,iCAAiC,CAAI,MAAS,EAAK;IAC3D,OAAO,uBAAuB,CAAC,MAAM,EAAE,EAAE,CAAM,CAAC;AAAA,CAChD;AAED,SAAS,uBAAuB,CAAC,KAAc,EAAE,IAAc,EAAW;IACzE,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAEtD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,M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6J;KAC1K,CAAC,CAAC;IACH,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,WAAW,EAAE,+LAA+L;KAC5M,CAAC,CAAC;IACH,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;QACrC,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,kHAAkH;KAC/H,CAAC,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,iCAAiC,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["// @ts-nocheck\n/**\n * TypeBox schemas for subagent tool parameters\n */\n\nimport { Type } from \"typebox\";\n\nfunction keepTopLevelParameterDescriptions<T>(schema: T): T {\n\treturn pruneNestedDescriptions(schema, []) as T;\n}\n\nfunction pruneNestedDescriptions(value: unknown, path: string[]): unknown {\n\tif (!value || typeof value !== \"object\") return value;\n\n\tconst result = Array.isArray(value) ? [] : Object.create(Object.getPrototypeOf(value));\n\tfor (const key of Reflect.ownKeys(value)) {\n\t\tconst descriptor = Object.getOwnPropertyDescriptor(value, key);\n\t\tif (!descriptor) continue;\n\t\tif (key === \"description\" && !isTopLevelParameterDescription(path)) continue;\n\t\tif (\"value\" in descriptor) {\n\t\t\tconst nextPath = typeof key === \"string\" ? [...path, key] : path;\n\t\t\tdescriptor.value = pruneNestedDescriptions(descriptor.value, nextPath);\n\t\t}\n\t\tObject.defineProperty(result, key, descriptor);\n\t}\n\treturn result;\n}\n\nfunction isTopLevelParameterDescription(path: string[]): boolean {\n\treturn path.length === 2 && path[0] === \"properties\";\n}\n\nconst SkillOverride = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"array\", items: { type: \"string\" } },\n\t\t{ type: \"boolean\" },\n\t\t{ type: \"string\" },\n\t],\n\tdescription: \"Skill name(s) to make available (comma-separated), array of strings, or boolean (false disables, true uses default)\",\n});\n\nconst OutputOverride = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"string\" },\n\t\t{ type: \"boolean\" },\n\t],\n\tdescription: \"Output filename/path (string), or false to disable file output\",\n});\n\nconst OutputModeOverride = Type.String({\n\tenum: [\"inline\", \"file-only\"],\n\tdescription: \"Return saved output inline (default) or only a concise file reference. file-only requires output to be a path.\",\n});\n\n// lunr: model tier override for 3-tier subagent routing; resolved through the\n// @lunr/model-tiers bridge and ignored when tier mode is disabled.\nconst TierOverride = Type.String({\n\tenum: [\"light\", \"standard\", \"heavy\"],\n\tdescription: \"Model tier ('light' cheap/fast, 'standard' typical, 'heavy' complex reasoning) when model tiers are enabled. An explicit model overrides the tier; omit both to inherit the parent model.\",\n});\n\nconst ReadsOverride = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"array\", items: { type: \"string\" } },\n\t\t{ type: \"boolean\" },\n\t],\n\tdescription: \"Files to read before running (array of filenames), or false to disable\",\n});\n\nconst JsonSchemaObject = Type.Unsafe({\n\ttype: \"object\",\n\tadditionalProperties: true,\n\tdescription: \"JSON Schema object for strict structured output. Non-object roots are rejected.\",\n});\n\nconst AcceptanceOverride = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"string\", enum: [\"auto\", \"attested\", \"checked\", \"verified\", \"reviewed\"] },\n\t\t{ type: \"boolean\", enum: [false] },\n\t\t{ type: \"object\", additionalProperties: true },\n\t],\n\tdescription: \"Optional acceptance policy. Omitted means auto-inferred; verified requires configured runtime commands. Reviewed is inferred-only because explicit runs cannot supply an independent reviewer result. Bare \\\"none\\\" requires { level: \\\"none\\\", reason: \\\"...\\\" }, while false is deprecated.\",\n});\n\nconst TurnBudgetOverride = Type.Object({\n\tmaxTurns: Type.Integer({ minimum: 1 }),\n\tgraceTurns: Type.Optional(Type.Integer({ minimum: 0 })),\n}, { additionalProperties: false, description: \"Optional assistant-turn budget. At maxTurns the child is asked to wrap up; after graceTurns additional assistant turns it is aborted and partial output is returned.\" });\n\nconst ToolBudgetBlock = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"array\", minItems: 1, items: { type: \"string\", minLength: 1 } },\n\t\t{ type: \"string\", enum: [\"*\"] },\n\t],\n});\n\nconst ToolBudgetOverride = Type.Object({\n\tsoft: Type.Optional(Type.Integer({ minimum: 1 })),\n\thard: Type.Integer({ minimum: 1 }),\n\tblock: Type.Optional(ToolBudgetBlock),\n}, { additionalProperties: false, description: \"Optional child tool-call budget. soft nudges the child; after hard, block tools (default read/grep/find/ls, or '*' for all tools) are blocked so the child can finalize.\" });\n\nconst TaskItem = Type.Object({\n\tagent: Type.String(), \n\ttask: Type.String(), \n\tcwd: Type.Optional(Type.String()),\n\tcount: Type.Optional(Type.Integer({ minimum: 1, description: \"Repeat this parallel task N times with the same settings.\" })),\n\toutput: Type.Optional(OutputOverride),\n\toutputMode: Type.Optional(OutputModeOverride),\n\treads: Type.Optional(ReadsOverride),\n\tprogress: Type.Optional(Type.Boolean({ description: \"Enable progress.md tracking for this task\" })),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for this task (e.g. 'google/gemini-3-pro')\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\tskill: Type.Optional(SkillOverride),\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tacceptance: Type.Optional(AcceptanceOverride),\n});\n\n// Parallel task item (within a parallel step)\nexport const ParallelTaskSchema = Type.Object({\n\tagent: Type.String(),\n\ttask: Type.Optional(Type.String({ description: \"Task template with {task}, {previous}, {chain_dir} variables. Defaults to {previous}.\" })),\n\tphase: Type.Optional(Type.String({ description: \"Optional phase/group label for status and graph rendering.\" })),\n\tlabel: Type.Optional(Type.String({ description: \"Optional user-facing label for this parallel task.\" })),\n\tas: Type.Optional(Type.String({ description: \"Optional safe identifier used as {outputs.name} in later chain steps.\" })),\n\toutputSchema: Type.Optional(JsonSchemaObject),\n\tcwd: Type.Optional(Type.String()),\n\tcount: Type.Optional(Type.Integer({ minimum: 1, description: \"Repeat this parallel task N times with the same settings.\" })),\n\toutput: Type.Optional(OutputOverride),\n\toutputMode: Type.Optional(OutputModeOverride),\n\treads: Type.Optional(ReadsOverride),\n\tprogress: Type.Optional(Type.Boolean({ description: \"Enable progress.md tracking in {chain_dir}\" })),\n\tskill: Type.Optional(SkillOverride),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for this task\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tacceptance: Type.Optional(AcceptanceOverride),\n});\n\nexport const DynamicExpandSchema = Type.Object({\n\tfrom: Type.Object({\n\t\toutput: Type.String({ description: \"Prior named structured output to expand from.\" }),\n\t\tpath: Type.String({ description: \"JSON Pointer into the structured output, e.g. /items.\" }),\n\t}, { additionalProperties: false }),\n\titem: Type.Optional(Type.String({ description: \"Template variable name for each item. Defaults to item.\" })),\n\tkey: Type.Optional(Type.String({ description: \"JSON Pointer relative to each item for stable child ids.\" })),\n\tmaxItems: Type.Optional(Type.Integer({ minimum: 0, description: \"Required fanout bound unless configured globally.\" })),\n\tonEmpty: Type.Optional(Type.String({ enum: [\"skip\", \"fail\"], description: \"Empty input behavior. Defaults to skip.\" })),\n}, { additionalProperties: false });\n\nexport const DynamicParallelTemplateSchema = Type.Object({\n\tagent: Type.String(),\n\ttask: Type.Optional(Type.String({ description: \"Task template with {item}, {item.path}, {task}, {previous}, {chain_dir}, and {outputs.name} variables.\" })),\n\tphase: Type.Optional(Type.String({ description: \"Optional phase/group label for status and graph rendering.\" })),\n\tlabel: Type.Optional(Type.String({ description: \"Optional user-facing label; item templates are supported.\" })),\n\toutputSchema: Type.Optional(JsonSchemaObject),\n\tcwd: Type.Optional(Type.String()),\n\toutput: Type.Optional(OutputOverride),\n\toutputMode: Type.Optional(OutputModeOverride),\n\treads: Type.Optional(ReadsOverride),\n\tprogress: Type.Optional(Type.Boolean({ description: \"Enable progress.md tracking in {chain_dir}\" })),\n\tskill: Type.Optional(SkillOverride),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for this task\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tacceptance: Type.Optional(AcceptanceOverride),\n}, { additionalProperties: false });\n\nexport const DynamicCollectSchema = Type.Object({\n\tas: Type.String({ description: \"Safe output name for the ordered collected result array.\" }),\n\toutputSchema: Type.Optional(JsonSchemaObject),\n}, { additionalProperties: false });\n\n// Flattened so chain steps do not need an object-shape anyOf/oneOf union.\nexport const ChainItem = Type.Object({\n\tagent: Type.Optional(Type.String({ description: \"Sequential step agent name\" })),\n\ttask: Type.Optional(Type.String({\n\t\tdescription: \"Task template with variables: {task}=original request, {previous}=prior step's text response, {chain_dir}=shared folder, {outputs.name}=prior named output. Required for first step, defaults to '{previous}' for subsequent steps.\"\n\t})),\n\tphase: Type.Optional(Type.String({ description: \"Optional phase/group label for status and graph rendering.\" })),\n\tlabel: Type.Optional(Type.String({ description: \"Optional user-facing label for this chain step.\" })),\n\tas: Type.Optional(Type.String({ description: \"Optional safe identifier used as {outputs.name} in later chain steps.\" })),\n\toutputSchema: Type.Optional(JsonSchemaObject),\n\tcwd: Type.Optional(Type.String()),\n\toutput: Type.Optional(OutputOverride),\n\toutputMode: Type.Optional(OutputModeOverride),\n\treads: Type.Optional(ReadsOverride),\n\tprogress: Type.Optional(Type.Boolean({ description: \"Enable progress.md tracking in {chain_dir}\" })),\n\tskill: Type.Optional(SkillOverride),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for this step\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tacceptance: Type.Optional(AcceptanceOverride),\n\tparallel: Type.Optional(Type.Unsafe({\n\t\tanyOf: [\n\t\t\tType.Array(ParallelTaskSchema, { minItems: 1, description: \"Tasks to run in parallel\" }),\n\t\t\tDynamicParallelTemplateSchema,\n\t\t],\n\t\tdescription: \"Static parallel tasks array, or a single dynamic fanout child template when expand/collect are present.\",\n\t})),\n\texpand: Type.Optional(DynamicExpandSchema),\n\tcollect: Type.Optional(DynamicCollectSchema),\n\tconcurrency: Type.Optional(Type.Number({ description: \"Max concurrent tasks (default: unlimited)\" })),\n\tfailFast: Type.Optional(Type.Boolean({ description: \"Stop on first failure (default: false)\" })),\n\tworktree: Type.Optional(Type.Boolean({\n\t\tdescription: \"Create isolated git worktrees for each parallel task.\"\n\t})),\n}, {\n\tdescription: \"Chain step: use {agent, task?, ...} for sequential, {parallel: [...]} for static concurrent execution, or {expand, parallel: {...}, collect} for dynamic fanout.\",\n\tadditionalProperties: false,\n});\n\nconst ControlOverrides = Type.Object({\n\tenabled: Type.Optional(Type.Boolean({ description: \"Enable/disable subagent control attention tracking for this run\" })),\n\tneedsAttentionAfterMs: Type.Optional(Type.Integer({ minimum: 1, description: \"No-observed-activity window before a run needs attention\" })),\n\tactiveNoticeAfterMs: Type.Optional(Type.Integer({ minimum: 1, description: \"Active-long-running notice threshold by elapsed ms (default: 240000)\" })),\n\tactiveNoticeAfterTurns: Type.Optional(Type.Integer({ minimum: 1, description: \"Optional active-long-running notice threshold by assistant turns (disabled by default)\" })),\n\tactiveNoticeAfterTokens: Type.Optional(Type.Integer({ minimum: 1, description: \"Optional active-long-running notice threshold by total tokens (disabled by default)\" })),\n\tfailedToolAttemptsBeforeAttention: Type.Optional(Type.Integer({ minimum: 1, description: \"Consecutive mutating-tool failures before escalating to needs_attention (default: 3)\" })),\n\tnotifyOn: Type.Optional(Type.Array(Type.String({ enum: [\"active_long_running\", \"needs_attention\"] }), {\n\t\tdescription: \"Control event types that should notify the parent/orchestrator. Defaults to active_long_running and needs_attention.\",\n\t})),\n\tnotifyChannels: Type.Optional(Type.Array(Type.String({ enum: [\"event\", \"async\", \"intercom\"] }), {\n\t\tdescription: \"Notification channels to use when available. Defaults to event, async, and intercom.\",\n\t})),\n});\n\nconst SubagentParamsSchema = Type.Object({\n\tagent: Type.Optional(Type.String({ description: \"Agent name (SINGLE mode) or target for management get/update/delete\" })),\n\ttask: Type.Optional(Type.String({ description: \"Task (SINGLE mode, optional for self-contained agents)\" })),\n\t// Management action (when present, tool operates in management mode)\n\taction: Type.Optional(Type.String({\n\t\tdescription: \"Management/control action only. Must be omitted for execution mode (single, parallel, or chain).\"\n\t})),\n\tid: Type.Optional(Type.String({\n\t\tdescription: \"Run id or prefix for action='status', action='interrupt', action='stop', action='resume', action='steer', or action='append-step'.\"\n\t})),\n\trunId: Type.Optional(Type.String({\n\t\tdescription: \"Target run ID for action='interrupt', action='stop', action='resume', action='steer', or action='append-step'. Prefer id for new calls.\"\n\t})),\n\tdir: Type.Optional(Type.String({\n\t\tdescription: \"Async run directory for action='status', action='stop', action='resume', or action='steer'.\"\n\t})),\n\tindex: Type.Optional(Type.Integer({ minimum: 0, description: \"Zero-based child index for actions that target a specific child or transcript.\" })),\n\tview: Type.Optional(Type.String({\n\t\tenum: [\"fleet\", \"transcript\"],\n\t\tdescription: \"Optional status view. Use view='fleet' for a read-only active foreground/async fleet surface, or view='transcript' with id/dir (and optional index) to tail a run transcript.\",\n\t})),\n\tlines: Type.Optional(Type.Integer({ minimum: 1, maximum: 500, description: \"Maximum transcript lines for action='status', view='transcript'. Defaults to 80.\" })),\n\tmessage: Type.Optional(Type.String({ description: \"Follow-up message for action='resume' or non-terminal guidance for action='steer'. Use index to choose a child from multi-child runs.\" })),\n\tscope: Type.Optional(Type.String({ enum: [\"session\", \"user\", \"project\"], description: \"Scope for action='watchdog.configure'. Defaults to session to avoid persistent settings writes unless user/project is explicit.\" })),\n\ttarget: Type.Optional(Type.String({ enum: [\"main\", \"children\", \"child\"], description: \"Target for action='watchdog.configure'. Defaults to main. Use target='child' with agent for a per-agent child watchdog override.\" })),\n\tthinking: Type.Optional(Type.Unsafe({ anyOf: [{ type: \"string\" }, { type: \"boolean\", enum: [false] }], description: \"Thinking level for action='watchdog.configure' (off/minimal/low/medium/high/xhigh/max, inherit, or false for off).\" })),\n\tschedule: Type.Optional(Type.String({ description: \"Explicit one-shot schedule for action='schedule'. Only honored when scheduledRuns.enabled is true. Use '+10m' or a future ISO timestamp with timezone; scheduled runs always launch async with fresh context.\" })),\n\tscheduleName: Type.Optional(Type.String({ description: \"Optional display name for action='schedule'.\" })),\n\t// Chain identifier for management (can't reuse 'chain' — that's the execution array)\n\tchainName: Type.Optional(Type.String({\n\t\tdescription: \"Chain name for get/update/delete management actions\"\n\t})),\n\t// Agent/chain configuration for create/update (nested to avoid conflicts with execution fields)\n\tconfig: Type.Optional(Type.Unsafe({\n\t\tanyOf: [\n\t\t\t{ type: \"object\", additionalProperties: true },\n\t\t\t{ type: \"string\" },\n\t\t],\n\t\tdescription: \"Agent/chain config for create/update. Object or JSON string; presence of steps creates a chain.\"\n\t})),\n\ttasks: Type.Optional(Type.Array(TaskItem, { description: \"PARALLEL mode: [{agent, task, count?, output?, outputMode?, reads?, progress?}, ...]\" })),\n\tconcurrency: Type.Optional(Type.Integer({ minimum: 1, description: \"Top-level PARALLEL mode only: max concurrent tasks. Defaults to config.parallel.concurrency or unlimited.\" })),\n\tworktree: Type.Optional(Type.Boolean({\n\t\tdescription: \"Create isolated git worktrees for parallel tasks; requires clean git state.\"\n\t})),\n\tchain: Type.Optional(Type.Array(ChainItem, { description: \"CHAIN mode: sequential steps; each result becomes {previous}. append-step takes one tail step and may use {chain_dir}/{outputs.name}.\" })),\n\tcontext: Type.Optional(Type.String({\n\t\tenum: [\"fresh\"],\n\t\tdescription: \"Children always start with a fresh session. Fork context is not available.\",\n\t})),\n\tchainDir: Type.Optional(Type.String({ description: \"Persistent chain artifact directory; defaults to user-scoped temp storage.\" })),\n\tasync: Type.Optional(Type.Boolean({ description: \"Run in background (default: false, or per config)\" })),\n\ttimeoutMs: Type.Optional(Type.Integer({ minimum: 1, description: \"Optional run-level timeout in ms for foreground and async/background runs. Alias of maxRuntimeMs.\" })),\n\tmaxRuntimeMs: Type.Optional(Type.Integer({ minimum: 1, description: \"Alias of timeoutMs for optional run-level timeout in foreground and async/background runs.\" })),\n\tturnBudget: Type.Optional(TurnBudgetOverride),\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tagentScope: Type.Optional(Type.String({ description: \"Agent discovery scope: 'user', 'project', or 'both' (default: 'both'; project wins on name collisions)\" })),\n\tcwd: Type.Optional(Type.String()),\n\tartifacts: Type.Optional(Type.Boolean({ description: \"Write debug artifacts (default: true)\" })),\n\tincludeProgress: Type.Optional(Type.Boolean({ description: \"Include full progress in result (default: false)\" })),\n\tshare: Type.Optional(Type.Boolean({ description: \"Upload session to GitHub Gist for sharing (default: false)\" })),\n\tsessionDir: Type.Optional(\n\t\tType.String({ description: \"Directory to store session logs (default: temp; enables sessions even if share=false)\" }),\n\t),\n\t// Clarification TUI\n\tclarify: Type.Optional(Type.Boolean({ description: \"Show TUI to preview/edit before execution. Explicit clarify: true keeps the run foreground for the clarify UI; omitted clarify can still run in the background when async: true is set.\" })),\n\tcontrol: Type.Optional(ControlOverrides),\n\t// Solo agent overrides\n\toutput: Type.Optional(Type.Unsafe({\n\t\tanyOf: [\n\t\t\t{ type: \"string\" },\n\t\t\t{ type: \"boolean\" },\n\t\t],\n\t\tdescription: \"Output file for single agent (string), or false to disable. Relative paths resolve against cwd.\",\n\t})),\n\toutputMode: Type.Optional(OutputModeOverride),\n\tskill: Type.Optional(SkillOverride),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for single agent (e.g. 'anthropic/claude-sonnet-4')\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\tacceptance: Type.Optional(AcceptanceOverride),\n});\n\nexport const SubagentParams = keepTopLevelParameterDescriptions(SubagentParamsSchema);\n\nconst SubagentWaitParamsSchema = Type.Object({\n\tid: Type.Optional(Type.String({\n\t\tdescription: \"Async run or remembered detached foreground run id/prefix to wait for one specific run. Omit to wait across every active async run started in this session.\",\n\t})),\n\tall: Type.Optional(Type.Boolean({\n\t\tdescription: \"Wait for ALL active runs to finish. Default false: return as soon as the first run finishes, so a fleet manager can spawn a replacement and wait again. Ignored when id targets a single run.\",\n\t})),\n\ttimeoutMs: Type.Optional(Type.Integer({\n\t\tminimum: 1,\n\t\tdescription: \"Give up waiting after this many milliseconds (the runs keep going regardless). Defaults to 1800000 (30 minutes).\",\n\t})),\n});\n\nexport const SubagentWaitParams = keepTopLevelParameterDescriptions(SubagentWaitParamsSchema);\n"]}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/builtin-extensions/pi-subagents/src/extension/schemas.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,SAAS,iCAAiC,CAAI,MAAS,EAAK;IAC3D,OAAO,uBAAuB,CAAC,MAAM,EAAE,EAAE,CAAM,CAAC;AAAA,CAChD;AAED,SAAS,uBAAuB,CAAC,KAAc,EAAE,IAAc,EAAW;IACzE,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAEtD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IACvF,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1C,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU;YAAE,SAAS;QAC1B,IAAI,GAAG,KAAK,aAAa,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC;YAAE,SAAS;QAC7E,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;YAC3B,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACjE,UAAU,CAAC,KAAK,GA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T): T {\n\treturn pruneNestedDescriptions(schema, []) as T;\n}\n\nfunction pruneNestedDescriptions(value: unknown, path: string[]): unknown {\n\tif (!value || typeof value !== \"object\") return value;\n\n\tconst result = Array.isArray(value) ? [] : Object.create(Object.getPrototypeOf(value));\n\tfor (const key of Reflect.ownKeys(value)) {\n\t\tconst descriptor = Object.getOwnPropertyDescriptor(value, key);\n\t\tif (!descriptor) continue;\n\t\tif (key === \"description\" && !isTopLevelParameterDescription(path)) continue;\n\t\tif (\"value\" in descriptor) {\n\t\t\tconst nextPath = typeof key === \"string\" ? [...path, key] : path;\n\t\t\tdescriptor.value = pruneNestedDescriptions(descriptor.value, nextPath);\n\t\t}\n\t\tObject.defineProperty(result, key, descriptor);\n\t}\n\treturn result;\n}\n\nfunction isTopLevelParameterDescription(path: string[]): boolean {\n\treturn path.length === 2 && path[0] === \"properties\";\n}\n\nconst SkillOverride = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"array\", items: { type: \"string\" } },\n\t\t{ type: \"boolean\", enum: [false] },\n\t\t{ type: \"string\" },\n\t],\n\tdescription: \"Skill name(s) to make available (comma-separated), array of strings, or false to disable\",\n});\n\nconst OutputOverride = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"string\" },\n\t\t{ type: \"boolean\", enum: [false] },\n\t],\n\tdescription: \"Output filename/path (string), or false to disable file output\",\n});\n\nconst OutputModeOverride = Type.String({\n\tenum: [\"inline\", \"file-only\"],\n\tdescription: \"Return saved output inline (default) or only a concise file reference. file-only requires output to be a path.\",\n});\n\n// lunr: model tier override for 3-tier subagent routing; resolved through the\n// @lunr/model-tiers bridge and ignored when tier mode is disabled.\nconst TierOverride = Type.String({\n\tenum: [\"light\", \"standard\", \"heavy\"],\n\tdescription: \"Model tier ('light' cheap/fast, 'standard' typical, 'heavy' complex reasoning) when model tiers are enabled. An explicit model overrides the tier; omit both to inherit the parent model.\",\n});\n\nconst ReadsOverride = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"array\", items: { type: \"string\" } },\n\t\t{ type: \"boolean\", enum: [false] },\n\t],\n\tdescription: \"Files to read before running (array of filenames), or false to disable\",\n});\n\nconst JsonSchemaObject = Type.Unsafe({\n\ttype: \"object\",\n\tadditionalProperties: true,\n\tdescription: \"JSON Schema object for strict structured output. Non-object roots are rejected.\",\n});\n\nconst AcceptanceOverride = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"string\", enum: [\"auto\", \"attested\", \"checked\", \"verified\", \"reviewed\"] },\n\t\t{ type: \"boolean\", enum: [false] },\n\t\t{ type: \"object\", additionalProperties: true },\n\t],\n\tdescription: \"Optional acceptance policy. Omitted means auto-inferred; verified requires configured runtime commands. Reviewed is inferred-only because explicit runs cannot supply an independent reviewer result. Bare \\\"none\\\" requires { level: \\\"none\\\", reason: \\\"...\\\" }, while false is deprecated.\",\n});\n\nconst TurnBudgetOverride = Type.Object({\n\tmaxTurns: Type.Integer({ minimum: 1 }),\n\tgraceTurns: Type.Optional(Type.Integer({ minimum: 0 })),\n}, { additionalProperties: false, description: \"Optional assistant-turn budget. At maxTurns the child is asked to wrap up; after graceTurns additional assistant turns it is aborted and partial output is returned.\" });\n\nconst ToolBudgetBlock = Type.Unsafe({\n\tanyOf: [\n\t\t{ type: \"array\", minItems: 1, items: { type: \"string\", minLength: 1 } },\n\t\t{ type: \"string\", enum: [\"*\"] },\n\t],\n});\n\nconst ToolBudgetOverride = Type.Object({\n\tsoft: Type.Optional(Type.Integer({ minimum: 1 })),\n\thard: Type.Integer({ minimum: 1 }),\n\tblock: Type.Optional(ToolBudgetBlock),\n}, { additionalProperties: false, description: \"Optional child tool-call budget. soft nudges the child; after hard, block tools (default read/grep/find/ls, or '*' for all tools) are blocked so the child can finalize.\" });\n\nconst DescriptionField = Type.String({\n\tminLength: 1,\n\tmaxLength: 80,\n\tdescription: \"Required concise single-line UI label (max 80 characters). Presentation metadata only; not used as an identifier.\",\n});\n\nconst PermissionsField = Type.Optional(Type.String({\n\tenum: [\"full\", \"read-only\"],\n\tdescription: \"Child permission level. Omit or 'full' for coding tools (read/search/shell/edit/write/web/LSP/MCP). 'read-only' inspects without edit/write. Plan-mode parents must pass 'read-only'.\",\n}));\n\nconst TaskItem = Type.Object({\n\ttask: Type.String({ description: \"Complete model-authored prompt sent to the child.\" }),\n\tdescription: DescriptionField,\n\tpermissions: PermissionsField,\n\tcwd: Type.Optional(Type.String()),\n\tcount: Type.Optional(Type.Integer({ minimum: 1, description: \"Repeat this parallel task N times with the same settings.\" })),\n\toutput: Type.Optional(OutputOverride),\n\toutputMode: Type.Optional(OutputModeOverride),\n\treads: Type.Optional(ReadsOverride),\n\tprogress: Type.Optional(Type.Boolean({ description: \"Enable progress.md tracking for this task\" })),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for this task (e.g. 'google/gemini-3-pro')\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\tskill: Type.Optional(SkillOverride),\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tacceptance: Type.Optional(AcceptanceOverride),\n});\n\n// Parallel task item (within a parallel step)\nexport const ParallelTaskSchema = Type.Object({\n\ttask: Type.Optional(Type.String({ description: \"Task template with {task}, {previous}, {chain_dir} variables. Defaults to {previous}.\" })),\n\tdescription: DescriptionField,\n\tpermissions: PermissionsField,\n\tphase: Type.Optional(Type.String({ description: \"Optional phase/group label for status and graph rendering.\" })),\n\tlabel: Type.Optional(Type.String({ description: \"Optional user-facing label for this parallel task.\" })),\n\tas: Type.Optional(Type.String({ description: \"Optional safe identifier used as {outputs.name} in later chain steps.\" })),\n\toutputSchema: Type.Optional(JsonSchemaObject),\n\tcwd: Type.Optional(Type.String()),\n\tcount: Type.Optional(Type.Integer({ minimum: 1, description: \"Repeat this parallel task N times with the same settings.\" })),\n\toutput: Type.Optional(OutputOverride),\n\toutputMode: Type.Optional(OutputModeOverride),\n\treads: Type.Optional(ReadsOverride),\n\tprogress: Type.Optional(Type.Boolean({ description: \"Enable progress.md tracking in {chain_dir}\" })),\n\tskill: Type.Optional(SkillOverride),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for this task\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tacceptance: Type.Optional(AcceptanceOverride),\n});\n\nexport const DynamicExpandSchema = Type.Object({\n\tfrom: Type.Object({\n\t\toutput: Type.String({ description: \"Prior named structured output to expand from.\" }),\n\t\tpath: Type.String({ description: \"JSON Pointer into the structured output, e.g. /items.\" }),\n\t}, { additionalProperties: false }),\n\titem: Type.Optional(Type.String({ description: \"Template variable name for each item. Defaults to item.\" })),\n\tkey: Type.Optional(Type.String({ description: \"JSON Pointer relative to each item for stable child ids.\" })),\n\tmaxItems: Type.Optional(Type.Integer({ minimum: 0, description: \"Required fanout bound unless configured globally.\" })),\n\tonEmpty: Type.Optional(Type.String({ enum: [\"skip\", \"fail\"], description: \"Empty input behavior. Defaults to skip.\" })),\n}, { additionalProperties: false });\n\nexport const DynamicParallelTemplateSchema = Type.Object({\n\ttask: Type.Optional(Type.String({ description: \"Task template with {item}, {item.path}, {task}, {previous}, {chain_dir}, and {outputs.name} variables.\" })),\n\tdescription: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: 80,\n\t\tdescription: \"Required concise single-line UI label. May use the same template variables as task. Maximum 80 characters.\",\n\t}),\n\tpermissions: PermissionsField,\n\tphase: Type.Optional(Type.String({ description: \"Optional phase/group label for status and graph rendering.\" })),\n\tlabel: Type.Optional(Type.String({ description: \"Optional user-facing label; item templates are supported.\" })),\n\toutputSchema: Type.Optional(JsonSchemaObject),\n\tcwd: Type.Optional(Type.String()),\n\toutput: Type.Optional(OutputOverride),\n\toutputMode: Type.Optional(OutputModeOverride),\n\treads: Type.Optional(ReadsOverride),\n\tprogress: Type.Optional(Type.Boolean({ description: \"Enable progress.md tracking in {chain_dir}\" })),\n\tskill: Type.Optional(SkillOverride),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for this task\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tacceptance: Type.Optional(AcceptanceOverride),\n}, { additionalProperties: false });\n\nexport const DynamicCollectSchema = Type.Object({\n\tas: Type.String({ description: \"Safe output name for the ordered collected result array.\" }),\n\toutputSchema: Type.Optional(JsonSchemaObject),\n}, { additionalProperties: false });\n\n// Flattened so chain steps do not need an object-shape anyOf/oneOf union.\nexport const ChainItem = Type.Object({\n\ttask: Type.Optional(Type.String({\n\t\tdescription: \"Task template with variables: {task}=original request, {previous}=prior step's text response, {chain_dir}=shared folder, {outputs.name}=prior named output. Required for first sequential step, defaults to '{previous}' for subsequent steps.\"\n\t})),\n\tdescription: Type.Optional(DescriptionField),\n\tpermissions: PermissionsField,\n\tphase: Type.Optional(Type.String({ description: \"Optional phase/group label for status and graph rendering.\" })),\n\tlabel: Type.Optional(Type.String({ description: \"Optional user-facing label for this chain step.\" })),\n\tas: Type.Optional(Type.String({ description: \"Optional safe identifier used as {outputs.name} in later chain steps.\" })),\n\toutputSchema: Type.Optional(JsonSchemaObject),\n\tcwd: Type.Optional(Type.String()),\n\toutput: Type.Optional(OutputOverride),\n\toutputMode: Type.Optional(OutputModeOverride),\n\treads: Type.Optional(ReadsOverride),\n\tprogress: Type.Optional(Type.Boolean({ description: \"Enable progress.md tracking in {chain_dir}\" })),\n\tskill: Type.Optional(SkillOverride),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for this step\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tacceptance: Type.Optional(AcceptanceOverride),\n\tparallel: Type.Optional(Type.Unsafe({\n\t\tanyOf: [\n\t\t\tType.Array(ParallelTaskSchema, { minItems: 1, description: \"Tasks to run in parallel\" }),\n\t\t\tDynamicParallelTemplateSchema,\n\t\t],\n\t\tdescription: \"Static parallel tasks array, or a single dynamic fanout child template when expand/collect are present.\",\n\t})),\n\texpand: Type.Optional(DynamicExpandSchema),\n\tcollect: Type.Optional(DynamicCollectSchema),\n\tconcurrency: Type.Optional(Type.Number({ description: \"Max concurrent tasks (default: unlimited)\" })),\n\tfailFast: Type.Optional(Type.Boolean({ description: \"Stop on first failure (default: false)\" })),\n\tworktree: Type.Optional(Type.Boolean({\n\t\tdescription: \"Create isolated git worktrees for each parallel task.\"\n\t})),\n}, {\n\tdescription: \"Chain step: use {task, description, permissions?} for sequential, {parallel: [...]} for static concurrent execution, or {expand, parallel: {...}, collect} for dynamic fanout.\",\n\tadditionalProperties: false,\n});\n\nconst ControlOverrides = Type.Object({\n\tenabled: Type.Optional(Type.Boolean({ description: \"Enable/disable subagent control attention tracking for this run\" })),\n\tneedsAttentionAfterMs: Type.Optional(Type.Integer({ minimum: 1, description: \"No-observed-activity window before a run needs attention\" })),\n\tactiveNoticeAfterMs: Type.Optional(Type.Integer({ minimum: 1, description: \"Active-long-running notice threshold by elapsed ms (default: 240000)\" })),\n\tactiveNoticeAfterTurns: Type.Optional(Type.Integer({ minimum: 1, description: \"Optional active-long-running notice threshold by assistant turns (disabled by default)\" })),\n\tactiveNoticeAfterTokens: Type.Optional(Type.Integer({ minimum: 1, description: \"Optional active-long-running notice threshold by total tokens (disabled by default)\" })),\n\tfailedToolAttemptsBeforeAttention: Type.Optional(Type.Integer({ minimum: 1, description: \"Consecutive mutating-tool failures before escalating to needs_attention (default: 3)\" })),\n\tnotifyOn: Type.Optional(Type.Array(Type.String({ enum: [\"active_long_running\", \"needs_attention\"] }), {\n\t\tdescription: \"Control event types that should notify the parent/orchestrator. Defaults to active_long_running and needs_attention.\",\n\t})),\n\tnotifyChannels: Type.Optional(Type.Array(Type.String({ enum: [\"event\", \"async\", \"intercom\"] }), {\n\t\tdescription: \"Notification channels to use when available. Defaults to event, async, and intercom.\",\n\t})),\n});\n\nconst SubagentParamsSchema = Type.Object({\n\ttask: Type.Optional(Type.String({ description: \"Complete model-authored prompt sent to the child (SINGLE mode).\" })),\n\tdescription: Type.Optional(DescriptionField),\n\tpermissions: PermissionsField,\n\t// Control action (when present, tool operates in control mode rather than execution)\n\taction: Type.Optional(Type.String({\n\t\tdescription: \"Control action only. Must be omitted for execution mode (single, parallel, or chain). Runtime: status, interrupt, stop, resume, steer, append-step, doctor, watchdog.*, schedule*.\",\n\t})),\n\tid: Type.Optional(Type.String({\n\t\tdescription: \"Run id or prefix for action='status', action='interrupt', action='stop', action='resume', action='steer', or action='append-step'.\"\n\t})),\n\trunId: Type.Optional(Type.String({\n\t\tdescription: \"Target run ID for action='interrupt', action='stop', action='resume', action='steer', or action='append-step'. Prefer id for new calls.\"\n\t})),\n\tdir: Type.Optional(Type.String({\n\t\tdescription: \"Async run directory for action='status', action='stop', action='resume', or action='steer'.\"\n\t})),\n\tindex: Type.Optional(Type.Integer({ minimum: 0, description: \"Zero-based child index for actions that target a specific child or transcript.\" })),\n\tview: Type.Optional(Type.String({\n\t\tenum: [\"fleet\", \"transcript\"],\n\t\tdescription: \"Optional status view. Use view='fleet' for a read-only active foreground/async fleet surface, or view='transcript' with id/dir (and optional index) to tail a run transcript.\",\n\t})),\n\tlines: Type.Optional(Type.Integer({ minimum: 1, maximum: 500, description: \"Maximum transcript lines for action='status', view='transcript'. Defaults to 80.\" })),\n\tmessage: Type.Optional(Type.String({ description: \"Follow-up message for action='resume' or non-terminal guidance for action='steer'. Use index to choose a child from multi-child runs.\" })),\n\tscope: Type.Optional(Type.String({ enum: [\"session\", \"user\", \"project\"], description: \"Scope for action='watchdog.configure'. Defaults to session to avoid persistent settings writes unless user/project is explicit.\" })),\n\ttarget: Type.Optional(Type.String({ enum: [\"main\", \"children\"], description: \"Target for action='watchdog.configure'. Defaults to main.\" })),\n\tthinking: Type.Optional(Type.Unsafe({ anyOf: [{ type: \"string\" }, { type: \"boolean\", enum: [false] }], description: \"Thinking level for action='watchdog.configure' (off/minimal/low/medium/high/xhigh/max, inherit, or false for off).\" })),\n\tschedule: Type.Optional(Type.String({ description: \"Explicit one-shot schedule for action='schedule'. Only honored when scheduledRuns.enabled is true. Use '+10m' or a future ISO timestamp with timezone; scheduled runs always launch async with fresh context.\" })),\n\tscheduleName: Type.Optional(Type.String({ description: \"Optional display name for action='schedule'.\" })),\n\ttasks: Type.Optional(Type.Array(TaskItem, { description: \"PARALLEL mode: [{task, description, permissions?, count?, output?, outputMode?, reads?, progress?}, ...]\" })),\n\tconcurrency: Type.Optional(Type.Integer({ minimum: 1, description: \"Top-level PARALLEL mode only: max concurrent tasks. Defaults to config.parallel.concurrency or unlimited.\" })),\n\tworktree: Type.Optional(Type.Boolean({\n\t\tdescription: \"Create isolated git worktrees for parallel tasks; requires clean git state.\"\n\t})),\n\tchain: Type.Optional(Type.Array(ChainItem, { description: \"CHAIN mode: sequential steps; each result becomes {previous}. append-step takes one tail step and may use {chain_dir}/{outputs.name}.\" })),\n\tcontext: Type.Optional(Type.String({\n\t\tenum: [\"fresh\"],\n\t\tdescription: \"Children always start with a fresh session. Fork context is not available.\",\n\t})),\n\tchainDir: Type.Optional(Type.String({ description: \"Persistent chain artifact directory; defaults to user-scoped temp storage.\" })),\n\tasync: Type.Optional(Type.Boolean({ description: \"Run in background (default: false, or per config)\" })),\n\ttimeoutMs: Type.Optional(Type.Integer({ minimum: 1, description: \"Optional run-level timeout in ms for foreground and async/background runs. Alias of maxRuntimeMs.\" })),\n\tmaxRuntimeMs: Type.Optional(Type.Integer({ minimum: 1, description: \"Alias of timeoutMs for optional run-level timeout in foreground and async/background runs.\" })),\n\tturnBudget: Type.Optional(TurnBudgetOverride),\n\ttoolBudget: Type.Optional(ToolBudgetOverride),\n\tcwd: Type.Optional(Type.String()),\n\tartifacts: Type.Optional(Type.Boolean({ description: \"Write debug artifacts (default: true)\" })),\n\tincludeProgress: Type.Optional(Type.Boolean({ description: \"Include full progress in result (default: false)\" })),\n\tshare: Type.Optional(Type.Boolean({ description: \"Upload session to GitHub Gist for sharing (default: false)\" })),\n\tsessionDir: Type.Optional(\n\t\tType.String({ description: \"Directory to store session logs (default: temp; enables sessions even if share=false)\" }),\n\t),\n\t// Clarification TUI\n\tclarify: Type.Optional(Type.Boolean({ description: \"Show TUI to preview/edit before execution. Explicit clarify: true keeps the run foreground for the clarify UI; omitted clarify can still run in the background when async: true is set.\" })),\n\tcontrol: Type.Optional(ControlOverrides),\n\toutput: Type.Optional(Type.Unsafe({\n\t\tanyOf: [\n\t\t\t{ type: \"string\" },\n\t\t\t{ type: \"boolean\", enum: [false] },\n\t\t],\n\t\tdescription: \"Output file for a single child (string), or false to disable. Relative paths resolve against cwd.\",\n\t})),\n\toutputMode: Type.Optional(OutputModeOverride),\n\tskill: Type.Optional(SkillOverride),\n\tmodel: Type.Optional(Type.String({ description: \"Override model for a single child (e.g. 'anthropic/claude-sonnet-4')\" })),\n\ttier: Type.Optional(TierOverride), // lunr: model tiers\n\tacceptance: Type.Optional(AcceptanceOverride),\n});\n\nexport const SubagentParams = keepTopLevelParameterDescriptions(SubagentParamsSchema);\n\nconst SubagentWaitParamsSchema = Type.Object({\n\tid: Type.Optional(Type.String({\n\t\tdescription: \"Async run or remembered detached foreground run id/prefix to wait for one specific run. Omit to wait across every active async run started in this session.\",\n\t})),\n\tall: Type.Optional(Type.Boolean({\n\t\tdescription: \"Wait for ALL active runs to finish. Default false: return as soon as the first run finishes, so a fleet manager can spawn a replacement and wait again. Ignored when id targets a single run.\",\n\t})),\n\ttimeoutMs: Type.Optional(Type.Integer({\n\t\tminimum: 1,\n\t\tdescription: \"Give up waiting after this many milliseconds (the runs keep going regardless). Defaults to 1800000 (30 minutes).\",\n\t})),\n});\n\nexport const SubagentWaitParams = keepTopLevelParameterDescriptions(SubagentWaitParamsSchema);\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { ExtensionConfig, ToolDescriptionMode } from "../shared/types.ts";
2
- export declare const SUBAGENT_SAFETY_GUIDANCE = "SAFETY-CRITICAL SUBAGENT GUIDANCE:\n\u2022 Use { action: \"list\" } before execution and only run executable/non-disabled agents or chains.\n\u2022 Keep execution and management separate: omit action for SINGLE/PARALLEL/CHAIN execution; use action only for list/get/models/create/update/delete/status/interrupt/stop/resume/append-step/doctor.\n\u2022 Async/background runs: launch with async:true only when work can proceed independently. Do not sleep or poll status just to wait. In an interactive session, normally return control and let Pi wake you; use subagent_wait when this request must run to completion in the current turn or skill. Headless sessions auto-drain current-session work.\n\u2022 Child-safety boundary: ordinary child subagents are not orchestrators and must not run subagents. Only explicitly configured fanout children may use the child-safe subagent tool, still bounded by depth/session limits.\n\u2022 Writing/review safety: keep one writer for the same cwd/worktree. Use fresh-context read-only reviewers/validators for independent review, then have the parent synthesize and apply fixes as the sole writer unless an isolated worktree was intentionally requested.\n\u2022 Artifacts/status essentials: chain outputs live under {chain_dir}; async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results.";
3
- export declare const FULL_SUBAGENT_TOOL_DESCRIPTION = "Delegate to subagents or manage agent definitions.\n\nEXECUTION (use exactly ONE mode):\n\u2022 Before executing, use { action: \"list\" } to inspect configured agents/chains. Only execute agents listed as executable/non-disabled.\n\u2022 SINGLE: { agent, task? } - one task; omit task for self-contained agents. Multiple SINGLE calls in the same turn run concurrently (capped).\n\u2022 CHAIN: { chain: [{agent:\"agent-a\"}, {parallel:[{agent:\"agent-b\",count:3}]}] } - sequential pipeline with optional parallel fan-out. Use chain when a later child needs an earlier result.\n\u2022 PARALLEL: { tasks: [{agent,task,count?,output?,reads?,progress?}, ...], concurrency?: number, worktree?: true } - one-call concurrent execution (default: all tasks at once; worktree: isolate each task in a git worktree)\n\u2022 Children always start with a fresh session (no inherited parent transcript). Model strings accept a thinking suffix (provider/model:off|minimal|low|medium|high|xhigh|max).\n\u2022 Optional timeout: { timeoutMs } or { maxRuntimeMs } sets a run-level max runtime for foreground and async/background runs\n\u2022 If { action: \"list\" } shows proactive skill subagent suggestions, consider a small fresh-context fanout for broad tasks where one of those skills would materially help\n\nCHAIN TEMPLATE VARIABLES (use in task strings):\n\u2022 {task} - The original task/request from the user\n\u2022 {previous} - Text response from the previous step (empty for first step)\n\u2022 {chain_dir} - Shared directory for chain files (e.g., <tmpdir>/pi-subagents-<scope>/chain-runs/abc123/)\n\nCHAIN EXAMPLES (quick reference for the nested schema):\n\u2022 Sequential: { chain: [{agent:\"agent-a\", task:\"Analyze {task}\"}, {agent:\"agent-b\", task:\"Plan based on {previous}\"}] }\n\u2022 Parallel fan-out: { chain: [{parallel: [{agent:\"agent-a\", task:\"Check part of {task}\", count: 3}]}] }\n\u2022 Mixed: { chain: [{agent:\"agent-a\", task:\"Research {task}\"}, {parallel: [{agent:\"agent-b\", task:\"Review {previous}\", count: 2}]}, {agent:\"agent-c\", task:\"Summarize {previous}\"}] }\n\nMANAGEMENT (use action field, omit agent/task/chain/tasks):\n\u2022 { action: \"list\" } - discover executable agents/chains\n\u2022 { action: \"get\", agent: \"name\" } - full detail; packaged agents use dotted runtime names like \"package.agent\"\n\u2022 { action: \"models\", agent?: \"name\" } - show the runtime-loaded builtin subagent model mapping, optionally filtered to one builtin\n\u2022 { action: \"watchdog.status\" | \"watchdog.check\" | \"watchdog.recommend-model\" } - inspect the opt-in subagent watchdog and its strong complementary model recommendation\n\u2022 { action: \"watchdog.configure\", model: \"recommended\" | \"inherit\" | \"provider/model[:thinking]\", scope?: \"session\" | \"user\" | \"project\", target?: \"main\" | \"children\" | \"child\", agent?: \"name\", thinking?: \"inherit\" | \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\" } - configure watchdog model selection; default scope is session, use persistent scopes only when the user asks\n\u2022 { action: \"create\", config: { name: \"custom-agent\", package: \"code-analysis\", systemPrompt, systemPromptMode, inheritProjectContext, inheritSkills, acceptance, acceptanceRole: \"read-only\" | \"writer\", ... } }\n\u2022 acceptanceRole affects inferred acceptance only, never tool access. Explicit task mutation/no-edit intent wins; omission preserves name heuristics. Update with false or an empty string to clear it.\n\u2022 { action: \"update\", agent: \"code-analysis.custom-agent\", config: { package: \"analysis\", ... } } - merge\n\u2022 { action: \"delete\", agent: \"code-analysis.custom-agent\" }\n\u2022 { action: \"eject\", agent: \"reviewer\", agentScope?: \"user\" | \"project\" } - copy a bundled/package agent to user/project scope as an editable custom file that shadows the original (default scope: user)\n\u2022 { action: \"disable\", agent: \"reviewer\", agentScope?: \"user\" | \"project\" } - hide any agent from runtime discovery via a reversible settings override (default scope: user)\n\u2022 { action: \"enable\", agent: \"reviewer\", agentScope?: \"user\" | \"project\" } - remove a disabled override and restore discovery\n\u2022 { action: \"reset\", agent: \"reviewer\", agentScope?: \"user\" | \"project\" } - delete the scope's custom agent file and/or settings override, restoring the bundled default\n\u2022 Use chainName for chain operations; packaged chains also use dotted runtime names\n\nCONTROL:\n\u2022 { action: \"status\", id: \"...\" } - inspect an async/background run by id or prefix\n\u2022 { action: \"status\", view: \"fleet\" } - read-only active foreground/async fleet view with transcript commands\n\u2022 { action: \"status\", id: \"...\", view: \"transcript\", index?: 0, lines?: 80 } - tail a run or child output/session transcript\n\u2022 { action: \"interrupt\", id?: \"...\" } - soft-interrupt the current child turn and leave the run paused\n\u2022 { action: \"stop\", id: \"...\" } - stop a current-session top-level async run; stopped runs finish with state \"stopped\"\n\u2022 { action: \"resume\", id: \"...\", message: \"...\", index?: 0 } - interrupt then follow up with a live async child, or revive a completed async/foreground child from its session\n\u2022 { action: \"steer\", id: \"...\", message: \"...\", index?: 0 } - await correlated child-Pi input acceptance for up to 3 seconds; returns delivered, scheduled, pending, partial, recovered, or failed with a request id. Only top-level single runs may recover after a further 15-second pause/revival bound; chain, parallel, and nested runs never auto-interrupt.\n\u2022 { action: \"append-step\", id: \"...\", chain: [{agent:\"agent-c\", task:\"Use {previous}\"}] } - append one step to the tail of a running async chain\n\nSCHEDULE (opt-in; requires { \"scheduledRuns\": { \"enabled\": true } } in config.json):\n\u2022 { action: \"schedule\", agent, task?, schedule: \"+10m\" | \"2030-01-01T09:00:00Z\", scheduleName? } - defer a subagent launch until a future time. Also accepts tasks[] or chain[]. Scheduled runs always launch async with fresh context; they become normal tracked async runs once they fire. Only schedule explicit delayed runs the user asked for.\n\u2022 { action: \"schedule-list\" } - list scheduled runs for this session\n\u2022 { action: \"schedule-status\", id: \"...\" } - inspect one scheduled run\n\u2022 { action: \"schedule-cancel\", id: \"...\" } - cancel a scheduled run before it fires\n\nDIAGNOSTICS:\n\u2022 { action: \"doctor\" } - read-only report for runtime paths, discovery, sessions, and intercom\n\nSAFETY-CRITICAL SUBAGENT GUIDANCE:\n\u2022 Use { action: \"list\" } before execution and only run executable/non-disabled agents or chains.\n\u2022 Keep execution and management separate: omit action for SINGLE/PARALLEL/CHAIN execution; use action only for list/get/models/create/update/delete/status/interrupt/stop/resume/append-step/doctor.\n\u2022 Async/background runs: launch with async:true only when work can proceed independently. Do not sleep or poll status just to wait. In an interactive session, normally return control and let Pi wake you; use subagent_wait when this request must run to completion in the current turn or skill. Headless sessions auto-drain current-session work.\n\u2022 Child-safety boundary: ordinary child subagents are not orchestrators and must not run subagents. Only explicitly configured fanout children may use the child-safe subagent tool, still bounded by depth/session limits.\n\u2022 Writing/review safety: keep one writer for the same cwd/worktree. Use fresh-context read-only reviewers/validators for independent review, then have the parent synthesize and apply fixes as the sole writer unless an isolated worktree was intentionally requested.\n\u2022 Artifacts/status essentials: chain outputs live under {chain_dir}; async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results.";
4
- export declare const COMPACT_SUBAGENT_TOOL_DESCRIPTION = "Delegate to subagents or manage definitions. Use exactly one mode per call.\n\nEXECUTE:\n\u2022 Before execution, call { action: \"list\" }; run only executable/non-disabled configured agents/chains.\n\u2022 SINGLE {agent, task?} (same-turn singles overlap); PARALLEL {tasks:[{agent,task,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{agent,task?},{parallel:[...]}]} for sequential work.\n\u2022 Children always start with a fresh session. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.\n\u2022 Chain templates may use {task}, {previous}, {chain_dir}, and named outputs. Parallel worktree isolation requires a clean git repo.\n\u2022 Chain example: { chain: [{agent:\"agent-a\", task:\"Analyze {task}\"}, {parallel: [{agent:\"agent-b\", task:\"Check {previous}\", count: 3}]}] }\n\u2022 If list shows proactive skill subagent suggestions, use a small fresh-context fanout only when the task is broad enough.\n\nMANAGE / CONTROL:\n\u2022 Use action without execution fields: list, get, models, create, update, delete, eject, disable, enable, reset, doctor, watchdog.status, watchdog.check, watchdog.recommend-model, watchdog.configure.\n\u2022 Agent acceptanceRole (read-only or writer) affects inferred acceptance only, never tools. Explicit task intent wins; omission keeps name heuristics. Update with false or an empty string to clear it.\n\u2022 Async control actions: status, interrupt, stop, resume, steer, append-step. Use stop with an id for current-session top-level async runs. Use status view:\"fleet\" for active-run overview, view:\"transcript\" to tail child output, and steer for acknowledged live guidance. Steering delivery means Pi accepted the correlated user input, not model compliance; use index for a specific child.\n\u2022 Opt-in schedule actions: schedule, schedule-list, schedule-status, schedule-cancel. Schedule only explicit delayed runs the user asked for.\n\nASYNC / WAIT:\n\u2022 async:true detaches background work. Do not sleep or poll just to wait. Interactive sessions normally yield for completion notifications; use subagent_wait for run-to-completion turns or skills. Headless sessions auto-drain current-session work.\n\u2022 Status and artifacts live under asyncId/asyncDir with status.json, events.jsonl, output logs, session files, and { action:\"status\", id:\"...\" }.\n\nSAFETY:\n\u2022 Ordinary child subagents are not orchestrators and must not run subagents. Only explicit fanout children may use child-safe subagent, still bounded by depth/session limits.\n\u2022 Keep one writer per cwd/worktree. Use fresh read-only review/validation fanout, then synthesize and apply fixes from the parent unless isolated worktrees were intentionally requested.";
2
+ export declare const SUBAGENT_SAFETY_GUIDANCE = "SAFETY-CRITICAL SUBAGENT GUIDANCE:\n\u2022 Prompt children directly. There is no agent roster. Every execution task needs task (the full child prompt) and description (a concise UI label).\n\u2022 permissions is \"full\" or \"read-only\". Omitted permissions means full. Plan-mode parents must pass permissions: \"read-only\"; full or omitted launches are rejected.\n\u2022 Keep execution and control separate: omit action for SINGLE/PARALLEL/CHAIN execution; use action only for status/interrupt/stop/resume/steer/append-step/doctor/watchdog.*/schedule*.\n\u2022 Async/background runs: launch with async:true only when work can proceed independently. Do not sleep or poll status just to wait. In an interactive session, normally return control and let lunR wake you; use subagent_wait when this request must run to completion in the current turn or skill. Headless sessions auto-drain current-session work.\n\u2022 Child-safety boundary: ordinary children are not orchestrators and must not run subagents. Only explicitly configured fanout children may use the child-safe subagent tool, still bounded by depth/session limits.\n\u2022 Writing/review safety: keep one full-access writer for the same cwd/worktree. Use fresh-context permissions: \"read-only\" children for independent review, then have the parent synthesize and apply fixes as the sole writer unless an isolated worktree was intentionally requested.\n\u2022 Artifacts/status essentials: chain outputs live under {chain_dir}; async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results.";
3
+ export declare const FULL_SUBAGENT_TOOL_DESCRIPTION = "Delegate work to generic children by prompting them directly. There are no named agent types.\n\nEXECUTION (use exactly ONE mode):\n\u2022 SINGLE: { task, description, permissions? } \u2014 one child. Multiple SINGLE calls in the same turn run concurrently; explicit concurrency/run limits still apply.\n\u2022 PARALLEL: { tasks: [{task, description, permissions?, count?, output?, reads?, progress?}, ...], concurrency?: number, worktree?: true } \u2014 one-call concurrent execution (default: all tasks at once; worktree: isolate each task in a git worktree)\n\u2022 CHAIN: { chain: [{task, description, permissions?}, {parallel:[{task, description, permissions?, count:3}]}] } \u2014 sequential pipeline with optional parallel fan-out. Use chain when a later child needs an earlier result.\n\u2022 description is required, single-line, max 80 characters. It is UI metadata only. task is the complete child prompt.\n\u2022 permissions: \"full\" (default) or \"read-only\". Full includes coding tools (read, search, shell, edit, write, web, LSP, MCP) and excludes parent-owned tools (cron, memory, behavior, goals, nested subagents). Plan-mode parents may launch only permissions: \"read-only\".\n\u2022 Children always start with a fresh session (no inherited parent transcript). Model strings accept a thinking suffix (provider/model:off|minimal|low|medium|high|xhigh|max).\n\u2022 Optional timeout: { timeoutMs } or { maxRuntimeMs } sets a run-level max runtime for foreground and async/background runs\n\nCHAIN TEMPLATE VARIABLES (use in task and description strings):\n\u2022 {task} - The original task/request from the user\n\u2022 {previous} - Text response from the previous step (empty for first step)\n\u2022 {chain_dir} - Shared directory for chain files (e.g., <tmpdir>/pi-subagents-<scope>/chain-runs/abc123/)\n\nCHAIN EXAMPLES:\n\u2022 Sequential: { chain: [{task:\"Analyze {task}\", description:\"Analyze request\"}, {task:\"Plan based on {previous}\", description:\"Draft plan\"}] }\n\u2022 Parallel fan-out: { chain: [{parallel: [{task:\"Check part of {task}\", description:\"Check one part\", permissions:\"read-only\", count: 3}]}] }\n\u2022 Mixed: { chain: [{task:\"Research {task}\", description:\"Research request\", permissions:\"read-only\"}, {parallel: [{task:\"Review {previous}\", description:\"Review findings\", permissions:\"read-only\", count: 2}]}, {task:\"Summarize {previous}\", description:\"Summarize reviews\"}] }\n\nCONTROL (use action field, omit task/chain/tasks):\n\u2022 { action: \"watchdog.status\" | \"watchdog.check\" | \"watchdog.recommend-model\" } - inspect the opt-in subagent watchdog and its strong complementary model recommendation\n\u2022 { action: \"watchdog.configure\", model: \"recommended\" | \"inherit\" | \"provider/model[:thinking]\", scope?: \"session\" | \"user\" | \"project\", target?: \"main\" | \"children\", thinking?: \"inherit\" | \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\" } - configure watchdog model selection; default scope is session, use persistent scopes only when the user asks\n\u2022 { action: \"status\", id: \"...\" } - inspect an async/background run by id or prefix\n\u2022 { action: \"status\", view: \"fleet\" } - read-only active foreground/async fleet view with transcript commands\n\u2022 { action: \"status\", id: \"...\", view: \"transcript\", index?: 0, lines?: 80 } - tail a run or child output/session transcript\n\u2022 { action: \"interrupt\", id?: \"...\" } - soft-interrupt the current child turn and leave the run paused\n\u2022 { action: \"stop\", id: \"...\" } - stop a current-session top-level async run; stopped runs finish with state \"stopped\"\n\u2022 { action: \"resume\", id: \"...\", message: \"...\", index?: 0 } - interrupt then follow up with a live async child, or revive a completed async/foreground child from its session\n\u2022 { action: \"steer\", id: \"...\", message: \"...\", index?: 0 } - await correlated child input acceptance for up to 3 seconds; returns delivered, scheduled, pending, partial, recovered, or failed with a request id. Only top-level single runs may recover after a further 15-second pause/revival bound; chain, parallel, and nested runs never auto-interrupt.\n\u2022 { action: \"append-step\", id: \"...\", chain: [{task:\"Use {previous}\", description:\"Follow-up step\"}] } - append one step to the tail of a running async chain\n\nSCHEDULE (opt-in; requires { \"scheduledRuns\": { \"enabled\": true } } in config.json):\n\u2022 { action: \"schedule\", task, description, permissions?, schedule: \"+10m\" | \"2030-01-01T09:00:00Z\", scheduleName? } - defer a child launch until a future time. Also accepts tasks[] or chain[]. Scheduled runs always launch async with fresh context; they become normal tracked async runs once they fire. Only schedule explicit delayed runs the user asked for.\n\u2022 { action: \"schedule-list\" } - list scheduled runs for this session\n\u2022 { action: \"schedule-status\", id: \"...\" } - inspect one scheduled run\n\u2022 { action: \"schedule-cancel\", id: \"...\" } - cancel a scheduled run before it fires\n\nDIAGNOSTICS:\n\u2022 { action: \"doctor\" } - read-only report for runtime paths, sessions, and intercom\n\nSAFETY-CRITICAL SUBAGENT GUIDANCE:\n\u2022 Prompt children directly. There is no agent roster. Every execution task needs task (the full child prompt) and description (a concise UI label).\n\u2022 permissions is \"full\" or \"read-only\". Omitted permissions means full. Plan-mode parents must pass permissions: \"read-only\"; full or omitted launches are rejected.\n\u2022 Keep execution and control separate: omit action for SINGLE/PARALLEL/CHAIN execution; use action only for status/interrupt/stop/resume/steer/append-step/doctor/watchdog.*/schedule*.\n\u2022 Async/background runs: launch with async:true only when work can proceed independently. Do not sleep or poll status just to wait. In an interactive session, normally return control and let lunR wake you; use subagent_wait when this request must run to completion in the current turn or skill. Headless sessions auto-drain current-session work.\n\u2022 Child-safety boundary: ordinary children are not orchestrators and must not run subagents. Only explicitly configured fanout children may use the child-safe subagent tool, still bounded by depth/session limits.\n\u2022 Writing/review safety: keep one full-access writer for the same cwd/worktree. Use fresh-context permissions: \"read-only\" children for independent review, then have the parent synthesize and apply fixes as the sole writer unless an isolated worktree was intentionally requested.\n\u2022 Artifacts/status essentials: chain outputs live under {chain_dir}; async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results.";
4
+ export declare const COMPACT_SUBAGENT_TOOL_DESCRIPTION = "Delegate to generic children by prompting them. Use exactly one mode per call.\n\nEXECUTE:\n\u2022 SINGLE {task, description, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,permissions?},{parallel:[...]}]} for sequential work.\n\u2022 description is required (single-line, max 80 chars, UI only). task is the full child prompt. permissions omitted = full. Plan-mode parents must pass permissions:\"read-only\".\n\u2022 Children always start with a fresh session. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.\n\u2022 Chain templates may use {task}, {previous}, {chain_dir}, and named outputs. Parallel worktree isolation requires a clean git repo.\n\u2022 Chain example: { chain: [{task:\"Analyze {task}\", description:\"Analyze request\"}, {parallel: [{task:\"Check {previous}\", description:\"Check prior result\", permissions:\"read-only\", count: 3}]}] }\n\nCONTROL:\n\u2022 Use action without execution fields: doctor, watchdog.status, watchdog.check, watchdog.recommend-model, watchdog.configure, status, interrupt, stop, resume, steer, append-step.\n\u2022 Async control actions: status, interrupt, stop, resume, steer, append-step. Use stop with an id for current-session top-level async runs. Use status view:\"fleet\" for active-run overview, view:\"transcript\" to tail child output, and steer for acknowledged live guidance. Steering delivery means lunR accepted the correlated user input, not model compliance; use index for a specific child.\n\u2022 Opt-in schedule actions: schedule, schedule-list, schedule-status, schedule-cancel. Schedule only explicit delayed runs the user asked for.\n\nASYNC / WAIT:\n\u2022 async:true detaches background work. Do not sleep or poll just to wait. Interactive sessions normally yield for completion notifications; use subagent_wait for run-to-completion turns or skills. Headless sessions auto-drain current-session work.\n\u2022 Status and artifacts live under asyncId/asyncDir with status.json, events.jsonl, output logs, session files, and { action:\"status\", id:\"...\" }.\n\nSAFETY:\n\u2022 Ordinary children are not orchestrators and must not run subagents. Only explicit fanout children may use child-safe subagent, still bounded by depth/session limits.\n\u2022 Keep one full-access writer per cwd/worktree. Use fresh permissions:\"read-only\" review/validation fanout, then synthesize and apply fixes from the parent unless isolated worktrees were intentionally requested.";
5
5
  export interface ToolDescriptionOptions {
6
6
  cwd?: string;
7
7
  agentDir?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tool-description.d.ts","sourceRoot":"","sources":["../../../../../src/builtin-extensions/pi-subagents/src/extension/tool-description.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAM/E,eAAO,MAAM,wBAAwB,g7CAMyN,CAAC;AAE/P,eAAO,MAAM,8BAA8B,g9PAwDf,CAAC;AAE7B,eAAO,MAAM,iCAAiC,msFAsB4I,CAAC;AAU3L,MAAM,WAAW,sBAAsB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAC,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAMtJ;AAiFD,wBAAgB,4BAA4B,CAAC,MAAM,GAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAmBhJ","sourcesContent":["// @ts-nocheck\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport type { ExtensionConfig, ToolDescriptionMode } from \"../shared/types.ts\";\nimport { getAgentDir, getProjectConfigDir } from \"../shared/utils.ts\";\n\nconst CUSTOM_TOOL_DESCRIPTION_FILE = \"subagent-tool-description.md\";\nconst CUSTOM_TOOL_DESCRIPTION_MAX_BYTES = 50 * 1024;\n\nexport const SUBAGENT_SAFETY_GUIDANCE = `SAFETY-CRITICAL SUBAGENT GUIDANCE:\n• Use { action: \"list\" } before execution and only run executable/non-disabled agents or chains.\n• Keep execution and management separate: omit action for SINGLE/PARALLEL/CHAIN execution; use action only for list/get/models/create/update/delete/status/interrupt/stop/resume/append-step/doctor.\n• Async/background runs: launch with async:true only when work can proceed independently. Do not sleep or poll status just to wait. In an interactive session, normally return control and let Pi wake you; use subagent_wait when this request must run to completion in the current turn or skill. Headless sessions auto-drain current-session work.\n• Child-safety boundary: ordinary child subagents are not orchestrators and must not run subagents. Only explicitly configured fanout children may use the child-safe subagent tool, still bounded by depth/session limits.\n• Writing/review safety: keep one writer for the same cwd/worktree. Use fresh-context read-only reviewers/validators for independent review, then have the parent synthesize and apply fixes as the sole writer unless an isolated worktree was intentionally requested.\n• Artifacts/status essentials: chain outputs live under {chain_dir}; async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results.`;\n\nexport const FULL_SUBAGENT_TOOL_DESCRIPTION = `Delegate to subagents or manage agent definitions.\n\nEXECUTION (use exactly ONE mode):\n• Before executing, use { action: \"list\" } to inspect configured agents/chains. Only execute agents listed as executable/non-disabled.\n• SINGLE: { agent, task? } - one task; omit task for self-contained agents. Multiple SINGLE calls in the same turn run concurrently (capped).\n• CHAIN: { chain: [{agent:\"agent-a\"}, {parallel:[{agent:\"agent-b\",count:3}]}] } - sequential pipeline with optional parallel fan-out. Use chain when a later child needs an earlier result.\n• PARALLEL: { tasks: [{agent,task,count?,output?,reads?,progress?}, ...], concurrency?: number, worktree?: true } - one-call concurrent execution (default: all tasks at once; worktree: isolate each task in a git worktree)\n• Children always start with a fresh session (no inherited parent transcript). Model strings accept a thinking suffix (provider/model:off|minimal|low|medium|high|xhigh|max).\n• Optional timeout: { timeoutMs } or { maxRuntimeMs } sets a run-level max runtime for foreground and async/background runs\n• If { action: \"list\" } shows proactive skill subagent suggestions, consider a small fresh-context fanout for broad tasks where one of those skills would materially help\n\nCHAIN TEMPLATE VARIABLES (use in task strings):\n• {task} - The original task/request from the user\n• {previous} - Text response from the previous step (empty for first step)\n• {chain_dir} - Shared directory for chain files (e.g., <tmpdir>/pi-subagents-<scope>/chain-runs/abc123/)\n\nCHAIN EXAMPLES (quick reference for the nested schema):\n• Sequential: { chain: [{agent:\"agent-a\", task:\"Analyze {task}\"}, {agent:\"agent-b\", task:\"Plan based on {previous}\"}] }\n• Parallel fan-out: { chain: [{parallel: [{agent:\"agent-a\", task:\"Check part of {task}\", count: 3}]}] }\n• Mixed: { chain: [{agent:\"agent-a\", task:\"Research {task}\"}, {parallel: [{agent:\"agent-b\", task:\"Review {previous}\", count: 2}]}, {agent:\"agent-c\", task:\"Summarize {previous}\"}] }\n\nMANAGEMENT (use action field, omit agent/task/chain/tasks):\n• { action: \"list\" } - discover executable agents/chains\n• { action: \"get\", agent: \"name\" } - full detail; packaged agents use dotted runtime names like \"package.agent\"\n• { action: \"models\", agent?: \"name\" } - show the runtime-loaded builtin subagent model mapping, optionally filtered to one builtin\n• { action: \"watchdog.status\" | \"watchdog.check\" | \"watchdog.recommend-model\" } - inspect the opt-in subagent watchdog and its strong complementary model recommendation\n• { action: \"watchdog.configure\", model: \"recommended\" | \"inherit\" | \"provider/model[:thinking]\", scope?: \"session\" | \"user\" | \"project\", target?: \"main\" | \"children\" | \"child\", agent?: \"name\", thinking?: \"inherit\" | \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\" } - configure watchdog model selection; default scope is session, use persistent scopes only when the user asks\n• { action: \"create\", config: { name: \"custom-agent\", package: \"code-analysis\", systemPrompt, systemPromptMode, inheritProjectContext, inheritSkills, acceptance, acceptanceRole: \"read-only\" | \"writer\", ... } }\n• acceptanceRole affects inferred acceptance only, never tool access. Explicit task mutation/no-edit intent wins; omission preserves name heuristics. Update with false or an empty string to clear it.\n• { action: \"update\", agent: \"code-analysis.custom-agent\", config: { package: \"analysis\", ... } } - merge\n• { action: \"delete\", agent: \"code-analysis.custom-agent\" }\n• { action: \"eject\", agent: \"reviewer\", agentScope?: \"user\" | \"project\" } - copy a bundled/package agent to user/project scope as an editable custom file that shadows the original (default scope: user)\n• { action: \"disable\", agent: \"reviewer\", agentScope?: \"user\" | \"project\" } - hide any agent from runtime discovery via a reversible settings override (default scope: user)\n• { action: \"enable\", agent: \"reviewer\", agentScope?: \"user\" | \"project\" } - remove a disabled override and restore discovery\n• { action: \"reset\", agent: \"reviewer\", agentScope?: \"user\" | \"project\" } - delete the scope's custom agent file and/or settings override, restoring the bundled default\n• Use chainName for chain operations; packaged chains also use dotted runtime names\n\nCONTROL:\n• { action: \"status\", id: \"...\" } - inspect an async/background run by id or prefix\n• { action: \"status\", view: \"fleet\" } - read-only active foreground/async fleet view with transcript commands\n• { action: \"status\", id: \"...\", view: \"transcript\", index?: 0, lines?: 80 } - tail a run or child output/session transcript\n• { action: \"interrupt\", id?: \"...\" } - soft-interrupt the current child turn and leave the run paused\n• { action: \"stop\", id: \"...\" } - stop a current-session top-level async run; stopped runs finish with state \"stopped\"\n• { action: \"resume\", id: \"...\", message: \"...\", index?: 0 } - interrupt then follow up with a live async child, or revive a completed async/foreground child from its session\n• { action: \"steer\", id: \"...\", message: \"...\", index?: 0 } - await correlated child-Pi input acceptance for up to 3 seconds; returns delivered, scheduled, pending, partial, recovered, or failed with a request id. Only top-level single runs may recover after a further 15-second pause/revival bound; chain, parallel, and nested runs never auto-interrupt.\n• { action: \"append-step\", id: \"...\", chain: [{agent:\"agent-c\", task:\"Use {previous}\"}] } - append one step to the tail of a running async chain\n\nSCHEDULE (opt-in; requires { \"scheduledRuns\": { \"enabled\": true } } in config.json):\n• { action: \"schedule\", agent, task?, schedule: \"+10m\" | \"2030-01-01T09:00:00Z\", scheduleName? } - defer a subagent launch until a future time. Also accepts tasks[] or chain[]. Scheduled runs always launch async with fresh context; they become normal tracked async runs once they fire. Only schedule explicit delayed runs the user asked for.\n• { action: \"schedule-list\" } - list scheduled runs for this session\n• { action: \"schedule-status\", id: \"...\" } - inspect one scheduled run\n• { action: \"schedule-cancel\", id: \"...\" } - cancel a scheduled run before it fires\n\nDIAGNOSTICS:\n• { action: \"doctor\" } - read-only report for runtime paths, discovery, sessions, and intercom\n\n${SUBAGENT_SAFETY_GUIDANCE}`;\n\nexport const COMPACT_SUBAGENT_TOOL_DESCRIPTION = `Delegate to subagents or manage definitions. Use exactly one mode per call.\n\nEXECUTE:\n• Before execution, call { action: \"list\" }; run only executable/non-disabled configured agents/chains.\n• SINGLE {agent, task?} (same-turn singles overlap); PARALLEL {tasks:[{agent,task,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{agent,task?},{parallel:[...]}]} for sequential work.\n• Children always start with a fresh session. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.\n• Chain templates may use {task}, {previous}, {chain_dir}, and named outputs. Parallel worktree isolation requires a clean git repo.\n• Chain example: { chain: [{agent:\"agent-a\", task:\"Analyze {task}\"}, {parallel: [{agent:\"agent-b\", task:\"Check {previous}\", count: 3}]}] }\n• If list shows proactive skill subagent suggestions, use a small fresh-context fanout only when the task is broad enough.\n\nMANAGE / CONTROL:\n• Use action without execution fields: list, get, models, create, update, delete, eject, disable, enable, reset, doctor, watchdog.status, watchdog.check, watchdog.recommend-model, watchdog.configure.\n• Agent acceptanceRole (read-only or writer) affects inferred acceptance only, never tools. Explicit task intent wins; omission keeps name heuristics. Update with false or an empty string to clear it.\n• Async control actions: status, interrupt, stop, resume, steer, append-step. Use stop with an id for current-session top-level async runs. Use status view:\"fleet\" for active-run overview, view:\"transcript\" to tail child output, and steer for acknowledged live guidance. Steering delivery means Pi accepted the correlated user input, not model compliance; use index for a specific child.\n• Opt-in schedule actions: schedule, schedule-list, schedule-status, schedule-cancel. Schedule only explicit delayed runs the user asked for.\n\nASYNC / WAIT:\n• async:true detaches background work. Do not sleep or poll just to wait. Interactive sessions normally yield for completion notifications; use subagent_wait for run-to-completion turns or skills. Headless sessions auto-drain current-session work.\n• Status and artifacts live under asyncId/asyncDir with status.json, events.jsonl, output logs, session files, and { action:\"status\", id:\"...\" }.\n\nSAFETY:\n• Ordinary child subagents are not orchestrators and must not run subagents. Only explicit fanout children may use child-safe subagent, still bounded by depth/session limits.\n• Keep one writer per cwd/worktree. Use fresh read-only review/validation fanout, then synthesize and apply fixes from the parent unless isolated worktrees were intentionally requested.`;\n\nfunction isToolDescriptionMode(value: unknown): value is ToolDescriptionMode {\n\treturn value === \"full\" || value === \"compact\" || value === \"custom\";\n}\n\nfunction warn(options: ToolDescriptionOptions | undefined, message: string): void {\n\t(options?.warn ?? console.warn)(`[pi-subagents] ${message}`);\n}\n\nexport interface ToolDescriptionOptions {\n\tcwd?: string;\n\tagentDir?: string;\n\twarn?: (message: string) => void;\n}\n\nexport function resolveToolDescriptionMode(config: Pick<ExtensionConfig, \"toolDescriptionMode\">, options?: ToolDescriptionOptions): ToolDescriptionMode {\n\tconst mode = config.toolDescriptionMode;\n\tif (mode === undefined) return \"full\";\n\tif (isToolDescriptionMode(mode)) return mode;\n\twarn(options, `Ignoring invalid toolDescriptionMode ${JSON.stringify(mode)}; expected \"full\", \"compact\", or \"custom\".`);\n\treturn \"full\";\n}\n\nfunction customDescriptionPaths(options?: ToolDescriptionOptions): string[] {\n\tconst cwd = options?.cwd ?? process.cwd();\n\tconst agentDir = options?.agentDir ?? getAgentDir();\n\treturn [\n\t\tpath.join(getProjectConfigDir(cwd), CUSTOM_TOOL_DESCRIPTION_FILE),\n\t\tpath.join(agentDir, CUSTOM_TOOL_DESCRIPTION_FILE),\n\t];\n}\n\nfunction renderCustomTemplate(template: string, options?: ToolDescriptionOptions): string {\n\tconst cwd = options?.cwd ?? process.cwd();\n\tconst agentDir = options?.agentDir ?? getAgentDir();\n\tconst projectConfigDir = getProjectConfigDir(cwd);\n\tconst variables: Record<string, () => string> = {\n\t\tfullDescription: () => FULL_SUBAGENT_TOOL_DESCRIPTION,\n\t\tfull: () => FULL_SUBAGENT_TOOL_DESCRIPTION,\n\t\tcompactDescription: () => COMPACT_SUBAGENT_TOOL_DESCRIPTION,\n\t\tcompact: () => COMPACT_SUBAGENT_TOOL_DESCRIPTION,\n\t\tsafetyGuidance: () => SUBAGENT_SAFETY_GUIDANCE,\n\t\tsafety: () => SUBAGENT_SAFETY_GUIDANCE,\n\t\tagentDir: () => agentDir,\n\t\tprojectConfigDir: () => projectConfigDir,\n\t};\n\treturn template.replace(/\\{\\{(\\w+)\\}\\}/g, (raw, name: string) => {\n\t\tconst replacement = variables[name];\n\t\tif (replacement) return replacement();\n\t\twarn(options, `${CUSTOM_TOOL_DESCRIPTION_FILE}: unknown placeholder ${raw} left unchanged.`);\n\t\treturn raw;\n\t});\n}\n\nfunction loadCustomToolDescription(options?: ToolDescriptionOptions): string | undefined {\n\tfor (const filePath of customDescriptionPaths(options)) {\n\t\tlet stat: fs.Stats;\n\t\ttry {\n\t\t\tstat = fs.statSync(filePath);\n\t\t} catch (error) {\n\t\t\tif (typeof error === \"object\" && error !== null && \"code\" in error && (error as NodeJS.ErrnoException).code === \"ENOENT\") continue;\n\t\t\twarn(options, `Failed to inspect custom tool description '${filePath}': ${error instanceof Error ? error.message : String(error)}`);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!stat.isFile()) {\n\t\t\twarn(options, `Ignoring custom tool description '${filePath}' because it is not a file.`);\n\t\t\tcontinue;\n\t\t}\n\t\tif (stat.size > CUSTOM_TOOL_DESCRIPTION_MAX_BYTES) {\n\t\t\twarn(options, `Ignoring custom tool description '${filePath}' because it is larger than ${CUSTOM_TOOL_DESCRIPTION_MAX_BYTES} bytes.`);\n\t\t\tcontinue;\n\t\t}\n\t\ttry {\n\t\t\tconst template = fs.readFileSync(filePath, \"utf-8\").trim();\n\t\t\tif (!template) {\n\t\t\t\twarn(options, `Ignoring empty custom tool description '${filePath}'.`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst rendered = renderCustomTemplate(template, options).trim();\n\t\t\tif (!rendered) {\n\t\t\t\twarn(options, `Ignoring custom tool description '${filePath}' because it rendered empty.`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn rendered;\n\t\t} catch (error) {\n\t\t\twarn(options, `Failed to read custom tool description '${filePath}': ${error instanceof Error ? error.message : String(error)}`);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction withMandatorySafetyGuidance(description: string): string {\n\tconst customDescription = description\n\t\t.split(SUBAGENT_SAFETY_GUIDANCE)\n\t\t.map((part) => part.trim())\n\t\t.filter(Boolean)\n\t\t.join(\"\\n\\n\");\n\treturn customDescription\n\t\t? `${customDescription}\\n\\n${SUBAGENT_SAFETY_GUIDANCE}`\n\t\t: SUBAGENT_SAFETY_GUIDANCE;\n}\n\nexport function buildSubagentToolDescription(config: Pick<ExtensionConfig, \"toolDescriptionMode\"> = {}, options?: ToolDescriptionOptions): string {\n\tconst mode = resolveToolDescriptionMode(config, options);\n\tlet description: string;\n\tif (mode === \"compact\") {\n\t\tdescription = COMPACT_SUBAGENT_TOOL_DESCRIPTION;\n\t} else if (mode === \"custom\") {\n\t\tconst custom = loadCustomToolDescription(options);\n\t\tif (custom) {\n\t\t\tdescription = withMandatorySafetyGuidance(custom);\n\t\t} else {\n\t\t\twarn(options, `${CUSTOM_TOOL_DESCRIPTION_FILE} was not found or valid for toolDescriptionMode \"custom\"; using full description.`);\n\t\t\tdescription = FULL_SUBAGENT_TOOL_DESCRIPTION;\n\t\t}\n\t} else {\n\t\tdescription = FULL_SUBAGENT_TOOL_DESCRIPTION;\n\t}\n\t// lunr: append model-tier guidance only when lunR core's tier bridge is registered and enabled.\n\tif (isModelTierModeEnabled()) return `${description}\\n\\n${MODEL_TIER_GUIDANCE}`;\n\treturn description;\n}\n\n// lunr: model tier guidance appended to the subagent tool description when tier mode is on.\nconst MODEL_TIER_GUIDANCE = `MODEL TIERS: Model tiers are enabled. For each subagent choose \\`tier\\`: 'light' for simple lookups/formatting, 'standard' for typical coding tasks, 'heavy' for deep reasoning/complex debugging. An explicit \\`model\\` overrides the tier. Omit both to inherit the parent model.`;\n\n// lunr: check lunR core's model-tier bridge (Symbol.for(\"@lunr/model-tiers\")); absent bridge means tier mode is off.\nfunction isModelTierModeEnabled(): boolean {\n\ttry {\n\t\tconst bridge = (globalThis as Record<symbol, unknown>)[Symbol.for(\"@lunr/model-tiers\")] as\n\t\t\t| { isTierModeEnabled?: () => unknown }\n\t\t\t| undefined;\n\t\treturn typeof bridge?.isTierModeEnabled === \"function\" && bridge.isTierModeEnabled() === true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n"]}
1
+ {"version":3,"file":"tool-description.d.ts","sourceRoot":"","sources":["../../../../../src/builtin-extensions/pi-subagents/src/extension/tool-description.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAM/E,eAAO,MAAM,wBAAwB,ipDAOyN,CAAC;AAE/P,eAAO,MAAM,8BAA8B,swNA0Cf,CAAC;AAE7B,eAAO,MAAM,iCAAiC,yiFAoBsK,CAAC;AAUrN,MAAM,WAAW,sBAAsB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAC,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAMtJ;AAiFD,wBAAgB,4BAA4B,CAAC,MAAM,GAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAmBhJ","sourcesContent":["// @ts-nocheck\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport type { ExtensionConfig, ToolDescriptionMode } from \"../shared/types.ts\";\nimport { getAgentDir, getProjectConfigDir } from \"../shared/utils.ts\";\n\nconst CUSTOM_TOOL_DESCRIPTION_FILE = \"subagent-tool-description.md\";\nconst CUSTOM_TOOL_DESCRIPTION_MAX_BYTES = 50 * 1024;\n\nexport const SUBAGENT_SAFETY_GUIDANCE = `SAFETY-CRITICAL SUBAGENT GUIDANCE:\n• Prompt children directly. There is no agent roster. Every execution task needs task (the full child prompt) and description (a concise UI label).\n• permissions is \"full\" or \"read-only\". Omitted permissions means full. Plan-mode parents must pass permissions: \"read-only\"; full or omitted launches are rejected.\n• Keep execution and control separate: omit action for SINGLE/PARALLEL/CHAIN execution; use action only for status/interrupt/stop/resume/steer/append-step/doctor/watchdog.*/schedule*.\n• Async/background runs: launch with async:true only when work can proceed independently. Do not sleep or poll status just to wait. In an interactive session, normally return control and let lunR wake you; use subagent_wait when this request must run to completion in the current turn or skill. Headless sessions auto-drain current-session work.\n• Child-safety boundary: ordinary children are not orchestrators and must not run subagents. Only explicitly configured fanout children may use the child-safe subagent tool, still bounded by depth/session limits.\n• Writing/review safety: keep one full-access writer for the same cwd/worktree. Use fresh-context permissions: \"read-only\" children for independent review, then have the parent synthesize and apply fixes as the sole writer unless an isolated worktree was intentionally requested.\n• Artifacts/status essentials: chain outputs live under {chain_dir}; async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results.`;\n\nexport const FULL_SUBAGENT_TOOL_DESCRIPTION = `Delegate work to generic children by prompting them directly. There are no named agent types.\n\nEXECUTION (use exactly ONE mode):\n• SINGLE: { task, description, permissions? } — one child. Multiple SINGLE calls in the same turn run concurrently; explicit concurrency/run limits still apply.\n• PARALLEL: { tasks: [{task, description, permissions?, count?, output?, reads?, progress?}, ...], concurrency?: number, worktree?: true } — one-call concurrent execution (default: all tasks at once; worktree: isolate each task in a git worktree)\n• CHAIN: { chain: [{task, description, permissions?}, {parallel:[{task, description, permissions?, count:3}]}] } — sequential pipeline with optional parallel fan-out. Use chain when a later child needs an earlier result.\n• description is required, single-line, max 80 characters. It is UI metadata only. task is the complete child prompt.\n• permissions: \"full\" (default) or \"read-only\". Full includes coding tools (read, search, shell, edit, write, web, LSP, MCP) and excludes parent-owned tools (cron, memory, behavior, goals, nested subagents). Plan-mode parents may launch only permissions: \"read-only\".\n• Children always start with a fresh session (no inherited parent transcript). Model strings accept a thinking suffix (provider/model:off|minimal|low|medium|high|xhigh|max).\n• Optional timeout: { timeoutMs } or { maxRuntimeMs } sets a run-level max runtime for foreground and async/background runs\n\nCHAIN TEMPLATE VARIABLES (use in task and description strings):\n• {task} - The original task/request from the user\n• {previous} - Text response from the previous step (empty for first step)\n• {chain_dir} - Shared directory for chain files (e.g., <tmpdir>/pi-subagents-<scope>/chain-runs/abc123/)\n\nCHAIN EXAMPLES:\n• Sequential: { chain: [{task:\"Analyze {task}\", description:\"Analyze request\"}, {task:\"Plan based on {previous}\", description:\"Draft plan\"}] }\n• Parallel fan-out: { chain: [{parallel: [{task:\"Check part of {task}\", description:\"Check one part\", permissions:\"read-only\", count: 3}]}] }\n• Mixed: { chain: [{task:\"Research {task}\", description:\"Research request\", permissions:\"read-only\"}, {parallel: [{task:\"Review {previous}\", description:\"Review findings\", permissions:\"read-only\", count: 2}]}, {task:\"Summarize {previous}\", description:\"Summarize reviews\"}] }\n\nCONTROL (use action field, omit task/chain/tasks):\n• { action: \"watchdog.status\" | \"watchdog.check\" | \"watchdog.recommend-model\" } - inspect the opt-in subagent watchdog and its strong complementary model recommendation\n• { action: \"watchdog.configure\", model: \"recommended\" | \"inherit\" | \"provider/model[:thinking]\", scope?: \"session\" | \"user\" | \"project\", target?: \"main\" | \"children\", thinking?: \"inherit\" | \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\" } - configure watchdog model selection; default scope is session, use persistent scopes only when the user asks\n• { action: \"status\", id: \"...\" } - inspect an async/background run by id or prefix\n• { action: \"status\", view: \"fleet\" } - read-only active foreground/async fleet view with transcript commands\n• { action: \"status\", id: \"...\", view: \"transcript\", index?: 0, lines?: 80 } - tail a run or child output/session transcript\n• { action: \"interrupt\", id?: \"...\" } - soft-interrupt the current child turn and leave the run paused\n• { action: \"stop\", id: \"...\" } - stop a current-session top-level async run; stopped runs finish with state \"stopped\"\n• { action: \"resume\", id: \"...\", message: \"...\", index?: 0 } - interrupt then follow up with a live async child, or revive a completed async/foreground child from its session\n• { action: \"steer\", id: \"...\", message: \"...\", index?: 0 } - await correlated child input acceptance for up to 3 seconds; returns delivered, scheduled, pending, partial, recovered, or failed with a request id. Only top-level single runs may recover after a further 15-second pause/revival bound; chain, parallel, and nested runs never auto-interrupt.\n• { action: \"append-step\", id: \"...\", chain: [{task:\"Use {previous}\", description:\"Follow-up step\"}] } - append one step to the tail of a running async chain\n\nSCHEDULE (opt-in; requires { \"scheduledRuns\": { \"enabled\": true } } in config.json):\n• { action: \"schedule\", task, description, permissions?, schedule: \"+10m\" | \"2030-01-01T09:00:00Z\", scheduleName? } - defer a child launch until a future time. Also accepts tasks[] or chain[]. Scheduled runs always launch async with fresh context; they become normal tracked async runs once they fire. Only schedule explicit delayed runs the user asked for.\n• { action: \"schedule-list\" } - list scheduled runs for this session\n• { action: \"schedule-status\", id: \"...\" } - inspect one scheduled run\n• { action: \"schedule-cancel\", id: \"...\" } - cancel a scheduled run before it fires\n\nDIAGNOSTICS:\n• { action: \"doctor\" } - read-only report for runtime paths, sessions, and intercom\n\n${SUBAGENT_SAFETY_GUIDANCE}`;\n\nexport const COMPACT_SUBAGENT_TOOL_DESCRIPTION = `Delegate to generic children by prompting them. Use exactly one mode per call.\n\nEXECUTE:\n• SINGLE {task, description, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,permissions?},{parallel:[...]}]} for sequential work.\n• description is required (single-line, max 80 chars, UI only). task is the full child prompt. permissions omitted = full. Plan-mode parents must pass permissions:\"read-only\".\n• Children always start with a fresh session. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.\n• Chain templates may use {task}, {previous}, {chain_dir}, and named outputs. Parallel worktree isolation requires a clean git repo.\n• Chain example: { chain: [{task:\"Analyze {task}\", description:\"Analyze request\"}, {parallel: [{task:\"Check {previous}\", description:\"Check prior result\", permissions:\"read-only\", count: 3}]}] }\n\nCONTROL:\n• Use action without execution fields: doctor, watchdog.status, watchdog.check, watchdog.recommend-model, watchdog.configure, status, interrupt, stop, resume, steer, append-step.\n• Async control actions: status, interrupt, stop, resume, steer, append-step. Use stop with an id for current-session top-level async runs. Use status view:\"fleet\" for active-run overview, view:\"transcript\" to tail child output, and steer for acknowledged live guidance. Steering delivery means lunR accepted the correlated user input, not model compliance; use index for a specific child.\n• Opt-in schedule actions: schedule, schedule-list, schedule-status, schedule-cancel. Schedule only explicit delayed runs the user asked for.\n\nASYNC / WAIT:\n• async:true detaches background work. Do not sleep or poll just to wait. Interactive sessions normally yield for completion notifications; use subagent_wait for run-to-completion turns or skills. Headless sessions auto-drain current-session work.\n• Status and artifacts live under asyncId/asyncDir with status.json, events.jsonl, output logs, session files, and { action:\"status\", id:\"...\" }.\n\nSAFETY:\n• Ordinary children are not orchestrators and must not run subagents. Only explicit fanout children may use child-safe subagent, still bounded by depth/session limits.\n• Keep one full-access writer per cwd/worktree. Use fresh permissions:\"read-only\" review/validation fanout, then synthesize and apply fixes from the parent unless isolated worktrees were intentionally requested.`;\n\nfunction isToolDescriptionMode(value: unknown): value is ToolDescriptionMode {\n\treturn value === \"full\" || value === \"compact\" || value === \"custom\";\n}\n\nfunction warn(options: ToolDescriptionOptions | undefined, message: string): void {\n\t(options?.warn ?? console.warn)(`[pi-subagents] ${message}`);\n}\n\nexport interface ToolDescriptionOptions {\n\tcwd?: string;\n\tagentDir?: string;\n\twarn?: (message: string) => void;\n}\n\nexport function resolveToolDescriptionMode(config: Pick<ExtensionConfig, \"toolDescriptionMode\">, options?: ToolDescriptionOptions): ToolDescriptionMode {\n\tconst mode = config.toolDescriptionMode;\n\tif (mode === undefined) return \"full\";\n\tif (isToolDescriptionMode(mode)) return mode;\n\twarn(options, `Ignoring invalid toolDescriptionMode ${JSON.stringify(mode)}; expected \"full\", \"compact\", or \"custom\".`);\n\treturn \"full\";\n}\n\nfunction customDescriptionPaths(options?: ToolDescriptionOptions): string[] {\n\tconst cwd = options?.cwd ?? process.cwd();\n\tconst agentDir = options?.agentDir ?? getAgentDir();\n\treturn [\n\t\tpath.join(getProjectConfigDir(cwd), CUSTOM_TOOL_DESCRIPTION_FILE),\n\t\tpath.join(agentDir, CUSTOM_TOOL_DESCRIPTION_FILE),\n\t];\n}\n\nfunction renderCustomTemplate(template: string, options?: ToolDescriptionOptions): string {\n\tconst cwd = options?.cwd ?? process.cwd();\n\tconst agentDir = options?.agentDir ?? getAgentDir();\n\tconst projectConfigDir = getProjectConfigDir(cwd);\n\tconst variables: Record<string, () => string> = {\n\t\tfullDescription: () => FULL_SUBAGENT_TOOL_DESCRIPTION,\n\t\tfull: () => FULL_SUBAGENT_TOOL_DESCRIPTION,\n\t\tcompactDescription: () => COMPACT_SUBAGENT_TOOL_DESCRIPTION,\n\t\tcompact: () => COMPACT_SUBAGENT_TOOL_DESCRIPTION,\n\t\tsafetyGuidance: () => SUBAGENT_SAFETY_GUIDANCE,\n\t\tsafety: () => SUBAGENT_SAFETY_GUIDANCE,\n\t\tagentDir: () => agentDir,\n\t\tprojectConfigDir: () => projectConfigDir,\n\t};\n\treturn template.replace(/\\{\\{(\\w+)\\}\\}/g, (raw, name: string) => {\n\t\tconst replacement = variables[name];\n\t\tif (replacement) return replacement();\n\t\twarn(options, `${CUSTOM_TOOL_DESCRIPTION_FILE}: unknown placeholder ${raw} left unchanged.`);\n\t\treturn raw;\n\t});\n}\n\nfunction loadCustomToolDescription(options?: ToolDescriptionOptions): string | undefined {\n\tfor (const filePath of customDescriptionPaths(options)) {\n\t\tlet stat: fs.Stats;\n\t\ttry {\n\t\t\tstat = fs.statSync(filePath);\n\t\t} catch (error) {\n\t\t\tif (typeof error === \"object\" && error !== null && \"code\" in error && (error as NodeJS.ErrnoException).code === \"ENOENT\") continue;\n\t\t\twarn(options, `Failed to inspect custom tool description '${filePath}': ${error instanceof Error ? error.message : String(error)}`);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!stat.isFile()) {\n\t\t\twarn(options, `Ignoring custom tool description '${filePath}' because it is not a file.`);\n\t\t\tcontinue;\n\t\t}\n\t\tif (stat.size > CUSTOM_TOOL_DESCRIPTION_MAX_BYTES) {\n\t\t\twarn(options, `Ignoring custom tool description '${filePath}' because it is larger than ${CUSTOM_TOOL_DESCRIPTION_MAX_BYTES} bytes.`);\n\t\t\tcontinue;\n\t\t}\n\t\ttry {\n\t\t\tconst template = fs.readFileSync(filePath, \"utf-8\").trim();\n\t\t\tif (!template) {\n\t\t\t\twarn(options, `Ignoring empty custom tool description '${filePath}'.`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst rendered = renderCustomTemplate(template, options).trim();\n\t\t\tif (!rendered) {\n\t\t\t\twarn(options, `Ignoring custom tool description '${filePath}' because it rendered empty.`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn rendered;\n\t\t} catch (error) {\n\t\t\twarn(options, `Failed to read custom tool description '${filePath}': ${error instanceof Error ? error.message : String(error)}`);\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction withMandatorySafetyGuidance(description: string): string {\n\tconst customDescription = description\n\t\t.split(SUBAGENT_SAFETY_GUIDANCE)\n\t\t.map((part) => part.trim())\n\t\t.filter(Boolean)\n\t\t.join(\"\\n\\n\");\n\treturn customDescription\n\t\t? `${customDescription}\\n\\n${SUBAGENT_SAFETY_GUIDANCE}`\n\t\t: SUBAGENT_SAFETY_GUIDANCE;\n}\n\nexport function buildSubagentToolDescription(config: Pick<ExtensionConfig, \"toolDescriptionMode\"> = {}, options?: ToolDescriptionOptions): string {\n\tconst mode = resolveToolDescriptionMode(config, options);\n\tlet description: string;\n\tif (mode === \"compact\") {\n\t\tdescription = COMPACT_SUBAGENT_TOOL_DESCRIPTION;\n\t} else if (mode === \"custom\") {\n\t\tconst custom = loadCustomToolDescription(options);\n\t\tif (custom) {\n\t\t\tdescription = withMandatorySafetyGuidance(custom);\n\t\t} else {\n\t\t\twarn(options, `${CUSTOM_TOOL_DESCRIPTION_FILE} was not found or valid for toolDescriptionMode \"custom\"; using full description.`);\n\t\t\tdescription = FULL_SUBAGENT_TOOL_DESCRIPTION;\n\t\t}\n\t} else {\n\t\tdescription = FULL_SUBAGENT_TOOL_DESCRIPTION;\n\t}\n\t// lunr: append model-tier guidance only when lunR core's tier bridge is registered and enabled.\n\tif (isModelTierModeEnabled()) return `${description}\\n\\n${MODEL_TIER_GUIDANCE}`;\n\treturn description;\n}\n\n// lunr: model tier guidance appended to the subagent tool description when tier mode is on.\nconst MODEL_TIER_GUIDANCE = `MODEL TIERS: Model tiers are enabled. For each subagent choose \\`tier\\`: 'light' for simple lookups/formatting, 'standard' for typical coding tasks, 'heavy' for deep reasoning/complex debugging. An explicit \\`model\\` overrides the tier. Omit both to inherit the parent model.`;\n\n// lunr: check lunR core's model-tier bridge (Symbol.for(\"@lunr/model-tiers\")); absent bridge means tier mode is off.\nfunction isModelTierModeEnabled(): boolean {\n\ttry {\n\t\tconst bridge = (globalThis as Record<symbol, unknown>)[Symbol.for(\"@lunr/model-tiers\")] as\n\t\t\t| { isTierModeEnabled?: () => unknown }\n\t\t\t| undefined;\n\t\treturn typeof bridge?.isTierModeEnabled === \"function\" && bridge.isTierModeEnabled() === true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n"]}
@@ -5,83 +5,68 @@ import { getAgentDir, getProjectConfigDir } from "../shared/utils.js";
5
5
  const CUSTOM_TOOL_DESCRIPTION_FILE = "subagent-tool-description.md";
6
6
  const CUSTOM_TOOL_DESCRIPTION_MAX_BYTES = 50 * 1024;
7
7
  export const SUBAGENT_SAFETY_GUIDANCE = `SAFETY-CRITICAL SUBAGENT GUIDANCE:
8
- Use { action: "list" } before execution and only run executable/non-disabled agents or chains.
9
- Keep execution and management separate: omit action for SINGLE/PARALLEL/CHAIN execution; use action only for list/get/models/create/update/delete/status/interrupt/stop/resume/append-step/doctor.
10
- Async/background runs: launch with async:true only when work can proceed independently. Do not sleep or poll status just to wait. In an interactive session, normally return control and let Pi wake you; use subagent_wait when this request must run to completion in the current turn or skill. Headless sessions auto-drain current-session work.
11
- Child-safety boundary: ordinary child subagents are not orchestrators and must not run subagents. Only explicitly configured fanout children may use the child-safe subagent tool, still bounded by depth/session limits.
12
- Writing/review safety: keep one writer for the same cwd/worktree. Use fresh-context read-only reviewers/validators for independent review, then have the parent synthesize and apply fixes as the sole writer unless an isolated worktree was intentionally requested.
8
+ Prompt children directly. There is no agent roster. Every execution task needs task (the full child prompt) and description (a concise UI label).
9
+ permissions is "full" or "read-only". Omitted permissions means full. Plan-mode parents must pass permissions: "read-only"; full or omitted launches are rejected.
10
+ Keep execution and control separate: omit action for SINGLE/PARALLEL/CHAIN execution; use action only for status/interrupt/stop/resume/steer/append-step/doctor/watchdog.*/schedule*.
11
+ Async/background runs: launch with async:true only when work can proceed independently. Do not sleep or poll status just to wait. In an interactive session, normally return control and let lunR wake you; use subagent_wait when this request must run to completion in the current turn or skill. Headless sessions auto-drain current-session work.
12
+ Child-safety boundary: ordinary children are not orchestrators and must not run subagents. Only explicitly configured fanout children may use the child-safe subagent tool, still bounded by depth/session limits.
13
+ • Writing/review safety: keep one full-access writer for the same cwd/worktree. Use fresh-context permissions: "read-only" children for independent review, then have the parent synthesize and apply fixes as the sole writer unless an isolated worktree was intentionally requested.
13
14
  • Artifacts/status essentials: chain outputs live under {chain_dir}; async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: "status", id }. Include output paths and residual risks when reporting results.`;
14
- export const FULL_SUBAGENT_TOOL_DESCRIPTION = `Delegate to subagents or manage agent definitions.
15
+ export const FULL_SUBAGENT_TOOL_DESCRIPTION = `Delegate work to generic children by prompting them directly. There are no named agent types.
15
16
 
16
17
  EXECUTION (use exactly ONE mode):
17
- Before executing, use { action: "list" } to inspect configured agents/chains. Only execute agents listed as executable/non-disabled.
18
- SINGLE: { agent, task? } - one task; omit task for self-contained agents. Multiple SINGLE calls in the same turn run concurrently (capped).
19
- • CHAIN: { chain: [{agent:"agent-a"}, {parallel:[{agent:"agent-b",count:3}]}] } - sequential pipeline with optional parallel fan-out. Use chain when a later child needs an earlier result.
20
- PARALLEL: { tasks: [{agent,task,count?,output?,reads?,progress?}, ...], concurrency?: number, worktree?: true } - one-call concurrent execution (default: all tasks at once; worktree: isolate each task in a git worktree)
18
+ SINGLE: { task, description, permissions? } one child. Multiple SINGLE calls in the same turn run concurrently; explicit concurrency/run limits still apply.
19
+ PARALLEL: { tasks: [{task, description, permissions?, count?, output?, reads?, progress?}, ...], concurrency?: number, worktree?: true } one-call concurrent execution (default: all tasks at once; worktree: isolate each task in a git worktree)
20
+ • CHAIN: { chain: [{task, description, permissions?}, {parallel:[{task, description, permissions?, count:3}]}] } sequential pipeline with optional parallel fan-out. Use chain when a later child needs an earlier result.
21
+ description is required, single-line, max 80 characters. It is UI metadata only. task is the complete child prompt.
22
+ • permissions: "full" (default) or "read-only". Full includes coding tools (read, search, shell, edit, write, web, LSP, MCP) and excludes parent-owned tools (cron, memory, behavior, goals, nested subagents). Plan-mode parents may launch only permissions: "read-only".
21
23
  • Children always start with a fresh session (no inherited parent transcript). Model strings accept a thinking suffix (provider/model:off|minimal|low|medium|high|xhigh|max).
22
24
  • Optional timeout: { timeoutMs } or { maxRuntimeMs } sets a run-level max runtime for foreground and async/background runs
23
- • If { action: "list" } shows proactive skill subagent suggestions, consider a small fresh-context fanout for broad tasks where one of those skills would materially help
24
25
 
25
- CHAIN TEMPLATE VARIABLES (use in task strings):
26
+ CHAIN TEMPLATE VARIABLES (use in task and description strings):
26
27
  • {task} - The original task/request from the user
27
28
  • {previous} - Text response from the previous step (empty for first step)
28
29
  • {chain_dir} - Shared directory for chain files (e.g., <tmpdir>/pi-subagents-<scope>/chain-runs/abc123/)
29
30
 
30
- CHAIN EXAMPLES (quick reference for the nested schema):
31
- • Sequential: { chain: [{agent:"agent-a", task:"Analyze {task}"}, {agent:"agent-b", task:"Plan based on {previous}"}] }
32
- • Parallel fan-out: { chain: [{parallel: [{agent:"agent-a", task:"Check part of {task}", count: 3}]}] }
33
- • Mixed: { chain: [{agent:"agent-a", task:"Research {task}"}, {parallel: [{agent:"agent-b", task:"Review {previous}", count: 2}]}, {agent:"agent-c", task:"Summarize {previous}"}] }
31
+ CHAIN EXAMPLES:
32
+ • Sequential: { chain: [{task:"Analyze {task}", description:"Analyze request"}, {task:"Plan based on {previous}", description:"Draft plan"}] }
33
+ • Parallel fan-out: { chain: [{parallel: [{task:"Check part of {task}", description:"Check one part", permissions:"read-only", count: 3}]}] }
34
+ • Mixed: { chain: [{task:"Research {task}", description:"Research request", permissions:"read-only"}, {parallel: [{task:"Review {previous}", description:"Review findings", permissions:"read-only", count: 2}]}, {task:"Summarize {previous}", description:"Summarize reviews"}] }
34
35
 
35
- MANAGEMENT (use action field, omit agent/task/chain/tasks):
36
- • { action: "list" } - discover executable agents/chains
37
- • { action: "get", agent: "name" } - full detail; packaged agents use dotted runtime names like "package.agent"
38
- • { action: "models", agent?: "name" } - show the runtime-loaded builtin subagent model mapping, optionally filtered to one builtin
36
+ CONTROL (use action field, omit task/chain/tasks):
39
37
  • { action: "watchdog.status" | "watchdog.check" | "watchdog.recommend-model" } - inspect the opt-in subagent watchdog and its strong complementary model recommendation
40
- • { action: "watchdog.configure", model: "recommended" | "inherit" | "provider/model[:thinking]", scope?: "session" | "user" | "project", target?: "main" | "children" | "child", agent?: "name", thinking?: "inherit" | "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" } - configure watchdog model selection; default scope is session, use persistent scopes only when the user asks
41
- • { action: "create", config: { name: "custom-agent", package: "code-analysis", systemPrompt, systemPromptMode, inheritProjectContext, inheritSkills, acceptance, acceptanceRole: "read-only" | "writer", ... } }
42
- • acceptanceRole affects inferred acceptance only, never tool access. Explicit task mutation/no-edit intent wins; omission preserves name heuristics. Update with false or an empty string to clear it.
43
- • { action: "update", agent: "code-analysis.custom-agent", config: { package: "analysis", ... } } - merge
44
- • { action: "delete", agent: "code-analysis.custom-agent" }
45
- • { action: "eject", agent: "reviewer", agentScope?: "user" | "project" } - copy a bundled/package agent to user/project scope as an editable custom file that shadows the original (default scope: user)
46
- • { action: "disable", agent: "reviewer", agentScope?: "user" | "project" } - hide any agent from runtime discovery via a reversible settings override (default scope: user)
47
- • { action: "enable", agent: "reviewer", agentScope?: "user" | "project" } - remove a disabled override and restore discovery
48
- • { action: "reset", agent: "reviewer", agentScope?: "user" | "project" } - delete the scope's custom agent file and/or settings override, restoring the bundled default
49
- • Use chainName for chain operations; packaged chains also use dotted runtime names
50
-
51
- CONTROL:
38
+ • { action: "watchdog.configure", model: "recommended" | "inherit" | "provider/model[:thinking]", scope?: "session" | "user" | "project", target?: "main" | "children", thinking?: "inherit" | "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" } - configure watchdog model selection; default scope is session, use persistent scopes only when the user asks
52
39
  • { action: "status", id: "..." } - inspect an async/background run by id or prefix
53
40
  • { action: "status", view: "fleet" } - read-only active foreground/async fleet view with transcript commands
54
41
  • { action: "status", id: "...", view: "transcript", index?: 0, lines?: 80 } - tail a run or child output/session transcript
55
42
  • { action: "interrupt", id?: "..." } - soft-interrupt the current child turn and leave the run paused
56
43
  • { action: "stop", id: "..." } - stop a current-session top-level async run; stopped runs finish with state "stopped"
57
44
  • { action: "resume", id: "...", message: "...", index?: 0 } - interrupt then follow up with a live async child, or revive a completed async/foreground child from its session
58
- • { action: "steer", id: "...", message: "...", index?: 0 } - await correlated child-Pi input acceptance for up to 3 seconds; returns delivered, scheduled, pending, partial, recovered, or failed with a request id. Only top-level single runs may recover after a further 15-second pause/revival bound; chain, parallel, and nested runs never auto-interrupt.
59
- • { action: "append-step", id: "...", chain: [{agent:"agent-c", task:"Use {previous}"}] } - append one step to the tail of a running async chain
45
+ • { action: "steer", id: "...", message: "...", index?: 0 } - await correlated child input acceptance for up to 3 seconds; returns delivered, scheduled, pending, partial, recovered, or failed with a request id. Only top-level single runs may recover after a further 15-second pause/revival bound; chain, parallel, and nested runs never auto-interrupt.
46
+ • { action: "append-step", id: "...", chain: [{task:"Use {previous}", description:"Follow-up step"}] } - append one step to the tail of a running async chain
60
47
 
61
48
  SCHEDULE (opt-in; requires { "scheduledRuns": { "enabled": true } } in config.json):
62
- • { action: "schedule", agent, task?, schedule: "+10m" | "2030-01-01T09:00:00Z", scheduleName? } - defer a subagent launch until a future time. Also accepts tasks[] or chain[]. Scheduled runs always launch async with fresh context; they become normal tracked async runs once they fire. Only schedule explicit delayed runs the user asked for.
49
+ • { action: "schedule", task, description, permissions?, schedule: "+10m" | "2030-01-01T09:00:00Z", scheduleName? } - defer a child launch until a future time. Also accepts tasks[] or chain[]. Scheduled runs always launch async with fresh context; they become normal tracked async runs once they fire. Only schedule explicit delayed runs the user asked for.
63
50
  • { action: "schedule-list" } - list scheduled runs for this session
64
51
  • { action: "schedule-status", id: "..." } - inspect one scheduled run
65
52
  • { action: "schedule-cancel", id: "..." } - cancel a scheduled run before it fires
66
53
 
67
54
  DIAGNOSTICS:
68
- • { action: "doctor" } - read-only report for runtime paths, discovery, sessions, and intercom
55
+ • { action: "doctor" } - read-only report for runtime paths, sessions, and intercom
69
56
 
70
57
  ${SUBAGENT_SAFETY_GUIDANCE}`;
71
- export const COMPACT_SUBAGENT_TOOL_DESCRIPTION = `Delegate to subagents or manage definitions. Use exactly one mode per call.
58
+ export const COMPACT_SUBAGENT_TOOL_DESCRIPTION = `Delegate to generic children by prompting them. Use exactly one mode per call.
72
59
 
73
60
  EXECUTE:
74
- Before execution, call { action: "list" }; run only executable/non-disabled configured agents/chains.
75
- SINGLE {agent, task?} (same-turn singles overlap); PARALLEL {tasks:[{agent,task,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{agent,task?},{parallel:[...]}]} for sequential work.
61
+ SINGLE {task, description, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,permissions?},{parallel:[...]}]} for sequential work.
62
+ description is required (single-line, max 80 chars, UI only). task is the full child prompt. permissions omitted = full. Plan-mode parents must pass permissions:"read-only".
76
63
  • Children always start with a fresh session. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.
77
64
  • Chain templates may use {task}, {previous}, {chain_dir}, and named outputs. Parallel worktree isolation requires a clean git repo.
78
- • Chain example: { chain: [{agent:"agent-a", task:"Analyze {task}"}, {parallel: [{agent:"agent-b", task:"Check {previous}", count: 3}]}] }
79
- • If list shows proactive skill subagent suggestions, use a small fresh-context fanout only when the task is broad enough.
65
+ • Chain example: { chain: [{task:"Analyze {task}", description:"Analyze request"}, {parallel: [{task:"Check {previous}", description:"Check prior result", permissions:"read-only", count: 3}]}] }
80
66
 
81
- MANAGE / CONTROL:
82
- • Use action without execution fields: list, get, models, create, update, delete, eject, disable, enable, reset, doctor, watchdog.status, watchdog.check, watchdog.recommend-model, watchdog.configure.
83
- Agent acceptanceRole (read-only or writer) affects inferred acceptance only, never tools. Explicit task intent wins; omission keeps name heuristics. Update with false or an empty string to clear it.
84
- • Async control actions: status, interrupt, stop, resume, steer, append-step. Use stop with an id for current-session top-level async runs. Use status view:"fleet" for active-run overview, view:"transcript" to tail child output, and steer for acknowledged live guidance. Steering delivery means Pi accepted the correlated user input, not model compliance; use index for a specific child.
67
+ CONTROL:
68
+ • Use action without execution fields: doctor, watchdog.status, watchdog.check, watchdog.recommend-model, watchdog.configure, status, interrupt, stop, resume, steer, append-step.
69
+ Async control actions: status, interrupt, stop, resume, steer, append-step. Use stop with an id for current-session top-level async runs. Use status view:"fleet" for active-run overview, view:"transcript" to tail child output, and steer for acknowledged live guidance. Steering delivery means lunR accepted the correlated user input, not model compliance; use index for a specific child.
85
70
  • Opt-in schedule actions: schedule, schedule-list, schedule-status, schedule-cancel. Schedule only explicit delayed runs the user asked for.
86
71
 
87
72
  ASYNC / WAIT:
@@ -89,8 +74,8 @@ ASYNC / WAIT:
89
74
  • Status and artifacts live under asyncId/asyncDir with status.json, events.jsonl, output logs, session files, and { action:"status", id:"..." }.
90
75
 
91
76
  SAFETY:
92
- • Ordinary child subagents are not orchestrators and must not run subagents. Only explicit fanout children may use child-safe subagent, still bounded by depth/session limits.
93
- • Keep one writer per cwd/worktree. Use fresh read-only review/validation fanout, then synthesize and apply fixes from the parent unless isolated worktrees were intentionally requested.`;
77
+ • Ordinary children are not orchestrators and must not run subagents. Only explicit fanout children may use child-safe subagent, still bounded by depth/session limits.
78
+ • Keep one full-access writer per cwd/worktree. Use fresh permissions:"read-only" review/validation fanout, then synthesize and apply fixes from the parent unless isolated worktrees were intentionally requested.`;
94
79
  function isToolDescriptionMode(value) {
95
80
  return value === "full" || value === "compact" || value === "custom";
96
81
  }