@wrongstack/core 0.284.1 → 0.286.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 (831) 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 +129 -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 +152 -0
  60. package/dist/coordination/autonomous-brain.d.ts.map +1 -0
  61. package/dist/coordination/autonomous-coordinator.d.ts +243 -0
  62. package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
  63. package/dist/coordination/brain-ledger.d.ts +142 -0
  64. package/dist/coordination/brain-ledger.d.ts.map +1 -0
  65. package/dist/coordination/brain-monitor.d.ts +103 -0
  66. package/dist/coordination/brain-monitor.d.ts.map +1 -0
  67. package/dist/coordination/brain.d.ts +147 -0
  68. package/dist/coordination/brain.d.ts.map +1 -0
  69. package/dist/coordination/change-manager.d.ts +151 -0
  70. package/dist/coordination/change-manager.d.ts.map +1 -0
  71. package/dist/coordination/checkpoint-wiring.d.ts +61 -0
  72. package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
  73. package/dist/coordination/collab-bus.d.ts +132 -0
  74. package/dist/coordination/collab-bus.d.ts.map +1 -0
  75. package/dist/coordination/collab-debug.d.ts +302 -0
  76. package/dist/coordination/collab-debug.d.ts.map +1 -0
  77. package/dist/coordination/commit-safety.d.ts +72 -0
  78. package/dist/coordination/commit-safety.d.ts.map +1 -0
  79. package/dist/coordination/consensus-protocol.d.ts +106 -0
  80. package/dist/coordination/consensus-protocol.d.ts.map +1 -0
  81. package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
  82. package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
  83. package/dist/coordination/delegate-tool.d.ts +101 -0
  84. package/dist/coordination/delegate-tool.d.ts.map +1 -0
  85. package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
  86. package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
  87. package/dist/coordination/dep-watcher.d.ts +74 -0
  88. package/dist/coordination/dep-watcher.d.ts.map +1 -0
  89. package/dist/coordination/director/director-errors.d.ts +29 -0
  90. package/dist/coordination/director/director-errors.d.ts.map +1 -0
  91. package/dist/coordination/director-construction.d.ts +90 -0
  92. package/dist/coordination/director-construction.d.ts.map +1 -0
  93. package/dist/coordination/director-prompts.d.ts +119 -0
  94. package/dist/coordination/director-prompts.d.ts.map +1 -0
  95. package/dist/coordination/director-session.d.ts +68 -0
  96. package/dist/coordination/director-session.d.ts.map +1 -0
  97. package/dist/coordination/director-tools.d.ts +65 -0
  98. package/dist/coordination/director-tools.d.ts.map +1 -0
  99. package/dist/coordination/director.d.ts +802 -0
  100. package/dist/coordination/director.d.ts.map +1 -0
  101. package/dist/coordination/dispatcher.d.ts +82 -0
  102. package/dist/coordination/dispatcher.d.ts.map +1 -0
  103. package/dist/coordination/file-author-tracker.d.ts +76 -0
  104. package/dist/coordination/file-author-tracker.d.ts.map +1 -0
  105. package/dist/coordination/fleet-bus.d.ts +122 -0
  106. package/dist/coordination/fleet-bus.d.ts.map +1 -0
  107. package/dist/coordination/fleet-event-validation.d.ts +10 -0
  108. package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
  109. package/dist/coordination/fleet-manager.d.ts +234 -0
  110. package/dist/coordination/fleet-manager.d.ts.map +1 -0
  111. package/dist/coordination/fleet-spawn.d.ts +102 -0
  112. package/dist/coordination/fleet-spawn.d.ts.map +1 -0
  113. package/dist/coordination/fleet-status-tool.d.ts +36 -0
  114. package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
  115. package/dist/coordination/fleet-supervisor.d.ts +157 -0
  116. package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
  117. package/dist/coordination/fleet.d.ts +96 -0
  118. package/dist/coordination/fleet.d.ts.map +1 -0
  119. package/dist/coordination/global-mailbox.d.ts +295 -0
  120. package/dist/coordination/global-mailbox.d.ts.map +1 -0
  121. package/dist/coordination/icoordinator.d.ts +97 -0
  122. package/dist/coordination/icoordinator.d.ts.map +1 -0
  123. package/dist/coordination/ifleet-manager.d.ts +177 -0
  124. package/dist/coordination/ifleet-manager.d.ts.map +1 -0
  125. package/dist/coordination/in-memory-transport.d.ts +12 -0
  126. package/dist/coordination/in-memory-transport.d.ts.map +1 -0
  127. package/dist/coordination/index.d.ts +79 -2587
  128. package/dist/coordination/index.d.ts.map +1 -0
  129. package/dist/coordination/index.js +2262 -673
  130. package/dist/coordination/index.js.map +7 -1
  131. package/dist/coordination/knowledge-graph.d.ts +229 -0
  132. package/dist/coordination/knowledge-graph.d.ts.map +1 -0
  133. package/dist/coordination/large-answer-store.d.ts +61 -0
  134. package/dist/coordination/large-answer-store.d.ts.map +1 -0
  135. package/dist/coordination/mail-tools.d.ts +34 -0
  136. package/dist/coordination/mail-tools.d.ts.map +1 -0
  137. package/dist/coordination/mailbox-actions.d.ts +67 -0
  138. package/dist/coordination/mailbox-actions.d.ts.map +1 -0
  139. package/dist/coordination/mailbox-constants.d.ts +64 -0
  140. package/dist/coordination/mailbox-constants.d.ts.map +1 -0
  141. package/dist/coordination/mailbox-events.d.ts +32 -0
  142. package/dist/coordination/mailbox-events.d.ts.map +1 -0
  143. package/dist/coordination/mailbox-health.d.ts +131 -0
  144. package/dist/coordination/mailbox-health.d.ts.map +1 -0
  145. package/dist/coordination/mailbox-hooks.d.ts +55 -0
  146. package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
  147. package/dist/coordination/mailbox-message-codec.d.ts +8 -0
  148. package/dist/coordination/mailbox-message-codec.d.ts.map +1 -0
  149. package/dist/coordination/mailbox-tool.d.ts +75 -0
  150. package/dist/coordination/mailbox-tool.d.ts.map +1 -0
  151. package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +125 -26
  152. package/dist/coordination/mailbox-types.d.ts.map +1 -0
  153. package/dist/coordination/mailbox.d.ts +88 -0
  154. package/dist/coordination/mailbox.d.ts.map +1 -0
  155. package/dist/coordination/model-matrix.d.ts +98 -0
  156. package/dist/coordination/model-matrix.d.ts.map +1 -0
  157. package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
  158. package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
  159. package/dist/coordination/null-fleet-bus.d.ts +10 -0
  160. package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
  161. package/dist/coordination/package-author-tracker.d.ts +87 -0
  162. package/dist/coordination/package-author-tracker.d.ts.map +1 -0
  163. package/dist/coordination/package-outdated-watcher.d.ts +83 -0
  164. package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
  165. package/dist/coordination/single-instance-mailbox.d.ts +154 -0
  166. package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
  167. package/dist/coordination/spawn-budget.d.ts +6 -0
  168. package/dist/coordination/spawn-budget.d.ts.map +1 -0
  169. package/dist/coordination/subagent-budget.d.ts +323 -0
  170. package/dist/coordination/subagent-budget.d.ts.map +1 -0
  171. package/dist/coordination/subagent-nicknames.d.ts +42 -0
  172. package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
  173. package/dist/coordination/subagent-result-tool.d.ts +20 -0
  174. package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
  175. package/dist/coordination/task-auctioneer.d.ts +143 -0
  176. package/dist/coordination/task-auctioneer.d.ts.map +1 -0
  177. package/dist/coordination/task-dag.d.ts +147 -0
  178. package/dist/coordination/task-dag.d.ts.map +1 -0
  179. package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
  180. package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
  181. package/dist/coordination/transport.d.ts +2 -0
  182. package/dist/coordination/transport.d.ts.map +1 -0
  183. package/dist/coordination/worktree-task-runner.d.ts +45 -0
  184. package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
  185. package/dist/core/agent-internals.d.ts +41 -0
  186. package/dist/core/agent-internals.d.ts.map +1 -0
  187. package/dist/core/agent-loop.d.ts +18 -0
  188. package/dist/core/agent-loop.d.ts.map +1 -0
  189. package/dist/core/agent-response.d.ts +21 -0
  190. package/dist/core/agent-response.d.ts.map +1 -0
  191. package/dist/core/agent-tools.d.ts +21 -0
  192. package/dist/core/agent-tools.d.ts.map +1 -0
  193. package/dist/core/agent-types.d.ts +95 -0
  194. package/dist/core/agent-types.d.ts.map +1 -0
  195. package/dist/core/agent.d.ts +54 -0
  196. package/dist/core/agent.d.ts.map +1 -0
  197. package/dist/core/btw.d.ts +40 -0
  198. package/dist/core/btw.d.ts.map +1 -0
  199. package/dist/core/context.d.ts +269 -0
  200. package/dist/core/context.d.ts.map +1 -0
  201. package/dist/core/continue-intent.d.ts +92 -0
  202. package/dist/core/continue-intent.d.ts.map +1 -0
  203. package/dist/core/continue-to-next-iteration.d.ts +96 -0
  204. package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
  205. package/dist/core/conversation-state.d.ts +96 -0
  206. package/dist/core/conversation-state.d.ts.map +1 -0
  207. package/dist/core/fallback-model.d.ts +94 -0
  208. package/dist/core/fallback-model.d.ts.map +1 -0
  209. package/dist/core/fleet-pulse.d.ts +42 -0
  210. package/dist/core/fleet-pulse.d.ts.map +1 -0
  211. package/dist/core/input-builder.d.ts +95 -0
  212. package/dist/core/input-builder.d.ts.map +1 -0
  213. package/dist/core/instruction-bundle.d.ts +22 -0
  214. package/dist/core/instruction-bundle.d.ts.map +1 -0
  215. package/dist/core/iteration-limit.d.ts +35 -0
  216. package/dist/core/iteration-limit.d.ts.map +1 -0
  217. package/dist/core/mailbox-loop.d.ts +63 -0
  218. package/dist/core/mailbox-loop.d.ts.map +1 -0
  219. package/dist/core/modes/brief.d.ts +2 -0
  220. package/dist/core/modes/brief.d.ts.map +1 -0
  221. package/dist/core/modes/default.d.ts +8 -0
  222. package/dist/core/modes/default.d.ts.map +1 -0
  223. package/dist/core/modes/teach.d.ts +2 -0
  224. package/dist/core/modes/teach.d.ts.map +1 -0
  225. package/dist/core/provider-runner.d.ts +24 -0
  226. package/dist/core/provider-runner.d.ts.map +1 -0
  227. package/dist/core/queued-messages.d.ts +55 -0
  228. package/dist/core/queued-messages.d.ts.map +1 -0
  229. package/dist/core/run-env.d.ts +49 -0
  230. package/dist/core/run-env.d.ts.map +1 -0
  231. package/dist/core/streaming-response-builder.d.ts +78 -0
  232. package/dist/core/streaming-response-builder.d.ts.map +1 -0
  233. package/dist/core/system-prompt-builder.d.ts +213 -0
  234. package/dist/core/system-prompt-builder.d.ts.map +1 -0
  235. package/dist/defaults/index.d.ts +68 -158
  236. package/dist/defaults/index.d.ts.map +1 -0
  237. package/dist/defaults/index.js +2061 -1300
  238. package/dist/defaults/index.js.map +7 -1
  239. package/dist/execution/auto-compaction-middleware.d.ts +123 -0
  240. package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
  241. package/dist/execution/autonomous-runner.d.ts +61 -0
  242. package/dist/execution/autonomous-runner.d.ts.map +1 -0
  243. package/dist/execution/autonomy-brain.d.ts +151 -0
  244. package/dist/execution/autonomy-brain.d.ts.map +1 -0
  245. package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
  246. package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
  247. package/dist/execution/brain-chain.d.ts +53 -0
  248. package/dist/execution/brain-chain.d.ts.map +1 -0
  249. package/dist/execution/brain-evaluation.d.ts +66 -0
  250. package/dist/execution/brain-evaluation.d.ts.map +1 -0
  251. package/dist/execution/brain-runtime.d.ts +171 -0
  252. package/dist/execution/brain-runtime.d.ts.map +1 -0
  253. package/dist/execution/compaction-core.d.ts +103 -0
  254. package/dist/execution/compaction-core.d.ts.map +1 -0
  255. package/dist/execution/compactor.d.ts +56 -0
  256. package/dist/execution/compactor.d.ts.map +1 -0
  257. package/dist/execution/council-brain.d.ts +79 -0
  258. package/dist/execution/council-brain.d.ts.map +1 -0
  259. package/dist/execution/design-color.d.ts +31 -0
  260. package/dist/execution/design-color.d.ts.map +1 -0
  261. package/dist/execution/design-detect.d.ts +96 -0
  262. package/dist/execution/design-detect.d.ts.map +1 -0
  263. package/dist/execution/design-kit-loader.d.ts +53 -0
  264. package/dist/execution/design-kit-loader.d.ts.map +1 -0
  265. package/dist/execution/design-materialize.d.ts +32 -0
  266. package/dist/execution/design-materialize.d.ts.map +1 -0
  267. package/dist/execution/design-project-store.d.ts +57 -0
  268. package/dist/execution/design-project-store.d.ts.map +1 -0
  269. package/dist/execution/design-verify.d.ts +44 -0
  270. package/dist/execution/design-verify.d.ts.map +1 -0
  271. package/dist/execution/error-handler.d.ts +34 -0
  272. package/dist/execution/error-handler.d.ts.map +1 -0
  273. package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +22 -225
  274. package/dist/execution/eternal-autonomy.d.ts.map +1 -0
  275. package/dist/execution/goal-preamble.d.ts +2 -0
  276. package/dist/execution/goal-preamble.d.ts.map +1 -0
  277. package/dist/execution/index.d.ts +25 -180
  278. package/dist/execution/index.d.ts.map +1 -0
  279. package/dist/execution/index.js +1748 -490
  280. package/dist/execution/index.js.map +7 -1
  281. package/dist/execution/intelligent-compactor.d.ts +85 -0
  282. package/dist/execution/intelligent-compactor.d.ts.map +1 -0
  283. package/dist/execution/model-runtime.d.ts +75 -0
  284. package/dist/execution/model-runtime.d.ts.map +1 -0
  285. package/dist/execution/parallel-eternal-engine.d.ts +142 -0
  286. package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
  287. package/dist/execution/prompt-enhancer.d.ts +12 -13
  288. package/dist/execution/prompt-enhancer.d.ts.map +1 -0
  289. package/dist/execution/prompt-enhancer.js +13 -7
  290. package/dist/execution/prompt-enhancer.js.map +7 -1
  291. package/dist/execution/prompt-loader.d.ts +52 -0
  292. package/dist/execution/prompt-loader.d.ts.map +1 -0
  293. package/dist/execution/provider-runner-impl.d.ts +14 -0
  294. package/dist/execution/provider-runner-impl.d.ts.map +1 -0
  295. package/dist/execution/regex-patterns.d.ts +7 -0
  296. package/dist/execution/regex-patterns.d.ts.map +1 -0
  297. package/dist/execution/retry-policy.d.ts +35 -0
  298. package/dist/execution/retry-policy.d.ts.map +1 -0
  299. package/dist/execution/selective-compactor.d.ts +94 -0
  300. package/dist/execution/selective-compactor.d.ts.map +1 -0
  301. package/dist/execution/skill-loader.d.ts +43 -0
  302. package/dist/execution/skill-loader.d.ts.map +1 -0
  303. package/dist/execution/strategy-compactor.d.ts +43 -0
  304. package/dist/execution/strategy-compactor.d.ts.map +1 -0
  305. package/dist/execution/tool-executor.d.ts +112 -0
  306. package/dist/execution/tool-executor.d.ts.map +1 -0
  307. package/dist/extension/extension-points.d.ts +121 -0
  308. package/dist/extension/extension-points.d.ts.map +1 -0
  309. package/dist/extension/index.d.ts +3 -10
  310. package/dist/extension/index.d.ts.map +1 -0
  311. package/dist/extension/index.js +59 -5
  312. package/dist/extension/index.js.map +7 -1
  313. package/dist/extension/registry.d.ts +86 -0
  314. package/dist/extension/registry.d.ts.map +1 -0
  315. package/dist/fleet-notifier.d.ts +28 -0
  316. package/dist/fleet-notifier.d.ts.map +1 -0
  317. package/dist/hooks/http-executor.d.ts +11 -0
  318. package/dist/hooks/http-executor.d.ts.map +1 -0
  319. package/dist/hooks/index.d.ts +10 -0
  320. package/dist/hooks/index.d.ts.map +1 -0
  321. package/dist/hooks/registry.d.ts +71 -0
  322. package/dist/hooks/registry.d.ts.map +1 -0
  323. package/dist/hooks/runner.d.ts +65 -0
  324. package/dist/hooks/runner.d.ts.map +1 -0
  325. package/dist/hooks/shell-executor.d.ts +33 -0
  326. package/dist/hooks/shell-executor.d.ts.map +1 -0
  327. package/dist/hooks/shell-hooks-equal.d.ts +15 -0
  328. package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
  329. package/dist/hq/agent-bridge.d.ts +27 -0
  330. package/dist/hq/agent-bridge.d.ts.map +1 -0
  331. package/dist/hq/alerts.d.ts +67 -0
  332. package/dist/hq/alerts.d.ts.map +1 -0
  333. package/dist/hq/auth-store.d.ts +179 -0
  334. package/dist/hq/auth-store.d.ts.map +1 -0
  335. package/dist/hq/brain-bridge.d.ts +37 -0
  336. package/dist/hq/brain-bridge.d.ts.map +1 -0
  337. package/dist/hq/commands.d.ts +122 -0
  338. package/dist/hq/commands.d.ts.map +1 -0
  339. package/dist/hq/cost-bridge.d.ts +36 -0
  340. package/dist/hq/cost-bridge.d.ts.map +1 -0
  341. package/dist/hq/factory.d.ts +69 -0
  342. package/dist/hq/factory.d.ts.map +1 -0
  343. package/dist/hq/fleet-bridge.d.ts +39 -0
  344. package/dist/hq/fleet-bridge.d.ts.map +1 -0
  345. package/dist/hq/index.d.ts +18 -816
  346. package/dist/hq/index.d.ts.map +1 -0
  347. package/dist/hq/index.js +1043 -192
  348. package/dist/hq/index.js.map +7 -1
  349. package/dist/hq/mailbox-mapper.d.ts +27 -0
  350. package/dist/hq/mailbox-mapper.d.ts.map +1 -0
  351. package/dist/hq/persistence.d.ts +121 -0
  352. package/dist/hq/persistence.d.ts.map +1 -0
  353. package/dist/hq/protocol.d.ts +612 -0
  354. package/dist/hq/protocol.d.ts.map +1 -0
  355. package/dist/hq/publisher.d.ts +181 -0
  356. package/dist/hq/publisher.d.ts.map +1 -0
  357. package/dist/hq/redaction.d.ts +30 -0
  358. package/dist/hq/redaction.d.ts.map +1 -0
  359. package/dist/hq/session-bridge.d.ts +29 -0
  360. package/dist/hq/session-bridge.d.ts.map +1 -0
  361. package/dist/hq/tool-bridge.d.ts +41 -0
  362. package/dist/hq/tool-bridge.d.ts.map +1 -0
  363. package/dist/hq/transcript-mapper.d.ts +36 -0
  364. package/dist/hq/transcript-mapper.d.ts.map +1 -0
  365. package/dist/hq/worktree-bridge.d.ts +34 -0
  366. package/dist/hq/worktree-bridge.d.ts.map +1 -0
  367. package/dist/index.d.ts +114 -2872
  368. package/dist/index.d.ts.map +1 -0
  369. package/dist/index.js +6104 -2737
  370. package/dist/index.js.map +7 -1
  371. package/dist/infrastructure/context-manager.d.ts +92 -0
  372. package/dist/infrastructure/context-manager.d.ts.map +1 -0
  373. package/dist/infrastructure/index.d.ts +6 -64
  374. package/dist/infrastructure/index.d.ts.map +1 -0
  375. package/dist/infrastructure/index.js +39 -12
  376. package/dist/infrastructure/index.js.map +7 -1
  377. package/dist/infrastructure/logger.d.ts +99 -0
  378. package/dist/infrastructure/logger.d.ts.map +1 -0
  379. package/dist/infrastructure/mcp-servers.d.ts +83 -0
  380. package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
  381. package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
  382. package/dist/infrastructure/path-resolver.d.ts.map +1 -0
  383. package/dist/infrastructure/token-counter.d.ts +57 -0
  384. package/dist/infrastructure/token-counter.d.ts.map +1 -0
  385. package/dist/kernel/container.d.ts +84 -0
  386. package/dist/kernel/container.d.ts.map +1 -0
  387. package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +134 -210
  388. package/dist/kernel/events.d.ts.map +1 -0
  389. package/dist/kernel/index.d.ts +6 -107
  390. package/dist/kernel/index.d.ts.map +1 -0
  391. package/dist/kernel/index.js +56 -4
  392. package/dist/kernel/index.js.map +7 -1
  393. package/dist/kernel/pipeline.d.ts +105 -0
  394. package/dist/kernel/pipeline.d.ts.map +1 -0
  395. package/dist/kernel/run-controller.d.ts +55 -0
  396. package/dist/kernel/run-controller.d.ts.map +1 -0
  397. package/dist/kernel/tokens.d.ts +53 -0
  398. package/dist/kernel/tokens.d.ts.map +1 -0
  399. package/dist/mailbox-attach.d.ts +27 -0
  400. package/dist/mailbox-attach.d.ts.map +1 -0
  401. package/dist/middleware/collab-pause.d.ts +73 -0
  402. package/dist/middleware/collab-pause.d.ts.map +1 -0
  403. package/dist/models/codex-catalog.d.ts +41 -0
  404. package/dist/models/codex-catalog.d.ts.map +1 -0
  405. package/dist/models/index.d.ts +8 -163
  406. package/dist/models/index.d.ts.map +1 -0
  407. package/dist/models/index.js +150 -51
  408. package/dist/models/index.js.map +7 -1
  409. package/dist/models/llm-selector.d.ts +47 -0
  410. package/dist/models/llm-selector.d.ts.map +1 -0
  411. package/dist/models/mode-store.d.ts +22 -0
  412. package/dist/models/mode-store.d.ts.map +1 -0
  413. package/dist/models/model-intelligence.d.ts +56 -0
  414. package/dist/models/model-intelligence.d.ts.map +1 -0
  415. package/dist/models/model-router.d.ts +100 -0
  416. package/dist/models/model-router.d.ts.map +1 -0
  417. package/dist/models/models-registry.d.ts +106 -0
  418. package/dist/models/models-registry.d.ts.map +1 -0
  419. package/dist/models/provider-model-resolve.d.ts +69 -0
  420. package/dist/models/provider-model-resolve.d.ts.map +1 -0
  421. package/dist/observability/event-bridge.d.ts +10 -0
  422. package/dist/observability/event-bridge.d.ts.map +1 -0
  423. package/dist/observability/health.d.ts +18 -0
  424. package/dist/observability/health.d.ts.map +1 -0
  425. package/dist/observability/index.d.ts +9 -354
  426. package/dist/observability/index.d.ts.map +1 -0
  427. package/dist/observability/index.js +37 -23
  428. package/dist/observability/index.js.map +7 -1
  429. package/dist/observability/metrics.d.ts +26 -0
  430. package/dist/observability/metrics.d.ts.map +1 -0
  431. package/dist/observability/otel-tracer.d.ts +41 -0
  432. package/dist/observability/otel-tracer.d.ts.map +1 -0
  433. package/dist/observability/otlp-metrics.d.ts +111 -0
  434. package/dist/observability/otlp-metrics.d.ts.map +1 -0
  435. package/dist/observability/otlp-traces.d.ts +95 -0
  436. package/dist/observability/otlp-traces.d.ts.map +1 -0
  437. package/dist/observability/prometheus.d.ts +49 -0
  438. package/dist/observability/prometheus.d.ts.map +1 -0
  439. package/dist/observability/tracer.d.ts +9 -0
  440. package/dist/observability/tracer.d.ts.map +1 -0
  441. package/dist/plugin/api.d.ts +226 -0
  442. package/dist/plugin/api.d.ts.map +1 -0
  443. package/dist/plugin/loader.d.ts +73 -0
  444. package/dist/plugin/loader.d.ts.map +1 -0
  445. package/dist/plugins/chimera-plugin.d.ts +37 -0
  446. package/dist/plugins/chimera-plugin.d.ts.map +1 -0
  447. package/dist/plugins/prompts-plugin.d.ts +26 -0
  448. package/dist/plugins/prompts-plugin.d.ts.map +1 -0
  449. package/dist/plugins/security-plugin.d.ts +19 -0
  450. package/dist/plugins/security-plugin.d.ts.map +1 -0
  451. package/dist/plugins/skills-plugin.d.ts +42 -0
  452. package/dist/plugins/skills-plugin.d.ts.map +1 -0
  453. package/dist/plugins/sync-plugin.d.ts +22 -0
  454. package/dist/plugins/sync-plugin.d.ts.map +1 -0
  455. package/dist/prompts/index.d.ts +3 -0
  456. package/dist/prompts/index.d.ts.map +1 -0
  457. package/dist/prompts/prompt-installer.d.ts +50 -0
  458. package/dist/prompts/prompt-installer.d.ts.map +1 -0
  459. package/dist/prompts/prompt-manifest-store.d.ts +18 -0
  460. package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
  461. package/dist/registry/provider-registry.d.ts +51 -0
  462. package/dist/registry/provider-registry.d.ts.map +1 -0
  463. package/dist/registry/slash-command-registry.d.ts +61 -0
  464. package/dist/registry/slash-command-registry.d.ts.map +1 -0
  465. package/dist/registry/tool-registry.d.ts +154 -0
  466. package/dist/registry/tool-registry.d.ts.map +1 -0
  467. package/dist/replay/hash.d.ts +31 -0
  468. package/dist/replay/hash.d.ts.map +1 -0
  469. package/dist/replay/replay-provider-runner.d.ts +53 -0
  470. package/dist/replay/replay-provider-runner.d.ts.map +1 -0
  471. package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
  472. package/dist/security/capabilities.d.ts.map +1 -0
  473. package/dist/security/config-secrets.d.ts +25 -0
  474. package/dist/security/config-secrets.d.ts.map +1 -0
  475. package/dist/security/index.d.ts +7 -8
  476. package/dist/security/index.d.ts.map +1 -0
  477. package/dist/security/index.js +354 -401
  478. package/dist/security/index.js.map +7 -1
  479. package/dist/security/permission-policy-schema.d.ts +77 -0
  480. package/dist/security/permission-policy-schema.d.ts.map +1 -0
  481. package/dist/security/permission-policy.d.ts +158 -0
  482. package/dist/security/permission-policy.d.ts.map +1 -0
  483. package/dist/security/secret-scrubber.d.ts +14 -0
  484. package/dist/security/secret-scrubber.d.ts.map +1 -0
  485. package/dist/security/secret-vault.d.ts +96 -0
  486. package/dist/security/secret-vault.d.ts.map +1 -0
  487. package/dist/security/yolo-risk.d.ts +11 -0
  488. package/dist/security/yolo-risk.d.ts.map +1 -0
  489. package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
  490. package/dist/session-registry.d.ts.map +1 -0
  491. package/dist/skills/foreign-sources.d.ts +59 -0
  492. package/dist/skills/foreign-sources.d.ts.map +1 -0
  493. package/dist/skills/frontmatter.d.ts +44 -0
  494. package/dist/skills/frontmatter.d.ts.map +1 -0
  495. package/dist/skills/github-fetcher.d.ts +38 -0
  496. package/dist/skills/github-fetcher.d.ts.map +1 -0
  497. package/dist/skills/index.d.ts +11 -582
  498. package/dist/skills/index.d.ts.map +1 -0
  499. package/dist/skills/index.js +81 -43
  500. package/dist/skills/index.js.map +7 -1
  501. package/dist/skills/limits.d.ts +92 -0
  502. package/dist/skills/limits.d.ts.map +1 -0
  503. package/dist/skills/manifest-store.d.ts +42 -0
  504. package/dist/skills/manifest-store.d.ts.map +1 -0
  505. package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
  506. package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
  507. package/dist/skills/registry/registry-adapter.d.ts +84 -0
  508. package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
  509. package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
  510. package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
  511. package/dist/skills/skill-generator.d.ts +82 -0
  512. package/dist/skills/skill-generator.d.ts.map +1 -0
  513. package/dist/skills/skill-installer.d.ts +124 -0
  514. package/dist/skills/skill-installer.d.ts.map +1 -0
  515. package/dist/storage/annotations-store.d.ts +118 -0
  516. package/dist/storage/annotations-store.d.ts.map +1 -0
  517. package/dist/storage/attachment-store.d.ts +31 -0
  518. package/dist/storage/attachment-store.d.ts.map +1 -0
  519. package/dist/storage/cloud-sync.d.ts +44 -0
  520. package/dist/storage/cloud-sync.d.ts.map +1 -0
  521. package/dist/storage/completed-work-checkpoint.d.ts +11 -0
  522. package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
  523. package/dist/storage/config-loader.d.ts +114 -0
  524. package/dist/storage/config-loader.d.ts.map +1 -0
  525. package/dist/storage/config-migration.d.ts +87 -0
  526. package/dist/storage/config-migration.d.ts.map +1 -0
  527. package/dist/storage/config-store.d.ts +22 -0
  528. package/dist/storage/config-store.d.ts.map +1 -0
  529. package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
  530. package/dist/storage/director-state.d.ts.map +1 -0
  531. package/dist/storage/file-session-writer.d.ts +169 -0
  532. package/dist/storage/file-session-writer.d.ts.map +1 -0
  533. package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
  534. package/dist/storage/goal-store.d.ts.map +1 -0
  535. package/dist/storage/index.d.ts +39 -1031
  536. package/dist/storage/index.d.ts.map +1 -0
  537. package/dist/storage/index.js +783 -443
  538. package/dist/storage/index.js.map +7 -1
  539. package/dist/storage/input-history-store.d.ts +56 -0
  540. package/dist/storage/input-history-store.d.ts.map +1 -0
  541. package/dist/storage/memory-backend.d.ts +66 -0
  542. package/dist/storage/memory-backend.d.ts.map +1 -0
  543. package/dist/storage/memory-consolidator.d.ts +50 -0
  544. package/dist/storage/memory-consolidator.d.ts.map +1 -0
  545. package/dist/storage/memory-graph-backend.d.ts +117 -0
  546. package/dist/storage/memory-graph-backend.d.ts.map +1 -0
  547. package/dist/storage/memory-store.d.ts +119 -0
  548. package/dist/storage/memory-store.d.ts.map +1 -0
  549. package/dist/storage/plan-store.d.ts +78 -0
  550. package/dist/storage/plan-store.d.ts.map +1 -0
  551. package/dist/storage/plan-templates.d.ts +21 -0
  552. package/dist/storage/plan-templates.d.ts.map +1 -0
  553. package/dist/storage/prompt-store.d.ts +37 -0
  554. package/dist/storage/prompt-store.d.ts.map +1 -0
  555. package/dist/storage/prompt-usage-store.d.ts +29 -0
  556. package/dist/storage/prompt-usage-store.d.ts.map +1 -0
  557. package/dist/storage/provider-config-watcher.d.ts +34 -0
  558. package/dist/storage/provider-config-watcher.d.ts.map +1 -0
  559. package/dist/storage/queue-store.d.ts +41 -0
  560. package/dist/storage/queue-store.d.ts.map +1 -0
  561. package/dist/storage/recovery-lock.d.ts +79 -0
  562. package/dist/storage/recovery-lock.d.ts.map +1 -0
  563. package/dist/storage/replay-log-store.d.ts +97 -0
  564. package/dist/storage/replay-log-store.d.ts.map +1 -0
  565. package/dist/storage/session-analyzer.d.ts +48 -0
  566. package/dist/storage/session-analyzer.d.ts.map +1 -0
  567. package/dist/storage/session-checkpoint-cas.d.ts +37 -0
  568. package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
  569. package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
  570. package/dist/storage/session-event-bridge.d.ts.map +1 -0
  571. package/dist/storage/session-helpers.d.ts +9 -0
  572. package/dist/storage/session-helpers.d.ts.map +1 -0
  573. package/dist/storage/session-id.d.ts +18 -0
  574. package/dist/storage/session-id.d.ts.map +1 -0
  575. package/dist/storage/session-reader.d.ts +21 -0
  576. package/dist/storage/session-reader.d.ts.map +1 -0
  577. package/dist/storage/session-recovery.d.ts +93 -0
  578. package/dist/storage/session-recovery.d.ts.map +1 -0
  579. package/dist/storage/session-resume-validation.d.ts +6 -0
  580. package/dist/storage/session-resume-validation.d.ts.map +1 -0
  581. package/dist/storage/session-rewinder.d.ts +21 -0
  582. package/dist/storage/session-rewinder.d.ts.map +1 -0
  583. package/dist/storage/session-store.d.ts +219 -0
  584. package/dist/storage/session-store.d.ts.map +1 -0
  585. package/dist/storage/session-summary.d.ts +12 -0
  586. package/dist/storage/session-summary.d.ts.map +1 -0
  587. package/dist/storage/session-tool-call-ends.d.ts +5 -0
  588. package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
  589. package/dist/storage/storage-concurrency.d.ts +2 -0
  590. package/dist/storage/storage-concurrency.d.ts.map +1 -0
  591. package/dist/storage/task-store.d.ts +33 -0
  592. package/dist/storage/task-store.d.ts.map +1 -0
  593. package/dist/storage/todos-checkpoint.d.ts +39 -0
  594. package/dist/storage/todos-checkpoint.d.ts.map +1 -0
  595. package/dist/storage/tool-audit-log.d.ts +141 -0
  596. package/dist/storage/tool-audit-log.d.ts.map +1 -0
  597. package/dist/tasking/index.d.ts +3 -124
  598. package/dist/tasking/index.d.ts.map +1 -0
  599. package/dist/tasking/index.js +57 -4
  600. package/dist/tasking/index.js.map +7 -1
  601. package/dist/tasking/task-store.d.ts +22 -0
  602. package/dist/tasking/task-store.d.ts.map +1 -0
  603. package/dist/tasking/task-tracker.d.ts +102 -0
  604. package/dist/tasking/task-tracker.d.ts.map +1 -0
  605. package/dist/tools/index.d.ts +2 -59
  606. package/dist/tools/index.d.ts.map +1 -0
  607. package/dist/tools/index.js +93 -14
  608. package/dist/tools/index.js.map +7 -1
  609. package/dist/tools/mcp-control.d.ts +53 -0
  610. package/dist/tools/mcp-control.d.ts.map +1 -0
  611. package/dist/tools/mcp-use.d.ts +24 -0
  612. package/dist/tools/mcp-use.d.ts.map +1 -0
  613. package/dist/types/agent-bridge.d.ts +42 -0
  614. package/dist/types/agent-bridge.d.ts.map +1 -0
  615. package/dist/types/attachment.d.ts +54 -0
  616. package/dist/types/attachment.d.ts.map +1 -0
  617. package/dist/types/autonomy.d.ts +5 -0
  618. package/dist/types/autonomy.d.ts.map +1 -0
  619. package/dist/types/blocks.d.ts +76 -0
  620. package/dist/types/blocks.d.ts.map +1 -0
  621. package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
  622. package/dist/types/compactor.d.ts.map +1 -0
  623. package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +344 -355
  624. package/dist/types/config.d.ts.map +1 -0
  625. package/dist/types/context-evidence.d.ts +68 -0
  626. package/dist/types/context-evidence.d.ts.map +1 -0
  627. package/dist/types/context-window.d.ts +35 -0
  628. package/dist/types/context-window.d.ts.map +1 -0
  629. package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
  630. package/dist/types/default-config.d.ts.map +1 -0
  631. package/dist/types/design-kit.d.ts +91 -0
  632. package/dist/types/design-kit.d.ts.map +1 -0
  633. package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
  634. package/dist/types/error-handler.d.ts.map +1 -0
  635. package/dist/types/errors.d.ts +277 -0
  636. package/dist/types/errors.d.ts.map +1 -0
  637. package/dist/types/hooks.d.ts +167 -0
  638. package/dist/types/hooks.d.ts.map +1 -0
  639. package/dist/types/index.d.ts +40 -244
  640. package/dist/types/index.d.ts.map +1 -0
  641. package/dist/types/index.js +101 -12
  642. package/dist/types/index.js.map +7 -1
  643. package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
  644. package/dist/types/input-reader.d.ts.map +1 -0
  645. package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
  646. package/dist/types/logger.d.ts.map +1 -0
  647. package/dist/types/memory.d.ts +89 -0
  648. package/dist/types/memory.d.ts.map +1 -0
  649. package/dist/types/messages.d.ts +24 -0
  650. package/dist/types/messages.d.ts.map +1 -0
  651. package/dist/types/mode-prompts.d.ts +2 -0
  652. package/dist/types/mode-prompts.d.ts.map +1 -0
  653. package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
  654. package/dist/types/mode.d.ts.map +1 -0
  655. package/dist/types/models-registry.d.ts +105 -0
  656. package/dist/types/models-registry.d.ts.map +1 -0
  657. package/dist/types/multi-agent.d.ts +443 -0
  658. package/dist/types/multi-agent.d.ts.map +1 -0
  659. package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +17 -13
  660. package/dist/types/observability.d.ts.map +1 -0
  661. package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
  662. package/dist/types/path-resolver.d.ts.map +1 -0
  663. package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
  664. package/dist/types/permission.d.ts.map +1 -0
  665. package/dist/types/plugin.d.ts +385 -0
  666. package/dist/types/plugin.d.ts.map +1 -0
  667. package/dist/types/prompt-registry.d.ts +81 -0
  668. package/dist/types/prompt-registry.d.ts.map +1 -0
  669. package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
  670. package/dist/types/prompt.d.ts.map +1 -0
  671. package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
  672. package/dist/types/provider-runner.d.ts.map +1 -0
  673. package/dist/types/provider.d.ts +387 -0
  674. package/dist/types/provider.d.ts.map +1 -0
  675. package/dist/types/renderer.d.ts +23 -0
  676. package/dist/types/renderer.d.ts.map +1 -0
  677. package/dist/types/retry-policy.d.ts +7 -0
  678. package/dist/types/retry-policy.d.ts.map +1 -0
  679. package/dist/types/secret-scrubber.d.ts +5 -0
  680. package/dist/types/secret-scrubber.d.ts.map +1 -0
  681. package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
  682. package/dist/types/secret-vault.d.ts.map +1 -0
  683. package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
  684. package/dist/types/selector.d.ts.map +1 -0
  685. package/dist/types/session-reader.d.ts +81 -0
  686. package/dist/types/session-reader.d.ts.map +1 -0
  687. package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
  688. package/dist/types/session-rewinder.d.ts.map +1 -0
  689. package/dist/types/session.d.ts +650 -0
  690. package/dist/types/session.d.ts.map +1 -0
  691. package/dist/types/side-effect.d.ts +34 -0
  692. package/dist/types/side-effect.d.ts.map +1 -0
  693. package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
  694. package/dist/types/skill.d.ts.map +1 -0
  695. package/dist/types/slash-command.d.ts +59 -0
  696. package/dist/types/slash-command.d.ts.map +1 -0
  697. package/dist/types/spec.d.ts +77 -0
  698. package/dist/types/spec.d.ts.map +1 -0
  699. package/dist/types/system-prompt-contributor.d.ts +20 -0
  700. package/dist/types/system-prompt-contributor.d.ts.map +1 -0
  701. package/dist/types/system-prompt.d.ts +51 -0
  702. package/dist/types/system-prompt.d.ts.map +1 -0
  703. package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
  704. package/dist/types/task-graph.d.ts.map +1 -0
  705. package/dist/types/token-counter.d.ts +42 -0
  706. package/dist/types/token-counter.d.ts.map +1 -0
  707. package/dist/types/tool-executor.d.ts +133 -0
  708. package/dist/types/tool-executor.d.ts.map +1 -0
  709. package/dist/types/tool-markers.d.ts +23 -0
  710. package/dist/types/tool-markers.d.ts.map +1 -0
  711. package/dist/types/tool.d.ts +252 -0
  712. package/dist/types/tool.d.ts.map +1 -0
  713. package/dist/types/utility-types.d.ts +31 -0
  714. package/dist/types/utility-types.d.ts.map +1 -0
  715. package/dist/utils/assert-never.d.ts +14 -0
  716. package/dist/utils/assert-never.d.ts.map +1 -0
  717. package/dist/utils/atomic-write.d.ts +12 -0
  718. package/dist/utils/atomic-write.d.ts.map +1 -0
  719. package/dist/utils/child-env.d.ts +67 -0
  720. package/dist/utils/child-env.d.ts.map +1 -0
  721. package/dist/utils/color.d.ts +20 -0
  722. package/dist/utils/color.d.ts.map +1 -0
  723. package/dist/utils/config-json.d.ts +14 -0
  724. package/dist/utils/config-json.d.ts.map +1 -0
  725. package/dist/utils/context-evidence.d.ts +47 -0
  726. package/dist/utils/context-evidence.d.ts.map +1 -0
  727. package/dist/utils/deep-merge.d.ts +64 -0
  728. package/dist/utils/deep-merge.d.ts.map +1 -0
  729. package/dist/utils/diff.d.ts +11 -0
  730. package/dist/utils/diff.d.ts.map +1 -0
  731. package/dist/utils/error.d.ts +2 -3
  732. package/dist/utils/error.d.ts.map +1 -0
  733. package/dist/utils/error.js +3 -3
  734. package/dist/utils/error.js.map +7 -1
  735. package/dist/utils/expect-defined.d.ts +2 -3
  736. package/dist/utils/expect-defined.d.ts.map +1 -0
  737. package/dist/utils/expect-defined.js +3 -3
  738. package/dist/utils/expect-defined.js.map +7 -1
  739. package/dist/utils/glob-expand.d.ts +10 -0
  740. package/dist/utils/glob-expand.d.ts.map +1 -0
  741. package/dist/utils/glob-match.d.ts +4 -0
  742. package/dist/utils/glob-match.d.ts.map +1 -0
  743. package/dist/utils/incoming-images.d.ts +39 -0
  744. package/dist/utils/incoming-images.d.ts.map +1 -0
  745. package/dist/utils/index.d.ts +38 -920
  746. package/dist/utils/index.d.ts.map +1 -0
  747. package/dist/utils/index.js +323 -36
  748. package/dist/utils/index.js.map +7 -1
  749. package/dist/utils/instruction-file.d.ts +3 -0
  750. package/dist/utils/instruction-file.d.ts.map +1 -0
  751. package/dist/utils/ip-guard.d.ts +34 -0
  752. package/dist/utils/ip-guard.d.ts.map +1 -0
  753. package/dist/utils/json-repair.d.ts +23 -0
  754. package/dist/utils/json-repair.d.ts.map +1 -0
  755. package/dist/utils/json-schema-validate.d.ts +42 -0
  756. package/dist/utils/json-schema-validate.d.ts.map +1 -0
  757. package/dist/utils/lru-cache.d.ts +29 -0
  758. package/dist/utils/lru-cache.d.ts.map +1 -0
  759. package/dist/utils/merge-custom-models.d.ts +12 -0
  760. package/dist/utils/merge-custom-models.d.ts.map +1 -0
  761. package/dist/utils/merge-models-payload.d.ts +20 -0
  762. package/dist/utils/merge-models-payload.d.ts.map +1 -0
  763. package/dist/utils/message-invariants.d.ts +22 -0
  764. package/dist/utils/message-invariants.d.ts.map +1 -0
  765. package/dist/utils/newline-normalize.d.ts +5 -0
  766. package/dist/utils/newline-normalize.d.ts.map +1 -0
  767. package/dist/utils/regex-guard.d.ts +21 -0
  768. package/dist/utils/regex-guard.d.ts.map +1 -0
  769. package/dist/utils/safe-json.d.ts +31 -0
  770. package/dist/utils/safe-json.d.ts.map +1 -0
  771. package/dist/utils/session-scoped-path.d.ts +13 -0
  772. package/dist/utils/session-scoped-path.d.ts.map +1 -0
  773. package/dist/utils/sleep.d.ts +5 -0
  774. package/dist/utils/sleep.d.ts.map +1 -0
  775. package/dist/utils/slug.d.ts +13 -0
  776. package/dist/utils/slug.d.ts.map +1 -0
  777. package/dist/utils/string.d.ts +9 -0
  778. package/dist/utils/string.d.ts.map +1 -0
  779. package/dist/utils/task-format.d.ts +22 -0
  780. package/dist/utils/task-format.d.ts.map +1 -0
  781. package/dist/utils/term.d.ts +133 -0
  782. package/dist/utils/term.d.ts.map +1 -0
  783. package/dist/utils/todos-format.d.ts +30 -0
  784. package/dist/utils/todos-format.d.ts.map +1 -0
  785. package/dist/utils/token-estimate.d.ts +112 -0
  786. package/dist/utils/token-estimate.d.ts.map +1 -0
  787. package/dist/utils/tool-description-mode.d.ts +28 -0
  788. package/dist/utils/tool-description-mode.d.ts.map +1 -0
  789. package/dist/utils/tool-output-serializer.d.ts +40 -0
  790. package/dist/utils/tool-output-serializer.d.ts.map +1 -0
  791. package/dist/utils/tool-result-render-mode.d.ts +55 -0
  792. package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
  793. package/dist/utils/tool-subject.d.ts +5 -0
  794. package/dist/utils/tool-subject.d.ts.map +1 -0
  795. package/dist/utils/tool-wire-compact.d.ts +28 -0
  796. package/dist/utils/tool-wire-compact.d.ts.map +1 -0
  797. package/dist/utils/ulid.d.ts +11 -0
  798. package/dist/utils/ulid.d.ts.map +1 -0
  799. package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
  800. package/dist/utils/wstack-paths.d.ts.map +1 -0
  801. package/dist/worktree/index.d.ts +2 -0
  802. package/dist/worktree/index.d.ts.map +1 -0
  803. package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +32 -17
  804. package/dist/worktree/worktree-manager.d.ts.map +1 -0
  805. package/instructions/agents/browser.md +25 -16
  806. package/instructions/autonomy/active-mission.md +2 -4
  807. package/instructions/coordination/subagent-baseline.md +16 -2
  808. package/instructions/leader-after-task.md +3 -1
  809. package/instructions/sections/tool/common-patterns.md +7 -1
  810. package/instructions/sections/tool/delegation-full.md +1 -1
  811. package/instructions/system.md +47 -0
  812. package/package.json +4 -5
  813. package/skills/docker-deploy/SKILL.md +1 -1
  814. package/skills/node-modern/SKILL.md +2 -2
  815. package/skills/plugin-author/SKILL.md +9 -16
  816. package/skills/wrongstack-mailbox/SKILL.md +51 -12
  817. package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
  818. package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
  819. package/dist/index--Gm41aBJ.d.ts +0 -671
  820. package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
  821. package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
  822. package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
  823. package/dist/pipeline-DGDyIohT.d.ts +0 -331
  824. package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
  825. package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
  826. package/dist/secret-vault-DxohkUBc.d.ts +0 -272
  827. package/dist/session-reader-7Esxrkpw.d.ts +0 -155
  828. package/dist/task-format-GX0B1mMC.d.ts +0 -23
  829. package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
  830. package/dist/tool-BNlnIJvo.d.ts +0 -2190
  831. package/dist/tool-executor-CckSCM5E.d.ts +0 -906
