@nubl/maestro 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/README.md +56 -3
  2. package/dist/config.json.example +30 -0
  3. package/dist/maestro/adapters/fake/fake-harness-adapter.d.ts +24 -0
  4. package/dist/maestro/adapters/fake/fake-harness-adapter.d.ts.map +1 -0
  5. package/dist/maestro/adapters/fake/fake-harness-adapter.js +210 -0
  6. package/dist/maestro/adapters/fake/fake-harness-adapter.js.map +1 -0
  7. package/dist/maestro/adapters/pi/accept-groups.d.ts +35 -0
  8. package/dist/maestro/adapters/pi/accept-groups.d.ts.map +1 -0
  9. package/dist/maestro/adapters/pi/accept-groups.js +70 -0
  10. package/dist/maestro/adapters/pi/accept-groups.js.map +1 -0
  11. package/dist/maestro/adapters/pi/accept-runner.d.ts +37 -0
  12. package/dist/maestro/adapters/pi/accept-runner.d.ts.map +1 -0
  13. package/dist/maestro/adapters/pi/accept-runner.js +161 -0
  14. package/dist/maestro/adapters/pi/accept-runner.js.map +1 -0
  15. package/dist/maestro/adapters/pi/activity-file.d.ts +39 -0
  16. package/dist/maestro/adapters/pi/activity-file.d.ts.map +1 -0
  17. package/dist/maestro/adapters/pi/activity-file.js +454 -0
  18. package/dist/maestro/adapters/pi/activity-file.js.map +1 -0
  19. package/dist/maestro/adapters/pi/child/accept-check.d.ts +24 -0
  20. package/dist/maestro/adapters/pi/child/accept-check.d.ts.map +1 -0
  21. package/dist/maestro/adapters/pi/child/accept-check.js +82 -0
  22. package/dist/maestro/adapters/pi/child/accept-check.js.map +1 -0
  23. package/dist/maestro/adapters/pi/child/declared-skills.d.ts +51 -0
  24. package/dist/maestro/adapters/pi/child/declared-skills.d.ts.map +1 -0
  25. package/dist/maestro/adapters/pi/child/declared-skills.js +148 -0
  26. package/dist/maestro/adapters/pi/child/declared-skills.js.map +1 -0
  27. package/dist/maestro/adapters/pi/child/done-nudge.d.ts +38 -0
  28. package/dist/maestro/adapters/pi/child/done-nudge.d.ts.map +1 -0
  29. package/dist/maestro/adapters/pi/child/done-nudge.js +77 -0
  30. package/dist/maestro/adapters/pi/child/done-nudge.js.map +1 -0
  31. package/dist/maestro/adapters/pi/child/entry.d.ts +3 -0
  32. package/dist/maestro/adapters/pi/child/entry.d.ts.map +1 -0
  33. package/dist/maestro/adapters/pi/child/entry.js +3 -0
  34. package/dist/maestro/adapters/pi/child/entry.js.map +1 -0
  35. package/dist/maestro/adapters/pi/child/protocol.d.ts +56 -0
  36. package/dist/maestro/adapters/pi/child/protocol.d.ts.map +1 -0
  37. package/dist/maestro/adapters/pi/child/protocol.js +510 -0
  38. package/dist/maestro/adapters/pi/child/protocol.js.map +1 -0
  39. package/dist/maestro/adapters/pi/completion.d.ts +45 -0
  40. package/dist/maestro/adapters/pi/completion.d.ts.map +1 -0
  41. package/dist/maestro/adapters/pi/completion.js +295 -0
  42. package/dist/maestro/adapters/pi/completion.js.map +1 -0
  43. package/dist/maestro/adapters/pi/launch-command.d.ts +27 -0
  44. package/dist/maestro/adapters/pi/launch-command.d.ts.map +1 -0
  45. package/dist/maestro/adapters/pi/launch-command.js +75 -0
  46. package/dist/maestro/adapters/pi/launch-command.js.map +1 -0
  47. package/dist/maestro/adapters/pi/launch-operations.d.ts +78 -0
  48. package/dist/maestro/adapters/pi/launch-operations.d.ts.map +1 -0
  49. package/dist/maestro/adapters/pi/launch-operations.js +270 -0
  50. package/dist/maestro/adapters/pi/launch-operations.js.map +1 -0
  51. package/dist/maestro/adapters/pi/launch-resume.d.ts +4 -0
  52. package/dist/maestro/adapters/pi/launch-resume.d.ts.map +1 -0
  53. package/dist/maestro/adapters/pi/launch-resume.js +183 -0
  54. package/dist/maestro/adapters/pi/launch-resume.js.map +1 -0
  55. package/dist/maestro/adapters/pi/launch.d.ts +148 -0
  56. package/dist/maestro/adapters/pi/launch.d.ts.map +1 -0
  57. package/dist/maestro/adapters/pi/launch.js +655 -0
  58. package/dist/maestro/adapters/pi/launch.js.map +1 -0
  59. package/dist/maestro/adapters/pi/model-registry.d.ts +3 -0
  60. package/dist/maestro/adapters/pi/model-registry.d.ts.map +1 -0
  61. package/dist/maestro/adapters/pi/model-registry.js +29 -0
  62. package/dist/maestro/adapters/pi/model-registry.js.map +1 -0
  63. package/dist/maestro/adapters/pi/pi-harness-adapter.d.ts +95 -0
  64. package/dist/maestro/adapters/pi/pi-harness-adapter.d.ts.map +1 -0
  65. package/dist/maestro/adapters/pi/pi-harness-adapter.js +549 -0
  66. package/dist/maestro/adapters/pi/pi-harness-adapter.js.map +1 -0
  67. package/dist/maestro/adapters/pi/process-identity.d.ts +92 -0
  68. package/dist/maestro/adapters/pi/process-identity.d.ts.map +1 -0
  69. package/dist/maestro/adapters/pi/process-identity.js +248 -0
  70. package/dist/maestro/adapters/pi/process-identity.js.map +1 -0
  71. package/dist/maestro/adapters/pi/process-tree.d.ts +48 -0
  72. package/dist/maestro/adapters/pi/process-tree.d.ts.map +1 -0
  73. package/dist/maestro/adapters/pi/process-tree.js +69 -0
  74. package/dist/maestro/adapters/pi/process-tree.js.map +1 -0
  75. package/dist/maestro/adapters/pi/script-shell.d.ts +40 -0
  76. package/dist/maestro/adapters/pi/script-shell.d.ts.map +1 -0
  77. package/dist/maestro/adapters/pi/script-shell.js +43 -0
  78. package/dist/maestro/adapters/pi/script-shell.js.map +1 -0
  79. package/dist/maestro/adapters/pi/session.d.ts +207 -0
  80. package/dist/maestro/adapters/pi/session.d.ts.map +1 -0
  81. package/dist/maestro/adapters/pi/session.js +714 -0
  82. package/dist/maestro/adapters/pi/session.js.map +1 -0
  83. package/dist/maestro/adapters/pi/task-model-init.d.ts +4 -0
  84. package/dist/maestro/adapters/pi/task-model-init.d.ts.map +1 -0
  85. package/dist/maestro/adapters/pi/task-model-init.js +47 -0
  86. package/dist/maestro/adapters/pi/task-model-init.js.map +1 -0
  87. package/dist/maestro/core/accept.d.ts +150 -0
  88. package/dist/maestro/core/accept.d.ts.map +1 -0
  89. package/dist/maestro/core/accept.js +243 -0
  90. package/dist/maestro/core/accept.js.map +1 -0
  91. package/dist/maestro/core/activity.d.ts +4 -0
  92. package/dist/maestro/core/activity.d.ts.map +1 -0
  93. package/dist/maestro/core/activity.js +18 -0
  94. package/dist/maestro/core/activity.js.map +1 -0
  95. package/dist/maestro/core/child-busy.d.ts +14 -0
  96. package/dist/maestro/core/child-busy.d.ts.map +1 -0
  97. package/dist/maestro/core/child-busy.js +14 -0
  98. package/dist/maestro/core/child-busy.js.map +1 -0
  99. package/dist/maestro/core/config/guidelines-config.d.ts +8 -0
  100. package/dist/maestro/core/config/guidelines-config.d.ts.map +1 -0
  101. package/dist/maestro/core/config/guidelines-config.js +60 -0
  102. package/dist/maestro/core/config/guidelines-config.js.map +1 -0
  103. package/dist/maestro/core/config/herdr-config.d.ts +13 -0
  104. package/dist/maestro/core/config/herdr-config.d.ts.map +1 -0
  105. package/dist/maestro/core/config/herdr-config.js +65 -0
  106. package/dist/maestro/core/config/herdr-config.js.map +1 -0
  107. package/dist/maestro/core/config/model-config.d.ts +92 -0
  108. package/dist/maestro/core/config/model-config.d.ts.map +1 -0
  109. package/dist/maestro/core/config/model-config.js +522 -0
  110. package/dist/maestro/core/config/model-config.js.map +1 -0
  111. package/dist/maestro/core/config/outcome-ledger-config.d.ts +8 -0
  112. package/dist/maestro/core/config/outcome-ledger-config.d.ts.map +1 -0
  113. package/dist/maestro/core/config/outcome-ledger-config.js +49 -0
  114. package/dist/maestro/core/config/outcome-ledger-config.js.map +1 -0
  115. package/dist/maestro/core/config/pane-config.d.ts +15 -0
  116. package/dist/maestro/core/config/pane-config.d.ts.map +1 -0
  117. package/dist/maestro/core/config/pane-config.js +101 -0
  118. package/dist/maestro/core/config/pane-config.js.map +1 -0
  119. package/dist/maestro/core/config/persistent-config.d.ts +7 -0
  120. package/dist/maestro/core/config/persistent-config.d.ts.map +1 -0
  121. package/dist/maestro/core/config/persistent-config.js +72 -0
  122. package/dist/maestro/core/config/persistent-config.js.map +1 -0
  123. package/dist/maestro/core/config/role-config.d.ts +7 -0
  124. package/dist/maestro/core/config/role-config.d.ts.map +1 -0
  125. package/dist/maestro/core/config/role-config.js +74 -0
  126. package/dist/maestro/core/config/role-config.js.map +1 -0
  127. package/dist/maestro/core/config/spawning-config.d.ts +7 -0
  128. package/dist/maestro/core/config/spawning-config.d.ts.map +1 -0
  129. package/dist/maestro/core/config/spawning-config.js +65 -0
  130. package/dist/maestro/core/config/spawning-config.js.map +1 -0
  131. package/dist/maestro/core/config/supervision-config.d.ts +7 -0
  132. package/dist/maestro/core/config/supervision-config.d.ts.map +1 -0
  133. package/dist/maestro/core/config/supervision-config.js +69 -0
  134. package/dist/maestro/core/config/supervision-config.js.map +1 -0
  135. package/dist/maestro/core/config/task-model-init.d.ts +118 -0
  136. package/dist/maestro/core/config/task-model-init.d.ts.map +1 -0
  137. package/dist/maestro/core/config/task-model-init.js +168 -0
  138. package/dist/maestro/core/config/task-model-init.js.map +1 -0
  139. package/dist/maestro/core/config/task-model-types.d.ts +36 -0
  140. package/dist/maestro/core/config/task-model-types.d.ts.map +1 -0
  141. package/dist/maestro/core/config/task-model-types.js +17 -0
  142. package/dist/maestro/core/config/task-model-types.js.map +1 -0
  143. package/dist/maestro/core/config/type-guards.d.ts +22 -0
  144. package/dist/maestro/core/config/type-guards.d.ts.map +1 -0
  145. package/dist/maestro/core/config/type-guards.js +31 -0
  146. package/dist/maestro/core/config/type-guards.js.map +1 -0
  147. package/dist/maestro/core/deadline.d.ts +11 -0
  148. package/dist/maestro/core/deadline.d.ts.map +1 -0
  149. package/dist/maestro/core/deadline.js +30 -0
  150. package/dist/maestro/core/deadline.js.map +1 -0
  151. package/dist/maestro/core/declared-skills.d.ts +16 -0
  152. package/dist/maestro/core/declared-skills.d.ts.map +1 -0
  153. package/dist/maestro/core/declared-skills.js +52 -0
  154. package/dist/maestro/core/declared-skills.js.map +1 -0
  155. package/dist/maestro/core/delegation-depth.d.ts +38 -0
  156. package/dist/maestro/core/delegation-depth.d.ts.map +1 -0
  157. package/dist/maestro/core/delegation-depth.js +59 -0
  158. package/dist/maestro/core/delegation-depth.js.map +1 -0
  159. package/dist/maestro/core/git-environment.d.ts +3 -0
  160. package/dist/maestro/core/git-environment.d.ts.map +1 -0
  161. package/dist/maestro/core/git-environment.js +29 -0
  162. package/dist/maestro/core/git-environment.js.map +1 -0
  163. package/dist/maestro/core/harness-adapter.d.ts +89 -0
  164. package/dist/maestro/core/harness-adapter.d.ts.map +1 -0
  165. package/dist/maestro/core/harness-adapter.js +2 -0
  166. package/dist/maestro/core/harness-adapter.js.map +1 -0
  167. package/dist/maestro/core/host-text.d.ts +49 -0
  168. package/dist/maestro/core/host-text.d.ts.map +1 -0
  169. package/dist/maestro/core/host-text.js +106 -0
  170. package/dist/maestro/core/host-text.js.map +1 -0
  171. package/dist/maestro/core/index.d.ts +4 -0
  172. package/dist/maestro/core/index.d.ts.map +1 -0
  173. package/dist/maestro/core/index.js +2 -0
  174. package/dist/maestro/core/index.js.map +1 -0
  175. package/dist/maestro/core/lifecycle.d.ts +16 -0
  176. package/dist/maestro/core/lifecycle.d.ts.map +1 -0
  177. package/dist/maestro/core/lifecycle.js +429 -0
  178. package/dist/maestro/core/lifecycle.js.map +1 -0
  179. package/dist/maestro/core/opened-primary-workspace.d.ts +31 -0
  180. package/dist/maestro/core/opened-primary-workspace.d.ts.map +1 -0
  181. package/dist/maestro/core/opened-primary-workspace.js +49 -0
  182. package/dist/maestro/core/opened-primary-workspace.js.map +1 -0
  183. package/dist/maestro/core/platform-support.d.ts +15 -0
  184. package/dist/maestro/core/platform-support.d.ts.map +1 -0
  185. package/dist/maestro/core/platform-support.js +23 -0
  186. package/dist/maestro/core/platform-support.js.map +1 -0
  187. package/dist/maestro/core/realpath-without-opening.d.ts +9 -0
  188. package/dist/maestro/core/realpath-without-opening.d.ts.map +1 -0
  189. package/dist/maestro/core/realpath-without-opening.js +45 -0
  190. package/dist/maestro/core/realpath-without-opening.js.map +1 -0
  191. package/dist/maestro/core/roles/discovery.d.ts +64 -0
  192. package/dist/maestro/core/roles/discovery.d.ts.map +1 -0
  193. package/dist/maestro/core/roles/discovery.js +422 -0
  194. package/dist/maestro/core/roles/discovery.js.map +1 -0
  195. package/dist/maestro/core/routing.d.ts +115 -0
  196. package/dist/maestro/core/routing.d.ts.map +1 -0
  197. package/dist/maestro/core/routing.js +449 -0
  198. package/dist/maestro/core/routing.js.map +1 -0
  199. package/dist/maestro/core/script-launch.d.ts +47 -0
  200. package/dist/maestro/core/script-launch.d.ts.map +1 -0
  201. package/dist/maestro/core/script-launch.js +102 -0
  202. package/dist/maestro/core/script-launch.js.map +1 -0
  203. package/dist/maestro/core/shell.d.ts +2 -0
  204. package/dist/maestro/core/shell.d.ts.map +1 -0
  205. package/dist/maestro/core/shell.js +4 -0
  206. package/dist/maestro/core/shell.js.map +1 -0
  207. package/dist/maestro/core/specialist-notice.d.ts +36 -0
  208. package/dist/maestro/core/specialist-notice.d.ts.map +1 -0
  209. package/dist/maestro/core/specialist-notice.js +41 -0
  210. package/dist/maestro/core/specialist-notice.js.map +1 -0
  211. package/dist/maestro/core/status.d.ts +87 -0
  212. package/dist/maestro/core/status.d.ts.map +1 -0
  213. package/dist/maestro/core/status.js +369 -0
  214. package/dist/maestro/core/status.js.map +1 -0
  215. package/dist/maestro/core/supervision.d.ts +56 -0
  216. package/dist/maestro/core/supervision.d.ts.map +1 -0
  217. package/dist/maestro/core/supervision.js +249 -0
  218. package/dist/maestro/core/supervision.js.map +1 -0
  219. package/dist/maestro/core/surface-provider.d.ts +200 -0
  220. package/dist/maestro/core/surface-provider.d.ts.map +1 -0
  221. package/dist/maestro/core/surface-provider.js +71 -0
  222. package/dist/maestro/core/surface-provider.js.map +1 -0
  223. package/dist/maestro/core/types.d.ts +388 -0
  224. package/dist/maestro/core/types.d.ts.map +1 -0
  225. package/dist/maestro/core/types.js +2 -0
  226. package/dist/maestro/core/types.js.map +1 -0
  227. package/dist/maestro/core/undelivered-children.d.ts +27 -0
  228. package/dist/maestro/core/undelivered-children.d.ts.map +1 -0
  229. package/dist/maestro/core/undelivered-children.js +31 -0
  230. package/dist/maestro/core/undelivered-children.js.map +1 -0
  231. package/dist/maestro/core/wake.d.ts +32 -0
  232. package/dist/maestro/core/wake.d.ts.map +1 -0
  233. package/dist/maestro/core/wake.js +125 -0
  234. package/dist/maestro/core/wake.js.map +1 -0
  235. package/dist/maestro/core/worktree-cleanup.d.ts +75 -0
  236. package/dist/maestro/core/worktree-cleanup.d.ts.map +1 -0
  237. package/dist/maestro/core/worktree-cleanup.js +278 -0
  238. package/dist/maestro/core/worktree-cleanup.js.map +1 -0
  239. package/dist/maestro/core/worktree.d.ts +50 -0
  240. package/dist/maestro/core/worktree.d.ts.map +1 -0
  241. package/dist/maestro/core/worktree.js +23 -0
  242. package/dist/maestro/core/worktree.js.map +1 -0
  243. package/dist/maestro/engine.d.ts +5 -0
  244. package/dist/maestro/engine.d.ts.map +1 -0
  245. package/dist/maestro/engine.js +5 -0
  246. package/dist/maestro/engine.js.map +1 -0
  247. package/dist/maestro/pi/child.d.ts +8 -0
  248. package/dist/maestro/pi/child.d.ts.map +1 -0
  249. package/dist/maestro/pi/child.js +8 -0
  250. package/dist/maestro/pi/child.js.map +1 -0
  251. package/dist/maestro/pi/extension.d.ts +10 -0
  252. package/dist/maestro/pi/extension.d.ts.map +1 -0
  253. package/dist/maestro/pi/extension.js +8 -0
  254. package/dist/maestro/pi/extension.js.map +1 -0
  255. package/dist/maestro/pi/subagents-index.d.ts +9 -0
  256. package/dist/maestro/pi/subagents-index.d.ts.map +1 -0
  257. package/dist/maestro/pi/subagents-index.js +9 -0
  258. package/dist/maestro/pi/subagents-index.js.map +1 -0
  259. package/dist/maestro/pi.d.ts +9 -0
  260. package/dist/maestro/pi.d.ts.map +1 -0
  261. package/dist/maestro/pi.js +7 -0
  262. package/dist/maestro/pi.js.map +1 -0
  263. package/dist/maestro/runtime/accept-recheck.d.ts +32 -0
  264. package/dist/maestro/runtime/accept-recheck.d.ts.map +1 -0
  265. package/dist/maestro/runtime/accept-recheck.js +92 -0
  266. package/dist/maestro/runtime/accept-recheck.js.map +1 -0
  267. package/dist/maestro/runtime/delegated-marker.d.ts +112 -0
  268. package/dist/maestro/runtime/delegated-marker.d.ts.map +1 -0
  269. package/dist/maestro/runtime/delegated-marker.js +200 -0
  270. package/dist/maestro/runtime/delegated-marker.js.map +1 -0
  271. package/dist/maestro/runtime/host-surface-binding.d.ts +25 -0
  272. package/dist/maestro/runtime/host-surface-binding.d.ts.map +1 -0
  273. package/dist/maestro/runtime/host-surface-binding.js +2 -0
  274. package/dist/maestro/runtime/host-surface-binding.js.map +1 -0
  275. package/dist/maestro/runtime/index.d.ts +10 -0
  276. package/dist/maestro/runtime/index.d.ts.map +1 -0
  277. package/dist/maestro/runtime/index.js +6 -0
  278. package/dist/maestro/runtime/index.js.map +1 -0
  279. package/dist/maestro/runtime/pi-persistent-io.d.ts +7 -0
  280. package/dist/maestro/runtime/pi-persistent-io.d.ts.map +1 -0
  281. package/dist/maestro/runtime/pi-persistent-io.js +64 -0
  282. package/dist/maestro/runtime/pi-persistent-io.js.map +1 -0
  283. package/dist/maestro/runtime/pi-run-session-types.d.ts +328 -0
  284. package/dist/maestro/runtime/pi-run-session-types.d.ts.map +1 -0
  285. package/dist/maestro/runtime/pi-run-session-types.js +2 -0
  286. package/dist/maestro/runtime/pi-run-session-types.js.map +1 -0
  287. package/dist/maestro/runtime/pi-run-session.d.ts +12 -0
  288. package/dist/maestro/runtime/pi-run-session.d.ts.map +1 -0
  289. package/dist/maestro/runtime/pi-run-session.js +809 -0
  290. package/dist/maestro/runtime/pi-run-session.js.map +1 -0
  291. package/dist/maestro/runtime/run-session.d.ts +129 -0
  292. package/dist/maestro/runtime/run-session.d.ts.map +1 -0
  293. package/dist/maestro/runtime/run-session.js +680 -0
  294. package/dist/maestro/runtime/run-session.js.map +1 -0
  295. package/dist/maestro/runtime/surface-retention.d.ts +3 -0
  296. package/dist/maestro/runtime/surface-retention.d.ts.map +1 -0
  297. package/dist/maestro/runtime/surface-retention.js +5 -0
  298. package/dist/maestro/runtime/surface-retention.js.map +1 -0
  299. package/dist/maestro/runtime/task-model-init.d.ts +34 -0
  300. package/dist/maestro/runtime/task-model-init.d.ts.map +1 -0
  301. package/dist/maestro/runtime/task-model-init.js +78 -0
  302. package/dist/maestro/runtime/task-model-init.js.map +1 -0
  303. package/dist/maestro/runtime/worktree-operations.d.ts +31 -0
  304. package/dist/maestro/runtime/worktree-operations.d.ts.map +1 -0
  305. package/dist/maestro/runtime/worktree-operations.js +633 -0
  306. package/dist/maestro/runtime/worktree-operations.js.map +1 -0
  307. package/dist/maestro/surfaces/fake/fake-surface-provider.d.ts +54 -0
  308. package/dist/maestro/surfaces/fake/fake-surface-provider.d.ts.map +1 -0
  309. package/dist/maestro/surfaces/fake/fake-surface-provider.js +231 -0
  310. package/dist/maestro/surfaces/fake/fake-surface-provider.js.map +1 -0
  311. package/dist/maestro/testing/harness-adapter.conformance.d.ts +31 -0
  312. package/dist/maestro/testing/harness-adapter.conformance.d.ts.map +1 -0
  313. package/dist/maestro/testing/harness-adapter.conformance.js +181 -0
  314. package/dist/maestro/testing/harness-adapter.conformance.js.map +1 -0
  315. package/dist/maestro/testing/index.d.ts +5 -0
  316. package/dist/maestro/testing/index.d.ts.map +1 -0
  317. package/dist/maestro/testing/index.js +5 -0
  318. package/dist/maestro/testing/index.js.map +1 -0
  319. package/dist/maestro/testing/surface-provider.conformance.d.ts +20 -0
  320. package/dist/maestro/testing/surface-provider.conformance.d.ts.map +1 -0
  321. package/dist/maestro/testing/surface-provider.conformance.js +167 -0
  322. package/dist/maestro/testing/surface-provider.conformance.js.map +1 -0
  323. package/dist/pi-extension/subagents/catalog.d.ts +70 -0
  324. package/dist/pi-extension/subagents/catalog.d.ts.map +1 -0
  325. package/dist/pi-extension/subagents/catalog.js +231 -0
  326. package/dist/pi-extension/subagents/catalog.js.map +1 -0
  327. package/dist/pi-extension/subagents/config-path.d.ts +6 -0
  328. package/dist/pi-extension/subagents/config-path.d.ts.map +1 -0
  329. package/dist/pi-extension/subagents/config-path.js +21 -0
  330. package/dist/pi-extension/subagents/config-path.js.map +1 -0
  331. package/dist/pi-extension/subagents/control-tools.d.ts +21 -0
  332. package/dist/pi-extension/subagents/control-tools.d.ts.map +1 -0
  333. package/dist/pi-extension/subagents/control-tools.js +150 -0
  334. package/dist/pi-extension/subagents/control-tools.js.map +1 -0
  335. package/dist/pi-extension/subagents/controls.d.ts +52 -0
  336. package/dist/pi-extension/subagents/controls.d.ts.map +1 -0
  337. package/dist/pi-extension/subagents/controls.js +173 -0
  338. package/dist/pi-extension/subagents/controls.js.map +1 -0
  339. package/dist/pi-extension/subagents/deferred-tools.d.ts +43 -0
  340. package/dist/pi-extension/subagents/deferred-tools.d.ts.map +1 -0
  341. package/dist/pi-extension/subagents/deferred-tools.js +67 -0
  342. package/dist/pi-extension/subagents/deferred-tools.js.map +1 -0
  343. package/dist/pi-extension/subagents/delivery.d.ts +22 -0
  344. package/dist/pi-extension/subagents/delivery.d.ts.map +1 -0
  345. package/dist/pi-extension/subagents/delivery.js +365 -0
  346. package/dist/pi-extension/subagents/delivery.js.map +1 -0
  347. package/dist/pi-extension/subagents/extension.d.ts +100 -0
  348. package/dist/pi-extension/subagents/extension.d.ts.map +1 -0
  349. package/dist/pi-extension/subagents/extension.js +367 -0
  350. package/dist/pi-extension/subagents/extension.js.map +1 -0
  351. package/dist/pi-extension/subagents/launch-tools.d.ts +33 -0
  352. package/dist/pi-extension/subagents/launch-tools.d.ts.map +1 -0
  353. package/dist/pi-extension/subagents/launch-tools.js +373 -0
  354. package/dist/pi-extension/subagents/launch-tools.js.map +1 -0
  355. package/dist/pi-extension/subagents/launch.d.ts +86 -0
  356. package/dist/pi-extension/subagents/launch.d.ts.map +1 -0
  357. package/dist/pi-extension/subagents/launch.js +133 -0
  358. package/dist/pi-extension/subagents/launch.js.map +1 -0
  359. package/dist/pi-extension/subagents/model-registry.d.ts +13 -0
  360. package/dist/pi-extension/subagents/model-registry.d.ts.map +1 -0
  361. package/dist/pi-extension/subagents/model-registry.js +52 -0
  362. package/dist/pi-extension/subagents/model-registry.js.map +1 -0
  363. package/dist/pi-extension/subagents/observation.d.ts +38 -0
  364. package/dist/pi-extension/subagents/observation.d.ts.map +1 -0
  365. package/dist/pi-extension/subagents/observation.js +168 -0
  366. package/dist/pi-extension/subagents/observation.js.map +1 -0
  367. package/dist/pi-extension/subagents/persistent.d.ts +72 -0
  368. package/dist/pi-extension/subagents/persistent.d.ts.map +1 -0
  369. package/dist/pi-extension/subagents/persistent.js +322 -0
  370. package/dist/pi-extension/subagents/persistent.js.map +1 -0
  371. package/dist/pi-extension/subagents/presentation-hooks.d.ts +25 -0
  372. package/dist/pi-extension/subagents/presentation-hooks.d.ts.map +1 -0
  373. package/dist/pi-extension/subagents/presentation-hooks.js +2 -0
  374. package/dist/pi-extension/subagents/presentation-hooks.js.map +1 -0
  375. package/dist/pi-extension/subagents/presentation.d.ts +149 -0
  376. package/dist/pi-extension/subagents/presentation.d.ts.map +1 -0
  377. package/dist/pi-extension/subagents/presentation.js +419 -0
  378. package/dist/pi-extension/subagents/presentation.js.map +1 -0
  379. package/dist/pi-extension/subagents/state.d.ts +183 -0
  380. package/dist/pi-extension/subagents/state.d.ts.map +1 -0
  381. package/dist/pi-extension/subagents/state.js +92 -0
  382. package/dist/pi-extension/subagents/state.js.map +1 -0
  383. package/dist/pi-extension/subagents/task-models.d.ts +9 -0
  384. package/dist/pi-extension/subagents/task-models.d.ts.map +1 -0
  385. package/dist/pi-extension/subagents/task-models.js +293 -0
  386. package/dist/pi-extension/subagents/task-models.js.map +1 -0
  387. package/dist/pi-extension/subagents/tool-boundary.d.ts +16 -0
  388. package/dist/pi-extension/subagents/tool-boundary.d.ts.map +1 -0
  389. package/dist/pi-extension/subagents/tool-boundary.js +53 -0
  390. package/dist/pi-extension/subagents/tool-boundary.js.map +1 -0
  391. package/dist/pi-extension/subagents/worktree-tools.d.ts +16 -0
  392. package/dist/pi-extension/subagents/worktree-tools.d.ts.map +1 -0
  393. package/dist/pi-extension/subagents/worktree-tools.js +185 -0
  394. package/dist/pi-extension/subagents/worktree-tools.js.map +1 -0
  395. package/dist/provenance.json +5 -0
  396. package/package.json +540 -27
  397. package/index.d.ts +0 -1
  398. package/index.js +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../maestro/core/routing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,KAAK;IACL,SAAS;IACT,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACP,KAAK;CACI,CAAC;AAEX,MAAM,UAAU,eAAe,CAAC,KAAa;IAC5C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AACzD,CAAC;AAmED,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAChD,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACtC,CAAC;CACD;AAED,MAAM,UAAU,kBAAkB,CACjC,SAAiB;IAEjB,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;IACjC,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,SAAS,IAAI,CAAC,IAAI,SAAS,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACzE,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;IACpD,MAAM,OA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E,CACd,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAC9D,CAAC;IACH,MAAM,KAAK,GAAG;QACb,mEAAmE;KACnE,CAAC;IACF,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC7C,KAAK,MAAM,KAAK,IAAI,aAAa;QAChC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CACT,OAAO,MAAM,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,6BAA6B,CACxE,CAAC;IACH,CAAC;IACD,OAAO,kBAAkB,CACxB,KAAK,EACL,MAAM,CAAC,MAAM,EACb,QAAQ,EACR,eAAe,EACf,aAAa,CACb,CAAC;AACH,CAAC","sourcesContent":["import type {\n\tTaskPreferences,\n\tTaskThinkingPreferences,\n} from \"./config/task-model-types.ts\";\nimport { encodeHostValue } from \"./host-text.ts\";\nimport type { ThinkingLevel } from \"./types.ts\";\nimport { isFiniteNumber, isString } from \"./config/type-guards.ts\";\nexport type { ThinkingLevel } from \"./types.ts\";\n\nexport const THINKING_LEVELS = [\n\t\"off\",\n\t\"minimal\",\n\t\"low\",\n\t\"medium\",\n\t\"high\",\n\t\"xhigh\",\n\t\"max\",\n] as const;\n\nexport function isThinkingLevel(value: string): value is ThinkingLevel {\n\treturn THINKING_LEVELS.some((level) => level === value);\n}\n\nexport type RuntimeSource = \"request\" | \"agent\" | \"parent\";\n\nexport interface RuntimeRequest {\n\tmodel?: string;\n\tthinking?: ThinkingLevel;\n}\n\nexport interface ParentRuntime {\n\tprovider: string;\n\tmodelId: string;\n\tthinking: ThinkingLevel;\n}\n\nexport interface RoutingModel {\n\tprovider: string;\n\tid: string;\n\treasoning: boolean;\n\tthinkingLevelMap?: Partial<Record<ThinkingLevel, string | null>>;\n\tinput?: string[];\n\tcontextWindow?: number;\n\tmaxTokens?: number;\n\tcost?: {\n\t\tinput?: number;\n\t\toutput?: number;\n\t\tcacheRead?: number;\n\t\tcacheWrite?: number;\n\t};\n}\n\nexport interface ModelRegistryAdapter {\n\tfind(provider: string, modelId: string): RoutingModel | undefined;\n\tavailable(): RoutingModel[];\n\thasConfiguredAuth(model: { provider: string; id: string }): boolean;\n\t// pi-herdr-agents extension\n\tsupportedThinkingLevels(model: RoutingModel): ThinkingLevel[];\n\t// pi-herdr-agents extension\n\tclampThinkingLevel(model: RoutingModel, level: ThinkingLevel): ThinkingLevel;\n\t// pi-herdr-agents extension\n\t/** Exact `provider/model-id` refs of the session's model scope (`--models` /\n\t * `enabledModels`, narrowed by an inherited {@link MODEL_SCOPE_ENV}).\n\t * Absent means the session is unscoped; empty means no model is in scope. */\n\tscope?: readonly string[];\n}\n\nexport interface ResolvedRuntimePlan {\n\tprovider: string;\n\tmodelId: string;\n\tmodel: string;\n\tthinking: ThinkingLevel;\n\tmodelSource: RuntimeSource;\n\tthinkingSource: RuntimeSource | \"task\";\n\trequestedModel?: string;\n\trequestedThinking?: ThinkingLevel;\n\tthinkingAdjustment?: {\n\t\tfrom: ThinkingLevel;\n\t\tto: ThinkingLevel;\n\t\treason: \"non-reasoning\" | \"inherited-clamp\" | \"task-clamp\";\n\t};\n\tobserved?: {\n\t\tmodel?: string;\n\t\tthinking?: ThinkingLevel;\n\t};\n\truntimeMismatch?: string;\n}\n\nexport class RuntimeResolutionError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"RuntimeResolutionError\";\n\t}\n}\n\nexport function parseExactModelRef(\n\treference: string,\n): { provider: string; modelId: string } | undefined {\n\tconst trimmed = reference.trim();\n\tconst separator = trimmed.indexOf(\"/\");\n\tif (separator <= 0 || separator === trimmed.length - 1) return undefined;\n\tconst provider = trimmed.slice(0, separator).trim();\n\tconst modelId = trimmed.slice(separator + 1).trim();\n\treturn provider && modelId ? { provider, modelId } : undefined;\n}\n\nfunction toRoutingModel(value: any): RoutingModel | undefined {\n\tif (!value || !isString(value.provider) || !isString(value.id)) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\tprovider: value.provider,\n\t\tid: value.id,\n\t\treasoning: value.reasoning ?? false,\n\t\tthinkingLevelMap: value.thinkingLevelMap,\n\t\tinput: Array.isArray(value.input) ? value.input : undefined,\n\t\tcontextWindow: isFiniteNumber(value.contextWindow)\n\t\t\t? value.contextWindow\n\t\t\t: undefined,\n\t\tmaxTokens: isFiniteNumber(value.maxTokens) ? value.maxTokens : undefined,\n\t\tcost: value.cost,\n\t};\n}\n\n// pi-herdr-agents extension\nexport interface RoutingRegistrySource {\n\tfind(provider: string, modelId: string): any;\n\tgetAvailable?: () => any[];\n\tgetAll?: () => any[];\n\thasConfiguredAuth?: (model: any) => boolean;\n}\n\n// pi-herdr-agents extension\nexport function createModelRegistryAdapter(\n\tregistry: RoutingRegistrySource,\n\tcapabilities: Pick<\n\t\tModelRegistryAdapter,\n\t\t\"supportedThinkingLevels\" | \"clampThinkingLevel\"\n\t>,\n): ModelRegistryAdapter {\n\treturn {\n\t\tfind(provider, modelId) {\n\t\t\treturn toRoutingModel(registry.find(provider, modelId));\n\t\t},\n\t\tavailable() {\n\t\t\tconst direct = registry.getAvailable?.() ?? [];\n\t\t\tconst source = direct.length > 0 ? direct : (registry.getAll?.() ?? []);\n\t\t\tconst models: RoutingModel[] = [];\n\t\t\tconst seen = new Set<string>();\n\t\t\tfor (const raw of source) {\n\t\t\t\tconst candidate = toRoutingModel(raw);\n\t\t\t\tif (!candidate) continue;\n\t\t\t\tif (\n\t\t\t\t\tdirect.length === 0 &&\n\t\t\t\t\tregistry.hasConfiguredAuth &&\n\t\t\t\t\t!registry.hasConfiguredAuth(raw)\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst ref = `${candidate.provider}/${candidate.id}`;\n\t\t\t\tif (seen.has(ref)) continue;\n\t\t\t\tseen.add(ref);\n\t\t\t\tmodels.push(candidate);\n\t\t\t}\n\t\t\treturn models;\n\t\t},\n\t\thasConfiguredAuth(model) {\n\t\t\tif (!registry.hasConfiguredAuth) {\n\t\t\t\treturn (registry.getAvailable?.() ?? []).some(\n\t\t\t\t\t(candidate) =>\n\t\t\t\t\t\tcandidate.provider === model.provider && candidate.id === model.id,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst original = registry.find(model.provider, model.id);\n\t\t\treturn !!original && registry.hasConfiguredAuth(original);\n\t\t},\n\t\tsupportedThinkingLevels: (model) =>\n\t\t\tcapabilities.supportedThinkingLevels(model),\n\t\tclampThinkingLevel: (model, level) =>\n\t\t\tcapabilities.clampThinkingLevel(model, level),\n\t};\n}\n\n// pi-herdr-agents extension\n// Scoped sessions (--models / enabledModels) can use only their scoped model\n// set, so every selection path resolves against it: wrapping the registry\n// hides out-of-scope models from task shortlists, exact-ref validation, and\n// \"Available:\" alternative lists, while capability helpers delegate unchanged.\nexport function scopeModelRegistryAdapter(\n\tregistry: ModelRegistryAdapter,\n\tscopedRefs: ReadonlySet<string>,\n): ModelRegistryAdapter {\n\treturn {\n\t\tscope: [...scopedRefs],\n\t\tfind(provider, modelId) {\n\t\t\treturn scopedRefs.has(`${provider}/${modelId}`)\n\t\t\t\t? registry.find(provider, modelId)\n\t\t\t\t: undefined;\n\t\t},\n\t\tavailable() {\n\t\t\treturn registry\n\t\t\t\t.available()\n\t\t\t\t.filter((model) => scopedRefs.has(`${model.provider}/${model.id}`));\n\t\t},\n\t\thasConfiguredAuth: (model) => registry.hasConfiguredAuth(model),\n\t\tsupportedThinkingLevels: (model) => registry.supportedThinkingLevels(model),\n\t\tclampThinkingLevel: (model, level) =>\n\t\t\tregistry.clampThinkingLevel(model, level),\n\t};\n}\n\n// pi-herdr-agents extension\n/** The session's model scope, or undefined when the session is unscoped. An\n * empty scope is still a scope: no model passes it. */\nexport function modelScopeOf(\n\tregistry: Pick<ModelRegistryAdapter, \"scope\">,\n): readonly string[] | undefined {\n\treturn registry.scope;\n}\n\n// pi-herdr-agents extension\n/**\n * A scoped parent's exact model allowlist, carried to its child as a JSON\n * array of `provider/model-id` refs. Pi reads `--models` as patterns (globs,\n * fuzzy ids, `:thinking` suffixes) and drops the scope entirely when nothing\n * resolves, so `--models` alone can widen a child's scope. The child's routing\n * intersects its own scope with this allowlist instead.\n */\nexport const MODEL_SCOPE_ENV = \"PI_SUBAGENT_MODEL_SCOPE\";\n\n// pi-herdr-agents extension\n/** The value a launch exports for {@link MODEL_SCOPE_ENV}; empty when unscoped. */\nexport function formatInheritedModelScope(\n\tscope: readonly string[] | undefined,\n): string {\n\treturn scope ? JSON.stringify(scope) : \"\";\n}\n\n// pi-herdr-agents extension\n/**\n * Parse an inherited allowlist. Unset or empty means the parent was unscoped.\n * Anything else that is not a JSON array of strings fails closed: an empty\n * allowlist, under which no model is in scope.\n */\nexport function parseInheritedModelScope(\n\traw: string | undefined,\n): readonly string[] | undefined {\n\tif (raw === undefined || raw === \"\") return undefined;\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(raw);\n\t\tif (Array.isArray(parsed) && parsed.every(isString)) return parsed;\n\t} catch {\n\t\t// Malformed: fall through to the empty allowlist.\n\t}\n\treturn [];\n}\n\n// pi-herdr-agents extension\n/**\n * This session's effective scope: its own resolved scope, narrowed to the\n * allowlist it inherited. An inherited allowlist applies even when the\n * session's own `--models` resolved to nothing, so a child never becomes\n * unscoped because its catalog failed to match the parent's refs.\n */\nexport function sessionModelScope(\n\townScope: readonly string[],\n\trawInherited: string | undefined,\n): readonly string[] | undefined {\n\tconst inherited = parseInheritedModelScope(rawInherited);\n\tif (!inherited) return ownScope.length > 0 ? ownScope : undefined;\n\tif (ownScope.length === 0) return inherited;\n\tconst allowed = new Set(inherited);\n\treturn ownScope.filter((ref) => allowed.has(ref));\n}\n\nfunction formatScope(scope: readonly string[]): string {\n\treturn scope.length > 0 ? scope.join(\", \") : \"none\";\n}\n\n// pi-herdr-agents extension\n/** Refuse a model outside a scoped session's model set; unscoped sessions pass. */\nexport function assertModelInScope(\n\tmodel: string,\n\tregistry: Pick<ModelRegistryAdapter, \"scope\">,\n\twhat = \"model\",\n\thint = \"pick an in-scope exact provider/model-id\",\n): void {\n\tconst scope = modelScopeOf(registry);\n\tif (!scope || scope.includes(model)) return;\n\tthrow new RuntimeResolutionError(\n\t\t`${what} ${JSON.stringify(model)} is outside this session's model scope (--models / enabledModels: ${formatScope(scope)}); ${hint}`,\n\t);\n}\n\nfunction formatSupported(\n\tmodel: RoutingModel,\n\tregistry: ModelRegistryAdapter,\n): string {\n\tconst levels = registry.supportedThinkingLevels(model);\n\treturn levels.length > 0 ? levels.join(\", \") : \"(none)\";\n}\n\ninterface FieldSelection {\n\tvalue?: string;\n\tsource: RuntimeSource;\n}\n\nfunction selectField(\n\trequestValue: string | undefined,\n\tagentValue: string | undefined,\n): FieldSelection {\n\tif (requestValue != null && requestValue !== \"\") {\n\t\treturn { value: requestValue, source: \"request\" };\n\t}\n\tif (agentValue != null && agentValue !== \"\") {\n\t\treturn { value: agentValue, source: \"agent\" };\n\t}\n\treturn { source: \"parent\" };\n}\n\nexport function parseModelFallbacks(reference: string): string[] {\n\tconst candidates = reference.split(\",\").map((candidate) => candidate.trim());\n\tif (candidates.some((candidate) => candidate === \"\")) {\n\t\tthrow new RuntimeResolutionError(\n\t\t\t`model fallback list ${JSON.stringify(reference)} cannot contain an empty candidate`,\n\t\t);\n\t}\n\treturn candidates;\n}\n\nexport function resolveRuntimePlan(\n\trequest: RuntimeRequest,\n\tagentDefaults: RuntimeRequest,\n\tparent: ParentRuntime,\n\tregistry: ModelRegistryAdapter,\n\ttaskThinking?: ThinkingLevel,\n): ResolvedRuntimePlan {\n\tconst modelSelection = selectField(request.model, agentDefaults.model);\n\tlet provider = parent.provider;\n\tlet modelId = parent.modelId;\n\tlet selectedModel = registry.find(provider, modelId);\n\n\tconst scope = modelScopeOf(registry);\n\tif (\n\t\t!modelSelection.value &&\n\t\tscope &&\n\t\t!scope.includes(`${provider}/${modelId}`)\n\t) {\n\t\tthrow new RuntimeResolutionError(\n\t\t\t`the parent model ${JSON.stringify(`${provider}/${modelId}`)} is outside this session's model scope (--models / enabledModels: ${formatScope(scope)}), so a subagent cannot inherit it. Pass model with an in-scope exact provider/model-id or a task: category, set model in the role definition, or switch the parent to an in-scope model with /model`,\n\t\t);\n\t}\n\n\tif (modelSelection.value) {\n\t\tconst parsed = parseExactModelRef(modelSelection.value);\n\t\tif (!parsed) {\n\t\t\tthrow new RuntimeResolutionError(\n\t\t\t\t`model ${JSON.stringify(modelSelection.value)} must be an exact authenticated provider/model-id`,\n\t\t\t);\n\t\t}\n\t\tconst found = registry.find(parsed.provider, parsed.modelId);\n\t\tif (!found) {\n\t\t\tconst alternatives = registry\n\t\t\t\t.available()\n\t\t\t\t.map((model) => `${model.provider}/${model.id}`);\n\t\t\tthrow new RuntimeResolutionError(\n\t\t\t\t`unknown model ${JSON.stringify(modelSelection.value)}; exact registry match required. Available: ${alternatives.join(\", \") || \"(none)\"}`,\n\t\t\t);\n\t\t}\n\t\tif (!registry.hasConfiguredAuth(found)) {\n\t\t\tthrow new RuntimeResolutionError(\n\t\t\t\t`model ${JSON.stringify(modelSelection.value)} has no configured authentication`,\n\t\t\t);\n\t\t}\n\t\tprovider = found.provider;\n\t\tmodelId = found.id;\n\t\tselectedModel = found;\n\t}\n\n\tconst thinkingSelection =\n\t\trequest.thinking == null && taskThinking != null\n\t\t\t? { value: taskThinking, source: \"task\" as const }\n\t\t\t: selectField(request.thinking, agentDefaults.thinking);\n\tconst preferredThinking = thinkingSelection.value ?? parent.thinking;\n\tif (!isThinkingLevel(preferredThinking)) {\n\t\tthrow new RuntimeResolutionError(\n\t\t\t`thinking ${JSON.stringify(preferredThinking)} must be one of: ${THINKING_LEVELS.join(\", \")}`,\n\t\t);\n\t}\n\n\tlet thinking = preferredThinking;\n\tlet thinkingAdjustment: ResolvedRuntimePlan[\"thinkingAdjustment\"];\n\tif (\n\t\tthinkingSelection.source !== \"parent\" &&\n\t\tthinkingSelection.source !== \"task\"\n\t) {\n\t\tif (!selectedModel) {\n\t\t\tthrow new RuntimeResolutionError(\n\t\t\t\t`model capability information is unavailable; cannot validate explicit thinking ${JSON.stringify(preferredThinking)}`,\n\t\t\t);\n\t\t}\n\t\tconst supported = registry.supportedThinkingLevels(selectedModel);\n\t\tif (!supported.includes(preferredThinking)) {\n\t\t\tthrow new RuntimeResolutionError(\n\t\t\t\t`thinking ${JSON.stringify(preferredThinking)} is not supported by ${JSON.stringify(`${provider}/${modelId}`)}; supported: ${formatSupported(selectedModel, registry)}`,\n\t\t\t);\n\t\t}\n\t} else if (selectedModel) {\n\t\tthinking = registry.clampThinkingLevel(selectedModel, preferredThinking);\n\t\tif (thinking !== preferredThinking) {\n\t\t\tthinkingAdjustment = {\n\t\t\t\tfrom: preferredThinking,\n\t\t\t\tto: thinking,\n\t\t\t\treason:\n\t\t\t\t\tthinkingSelection.source === \"task\"\n\t\t\t\t\t\t? \"task-clamp\"\n\t\t\t\t\t\t: selectedModel.reasoning\n\t\t\t\t\t\t\t? \"inherited-clamp\"\n\t\t\t\t\t\t\t: \"non-reasoning\",\n\t\t\t};\n\t\t}\n\t}\n\n\tconst plan: ResolvedRuntimePlan = {\n\t\tprovider,\n\t\tmodelId,\n\t\tmodel: `${provider}/${modelId}`,\n\t\tthinking,\n\t\tmodelSource: modelSelection.source,\n\t\tthinkingSource: thinkingSelection.source,\n\t};\n\tif (modelSelection.value) plan.requestedModel = modelSelection.value;\n\tif (thinkingSelection.value) plan.requestedThinking = preferredThinking;\n\tif (thinkingAdjustment) plan.thinkingAdjustment = thinkingAdjustment;\n\treturn plan;\n}\n\n/** Resolve every configured fallback before launching the first child. */\nexport function resolveRuntimePlans(\n\trequest: RuntimeRequest,\n\tagentDefaults: RuntimeRequest,\n\tparent: ParentRuntime,\n\tregistry: ModelRegistryAdapter,\n\ttaskPreferences?: TaskPreferences,\n\tworktree = false,\n\ttasksThinking?: TaskThinkingPreferences,\n): ResolvedRuntimePlan[] {\n\tconst selection = selectField(request.model, agentDefaults.model);\n\tif (!selection.value)\n\t\treturn [resolveRuntimePlan(request, agentDefaults, parent, registry)];\n\n\tlet references: string[];\n\tlet taskThinking: ThinkingLevel | undefined;\n\tconst trimmed = selection.value.trim();\n\tif (\n\t\tselection.value\n\t\t\t.split(\",\")\n\t\t\t.some((candidate) =>\n\t\t\t\tcandidate.trim().toLowerCase().startsWith(\"task:\"),\n\t\t\t) &&\n\t\ttrimmed.includes(\",\")\n\t) {\n\t\tthrow new RuntimeResolutionError(\n\t\t\t\"task: references must be the entire model value, not part of a fallback list\",\n\t\t);\n\t}\n\tif (trimmed.toLowerCase().startsWith(\"task:\")) {\n\t\tif (selection.source !== \"request\") {\n\t\t\tthrow new RuntimeResolutionError(\n\t\t\t\t\"task: references are only valid in the subagent tool's model parameter\",\n\t\t\t);\n\t\t}\n\t\tconst category = trimmed.slice(\"task:\".length).trim().toLowerCase();\n\t\tconst configuredCategories = Object.keys(taskPreferences ?? {});\n\t\tif (\n\t\t\t!category ||\n\t\t\t!taskPreferences ||\n\t\t\t!Object.hasOwn(taskPreferences, category)\n\t\t) {\n\t\t\tthrow new RuntimeResolutionError(\n\t\t\t\t`task category ${JSON.stringify(category)} is not configured; configured categories: ${configuredCategories.join(\", \") || \"(none)\"}`,\n\t\t\t);\n\t\t}\n\t\t// SAFETY: Object.hasOwn above confirms this lower-cased category is a configured key.\n\t\tconst candidates = taskPreferences[category as keyof TaskPreferences] ?? [];\n\t\t// SAFETY: category is a configured, parsed task preference key.\n\t\ttaskThinking = tasksThinking?.[category as keyof TaskPreferences];\n\t\treferences = candidates.filter((candidate) => {\n\t\t\tconst parsed = parseExactModelRef(candidate);\n\t\t\tconst model = parsed && registry.find(parsed.provider, parsed.modelId);\n\t\t\treturn !!model && registry.hasConfiguredAuth(model);\n\t\t});\n\t\tif (references.length === 0) {\n\t\t\tconst alternatives = registry\n\t\t\t\t.available()\n\t\t\t\t.filter((model) => registry.hasConfiguredAuth(model))\n\t\t\t\t.map((model) => `${model.provider}/${model.id}`);\n\t\t\tthrow new RuntimeResolutionError(\n\t\t\t\t`task category ${JSON.stringify(category)} has no authenticated candidates; authenticated alternatives: ${alternatives.join(\", \") || \"(none)\"}`,\n\t\t\t);\n\t\t}\n\t\tif (worktree) references = [references[0]];\n\t} else {\n\t\treferences = parseModelFallbacks(selection.value);\n\t}\n\n\treturn references.map((model) =>\n\t\tresolveRuntimePlan(\n\t\t\tselection.source === \"request\"\n\t\t\t\t? { ...request, model }\n\t\t\t\t: { ...request, model: undefined },\n\t\t\tselection.source === \"agent\"\n\t\t\t\t? { ...agentDefaults, model }\n\t\t\t\t: agentDefaults,\n\t\t\tparent,\n\t\t\tregistry,\n\t\t\ttaskThinking,\n\t\t),\n\t);\n}\n\nfunction formatTokenCount(value: number | undefined): string | undefined {\n\tif (!value || value <= 0) return undefined;\n\tif (value >= 1_000_000) return `${Number((value / 1_000_000).toFixed(1))}m`;\n\tif (value >= 1_000) return `${Math.round(value / 1_000)}k`;\n\treturn String(value);\n}\n\nexport function getAuthenticatedTaskPreferences(\n\tregistry: ModelRegistryAdapter,\n\ttaskPreferences?: TaskPreferences,\n): TaskPreferences {\n\tconst authenticated: TaskPreferences = {};\n\tfor (const [category, candidates] of Object.entries(taskPreferences ?? {})) {\n\t\tconst available = candidates.filter((candidate) => {\n\t\t\tconst parsed = parseExactModelRef(candidate);\n\t\t\tconst model = parsed && registry.find(parsed.provider, parsed.modelId);\n\t\t\treturn !!model && registry.hasConfiguredAuth(model);\n\t\t});\n\t\tif (available.length > 0) {\n\t\t\t// SAFETY: parsed task preferences can only contain supported category keys.\n\t\t\tauthenticated[category as keyof TaskPreferences] = available;\n\t\t}\n\t}\n\treturn authenticated;\n}\n\nfunction modelCatalogLine(\n\tregistry: ModelRegistryAdapter,\n\tmodel: RoutingModel,\n): string {\n\tconst supportedThinking = registry.supportedThinkingLevels(model);\n\tconst facts = [\n\t\tmodel.reasoning\n\t\t\t? `reasoning (${supportedThinking.join(\"/\") || \"no thinking levels\"})`\n\t\t\t: \"non-reasoning\",\n\t\tmodel.input?.includes(\"image\") ? \"text+image\" : \"text\",\n\t\tformatTokenCount(model.contextWindow)\n\t\t\t? `${formatTokenCount(model.contextWindow)} context`\n\t\t\t: undefined,\n\t\tformatTokenCount(model.maxTokens)\n\t\t\t? `${formatTokenCount(model.maxTokens)} max output`\n\t\t\t: undefined,\n\t].filter(Boolean);\n\treturn `- ${encodeHostValue(`${model.provider}/${model.id}`, Infinity)} — ${facts.join(\", \")}`;\n}\n\nfunction finishModelCatalog(\n\tlines: string[],\n\tmodelCount: number,\n\tregistry: ModelRegistryAdapter,\n\ttaskPreferences?: TaskPreferences,\n\ttasksThinking?: TaskThinkingPreferences,\n): string {\n\tif (modelCount === 0)\n\t\tlines.push(\n\t\t\t\"- none discovered; omitting model still inherits the parent runtime\",\n\t\t);\n\tlines.push(\n\t\t...taskShortlistLines(\n\t\t\tgetAuthenticatedTaskPreferences(registry, taskPreferences),\n\t\t\ttasksThinking,\n\t\t),\n\t);\n\treturn lines.join(\"\\n\");\n}\n\nfunction taskShortlistLines(\n\tshortlists: TaskPreferences,\n\ttasksThinking?: TaskThinkingPreferences,\n): string[] {\n\tconst configured = Object.entries(shortlists);\n\tif (configured.length === 0) return [];\n\treturn [\n\t\t\"Task-category shortlists:\",\n\t\t...configured.map(([category, candidates]) => {\n\t\t\t// SAFETY: shortlists contain only parsed task category keys.\n\t\t\tconst thinking = tasksThinking?.[category as keyof TaskPreferences];\n\t\t\treturn `- ${category}: ${candidates.map((candidate) => encodeHostValue(candidate, Infinity)).join(\", \")}${thinking ? `; thinking: ${thinking} (clamped per candidate)` : \"; thinking: role, then parent\"}`;\n\t\t}),\n\t];\n}\n\nexport function buildAuthenticatedModelCatalog(\n\tregistry: ModelRegistryAdapter,\n\tlimit = 24,\n\ttaskPreferences?: TaskPreferences,\n\ttasksThinking?: TaskThinkingPreferences,\n): string {\n\tconst models = registry\n\t\t.available()\n\t\t.filter((model) => registry.hasConfiguredAuth(model))\n\t\t.sort((a, b) =>\n\t\t\t`${a.provider}/${a.id}`.localeCompare(`${b.provider}/${b.id}`),\n\t\t);\n\tconst shortlists = getAuthenticatedTaskPreferences(registry, taskPreferences);\n\tif (Object.keys(shortlists).length > 0) {\n\t\tconst refs = new Set(Object.values(shortlists).flat());\n\t\tconst shortlisted = models.filter((model) =>\n\t\t\trefs.has(`${model.provider}/${model.id}`),\n\t\t);\n\t\tconst alternatives = models.filter(\n\t\t\t(model) => !refs.has(`${model.provider}/${model.id}`),\n\t\t);\n\t\tconst lines = [\n\t\t\t...taskShortlistLines(shortlists, tasksThinking),\n\t\t\t\"Shortlisted model capabilities:\",\n\t\t\t...shortlisted.map((model) => modelCatalogLine(registry, model)),\n\t\t];\n\t\tif (alternatives.length > 0)\n\t\t\tlines.push(\n\t\t\t\t`Other authenticated model IDs: ${alternatives\n\t\t\t\t\t.slice(0, limit)\n\t\t\t\t\t.map((model) =>\n\t\t\t\t\t\tencodeHostValue(`${model.provider}/${model.id}`, Infinity),\n\t\t\t\t\t)\n\t\t\t\t\t.join(\", \")}`,\n\t\t\t);\n\t\tif (alternatives.length > limit)\n\t\t\tlines.push(\n\t\t\t\t`- … ${alternatives.length - limit} more authenticated models omitted`,\n\t\t\t);\n\t\treturn lines.join(\"\\n\");\n\t}\n\tconst visibleModels = models.slice(0, limit);\n\tconst lines = [\n\t\t\"Authenticated subagent models (use exact provider/model-id only):\",\n\t];\n\tfor (const model of visibleModels)\n\t\tlines.push(modelCatalogLine(registry, model));\n\tif (models.length > visibleModels.length) {\n\t\tlines.push(\n\t\t\t`- … ${models.length - visibleModels.length} more authenticated models omitted`,\n\t\t);\n\t}\n\treturn finishModelCatalog(\n\t\tlines,\n\t\tmodels.length,\n\t\tregistry,\n\t\ttaskPreferences,\n\t\ttasksThinking,\n\t);\n}\n\n// Scoped catalogs replace the truncated authenticated snapshot with the\n// session's scoped model set (--models / enabledModels): every listed pick is\n// selectable in this session. Pass a registry wrapped by\n// scopeModelRegistryAdapter so task-category shortlists also keep only scoped\n// candidates. The limit mirrors the authenticated catalog's cap; anything\n// beyond it falls behind an explicit omission tail.\nexport function buildScopedModelCatalog(\n\tregistry: ModelRegistryAdapter,\n\tscopedModels: readonly RoutingModel[],\n\ttaskPreferences?: TaskPreferences,\n\tlimit = 24,\n\ttasksThinking?: TaskThinkingPreferences,\n): string {\n\tconst seen = new Set<string>();\n\tconst models = scopedModels\n\t\t.filter((model) => {\n\t\t\tconst ref = `${model.provider}/${model.id}`;\n\t\t\tif (seen.has(ref)) return false;\n\t\t\tseen.add(ref);\n\t\t\treturn true;\n\t\t})\n\t\t.sort((a, b) =>\n\t\t\t`${a.provider}/${a.id}`.localeCompare(`${b.provider}/${b.id}`),\n\t\t);\n\tconst lines = [\n\t\t\"Authenticated subagent models (use exact provider/model-id only):\",\n\t];\n\tconst visibleModels = models.slice(0, limit);\n\tfor (const model of visibleModels)\n\t\tlines.push(modelCatalogLine(registry, model));\n\tif (models.length > visibleModels.length) {\n\t\tlines.push(\n\t\t\t`- … ${models.length - visibleModels.length} more scoped models omitted`,\n\t\t);\n\t}\n\treturn finishModelCatalog(\n\t\tlines,\n\t\tmodels.length,\n\t\tregistry,\n\t\ttaskPreferences,\n\t\ttasksThinking,\n\t);\n}\n"]}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Resolves the absolute path of the bash that runs a launch script. Returns
