@ashx-j/lunr 0.2.19 → 0.2.21

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 (259) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/README.md +2 -2
  3. package/dist/builtin-extensions/index.d.ts.map +1 -1
  4. package/dist/builtin-extensions/index.js +0 -2
  5. package/dist/builtin-extensions/index.js.map +1 -1
  6. package/dist/builtin-extensions/lunr-todos.d.ts +6 -5
  7. package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
  8. package/dist/builtin-extensions/lunr-todos.js +9 -7
  9. package/dist/builtin-extensions/lunr-todos.js.map +1 -1
  10. package/dist/builtin-extensions/pi-intercom/broker/spawn.d.ts +6 -4
  11. package/dist/builtin-extensions/pi-intercom/broker/spawn.d.ts.map +1 -1
  12. package/dist/builtin-extensions/pi-intercom/broker/spawn.js +114 -61
  13. package/dist/builtin-extensions/pi-intercom/broker/spawn.js.map +1 -1
  14. package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
  15. package/dist/builtin-extensions/pi-intercom/index.js +360 -351
  16. package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
  17. package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.d.ts.map +1 -1
  18. package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js +2 -2
  19. package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js.map +1 -1
  20. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +8 -6
  21. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  22. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +128 -57
  23. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  24. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts +18 -8
  25. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
  26. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +38 -13
  27. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
  28. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -3
  29. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
  30. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +24 -14
  31. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
  32. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts +8 -1
  33. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
  34. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +247 -18
  35. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
  36. package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.d.ts +1 -0
  37. package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.d.ts.map +1 -1
  38. package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.js +1 -1
  39. package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.js.map +1 -1
  40. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts +29 -0
  41. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts.map +1 -0
  42. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js +179 -0
  43. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js.map +1 -0
  44. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts +89 -0
  45. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts.map +1 -0
  46. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js +541 -0
  47. package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js.map +1 -0
  48. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +11 -1
  49. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
  50. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +38 -12
  51. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
  52. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +1 -1
  53. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js +3 -2
  54. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js.map +1 -1
  55. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts +2 -1
  56. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -1
  57. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js +35 -8
  58. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js.map +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts +7 -3
  60. package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts.map +1 -1
  61. package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js +26 -4
  62. package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js.map +1 -1
  63. package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.d.ts +1 -0
  64. package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.d.ts.map +1 -1
  65. package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js +55 -38
  66. package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js.map +1 -1
  67. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts +100 -0
  68. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
  69. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +46 -31
  70. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
  71. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +3 -6
  72. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
  73. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +64 -5
  74. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
  75. package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.d.ts +15 -2
  76. package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.d.ts.map +1 -1
  77. package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.js +14 -4
  78. package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.js.map +1 -1
  79. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
  80. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +2 -1
  81. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
  82. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
  83. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +21 -8
  84. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
  85. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
  86. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +1 -1
  87. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
  88. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts +0 -1
  89. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  90. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +71 -25
  91. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
  92. package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts +2 -0
  93. package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts.map +1 -1
  94. package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js +75 -18
  95. package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js.map +1 -1
  96. package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.d.ts +1 -1
  97. package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.d.ts.map +1 -1
  98. package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.js +1 -1
  99. package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.js.map +1 -1
  100. package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts +13 -1
  101. package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts.map +1 -1
  102. package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js +67 -11
  103. package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js.map +1 -1
  104. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +1 -0
  105. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
  106. package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
  107. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +3 -0
  108. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
  109. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +7 -2
  110. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
  111. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
  112. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +13 -3
  113. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
  114. package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts +2 -2
  115. package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts.map +1 -1
  116. package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js +5 -10
  117. package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js.map +1 -1
  118. package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.d.ts +2 -0
  119. package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.d.ts.map +1 -0
  120. package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.js +3 -0
  121. package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.js.map +1 -0
  122. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts +3 -0
  123. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -1
  124. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +68 -11
  125. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
  126. package/dist/builtin-extensions/pi-subagents/src/shared/formatters.d.ts +12 -1
  127. package/dist/builtin-extensions/pi-subagents/src/shared/formatters.d.ts.map +1 -1
  128. package/dist/builtin-extensions/pi-subagents/src/shared/formatters.js +21 -2
  129. package/dist/builtin-extensions/pi-subagents/src/shared/formatters.js.map +1 -1
  130. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +21 -4
  131. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
  132. package/dist/builtin-extensions/pi-subagents/src/shared/types.js +1 -1
  133. package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
  134. package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.d.ts.map +1 -1
  135. package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.js.map +1 -1
  136. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +7 -0
  137. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
  138. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +11 -7
  139. package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
  140. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +6 -0
  141. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
  142. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +46 -29
  143. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
  144. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +46 -4
  145. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  146. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +407 -450
  147. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  148. package/dist/builtin-extensions/pi-subagents/src/watchdog/register-main.d.ts.map +1 -1
  149. package/dist/builtin-extensions/pi-subagents/src/watchdog/register-main.js +1 -1
  150. package/dist/builtin-extensions/pi-subagents/src/watchdog/register-main.js.map +1 -1
  151. package/dist/builtin-extensions/pi-subagents/src/watchdog/tool-actions.d.ts +2 -13
  152. package/dist/builtin-extensions/pi-subagents/src/watchdog/tool-actions.d.ts.map +1 -1
  153. package/dist/builtin-extensions/pi-subagents/src/watchdog/tool-actions.js +5 -91
  154. package/dist/builtin-extensions/pi-subagents/src/watchdog/tool-actions.js.map +1 -1
  155. package/dist/core/customize.d.ts +2 -0
  156. package/dist/core/customize.d.ts.map +1 -1
  157. package/dist/core/customize.js +3 -0
  158. package/dist/core/customize.js.map +1 -1
  159. package/dist/core/permissions.d.ts +1 -0
  160. package/dist/core/permissions.d.ts.map +1 -1
  161. package/dist/core/permissions.js +8 -4
  162. package/dist/core/permissions.js.map +1 -1
  163. package/dist/core/plan-mode.d.ts.map +1 -1
  164. package/dist/core/plan-mode.js +0 -5
  165. package/dist/core/plan-mode.js.map +1 -1
  166. package/dist/core/runtime-bridges.d.ts.map +1 -1
  167. package/dist/core/runtime-bridges.js +0 -2
  168. package/dist/core/runtime-bridges.js.map +1 -1
  169. package/dist/core/settings-manager.d.ts +4 -0
  170. package/dist/core/settings-manager.d.ts.map +1 -1
  171. package/dist/core/settings-manager.js +11 -0
  172. package/dist/core/settings-manager.js.map +1 -1
  173. package/dist/core/subagent-cancellation.d.ts +21 -0
  174. package/dist/core/subagent-cancellation.d.ts.map +1 -0
  175. package/dist/core/subagent-cancellation.js +53 -0
  176. package/dist/core/subagent-cancellation.js.map +1 -0
  177. package/dist/core/subagent-spinner-setting.d.ts +6 -0
  178. package/dist/core/subagent-spinner-setting.d.ts.map +1 -0
  179. package/dist/core/subagent-spinner-setting.js +12 -0
  180. package/dist/core/subagent-spinner-setting.js.map +1 -0
  181. package/dist/core/subagent-spinner.d.ts +4 -0
  182. package/dist/core/subagent-spinner.d.ts.map +1 -0
  183. package/dist/core/subagent-spinner.js +6 -0
  184. package/dist/core/subagent-spinner.js.map +1 -0
  185. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  186. package/dist/modes/interactive/components/assistant-message.js +12 -18
  187. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  188. package/dist/modes/interactive/components/settings-selector.d.ts +4 -0
  189. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  190. package/dist/modes/interactive/components/settings-selector.js +73 -1
  191. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  192. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  193. package/dist/modes/interactive/components/tool-execution.js +12 -0
  194. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  195. package/dist/modes/interactive/extension-widget-order.d.ts +8 -0
  196. package/dist/modes/interactive/extension-widget-order.d.ts.map +1 -0
  197. package/dist/modes/interactive/extension-widget-order.js +37 -0
  198. package/dist/modes/interactive/extension-widget-order.js.map +1 -0
  199. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  200. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  201. package/dist/modes/interactive/interactive-mode.js +44 -22
  202. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  203. package/dist/node-runtime/{agent-session-services-35WNVGMR.js → agent-session-services-C743TYQE.js} +6 -5
  204. package/dist/node-runtime/{builtin-extensions-322XDDEM.js → builtin-extensions-JCOPAAB5.js} +3 -2
  205. package/dist/node-runtime/{chunk-XATUM2HK.js → chunk-25I2BHAA.js} +1 -1
  206. package/dist/node-runtime/{chunk-TXHKBRHZ.js → chunk-2BUAYZ7K.js} +136 -53
  207. package/dist/node-runtime/chunk-5ZH3ZFIZ.js +308 -0
  208. package/dist/node-runtime/{chunk-J26TSGDL.js → chunk-6N22HULO.js} +8 -5
  209. package/dist/node-runtime/chunk-A3KMVBZV.js +60 -0
  210. package/dist/node-runtime/{chunk-4FX25LWP.js → chunk-AWVD5IEY.js} +20 -421
  211. package/dist/node-runtime/{chunk-ZRCBN365.js → chunk-GB2MGFLI.js} +12 -12
  212. package/dist/node-runtime/chunk-LISUTZS3.js +19 -0
  213. package/dist/node-runtime/{chunk-PNJSG3IZ.js → chunk-LTYWTR3V.js} +1 -369
  214. package/dist/node-runtime/{chunk-TFBIJTM3.js → chunk-PDNXVXMD.js} +13 -13
  215. package/dist/node-runtime/{chunk-MCUNIRD5.js → chunk-SY2TFMLO.js} +532 -261
  216. package/dist/node-runtime/{chunk-HQCKFM2O.js → chunk-VGYZ3APQ.js} +3 -0
  217. package/dist/node-runtime/{chunk-4DJ6HEGH.js → chunk-VZR3NCM7.js} +3 -3
  218. package/dist/node-runtime/chunk-W3SILANP.js +24 -0
  219. package/dist/node-runtime/{chunk-CBGB57XT.js → chunk-WLLDXJRT.js} +10 -0
  220. package/dist/node-runtime/{chunk-ATGA2WLC.js → chunk-XI77KVKA.js} +399 -36
  221. package/dist/node-runtime/{chunk-4CSFRBCN.js → chunk-Y5KOEMBH.js} +1 -1
  222. package/dist/node-runtime/{chunk-AROOY4BB.js → chunk-YMEAYRBE.js} +1 -1
  223. package/dist/node-runtime/{command-DWUM5X3U.js → command-P4NYCJ2M.js} +1 -1
  224. package/dist/node-runtime/{customize-XEXL2DGQ.js → customize-LF5VST47.js} +1 -1
  225. package/dist/node-runtime/{gateway-UZXMFGWY.js → gateway-BM6NLOH4.js} +2 -2
  226. package/dist/node-runtime/index.js +16 -13
  227. package/dist/node-runtime/{interactive-mode-QT5IKGQ5.js → interactive-mode-EVVBA64D.js} +11 -8
  228. package/dist/node-runtime/{lunr-cron-QPBTKBGI.js → lunr-cron-4VHP4E4B.js} +2 -2
  229. package/dist/node-runtime/main.js +14 -12
  230. package/dist/node-runtime/{package-manager-cli-7RKSZGEN.js → package-manager-cli-N37546V5.js} +5 -4
  231. package/dist/node-runtime/{pi-intercom-EEMBGQID.js → pi-intercom-NV2LW6X7.js} +108 -87
  232. package/dist/node-runtime/{pi-subagents-7YJ3I4VE.js → pi-subagents-6MUIFNDM.js} +1262 -599
  233. package/dist/node-runtime/rpc-entry.js +14 -12
  234. package/dist/node-runtime/{runtime-bridges-3RKBDLNA.js → runtime-bridges-2VQTLPOZ.js} +3 -5
  235. package/dist/node-runtime/{settings-manager-GHPTUN7R.js → settings-manager-CUGAZWAB.js} +2 -1
  236. package/dist/node-runtime/{subagent-executor-5Q5A4HJ2.js → subagent-executor-MH4A7CCF.js} +181 -294
  237. package/dist/node-runtime/{update-cli-L3JIBH2U.js → update-cli-XTZMZGOL.js} +2 -1
  238. package/docs/features.md +22 -4
  239. package/docs/keybindings.md +3 -1
  240. package/docs/settings.md +3 -2
  241. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  242. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  243. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  244. package/examples/extensions/gondolin/package-lock.json +2 -2
  245. package/examples/extensions/gondolin/package.json +1 -1
  246. package/examples/extensions/sandbox/package-lock.json +2 -2
  247. package/examples/extensions/sandbox/package.json +1 -1
  248. package/examples/extensions/with-deps/package-lock.json +2 -2
  249. package/examples/extensions/with-deps/package.json +1 -1
  250. package/package.json +4 -4
  251. package/dist/builtin-extensions/lunr-settings-tools.d.ts +0 -4
  252. package/dist/builtin-extensions/lunr-settings-tools.d.ts.map +0 -1
  253. package/dist/builtin-extensions/lunr-settings-tools.js +0 -120
  254. package/dist/builtin-extensions/lunr-settings-tools.js.map +0 -1
  255. package/dist/core/settings-tools-bridge.d.ts +0 -35
  256. package/dist/core/settings-tools-bridge.d.ts.map +0 -1
  257. package/dist/core/settings-tools-bridge.js +0 -56
  258. package/dist/core/settings-tools-bridge.js.map +0 -1
  259. package/dist/node-runtime/chunk-3NMWLTPV.js +0 -64
