@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,202 @@
1
+ import { EventEmitter } from 'node:events';
2
+ import type { AgentBridge, BridgeMessage } from '../types/agent-bridge.js';
3
+ import type { AwaitAnyResult, CoordinatorStatus, MultiAgentConfig, MultiAgentCoordinator, SpawnResult, SubagentConfig, SubagentRunner, TaskResult, TaskSpec } from '../types/multi-agent.js';
4
+ import { type BudgetSessionIdSource } from './subagent-budget.js';
5
+ export interface MultiAgentCoordinatorOptions {
6
+ /**
7
+ * Callback that executes a task on behalf of a subagent. Required for
8
+ * `assign()` to actually run anything — without it, tasks queue forever.
9
+ * The coordinator provides per-subagent isolation (own budget, own signal,
10
+ * own bridge) and enforces timeout + concurrency.
11
+ */
12
+ runner?: SubagentRunner | undefined;
13
+ /**
14
+ * Session id for EventBus/FleetBus emissions produced by this coordinator.
15
+ * Accepts a getter so a long-lived coordinator follows session resume/new.
16
+ */
17
+ sessionId?: BudgetSessionIdSource | undefined;
18
+ }
19
+ export declare class DefaultMultiAgentCoordinator extends EventEmitter implements MultiAgentCoordinator {
20
+ readonly coordinatorId: string;
21
+ readonly config: MultiAgentConfig;
22
+ private runner?;
23
+ private readonly sessionId;
24
+ private fleetBus?;
25
+ private readonly subagents;
26
+ /**
27
+ * Base nickname keys already handed out this run (e.g. `einstein`, `tesla`).
28
+ * Prevents two workers sharing a name. Direct `coordinator.spawn()` callers
29
+ * (parallel/eternal engine, SDD parallel run) don't go through
30
+ * `Director.spawn()` where nicknames are normally assigned, so the
31
+ * coordinator upgrades placeholder names ("Executor", "slot-ab12cd", role
32
+ * names) to memorable ones here — that's what surfaces in the fleet monitor.
33
+ */
34
+ private readonly usedNicknames;
35
+ /** Maps subagentId → nickname key (e.g. 'einstein'). Used to free the slot on remove(). */
36
+ private readonly subagentNicknames;
37
+ private pendingTasks;
38
+ private completedResults;
39
+ /** Prevents completedResults from growing unbounded in long-running coordinators. */
40
+ private static readonly MAX_COMPLETED_RESULTS;
41
+ private totalIterations;
42
+ private inFlight;
43
+ /**
44
+ * Subagents currently being stopped. Set on entry to `stop()`, cleared
45
+ * once `recordCompletion` lands the terminal TaskResult. Used by
46
+ * `runDispatched` and `findIdleSubagent` to refuse mid-flight dispatch
47
+ * to a subagent the caller has already asked to terminate — closes the
48
+ * assign+terminate race where a fresh task could land on a worker that
49
+ * was about to be killed.
50
+ */
51
+ private readonly terminating;
52
+ constructor(config: MultiAgentConfig, options?: MultiAgentCoordinatorOptions);
53
+ private currentSessionId;
54
+ /**
55
+ * Replace the runner after construction. Used when the runner depends
56
+ * on infrastructure (e.g. FleetBus) that isn't available until after
57
+ * the coordinator's owning Director is built.
58
+ */
59
+ setRunner(runner: SubagentRunner): void;
60
+ /**
61
+ * Wire a FleetBus for director-mode event emission. Call after the
62
+ * FleetManager is constructed so the coordinator can emit lifecycle
63
+ * events the TUI and monitoring tools subscribe to.
64
+ */
65
+ setFleetBus(fleet: import('./fleet-bus.js').FleetBus): void;
66
+ /**
67
+ * Change the in-flight dispatch ceiling at runtime. Lowering does NOT
68
+ * preempt running tasks — already-dispatched subagents finish their
69
+ * current task; only future dispatches respect the new cap. Raising
70
+ * immediately tries to fill the freed slots from the pending queue.
71
+ */
72
+ setMaxConcurrent(n: number): void;
73
+ /**
74
+ * Upgrade a placeholder/role-derived name to a memorable scientist nickname
75
+ * (e.g. "Einstein (Executor)"). A name is treated as a placeholder when it is
76
+ * empty, equals the role (case-insensitive), is a generic default
77
+ * ("subagent"/"adhoc"/"generic"), or is an auto-generated `slot-…` id.
78
+ * Explicit, human-chosen names — including nicknames already assigned by
79
+ * `Director.spawn()` — are left untouched, so this never double-assigns.
80
+ */
81
+ private withNickname;
82
+ spawn(subagent: SubagentConfig): Promise<SpawnResult>;
83
+ assign(task: TaskSpec): Promise<void>;
84
+ delegate(to: string, msg: BridgeMessage): Promise<void>;
85
+ /**
86
+ * Wire up the communication bridge for a subagent. Call after spawn() once
87
+ * the caller has created the bidirectional connection.
88
+ */
89
+ setSubagentBridge(subagentId: string, bridge: AgentBridge): void;
90
+ stop(subagentId: string): Promise<void>;
91
+ stopAll(): Promise<void>;
92
+ /**
93
+ * Get current coordinator stats for monitoring/debugging.
94
+ */
95
+ getStats(): {
96
+ total: number;
97
+ running: number;
98
+ idle: number;
99
+ stopped: number;
100
+ inFlight: number;
101
+ pending: number;
102
+ completed: number;
103
+ };
104
+ /** Emit a reactive coordinator.stats event on FleetBus so the TUI can subscribe. */
105
+ private emitCoordinatorStats;
106
+ getStatus(): CoordinatorStatus;
107
+ /** Expose snapshot of completed results — useful for callers awaiting all done. */
108
+ results(): readonly TaskResult[];
109
+ /** Defensive snapshot of the still-queued (not yet dispatched) tasks. */
110
+ listPendingTasks(): readonly TaskSpec[];
111
+ /**
112
+ * Re-pin a still-PENDING task to a different subagent (`undefined` =
113
+ * unpin, any idle worker may take it), then try to dispatch. Returns
114
+ * `false` when the task is not in the pending queue — already
115
+ * dispatched, completed, or unknown. Running tasks can never be pulled;
116
+ * they can only be steered or terminated. The mutation is synchronous
117
+ * (same tick as the check), so it cannot race a concurrent dispatch:
118
+ * `tryDispatchNext` runs on this same call stack or a later one.
119
+ *
120
+ * The task keeps its id, so waiters, the report-back notifier, and
121
+ * checkpoint bookkeeping resolve unchanged when it eventually completes.
122
+ */
123
+ retargetPendingTask(taskId: string, subagentId: string | undefined): boolean;
124
+ /**
125
+ * Wait for one or more tasks to complete and return their results.
126
+ * If a task is already done when called, returns immediately.
127
+ * Resolves to an array in the same order as `taskIds`.
128
+ */
129
+ awaitTasks(taskIds: string[]): Promise<TaskResult[]>;
130
+ /**
131
+ * Wait until AT LEAST ONE of the named tasks completes. Returns every
132
+ * requested result already available at that moment (drain-what's-done)
133
+ * plus the ids still outstanding, so callers can loop "handle finishers,
134
+ * re-await the remainder" instead of blocking on the whole batch.
135
+ *
136
+ * Unlike `awaitTasks`, this never rejects and deliberately does NOT
137
+ * inherit `config.timeoutMs` — a "return whatever is done" call has no
138
+ * business timing out unless the caller asks for a window explicitly.
139
+ */
140
+ awaitTasksAny(taskIds: string[], opts?: {
141
+ timeoutMs?: number;
142
+ }): Promise<AwaitAnyResult>;
143
+ /**
144
+ * Manual completion — for callers that drive subagents without a runner
145
+ * (e.g. external orchestrators). When a runner is configured the coordinator
146
+ * calls this itself.
147
+ */
148
+ completeTask(result: TaskResult): void;
149
+ private tryDispatchNext;
150
+ private canDispatch;
151
+ private takeNextDispatchableTask;
152
+ private findIdleSubagent;
153
+ private isIdleSubagent;
154
+ /**
155
+ * Returns true iff at least one spawned subagent could still
156
+ * process a task. A "live" subagent is one that is not stopped
157
+ * AND not mid-termination — `running` workers count because they
158
+ * will eventually finish and become idle.
159
+ *
160
+ * When no subagent has ever been spawned, returns `true` so a
161
+ * pre-spawn `assign()` simply queues (legacy behaviour). The
162
+ * dead-end detection only fires after `stop()` has retired every
163
+ * spawned worker.
164
+ *
165
+ * Used by `tryDispatchNext` to detect a dead-end pending queue.
166
+ */
167
+ private hasLiveSubagent;
168
+ /**
169
+ * Drain every pending task with a synthetic `aborted_by_parent`
170
+ * completion event. Same shape as the `stopAll()` drain — we go
171
+ * around `recordCompletion` because pending tasks were never
172
+ * counted in `inFlight` and routing them through would trip the
173
+ * underflow guard on every task after the first.
174
+ */
175
+ private drainPendingAsAborted;
176
+ /**
177
+ * Emit a synthetic `stopped`/`aborted_by_parent` completion for a single
178
+ * PENDING task — one that was never counted in `inFlight`. This MUST bypass
179
+ * `recordCompletion`: that path does `inFlight--`, which for a pending task
180
+ * steals a decrement from a genuinely in-flight task and trips the underflow
181
+ * guard — suppressing that real task's `task.completed` and hanging its
182
+ * `awaitTasks()` caller. Pushes the result and fires the event directly.
183
+ */
184
+ private emitPendingAborted;
185
+ private runDispatched;
186
+ private executeWithTimeout;
187
+ private recordCompletion;
188
+ /**
189
+ * Stop a subagent and remove it from the coordinator. Releases all
190
+ * associated resources (AbortController, context, budget state).
191
+ * The subagent entry is deleted so the id can be reused in a future spawn.
192
+ */
193
+ remove(subagentId: string): Promise<void>;
194
+ private isDone;
195
+ }
196
+ /**
197
+ * Map any raw exception thrown out of a subagent's runner into a
198
+ * structured `SubagentError`. Delegates to the shared classifier.
199
+ * Re-exported for backward compatibility.
200
+ */
201
+ export { classifySubagentError } from './coordinator/error-classifier.js';
202
+ //# sourceMappingURL=multi-agent-coordinator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi-agent-coordinator.d.ts","sourceRoot":"","sources":["../../src/coordination/multi-agent-coordinator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,cAAc,EAId,cAAc,EACd,UAAU,EACV,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,qBAAqB,EAK3B,MAAM,sBAAsB,CAAC;AAiB9B,MAAM,WAAW,4BAA4B;IAC3C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC/C;AAED,qBAAa,4BAA6B,SAAQ,YAAa,YAAW,qBAAqB;IAC7F,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,OAAO,CAAC,MAAM,CAAC,CAA6B;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;IAC9D,OAAO,CAAC,QAAQ,CAAC,CAAgD;IAEjE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;IAE9D;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,2FAA2F;IAC3F,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA6B;IAE/D,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,gBAAgB,CAAoB;IAC5C,qFAAqF;IACrF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAU;IACvD,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,QAAQ,CAAK;IACrB;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IAEjD,YAAY,MAAM,EAAE,gBAAgB,EAAE,OAAO,GAAE,4BAAiC,EAY/E;IAED,OAAO,CAAC,gBAAgB;IAKxB;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAEtC;IAED;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,OAAO,gBAAgB,EAAE,QAAQ,GAAG,IAAI,CAE1D;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAMhC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAiBd,KAAK,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CA8C1D;IAEK,MAAM,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1C;IAEK,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAO5D;IAED;;;OAGG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAI/D;IAEK,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B5C;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAa7B;IAED;;OAEG;IACH,QAAQ,IAAI;QACV,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAkBA;IAED,oFAAoF;IACpF,OAAO,CAAC,oBAAoB;IAqB5B,SAAS,IAAI,iBAAiB,CAc7B;IAED,mFAAmF;IACnF,OAAO,IAAI,SAAS,UAAU,EAAE,CAE/B;IAED,yEAAyE;IACzE,gBAAgB,IAAI,SAAS,QAAQ,EAAE,CAEtC;IAED;;;;;;;;;;;OAWG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAO3E;IAED;;;;OAIG;IACG,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAwBzD;IAED;;;;;;;;;OASG;IACG,aAAa,CACjB,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,cAAc,CAAC,CA0BzB;IAED;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAErC;IAID,OAAO,CAAC,eAAe;IAqCvB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,wBAAwB;IAgBhC,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,cAAc;IAKtB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,eAAe;IAQvB;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAK7B;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;YAkBZ,aAAa;YAiKb,kBAAkB;IAuVhC,OAAO,CAAC,gBAAgB;IA6FxB;;;;OAIG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C9C;IAED,OAAO,CAAC,MAAM;CAYf;AAED;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { FleetBus } from './fleet-bus.js';
2
+ /**
3
+ * A no-op FleetBus that discards all events. Used when no real fleet
4
+ * bus is available (non-director mode) so the runner's `fleetBus`
5
+ * field is always valid and the `attach()` call is always safe.
6
+ *
7
+ * One singleton instance is sufficient — it has no state to reset.
8
+ */
9
+ export declare const NULL_FLEET_BUS: FleetBus;
10
+ //# sourceMappingURL=null-fleet-bus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"null-fleet-bus.d.ts","sourceRoot":"","sources":["../../src/coordination/null-fleet-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,UAAiB,CAAC"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * package-author-tracker — Tracks which agent added which package to which manifest.
3
+ *
4
+ * Stores a per-project JSON log in the global project directory:
5
+ * ~/.wrongstack/projects/<slug-hash>/package-authors.json
6
+ *
7
+ * Each entry records: manifest path, package name, version range at time of add,
8
+ * agent id/name, timestamp, and session id.
9
+ *
10
+ * Used by the tech-stack agent and outdated-watcher to route outdated-package
11
+ * notifications back to the agent that originally added the package.
12
+ *
13
+ * @module package-author-tracker
14
+ */
15
+ export interface PackageAuthorEntry {
16
+ /** Absolute or relative path to the manifest (package.json, go.mod, etc.). */
17
+ manifestPath: string;
18
+ /** Exact package name as it appears in the manifest. */
19
+ packageName: string;
20
+ /** Version specifier at time of install (e.g. "^1.2.0", "latest", "file:..."). */
21
+ versionSpec: string;
22
+ /** Ecosystem: 'npm', 'cargo', 'go', 'pip', 'gem', 'composer', 'nuget', etc. */
23
+ ecosystem: string;
24
+ /** Agent id that performed the install (e.g. 'leader', 'executor', 'tech-stack'). */
25
+ agentId: string;
26
+ /** Human-readable agent name. */
27
+ agentName?: string | undefined;
28
+ /** Session that performed the install. */
29
+ sessionId?: string | undefined;
30
+ /** ISO8601 timestamp. */
31
+ timestamp: string;
32
+ /** Whether this package is currently flagged as outdated. */
33
+ outdated?: boolean | undefined;
34
+ /** Latest version available (set by outdated checker). */
35
+ latestVersion?: string | undefined;
36
+ }
37
+ export interface PackageAuthorLog {
38
+ /** Project root this log belongs to. */
39
+ projectRoot: string;
40
+ /** All entries, newest last. */
41
+ entries: PackageAuthorEntry[];
42
+ /** Last time the log was compacted. */
43
+ lastCompactedAt?: string | undefined;
44
+ }
45
+ export interface PackageAuthorTrackerOptions {
46
+ /** Directory where the JSON log is stored. Usually the global project dir. */
47
+ storageDir: string;
48
+ /** Project root for reference. */
49
+ projectRoot: string;
50
+ /** Max entries before auto-compaction. Default: 10000. */
51
+ maxEntries?: number | undefined;
52
+ }
53
+ /**
54
+ * Detect the ecosystem from a manifest filename.
55
+ */
56
+ export declare function detectEcosystem(manifestPath: string): string;
57
+ /**
58
+ * Record that an agent added (or updated) a package to a manifest file.
59
+ *
60
+ * If the same (manifestPath, packageName) entry already exists, the previous
61
+ * entry is kept (for audit trail) and a new entry is appended.
62
+ */
63
+ export declare function recordPackageAction(opts: PackageAuthorTrackerOptions, entry: Omit<PackageAuthorEntry, 'timestamp'>): Promise<void>;
64
+ /**
65
+ * Get the most recent author entry for a given (manifest, package) pair.
66
+ * Returns undefined if no entry exists.
67
+ */
68
+ export declare function getPackageAuthor(opts: Pick<PackageAuthorTrackerOptions, 'storageDir' | 'projectRoot'>, manifestPath: string, packageName: string): Promise<PackageAuthorEntry | undefined>;
69
+ /**
70
+ * Get all packages in a manifest that have an author on record.
71
+ */
72
+ export declare function getManifestPackages(opts: Pick<PackageAuthorTrackerOptions, 'storageDir' | 'projectRoot'>, manifestPath: string): Promise<PackageAuthorEntry[]>;
73
+ /**
74
+ * Get all packages last tracked by a specific agent.
75
+ * Returns a Map from (manifestPath, packageName) → entry.
76
+ */
77
+ export declare function getPackagesByAgent(opts: Pick<PackageAuthorTrackerOptions, 'storageDir' | 'projectRoot'>, agentId: string): Promise<Map<string, PackageAuthorEntry>>;
78
+ /**
79
+ * Update the outdated status of a package entry (adds or replaces the entry
80
+ * for the given manifest+package, appending to the log for audit).
81
+ */
82
+ export declare function updatePackageOutdatedStatus(opts: PackageAuthorTrackerOptions, manifestPath: string, packageName: string, outdated: boolean, latestVersion?: string | undefined): Promise<void>;
83
+ /**
84
+ * Return the full log (for debugging/auditing).
85
+ */
86
+ export declare function getFullPackageLog(opts: Pick<PackageAuthorTrackerOptions, 'storageDir' | 'projectRoot'>): Promise<PackageAuthorLog>;
87
+ //# sourceMappingURL=package-author-tracker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-author-tracker.d.ts","sourceRoot":"","sources":["../../src/coordination/package-author-tracker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,2BAA2B;IAC1C,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAgCD;;GAEG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAwB5D;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,2BAA2B,EACjC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,GAC3C,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,CAAC,2BAA2B,EAAE,YAAY,GAAG,aAAa,CAAC,EACrE,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAczC;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,CAAC,2BAA2B,EAAE,YAAY,GAAG,aAAa,CAAC,EACrE,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAI/B;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,IAAI,CAAC,2BAA2B,EAAE,YAAY,GAAG,aAAa,CAAC,EACrE,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAU1C;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,2BAA2B,EACjC,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,OAAO,EACjB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,GACjC,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,IAAI,CAAC,2BAA2B,EAAE,YAAY,GAAG,aAAa,CAAC,GACpE,OAAO,CAAC,gBAAgB,CAAC,CAE3B"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * package-outdated-watcher — Periodically checks installed packages for outdated
3
+ * versions and notifies the agent that originally added each package.
4
+ *
5
+ * Architecture:
6
+ * 1. Polls the mailbox for `assign` messages from the tech-stack agent
7
+ * containing outdated package results.
8
+ * 2. For each outdated package, looks up the original author via
9
+ * `package-author-tracker`.
10
+ * 3. Sends a high-priority `note` message to the original author (or
11
+ * broadcasts to `*` if the author is unknown or no longer online).
12
+ *
13
+ * The watcher can also be triggered directly via `checkOutdated` for
14
+ * on-demand checks (e.g. on a timer, or when the user requests it).
15
+ *
16
+ * Usage:
17
+ * const dispose = startPackageOutdatedWatcher({
18
+ * mailbox,
19
+ * storageDir: wpaths.globalDir,
20
+ * projectRoot,
21
+ * pollIntervalMs: 60 * 60 * 1000, // 1 hour
22
+ * onNotify: async (msg) => mailbox.send(msg),
23
+ * onLog: (m) => console.log(`[pkg-outdated-watcher] ${m}`),
24
+ * });
25
+ *
26
+ * @module package-outdated-watcher
27
+ */
28
+ import type { Mailbox } from './mailbox-types.js';
29
+ import { type PackageAuthorTrackerOptions } from './package-author-tracker.js';
30
+ export interface PackageOutdatedEntry {
31
+ /** Package name. */
32
+ name: string;
33
+ /** Currently installed version. */
34
+ currentVersion: string;
35
+ /** Latest stable version available. */
36
+ latestVersion: string;
37
+ /** semver major.minor.patch wanted range (from lockfile). */
38
+ wantedVersion: string;
39
+ /** Manifest file this package belongs to. */
40
+ manifestPath: string;
41
+ /** Ecosystem: 'npm', 'cargo', 'go', etc. */
42
+ ecosystem: string;
43
+ }
44
+ export interface PackageOutdatedResult {
45
+ /** All outdated entries. */
46
+ outdated: PackageOutdatedEntry[];
47
+ /** Packages that are up-to-date. */
48
+ upToDate: string[];
49
+ /** Whether the check failed. */
50
+ checkFailed: boolean;
51
+ }
52
+ export interface PackageOutdatedWatcherOptions {
53
+ /** The mailbox for sending notifications and receiving tech-stack results. */
54
+ mailbox: Mailbox;
55
+ /** Package-author-tracker options. */
56
+ packageTrackerOpts: Pick<PackageAuthorTrackerOptions, 'storageDir' | 'projectRoot'>;
57
+ /** Polling interval in ms. Default: 60 * 60 * 1000 (1 hour). */
58
+ pollIntervalMs?: number | undefined;
59
+ /** Agent id that runs this watcher. Default: 'pkg-outdated-watcher'. */
60
+ watcherAgentId?: string | undefined;
61
+ /** Agent id of the tech-stack agent to watch for results. Default: 'tech-stack'. */
62
+ techStackAgentId?: string | undefined;
63
+ /** Called to send a notification to an agent. */
64
+ onNotify: (msg: OutdatedNotifyMessage) => Promise<void>;
65
+ /** Called for log output. */
66
+ onLog?: ((msg: string) => void) | undefined;
67
+ /** Called on errors. */
68
+ onError?: ((err: unknown) => void) | undefined;
69
+ }
70
+ export interface OutdatedNotifyMessage {
71
+ from: string;
72
+ to: string;
73
+ subject: string;
74
+ body: string;
75
+ priority: 'high' | 'normal' | 'low';
76
+ }
77
+ /**
78
+ * Start the package outdated watcher.
79
+ *
80
+ * Returns a dispose function that stops polling and cleans up.
81
+ */
82
+ export declare function startPackageOutdatedWatcher(opts: PackageOutdatedWatcherOptions): () => void;
83
+ //# sourceMappingURL=package-outdated-watcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-outdated-watcher.d.ts","sourceRoot":"","sources":["../../src/coordination/package-outdated-watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,oBAAoB;IACnC,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC,4BAA4B;IAC5B,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,oCAAoC;IACpC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,gCAAgC;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,6BAA6B;IAC5C,8EAA8E;IAC9E,OAAO,EAAE,OAAO,CAAC;IACjB,sCAAsC;IACtC,kBAAkB,EAAE,IAAI,CAAC,2BAA2B,EAAE,YAAY,GAAG,aAAa,CAAC,CAAC;IACpF,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,iDAAiD;IACjD,QAAQ,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,6BAA6B;IAC7B,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5C,wBAAwB;IACxB,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CACrC;AA2DD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,6BAA6B,GAAG,MAAM,IAAI,CAoG3F"}
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Single-instance mailbox-bridge lock.
3
+ *
4
+ * Per-project isolation: each project (resolved via
5
+ * `resolveProjectDir`) gets its own lock file under
6
+ * `<projectDir>/.mailbox-bridge.lock`. Two projects on the same
7
+ * machine never collide — different slugs, different lock files,
8
+ * and (with default port 0) different OS-assigned ports.
9
+ *
10
+ * The lock holds:
11
+ * - pid process id of the owning `wstack mailbox serve`
12
+ * - host, port what the owner actually bound (port may be OS-assigned)
13
+ * - url convenience copy for callers
14
+ * - token the bearer token (so external agents don't have to
15
+ * re-read it from .mailbox.token separately)
16
+ * - generation monotonically increasing counter; bumped on every
17
+ * acquire. Lets a release() call identify whether the
18
+ * current lock file still belongs to *this* process
19
+ * (e.g. after a stale cleanup raced with us).
20
+ * - spawnedAt ISO timestamp — for observability, not load-bearing.
21
+ *
22
+ * Concurrency model:
23
+ * - `acquireOrJoin` is atomic via rename(2). Two concurrent spawns
24
+ * race to write a tmpfile then rename; one wins, the other reads
25
+ * the winner's lock and joins.
26
+ * - PID liveness is checked via `process.kill(pid, 0)` (POSIX) or
27
+ * `tasklist` (Windows). A live PID means another instance owns
28
+ * this project; a dead PID means the lock is stale and gets cleaned.
29
+ * - `release` is best-effort: a missing lock file at shutdown is
30
+ * fine (someone else already took over). A generation mismatch means
31
+ * we lost the race and another instance owns it now — also fine.
32
+ *
33
+ * Token persistence: the token in the lock always matches the token in
34
+ * `.mailbox.token`, so an external agent that reads either file gets the
35
+ * same value. While an instance stays alive, every joining caller
36
+ * (`kind: 'joined'`) reuses that one token. A cold (re)start — no lock,
37
+ * or a lock whose owner PID is dead/unhealthy — mints a FRESH token and
38
+ * rewrites both files atomically. External agents must therefore re-read
39
+ * `.mailbox.token` after a bridge restart (a stale token returns 401).
40
+ */
41
+ export declare const MAILBOX_BRIDGE_LOCK_FILENAME = ".mailbox-bridge.lock";
42
+ export declare const MAILBOX_BRIDGE_TOKEN_FILENAME = ".mailbox.token";
43
+ export interface MailboxBridgeLock {
44
+ pid: number;
45
+ host: string;
46
+ port: number;
47
+ url: string;
48
+ token: string;
49
+ generation: number;
50
+ spawnedAt: string;
51
+ }
52
+ export type AcquireResult = {
53
+ kind: 'acquired';
54
+ lock: MailboxBridgeLock;
55
+ tokenPath: string;
56
+ } | {
57
+ kind: 'joined';
58
+ lock: MailboxBridgeLock;
59
+ tokenPath: string;
60
+ } | {
61
+ kind: 'port-conflict';
62
+ existing: MailboxBridgeLock;
63
+ };
64
+ export interface AcquireOptions {
65
+ /** Project dir (already resolved by caller via resolveProjectDir). */
66
+ projectDir: string;
67
+ /** Bind host. Required when acquiring. */
68
+ host: string;
69
+ /** Explicit port. Pass null/undefined to mean "OS-assigned" (read it after listen). */
70
+ requestedPort: number | null;
71
+ /** When true, fail loud on EADDRINUSE. When false, fall back to OS-assigned. */
72
+ strictPort: boolean;
73
+ }
74
+ /**
75
+ * Try to acquire the mailbox-bridge lock for `projectDir`. If another
76
+ * instance is already alive and healthy, join it. Otherwise claim
77
+ * the slot for ourselves.
78
+ *
79
+ * Two-phase contract:
80
+ * 1. Caller invokes `acquireOrJoin(...)` BEFORE calling
81
+ * `server.listen()`. The returned lock either:
82
+ * - `kind: 'joined'` → another instance is alive, the caller
83
+ * should NOT bind; just print the URL/token
84
+ * and exit cleanly (return 0).
85
+ * - `kind: 'acquired'` → caller is the owner, proceeds to bind.
86
+ * - `kind: 'port-conflict'` → caller asked for an explicit port
87
+ * that's already taken by an unrelated
88
+ * process; we return the existing owner
89
+ * but the caller decides what to do
90
+ * (loud-fail).
91
+ * 2. After `server.listen()` resolves with a real port, the caller
92
+ * invokes `finalize(lock, boundPort)` to atomically write the
93
+ * final lock + token file with the OS-assigned port.
94
+ *
95
+ * The two-phase split keeps the listen() call out of the lock module —
96
+ * the caller owns the HTTP server instance; the lock module owns
97
+ * the on-disk contract.
98
+ */
99
+ export declare function acquireOrJoin(opts: AcquireOptions): Promise<AcquireResult>;
100
+ /**
101
+ * Phase 2 — after server.listen() resolves, write the final lock
102
+ * with the actually-bound port and the same token. Also writes the
103
+ * .mailbox.token file with mode 0600 so external agents can read it.
104
+ *
105
+ * Returns the finalized lock so the caller can use the resolved URL.
106
+ */
107
+ export declare function finalize(projectDir: string, tentative: MailboxBridgeLock, boundPort: number): Promise<MailboxBridgeLock>;
108
+ /**
109
+ * Phase 3 — best-effort cleanup on shutdown. Removes the lock + token
110
+ * files IF this process is still the recorded owner (generation match).
111
+ *
112
+ * If the generation doesn't match, another acquire() has already
113
+ * superseded us — we must NOT delete their lock.
114
+ */
115
+ export declare function release(projectDir: string, generation: number): Promise<void>;
116
+ /**
117
+ * Read the lock file and return it, with enough information for the
118
+ * caller to distinguish:
119
+ * - 'live' — PID alive, /healthz reachable; safe to use.
120
+ * - 'probe-failed' — PID alive (or recently was) but /healthz
121
+ * unreachable. Caller can still return the URL
122
+ * + token to the host so its request layer can
123
+ * retry; the host's fetch timeout will surface
124
+ * the real error if the bridge is truly dead.
125
+ * - 'absent' — no lock file existed, or it was malformed
126
+ * (cleaned up best-effort).
127
+ *
128
+ * Distinguishing 'probe-failed' from 'absent' matters for the
129
+ * "joined vs spawned" decision in tryAcquireMailboxBridge — we
130
+ * don't want to spawn a second bridge just because /healthz flaked.
131
+ */
132
+ export type LiveLockResult = {
133
+ kind: 'live';
134
+ lock: MailboxBridgeLock;
135
+ }
136
+ /**
137
+ * The lock exists but isn't usable. `pidAlive` tells the caller
138
+ * which recovery to pick:
139
+ * - `pidAlive: false` — the owning process is dead (stale lock).
140
+ * Callers should treat this like `absent` and spawn a fresh
141
+ * bridge rather than surfacing a dead URL.
142
+ * - `pidAlive: true` — the process is alive but /healthz didn't
143
+ * respond (booting/wedged/PID-reuse). Callers may return the
144
+ * recorded URL/token and let a real request confirm liveness.
145
+ */
146
+ | {
147
+ kind: 'probe-failed';
148
+ lock: MailboxBridgeLock;
149
+ pidAlive: boolean;
150
+ } | {
151
+ kind: 'absent';
152
+ };
153
+ export declare function readLiveLock(projectDir: string): Promise<LiveLockResult>;
154
+ //# sourceMappingURL=single-instance-mailbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"single-instance-mailbox.d.ts","sourceRoot":"","sources":["../../src/coordination/single-instance-mailbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAQH,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AACnE,eAAO,MAAM,6BAA6B,mBAAmB,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAO3D,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gFAAgF;IAChF,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAmDhF;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,iBAAiB,EAC5B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,iBAAiB,CAAC,CAe5B;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAenF;AA0ED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE;AAC3C;;;;;;;;;GASG;GACD;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GACpE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvB,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAU9E"}
@@ -0,0 +1,6 @@
1
+ /** Absolute recursion ceiling. Configuration may narrow this, never widen it. */
2
+ export declare const HARD_MAX_SPAWN_DEPTH = 2;
3
+ /** CLI fleet default; core embedders retain their historical Infinity default. */
4
+ export declare const DEFAULT_MAX_FLEET_SPAWNS = 64;
5
+ export declare function resolveMaxSpawnDepth(requested?: number | undefined): number;
6
+ //# sourceMappingURL=spawn-budget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spawn-budget.d.ts","sourceRoot":"","sources":["../../src/coordination/spawn-budget.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,kFAAkF;AAClF,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAG3E"}