3
+ * `undefined` when the host has no usable bash. It is only called on Windows,
4
+ * and only once the pane's shell is known.
5
+ */
6
+ export type ScriptShellResolver = () => string | undefined;
7
+ /** The shells a Windows Herdr pane can run that this host knows how to address. */
8
+ export type PaneShell = "powershell" | "cmd" | "posix";
9
+ /** True for the WSL launcher (`<drive>:\Windows\System32|Sysnative\bash.exe`). */
10
+ export declare function isWslBashLauncher(path: string): boolean;
11
+ /**
12
+ * Quote a value as a PowerShell single-quoted literal. PowerShell treats the
13
+ * typographic single quotes as quote characters too, so each one is doubled.
14
+ */
15
+ export declare function powerShellQuote(value: string): string;
16
+ /**
17
+ * Classify a Windows pane shell from the `name` (or `argv0`) Herdr reports for
18
+ * the pane's shell process: `powershell.exe`, `pwsh.exe`, `cmd.exe`,
19
+ * `bash.exe` (Git Bash) or `sh.exe`. Anything else is unknown.
20
+ */
21
+ export declare function classifyPaneShell(name: string | undefined): PaneShell | undefined;
22
+ /**
23
+ * The line typed into a pane to run a launch script.
24
+ *
25
+ * Off Windows the pane's own `bash` runs it. On Windows the pane's shell is
26
+ * configurable (`terminal.default_shell`), and a bare `bash` can resolve to the
27
+ * WSL launcher, which runs the script inside WSL. So when the pane shell is
28
+ * known the script runs through an absolute bash path, spelled for that shell:
29
+ *
30
+ * - PowerShell: `& '<bash>' '<script>'`
31
+ * - cmd: `"<bash>" "<script>"`
32
+ * - Git Bash / sh: `'<bash>' '<script>'`
33
+ *
34
+ * An unknown shell, or no process info, keeps the bare `bash '<script>'` line
35
+ * as before, and the resolver is not called. A Git Bash / sh pane also keeps it
36
+ * when no usable bash resolves (none, an error, or the WSL launcher), since its
37
+ * own `bash` is the right one. In a PowerShell or cmd pane the bare line would
38
+ * hit WSL or nothing, so a missing bash, the WSL launcher, or a path cmd would
39
+ * expand fails before anything is typed.
40
+ */
41
+ export declare function buildScriptLaunchCommand(options: {
42
+ scriptPath: string;
43
+ platform: NodeJS.Platform;
44
+ paneShell?: PaneShell | undefined;
45
+ resolveShell?: ScriptShellResolver | undefined;
46
+ }): string;
47
+ //# sourceMappingURL=script-launch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-launch.d.ts","sourceRoot":"","sources":["../../../maestro/core/script-launch.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,MAAM,GAAG,SAAS,CAAC;AAE3D,mFAAmF;AACnF,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,KAAK,GAAG,OAAO,CAAC;AAEvD,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKvD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,MAAM,GAAG,SAAS,GACtB,SAAS,GAAG,SAAS,CAWvB;AAmCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,YAAY,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAC/C,GAAG,MAAM,CAsBT"}
@@ -0,0 +1,102 @@
1
+ import { shellQuote } from "./shell.js";
2
+ /** True for the WSL launcher (`<drive>:\Windows\System32|Sysnative\bash.exe`). */
3
+ export function isWslBashLauncher(path) {
4
+ const normalized = path.replace(/\//g, "\\").toLowerCase();
5
+ return /^[a-z]:\\windows\\(?:system32|sysnative)\\bash\.exe$/.test(normalized);
6
+ }
7
+ /**
8
+ * Quote a value as a PowerShell single-quoted literal. PowerShell treats the
9
+ * typographic single quotes as quote characters too, so each one is doubled.
10
+ */
11
+ export function powerShellQuote(value) {
12
+ return "'" + value.replace(/['\u2018\u2019\u201a\u201b]/g, "$&$&") + "'";
13
+ }
14
+ /**
15
+ * Classify a Windows pane shell from the `name` (or `argv0`) Herdr reports for
16
+ * the pane's shell process: `powershell.exe`, `pwsh.exe`, `cmd.exe`,
17
+ * `bash.exe` (Git Bash) or `sh.exe`. Anything else is unknown.
18
+ */
19
+ export function classifyPaneShell(name) {
20
+ if (!name)
21
+ return undefined;
22
+ const base = name
23
+ .split(/[\\/]/)
24
+ .pop()
25
+ .toLowerCase()
26
+ .replace(/\.exe$/, "");
27
+ if (base === "powershell" || base === "pwsh")
28
+ return "powershell";
29
+ if (base === "cmd")
30
+ return "cmd";
31
+ if (base === "bash" || base === "sh")
32
+ return "posix";
33
+ return undefined;
34
+ }
35
+ const SET_SHELL_PATH = "Set shellPath in Pi's settings.json to the bash.exe of a Git for Windows, Scoop or MSYS2 install (for example %LOCALAPPDATA%\\Programs\\Git\\bin\\bash.exe).";
36
+ /** cmd.exe expands %VAR% inside quotes, `!VAR!` under delayed expansion, and ends a quote at `"`. */
37
+ const CMD_UNSAFE = /["%!]/;
38
+ /** The bash to type, or `undefined` to keep the bare line (bash/sh panes only). */
39
+ function resolveUsableBash(resolveShell, lenient) {
40
+ let bashPath;
41
+ try {
42
+ bashPath = resolveShell?.();
43
+ }
44
+ catch (error) {
45
+ if (lenient)
46
+ return undefined;
47
+ throw error;
48
+ }
49
+ if (!bashPath) {
50
+ if (lenient)
51
+ return undefined;
52
+ throw new Error(`No bash found to run the subagent launch script on Windows. Install Git for Windows or set shellPath in Pi's settings.json to its bash.exe.`);
53
+ }
54
+ if (isWslBashLauncher(bashPath)) {
55
+ if (lenient)
56
+ return undefined;
57
+ throw new Error(`No usable Git Bash found: the bash on PATH is the WSL launcher (${bashPath}), which would run the subagent launch script inside WSL. ${SET_SHELL_PATH}`);
58
+ }
59
+ return bashPath;
60
+ }
61
+ /**
62
+ * The line typed into a pane to run a launch script.
63
+ *
64
+ * Off Windows the pane's own `bash` runs it. On Windows the pane's shell is
65
+ * configurable (`terminal.default_shell`), and a bare `bash` can resolve to the
66
+ * WSL launcher, which runs the script inside WSL. So when the pane shell is
67
+ * known the script runs through an absolute bash path, spelled for that shell:
68
+ *
69
+ * - PowerShell: `& '<bash>' '<script>'`
70
+ * - cmd: `"<bash>" "<script>"`
71
+ * - Git Bash / sh: `'<bash>' '<script>'`
72
+ *
73
+ * An unknown shell, or no process info, keeps the bare `bash '<script>'` line
74
+ * as before, and the resolver is not called. A Git Bash / sh pane also keeps it
75
+ * when no usable bash resolves (none, an error, or the WSL launcher), since its
76
+ * own `bash` is the right one. In a PowerShell or cmd pane the bare line would
77
+ * hit WSL or nothing, so a missing bash, the WSL launcher, or a path cmd would
78
+ * expand fails before anything is typed.
79
+ */
80
+ export function buildScriptLaunchCommand(options) {
81
+ const { scriptPath, platform, paneShell, resolveShell } = options;
82
+ const bare = `bash ${shellQuote(scriptPath)}`;
83
+ if (platform !== "win32" || !paneShell)
84
+ return bare;
85
+ // Git Bash's own bare `bash` is the pane's bash, not the WSL launcher, so a
86
+ // host that cannot name a usable bash leaves a bash/sh pane on the old line.
87
+ const bashPath = resolveUsableBash(resolveShell, paneShell === "posix");
88
+ if (bashPath === undefined)
89
+ return bare;
90
+ switch (paneShell) {
91
+ case "powershell":
92
+ return `& ${powerShellQuote(bashPath)} ${powerShellQuote(scriptPath)}`;
93
+ case "posix":
94
+ return `${shellQuote(bashPath)} ${shellQuote(scriptPath)}`;
95
+ case "cmd":
96
+ if (CMD_UNSAFE.test(bashPath) || CMD_UNSAFE.test(scriptPath)) {
97
+ throw new Error(`Cannot run the subagent launch script from a cmd.exe pane: a path contains ", % or !, which cmd.exe would expand (bash: ${bashPath}; script: ${scriptPath}). Use a PowerShell or Git Bash pane (terminal.default_shell in Herdr's config), or a bash.exe path without those characters.`);
98
+ }
99
+ return `"${bashPath}" "${scriptPath}"`;
100
+ }
101
+ }
102
+ //# sourceMappingURL=script-launch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-launch.js","sourceRoot":"","sources":["../../../maestro/core/script-launch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAYxC,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;I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olves the absolute path of the bash that runs a launch script. Returns\n * `undefined` when the host has no usable bash. It is only called on Windows,\n * and only once the pane's shell is known.\n */\nexport type ScriptShellResolver = () => string | undefined;\n\n/** The shells a Windows Herdr pane can run that this host knows how to address. */\nexport type PaneShell = \"powershell\" | \"cmd\" | \"posix\";\n\n/** True for the WSL launcher (`<drive>:\\Windows\\System32|Sysnative\\bash.exe`). */\nexport function isWslBashLauncher(path: string): boolean {\n\tconst normalized = path.replace(/\\//g, \"\\\\\").toLowerCase();\n\treturn /^[a-z]:\\\\windows\\\\(?:system32|sysnative)\\\\bash\\.exe$/.test(\n\t\tnormalized,\n\t);\n}\n\n/**\n * Quote a value as a PowerShell single-quoted literal. PowerShell treats the\n * typographic single quotes as quote characters too, so each one is doubled.\n */\nexport function powerShellQuote(value: string): string {\n\treturn \"'\" + value.replace(/['\\u2018\\u2019\\u201a\\u201b]/g, \"$&$&\") + \"'\";\n}\n\n/**\n * Classify a Windows pane shell from the `name` (or `argv0`) Herdr reports for\n * the pane's shell process: `powershell.exe`, `pwsh.exe`, `cmd.exe`,\n * `bash.exe` (Git Bash) or `sh.exe`. Anything else is unknown.\n */\nexport function classifyPaneShell(\n\tname: string | undefined,\n): PaneShell | undefined {\n\tif (!name) return undefined;\n\tconst base = name\n\t\t.split(/[\\\\/]/)\n\t\t.pop()!\n\t\t.toLowerCase()\n\t\t.replace(/\\.exe$/, \"\");\n\tif (base === \"powershell\" || base === \"pwsh\") return \"powershell\";\n\tif (base === \"cmd\") return \"cmd\";\n\tif (base === \"bash\" || base === \"sh\") return \"posix\";\n\treturn undefined;\n}\n\nconst SET_SHELL_PATH =\n\t\"Set shellPath in Pi's settings.json to the bash.exe of a Git for Windows, Scoop or MSYS2 install (for example %LOCALAPPDATA%\\\\Programs\\\\Git\\\\bin\\\\bash.exe).\";\n\n/** cmd.exe expands %VAR% inside quotes, `!VAR!` under delayed expansion, and ends a quote at `\"`. */\nconst CMD_UNSAFE = /[\"%!]/;\n\n/** The bash to type, or `undefined` to keep the bare line (bash/sh panes only). */\nfunction resolveUsableBash(\n\tresolveShell: ScriptShellResolver | undefined,\n\tlenient: boolean,\n): string | undefined {\n\tlet bashPath: string | undefined;\n\ttry {\n\t\tbashPath = resolveShell?.();\n\t} catch (error) {\n\t\tif (lenient) return undefined;\n\t\tthrow error;\n\t}\n\tif (!bashPath) {\n\t\tif (lenient) return undefined;\n\t\tthrow new Error(\n\t\t\t`No bash found to run the subagent launch script on Windows. Install Git for Windows or set shellPath in Pi's settings.json to its bash.exe.`,\n\t\t);\n\t}\n\tif (isWslBashLauncher(bashPath)) {\n\t\tif (lenient) return undefined;\n\t\tthrow new Error(\n\t\t\t`No usable Git Bash found: the bash on PATH is the WSL launcher (${bashPath}), which would run the subagent launch script inside WSL. ${SET_SHELL_PATH}`,\n\t\t);\n\t}\n\treturn bashPath;\n}\n\n/**\n * The line typed into a pane to run a launch script.\n *\n * Off Windows the pane's own `bash` runs it. On Windows the pane's shell is\n * configurable (`terminal.default_shell`), and a bare `bash` can resolve to the\n * WSL launcher, which runs the script inside WSL. So when the pane shell is\n * known the script runs through an absolute bash path, spelled for that shell:\n *\n * - PowerShell: `& '<bash>' '<script>'`\n * - cmd: `\"<bash>\" \"<script>\"`\n * - Git Bash / sh: `'<bash>' '<script>'`\n *\n * An unknown shell, or no process info, keeps the bare `bash '<script>'` line\n * as before, and the resolver is not called. A Git Bash / sh pane also keeps it\n * when no usable bash resolves (none, an error, or the WSL launcher), since its\n * own `bash` is the right one. In a PowerShell or cmd pane the bare line would\n * hit WSL or nothing, so a missing bash, the WSL launcher, or a path cmd would\n * expand fails before anything is typed.\n */\nexport function buildScriptLaunchCommand(options: {\n\tscriptPath: string;\n\tplatform: NodeJS.Platform;\n\tpaneShell?: PaneShell | undefined;\n\tresolveShell?: ScriptShellResolver | undefined;\n}): string {\n\tconst { scriptPath, platform, paneShell, resolveShell } = options;\n\tconst bare = `bash ${shellQuote(scriptPath)}`;\n\tif (platform !== \"win32\" || !paneShell) return bare;\n\n\t// Git Bash's own bare `bash` is the pane's bash, not the WSL launcher, so a\n\t// host that cannot name a usable bash leaves a bash/sh pane on the old line.\n\tconst bashPath = resolveUsableBash(resolveShell, paneShell === \"posix\");\n\tif (bashPath === undefined) return bare;\n\tswitch (paneShell) {\n\t\tcase \"powershell\":\n\t\t\treturn `& ${powerShellQuote(bashPath)} ${powerShellQuote(scriptPath)}`;\n\t\tcase \"posix\":\n\t\t\treturn `${shellQuote(bashPath)} ${shellQuote(scriptPath)}`;\n\t\tcase \"cmd\":\n\t\t\tif (CMD_UNSAFE.test(bashPath) || CMD_UNSAFE.test(scriptPath)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Cannot run the subagent launch script from a cmd.exe pane: a path contains \", % or !, which cmd.exe would expand (bash: ${bashPath}; script: ${scriptPath}). Use a PowerShell or Git Bash pane (terminal.default_shell in Herdr's config), or a bash.exe path without those characters.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn `\"${bashPath}\" \"${scriptPath}\"`;\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function shellQuote(value: string): string;
2
+ //# sourceMappingURL=shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../maestro/core/shell.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhD"}
@@ -0,0 +1,4 @@
1
+ export function shellQuote(value) {
2
+ return "'" + value.replace(/'/g, "'\\''") + "'";
3
+ }
4
+ //# sourceMappingURL=shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell.js","sourceRoot":"","sources":["../../../maestro/core/shell.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAC,KAAa;IACvC,OAAO,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,GAAG,CAAC;AACjD,CAAC","sourcesContent":["export function shellQuote(value: string): string {\n\treturn \"'\" + value.replace(/'/g, \"'\\\\''\") + \"'\";\n}\n"]}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Bounds for persistent-specialist notices (ADR-0019). The parent's checks
3
+ * decide; the child's stricter checks only spare a compliant child a drop.
4
+ */
5
+ /** Notices the parent delivers per specialist generation. */
6
+ export declare const NOTICE_CAP = 50;
7
+ /** The child tool refuses a notice sooner than this after its previous one. */
8
+ export declare const NOTICE_CHILD_INTERVAL_MS = 30000;
9
+ /** The parent drops, and counts, a notice sooner than this after the last delivered one. */
10
+ export declare const NOTICE_PARENT_INTERVAL_MS = 15000;
11
+ /** Bound for the encoded notice message in the parent's host line. */
12
+ export declare const NOTICE_MESSAGE_CHARS = 4000;
13
+ /** Parent-owned notice accounting for one specialist generation. */
14
+ export interface NoticeBudget {
15
+ delivered: number;
16
+ /** Notices dropped by the rate limit and not yet reported to the parent. */
17
+ unreported: number;
18
+ /** Parent clock of the last delivered notice. */
19
+ lastAt?: number;
20
+ }
21
+ /** Refuse notices for a non-persistent run before any resource exists. */
22
+ export declare function notifyLaunchRefusal(behavior: {
23
+ persistent: boolean;
24
+ notify?: boolean;
25
+ }): string | undefined;
26
+ export type NoticeAdmission = "deliver" | "rate-limited" | "capped";
27
+ export declare function admitNotice(budget: NoticeBudget, now: number): NoticeAdmission;
28
+ /**
29
+ * The child's own refusal before it records a notice, from the notices this
30
+ * generation already recorded; `undefined` means it may send.
31
+ */
32
+ export declare function childNoticeRefusal(previous: {
33
+ sent: number;
34
+ lastAt?: number;
35
+ }, now: number): string | undefined;
36
+ //# sourceMappingURL=specialist-notice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specialist-notice.d.ts","sourceRoot":"","sources":["../../../maestro/core/specialist-notice.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6DAA6D;AAC7D,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,+EAA+E;AAC/E,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAC/C,4FAA4F;AAC5F,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAChD,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAE1C,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,MAAM,GAAG,SAAS,CAIrB;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEpE,wBAAgB,WAAW,CAC1B,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,MAAM,GACT,eAAe,CAQjB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3C,GAAG,EAAE,MAAM,GACT,MAAM,GAAG,SAAS,CASpB"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Bounds for persistent-specialist notices (ADR-0019). The parent's checks
3
+ * decide; the child's stricter checks only spare a compliant child a drop.
4
+ */
5
+ /** Notices the parent delivers per specialist generation. */
6
+ export const NOTICE_CAP = 50;
7
+ /** The child tool refuses a notice sooner than this after its previous one. */
8
+ export const NOTICE_CHILD_INTERVAL_MS = 30_000;
9
+ /** The parent drops, and counts, a notice sooner than this after the last delivered one. */
10
+ export const NOTICE_PARENT_INTERVAL_MS = 15_000;
11
+ /** Bound for the encoded notice message in the parent's host line. */
12
+ export const NOTICE_MESSAGE_CHARS = 4_000;
13
+ /** Refuse notices for a non-persistent run before any resource exists. */
14
+ export function notifyLaunchRefusal(behavior) {
15
+ return behavior.notify && !behavior.persistent
16
+ ? "notify requires a persistent specialist; an ordinary child reports through its result or caller_ping."
17
+ : undefined;
18
+ }
19
+ export function admitNotice(budget, now) {
20
+ if (budget.delivered >= NOTICE_CAP)
21
+ return "capped";
22
+ if (budget.lastAt !== undefined &&
23
+ now - budget.lastAt < NOTICE_PARENT_INTERVAL_MS)
24
+ return "rate-limited";
25
+ return "deliver";
26
+ }
27
+ /**
28
+ * The child's own refusal before it records a notice, from the notices this
29
+ * generation already recorded; `undefined` means it may send.
30
+ */
31
+ export function childNoticeRefusal(previous, now) {
32
+ if (previous.sent >= NOTICE_CAP)
33
+ return `This specialist has used its notice cap (${NOTICE_CAP}); the parent ignores further notices. Wait for subagent_send.`;
34
+ if (previous.lastAt === undefined || Number.isNaN(previous.lastAt))
35
+ return undefined;
36
+ const wait = previous.lastAt + NOTICE_CHILD_INTERVAL_MS - now;
37
+ if (wait > 0)
38
+ return `Notices must be at least ${NOTICE_CHILD_INTERVAL_MS / 1_000} seconds apart; try again in ${Math.ceil(wait / 1_000)} s. Nothing was sent.`;
39
+ return undefined;
40
+ }
41
+ //# sourceMappingURL=specialist-notice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specialist-notice.js","sourceRoot":"","sources":["../../../maestro/core/specialist-notice.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6DAA6D;AAC7D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAC7B,+EAA+E;AAC/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC/C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAChD,sEAAsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAW1C,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB,CAAC,QAGnC;IACA,OAAO,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU;QAC7C,CAAC,CAAC,uGAAuG;QACzG,CAAC,CAAC,SAAS,CAAC;AACd,CAAC;AAID,MAAM,UAAU,WAAW,CAC1B,MAAoB,EACpB,GAAW;IAEX,IAAI,MAAM,CAAC,SAAS,IAAI,UAAU;QAAE,OAAO,QAAQ,CAAC;IACpD,IACC,MAAM,CAAC,MAAM,KAAK,SAAS;QAC3B,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,yBAAyB;QAE/C,OAAO,cAAc,CAAC;IACvB,OAAO,SAAS,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CACjC,QAA2C,EAC3C,GAAW;IAEX,IAAI,QAAQ,CAAC,IAAI,IAAI,UAAU;QAC9B,OAAO,4CAA4C,UAAU,gEAAgE,CAAC;IAC/H,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QACjE,OAAO,SAAS,CAAC;IAClB,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,GAAG,wBAAwB,GAAG,GAAG,CAAC;IAC9D,IAAI,IAAI,GAAG,CAAC;QACX,OAAO,4BAA4B,wBAAwB,GAAG,KAAK,gCAAgC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,uBAAuB,CAAC;IACnJ,OAAO,SAAS,CAAC;AAClB,CAAC","sourcesContent":["/**\n * Bounds for persistent-specialist notices (ADR-0019). The parent's checks\n * decide; the child's stricter checks only spare a compliant child a drop.\n */\n\n/** Notices the parent delivers per specialist generation. */\nexport const NOTICE_CAP = 50;\n/** The child tool refuses a notice sooner than this after its previous one. */\nexport const NOTICE_CHILD_INTERVAL_MS = 30_000;\n/** The parent drops, and counts, a notice sooner than this after the last delivered one. */\nexport const NOTICE_PARENT_INTERVAL_MS = 15_000;\n/** Bound for the encoded notice message in the parent's host line. */\nexport const NOTICE_MESSAGE_CHARS = 4_000;\n\n/** Parent-owned notice accounting for one specialist generation. */\nexport interface NoticeBudget {\n\tdelivered: number;\n\t/** Notices dropped by the rate limit and not yet reported to the parent. */\n\tunreported: number;\n\t/** Parent clock of the last delivered notice. */\n\tlastAt?: number;\n}\n\n/** Refuse notices for a non-persistent run before any resource exists. */\nexport function notifyLaunchRefusal(behavior: {\n\tpersistent: boolean;\n\tnotify?: boolean;\n}): string | undefined {\n\treturn behavior.notify && !behavior.persistent\n\t\t? \"notify requires a persistent specialist; an ordinary child reports through its result or caller_ping.\"\n\t\t: undefined;\n}\n\nexport type NoticeAdmission = \"deliver\" | \"rate-limited\" | \"capped\";\n\nexport function admitNotice(\n\tbudget: NoticeBudget,\n\tnow: number,\n): NoticeAdmission {\n\tif (budget.delivered >= NOTICE_CAP) return \"capped\";\n\tif (\n\t\tbudget.lastAt !== undefined &&\n\t\tnow - budget.lastAt < NOTICE_PARENT_INTERVAL_MS\n\t)\n\t\treturn \"rate-limited\";\n\treturn \"deliver\";\n}\n\n/**\n * The child's own refusal before it records a notice, from the notices this\n * generation already recorded; `undefined` means it may send.\n */\nexport function childNoticeRefusal(\n\tprevious: { sent: number; lastAt?: number },\n\tnow: number,\n): string | undefined {\n\tif (previous.sent >= NOTICE_CAP)\n\t\treturn `This specialist has used its notice cap (${NOTICE_CAP}); the parent ignores further notices. Wait for subagent_send.`;\n\tif (previous.lastAt === undefined || Number.isNaN(previous.lastAt))\n\t\treturn undefined;\n\tconst wait = previous.lastAt + NOTICE_CHILD_INTERVAL_MS - now;\n\tif (wait > 0)\n\t\treturn `Notices must be at least ${NOTICE_CHILD_INTERVAL_MS / 1_000} seconds apart; try again in ${Math.ceil(wait / 1_000)} s. Nothing was sent.`;\n\treturn undefined;\n}\n"]}
@@ -0,0 +1,87 @@
1
+ export declare const SNAPSHOT_STALLED_AFTER_MS = 60000;
2
+ export declare const DEFAULT_STATUS_LINE_LIMIT = 4;
3
+ export declare const MAX_STATUS_NAME_LENGTH = 72;
4
+ export declare const MAX_STATUS_LINE_LENGTH = 120;
5
+ export type SubagentStatusKind = "starting" | "active" | "waiting" | "stalled";
6
+ export type SubagentStatusTransition = "stalled" | "recovered" | null;
7
+ export type StatusSnapshotState = "unseen" | "present" | "missing" | "invalid" | "wrong-id";
8
+ export type StatusActivityPhase = "starting" | "active" | "waiting" | "done";
9
+ export interface StatusConfig {
10
+ enabled: boolean;
11
+ lineLimit: number;
12
+ }
13
+ export type StatusObservation = {
14
+ snapshot: "present";
15
+ updatedAt: number;
16
+ sequence: number;
17
+ phase: StatusActivityPhase;
18
+ active?: boolean;
19
+ activeScope?: string;
20
+ activeSince?: number;
21
+ waitingSince?: number;
22
+ latestEvent?: string;
23
+ activityLabel?: string;
24
+ } | {
25
+ snapshot: "missing" | "invalid" | "wrong-id";
26
+ snapshotError?: string;
27
+ };
28
+ export interface SubagentStatusState {
29
+ startTimeMs: number;
30
+ firstObservationAtMs: number | null;
31
+ lastActivityAtMs: number | null;
32
+ lastActivitySequence: number | null;
33
+ localOverrideAtMs: number | null;
34
+ localOverrideSequence: number | null;
35
+ activeNow: boolean;
36
+ activeSinceMs: number | null;
37
+ activeScope: string | null;
38
+ waitingSinceMs: number | null;
39
+ phase: StatusActivityPhase | null;
40
+ latestEvent: string | null;
41
+ activityLabel: string | null;
42
+ snapshotState: StatusSnapshotState;
43
+ snapshotProblemSinceMs: number | null;
44
+ snapshotError: string | null;
45
+ currentKind: SubagentStatusKind;
46
+ }
47
+ export interface StatusSnapshot {
48
+ kind: SubagentStatusKind;
49
+ elapsedMs: number;
50
+ elapsedText: string;
51
+ activeSinceMs: number | null;
52
+ activeDurationText: string | null;
53
+ activeScope: string | null;
54
+ waitingSinceMs: number | null;
55
+ waitingDurationText: string | null;
56
+ latestEvent: string | null;
57
+ activityLabel: string | null;
58
+ snapshotState: StatusSnapshotState;
59
+ snapshotError: string | null;
60
+ snapshotProblemText: string | null;
61
+ statusLabel: string | null;
62
+ }
63
+ export interface CappedStatusLines {
64
+ visibleLines: string[];
65
+ overflow: number;
66
+ }
67
+ export declare function normalizeStatusName(name: string): string;
68
+ export declare function parseStatusConfig(rawConfig: any, source?: string): StatusConfig;
69
+ export declare function loadStatusConfig(configPath: string, examplePath: string): StatusConfig;
70
+ export declare function formatElapsedDuration(ms: number): string;
71
+ export declare function createStatusState(params: {
72
+ startTimeMs: number;
73
+ }): SubagentStatusState;
74
+ export declare function observeStatus(state: SubagentStatusState, observation: StatusObservation, now: number): SubagentStatusState;
75
+ export declare function forceStatusAfterInterrupt(state: SubagentStatusState, now: number): SubagentStatusState;
76
+ export declare function classifyStatus(state: SubagentStatusState, now: number): StatusSnapshot;
77
+ export interface StatusAdvance {
78
+ nextState: SubagentStatusState;
79
+ snapshot: StatusSnapshot;
80
+ transition: SubagentStatusTransition;
81
+ }
82
+ export declare function advanceStatusState(state: SubagentStatusState, now: number): StatusAdvance;
83
+ export declare function formatStatusLine(name: string, snapshot: StatusSnapshot): string;
84
+ export declare function formatTransitionLine(name: string, snapshot: StatusSnapshot, transition: Exclude<SubagentStatusTransition, null>): string;
85
+ export declare function capStatusLines(lines: string[], lineLimit: number): CappedStatusLines;
86
+ export declare function formatStatusAggregate(lines: string[], lineLimit: number): string;
87
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../maestro/core/status.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAChD,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAC/E,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAC5B,QAAQ,GACR,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,CAAC;AACd,MAAM,MAAM,mBAAm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