@wrongstack/core 0.284.0 → 0.285.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 (810) hide show
  1. package/dist/agent-status-tracker.d.ts +74 -0
  2. package/dist/agent-status-tracker.d.ts.map +1 -0
  3. package/dist/autophase/auto-phase-planner.d.ts +79 -0
  4. package/dist/autophase/auto-phase-planner.d.ts.map +1 -0
  5. package/dist/autophase/auto-phase-runner.d.ts +79 -0
  6. package/dist/autophase/auto-phase-runner.d.ts.map +1 -0
  7. package/dist/autophase/checkpoint.d.ts +49 -0
  8. package/dist/autophase/checkpoint.d.ts.map +1 -0
  9. package/dist/autophase/index.d.ts +9 -0
  10. package/dist/autophase/index.d.ts.map +1 -0
  11. package/dist/autophase/phase-graph-builder.d.ts +46 -0
  12. package/dist/autophase/phase-graph-builder.d.ts.map +1 -0
  13. package/dist/autophase/phase-orchestrator.d.ts +150 -0
  14. package/dist/autophase/phase-orchestrator.d.ts.map +1 -0
  15. package/dist/autophase/phase-store.d.ts +29 -0
  16. package/dist/autophase/phase-store.d.ts.map +1 -0
  17. package/dist/autophase/types.d.ts +329 -0
  18. package/dist/autophase/types.d.ts.map +1 -0
  19. package/dist/boot.d.ts +73 -0
  20. package/dist/boot.d.ts.map +1 -0
  21. package/dist/coordination/adaptive-concurrency.d.ts +63 -0
  22. package/dist/coordination/adaptive-concurrency.d.ts.map +1 -0
  23. package/dist/coordination/agent-bridge.d.ts +24 -0
  24. package/dist/coordination/agent-bridge.d.ts.map +1 -0
  25. package/dist/coordination/agent-monitor.d.ts +100 -0
  26. package/dist/coordination/agent-monitor.d.ts.map +1 -0
  27. package/dist/coordination/agent-subagent-runner.d.ts +74 -0
  28. package/dist/coordination/agent-subagent-runner.d.ts.map +1 -0
  29. package/dist/coordination/agents/agent-prompts.d.ts +2 -0
  30. package/dist/coordination/agents/agent-prompts.d.ts.map +1 -0
  31. package/dist/coordination/agents/index.d.ts +35 -0
  32. package/dist/coordination/agents/index.d.ts.map +1 -0
  33. package/dist/coordination/agents/phase1-discovery.d.ts +4 -0
  34. package/dist/coordination/agents/phase1-discovery.d.ts.map +1 -0
  35. package/dist/coordination/agents/phase2-planning.d.ts +4 -0
  36. package/dist/coordination/agents/phase2-planning.d.ts.map +1 -0
  37. package/dist/coordination/agents/phase3-build.d.ts +4 -0
  38. package/dist/coordination/agents/phase3-build.d.ts.map +1 -0
  39. package/dist/coordination/agents/phase3-techstack.d.ts +13 -0
  40. package/dist/coordination/agents/phase3-techstack.d.ts.map +1 -0
  41. package/dist/coordination/agents/phase4-verify.d.ts +4 -0
  42. package/dist/coordination/agents/phase4-verify.d.ts.map +1 -0
  43. package/dist/coordination/agents/phase5-review.d.ts +4 -0
  44. package/dist/coordination/agents/phase5-review.d.ts.map +1 -0
  45. package/dist/coordination/agents/phase6-domain.d.ts +4 -0
  46. package/dist/coordination/agents/phase6-domain.d.ts.map +1 -0
  47. package/dist/coordination/agents/phase7-knowledge.d.ts +4 -0
  48. package/dist/coordination/agents/phase7-knowledge.d.ts.map +1 -0
  49. package/dist/coordination/agents/phase8-delivery.d.ts +4 -0
  50. package/dist/coordination/agents/phase8-delivery.d.ts.map +1 -0
  51. package/dist/coordination/agents/phase9-meta.d.ts +4 -0
  52. package/dist/coordination/agents/phase9-meta.d.ts.map +1 -0
  53. package/dist/coordination/agents/types.d.ts +79 -0
  54. package/dist/coordination/agents/types.d.ts.map +1 -0
  55. package/dist/coordination/agents.d.ts +8 -0
  56. package/dist/coordination/agents.d.ts.map +1 -0
  57. package/dist/coordination/auto-extend.d.ts +46 -0
  58. package/dist/coordination/auto-extend.d.ts.map +1 -0
  59. package/dist/coordination/autonomous-brain.d.ts +154 -0
  60. package/dist/coordination/autonomous-brain.d.ts.map +1 -0
  61. package/dist/coordination/autonomous-coordinator.d.ts +239 -0
  62. package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
  63. package/dist/coordination/brain-monitor.d.ts +74 -0
  64. package/dist/coordination/brain-monitor.d.ts.map +1 -0
  65. package/dist/coordination/brain.d.ts +104 -0
  66. package/dist/coordination/brain.d.ts.map +1 -0
  67. package/dist/coordination/change-manager.d.ts +151 -0
  68. package/dist/coordination/change-manager.d.ts.map +1 -0
  69. package/dist/coordination/checkpoint-wiring.d.ts +61 -0
  70. package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
  71. package/dist/coordination/collab-bus.d.ts +132 -0
  72. package/dist/coordination/collab-bus.d.ts.map +1 -0
  73. package/dist/coordination/collab-debug.d.ts +302 -0
  74. package/dist/coordination/collab-debug.d.ts.map +1 -0
  75. package/dist/coordination/commit-safety.d.ts +72 -0
  76. package/dist/coordination/commit-safety.d.ts.map +1 -0
  77. package/dist/coordination/consensus-protocol.d.ts +106 -0
  78. package/dist/coordination/consensus-protocol.d.ts.map +1 -0
  79. package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
  80. package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
  81. package/dist/coordination/delegate-tool.d.ts +101 -0
  82. package/dist/coordination/delegate-tool.d.ts.map +1 -0
  83. package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
  84. package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
  85. package/dist/coordination/dep-watcher.d.ts +74 -0
  86. package/dist/coordination/dep-watcher.d.ts.map +1 -0
  87. package/dist/coordination/director/director-errors.d.ts +29 -0
  88. package/dist/coordination/director/director-errors.d.ts.map +1 -0
  89. package/dist/coordination/director-construction.d.ts +90 -0
  90. package/dist/coordination/director-construction.d.ts.map +1 -0
  91. package/dist/coordination/director-prompts.d.ts +119 -0
  92. package/dist/coordination/director-prompts.d.ts.map +1 -0
  93. package/dist/coordination/director-session.d.ts +68 -0
  94. package/dist/coordination/director-session.d.ts.map +1 -0
  95. package/dist/coordination/director-tools.d.ts +65 -0
  96. package/dist/coordination/director-tools.d.ts.map +1 -0
  97. package/dist/coordination/director.d.ts +802 -0
  98. package/dist/coordination/director.d.ts.map +1 -0
  99. package/dist/coordination/dispatcher.d.ts +82 -0
  100. package/dist/coordination/dispatcher.d.ts.map +1 -0
  101. package/dist/coordination/file-author-tracker.d.ts +76 -0
  102. package/dist/coordination/file-author-tracker.d.ts.map +1 -0
  103. package/dist/coordination/fleet-bus.d.ts +122 -0
  104. package/dist/coordination/fleet-bus.d.ts.map +1 -0
  105. package/dist/coordination/fleet-event-validation.d.ts +10 -0
  106. package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
  107. package/dist/coordination/fleet-manager.d.ts +234 -0
  108. package/dist/coordination/fleet-manager.d.ts.map +1 -0
  109. package/dist/coordination/fleet-spawn.d.ts +102 -0
  110. package/dist/coordination/fleet-spawn.d.ts.map +1 -0
  111. package/dist/coordination/fleet-status-tool.d.ts +36 -0
  112. package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
  113. package/dist/coordination/fleet-supervisor.d.ts +157 -0
  114. package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
  115. package/dist/coordination/fleet.d.ts +96 -0
  116. package/dist/coordination/fleet.d.ts.map +1 -0
  117. package/dist/coordination/global-mailbox.d.ts +234 -0
  118. package/dist/coordination/global-mailbox.d.ts.map +1 -0
  119. package/dist/coordination/icoordinator.d.ts +97 -0
  120. package/dist/coordination/icoordinator.d.ts.map +1 -0
  121. package/dist/coordination/ifleet-manager.d.ts +177 -0
  122. package/dist/coordination/ifleet-manager.d.ts.map +1 -0
  123. package/dist/coordination/in-memory-transport.d.ts +12 -0
  124. package/dist/coordination/in-memory-transport.d.ts.map +1 -0
  125. package/dist/coordination/index.d.ts +78 -2587
  126. package/dist/coordination/index.d.ts.map +1 -0
  127. package/dist/coordination/index.js +739 -254
  128. package/dist/coordination/index.js.map +7 -1
  129. package/dist/coordination/knowledge-graph.d.ts +217 -0
  130. package/dist/coordination/knowledge-graph.d.ts.map +1 -0
  131. package/dist/coordination/large-answer-store.d.ts +61 -0
  132. package/dist/coordination/large-answer-store.d.ts.map +1 -0
  133. package/dist/coordination/mail-tools.d.ts +34 -0
  134. package/dist/coordination/mail-tools.d.ts.map +1 -0
  135. package/dist/coordination/mailbox-actions.d.ts +68 -0
  136. package/dist/coordination/mailbox-actions.d.ts.map +1 -0
  137. package/dist/coordination/mailbox-health.d.ts +131 -0
  138. package/dist/coordination/mailbox-health.d.ts.map +1 -0
  139. package/dist/coordination/mailbox-hooks.d.ts +55 -0
  140. package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
  141. package/dist/coordination/mailbox-tool.d.ts +75 -0
  142. package/dist/coordination/mailbox-tool.d.ts.map +1 -0
  143. package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +37 -22
  144. package/dist/coordination/mailbox-types.d.ts.map +1 -0
  145. package/dist/coordination/mailbox.d.ts +69 -0
  146. package/dist/coordination/mailbox.d.ts.map +1 -0
  147. package/dist/coordination/model-matrix.d.ts +98 -0
  148. package/dist/coordination/model-matrix.d.ts.map +1 -0
  149. package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
  150. package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
  151. package/dist/coordination/null-fleet-bus.d.ts +10 -0
  152. package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
  153. package/dist/coordination/package-author-tracker.d.ts +87 -0
  154. package/dist/coordination/package-author-tracker.d.ts.map +1 -0
  155. package/dist/coordination/package-outdated-watcher.d.ts +83 -0
  156. package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
  157. package/dist/coordination/single-instance-mailbox.d.ts +154 -0
  158. package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
  159. package/dist/coordination/spawn-budget.d.ts +6 -0
  160. package/dist/coordination/spawn-budget.d.ts.map +1 -0
  161. package/dist/coordination/subagent-budget.d.ts +323 -0
  162. package/dist/coordination/subagent-budget.d.ts.map +1 -0
  163. package/dist/coordination/subagent-nicknames.d.ts +42 -0
  164. package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
  165. package/dist/coordination/subagent-result-tool.d.ts +20 -0
  166. package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
  167. package/dist/coordination/task-auctioneer.d.ts +143 -0
  168. package/dist/coordination/task-auctioneer.d.ts.map +1 -0
  169. package/dist/coordination/task-dag.d.ts +147 -0
  170. package/dist/coordination/task-dag.d.ts.map +1 -0
  171. package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
  172. package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
  173. package/dist/coordination/transport.d.ts +2 -0
  174. package/dist/coordination/transport.d.ts.map +1 -0
  175. package/dist/coordination/worktree-task-runner.d.ts +45 -0
  176. package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
  177. package/dist/core/agent-internals.d.ts +41 -0
  178. package/dist/core/agent-internals.d.ts.map +1 -0
  179. package/dist/core/agent-loop.d.ts +18 -0
  180. package/dist/core/agent-loop.d.ts.map +1 -0
  181. package/dist/core/agent-response.d.ts +21 -0
  182. package/dist/core/agent-response.d.ts.map +1 -0
  183. package/dist/core/agent-tools.d.ts +21 -0
  184. package/dist/core/agent-tools.d.ts.map +1 -0
  185. package/dist/core/agent-types.d.ts +95 -0
  186. package/dist/core/agent-types.d.ts.map +1 -0
  187. package/dist/core/agent.d.ts +54 -0
  188. package/dist/core/agent.d.ts.map +1 -0
  189. package/dist/core/btw.d.ts +40 -0
  190. package/dist/core/btw.d.ts.map +1 -0
  191. package/dist/core/context.d.ts +269 -0
  192. package/dist/core/context.d.ts.map +1 -0
  193. package/dist/core/continue-intent.d.ts +92 -0
  194. package/dist/core/continue-intent.d.ts.map +1 -0
  195. package/dist/core/continue-to-next-iteration.d.ts +96 -0
  196. package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
  197. package/dist/core/conversation-state.d.ts +96 -0
  198. package/dist/core/conversation-state.d.ts.map +1 -0
  199. package/dist/core/fallback-model.d.ts +94 -0
  200. package/dist/core/fallback-model.d.ts.map +1 -0
  201. package/dist/core/fleet-pulse.d.ts +42 -0
  202. package/dist/core/fleet-pulse.d.ts.map +1 -0
  203. package/dist/core/input-builder.d.ts +95 -0
  204. package/dist/core/input-builder.d.ts.map +1 -0
  205. package/dist/core/instruction-bundle.d.ts +22 -0
  206. package/dist/core/instruction-bundle.d.ts.map +1 -0
  207. package/dist/core/iteration-limit.d.ts +35 -0
  208. package/dist/core/iteration-limit.d.ts.map +1 -0
  209. package/dist/core/mailbox-loop.d.ts +63 -0
  210. package/dist/core/mailbox-loop.d.ts.map +1 -0
  211. package/dist/core/modes/brief.d.ts +2 -0
  212. package/dist/core/modes/brief.d.ts.map +1 -0
  213. package/dist/core/modes/default.d.ts +8 -0
  214. package/dist/core/modes/default.d.ts.map +1 -0
  215. package/dist/core/modes/teach.d.ts +2 -0
  216. package/dist/core/modes/teach.d.ts.map +1 -0
  217. package/dist/core/provider-runner.d.ts +24 -0
  218. package/dist/core/provider-runner.d.ts.map +1 -0
  219. package/dist/core/queued-messages.d.ts +55 -0
  220. package/dist/core/queued-messages.d.ts.map +1 -0
  221. package/dist/core/run-env.d.ts +49 -0
  222. package/dist/core/run-env.d.ts.map +1 -0
  223. package/dist/core/streaming-response-builder.d.ts +78 -0
  224. package/dist/core/streaming-response-builder.d.ts.map +1 -0
  225. package/dist/core/system-prompt-builder.d.ts +213 -0
  226. package/dist/core/system-prompt-builder.d.ts.map +1 -0
  227. package/dist/defaults/index.d.ts +68 -158
  228. package/dist/defaults/index.d.ts.map +1 -0
  229. package/dist/defaults/index.js +1257 -819
  230. package/dist/defaults/index.js.map +7 -1
  231. package/dist/execution/auto-compaction-middleware.d.ts +123 -0
  232. package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
  233. package/dist/execution/autonomous-runner.d.ts +55 -0
  234. package/dist/execution/autonomous-runner.d.ts.map +1 -0
  235. package/dist/execution/autonomy-brain.d.ts +90 -0
  236. package/dist/execution/autonomy-brain.d.ts.map +1 -0
  237. package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
  238. package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
  239. package/dist/execution/compaction-core.d.ts +103 -0
  240. package/dist/execution/compaction-core.d.ts.map +1 -0
  241. package/dist/execution/compactor.d.ts +56 -0
  242. package/dist/execution/compactor.d.ts.map +1 -0
  243. package/dist/execution/design-color.d.ts +31 -0
  244. package/dist/execution/design-color.d.ts.map +1 -0
  245. package/dist/execution/design-detect.d.ts +96 -0
  246. package/dist/execution/design-detect.d.ts.map +1 -0
  247. package/dist/execution/design-kit-loader.d.ts +53 -0
  248. package/dist/execution/design-kit-loader.d.ts.map +1 -0
  249. package/dist/execution/design-materialize.d.ts +32 -0
  250. package/dist/execution/design-materialize.d.ts.map +1 -0
  251. package/dist/execution/design-project-store.d.ts +57 -0
  252. package/dist/execution/design-project-store.d.ts.map +1 -0
  253. package/dist/execution/design-verify.d.ts +44 -0
  254. package/dist/execution/design-verify.d.ts.map +1 -0
  255. package/dist/execution/error-handler.d.ts +34 -0
  256. package/dist/execution/error-handler.d.ts.map +1 -0
  257. package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +10 -225
  258. package/dist/execution/eternal-autonomy.d.ts.map +1 -0
  259. package/dist/execution/goal-preamble.d.ts +2 -0
  260. package/dist/execution/goal-preamble.d.ts.map +1 -0
  261. package/dist/execution/index.d.ts +21 -180
  262. package/dist/execution/index.d.ts.map +1 -0
  263. package/dist/execution/index.js +465 -180
  264. package/dist/execution/index.js.map +7 -1
  265. package/dist/execution/intelligent-compactor.d.ts +85 -0
  266. package/dist/execution/intelligent-compactor.d.ts.map +1 -0
  267. package/dist/execution/model-runtime.d.ts +75 -0
  268. package/dist/execution/model-runtime.d.ts.map +1 -0
  269. package/dist/execution/parallel-eternal-engine.d.ts +130 -0
  270. package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
  271. package/dist/execution/prompt-enhancer.d.ts +12 -13
  272. package/dist/execution/prompt-enhancer.d.ts.map +1 -0
  273. package/dist/execution/prompt-enhancer.js +13 -7
  274. package/dist/execution/prompt-enhancer.js.map +7 -1
  275. package/dist/execution/prompt-loader.d.ts +52 -0
  276. package/dist/execution/prompt-loader.d.ts.map +1 -0
  277. package/dist/execution/provider-runner-impl.d.ts +14 -0
  278. package/dist/execution/provider-runner-impl.d.ts.map +1 -0
  279. package/dist/execution/regex-patterns.d.ts +7 -0
  280. package/dist/execution/regex-patterns.d.ts.map +1 -0
  281. package/dist/execution/retry-policy.d.ts +35 -0
  282. package/dist/execution/retry-policy.d.ts.map +1 -0
  283. package/dist/execution/selective-compactor.d.ts +94 -0
  284. package/dist/execution/selective-compactor.d.ts.map +1 -0
  285. package/dist/execution/skill-loader.d.ts +43 -0
  286. package/dist/execution/skill-loader.d.ts.map +1 -0
  287. package/dist/execution/strategy-compactor.d.ts +43 -0
  288. package/dist/execution/strategy-compactor.d.ts.map +1 -0
  289. package/dist/execution/tool-executor.d.ts +112 -0
  290. package/dist/execution/tool-executor.d.ts.map +1 -0
  291. package/dist/extension/extension-points.d.ts +121 -0
  292. package/dist/extension/extension-points.d.ts.map +1 -0
  293. package/dist/extension/index.d.ts +3 -10
  294. package/dist/extension/index.d.ts.map +1 -0
  295. package/dist/extension/index.js +59 -5
  296. package/dist/extension/index.js.map +7 -1
  297. package/dist/extension/registry.d.ts +86 -0
  298. package/dist/extension/registry.d.ts.map +1 -0
  299. package/dist/fleet-notifier.d.ts +28 -0
  300. package/dist/fleet-notifier.d.ts.map +1 -0
  301. package/dist/hooks/http-executor.d.ts +11 -0
  302. package/dist/hooks/http-executor.d.ts.map +1 -0
  303. package/dist/hooks/index.d.ts +10 -0
  304. package/dist/hooks/index.d.ts.map +1 -0
  305. package/dist/hooks/registry.d.ts +71 -0
  306. package/dist/hooks/registry.d.ts.map +1 -0
  307. package/dist/hooks/runner.d.ts +65 -0
  308. package/dist/hooks/runner.d.ts.map +1 -0
  309. package/dist/hooks/shell-executor.d.ts +33 -0
  310. package/dist/hooks/shell-executor.d.ts.map +1 -0
  311. package/dist/hooks/shell-hooks-equal.d.ts +15 -0
  312. package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
  313. package/dist/hq/agent-bridge.d.ts +27 -0
  314. package/dist/hq/agent-bridge.d.ts.map +1 -0
  315. package/dist/hq/alerts.d.ts +67 -0
  316. package/dist/hq/alerts.d.ts.map +1 -0
  317. package/dist/hq/auth-store.d.ts +161 -0
  318. package/dist/hq/auth-store.d.ts.map +1 -0
  319. package/dist/hq/brain-bridge.d.ts +37 -0
  320. package/dist/hq/brain-bridge.d.ts.map +1 -0
  321. package/dist/hq/commands.d.ts +122 -0
  322. package/dist/hq/commands.d.ts.map +1 -0
  323. package/dist/hq/cost-bridge.d.ts +36 -0
  324. package/dist/hq/cost-bridge.d.ts.map +1 -0
  325. package/dist/hq/factory.d.ts +66 -0
  326. package/dist/hq/factory.d.ts.map +1 -0
  327. package/dist/hq/fleet-bridge.d.ts +39 -0
  328. package/dist/hq/fleet-bridge.d.ts.map +1 -0
  329. package/dist/hq/index.d.ts +18 -816
  330. package/dist/hq/index.d.ts.map +1 -0
  331. package/dist/hq/index.js +417 -122
  332. package/dist/hq/index.js.map +7 -1
  333. package/dist/hq/mailbox-mapper.d.ts +27 -0
  334. package/dist/hq/mailbox-mapper.d.ts.map +1 -0
  335. package/dist/hq/persistence.d.ts +121 -0
  336. package/dist/hq/persistence.d.ts.map +1 -0
  337. package/dist/hq/protocol.d.ts +560 -0
  338. package/dist/hq/protocol.d.ts.map +1 -0
  339. package/dist/hq/publisher.d.ts +177 -0
  340. package/dist/hq/publisher.d.ts.map +1 -0
  341. package/dist/hq/redaction.d.ts +30 -0
  342. package/dist/hq/redaction.d.ts.map +1 -0
  343. package/dist/hq/session-bridge.d.ts +29 -0
  344. package/dist/hq/session-bridge.d.ts.map +1 -0
  345. package/dist/hq/tool-bridge.d.ts +41 -0
  346. package/dist/hq/tool-bridge.d.ts.map +1 -0
  347. package/dist/hq/transcript-mapper.d.ts +36 -0
  348. package/dist/hq/transcript-mapper.d.ts.map +1 -0
  349. package/dist/hq/worktree-bridge.d.ts +34 -0
  350. package/dist/hq/worktree-bridge.d.ts.map +1 -0
  351. package/dist/index.d.ts +108 -2872
  352. package/dist/index.d.ts.map +1 -0
  353. package/dist/index.js +2724 -1344
  354. package/dist/index.js.map +7 -1
  355. package/dist/infrastructure/context-manager.d.ts +92 -0
  356. package/dist/infrastructure/context-manager.d.ts.map +1 -0
  357. package/dist/infrastructure/index.d.ts +6 -64
  358. package/dist/infrastructure/index.d.ts.map +1 -0
  359. package/dist/infrastructure/index.js +39 -12
  360. package/dist/infrastructure/index.js.map +7 -1
  361. package/dist/infrastructure/logger.d.ts +99 -0
  362. package/dist/infrastructure/logger.d.ts.map +1 -0
  363. package/dist/infrastructure/mcp-servers.d.ts +83 -0
  364. package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
  365. package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
  366. package/dist/infrastructure/path-resolver.d.ts.map +1 -0
  367. package/dist/infrastructure/token-counter.d.ts +57 -0
  368. package/dist/infrastructure/token-counter.d.ts.map +1 -0
  369. package/dist/kernel/container.d.ts +84 -0
  370. package/dist/kernel/container.d.ts.map +1 -0
  371. package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +112 -206
  372. package/dist/kernel/events.d.ts.map +1 -0
  373. package/dist/kernel/index.d.ts +6 -107
  374. package/dist/kernel/index.d.ts.map +1 -0
  375. package/dist/kernel/index.js +56 -4
  376. package/dist/kernel/index.js.map +7 -1
  377. package/dist/kernel/pipeline.d.ts +105 -0
  378. package/dist/kernel/pipeline.d.ts.map +1 -0
  379. package/dist/kernel/run-controller.d.ts +55 -0
  380. package/dist/kernel/run-controller.d.ts.map +1 -0
  381. package/dist/kernel/tokens.d.ts +53 -0
  382. package/dist/kernel/tokens.d.ts.map +1 -0
  383. package/dist/mailbox-attach.d.ts +27 -0
  384. package/dist/mailbox-attach.d.ts.map +1 -0
  385. package/dist/middleware/collab-pause.d.ts +73 -0
  386. package/dist/middleware/collab-pause.d.ts.map +1 -0
  387. package/dist/models/codex-catalog.d.ts +41 -0
  388. package/dist/models/codex-catalog.d.ts.map +1 -0
  389. package/dist/models/index.d.ts +8 -163
  390. package/dist/models/index.d.ts.map +1 -0
  391. package/dist/models/index.js +150 -51
  392. package/dist/models/index.js.map +7 -1
  393. package/dist/models/llm-selector.d.ts +47 -0
  394. package/dist/models/llm-selector.d.ts.map +1 -0
  395. package/dist/models/mode-store.d.ts +22 -0
  396. package/dist/models/mode-store.d.ts.map +1 -0
  397. package/dist/models/model-intelligence.d.ts +56 -0
  398. package/dist/models/model-intelligence.d.ts.map +1 -0
  399. package/dist/models/model-router.d.ts +100 -0
  400. package/dist/models/model-router.d.ts.map +1 -0
  401. package/dist/models/models-registry.d.ts +106 -0
  402. package/dist/models/models-registry.d.ts.map +1 -0
  403. package/dist/models/provider-model-resolve.d.ts +69 -0
  404. package/dist/models/provider-model-resolve.d.ts.map +1 -0
  405. package/dist/observability/event-bridge.d.ts +10 -0
  406. package/dist/observability/event-bridge.d.ts.map +1 -0
  407. package/dist/observability/health.d.ts +18 -0
  408. package/dist/observability/health.d.ts.map +1 -0
  409. package/dist/observability/index.d.ts +9 -354
  410. package/dist/observability/index.d.ts.map +1 -0
  411. package/dist/observability/index.js +21 -8
  412. package/dist/observability/index.js.map +7 -1
  413. package/dist/observability/metrics.d.ts +26 -0
  414. package/dist/observability/metrics.d.ts.map +1 -0
  415. package/dist/observability/otel-tracer.d.ts +41 -0
  416. package/dist/observability/otel-tracer.d.ts.map +1 -0
  417. package/dist/observability/otlp-metrics.d.ts +111 -0
  418. package/dist/observability/otlp-metrics.d.ts.map +1 -0
  419. package/dist/observability/otlp-traces.d.ts +95 -0
  420. package/dist/observability/otlp-traces.d.ts.map +1 -0
  421. package/dist/observability/prometheus.d.ts +49 -0
  422. package/dist/observability/prometheus.d.ts.map +1 -0
  423. package/dist/observability/tracer.d.ts +9 -0
  424. package/dist/observability/tracer.d.ts.map +1 -0
  425. package/dist/plugin/api.d.ts +226 -0
  426. package/dist/plugin/api.d.ts.map +1 -0
  427. package/dist/plugin/loader.d.ts +73 -0
  428. package/dist/plugin/loader.d.ts.map +1 -0
  429. package/dist/plugins/chimera-plugin.d.ts +37 -0
  430. package/dist/plugins/chimera-plugin.d.ts.map +1 -0
  431. package/dist/plugins/git-plugin.d.ts +15 -0
  432. package/dist/plugins/git-plugin.d.ts.map +1 -0
  433. package/dist/plugins/observability-plugin.d.ts +19 -0
  434. package/dist/plugins/observability-plugin.d.ts.map +1 -0
  435. package/dist/plugins/plan-plugin.d.ts +16 -0
  436. package/dist/plugins/plan-plugin.d.ts.map +1 -0
  437. package/dist/plugins/prompts-plugin.d.ts +26 -0
  438. package/dist/plugins/prompts-plugin.d.ts.map +1 -0
  439. package/dist/plugins/security-plugin.d.ts +19 -0
  440. package/dist/plugins/security-plugin.d.ts.map +1 -0
  441. package/dist/plugins/skills-plugin.d.ts +42 -0
  442. package/dist/plugins/skills-plugin.d.ts.map +1 -0
  443. package/dist/plugins/sync-plugin.d.ts +22 -0
  444. package/dist/plugins/sync-plugin.d.ts.map +1 -0
  445. package/dist/prompts/index.d.ts +3 -0
  446. package/dist/prompts/index.d.ts.map +1 -0
  447. package/dist/prompts/prompt-installer.d.ts +50 -0
  448. package/dist/prompts/prompt-installer.d.ts.map +1 -0
  449. package/dist/prompts/prompt-manifest-store.d.ts +18 -0
  450. package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
  451. package/dist/registry/provider-registry.d.ts +51 -0
  452. package/dist/registry/provider-registry.d.ts.map +1 -0
  453. package/dist/registry/slash-command-registry.d.ts +61 -0
  454. package/dist/registry/slash-command-registry.d.ts.map +1 -0
  455. package/dist/registry/tool-registry.d.ts +154 -0
  456. package/dist/registry/tool-registry.d.ts.map +1 -0
  457. package/dist/replay/hash.d.ts +31 -0
  458. package/dist/replay/hash.d.ts.map +1 -0
  459. package/dist/replay/replay-provider-runner.d.ts +53 -0
  460. package/dist/replay/replay-provider-runner.d.ts.map +1 -0
  461. package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
  462. package/dist/security/capabilities.d.ts.map +1 -0
  463. package/dist/security/config-secrets.d.ts +25 -0
  464. package/dist/security/config-secrets.d.ts.map +1 -0
  465. package/dist/security/index.d.ts +6 -8
  466. package/dist/security/index.d.ts.map +1 -0
  467. package/dist/security/index.js +102 -381
  468. package/dist/security/index.js.map +7 -1
  469. package/dist/security/permission-policy.d.ts +153 -0
  470. package/dist/security/permission-policy.d.ts.map +1 -0
  471. package/dist/security/secret-scrubber.d.ts +14 -0
  472. package/dist/security/secret-scrubber.d.ts.map +1 -0
  473. package/dist/security/secret-vault.d.ts +87 -0
  474. package/dist/security/secret-vault.d.ts.map +1 -0
  475. package/dist/security/yolo-risk.d.ts +11 -0
  476. package/dist/security/yolo-risk.d.ts.map +1 -0
  477. package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
  478. package/dist/session-registry.d.ts.map +1 -0
  479. package/dist/skills/foreign-sources.d.ts +59 -0
  480. package/dist/skills/foreign-sources.d.ts.map +1 -0
  481. package/dist/skills/frontmatter.d.ts +44 -0
  482. package/dist/skills/frontmatter.d.ts.map +1 -0
  483. package/dist/skills/github-fetcher.d.ts +38 -0
  484. package/dist/skills/github-fetcher.d.ts.map +1 -0
  485. package/dist/skills/index.d.ts +11 -582
  486. package/dist/skills/index.d.ts.map +1 -0
  487. package/dist/skills/index.js +81 -43
  488. package/dist/skills/index.js.map +7 -1
  489. package/dist/skills/limits.d.ts +92 -0
  490. package/dist/skills/limits.d.ts.map +1 -0
  491. package/dist/skills/manifest-store.d.ts +42 -0
  492. package/dist/skills/manifest-store.d.ts.map +1 -0
  493. package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
  494. package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
  495. package/dist/skills/registry/registry-adapter.d.ts +84 -0
  496. package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
  497. package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
  498. package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
  499. package/dist/skills/skill-generator.d.ts +82 -0
  500. package/dist/skills/skill-generator.d.ts.map +1 -0
  501. package/dist/skills/skill-installer.d.ts +124 -0
  502. package/dist/skills/skill-installer.d.ts.map +1 -0
  503. package/dist/storage/annotations-store.d.ts +118 -0
  504. package/dist/storage/annotations-store.d.ts.map +1 -0
  505. package/dist/storage/attachment-store.d.ts +31 -0
  506. package/dist/storage/attachment-store.d.ts.map +1 -0
  507. package/dist/storage/cloud-sync.d.ts +44 -0
  508. package/dist/storage/cloud-sync.d.ts.map +1 -0
  509. package/dist/storage/completed-work-checkpoint.d.ts +11 -0
  510. package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
  511. package/dist/storage/config-loader.d.ts +104 -0
  512. package/dist/storage/config-loader.d.ts.map +1 -0
  513. package/dist/storage/config-migration.d.ts +87 -0
  514. package/dist/storage/config-migration.d.ts.map +1 -0
  515. package/dist/storage/config-store.d.ts +22 -0
  516. package/dist/storage/config-store.d.ts.map +1 -0
  517. package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
  518. package/dist/storage/director-state.d.ts.map +1 -0
  519. package/dist/storage/file-session-writer.d.ts +169 -0
  520. package/dist/storage/file-session-writer.d.ts.map +1 -0
  521. package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
  522. package/dist/storage/goal-store.d.ts.map +1 -0
  523. package/dist/storage/index.d.ts +39 -1031
  524. package/dist/storage/index.d.ts.map +1 -0
  525. package/dist/storage/index.js +655 -300
  526. package/dist/storage/index.js.map +7 -1
  527. package/dist/storage/input-history-store.d.ts +56 -0
  528. package/dist/storage/input-history-store.d.ts.map +1 -0
  529. package/dist/storage/memory-backend.d.ts +66 -0
  530. package/dist/storage/memory-backend.d.ts.map +1 -0
  531. package/dist/storage/memory-consolidator.d.ts +50 -0
  532. package/dist/storage/memory-consolidator.d.ts.map +1 -0
  533. package/dist/storage/memory-graph-backend.d.ts +117 -0
  534. package/dist/storage/memory-graph-backend.d.ts.map +1 -0
  535. package/dist/storage/memory-store.d.ts +119 -0
  536. package/dist/storage/memory-store.d.ts.map +1 -0
  537. package/dist/storage/plan-store.d.ts +78 -0
  538. package/dist/storage/plan-store.d.ts.map +1 -0
  539. package/dist/storage/plan-templates.d.ts +21 -0
  540. package/dist/storage/plan-templates.d.ts.map +1 -0
  541. package/dist/storage/prompt-store.d.ts +37 -0
  542. package/dist/storage/prompt-store.d.ts.map +1 -0
  543. package/dist/storage/prompt-usage-store.d.ts +29 -0
  544. package/dist/storage/prompt-usage-store.d.ts.map +1 -0
  545. package/dist/storage/provider-config-watcher.d.ts +34 -0
  546. package/dist/storage/provider-config-watcher.d.ts.map +1 -0
  547. package/dist/storage/queue-store.d.ts +37 -0
  548. package/dist/storage/queue-store.d.ts.map +1 -0
  549. package/dist/storage/recovery-lock.d.ts +79 -0
  550. package/dist/storage/recovery-lock.d.ts.map +1 -0
  551. package/dist/storage/replay-log-store.d.ts +97 -0
  552. package/dist/storage/replay-log-store.d.ts.map +1 -0
  553. package/dist/storage/session-analyzer.d.ts +48 -0
  554. package/dist/storage/session-analyzer.d.ts.map +1 -0
  555. package/dist/storage/session-checkpoint-cas.d.ts +37 -0
  556. package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
  557. package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
  558. package/dist/storage/session-event-bridge.d.ts.map +1 -0
  559. package/dist/storage/session-helpers.d.ts +9 -0
  560. package/dist/storage/session-helpers.d.ts.map +1 -0
  561. package/dist/storage/session-id.d.ts +18 -0
  562. package/dist/storage/session-id.d.ts.map +1 -0
  563. package/dist/storage/session-reader.d.ts +21 -0
  564. package/dist/storage/session-reader.d.ts.map +1 -0
  565. package/dist/storage/session-recovery.d.ts +93 -0
  566. package/dist/storage/session-recovery.d.ts.map +1 -0
  567. package/dist/storage/session-resume-validation.d.ts +6 -0
  568. package/dist/storage/session-resume-validation.d.ts.map +1 -0
  569. package/dist/storage/session-rewinder.d.ts +21 -0
  570. package/dist/storage/session-rewinder.d.ts.map +1 -0
  571. package/dist/storage/session-store.d.ts +210 -0
  572. package/dist/storage/session-store.d.ts.map +1 -0
  573. package/dist/storage/session-summary.d.ts +12 -0
  574. package/dist/storage/session-summary.d.ts.map +1 -0
  575. package/dist/storage/session-tool-call-ends.d.ts +5 -0
  576. package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
  577. package/dist/storage/storage-concurrency.d.ts +2 -0
  578. package/dist/storage/storage-concurrency.d.ts.map +1 -0
  579. package/dist/storage/task-store.d.ts +33 -0
  580. package/dist/storage/task-store.d.ts.map +1 -0
  581. package/dist/storage/todos-checkpoint.d.ts +39 -0
  582. package/dist/storage/todos-checkpoint.d.ts.map +1 -0
  583. package/dist/storage/tool-audit-log.d.ts +141 -0
  584. package/dist/storage/tool-audit-log.d.ts.map +1 -0
  585. package/dist/tasking/index.d.ts +3 -124
  586. package/dist/tasking/index.d.ts.map +1 -0
  587. package/dist/tasking/index.js +57 -4
  588. package/dist/tasking/index.js.map +7 -1
  589. package/dist/tasking/task-store.d.ts +22 -0
  590. package/dist/tasking/task-store.d.ts.map +1 -0
  591. package/dist/tasking/task-tracker.d.ts +102 -0
  592. package/dist/tasking/task-tracker.d.ts.map +1 -0
  593. package/dist/tools/index.d.ts +2 -59
  594. package/dist/tools/index.d.ts.map +1 -0
  595. package/dist/tools/index.js +93 -14
  596. package/dist/tools/index.js.map +7 -1
  597. package/dist/tools/mcp-control.d.ts +53 -0
  598. package/dist/tools/mcp-control.d.ts.map +1 -0
  599. package/dist/tools/mcp-use.d.ts +24 -0
  600. package/dist/tools/mcp-use.d.ts.map +1 -0
  601. package/dist/types/agent-bridge.d.ts +42 -0
  602. package/dist/types/agent-bridge.d.ts.map +1 -0
  603. package/dist/types/attachment.d.ts +54 -0
  604. package/dist/types/attachment.d.ts.map +1 -0
  605. package/dist/types/autonomy.d.ts +5 -0
  606. package/dist/types/autonomy.d.ts.map +1 -0
  607. package/dist/types/blocks.d.ts +76 -0
  608. package/dist/types/blocks.d.ts.map +1 -0
  609. package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
  610. package/dist/types/compactor.d.ts.map +1 -0
  611. package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +135 -354
  612. package/dist/types/config.d.ts.map +1 -0
  613. package/dist/types/context-evidence.d.ts +68 -0
  614. package/dist/types/context-evidence.d.ts.map +1 -0
  615. package/dist/types/context-window.d.ts +35 -0
  616. package/dist/types/context-window.d.ts.map +1 -0
  617. package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
  618. package/dist/types/default-config.d.ts.map +1 -0
  619. package/dist/types/design-kit.d.ts +91 -0
  620. package/dist/types/design-kit.d.ts.map +1 -0
  621. package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
  622. package/dist/types/error-handler.d.ts.map +1 -0
  623. package/dist/types/errors.d.ts +277 -0
  624. package/dist/types/errors.d.ts.map +1 -0
  625. package/dist/types/hooks.d.ts +167 -0
  626. package/dist/types/hooks.d.ts.map +1 -0
  627. package/dist/types/index.d.ts +40 -244
  628. package/dist/types/index.d.ts.map +1 -0
  629. package/dist/types/index.js +90 -12
  630. package/dist/types/index.js.map +7 -1
  631. package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
  632. package/dist/types/input-reader.d.ts.map +1 -0
  633. package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
  634. package/dist/types/logger.d.ts.map +1 -0
  635. package/dist/types/memory.d.ts +89 -0
  636. package/dist/types/memory.d.ts.map +1 -0
  637. package/dist/types/messages.d.ts +24 -0
  638. package/dist/types/messages.d.ts.map +1 -0
  639. package/dist/types/mode-prompts.d.ts +2 -0
  640. package/dist/types/mode-prompts.d.ts.map +1 -0
  641. package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
  642. package/dist/types/mode.d.ts.map +1 -0
  643. package/dist/types/models-registry.d.ts +105 -0
  644. package/dist/types/models-registry.d.ts.map +1 -0
  645. package/dist/types/multi-agent.d.ts +435 -0
  646. package/dist/types/multi-agent.d.ts.map +1 -0
  647. package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +12 -13
  648. package/dist/types/observability.d.ts.map +1 -0
  649. package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
  650. package/dist/types/path-resolver.d.ts.map +1 -0
  651. package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
  652. package/dist/types/permission.d.ts.map +1 -0
  653. package/dist/types/plugin.d.ts +385 -0
  654. package/dist/types/plugin.d.ts.map +1 -0
  655. package/dist/types/prompt-registry.d.ts +81 -0
  656. package/dist/types/prompt-registry.d.ts.map +1 -0
  657. package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
  658. package/dist/types/prompt.d.ts.map +1 -0
  659. package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
  660. package/dist/types/provider-runner.d.ts.map +1 -0
  661. package/dist/types/provider.d.ts +387 -0
  662. package/dist/types/provider.d.ts.map +1 -0
  663. package/dist/types/renderer.d.ts +23 -0
  664. package/dist/types/renderer.d.ts.map +1 -0
  665. package/dist/types/retry-policy.d.ts +7 -0
  666. package/dist/types/retry-policy.d.ts.map +1 -0
  667. package/dist/types/secret-scrubber.d.ts +5 -0
  668. package/dist/types/secret-scrubber.d.ts.map +1 -0
  669. package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
  670. package/dist/types/secret-vault.d.ts.map +1 -0
  671. package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
  672. package/dist/types/selector.d.ts.map +1 -0
  673. package/dist/types/session-reader.d.ts +81 -0
  674. package/dist/types/session-reader.d.ts.map +1 -0
  675. package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
  676. package/dist/types/session-rewinder.d.ts.map +1 -0
  677. package/dist/types/session.d.ts +650 -0
  678. package/dist/types/session.d.ts.map +1 -0
  679. package/dist/types/side-effect.d.ts +34 -0
  680. package/dist/types/side-effect.d.ts.map +1 -0
  681. package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
  682. package/dist/types/skill.d.ts.map +1 -0
  683. package/dist/types/slash-command.d.ts +59 -0
  684. package/dist/types/slash-command.d.ts.map +1 -0
  685. package/dist/types/spec.d.ts +77 -0
  686. package/dist/types/spec.d.ts.map +1 -0
  687. package/dist/types/system-prompt-contributor.d.ts +20 -0
  688. package/dist/types/system-prompt-contributor.d.ts.map +1 -0
  689. package/dist/types/system-prompt.d.ts +51 -0
  690. package/dist/types/system-prompt.d.ts.map +1 -0
  691. package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
  692. package/dist/types/task-graph.d.ts.map +1 -0
  693. package/dist/types/token-counter.d.ts +42 -0
  694. package/dist/types/token-counter.d.ts.map +1 -0
  695. package/dist/types/tool-executor.d.ts +133 -0
  696. package/dist/types/tool-executor.d.ts.map +1 -0
  697. package/dist/types/tool-markers.d.ts +23 -0
  698. package/dist/types/tool-markers.d.ts.map +1 -0
  699. package/dist/types/tool.d.ts +245 -0
  700. package/dist/types/tool.d.ts.map +1 -0
  701. package/dist/types/utility-types.d.ts +31 -0
  702. package/dist/types/utility-types.d.ts.map +1 -0
  703. package/dist/utils/assert-never.d.ts +14 -0
  704. package/dist/utils/assert-never.d.ts.map +1 -0
  705. package/dist/utils/atomic-write.d.ts +12 -0
  706. package/dist/utils/atomic-write.d.ts.map +1 -0
  707. package/dist/utils/child-env.d.ts +67 -0
  708. package/dist/utils/child-env.d.ts.map +1 -0
  709. package/dist/utils/color.d.ts +20 -0
  710. package/dist/utils/color.d.ts.map +1 -0
  711. package/dist/utils/config-json.d.ts +14 -0
  712. package/dist/utils/config-json.d.ts.map +1 -0
  713. package/dist/utils/context-evidence.d.ts +47 -0
  714. package/dist/utils/context-evidence.d.ts.map +1 -0
  715. package/dist/utils/deep-merge.d.ts +64 -0
  716. package/dist/utils/deep-merge.d.ts.map +1 -0
  717. package/dist/utils/diff.d.ts +11 -0
  718. package/dist/utils/diff.d.ts.map +1 -0
  719. package/dist/utils/error.d.ts +2 -3
  720. package/dist/utils/error.d.ts.map +1 -0
  721. package/dist/utils/error.js +3 -3
  722. package/dist/utils/error.js.map +7 -1
  723. package/dist/utils/expect-defined.d.ts +2 -3
  724. package/dist/utils/expect-defined.d.ts.map +1 -0
  725. package/dist/utils/expect-defined.js +3 -3
  726. package/dist/utils/expect-defined.js.map +7 -1
  727. package/dist/utils/glob-expand.d.ts +10 -0
  728. package/dist/utils/glob-expand.d.ts.map +1 -0
  729. package/dist/utils/glob-match.d.ts +4 -0
  730. package/dist/utils/glob-match.d.ts.map +1 -0
  731. package/dist/utils/index.d.ts +37 -920
  732. package/dist/utils/index.d.ts.map +1 -0
  733. package/dist/utils/index.js +242 -33
  734. package/dist/utils/index.js.map +7 -1
  735. package/dist/utils/instruction-file.d.ts +3 -0
  736. package/dist/utils/instruction-file.d.ts.map +1 -0
  737. package/dist/utils/ip-guard.d.ts +34 -0
  738. package/dist/utils/ip-guard.d.ts.map +1 -0
  739. package/dist/utils/json-repair.d.ts +23 -0
  740. package/dist/utils/json-repair.d.ts.map +1 -0
  741. package/dist/utils/json-schema-validate.d.ts +42 -0
  742. package/dist/utils/json-schema-validate.d.ts.map +1 -0
  743. package/dist/utils/lru-cache.d.ts +29 -0
  744. package/dist/utils/lru-cache.d.ts.map +1 -0
  745. package/dist/utils/merge-custom-models.d.ts +12 -0
  746. package/dist/utils/merge-custom-models.d.ts.map +1 -0
  747. package/dist/utils/merge-models-payload.d.ts +20 -0
  748. package/dist/utils/merge-models-payload.d.ts.map +1 -0
  749. package/dist/utils/message-invariants.d.ts +22 -0
  750. package/dist/utils/message-invariants.d.ts.map +1 -0
  751. package/dist/utils/newline-normalize.d.ts +5 -0
  752. package/dist/utils/newline-normalize.d.ts.map +1 -0
  753. package/dist/utils/regex-guard.d.ts +21 -0
  754. package/dist/utils/regex-guard.d.ts.map +1 -0
  755. package/dist/utils/safe-json.d.ts +31 -0
  756. package/dist/utils/safe-json.d.ts.map +1 -0
  757. package/dist/utils/session-scoped-path.d.ts +13 -0
  758. package/dist/utils/session-scoped-path.d.ts.map +1 -0
  759. package/dist/utils/sleep.d.ts +5 -0
  760. package/dist/utils/sleep.d.ts.map +1 -0
  761. package/dist/utils/slug.d.ts +13 -0
  762. package/dist/utils/slug.d.ts.map +1 -0
  763. package/dist/utils/string.d.ts +9 -0
  764. package/dist/utils/string.d.ts.map +1 -0
  765. package/dist/utils/task-format.d.ts +22 -0
  766. package/dist/utils/task-format.d.ts.map +1 -0
  767. package/dist/utils/term.d.ts +133 -0
  768. package/dist/utils/term.d.ts.map +1 -0
  769. package/dist/utils/todos-format.d.ts +30 -0
  770. package/dist/utils/todos-format.d.ts.map +1 -0
  771. package/dist/utils/token-estimate.d.ts +112 -0
  772. package/dist/utils/token-estimate.d.ts.map +1 -0
  773. package/dist/utils/tool-description-mode.d.ts +28 -0
  774. package/dist/utils/tool-description-mode.d.ts.map +1 -0
  775. package/dist/utils/tool-output-serializer.d.ts +40 -0
  776. package/dist/utils/tool-output-serializer.d.ts.map +1 -0
  777. package/dist/utils/tool-result-render-mode.d.ts +55 -0
  778. package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
  779. package/dist/utils/tool-subject.d.ts +5 -0
  780. package/dist/utils/tool-subject.d.ts.map +1 -0
  781. package/dist/utils/tool-wire-compact.d.ts +28 -0
  782. package/dist/utils/tool-wire-compact.d.ts.map +1 -0
  783. package/dist/utils/ulid.d.ts +11 -0
  784. package/dist/utils/ulid.d.ts.map +1 -0
  785. package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
  786. package/dist/utils/wstack-paths.d.ts.map +1 -0
  787. package/dist/worktree/index.d.ts +2 -0
  788. package/dist/worktree/index.d.ts.map +1 -0
  789. package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +19 -13
  790. package/dist/worktree/worktree-manager.d.ts.map +1 -0
  791. package/instructions/autonomy/active-mission.md +2 -4
  792. package/instructions/sections/tool/delegation-full.md +1 -1
  793. package/package.json +4 -5
  794. package/skills/node-modern/SKILL.md +2 -2
  795. package/skills/plugin-author/SKILL.md +9 -16
  796. package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
  797. package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
  798. package/dist/index--Gm41aBJ.d.ts +0 -671
  799. package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
  800. package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
  801. package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
  802. package/dist/pipeline-DGDyIohT.d.ts +0 -331
  803. package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
  804. package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
  805. package/dist/secret-vault-DxohkUBc.d.ts +0 -272
  806. package/dist/session-reader-7Esxrkpw.d.ts +0 -155
  807. package/dist/task-format-GX0B1mMC.d.ts +0 -23
  808. package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
  809. package/dist/tool-BNlnIJvo.d.ts +0 -2190
  810. package/dist/tool-executor-CckSCM5E.d.ts +0 -906