@@ -0,0 +1,295 @@
1
+ /**
2
+ * GlobalMailbox — project-level inter-agent mailbox with cross-session support.
3
+ *
4
+ * Stores messages at `~/.wrongstack/projects/<slug>/_mailbox.jsonl` so all
5
+ * sessions (terminals, WebUIs) working on the same project share one inbox.
6
+ *
7
+ * Features:
8
+ * - Agent registration + heartbeat (agents go stale after 60s without heartbeat)
9
+ * - Per-recipient read receipts (readBy[agentId] = ISO8601)
10
+ * - Atomic file-locking for concurrent multi-process writes
11
+ * - Unread count for new-mail notifications
12
+ * - Online agent list
13
+ *
14
+ * @module GlobalMailbox
15
+ */
16
+ import type { HqPublisher } from '../hq/publisher.js';
17
+ import type { EventBus } from '../kernel/events.js';
18
+ import type { MailboxEventEmitter } from './mailbox-events.js';
19
+ import type { AgentHeartbeatInput, AgentRegistrationInput, AutoCompactOptions, AutoCompactResult, ClientHeartbeatInput, ClientRegistrationInput, ClientStatus, Mailbox, MailboxAckBatchInput, MailboxAckInput, MailboxAgentStatus, MailboxMessage, MailboxQuery, MailboxSendInput, PurgeOptions, PurgeResult } from './mailbox-types.js';
20
+ type HqPublisherRef = HqPublisher | (() => HqPublisher | undefined);
21
+ /**
22
+ * Derive the project-level mailbox directory path.
23
+ *
24
+ * Delegates to the CANONICAL `projectSlug()` from wstack-paths so every
25
+ * surface (CLI, TUI, WebUI, mailbox tool, loop checker) lands in the exact
26
+ * same `~/.wrongstack/projects/<slug>/` directory. A previous inline copy
27
+ * skipped the leading/trailing-hyphen strip, which silently split agents
28
+ * working on projects with non-alphanumeric name edges into TWO mailboxes.
29
+ *
30
+ * @param projectRoot — absolute path to the project root
31
+ * @param globalRoot — `~/.wrongstack` (or custom global root)
32
+ */
33
+ export declare function resolveProjectDir(projectRoot: string, globalRoot: string): string;
34
+ export declare function getSharedMailbox(projectDir: string, events?: EventBus, hqPublisher?: HqPublisherRef, opts?: {
35
+ forceNew?: boolean;
36
+ }): GlobalMailbox;
37
+ /** Clear the singleton registry — used by tests to avoid cross-test leakage. */
38
+ export declare function _clearMailboxSingletons(): void;
39
+ export declare class GlobalMailbox implements Mailbox {
40
+ /** Path to the JSONL message file. */
41
+ readonly messagePath: string;
42
+ /** Path to the JSON agent registry file. */
43
+ readonly registryPath: string;
44
+ /** Path to the JSON client registry file. */
45
+ readonly clientRegistryPath: string;
46
+ /** Optional event bus for emitting agent registration/heartbeat events. */
47
+ private readonly _events?;
48
+ /** Optional HQ publisher for cross-project command-center telemetry. */
49
+ private readonly _hqPublisher?;
50
+ /**
51
+ * Optional SSE event emitter for real-time push to HTTP bridge clients.
52
+ * When present, `send`/`ack`/`softDelete`/`restore` emit events that
53
+ * connected SSE subscribers receive instantly.
54
+ */
55
+ readonly eventEmitter?: MailboxEventEmitter | undefined;
56
+ /**
57
+ * Local cache of the agent registry to avoid re-reading on every call.
58
+ * Time-bounded: the registry file is shared ACROSS PROCESSES (that's the
59
+ * whole point of GlobalMailbox), so a cache served forever would never see
60
+ * agents registered by other sessions. Writers always bypass it.
61
+ */
62
+ private _registryCache;
63
+ /** When the registry cache was last refreshed from disk (epoch ms). */
64
+ private _registryCacheAt;
65
+ /**
66
+ * Local cache of the client registry to avoid re-reading on every call.
67
+ * Same reasoning as agent registry cache.
68
+ */
69
+ private _clientRegistryCache;
70
+ /** When the client registry cache was last refreshed from disk (epoch ms). */
71
+ private _clientRegistryCacheAt;
72
+ /** Last time each local agent sent a heartbeat (throttle). */
73
+ private _lastHeartbeat;
74
+ /** Last time each local client sent a heartbeat (throttle). */
75
+ private _lastClientHeartbeat;
76
+ /**
77
+ * In-memory mirror of the JSONL message file. The mailbox is shared
78
+ * ACROSS PROCESSES, so reads cannot trust the cache blindly — we pair it
79
+ * with an mtime check. The file lock serializes every write, so a
80
+ * changed mtimeMs is a definitive signal that another process (or this
81
+ * one) wrote; an unchanged mtimeMs guarantees no write happened and the
82
+ * cache is current. This collapses the per-iteration `query()` cost from
83
+ * O(file_size) disk + parse to O(messages) in memory.
84
+ */
85
+ private _messageCache;
86
+ /** mtimeMs of the file when `_messageCache` was populated. */
87
+ private _messageCacheMtime;
88
+ /** Size of the file when `_messageCache` was populated (extra guard). */
89
+ private _messageCacheSize;
90
+ /**
91
+ * Serializes reads of the message file so overlapping concurrent
92
+ * `_readMessagesCached()` calls don't both enter the incremental "file
93
+ * only grew" branch against the same stale `_messageCacheSize` and
94
+ * each push the same tail bytes onto the cache (duplicating every
95
+ * appended message). The chain runs each read to completion before
96
+ * the next starts, in issue order — readers are read-only and never
97
+ * conflict with each other on content, only on the cache mutation
98
+ * that follows the read. Pattern mirrors `DefaultMemoryStore.runSerialized`.
99
+ */
100
+ private _readChain;
101
+ /**
102
+ * Recipient → Set of indices into `_messageCache`. Maintained alongside
103
+ * the cache so `query({ to })` and `unreadCount(agentId)` can skip the
104
+ * O(N) full scan and iterate only the messages addressed to the target
105
+ * recipient (plus broadcasts `*`).
106
+ *
107
+ * The index is rebuilt whenever the cache array is replaced
108
+ * (`_setMessageCache`), extended when new messages are pushed
109
+ * (`_pushToCache`, `_readNewMessagesOnly`), and cleared on `close()`.
110
+ * It is `null` when the cache itself is null (> MESSAGE_CACHE_MAX_ENTRIES
111
+ * or never populated).
112
+ *
113
+ * Safety: array indices are valid only as long as the cache array
114
+ * reference hasn't changed. Since we rebuild the index in the same
115
+ * synchronous step that replaces the cache, a reader that calls
116
+ * `_readMessagesCached()` either gets the old array + old index, or
117
+ * the new array + new index — never a mismatch.
118
+ */
119
+ private _recipientIndex;
120
+ /**
121
+ * Sender → Set of indices into `_messageCache`. Same lifecycle and
122
+ * safety properties as `_recipientIndex`, but keyed on `msg.from`
123
+ * so `query({ from })` can skip the full scan.
124
+ */
125
+ private _senderIndex;
126
+ /**
127
+ * @param projectDir — `~/.wrongstack/projects/<slug>/`
128
+ * @param events — optional EventBus for real-time TUI/WebUI notifications
129
+ * @param hqPublisher — optional HQ publisher, or getter, for cross-project telemetry
130
+ * @param eventEmitter — optional SSE event emitter for HTTP bridge push
131
+ */
132
+ constructor(projectDir: string, events?: EventBus, hqPublisher?: HqPublisherRef, eventEmitter?: MailboxEventEmitter);
133
+ private get hqMailboxId();
134
+ private get hqPublisher();
135
+ private publishHqMailboxEvent;
136
+ private publishHqMailboxSnapshot;
137
+ send(input: MailboxSendInput): Promise<MailboxMessage>;
138
+ query(q: MailboxQuery): Promise<MailboxMessage[]>;
139
+ ack(input: MailboxAckInput): Promise<MailboxMessage | null>;
140
+ ackMany(input: MailboxAckBatchInput): Promise<MailboxMessage[]>;
141
+ unreadCount(forAgentId: string): Promise<number>;
142
+ softDelete(mailId: string, by: string): Promise<MailboxMessage | null>;
143
+ restore(mailId: string): Promise<MailboxMessage | null>;
144
+ registerAgent(input: AgentRegistrationInput): Promise<void>;
145
+ deregisterAgent(agentId: string): Promise<void>;
146
+ heartbeat(input: AgentHeartbeatInput): Promise<void>;
147
+ getAgentStatuses(): Promise<MailboxAgentStatus[]>;
148
+ getOnlineAgents(): Promise<MailboxAgentStatus[]>;
149
+ registerClient(input: ClientRegistrationInput): Promise<void>;
150
+ deregisterClient(clientId: string): Promise<void>;
151
+ clientHeartbeat(input: ClientHeartbeatInput): Promise<void>;
152
+ getClientStatuses(): Promise<ClientStatus[]>;
153
+ /**
154
+ * Explicitly purge stale clients from the registry and write back to disk.
155
+ * Removes client entries whose lastSeenAt is older than CLIENT_STALE_MS.
156
+ * Returns the number of entries purged.
157
+ *
158
+ * Idempotent — safe to call regularly. The same pruning runs implicitly
159
+ * inside registerClient, clientHeartbeat, and getClientStatuses, but if
160
+ * no client registers or heartbeats for a long time, this public method
161
+ * ensures the file gets cleaned up on demand.
162
+ */
163
+ purgeClients(): Promise<number>;
164
+ close(): Promise<void>;
165
+ clearAll(): Promise<void>;
166
+ purgeStale(opts?: PurgeOptions): Promise<PurgeResult>;
167
+ private _autoCompactTimer;
168
+ autoCompact(opts?: AutoCompactOptions): Promise<AutoCompactResult>;
169
+ startAutoCompactTimer(opts?: AutoCompactOptions): () => void;
170
+ /**
171
+ * Read all messages from the JSONL file. Always reads + parses the file.
172
+ * Callers that can tolerate a stale-by-mtime view should use
173
+ * {@link _readMessagesCached}; writers that need the post-lock truth
174
+ * should call this directly (it's what {@link _readMessagesFresh} aliases).
175
+ */
176
+ private _readMessages;
177
+ /**
178
+ * Read only newly-appended bytes from the file and append them to the
179
+ * in-memory cache. This avoids re-reading and re-parsing the entire file
180
+ * when another process appended messages since our last read.
181
+ *
182
+ * Only safe when the file grew in size (messages are append-only). When
183
+ * the file was rewritten (ack/purge changed existing content), callers
184
+ * must fall back to {@link _readMessages}.
185
+ *
186
+ * @returns The (now up-to-date) message cache.
187
+ */
188
+ private _readNewMessagesOnly;
189
+ private _appendIncrementalLines;
190
+ private _parseLine;
191
+ /** Parse a JSONL string into MailboxMessage[], including migration. */
192
+ private _parseLines;
193
+ /**
194
+ * Read messages, then adopt the result as the in-memory cache. Use this
195
+ * from writers that just took the file lock — the read reflects the
196
+ * authoritative post-lock state and should be served to subsequent
197
+ * queries without re-reading.
198
+ *
199
+ * The mtime/size are captured from the stat at read time so the cache
200
+ * trackers match exactly what was parsed. Writers that subsequently
201
+ * rewrite the file MUST re-stat after the write and re-promote with the
202
+ * post-write values (see ackMany / softDelete / restore / purgeStale /
203
+ * clearAll) — otherwise a concurrent reader misclassifies the rewrite
204
+ * as a "file only grew" append and corrupts the cache.
205
+ */
206
+ private _readMessagesFresh;
207
+ /**
208
+ * Stat the message file, returning its mtimeMs and size. Returns
209
+ * `-1/-1` when the file does not yet exist (ENOENT) so callers can
210
+ * still promote a cache snapshot — the next read will re-stat and
211
+ * fall through to a full re-read. Call from inside the file lock so
212
+ * the result reflects the post-write on-disk state, not a later
213
+ * intermediate state from another process.
214
+ */
215
+ private _statMessageFile;
216
+ /**
217
+ * Read messages, consulting the mtime-bounded in-memory cache first,
218
+ * serialized so concurrent callers don't both mutate the cache.
219
+ *
220
+ * The mailbox file is shared across processes; every `send`/`ack`/
221
+ * `clearAll`/`purgeStale` takes the file lock, so writes are serialized
222
+ * and a changed mtimeMs is a definitive freshness signal. When the
223
+ * stat matches the cached mtime+size we return the cached array — no
224
+ * file read and no JSON.parse — collapsing the per-iteration query
225
+ * cost on the mailbox-loop hot path.
226
+ *
227
+ * When the file only grew (new messages appended by another process),
228
+ * we read and parse just the tail bytes instead of the entire file.
229
+ * This avoids re-parsing the full 10K-message history on every check.
230
+ *
231
+ * SERIALIZATION: the actual work is chained onto `_readChain` so two
232
+ * overlapping calls can't both pass the `st.size > _messageCacheSize`
233
+ * incremental check against the same stale tracker and each push the
234
+ * same tail bytes onto the cache (duplicating every appended message).
235
+ * Readers don't conflict on file content — only on the cache mutation
236
+ * that follows the read — so we run them one at a time in issue order.
237
+ * Errors in the chain are swallowed so a failed read never poisons
238
+ * subsequent reads; each caller observes and re-throws its own error.
239
+ */
240
+ private _readMessagesCached;
241
+ /**
242
+ * The un-serialized body of {@link _readMessagesCached}. Reads the
243
+ * message file with the mtime-bounded cache + incremental-tail
244
+ * optimization. Must only be called from `_readMessagesCached` so the
245
+ * cache mutations here don't race a sibling read.
246
+ */
247
+ private _readMessagesCachedWork;
248
+ /**
249
+ * Replace the in-memory cache, setting the mtime/size trackers
250
+ * synchronously in the same step. Callers MUST pass the stat of the
251
+ * on-disk file state that produced `messages`.
252
+ *
253
+ * Why both are required (not fire-and-forget): `_readMessagesCached()`
254
+ * validates the cache against a fresh stat using these two trackers.
255
+ * If the cache array is updated but the trackers lag behind (e.g. via
256
+ * a deferred `stat().then(...)`), a concurrent reader landing in that
257
+ * window sees a mismatched mtime and falls into the incremental
258
+ * "file only grew" branch — parsing rewritten bytes as an appended
259
+ * tail and corrupting the cache with duplicates/garbage. So both
260
+ * values are captured under the file lock and applied synchronously
261
+ * here, matching the fix already shipped in DefaultMailbox.
262
+ */
263
+ private _setMessageCache;
264
+ /**
265
+ * Build the recipient AND sender indexes from the current `_messageCache`.
266
+ * Called only from `_setMessageCache` so both indexes are always in sync
267
+ * with a freshly-replaced cache array.
268
+ */
269
+ private _rebuildRecipientIndex;
270
+ /**
271
+ * Append a single just-sent message to the in-memory cache without
272
+ * re-reading the file. The caller must hold the file lock (or have
273
+ * just released it after a successful append) and MUST pass the
274
+ * post-append stat so the mtime/size trackers advance in lock-step
275
+ * with the pushed content.
276
+ *
277
+ * Why the stat is required here: without it, `_messageCacheSize`
278
+ * stays at the pre-append value. A concurrent `_readMessagesCached()`
279
+ * then sees `st.size > _messageCacheSize` (the file did grow), takes
280
+ * the incremental branch, and re-reads the just-appended tail —
281
+ * pushing the same message onto the cache a second time. Setting the
282
+ * trackers here closes that window for the local-process append path.
283
+ */
284
+ private _pushToCache;
285
+ private _ensureRegistry;
286
+ private _readRegistry;
287
+ private _pruneStaleInPlace;
288
+ private _writeRegistry;
289
+ private _ensureClientRegistry;
290
+ private _readClientRegistry;
291
+ private _pruneStaleClientsInPlace;
292
+ private _writeClientRegistry;
293
+ }
294
+ export {};
295
+ //# sourceMappingURL=global-mailbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-mailbox.d.ts","sourceRoot":"","sources":["../../src/coordination/global-mailbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAcpD,OAAO,KAAK,EAAE,mBAA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KG;YACW,aAAa;IAU3B;;;;;;;;;;OAUG;YACW,oBAAoB;IA2ClC,OAAO,CAAC,uBAAuB;IA0B/B,OAAO,CAAC,UAAU;IAQlB,uEAAuE;IACvE,OAAO,CAAC,WAAW;IAUnB;;;;;;;;;;;;OAYG;YACW,kBAAkB;IAOhC;;;;;;;OAOG;YACW,gBAAgB;IAY9B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;;;;OAKG;YACW,uBAAuB;IA6CrC;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,gBAAgB;IAmBxB;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IA4B9B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,YAAY;YAyCN,eAAe;YAIf,aAAa;IAmC3B,OAAO,CAAC,kBAAkB;YAaZ,cAAc;YAYd,qBAAqB;YAIrB,mBAAmB;IAgCjC,OAAO,CAAC,yBAAyB;YAUnB,oBAAoB;CASnC"}
@@ -0,0 +1,97 @@
1
+ import type { SubagentConfig } from '../types/multi-agent.js';
2
+ import type { TaskSpec, TaskResult, CoordinatorStatus } from '../types/multi-agent.js';
3
+ export type { TaskSpec, TaskResult } from '../types/multi-agent.js';
4
+ /**
5
+ * Interface for a fleet coordinator. Implemented by both `Director`
6
+ * (full LLM-driven orchestration with fleet policy) and
7
+ * `DefaultMultiAgentCoordinator` (direct API-driven, no fleet policy).
8
+ *
9
+ * External callers — CLI slash commands, tests, the delegate tool —
10
+ * use this to stay agnostic to the orchestration mode.
11
+ *
12
+ * The interface captures the **orchestration contract**: spawn, assign,
13
+ * terminate, await, and query. Fleet-level policy (cost caps, manifest
14
+ * writing, checkpointing) lives behind this surface and is optional
15
+ * from the caller's perspective.
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * let coordinator: ICoordinator = isDirectorMode
20
+ * ? new Director({ config, ... })
21
+ * : new DefaultMultiAgentCoordinator(config);
22
+ * const id = await coordinator.spawn({ name: 'worker', role: 'researcher' });
23
+ * await coordinator.assign({ id: 't-1', description: 'research X', subagentId: id });
24
+ * const results = await coordinator.awaitTasks(['t-1']);
25
+ * ```
26
+ */
27
+ export interface ICoordinator {
28
+ /** Stable identifier for this coordinator instance. */
29
+ readonly coordinatorId: string;
30
+ /**
31
+ * Spawn a new subagent and return its id. In director mode this
32
+ * enforces fleet-wide spawn caps and cost limits; in raw coordinator
33
+ * mode it is a direct pass-through.
34
+ */
35
+ spawn(config: SubagentConfig): Promise<string>;
36
+ /**
37
+ * Assign a task to a subagent (or to the fleet for auto-routing).
38
+ * Returns the assigned task id.
39
+ */
40
+ assign(task: {
41
+ id: string;
42
+ description: string;
43
+ subagentId?: string | undefined;
44
+ }): Promise<string>;
45
+ /**
46
+ * Synchronously ask a subagent something via the in-memory bridge.
47
+ * The subagent must have been spawned and must handle `bridge.subscribe()`
48
+ * in its task loop. Returns the reply payload or throws on timeout.
49
+ *
50
+ * Only available in director mode — raw coordinator has no bridge.
51
+ */
52
+ ask<T = unknown>(subagentId: string, payload: unknown, timeoutMs?: number): Promise<T> | undefined;
53
+ /**
54
+ * Wait for one or more tasks to complete and return their results.
55
+ * If a task is already done when called, returns immediately.
56
+ * Resolves to an array in the same order as `taskIds`.
57
+ */
58
+ awaitTasks(taskIds: string[]): Promise<TaskResult[]>;
59
+ /**
60
+ * Gracefully stop a single subagent. The subagent finishes its current
61
+ * in-flight work and exits cleanly — it does not hard-kill.
62
+ */
63
+ terminate(subagentId: string): Promise<void>;
64
+ /**
65
+ * Stop all subagents. In-flight tasks are allowed to complete;
66
+ * no new tasks are dispatched.
67
+ */
68
+ terminateAll(): Promise<void>;
69
+ /**
70
+ * Stop a subagent and remove it from the coordinator. Releases all
71
+ * associated resources (AbortController, budget state). The subagent
72
+ * entry is deleted so the id can be reused in a future spawn.
73
+ */
74
+ remove(subagentId: string): Promise<void>;
75
+ /**
76
+ * Live coordinator status — subagent list, pending task count,
77
+ * completed task count, iteration totals.
78
+ */
79
+ status(): CoordinatorStatus;
80
+ /**
81
+ * Snapshot of completed task results. In director mode this returns
82
+ * every `TaskResult` from the fleet; in raw coordinator mode this
83
+ * may return an empty array if the coordinator doesn't cache results.
84
+ */
85
+ completedResults(): TaskResult[];
86
+ /**
87
+ * Subscribe to coordinator lifecycle events. Currently supports
88
+ * `task.completed` — the payload carries the task spec and result.
89
+ *
90
+ * Returns a disposer function; call it to unsubscribe.
91
+ */
92
+ on(event: 'task.completed', handler: (payload: {
93
+ task: TaskSpec;
94
+ result: TaskResult;
95
+ }) => void): () => void;
96
+ }
97
+ //# sourceMappingURL=icoordinator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icoordinator.d.ts","sourceRoot":"","sources":["../../src/coordination/icoordinator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACvF,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B;;;;OAIG;IACH,KAAK,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/C;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEpG;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAEnG;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAErD;;;OAGG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B;;;;OAIG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1C;;;OAGG;IACH,MAAM,IAAI,iBAAiB,CAAC;IAE5B;;;;OAIG;IACH,gBAAgB,IAAI,UAAU,EAAE,CAAC;IAEjC;;;;;OAKG;IACH,EAAE,CACA,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,GACjE,MAAM,IAAI,CAAC;CACf"}
@@ -0,0 +1,177 @@
1
+ import type { SubagentConfig } from '../types/multi-agent.js';
2
+ import type { FleetBus, FleetUsage } from './fleet-bus.js';
3
+ import type { WorktreeTaskStateUpdate } from './worktree-task-runner.js';
4
+ /**
5
+ * Interface for fleet-level lifecycle and policy. Covers:
6
+ * - Spawn lifecycle hooks (canSpawn check, recordSpawn after-effects)
7
+ * - Budget enforcement (fleet-wide cost cap, spawn count/depth caps)
8
+ * - Fleet manifest assembly and writing
9
+ * - Subagent metadata and usage tracking
10
+ *
11
+ * `FleetBus` is pure event fan-out and implements no policy.
12
+ * `FleetManager` encapsulates all fleet-level policy decisions.
13
+ * `Director` currently owns all of this — this interface lets us
14
+ * extract it into a swappable component in Phase 5.
15
+ */
16
+ export interface IFleetManager {
17
+ /** The FleetBus this manager publishes lifecycle events to. */
18
+ readonly fleetBus: FleetBus;
19
+ /**
20
+ * Snapshot of fleet-wide token usage and cost rollup.
21
+ * Safe to call from a tool's execute() body.
22
+ */
23
+ snapshot(): FleetUsage;
24
+ /**
25
+ * Per-subagent metadata captured at spawn time (provider/model/name).
26
+ * Returns undefined if the subagent is not known to this manager.
27
+ */
28
+ getSubagentMeta(id: string): {
29
+ provider?: string | undefined;
30
+ model?: string | undefined;
31
+ name?: string | undefined;
32
+ } | undefined;
33
+ /**
34
+ * Called before a spawn is recorded. Returns a reason string if the
35
+ * spawn should be rejected (budget cap, depth limit, cost cap, context
36
+ * overload, etc.), or null to proceed. Director.spawn() calls this
37
+ * internally.
38
+ */
39
+ canSpawn(config: SubagentConfig): {
40
+ kind: 'max_spawns' | 'max_spawn_depth' | 'max_cost_usd' | 'max_tokens' | 'max_context_load';
41
+ limit: number;
42
+ observed: number;
43
+ } | null;
44
+ /** Current fleet-wide token/cost ceiling and remaining headroom. */
45
+ budgetSnapshot?: (() => {
46
+ maxSpawns: number;
47
+ usedSpawns: number;
48
+ remainingSpawns: number;
49
+ maxTokens: number;
50
+ usedTokens: number;
51
+ remainingTokens: number;
52
+ maxCostUsd: number;
53
+ usedCostUsd: number;
54
+ remainingCostUsd: number;
55
+ }) | undefined;
56
+ /**
57
+ * Update the leader agent's current context pressure (tokens used in the
58
+ * full API request: messages + systemPrompt + toolDefs). The fleet manager
59
+ * checks this before allowing a new spawn to prevent the leader from
60
+ * overflowing its context window while orchestrating subagents.
61
+ */
62
+ setLeaderContextPressure(tokens: number): void;
63
+ /**
64
+ * Assign a memorable nickname (e.g. "Einstein (Bug Hunter)") and mark it
65
+ * as used so it is never reused. The nickname is written back to `config.name`
66
+ * so the coordinator and manifest both see the human-readable name.
67
+ *
68
+ * NOTE: This only assigns the nickname. The caller MUST call `recordSpawn`
69
+ * after `coordinator.spawn()` returns with the real subagentId.
70
+ *
71
+ * Returns the assigned nickname string.
72
+ */
73
+ assignNicknameAndRecord(config: SubagentConfig): string;
74
+ /**
75
+ * Readonly view of already-assigned nickname keys. Used by `Director.spawn()`
76
+ * to avoid assigning the same nickname twice across the fleet.
77
+ */
78
+ readonly usedNicknames: ReadonlySet<string>;
79
+ /**
80
+ * Called after a spawn succeeds. Records metadata for the usage
81
+ * aggregator and manifest.
82
+ *
83
+ * @param priceLookup Per-token rate lookup for cost calculation.
84
+ * When omitted the cost column in usage snapshots stays at 0.
85
+ */
86
+ recordSpawn(subagentId: string, config: SubagentConfig, priceLookup?: Record<string, number>): void;
87
+ /**
88
+ * Write the fleet manifest to disk. Returns the path written
89
+ * or null when no manifest path is configured.
90
+ */
91
+ writeManifest(): Promise<string | null>;
92
+ /**
93
+ * Bypass the debounce timer and write the manifest immediately.
94
+ * Clears any pending debounce timer before writing.
95
+ */
96
+ flushManifest(): Promise<void>;
97
+ /**
98
+ * Aggregate fleet-wide status: pending tasks with descriptions and
99
+ * live subagent snapshot from the coordinator. Used by
100
+ * `MultiAgentHost.status()` to eliminate host-side state duplication.
101
+ */
102
+ getFleetStatus(): {
103
+ pending: {
104
+ taskId: string;
105
+ description: string;
106
+ subagentId: string;
107
+ }[];
108
+ live: {
109
+ subagentId: string;
110
+ status: string;
111
+ task?: string | undefined;
112
+ }[];
113
+ };
114
+ /**
115
+ * Register a pending task with its description. Called by
116
+ * `MultiAgentHost.spawn()` after `_spawnAndAssign()` returns so
117
+ * the description is available in `status()` without host-side storage.
118
+ */
119
+ addPendingTask(taskId: string, subagentId: string, description: string): void;
120
+ /** Record the latest git-worktree lifecycle state for a task. */
121
+ recordTaskWorktree(update: WorktreeTaskStateUpdate): void;
122
+ /**
123
+ * Remove a pending task. Called when the task completes so the
124
+ * pending list stays accurate.
125
+ */
126
+ removePendingTask(taskId: string): void;
127
+ /**
128
+ * Wire the coordinator so `getFleetStats()` can delegate to it.
129
+ * Called by `Director` after constructing the coordinator so
130
+ * FleetManager's stats reflect live subagent data.
131
+ */
132
+ setCoordinator(coordinator: {
133
+ getStats(): {
134
+ total: number;
135
+ running: number;
136
+ idle: number;
137
+ stopped: number;
138
+ inFlight: number;
139
+ pending: number;
140
+ completed: number;
141
+ };
142
+ }): void;
143
+ /**
144
+ * Coordinator stats snapshot for the TUI and monitoring tools.
145
+ * Returns actionable counts (total/running/idle/stopped/inFlight/
146
+ * pending/completed) plus per-subagent status details.
147
+ * Delegates to the coordinator when available; returns zeros
148
+ * if the coordinator has not yet been set.
149
+ */
150
+ getFleetStats(): {
151
+ total: number;
152
+ running: number;
153
+ idle: number;
154
+ stopped: number;
155
+ inFlight: number;
156
+ pending: number;
157
+ completed: number;
158
+ subagentStatuses: {
159
+ subagentId: string;
160
+ taskId: string;
161
+ status: string;
162
+ assigned: boolean;
163
+ }[];
164
+ };
165
+ /**
166
+ * Called when a subagent is removed so the fleet manager can clean up
167
+ * associated state (nickname slots, pending tasks, etc.).
168
+ */
169
+ removeSubagent(subagentId: string): void;
170
+ /**
171
+ * Release all resources held by the fleet manager.
172
+ * Clears any pending manifest debounce timer and disposes the usage aggregator.
173
+ * Call this when the fleet manager is no longer needed (e.g. process shutdown).
174
+ */
175
+ dispose(): void;
176
+ }
177
+ //# sourceMappingURL=ifleet-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ifleet-manager.d.ts","sourceRoot":"","sources":["../../src/coordination/ifleet-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE5B;;;OAGG;IACH,QAAQ,IAAI,UAAU,CAAC;IAEvB;;;OAGG;IACH,eAAe,CACb,EAAE,EAAE,MAAM,GAER;QAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,KA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AO,CAAA;SAAE,EAAE,CAAC;KAC/F,CAAC;IAEF;;;OAGG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;;;OAIG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,12 @@
1
+ import type { BridgeMessage, BridgeTransport } from '../types/agent-bridge.js';
2
+ /**
3
+ * In-memory pub/sub transport for agent-to-agent messaging.
4
+ * Subscribers register by agentId and receive messages via callback.
5
+ */
6
+ export declare class InMemoryBridgeTransport implements BridgeTransport {
7
+ private readonly subs;
8
+ send(msg: BridgeMessage, to: string): Promise<void>;
9
+ subscribe(agentId: string, handler: (msg: BridgeMessage) => void): () => void;
10
+ close(agentId: string): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=in-memory-transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-transport.d.ts","sourceRoot":"","sources":["../../src/coordination/in-memory-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE/E;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,eAAe;IAC7D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwD;IAE7E,IAAI,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BlD;IAED,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,GAAG,MAAM,IAAI,CAI5E;IAED,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGpC;CACF"}