@@ -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,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,gFAAgF;QAChF,IAAI,GAAG,KAAK,aAAa,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC;YAAE,SAAS;QACpG,IAAI,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C,IAAI,CAAC,MAAM,CAAC;QAC/B,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC;QACpC,WAAW,EAAE,qHAAqH;KAClI,CAAC,CAAC;IACH,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC;CAC7C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,iCAAiC,CAAC,oBAAoB,CAAC,CAAC;AAEtF,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,WAAW,EAAE,6JAA6J;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\t// `description` is both JSON Schema help text and the child UI-label parameter.\n\t\tif (key === \"description\" && !isPropertiesMap(path) && !isTopLevelParameterHelpText(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 isPropertiesMap(path: string[]): boolean {\n\treturn path[path.length - 1] === \"properties\";\n}\n\nfunction isTopLevelParameterHelpText(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: required 3-tier subagent routing, resolved through the @lunr/model-tiers bridge.\nconst TierOverride = Type.String({\n\tenum: [\"light\", \"standard\", \"heavy\"],\n\tdescription: \"Required model tier: 'light' for simple/fast work, 'standard' for typical coding, or 'heavy' for complex reasoning. The configured tier model must be available and authenticated.\",\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\ttier: TierOverride,\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\ttier: TierOverride,\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\ttier: TierOverride,\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\ttier: TierOverride,\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, tier, permissions?} for sequential, {parallel: [...]} for static concurrent execution, or {expand, parallel: {...}, collect} for dynamic fanout. Every executable child requires tier.\",\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, tier, 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\ttier: Type.Optional(Type.String({\n\t\tenum: [\"light\", \"standard\", \"heavy\"],\n\t\tdescription: \"Required for SINGLE execution. Omit for control actions; PARALLEL and CHAIN children carry their own required tier.\",\n\t})),\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,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AAW,EAAE,kLAAkL;KAC/L,CAAC,CAAC;IACH,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,WAAW,EAAE,yMAAyM;KACtN,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\t// `description` is both JSON Schema help text and the child UI-label parameter.\n\t\tif (key === \"description\" && !isPropertiesMap(path) && !isTopLevelParameterHelpText(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 isPropertiesMap(path: string[]): boolean {\n\treturn path[path.length - 1] === \"properties\";\n}\n\nfunction isTopLevelParameterHelpText(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\nconst TIER_SELECTION_DESCRIPTION = \"Choose the lowest model tier that can reliably complete the task: 'light' for quick checks, fact gathering, and small code inspections; 'standard' for everyday coding, clearly described bugs, and focused reviews; 'heavy' for complex implementation, difficult debugging, architectural decisions, and large or high-risk reviews.\";\n\n// lunr: choose exactly one of tier or model per executable child.\nconst TierOverride = Type.Optional(Type.String({\n\tenum: [\"light\", \"standard\", \"heavy\"],\n\tdescription: `Required by default. ${TIER_SELECTION_DESCRIPTION} Do not combine with model. The configured tier model must be available and authenticated.`,\n}));\n\nconst ModelOverride = Type.Optional(Type.String({\n\tminLength: 1,\n\tdescription: \"Explicit provider/model id only when the user names a model. Do not combine with tier. Optional thinking belongs in the thinking field or as a known :level suffix.\",\n}));\n\nconst ThinkingOverride = Type.Optional(Type.String({\n\tenum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n\tdescription: \"Thinking level for an explicit model launch. Omit for tier launches (they use configured tier thinking).\",\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\ttier: TierOverride,\n\tmodel: ModelOverride,\n\tthinking: ThinkingOverride,\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\ttier: TierOverride,\n\tmodel: ModelOverride,\n\tthinking: ThinkingOverride,\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\ttier: TierOverride,\n\tmodel: ModelOverride,\n\tthinking: ThinkingOverride,\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\ttier: TierOverride,\n\tmodel: ModelOverride,\n\tthinking: ThinkingOverride,\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, tier|model, permissions?} for sequential, {parallel: [...]} for static concurrent execution, or {expand, parallel: {...}, collect} for dynamic fanout. Every executable child needs exactly one of tier or model.\",\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\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, tier|model, thinking?, 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 async in the background. Defaults to true when omitted; set false for immediate foreground results.\" })),\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 the interactive TUI preview/editor before execution. clarify:true keeps the run foreground even when async is omitted or true.\" })),\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\ttier: Type.Optional(Type.String({\n\t\tenum: [\"light\", \"standard\", \"heavy\"],\n\t\tdescription: `Preferred for SINGLE execution. Required by default. Omit for control actions. Do not combine with model; PARALLEL and CHAIN children carry their own tier or model. ${TIER_SELECTION_DESCRIPTION}`,\n\t})),\n\tmodel: Type.Optional(Type.String({\n\t\tminLength: 1,\n\t\tdescription: \"Explicit provider/model for SINGLE execution only when the user names a model. Do not combine with tier.\",\n\t})),\n\tthinking: Type.Optional(Type.String({\n\t\tenum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n\t\tdescription: \"Thinking level for an explicit model launch. Tier launches use configured tier thinking instead.\",\n\t})),\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\tquestionId: Type.Optional(Type.String({\n\t\tdescription: \"Wait for one supervisor question id from subagent_supervisor action='ask'. Returns when that question is answered, expired, or cancelled. Separate from final async run results.\",\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 or questionId targets one item.\",\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,8 @@
1
1
  import type { ExtensionConfig, ToolDescriptionMode } from "../shared/types.ts";
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 Every executable child also needs tier: \"light\", \"standard\", or \"heavy\". Direct model overrides and parent-model inheritance are not available. A missing, disabled, unconfigured, unavailable, or unauthenticated tier fails before launch.\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, tier, 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, tier, 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, tier, permissions?}, {parallel:[{task, description, tier, 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 Every executable child requires tier: \"light\", \"standard\", or \"heavy\". Direct model overrides and parent-model inheritance are rejected. The configured tier model and credentials must be available.\n\u2022 Children always start with a fresh session (no inherited parent transcript).\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\", tier:\"standard\"}, {task:\"Plan based on {previous}\", description:\"Draft plan\", tier:\"heavy\"}] }\n\u2022 Parallel fan-out: { chain: [{parallel: [{task:\"Check part of {task}\", description:\"Check one part\", tier:\"light\", permissions:\"read-only\", count: 3}]}] }\n\u2022 Mixed: { chain: [{task:\"Research {task}\", description:\"Research request\", tier:\"standard\", permissions:\"read-only\"}, {parallel: [{task:\"Review {previous}\", description:\"Review findings\", tier:\"light\", permissions:\"read-only\", count: 2}]}, {task:\"Summarize {previous}\", description:\"Summarize reviews\", tier:\"standard\"}] }\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\", tier:\"standard\"}] } - 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, tier, 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 Every executable child also needs tier: \"light\", \"standard\", or \"heavy\". Direct model overrides and parent-model inheritance are not available. A missing, disabled, unconfigured, unavailable, or unauthenticated tier fails before launch.\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, tier, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,tier,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,tier,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 Every executable child requires tier:\"light\"|\"standard\"|\"heavy\". Direct model overrides and parent-model inheritance are rejected; tier resolution fails closed. 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\", tier:\"standard\"}, {parallel: [{task:\"Check {previous}\", description:\"Check prior result\", tier:\"light\", 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.";
2
+ export declare const SUBAGENT_TIER_GUIDANCE = "TIER SELECTION:\n\u2022 Choose the lowest tier that can reliably complete the task.\n\u2022 light: Use for simple, straightforward tasks that require little reasoning. Good for quick checks, finding information, collecting facts for research, inspecting a small amount of code, or verifying a specific fact.\n\u2022 standard: Use for moderately difficult work and everyday coding tasks. Good for writing simple code, fixing a clearly described bug, reviewing a focused change, or completing work with clear requirements. Use heavy when the task requires deep architectural understanding or complex reasoning.\n\u2022 heavy: Use for complex or ambiguous tasks that require deep reasoning and strong code understanding. Good for implementing complex plans, debugging difficult or poorly understood problems, reviewing large or high-risk changes, and making architectural decisions.";
3
+ 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 Every executable child chooses exactly one of tier: \"light\"|\"standard\"|\"heavy\" (default) or model: \"provider/id\" when the user names a model. Do not pass both, and do not use inherit. Missing, disabled, unconfigured, unavailable, or unauthenticated selections fail before launch.\n\u2022 Optional thinking (off/minimal/low/medium/high/xhigh/max) is only valid with an explicit model. Tier launches use the configured tier thinking level.\nTIER SELECTION:\n\u2022 Choose the lowest tier that can reliably complete the task.\n\u2022 light: Use for simple, straightforward tasks that require little reasoning. Good for quick checks, finding information, collecting facts for research, inspecting a small amount of code, or verifying a specific fact.\n\u2022 standard: Use for moderately difficult work and everyday coding tasks. Good for writing simple code, fixing a clearly described bug, reviewing a focused change, or completing work with clear requirements. Use heavy when the task requires deep architectural understanding or complex reasoning.\n\u2022 heavy: Use for complex or ambiguous tasks that require deep reasoning and strong code understanding. Good for implementing complex plans, debugging difficult or poorly understood problems, reviewing large or high-risk changes, and making architectural decisions.\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.status|check|recommend-model/schedule*.\n\u2022 Subagents run async by default. Set async:false when you need the result immediately and have no independent work to do, or need an interactive preview. Otherwise continue independent work or yield for normal interactive completion. Use subagent_wait for same-turn or skill completion. Headless sessions auto-drain current-session work. Use status for one-time inspection. Do not poll or sleep to wait.\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 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, tier|model, thinking?, 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, tier|model, thinking?, 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, tier|model, thinking?, permissions?}, {parallel:[{task, description, tier|model, thinking?, 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 Model selection: pass tier by default (\"light\"|\"standard\"|\"heavy\"). Pass model: \"provider/id\" only when the user specifies a model. Exactly one of tier or model. Optional thinking only with model; tier uses configured thinking. Direct model launches do not require tier mode to be enabled. No inherit and no silent fallback for an explicit model.\n\u2022 Children always start with a fresh session (no inherited parent transcript).\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\", tier:\"standard\"}, {task:\"Plan based on {previous}\", description:\"Draft plan\", tier:\"heavy\"}] }\n\u2022 Parallel fan-out: { chain: [{parallel: [{task:\"Check part of {task}\", description:\"Check one part\", tier:\"light\", permissions:\"read-only\", count: 3}]}] }\n\u2022 Mixed: { chain: [{task:\"Research {task}\", description:\"Research request\", tier:\"standard\", permissions:\"read-only\"}, {parallel: [{task:\"Review {previous}\", description:\"Review findings\", tier:\"light\", permissions:\"read-only\", count: 2}]}, {task:\"Summarize {previous}\", description:\"Summarize reviews\", tier:\"standard\"}] }\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 (read-only; there is no configure action)\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 subagent_supervisor({ action: \"ask\", id, reason, message, index?, childId? }) - ask one running async child; returns question id immediately. Ask only when the child owns missing context, the answer changes a concrete next decision, and waiting risks block/rework. No broadcast, revive, task replacement, status polling, or micromanagement.\n\u2022 subagent_wait({ questionId }) - wait for that supervisor question answer/expiry/cancel. Answers stay separate from final run results.\n\u2022 { action: \"append-step\", id: \"...\", chain: [{task:\"Use {previous}\", description:\"Follow-up step\", tier:\"standard\"}] } - 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, tier|model, thinking?, 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 Every executable child chooses exactly one of tier: \"light\"|\"standard\"|\"heavy\" (default) or model: \"provider/id\" when the user names a model. Do not pass both, and do not use inherit. Missing, disabled, unconfigured, unavailable, or unauthenticated selections fail before launch.\n\u2022 Optional thinking (off/minimal/low/medium/high/xhigh/max) is only valid with an explicit model. Tier launches use the configured tier thinking level.\nTIER SELECTION:\n\u2022 Choose the lowest tier that can reliably complete the task.\n\u2022 light: Use for simple, straightforward tasks that require little reasoning. Good for quick checks, finding information, collecting facts for research, inspecting a small amount of code, or verifying a specific fact.\n\u2022 standard: Use for moderately difficult work and everyday coding tasks. Good for writing simple code, fixing a clearly described bug, reviewing a focused change, or completing work with clear requirements. Use heavy when the task requires deep architectural understanding or complex reasoning.\n\u2022 heavy: Use for complex or ambiguous tasks that require deep reasoning and strong code understanding. Good for implementing complex plans, debugging difficult or poorly understood problems, reviewing large or high-risk changes, and making architectural decisions.\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.status|check|recommend-model/schedule*.\n\u2022 Subagents run async by default. Set async:false when you need the result immediately and have no independent work to do, or need an interactive preview. Otherwise continue independent work or yield for normal interactive completion. Use subagent_wait for same-turn or skill completion. Headless sessions auto-drain current-session work. Use status for one-time inspection. Do not poll or sleep to wait.\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.";
5
+ 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, tier|model, thinking?, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,tier|model,thinking?,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,tier|model,thinking?,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 Exactly one of tier:\"light\"|\"standard\"|\"heavy\" (default) or model:\"provider/id\" when the user names a model. thinking only with model. No inherit; fail closed on unavailable selections. Children always start fresh. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.\nTIER SELECTION:\n\u2022 Choose the lowest tier that can reliably complete the task.\n\u2022 light: Use for simple, straightforward tasks that require little reasoning. Good for quick checks, finding information, collecting facts for research, inspecting a small amount of code, or verifying a specific fact.\n\u2022 standard: Use for moderately difficult work and everyday coding tasks. Good for writing simple code, fixing a clearly described bug, reviewing a focused change, or completing work with clear requirements. Use heavy when the task requires deep architectural understanding or complex reasoning.\n\u2022 heavy: Use for complex or ambiguous tasks that require deep reasoning and strong code understanding. Good for implementing complex plans, debugging difficult or poorly understood problems, reviewing large or high-risk changes, and making architectural decisions.\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\", tier:\"standard\"}, {parallel: [{task:\"Check {previous}\", description:\"Check prior result\", tier:\"light\", permissions:\"read-only\", count: 3}]}] }\n\nCONTROL:\n\u2022 Use action without execution fields: doctor, watchdog.status, watchdog.check, watchdog.recommend-model, 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 Subagents run async by default. Set async:false when you need the result immediately and have no independent work to do, or need an interactive preview. Otherwise continue independent work or yield for normal interactive completion. Use subagent_wait for same-turn or skill completion. Headless sessions auto-drain current-session work. Use status for one-time inspection. Do not poll or sleep to wait.\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
6
  export interface ToolDescriptionOptions {
6
7
  cwd?: string;
7
8
  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,44DAQyN,CAAC;AAE/P,eAAO,MAAM,8BAA8B,gxOA2Cf,CAAC;AAE7B,eAAO,MAAM,iCAAiC,mwFAoBsK,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,CAiBhJ","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• Every executable child also needs tier: \"light\", \"standard\", or \"heavy\". Direct model overrides and parent-model inheritance are not available. A missing, disabled, unconfigured, unavailable, or unauthenticated tier fails before launch.\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, tier, permissions? } — one child. Multiple SINGLE calls in the same turn run concurrently; explicit concurrency/run limits still apply.\n• PARALLEL: { tasks: [{task, description, tier, 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, tier, permissions?}, {parallel:[{task, description, tier, 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• Every executable child requires tier: \"light\", \"standard\", or \"heavy\". Direct model overrides and parent-model inheritance are rejected. The configured tier model and credentials must be available.\n• Children always start with a fresh session (no inherited parent transcript).\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\", tier:\"standard\"}, {task:\"Plan based on {previous}\", description:\"Draft plan\", tier:\"heavy\"}] }\n• Parallel fan-out: { chain: [{parallel: [{task:\"Check part of {task}\", description:\"Check one part\", tier:\"light\", permissions:\"read-only\", count: 3}]}] }\n• Mixed: { chain: [{task:\"Research {task}\", description:\"Research request\", tier:\"standard\", permissions:\"read-only\"}, {parallel: [{task:\"Review {previous}\", description:\"Review findings\", tier:\"light\", permissions:\"read-only\", count: 2}]}, {task:\"Summarize {previous}\", description:\"Summarize reviews\", tier:\"standard\"}] }\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\", tier:\"standard\"}] } - 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, tier, 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, tier, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,tier,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,tier,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• Every executable child requires tier:\"light\"|\"standard\"|\"heavy\". Direct model overrides and parent-model inheritance are rejected; tier resolution fails closed. 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\", tier:\"standard\"}, {parallel: [{task:\"Check {previous}\", description:\"Check prior result\", tier:\"light\", 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\treturn description;\n}\n"]}