@@ -0,0 +1,101 @@
1
+ import type { EventBus } from '../kernel/events.js';
2
+ import type { SubagentConfig } from '../types/multi-agent.js';
3
+ import type { Tool } from '../types/tool.js';
4
+ import type { Director } from './director.js';
5
+ /**
6
+ * Opaque host interface so this factory doesn't have to depend on the
7
+ * CLI's `MultiAgentHost`. Any caller that exposes the same three
8
+ * methods can wire `delegate` — including test doubles.
9
+ */
10
+ export interface DelegateHost {
11
+ /** True if a Director is already attached and running. */
12
+ isDirectorMode(): boolean;
13
+ /** Build (or return the cached) Director when director mode is on. */
14
+ ensureDirector(): Promise<Director | null>;
15
+ /**
16
+ * Force-promote a non-director session into director mode at runtime.
17
+ * Returns the Director, or null when promotion is impossible (e.g. a
18
+ * non-director coordinator has already spawned subagents in the
19
+ * legacy code path).
20
+ */
21
+ promoteToDirector(): Promise<Director | null>;
22
+ /**
23
+ * Optional: when promotion fails, return the human-readable reason.
24
+ * Used to render an actionable error to the calling model instead of
25
+ * the prior opaque "Director could not be activated" message.
26
+ * Implementations may return null when they don't track the reason.
27
+ */
28
+ getPromotionBlockReason?(): string | null;
29
+ }
30
+ export interface CreateDelegateToolOptions {
31
+ host: DelegateHost;
32
+ /**
33
+ * Roster used to resolve `role` strings into full `SubagentConfig`s.
34
+ * Typically `FLEET_ROSTER`. When omitted, `delegate({ role })` calls
35
+ * fail and only the explicit `name + provider + model` path works.
36
+ */
37
+ roster?: Record<string, SubagentConfig>;
38
+ /**
39
+ * Default await timeout in milliseconds. `delegate` blocks until the
40
+ * subagent's task resolves; without a cap, a stuck worker would hang
41
+ * the host indefinitely. Set generously (default: 4 hours) so the
42
+ * orchestrator can run multi-step refactors / monorepo audits
43
+ * without being killed for being slow — the orchestrator must
44
+ * decide per-call when a task needs to be cut short.
45
+ */
46
+ defaultTimeoutMs?: number | undefined;
47
+ /**
48
+ * Absolute directory under which per-subagent JSONL transcripts live —
49
+ * matches `MultiAgentHostOptions.sessionsRoot`. When set, the delegate
50
+ * tool reads the subagent's transcript on timeout / budget-exhaustion
51
+ * to extract partial output, so the host LLM gets *something* useful
52
+ * back instead of just an error.
53
+ */
54
+ sessionsRoot?: string | undefined;
55
+ /**
56
+ * The directorRunId used to namespace transcripts (typically the host
57
+ * session id). Combined with `sessionsRoot` to locate per-subagent
58
+ * JSONLs at `<sessionsRoot>/<runId>/<subagentId>.jsonl`.
59
+ */
60
+ directorRunId?: string | undefined;
61
+ /**
62
+ * Buffer subtracted from the caller's `timeoutMs` before passing it
63
+ * to the subagent. Gives the host a window to detect a subagent that
64
+ * has gone silent and surface a partial result rather than a generic
65
+ * timeout. Default: 60_000 ms (raised from 30s to give subagents
66
+ * more headroom before the host kills them).
67
+ */
68
+ subagentTimeoutBufferMs?: number | undefined;
69
+ /**
70
+ * Host EventBus. When supplied, `delegate` emits `delegate.started`
71
+ * (before it blocks on the subagent) and `delegate.completed` (once the
72
+ * subagent settles) so UIs / the Telegram bridge can render readable
73
+ * start/finish lines instead of inferring them from the truncated
74
+ * `tool.executed` JSON preview. Optional — emits are best-effort and a
75
+ * missing bus never affects delegation behaviour.
76
+ */
77
+ events?: EventBus | undefined;
78
+ }
79
+ /**
80
+ * `delegate` — the compact multi-agent tool exposed after Director mode is
81
+ * enabled. It bundles spawn + assign + await into a single call.
82
+ *
83
+ * The model never has to ask "are we in director mode?" — it just calls
84
+ * `delegate({ role, task })` and gets back a `TaskResult`. The cost of
85
+ * that ergonomic packaging is that `delegate` cannot be used for
86
+ * parallel work as-is; the model must fire multiple `delegate` calls in
87
+ * parallel through the provider's parallel-tool-call surface, or escalate
88
+ * to the explicit `spawn_subagent` + `assign_task` + `await_tasks` flow
89
+ * when it wants fan-out it controls itself.
90
+ */
91
+ export declare function createDelegateTool(opts: CreateDelegateToolOptions): Tool;
92
+ /**
93
+ * Per-kind orchestrator hint. Returned alongside the structured error
94
+ * so the calling model has a concrete next step instead of "task
95
+ * failed, good luck". Returns undefined for success / unknown kinds —
96
+ * the caller checks for presence before including in output.
97
+ */
98
+ export declare function hintForKind(kind: string | undefined, retryable: boolean | undefined, backoffMs: number | undefined, partial?: {
99
+ lastAssistantText?: string | undefined;
100
+ } | undefined): string | undefined;
101
+ //# sourceMappingURL=delegate-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegate-tool.d.ts","sourceRoot":"","sources":["../../src/coordination/delegate-tool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAc,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM9C;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,cAAc,IAAI,OAAO,CAAC;IAC1B,sEAAsE;IACtE,cAAc,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC3C;;;;;OAKG;IACH,iBAAiB,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC9C;;;;;OAKG;IACH,uBAAuB,CAAC,IAAI,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACxC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,yBAAyB,GAAG,IAAI,CAicxE;AAwBD;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,SAAS,EAAE,OAAO,GAAG,SAAS,EAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,CAAC,EAAE;IAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,SAAS,GAC/D,MAAM,GAAG,SAAS,CAkDpB"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * dep-watcher-bridge — Bridges the file-watcher plugin's custom events
3
+ * to the dependency watcher → mailbox pipeline.
4
+ *
5
+ * The file-watcher plugin emits `file-watcher:changed` custom events
6
+ * when files change. This module subscribes to those events, filters
7
+ * for dependency manifests (package.json, go.mod, etc.), and posts
8
+ * assign messages to the inter-agent mailbox for tech-stack audit.
9
+ *
10
+ * Returns a dispose function that unsubscribes from the event bus.
11
+ *
12
+ * @module dep-watcher-bridge
13
+ */
14
+ import type { EventBus } from '../kernel/events.js';
15
+ import type { Mailbox } from './mailbox-types.js';
16
+ export interface DepWatcherBridgeOptions {
17
+ /** The event bus to subscribe to (same bus the file-watcher plugin emits on). */
18
+ events: EventBus;
19
+ /** The mailbox instance where dep-change notifications will be posted. */
20
+ mailbox: Mailbox;
21
+ /** Absolute project root — used to build watch paths and match file patterns. */
22
+ projectRoot: string;
23
+ /** Agent id the tech-stack audit tasks should target. Default: 'tech-stack'. */
24
+ targetAgent?: string | undefined;
25
+ /** Agent id of the watcher/sender. Default: 'dep-watcher'. */
26
+ watcherAgentId?: string | undefined;
27
+ /** Debounce window in ms. Default: 3000 (3 seconds). */
28
+ debounceMs?: number | undefined;
29
+ }
30
+ /**
31
+ * Wire the file-watcher's `file-watcher:changed` events into the
32
+ * dependency watcher → mailbox pipeline.
33
+ *
34
+ * Returns a dispose function. Call it to unsubscribe when the
35
+ * session ends or the watcher is no longer needed.
36
+ *
37
+ * Usage:
38
+ * const dispose = attachDepWatcherBridge({
39
+ * events: ctx.events,
40
+ * mailbox: new DefaultMailbox(sessionDir),
41
+ * projectRoot: ctx.projectRoot,
42
+ * });
43
+ * // ... session runs ...
44
+ * dispose(); // clean up on exit
45
+ */
46
+ export declare function attachDepWatcherBridge(opts: DepWatcherBridgeOptions): () => void;
47
+ //# sourceMappingURL=dep-watcher-bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dep-watcher-bridge.d.ts","sourceRoot":"","sources":["../../src/coordination/dep-watcher-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,MAAM,EAAE,QAAQ,CAAC;IACjB,0EAA0E;IAC1E,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,uBAAuB,GAC5B,MAAM,IAAI,CA4CZ"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * dep-watcher — File-change → Mailbox bridge for dependency monitoring.
3
+ *
4
+ * Watches dependency manifest files (package.json, go.mod, Cargo.toml, etc.)
5
+ * and when they change (create/update), posts a message to the inter-agent
6
+ * mailbox. A tech-stack analysis agent can then pick up the message and
7
+ * run a full tech-stack validation, feeding results back to the coding LLM.
8
+ *
9
+ * This module is a *config factory*, not a watcher itself. It produces
10
+ * configuration that the file-watcher plugin (`watch_start`) can consume,
11
+ * plus a callback that posts to a Mailbox instance.
12
+ *
13
+ * Usage:
14
+ * const cfg = makeDependencyWatcherConfig({
15
+ * projectRoot: '/path/to/project',
16
+ * mailbox,
17
+ * targetAgent: 'tech-stack-agent',
18
+ * });
19
+ * // cfg.watchPaths → pass to watch_start
20
+ * // cfg.onChange → call on file-watcher:changed events
21
+ *
22
+ * @module dep-watcher
23
+ */
24
+ import type { Mailbox } from './mailbox-types.js';
25
+ /**
26
+ * Files that declare project dependencies. When any of these change
27
+ * (create/update), a mailbox message triggers a tech-stack audit.
28
+ */
29
+ export declare const DEPENDENCY_FILE_PATTERNS: ReadonlyArray<string>;
30
+ export interface DepWatchEntry {
31
+ /** Relative path from project root that changed. */
32
+ path: string;
33
+ /** Event type from the file watcher: 'change', 'add', 'delete' (rare). */
34
+ event: string;
35
+ /** ISO8601 timestamp of when the change was detected. */
36
+ timestamp: string;
37
+ }
38
+ export interface DependencyWatcherConfig {
39
+ /** Paths to pass to `watch_start` — the project-root-relative dependency files. */
40
+ watchPaths: string[];
41
+ /** Callback to invoke when a dependency file changes. Posts to mailbox. */
42
+ onChange: (entry: DepWatchEntry) => Promise<void>;
43
+ /** Debounce window in ms — multiple changes to the same file within this window are collapsed. */
44
+ debounceMs: number;
45
+ /** Cancel all in-flight debounce timers. Call when the file watcher is
46
+ * stopped (session end / project switch) so pending setTimeouts — each
47
+ * holding a closure over the mailbox + entry — don't leak. */
48
+ dispose: () => void;
49
+ }
50
+ export interface DependencyWatcherOptions {
51
+ /** Absolute path to the project root. */
52
+ projectRoot: string;
53
+ /** The mailbox instance where messages will be posted. */
54
+ mailbox: Mailbox;
55
+ /** Agent id that should receive the tech-stack audit task. */
56
+ targetAgent?: string | undefined;
57
+ /** Agent id of the watcher (sender). */
58
+ watcherAgentId?: string | undefined;
59
+ /** Debounce window in ms. Default: 3000 (3 seconds). */
60
+ debounceMs?: number | undefined;
61
+ /** Only watch these specific patterns. Defaults to DEPENDENCY_FILE_PATTERNS. */
62
+ patterns?: string[] | undefined;
63
+ }
64
+ /**
65
+ * Build a dependency watcher configuration. The returned `watchPaths` can be
66
+ * passed directly to the `watch_start` tool, and `onChange` should be wired
67
+ * to the `file-watcher:changed` custom event.
68
+ *
69
+ * When a dependency file changes, `onChange` posts a high-priority `assign`
70
+ * message to the mailbox targeting the tech-stack agent, with the changed
71
+ * file path and event type in the body.
72
+ */
73
+ export declare function makeDependencyWatcherConfig(opts: DependencyWatcherOptions): DependencyWatcherConfig;
74
+ //# sourceMappingURL=dep-watcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dep-watcher.d.ts","sourceRoot":"","sources":["../../src/coordination/dep-watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,MAAM,CAmC1D,CAAC;AAIF,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,mFAAmF;IACnF,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,kGAAkG;IAClG,UAAU,EAAE,MAAM,CAAC;IACnB;;mEAE+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACjC;AAID;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,wBAAwB,GAC7B,uBAAuB,CAiHzB"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Director-specific error types. Extracted to keep the Director class
3
+ * focused on orchestration logic.
4
+ */
5
+ export declare class FleetSpawnBudgetError extends Error {
6
+ readonly kind: 'max_spawns' | 'max_spawn_depth';
7
+ readonly limit: number;
8
+ readonly observed: number;
9
+ constructor(kind: 'max_spawns' | 'max_spawn_depth', limit: number, observed: number, message?: string | undefined);
10
+ }
11
+ export declare class FleetCostCapError extends Error {
12
+ readonly kind: 'max_cost_usd';
13
+ readonly limit: number;
14
+ readonly observed: number;
15
+ constructor(limit: number, observed: number);
16
+ }
17
+ export declare class FleetTokenCapError extends Error {
18
+ readonly kind: 'max_tokens';
19
+ readonly limit: number;
20
+ readonly observed: number;
21
+ constructor(limit: number, observed: number);
22
+ }
23
+ export declare class FleetContextOverflowError extends Error {
24
+ readonly kind: 'max_context_load';
25
+ readonly limit: number;
26
+ readonly observed: number;
27
+ constructor(limit: number, observed: number);
28
+ }
29
+ //# sourceMappingURL=director-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"director-errors.d.ts","sourceRoot":"","sources":["../../../src/coordination/director/director-errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,iBAAiB,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YACE,IAAI,EAAE,YAAY,GAAG,iBAAiB,EACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,EAW7B;CACF;AAED,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAQ1C;CACF;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAQ1C;CACF;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAQ1C;CACF"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Director construction helpers.
3
+ *
4
+ * The `Director` constructor was historically a single 300+ line function
5
+ * that interleaved field assignments with two pieces of event-listener
6
+ * wiring: the `task.completed` listener on the coordinator (which mirrors
7
+ * completions into the in-memory wait table, the on-disk checkpoint, and
8
+ * the session JSONL event stream) and the `budget.threshold_reached`
9
+ * filter on the FleetBus (which implements the heartbeat-driven timeout
10
+ * policy and the per-kind auto-extension logic).
11
+ *
12
+ * Both wirings were inlined because they close over a lot of Director
13
+ * private state (`completed`, `taskWaiters`, `taskDescriptions`,
14
+ * `appendSessionEvent`, `scheduleManifest`, `recordExtension`,
15
+ * `maxBudgetExtensions`, `maxFleetCostUsd`, etc.). Pulling them out
16
+ * without losing the closures requires a narrow `DirectorInternals`
17
+ * shape — exactly what this module exposes.
18
+ *
19
+ * The constructor itself stays a member-initializer; the helpers below
20
+ * are called *during* construction, after the relevant fields are
21
+ * populated. Each helper ends with `coordinator.on(...)` /
22
+ * `fleet.filter(...)` registration so the listener is wired exactly
23
+ * once, at construction time.
24
+ */
25
+ import type { TaskResult, TaskSpec } from '../types/multi-agent.js';
26
+ /** Cap on the in-memory `completed` map. Trimmed oldest-first when exceeded. */
27
+ export declare const MAX_COMPLETED = 10000;
28
+ /** Narrow shape the wiring helpers need from a partially-constructed Director.
29
+ * The helpers accept a `Director` instance (structural typing — the class
30
+ * exposes every field this interface requires), so the constructor can pass
31
+ * `this` directly without an explicit cast.
32
+ *
33
+ * Note: Private/protected members cannot be picked via Pick<> because keyof
34
+ * only returns public keys. We define the interface explicitly rather than
35
+ * deriving from Director to include private fields the wiring code needs. */
36
+ export interface DirectorInternals {
37
+ id: string;
38
+ directorRunId: string;
39
+ completed: Map<string, import('../types/multi-agent.js').TaskResult>;
40
+ taskWaiters: Map<string, {
41
+ promise: Promise<import('../types/multi-agent.js').TaskResult>;
42
+ resolve: (r: import('../types/multi-agent.js').TaskResult) => void;
43
+ }>;
44
+ taskDescriptions: Map<string, string>;
45
+ stateCheckpoint: import('../storage/director-state.js').DirectorStateCheckpoint | null;
46
+ usage: import('./fleet-bus.js').FleetUsageAggregator;
47
+ fleetManager: import('./fleet-manager.js').FleetManager | undefined;
48
+ fleet: import('./fleet-bus.js').FleetBus;
49
+ coordinator: import('./icoordinator.js').ICoordinator;
50
+ maxBudgetExtensions: number;
51
+ maxFleetCostUsd: number;
52
+ recordExtension: (subagentId: string, taskId: string | undefined, kind: string, newLimit: number) => void;
53
+ appendSessionEvent: (event: Parameters<import('../types/session.js').SessionWriter['append']>[0]) => Promise<void>;
54
+ scheduleManifest: () => void;
55
+ brain: import('./brain.js').BrainArbiter | undefined;
56
+ }
57
+ export { TIMEOUT_PREEMPT_FRACTION } from './subagent-budget.js';
58
+ /**
59
+ * Wire the coordinator's `task.completed` event into the Director's
60
+ * in-memory wait table, the on-disk state checkpoint, and the session
61
+ * JSONL event stream.
62
+ *
63
+ * Mirrors coordinator completion events into:
64
+ * - `d.completed` (capped at `Director.MAX_COMPLETED`, oldest-first trim)
65
+ * - `d.taskWaiters` (resolve and clear the matching waiter)
66
+ * - `d.stateCheckpoint.recordTaskStatus(...)` + `setUsage(...)`
67
+ * - session event stream via `d.appendSessionEvent(...)`
68
+ * - fleet manifest via `d.fleetManager?.flushManifest()` or `d.scheduleManifest()`
69
+ *
70
+ * Returns the listener so the Director can call `coordinator.off(...)`
71
+ * during `shutdown()`.
72
+ */
73
+ export declare function wireTaskCompletedListener(d: DirectorInternals): (payload: {
74
+ task: TaskSpec;
75
+ result: TaskResult;
76
+ }) => void;
77
+ /**
78
+ * Wire the FleetBus's `budget.threshold_reached` filter with the
79
+ * Director's auto-extend/deny policy. Implements:
80
+ *
81
+ * - Heartbeat-driven timeout policy: while a subagent keeps executing
82
+ * tools it never dies on time; once it stops making progress between
83
+ * grants, deny. Wall-clock time alone is never a reliable "stuck" signal.
84
+ * - Per-kind auto-extension with `maxBudgetExtensions` cap.
85
+ * - Brain-decision routing when a brain arbiter is configured.
86
+ * - Collab-subagent passthrough (BugHunter / RefactorPlanner / Critic
87
+ * own their own budget routing via the CollabSession).
88
+ */
89
+ export declare function wireBudgetHandler(d: DirectorInternals): void;
90
+ //# sourceMappingURL=director-construction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"director-construction.d.ts","sourceRoot":"","sources":["../../src/coordination/director-construction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEpE,gFAAgF;AAChF,eAAO,MAAM,aAAa,QAAS,CAAC;AAEpC;;;;;;;8EAO8E;AAC9E,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,yBAAyB,EAAE,UAAU,CAAC,CAAC;IACrE,WAAW,EAAE,GAAG,CACd,MAAM,EACN;QAAE,OAAO,EAAE,OAAO,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC,CAAC;QAAC,OAAO,EAAE,CAAC,CAAC,EAAE,OAAO,yBAAyB,EAAE,UAAU,KAAK,IAAI,CAAA;KAAE,CACvI,CAAC;IACF,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,EAAE,OAAO,8BAA8B,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACvF,KAAK,EAAE,OAAO,gBAAgB,EAAE,oBAAoB,CAAC;IACrD,YAAY,EAAE,OAAO,oBAAoB,EAAE,YAAY,GAAG,SAAS,CAAC;IACpE,KAAK,EAAE,OAAO,gBAAgB,EAAE,QAAQ,CAAC;IACzC,WAAW,EAAE,OAAO,mBAAmB,EAAE,YAAY,CAAC;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1G,kBAAkB,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,qBAAqB,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,KAAK,EAAE,OAAO,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;CACtD;AAyBD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAShE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,iBAAiB,GAAG,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,KAAK,IAAI,CAiEzH;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,CA2J5D"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * System-prompt composition helpers for the Director ecosystem.
3
+ *
4
+ * Two callers need composed prompts:
5
+ *
6
+ * 1. The **leader** (the director's own Agent) — needs a preamble that
7
+ * explains the fleet protocol: when to spawn, when to await, how to
8
+ * roll up, and the eight orchestration tools it owns.
9
+ *
10
+ * 2. Each **subagent** — needs a baseline that explains it has a parent
11
+ * it can call via the bridge, a role-specific block, the task brief,
12
+ * and finally any per-spawn `systemPromptOverride` from `SubagentConfig`.
13
+ *
14
+ * Both composers are pure functions: feed them parts, they return a string.
15
+ * No I/O, no side effects, no implicit defaults beyond the ones exported
16
+ * here. Callers (CLI multi-agent factory, Director itself) decide which
17
+ * parts to fill in — that keeps the composition seam visible and testable.
18
+ */
19
+ /**
20
+ * Default fleet-protocol preamble injected at the **front** of the
21
+ * director-agent's system prompt.
22
+ */
23
+ export declare const DEFAULT_DIRECTOR_PREAMBLE: string;
24
+ /**
25
+ * Default baseline prepended to every subagent's system prompt.
26
+ */
27
+ export declare const DEFAULT_SUBAGENT_BASELINE: string;
28
+ /** Parts the leader-prompt composer accepts. All optional. */
29
+ export interface DirectorPromptParts {
30
+ /** The user's existing leader system prompt — typically what was passed
31
+ * via `MultiAgentConfig.leaderSystemPrompt`. */
32
+ basePrompt?: string | undefined;
33
+ /** Override the built-in fleet preamble. Pass empty string to suppress. */
34
+ directorPreamble?: string | undefined;
35
+ /** Optional roster summary block — a short list of pre-configured roles
36
+ * the director can spawn (e.g. "researcher, coder, reviewer"). Helps
37
+ * small models discover the available shapes without scanning tools. */
38
+ rosterSummary?: string | undefined;
39
+ }
40
+ /**
41
+ * Compose the leader/director's system prompt. Order:
42
+ * 1. Director preamble (fleet protocol)
43
+ * 2. Roster summary (optional, when provided)
44
+ * 3. User base prompt (the per-project leader prompt)
45
+ *
46
+ * Sections are separated by a blank line. Empty parts are skipped so the
47
+ * output never contains stray blank-line runs.
48
+ */
49
+ export declare function composeDirectorPrompt(parts?: DirectorPromptParts): string;
50
+ /** Parts the subagent-prompt composer accepts. Layered from generic to
51
+ * specific; later layers override earlier ones when they conflict. */
52
+ export interface SubagentPromptParts {
53
+ /** Base persona/identity for *every* subagent. Defaults to the bridge
54
+ * contract baseline. Pass empty string to suppress. */
55
+ baseline?: string | undefined;
56
+ /** Role-specific block, e.g. "You are a code reviewer. Focus on…". */
57
+ role?: string | undefined;
58
+ /** Task brief — usually the same string the runner passes as user input,
59
+ * but exposed here in case the factory wants it duplicated in the
60
+ * system prompt for reinforcement. */
61
+ task?: string | undefined;
62
+ /**
63
+ * Absolute path to a shared scratchpad directory the whole fleet can
64
+ * read/write. When set, the composer adds a "Shared notes" block that
65
+ * tells the subagent where to drop findings and where to look for
66
+ * sibling output. This is the cheap fleet-coordination channel —
67
+ * agents don't need each other's transcripts, just each other's
68
+ * conclusions. Falls between `task` and `override` so the override
69
+ * can still narrow or replace it.
70
+ */
71
+ sharedScratchpad?: string | undefined;
72
+ /**
73
+ * Optional skill body content injected into the subagent's system prompt.
74
+ * Use this to provide domain-specific knowledge (SKILL.md bodies) to
75
+ * subagents that need it. Placed after `sharedScratchpad` and before
76
+ * `override` so the override can still narrow or replace it.
77
+ */
78
+ skills?: string | undefined;
79
+ /** Final per-spawn override from `SubagentConfig.systemPromptOverride`.
80
+ * Added last so it wins on conflict — that's by design: the spawn site
81
+ * knows the most about what this specific subagent should do. */
82
+ override?: string | undefined;
83
+ }
84
+ /**
85
+ * Compose a subagent's system prompt. Order:
86
+ * 1. Baseline (bridge contract)
87
+ * 2. Role
88
+ * 3. Task brief
89
+ * 4. Shared scratchpad
90
+ * 5. Skills (domain knowledge from SKILL.md)
91
+ * 6. Per-spawn override
92
+ *
93
+ * Same blank-line-separated joining as the director composer.
94
+ *
95
+ * Layering rationale: the baseline never needs to change between
96
+ * subagents; the role is the "what kind of worker is this"; the task is
97
+ * the "what should you do *now*"; skills provide reusable domain knowledge
98
+ * (e.g. bug-hunting patterns, security scanning rules); the override is
99
+ * the spawn-site escape hatch ("…and respond only in JSON"). Putting
100
+ * override last means it never gets squashed by something earlier in the chain.
101
+ */
102
+ export declare function composeSubagentPrompt(parts?: SubagentPromptParts): string;
103
+ /**
104
+ * Render a short bullet list summarising a roster — useful for stuffing
105
+ * into `composeDirectorPrompt({ rosterSummary })` so the director model
106
+ * can see available roles without scanning tool descriptions.
107
+ *
108
+ * Each entry: `- <role-id>: <name>[ (provider/model)] — <prompt-headline>`
109
+ * The prompt headline is the first non-empty line of `config.prompt`,
110
+ * truncated to 80 chars. Skipped entirely when the role has no prompt.
111
+ */
112
+ export declare function rosterSummaryFromConfigs(roster: Record<string, {
113
+ name: string;
114
+ provider?: string | undefined;
115
+ model?: string | undefined;
116
+ prompt?: string | undefined;
117
+ role?: string | undefined;
118
+ }>): string;
119
+ //# sourceMappingURL=director-prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"director-prompts.d.ts","sourceRoot":"","sources":["../../src/coordination/director-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAErC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAErC,CAAC;AAEF,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC;qDACiD;IACjD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC;;6EAEyE;IACzE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,GAAE,mBAAwB,GAAG,MAAM,CAW7E;AAED;uEACuE;AACvE,MAAM,WAAW,mBAAmB;IAClC;4DACwD;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;2CAEuC;IACvC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;sEAEkE;IAClE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,GAAE,mBAAwB,GAAG,MAAM,CA4B7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,CACZ,MAAM,EACN;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CACpI,GACA,MAAM,CAWR"}
@@ -0,0 +1,68 @@
1
+ import type { SessionStore, SessionWriter } from '../types/session.js';
2
+ /**
3
+ * Per-subagent session factory.
4
+ *
5
+ * Director runs produce many parallel transcripts — one per spawned
6
+ * subagent — and we want them all rooted under the same director-run
7
+ * directory so a future `wstack replay <runId>` can rehydrate the whole
8
+ * fleet from a single tree.
9
+ *
10
+ * The factory builds (or accepts) a `SessionStore` whose `dir` points at
11
+ * `<sessionsRoot>/<directorRunId>/`, and returns a small `create()`
12
+ * function that the orchestration layer calls per-spawn. Each call
13
+ * yields a fresh `SessionWriter` whose JSONL file lives in that
14
+ * directory, named by either the caller-supplied `subagentId` (preferred,
15
+ * so the file name is human-readable) or a derived id.
16
+ *
17
+ * **Why a thin factory instead of plumbing options through every spawn
18
+ * site?** Because the director is the only caller that needs this
19
+ * isolation pattern, and shoving `sessionStore` options into
20
+ * `SubagentConfig` would leak storage details into a config shape that
21
+ * agents and the coordinator have no business knowing about.
22
+ */
23
+ export interface DirectorSessionFactoryOptions {
24
+ /**
25
+ * Either a parent directory where `<directorRunId>/` will be created,
26
+ * or a pre-built `SessionStore` whose `dir` already points at the
27
+ * director run directory. Tests pass an in-memory store for isolation;
28
+ * production code passes the path under `~/.wrongstack/sessions/`.
29
+ */
30
+ store?: SessionStore | undefined;
31
+ sessionsRoot?: string | undefined;
32
+ /**
33
+ * Director run id — namespaces all subagent JSONLs under one folder.
34
+ * Defaults to a timestamped id; supplied explicitly when resuming a
35
+ * prior fleet manifest.
36
+ */
37
+ directorRunId?: string | undefined;
38
+ /**
39
+ * Session-level trace ID for correlating subagent storage events with
40
+ * the parent session's trace in observability pipelines.
41
+ */
42
+ traceId?: string | undefined;
43
+ }
44
+ export interface DirectorSessionFactory {
45
+ /** Absolute directory where this director run's transcripts live. */
46
+ readonly dir: string;
47
+ /** The director run id used to namespace the directory. */
48
+ readonly directorRunId: string;
49
+ /**
50
+ * Create a fresh `SessionWriter` for the named subagent. Each
51
+ * subagent gets its own JSONL file. The writer's `id` matches the
52
+ * supplied `subagentId` so disk paths line up with in-memory ids.
53
+ */
54
+ createSubagentSession(args: {
55
+ subagentId: string;
56
+ provider?: string | undefined;
57
+ model?: string | undefined;
58
+ title?: string | undefined;
59
+ }): Promise<SessionWriter>;
60
+ }
61
+ /**
62
+ * Build a `DirectorSessionFactory`. Pass either a pre-configured
63
+ * `SessionStore` (tests) or a `sessionsRoot` path (production). When
64
+ * neither is supplied the factory throws — there's no sane default for
65
+ * "where do these JSONLs live".
66
+ */
67
+ export declare function makeDirectorSessionFactory(opts: DirectorSessionFactoryOptions): DirectorSessionFactory;
68
+ //# sourceMappingURL=director-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"director-session.d.ts","sourceRoot":"","sources":["../../src/coordination/director-session.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,qBAAqB,CAAC,IAAI,EAAE;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC5B,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,6BAA6B,GAClC,sBAAsB,CAyCxB"}
@@ -0,0 +1,65 @@
1
+ import type { SubagentConfig } from '../types/multi-agent.js';
2
+ import type { Tool } from '../types/tool.js';
3
+ import { type Director } from './director.js';
4
+ export declare function makeSpawnTool(director: Director, roster?: Record<string, SubagentConfig>): Tool;
5
+ export declare function makeQualityGateTool(director: Director, roster?: Record<string, SubagentConfig>): Tool;
6
+ export declare function makeAssignTool(director: Director): Tool;
7
+ export declare function makeKanbanQueueTool(director: Director, roster?: Record<string, SubagentConfig>): Tool;
8
+ export declare function makeAwaitTasksTool(director: Director): Tool;
9
+ export declare function makeAskTool(director: Director): Tool;
10
+ /**
11
+ * Retrieve a previously stored `ask_subagent` answer by its store key.
12
+ * The key was returned as `_answerKey` in the ask_subagent response.
13
+ * Use this only for large responses that were stored out-of-context.
14
+ */
15
+ export declare function makeAskResultTool(director: Director): Tool;
16
+ export declare function makeRollUpTool(director: Director): Tool;
17
+ export declare function makeTerminateTool(director: Director): Tool;
18
+ export declare function makeTerminateAllTool(director: Director): Tool;
19
+ /**
20
+ * Unified fleet observation tool — consolidates the former fleet_status,
21
+ * fleet_usage, fleet_session, and fleet_health tools under a single `action`
22
+ * parameter (status, usage, health, session).
23
+ *
24
+ * These four are all read-only fleet queries; merging them into one tool
25
+ * reduces tool-schema token overhead (4 × ~150 tokens → 1 × ~250 tokens)
26
+ * and eliminates model confusion when choosing between similar tools.
27
+ */
28
+ export declare function makeFleetTool(director: Director): Tool;
29
+ /**
30
+ * Collaborative debugging session: BugHunter, RefactorPlanner, and Critic
31
+ * run in parallel on the same target files, with findings flowing through
32
+ * the FleetBus (bug.found → refactor.plan → critic.evaluation).
33
+ *
34
+ * Returns a structured CollabDebugReport containing all bug findings,
35
+ * refactor plans, critic evaluations, and an overall verdict.
36
+ */
37
+ export declare function makeCollabDebugTool(director: Director): Tool;
38
+ /**
39
+ * Tool for subagents to emit structured events on the FleetBus.
40
+ * Custom event types are extensible; known collab events are schema-validated
41
+ * and restricted to their owning role before the Director routes them.
42
+ * Common event types in collaborative sessions:
43
+ * bug.found — BugHunter emits per-finding
44
+ * refactor.plan — RefactorPlanner emits per-plan
45
+ * critic.evaluation — Critic emits per-evaluation
46
+ *
47
+ * The payload structure is event-type-specific. Use null for empty payloads.
48
+ */
49
+ export declare function makeFleetEmitTool(director: Director): Tool;
50
+ /**
51
+ * Signal that the director's work is satisfied and the fleet should wind down.
52
+ *
53
+ * Once called:
54
+ * - `spawn_subagent` throws — no new subagents can be created
55
+ * - `assign_task` synthesizes an immediate `aborted_by_parent` completion
56
+ * for any queued task (callers awaiting those tasks unblock immediately)
57
+ * - Running subagents are NOT killed — they finish naturally; no new
58
+ * tasks are dispatched to them
59
+ *
60
+ * Use this when you are satisfied with the results and want the fleet to
61
+ * stop spawning without forcibly stopping in-flight work. Call
62
+ * `terminate_subagent` separately for any subagent you need to stop immediately.
63
+ */
64
+ export declare function makeWorkCompleteTool(director: Director): Tool;
65
+ //# sourceMappingURL=director-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"director-tools.d.ts","sourceRoot":"","sources":["../../src/coordination/director-tools.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAc,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,EACL,KAAK,QAAQ,EAId,MAAM,eAAe,CAAC;AAevB,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,IAAI,CAuJ/F;AA+CD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,QAAQ,EAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GACtC,IAAI,CA+LN;AA8SD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CA4CvD;AAwBD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,QAAQ,EAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GACtC,IAAI,CA+PN;AAgMD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CA0D3D;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CA6CpD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CA+B1D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CA6BvD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAmB1D;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAqB7D;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAoHtD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CA+E5D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAwC1D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAiB7D"}