1
+ {"version":3,"file":"tool-description.d.ts","sourceRoot":"","sources":["../../../../../src/builtin-extensions/pi-subagents/src/extension/tool-description.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAM/E,eAAO,MAAM,sBAAsB,o3BAIsO,CAAC;AAE1Q,eAAO,MAAM,wBAAwB,8hGAUyN,CAAC;AAE/P,eAAO,MAAM,8BAA8B,8wRA4Cf,CAAC;AAE7B,eAAO,MAAM,iCAAiC,0zHAqBsK,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,CAiBhJ","sourcesContent":["// @ts-nocheck\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { SUBAGENT_ASYNC_GUIDANCE } from \"../shared/async-guidance.ts\";\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_TIER_GUIDANCE = `TIER SELECTION:\n• Choose the lowest tier that can reliably complete the task.\n• light: Use for simple, straightforward tasks that require little reasoning. Good for quick checks, finding information, collecting facts for research, inspecting a small amount of code, or verifying a specific fact.\n• standard: Use for moderately difficult work and everyday coding tasks. Good for writing simple code, fixing a clearly described bug, reviewing a focused change, or completing work with clear requirements. Use heavy when the task requires deep architectural understanding or complex reasoning.\n• heavy: Use for complex or ambiguous tasks that require deep reasoning and strong code understanding. Good for implementing complex plans, debugging difficult or poorly understood problems, reviewing large or high-risk changes, and making architectural decisions.`;\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• Every executable child chooses exactly one of tier: \"light\"|\"standard\"|\"heavy\" (default) or model: \"provider/id\" when the user names a model. Do not pass both, and do not use inherit. Missing, disabled, unconfigured, unavailable, or unauthenticated selections fail before launch.\n• Optional thinking (off/minimal/low/medium/high/xhigh/max) is only valid with an explicit model. Tier launches use the configured tier thinking level.\n${SUBAGENT_TIER_GUIDANCE}\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.status|check|recommend-model/schedule*.\n• ${SUBAGENT_ASYNC_GUIDANCE}\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, tier|model, thinking?, permissions? } — one child. Multiple SINGLE calls in the same turn run concurrently; explicit concurrency/run limits still apply.\n• PARALLEL: { tasks: [{task, description, tier|model, thinking?, 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, tier|model, thinking?, permissions?}, {parallel:[{task, description, tier|model, thinking?, 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• Model selection: pass tier by default (\"light\"|\"standard\"|\"heavy\"). Pass model: \"provider/id\" only when the user specifies a model. Exactly one of tier or model. Optional thinking only with model; tier uses configured thinking. Direct model launches do not require tier mode to be enabled. No inherit and no silent fallback for an explicit model.\n• Children always start with a fresh session (no inherited parent transcript).\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\", tier:\"standard\"}, {task:\"Plan based on {previous}\", description:\"Draft plan\", tier:\"heavy\"}] }\n• Parallel fan-out: { chain: [{parallel: [{task:\"Check part of {task}\", description:\"Check one part\", tier:\"light\", permissions:\"read-only\", count: 3}]}] }\n• Mixed: { chain: [{task:\"Research {task}\", description:\"Research request\", tier:\"standard\", permissions:\"read-only\"}, {parallel: [{task:\"Review {previous}\", description:\"Review findings\", tier:\"light\", permissions:\"read-only\", count: 2}]}, {task:\"Summarize {previous}\", description:\"Summarize reviews\", tier:\"standard\"}] }\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 (read-only; there is no configure action)\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• subagent_supervisor({ action: \"ask\", id, reason, message, index?, childId? }) - ask one running async child; returns question id immediately. Ask only when the child owns missing context, the answer changes a concrete next decision, and waiting risks block/rework. No broadcast, revive, task replacement, status polling, or micromanagement.\n• subagent_wait({ questionId }) - wait for that supervisor question answer/expiry/cancel. Answers stay separate from final run results.\n• { action: \"append-step\", id: \"...\", chain: [{task:\"Use {previous}\", description:\"Follow-up step\", tier:\"standard\"}] } - 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, tier|model, thinking?, 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, tier|model, thinking?, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,tier|model,thinking?,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,tier|model,thinking?,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• Exactly one of tier:\"light\"|\"standard\"|\"heavy\" (default) or model:\"provider/id\" when the user names a model. thinking only with model. No inherit; fail closed on unavailable selections. Children always start fresh. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.\n${SUBAGENT_TIER_GUIDANCE}\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\", tier:\"standard\"}, {parallel: [{task:\"Check {previous}\", description:\"Check prior result\", tier:\"light\", permissions:\"read-only\", count: 3}]}] }\n\nCONTROL:\n• Use action without execution fields: doctor, watchdog.status, watchdog.check, watchdog.recommend-model, 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• ${SUBAGENT_ASYNC_GUIDANCE}\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\treturn description;\n}\n"]}
@@ -1,27 +1,35 @@
1
1
  // @ts-nocheck
2
2
  import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
+ import { SUBAGENT_ASYNC_GUIDANCE } from "../shared/async-guidance.js";
4
5
  import { getAgentDir, getProjectConfigDir } from "../shared/utils.js";
5
6
  const CUSTOM_TOOL_DESCRIPTION_FILE = "subagent-tool-description.md";
6
7
  const CUSTOM_TOOL_DESCRIPTION_MAX_BYTES = 50 * 1024;
8
+ export const SUBAGENT_TIER_GUIDANCE = `TIER SELECTION:
9
+ • Choose the lowest tier that can reliably complete the task.
10
+ • light: Use for simple, straightforward tasks that require little reasoning. Good for quick checks, finding information, collecting facts for research, inspecting a small amount of code, or verifying a specific fact.
11
+ • standard: Use for moderately difficult work and everyday coding tasks. Good for writing simple code, fixing a clearly described bug, reviewing a focused change, or completing work with clear requirements. Use heavy when the task requires deep architectural understanding or complex reasoning.
12
+ • heavy: Use for complex or ambiguous tasks that require deep reasoning and strong code understanding. Good for implementing complex plans, debugging difficult or poorly understood problems, reviewing large or high-risk changes, and making architectural decisions.`;
7
13
  export const SUBAGENT_SAFETY_GUIDANCE = `SAFETY-CRITICAL SUBAGENT GUIDANCE:
8
14
  • Prompt children directly. There is no agent roster. Every execution task needs task (the full child prompt) and description (a concise UI label).
9
- • Every executable child also needs tier: "light", "standard", or "heavy". Direct model overrides and parent-model inheritance are not available. A missing, disabled, unconfigured, unavailable, or unauthenticated tier fails before launch.
15
+ • Every executable child chooses exactly one of tier: "light"|"standard"|"heavy" (default) or model: "provider/id" when the user names a model. Do not pass both, and do not use inherit. Missing, disabled, unconfigured, unavailable, or unauthenticated selections fail before launch.
16
+ • Optional thinking (off/minimal/low/medium/high/xhigh/max) is only valid with an explicit model. Tier launches use the configured tier thinking level.
17
+ ${SUBAGENT_TIER_GUIDANCE}
10
18
  • permissions is "full" or "read-only". Omitted permissions means full. Plan-mode parents must pass permissions: "read-only"; full or omitted launches are rejected.
11
- • 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*.
12
- 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.
19
+ • 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.status|check|recommend-model/schedule*.
20
+ ${SUBAGENT_ASYNC_GUIDANCE}
13
21
  • 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.
14
22
  • 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.
15
23
  • 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.`;
16
24
  export const FULL_SUBAGENT_TOOL_DESCRIPTION = `Delegate work to generic children by prompting them directly. There are no named agent types.
17
25
 
18
26
  EXECUTION (use exactly ONE mode):
19
- • SINGLE: { task, description, tier, permissions? } — one child. Multiple SINGLE calls in the same turn run concurrently; explicit concurrency/run limits still apply.
20
- • PARALLEL: { tasks: [{task, description, tier, 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)
21
- • CHAIN: { chain: [{task, description, tier, permissions?}, {parallel:[{task, description, tier, permissions?, count:3}]}] } — sequential pipeline with optional parallel fan-out. Use chain when a later child needs an earlier result.
27
+ • SINGLE: { task, description, tier|model, thinking?, permissions? } — one child. Multiple SINGLE calls in the same turn run concurrently; explicit concurrency/run limits still apply.
28
+ • PARALLEL: { tasks: [{task, description, tier|model, thinking?, 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)
29
+ • CHAIN: { chain: [{task, description, tier|model, thinking?, permissions?}, {parallel:[{task, description, tier|model, thinking?, permissions?, count:3}]}] } — sequential pipeline with optional parallel fan-out. Use chain when a later child needs an earlier result.
22
30
  • description is required, single-line, max 80 characters. It is UI metadata only. task is the complete child prompt.
23
31
  • 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".
24
- Every executable child requires tier: "light", "standard", or "heavy". Direct model overrides and parent-model inheritance are rejected. The configured tier model and credentials must be available.
32
+ Model selection: pass tier by default ("light"|"standard"|"heavy"). Pass model: "provider/id" only when the user specifies a model. Exactly one of tier or model. Optional thinking only with model; tier uses configured thinking. Direct model launches do not require tier mode to be enabled. No inherit and no silent fallback for an explicit model.
25
33
  • Children always start with a fresh session (no inherited parent transcript).
26
34
  • Optional timeout: { timeoutMs } or { maxRuntimeMs } sets a run-level max runtime for foreground and async/background runs
27
35
 
@@ -36,8 +44,7 @@ CHAIN EXAMPLES:
36
44
  • Mixed: { chain: [{task:"Research {task}", description:"Research request", tier:"standard", permissions:"read-only"}, {parallel: [{task:"Review {previous}", description:"Review findings", tier:"light", permissions:"read-only", count: 2}]}, {task:"Summarize {previous}", description:"Summarize reviews", tier:"standard"}] }
37
45
 
38
46
  CONTROL (use action field, omit task/chain/tasks):
39
- • { 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", 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
47
+ • { action: "watchdog.status" | "watchdog.check" | "watchdog.recommend-model" } - inspect the opt-in subagent watchdog and its strong complementary model recommendation (read-only; there is no configure action)
41
48
  • { action: "status", id: "..." } - inspect an async/background run by id or prefix
42
49
  • { action: "status", view: "fleet" } - read-only active foreground/async fleet view with transcript commands
43
50
  • { action: "status", id: "...", view: "transcript", index?: 0, lines?: 80 } - tail a run or child output/session transcript
@@ -45,10 +52,12 @@ CONTROL (use action field, omit task/chain/tasks):
45
52
  • { action: "stop", id: "..." } - stop a current-session top-level async run; stopped runs finish with state "stopped"
46
53
  • { 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
47
54
  • { 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.
55
+ • subagent_supervisor({ action: "ask", id, reason, message, index?, childId? }) - ask one running async child; returns question id immediately. Ask only when the child owns missing context, the answer changes a concrete next decision, and waiting risks block/rework. No broadcast, revive, task replacement, status polling, or micromanagement.
56
+ • subagent_wait({ questionId }) - wait for that supervisor question answer/expiry/cancel. Answers stay separate from final run results.
48
57
  • { action: "append-step", id: "...", chain: [{task:"Use {previous}", description:"Follow-up step", tier:"standard"}] } - append one step to the tail of a running async chain
49
58
 
50
59
  SCHEDULE (opt-in; requires { "scheduledRuns": { "enabled": true } } in config.json):
51
- • { action: "schedule", task, description, tier, 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.
60
+ • { action: "schedule", task, description, tier|model, thinking?, 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.
52
61
  • { action: "schedule-list" } - list scheduled runs for this session
53
62
  • { action: "schedule-status", id: "..." } - inspect one scheduled run
54
63
  • { action: "schedule-cancel", id: "..." } - cancel a scheduled run before it fires
@@ -60,19 +69,20 @@ ${SUBAGENT_SAFETY_GUIDANCE}`;
60
69
  export const COMPACT_SUBAGENT_TOOL_DESCRIPTION = `Delegate to generic children by prompting them. Use exactly one mode per call.
61
70
 
62
71
  EXECUTE:
63
- • SINGLE {task, description, tier, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,tier,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,tier,permissions?},{parallel:[...]}]} for sequential work.
72
+ • SINGLE {task, description, tier|model, thinking?, permissions?} (same-turn singles overlap); PARALLEL {tasks:[{task,description,tier|model,thinking?,permissions?,count?,output?,reads?,progress?}], concurrency?, worktree?}; CHAIN {chain:[{task,description,tier|model,thinking?,permissions?},{parallel:[...]}]} for sequential work.
64
73
  • 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".
65
- Every executable child requires tier:"light"|"standard"|"heavy". Direct model overrides and parent-model inheritance are rejected; tier resolution fails closed. Children always start with a fresh session. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.
74
+ Exactly one of tier:"light"|"standard"|"heavy" (default) or model:"provider/id" when the user names a model. thinking only with model. No inherit; fail closed on unavailable selections. Children always start fresh. timeoutMs/maxRuntimeMs apply to foreground and async/background runs.
75
+ ${SUBAGENT_TIER_GUIDANCE}
66
76
  • Chain templates may use {task}, {previous}, {chain_dir}, and named outputs. Parallel worktree isolation requires a clean git repo.
67
77
  • Chain example: { chain: [{task:"Analyze {task}", description:"Analyze request", tier:"standard"}, {parallel: [{task:"Check {previous}", description:"Check prior result", tier:"light", permissions:"read-only", count: 3}]}] }
68
78
 
69
79
  CONTROL:
70
- • Use action without execution fields: doctor, watchdog.status, watchdog.check, watchdog.recommend-model, watchdog.configure, status, interrupt, stop, resume, steer, append-step.
80
+ • Use action without execution fields: doctor, watchdog.status, watchdog.check, watchdog.recommend-model, status, interrupt, stop, resume, steer, append-step.
71
81
  • 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.
72
82
  • Opt-in schedule actions: schedule, schedule-list, schedule-status, schedule-cancel. Schedule only explicit delayed runs the user asked for.
73
83
 
74
84
  ASYNC / WAIT:
75
- 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.
85
+ ${SUBAGENT_ASYNC_GUIDANCE}
76
86
  • Status and artifacts live under asyncId/asyncDir with status.json, events.jsonl, output logs, session files, and { action:"status", id:"..." }.
77
87
 
78
88
  SAFETY: