@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
@@ -1,311 +1,8 @@
1
- import { a as ReasoningConfig, p as ReasoningEffort, q as CacheTtl, r as Capabilities, f as Permission } from './tool-BNlnIJvo.js';
2
-
3
- type ContextWindowModeId = 'balanced' | 'frugal' | 'deep' | 'archival';
4
- type ContextWindowAggressiveOn = 'hard' | 'soft' | 'warn';
5
- interface ContextWindowThresholds {
6
- warn: number;
7
- soft: number;
8
- hard: number;
9
- }
10
- interface ContextWindowMode {
11
- id: ContextWindowModeId;
12
- name: string;
13
- description: string;
14
- thresholds: ContextWindowThresholds;
15
- aggressiveOn: ContextWindowAggressiveOn;
16
- preserveK: number;
17
- eliseThreshold: number;
18
- targetLoad: number;
19
- }
20
- interface ContextWindowPolicy extends ContextWindowMode {
21
- }
22
- interface ContextWindowConfigLike {
23
- mode?: ContextWindowModeId | string | undefined;
24
- warnThreshold?: number | undefined;
25
- softThreshold?: number | undefined;
26
- hardThreshold?: number | undefined;
27
- preserveK?: number | undefined;
28
- eliseThreshold?: number | undefined;
29
- }
30
- declare const DEFAULT_CONTEXT_WINDOW_MODE_ID: ContextWindowModeId;
31
- declare const CONTEXT_WINDOW_MODES: readonly ContextWindowMode[];
32
- declare function listContextWindowModes(): ContextWindowMode[];
33
- declare function getContextWindowMode(id: string | null | undefined): ContextWindowMode | null;
34
- declare function isContextWindowModeId(id: string): id is ContextWindowModeId;
35
- declare function resolveContextWindowPolicy(config?: ContextWindowConfigLike, overrideMode?: string | null | undefined): ContextWindowPolicy;
36
- declare function formatContextWindowModeList(activeId?: string | null): string;
37
-
38
- /**
39
- * Lifecycle hook types — the pure, serializable contract shared by the config
40
- * layer, the in-process plugin API, and the shell-hook executor.
41
- *
42
- * These types intentionally avoid referencing the live `Context` (which lives
43
- * in `core/`, a higher layer) so `types/config.ts` can import them without
44
- * creating a layering cycle. The runtime pieces (`hooks/registry`,
45
- * `hooks/runner`, `hooks/shell-executor`) translate live run state into the
46
- * serializable `HookInput` below.
47
- */
48
- /** Lifecycle phases a hook can subscribe to. */
49
- type HookEvent = 'PreToolUse' | 'PostToolUse' | 'UserPromptSubmit' | 'SessionStart' | 'Stop';
50
- /**
51
- * Tool-name matcher for `PreToolUse`/`PostToolUse` hooks. A pipe-delimited
52
- * list of exact tool names, or `*` for all tools. Examples: `"Bash"`,
53
- * `"edit|write"`, `"*"`. Ignored (treated as `*`) for non-tool events.
54
- */
55
- type HookMatcher = string;
56
- /** What to do when a hook crashes, times out, or returns malformed output. */
57
- type HookFailurePolicy = 'open' | 'closed';
58
- /**
59
- * PreToolUse hooks run in two phases. Mutators compose first; validators then
60
- * inspect the final arguments and may no longer rewrite them.
61
- */
62
- type PreToolUseStage = 'mutate' | 'validate';
63
- /** Per-registration runtime controls shared by every hook transport. */
64
- interface HookRegistrationOptions {
65
- /** Stable name used in logs and model-visible fail-closed errors. */
66
- name?: string | undefined;
67
- /** Per-invocation deadline in milliseconds (default 5000). */
68
- timeoutMs?: number | undefined;
69
- /** `open` skips a failed hook; `closed` converts failure to a denial. */
70
- failurePolicy?: HookFailurePolicy | undefined;
71
- /** PreToolUse phase. Legacy registrations default to `mutate`. */
72
- stage?: PreToolUseStage | undefined;
73
- /**
74
- * Trusted enforcement hook. Policy hooks remain active under `--no-hooks`;
75
- * ordinary automation hooks do not.
76
- */
77
- policy?: boolean | undefined;
78
- }
79
- /** Deadline/cancellation context passed to in-process hooks. */
80
- interface HookInvocationContext {
81
- signal: AbortSignal;
82
- /** Absolute Unix epoch deadline in milliseconds. */
83
- deadlineAt: number;
84
- }
85
- /**
86
- * The JSON payload handed to a hook. For shell hooks this is serialized to
87
- * stdin; for in-process hooks it is passed as the sole argument. Kept flat and
88
- * serializable so both transports see the same shape.
89
- */
90
- interface HookInput {
91
- event: HookEvent;
92
- /** Present for PreToolUse / PostToolUse. */
93
- toolName?: string | undefined;
94
- /** Tool arguments (PreToolUse / PostToolUse). */
95
- toolInput?: unknown | undefined;
96
- /** Tool result preview (PostToolUse only). */
97
- toolResult?: {
98
- content: string;
99
- isError: boolean;
100
- };
101
- /** The submitted user text (UserPromptSubmit only). */
102
- prompt?: string | undefined;
103
- /** Absolute working directory of the session. */
104
- cwd: string;
105
- /** Active session id, when known. */
106
- sessionId?: string | undefined;
107
- }
108
- /**
109
- * What a hook returns. Every field is optional — an empty object (or a hook
110
- * that returns nothing) is a no-op "allow".
111
- */
112
- interface HookOutcome {
113
- /**
114
- * `block` stops the action (PreToolUse → tool not run; UserPromptSubmit →
115
- * turn short-circuited). `allow` is the explicit no-op. Omitted = allow.
116
- */
117
- decision?: 'block' | 'allow' | undefined;
118
- /** Human-readable reason, surfaced to the model when blocking. */
119
- reason?: string | undefined;
120
- /**
121
- * PreToolUse only: replacement tool arguments. The executor swaps these in
122
- * and RE-VALIDATES them against the tool's input schema before running.
123
- */
124
- modifiedInput?: Record<string, unknown>;
125
- /**
126
- * Extra context to fold back to the model — appended to the tool_result
127
- * (PostToolUse), the user message (UserPromptSubmit), or the system preamble
128
- * (SessionStart).
129
- */
130
- additionalContext?: string | undefined;
131
- /**
132
- * Where the additionalContext should appear. `inline` (default) appends it
133
- * to the tool_result / user message content so it renders as part of that
134
- * block. `separate` appends it as a new user message, keeping plugin notices
135
- * visually separated from the actual tool output.
136
- */
137
- contextAs?: 'inline' | 'separate' | undefined;
138
- }
139
- /**
140
- * Preferred, mutually-exclusive PreToolUse result. `allow` means only that
141
- * this hook has no objection; it never bypasses the core permission policy.
142
- */
143
- type PreToolUseOutcome = {
144
- additionalContext?: string | undefined;
145
- contextAs?: 'inline' | 'separate' | undefined;
146
- } & ({
147
- action: 'allow';
148
- } | {
149
- action: 'deny';
150
- reason: string;
151
- } | {
152
- action: 'mutate';
153
- input: Record<string, unknown>;
154
- reason?: string | undefined;
155
- });
156
- /** New and legacy hook outputs accepted at the transport boundary. */
157
- type AnyHookOutcome = HookOutcome | PreToolUseOutcome;
158
- /** An in-process hook function (registered via the plugin API). */
159
- type InProcessHook = (input: HookInput, runtime: HookInvocationContext) => AnyHookOutcome | void | Promise<AnyHookOutcome | void>;
160
- interface ConfiguredHookBase extends HookRegistrationOptions {
161
- /** Tool-name matcher (defaults to `*`). */
162
- matcher?: HookMatcher | undefined;
163
- }
164
- /**
165
- * A shell-command hook (declared in `config.hooks`). Claude-compatible: the
166
- * `HookInput` JSON is written to the command's stdin; a JSON `HookOutcome` may
167
- * be printed to stdout, and exit code 2 forces `decision: 'block'`.
168
- */
169
- interface ShellHook extends ConfiguredHookBase {
170
- type?: 'command' | undefined;
171
- /** Command line run via the platform shell. */
172
- command: string;
173
- }
174
- /** Native HTTP hook. The HookInput JSON is POSTed and JSON output is parsed. */
175
- interface HttpHook extends ConfiguredHookBase {
176
- type: 'http';
177
- url: string;
178
- headers?: Record<string, string> | undefined;
179
- }
180
- type ConfiguredHook = ShellHook | HttpHook;
181
- interface HookEntryBase {
182
- event: HookEvent;
183
- matcher: HookMatcher;
184
- name: string;
185
- timeoutMs?: number | undefined;
186
- failurePolicy: HookFailurePolicy;
187
- stage: PreToolUseStage;
188
- policy: boolean;
189
- }
190
- /** A registered hook entry, discriminated by transport. */
191
- type HookEntry = (HookEntryBase & {
192
- kind: 'inprocess';
193
- hook: InProcessHook;
194
- owner?: string | undefined;
195
- }) | (HookEntryBase & {
196
- kind: 'shell';
197
- command: string;
198
- }) | (HookEntryBase & {
199
- kind: 'http';
200
- url: string;
201
- headers?: Record<string, string> | undefined;
202
- });
203
-
204
- /**
205
- * Mirror of the models.dev/api.json schema. Top-level is keyed by provider id.
206
- * We keep `unknown` for fields we don't read so the cached payload stays faithful.
207
- */
208
-
209
- interface ModelsDevModel {
210
- id: string;
211
- name: string;
212
- family?: string | undefined;
213
- /**
214
- * One-line capability blurb. Not part of the upstream models.dev schema —
215
- * carried by our curated overlay (`packages/cli/data/providers.json`, synced
216
- * from raw GitHub) for subscription models like openai-codex.
217
- */
218
- description?: string | undefined;
219
- attachment?: boolean | undefined;
220
- reasoning?: boolean | undefined;
221
- reasoningConfig?: ReasoningConfig | undefined;
222
- tool_call?: boolean | undefined;
223
- temperature?: boolean | undefined;
224
- knowledge?: string | undefined;
225
- release_date?: string | undefined;
226
- last_updated?: string | undefined;
227
- open_weights?: boolean | undefined;
228
- modalities?: {
229
- input?: string[] | undefined;
230
- output?: string[] | undefined;
231
- };
232
- cost?: {
233
- input?: number | undefined;
234
- output?: number | undefined;
235
- cache_read?: number | undefined;
236
- cache_write?: number | undefined;
237
- cache_write_5m?: number | undefined;
238
- cache_write_1h?: number | undefined;
239
- [k: string]: number | undefined;
240
- };
241
- limit?: {
242
- context?: number | undefined;
243
- output?: number | undefined;
244
- };
245
- [k: string]: unknown;
246
- }
247
- interface ModelsDevProvider {
248
- id: string;
249
- name: string;
250
- /** Env vars that hold the API key, in priority order. */
251
- env?: string[] | undefined;
252
- /** Identifies the wire format family (e.g. @ai-sdk/anthropic). */
253
- npm?: string | undefined;
254
- /** Default base URL when not provided by SDK defaults. */
255
- api?: string | undefined;
256
- /** Documentation URL. */
257
- doc?: string | undefined;
258
- models: Record<string, ModelsDevModel>;
259
- }
260
- type ModelsDevPayload = Record<string, ModelsDevProvider>;
261
- /**
262
- * Canonical wire-format families WrongStack knows how to speak natively.
263
- * Used by the provider registry to pick a transport.
264
- */
265
- type WireFamily = 'anthropic' | 'anthropic-oauth' | 'openai' | 'openai-compatible' | 'openai-codex' | 'github-copilot' | 'google' | 'unsupported';
266
- interface ResolvedProvider {
267
- id: string;
268
- name: string;
269
- family: WireFamily;
270
- apiBase?: string | undefined;
271
- envVars: string[];
272
- doc?: string | undefined;
273
- models: ModelsDevModel[];
274
- npm?: string | undefined;
275
- }
276
- interface ResolvedModel {
277
- providerId: string;
278
- modelId: string;
279
- capabilities: {
280
- tools: boolean;
281
- vision: boolean;
282
- reasoning: boolean;
283
- maxContext: number;
284
- maxOutput?: number | undefined;
285
- knowledge?: string | undefined;
286
- reasoningConfig?: ReasoningConfig | undefined;
287
- };
288
- cost?: ModelsDevModel['cost'] | undefined;
289
- }
290
- interface ModelsRegistry {
291
- /** Load (from cache or network). Idempotent; second call returns cached value. */
292
- load(opts?: {
293
- force?: boolean | undefined;
294
- }): Promise<ModelsDevPayload>;
295
- /** Force-refresh from network and overwrite cache. */
296
- refresh(): Promise<ModelsDevPayload>;
297
- /** All providers, classified by wire family. */
298
- listProviders(): Promise<ResolvedProvider[]>;
299
- /** A single provider by id, or undefined. */
300
- getProvider(id: string): Promise<ResolvedProvider | undefined>;
301
- /** A model lookup with capabilities + cost. */
302
- getModel(providerId: string, modelId: string): Promise<ResolvedModel | undefined>;
303
- /** Suggest a default model for the given provider (latest by release_date). */
304
- suggestModel(providerId: string): Promise<string | undefined>;
305
- /** Cache freshness in seconds since last successful network fetch (Infinity if never). */
306
- ageSeconds(): Promise<number>;
307
- }
308
-
1
+ import type { ContextWindowModeId } from './context-window.js';
2
+ import type { ConfiguredHook, HookEvent } from './hooks.js';
3
+ import type { WireFamily } from './models-registry.js';
4
+ import type { CacheTtl, Capabilities, ReasoningEffort } from './provider.js';
5
+ import type { Permission } from './tool.js';
309
6
  /**
310
7
  * Runtime reasoning controls the user can set per-session/project. Mapped into
311
8
  * the provider `Request.reasoning` field by the model-runtime request
@@ -313,7 +10,7 @@ interface ModelsRegistry {
313
10
  * unsupported values are omitted (and warned) instead of triggering provider
314
11
  * 400s. See `resolveReasoningForRequest()` in packages/core.
315
12
  */
316
- interface ModelRuntimeReasoningConfig {
13
+ export interface ModelRuntimeReasoningConfig {
317
14
  /**
318
15
  * Whether to send explicit reasoning enable/disable.
319
16
  * - 'auto' → do not send explicit fields; provider/model default wins
@@ -330,7 +27,7 @@ interface ModelRuntimeReasoningConfig {
330
27
  * Runtime prompt-cache controls mapped into `Request.cache`. Currently only the
331
28
  * Anthropic TTL toggle (5m vs 1h) is exposed; other providers ignore it.
332
29
  */
333
- interface ModelRuntimeCacheConfig {
30
+ export interface ModelRuntimeCacheConfig {
334
31
  ttl?: CacheTtl | undefined;
335
32
  }
336
33
  /**
@@ -338,7 +35,7 @@ interface ModelRuntimeCacheConfig {
338
35
  * (REPL / TUI / WebUI). The CLI installs a single request-pipeline middleware
339
36
  * that reads these and mutates the outgoing `Request`.
340
37
  */
341
- interface ModelRuntimeConfig {
38
+ export interface ModelRuntimeConfig {
342
39
  reasoning?: ModelRuntimeReasoningConfig | undefined;
343
40
  cache?: ModelRuntimeCacheConfig | undefined;
344
41
  /**
@@ -353,7 +50,7 @@ interface ModelRuntimeConfig {
353
50
  * corresponding `Capabilities` flag so unsupported models don't receive
354
51
  * parameters they'd reject.
355
52
  */
356
- interface ModelRuntimeParametersConfig {
53
+ export interface ModelRuntimeParametersConfig {
357
54
  /** Top-K sampling (Anthropic, Gemini). Gated by `capabilities.topK`. */
358
55
  topK?: number | undefined;
359
56
  /** Frequency penalty (OpenAI, Gemini). Gated by `capabilities.frequencyPenalty`. */
@@ -373,7 +70,7 @@ interface ModelRuntimeParametersConfig {
373
70
  * HQ client connection settings. Same-machine clients can auto-discover the
374
71
  * local HQ auth file; remote clients use this config-backed URL/token pair.
375
72
  */
376
- interface HqClientConfig {
73
+ export interface HqClientConfig {
377
74
  /** Enable HQ publishing. Env WRONGSTACK_HQ_ENABLED still overrides at runtime. */
378
75
  enabled?: boolean | undefined;
379
76
  /** HQ HTTP base URL, e.g. http://host:3499. */
@@ -397,7 +94,7 @@ interface HqClientConfig {
397
94
  * - 'medium' — Most development tools (~24), some guidance (default when `true`)
398
95
  * - 'aggressive' — Maximum savings before tools become unusable (~4-5k tokens saved)
399
96
  */
400
- type TokenSavingTier = 'off' | 'minimal' | 'light' | 'medium' | 'aggressive';
97
+ export type TokenSavingTier = 'off' | 'minimal' | 'light' | 'medium' | 'aggressive';
401
98
  /**
402
99
  * Normalize a TokenSavingTier value, handling backward-compatible boolean inputs.
403
100
  * - `true` → 'medium' (existing behavior)
@@ -405,15 +102,30 @@ type TokenSavingTier = 'off' | 'minimal' | 'light' | 'medium' | 'aggressive';
405
102
  * - string values are returned as-is after validation
406
103
  * - `undefined` → 'off'
407
104
  */
408
- declare function normalizeTokenSavingTier(val?: TokenSavingTier | boolean): TokenSavingTier;
409
- declare const DEFAULT_TUI_THINKING_WORD = "thinking";
410
- declare const MAX_TUI_THINKING_WORD_LENGTH = 16;
105
+ export declare function normalizeTokenSavingTier(val?: TokenSavingTier | boolean): TokenSavingTier;
106
+ /**
107
+ * Verbosity of fleet/subagent activity streamed into the main TUI chat.
108
+ * See {@link AutonomyConfig.fleetChatVerbosity}.
109
+ */
110
+ export type FleetChatVerbosity = 'off' | 'compact' | 'full';
111
+ export declare const FLEET_CHAT_VERBOSITY_VALUES: readonly FleetChatVerbosity[];
112
+ /**
113
+ * Resolve the effective fleet-chat verbosity from autonomy config.
114
+ * An explicit `fleetChatVerbosity` wins; otherwise the legacy `streamFleet`
115
+ * boolean is honored (`false` → 'off'); absence of both means 'compact'.
116
+ * `fleetChatVerbosity` must never be given a merge-time default — the
117
+ * absence of the field is what lets legacy `streamFleet: false` configs
118
+ * keep their intent.
119
+ */
120
+ export declare function resolveFleetChatVerbosity(autonomy?: Pick<AutonomyConfig, 'fleetChatVerbosity' | 'streamFleet'>): FleetChatVerbosity;
121
+ export declare const DEFAULT_TUI_THINKING_WORD = "thinking";
122
+ export declare const MAX_TUI_THINKING_WORD_LENGTH = 16;
411
123
  /**
412
124
  * Normalize the configurable statusline word shown while the TUI is working.
413
125
  * The value must be a single short word; invalid values fall back to the default.
414
126
  */
415
- declare function normalizeTuiThinkingWord(value: unknown): string;
416
- interface ContextConfig {
127
+ export declare function normalizeTuiThinkingWord(value: unknown): string;
128
+ export interface ContextConfig {
417
129
  /** Context-window policy mode. Controls compaction thresholds and preservation depth. */
418
130
  mode?: ContextWindowModeId | undefined;
419
131
  warnThreshold: number;
@@ -449,7 +161,7 @@ interface ContextConfig {
449
161
  * that is on by default; this section controls whether the registry actually
450
162
  * participates in it and how it auto-recovers.
451
163
  */
452
- interface CircuitBreakerRuntimeConfig {
164
+ export interface CircuitBreakerRuntimeConfig {
453
165
  /**
454
166
  * Enable circuit-breaker protection. When false (the default), the breaker
455
167
  * is bypassed — `bash`/`exec` calls always proceed regardless of failure
@@ -471,7 +183,7 @@ interface CircuitBreakerRuntimeConfig {
471
183
  * - On 429: halves `maxConcurrent` (floor at 1)
472
184
  * - On sustained success (no 429 for `recoveryIntervalMs`): increases `maxConcurrent` by 1
473
185
  */
474
- interface AdaptiveConcurrencyConfig {
186
+ export interface AdaptiveConcurrencyConfig {
475
187
  /** Enable adaptive concurrency. Default: false (disabled). */
476
188
  enabled?: boolean | undefined;
477
189
  /**
@@ -501,7 +213,7 @@ interface AdaptiveConcurrencyConfig {
501
213
  */
502
214
  recoveryIntervalMs?: number | undefined;
503
215
  }
504
- interface ToolsConfig {
216
+ export interface ToolsConfig {
505
217
  defaultExecutionStrategy: 'parallel' | 'sequential' | 'smart';
506
218
  maxIterations: number;
507
219
  iterationTimeoutMs: number;
@@ -566,7 +278,7 @@ interface ToolsConfig {
566
278
  loopDetection?: LoopDetectionConfig | undefined;
567
279
  }
568
280
  /** Tuning for the agent-loop repetition detector (`tools.loopDetection`). */
569
- interface LoopDetectionConfig {
281
+ export interface LoopDetectionConfig {
570
282
  /**
571
283
  * `steer-then-cut` (default): inject a corrective note at the steer
572
284
  * threshold, cut the turn only if repetition persists to the cut threshold.
@@ -590,7 +302,7 @@ interface LoopDetectionConfig {
590
302
  callRepeatThreshold?: number | undefined;
591
303
  }
592
304
  /** Allow/deny extension of the `exec` tool's built-in command allowlist. */
593
- interface ExecToolConfig {
305
+ export interface ExecToolConfig {
594
306
  /**
595
307
  * Extra command names to add to the allowlist (e.g. `["make", "dotnet"]`).
596
308
  * Trusted sources only — stripped from in-project repo config.
@@ -619,7 +331,7 @@ interface ExecToolConfig {
619
331
  */
620
332
  danger?: ExecDangerConfig | undefined;
621
333
  }
622
- interface ExecDangerConfig {
334
+ export interface ExecDangerConfig {
623
335
  /**
624
336
  * List of danger rule ids to skip. Each id corresponds to a rule in
625
337
  * `@wrongstack/tools/src/_danger-detect.ts` (e.g. `rm-recursive`,
@@ -629,8 +341,8 @@ interface ExecDangerConfig {
629
341
  */
630
342
  bypass?: string[] | undefined;
631
343
  }
632
- type ToolDescriptionMode = 'extend' | 'simple';
633
- type ToolDescriptionModeConfig = Record<string, ToolDescriptionMode | undefined>;
344
+ export type ToolDescriptionMode = 'extend' | 'simple';
345
+ export type ToolDescriptionModeConfig = Record<string, ToolDescriptionMode | undefined>;
634
346
  /**
635
347
  * Per-tool on-screen result rendering mode. Independent of
636
348
  * {@link ToolDescriptionMode}: `descriptionMode` controls the prose the
@@ -646,9 +358,9 @@ type ToolDescriptionModeConfig = Record<string, ToolDescriptionMode | undefined>
646
358
  * and `/tool <name> result simple`. The legacy `/tool <name> simple`
647
359
  * command sets BOTH at once for backward compatibility.
648
360
  */
649
- type ToolResultRenderMode = 'extend' | 'simple';
650
- type ToolResultRenderModeConfig = Record<string, ToolResultRenderMode | undefined>;
651
- interface ProviderApiKey {
361
+ export type ToolResultRenderMode = 'extend' | 'simple';
362
+ export type ToolResultRenderModeConfig = Record<string, ToolResultRenderMode | undefined>;
363
+ export interface ProviderApiKey {
652
364
  /** Short human-readable label (e.g. "personal", "work", "rate-limit-backup"). */
653
365
  label: string;
654
366
  /**
@@ -685,7 +397,7 @@ interface ProviderApiKey {
685
397
  */
686
398
  accountId?: string | undefined;
687
399
  }
688
- interface ProviderConfig {
400
+ export interface ProviderConfig {
689
401
  type: string;
690
402
  /**
691
403
  * Legacy single-key field. Still honored as a read fallback when `apiKeys`
@@ -753,7 +465,7 @@ interface ProviderConfig {
753
465
  * Resolved at subagent-spawn time so e.g. `security-scanner` can run a
754
466
  * different model than `documentation` while the leader stays on its own.
755
467
  */
756
- interface ModelMatrixEntry {
468
+ export interface ModelMatrixEntry {
757
469
  /** Provider registry id (e.g. "anthropic", "minimax", "zai"). When omitted,
758
470
  * the leader's provider is used with this entry's model. */
759
471
  provider?: string | undefined;
@@ -773,7 +485,7 @@ interface ModelMatrixEntry {
773
485
  */
774
486
  fallbackProfile?: string | undefined;
775
487
  }
776
- interface MCPServerConfig {
488
+ export interface MCPServerConfig {
777
489
  /** Human-readable description shown in `wstack mcp list`. */
778
490
  description?: string | undefined;
779
491
  name: string;
@@ -816,12 +528,39 @@ interface MCPServerConfig {
816
528
  * Example: passthroughEnv: ['GITHUB_PERSONAL_ACCESS_TOKEN', 'GITHUB_TOKEN']
817
529
  */
818
530
  passthroughEnv?: string[] | undefined;
531
+ /**
532
+ * Operational-health settings for this MCP server. Thresholds are optional;
533
+ * when omitted the server is considered healthy as long as its connection
534
+ * lifecycle succeeds. Latency thresholds compare against the rolling p95 of
535
+ * the bounded sample buffer; the in-flight threshold compares against the
536
+ * observed peak in-flight call count.
537
+ */
538
+ health?: MCPHealthConfig | undefined;
539
+ }
540
+ /** Per-server operational-health knobs. */
541
+ export interface MCPHealthConfig {
542
+ thresholds?: MCPHealthThresholds | undefined;
543
+ }
544
+ /**
545
+ * Configurable thresholds that can push an otherwise-healthy MCP server into
546
+ * the `degraded` health state. All thresholds are optional and disabled when
547
+ * omitted so existing behaviour is preserved.
548
+ */
549
+ export interface MCPHealthThresholds {
550
+ /** Connection latency p95 above this value marks the server degraded. */
551
+ connectionLatencyP95Ms?: number | undefined;
552
+ /** Discovery (capability listing) latency p95 above this marks degraded. */
553
+ discoveryLatencyP95Ms?: number | undefined;
554
+ /** Tool-call latency p95 above this marks degraded. */
555
+ callLatencyP95Ms?: number | undefined;
556
+ /** Peak in-flight calls above this marks the server saturated/degraded. */
557
+ inFlightCalls?: number | undefined;
819
558
  }
820
- interface LogConfig {
559
+ export interface LogConfig {
821
560
  level: 'error' | 'warn' | 'info' | 'debug' | 'trace';
822
561
  file?: string | undefined;
823
562
  }
824
- interface PluginConfig {
563
+ export interface PluginConfig {
825
564
  name: string;
826
565
  enabled?: boolean | undefined;
827
566
  options?: Record<string, unknown>;
@@ -833,7 +572,7 @@ interface PluginConfig {
833
572
  * is the minimum viable WrongStack: a single provider, a fixed config,
834
573
  * no network calls at startup.
835
574
  */
836
- interface FeaturesConfig {
575
+ export interface FeaturesConfig {
837
576
  /** Load MCP servers declared in `mcpServers`. */
838
577
  mcp: boolean;
839
578
  /** Load + initialise npm plugins declared in `plugins`. */
@@ -907,8 +646,51 @@ interface FeaturesConfig {
907
646
  */
908
647
  mailboxBridge?: 'auto' | 'off' | undefined;
909
648
  }
910
- interface AutonomyConfig {
911
- /** Default autonomy mode at startup. Default: "off". */
649
+ export interface SuperMemoryConfig {
650
+ /** Enable the project-local Super Memory backend. Default: true. */
651
+ enabled?: boolean | undefined;
652
+ storage?: {
653
+ /** Store memory inside the project under a gitignored directory. Default: true. */
654
+ projectLocal?: boolean | undefined;
655
+ /** Project-relative directory. Default: ".wrongstack/memories". */
656
+ directory?: string | undefined;
657
+ } | undefined;
658
+ inject?: {
659
+ /** Add relevant memory to ordinary turn-level context. Default: true. */
660
+ turnContext?: boolean | undefined;
661
+ /** Add relevant memory to read/tree/grep/bash/edit tool results. Default: true. */
662
+ toolResults?: boolean | undefined;
663
+ /** Maximum hints appended to a single tool result. Default: 4. */
664
+ maxHintsPerTool?: number | undefined;
665
+ /** Maximum characters appended to a single tool result. Default: 1200. */
666
+ maxCharsPerTool?: number | undefined;
667
+ /** Maximum memories appended to ordinary turn context. Default: 8. */
668
+ maxTurnMemories?: number | undefined;
669
+ /** Maximum characters appended to ordinary turn context. Default: 2400. */
670
+ maxCharsPerTurn?: number | undefined;
671
+ /** Minimum retrieval score for ordinary hints. Default: 0.65. */
672
+ minScore?: number | undefined;
673
+ /** Cooldown before the same memory can be injected again. Default: 30 minutes. */
674
+ repeatCooldownMs?: number | undefined;
675
+ triggers?: Partial<Record<'read' | 'tree' | 'grep' | 'glob' | 'codebase_search' | 'bash' | 'write' | 'edit' | 'patch', boolean>> | undefined;
676
+ } | undefined;
677
+ hygiene?: {
678
+ /** Run hygiene after successful sessions. Default: true. */
679
+ autoAfterSession?: boolean | undefined;
680
+ /** Re-check anchored memories when files are edited. Default: true. */
681
+ autoOnFileChange?: boolean | undefined;
682
+ /** Archive stale/low-value memories after this many days. Default: 90. */
683
+ retentionDays?: number | undefined;
684
+ /** Archive low-confidence memories after this many days. Default: 30. */
685
+ archiveLowConfidenceAfterDays?: number | undefined;
686
+ } | undefined;
687
+ embeddings?: {
688
+ /** Optional future semantic layer. Disabled by default and never required. */
689
+ enabled?: boolean | undefined;
690
+ } | undefined;
691
+ }
692
+ export interface AutonomyConfig {
693
+ /** Default autonomy mode at startup. Default: "auto". */
912
694
  defaultMode?: 'off' | 'suggest' | 'auto' | undefined;
913
695
  /** ms to wait before auto-proceeding in 'auto' mode. Default: 45000. */
914
696
  autoProceedDelayMs?: number | undefined;
@@ -920,8 +702,19 @@ interface AutonomyConfig {
920
702
  terminalTitleAnimation?: boolean | undefined;
921
703
  /** Persisted YOLO preference mirrored into top-level config.yolo at runtime. Default: false. */
922
704
  yolo?: boolean | undefined;
923
- /** Stream fleet/subagent output into the main TUI chat. Default: true. */
705
+ /**
706
+ * @deprecated Mirror of `fleetChatVerbosity !== 'off'`, kept for readers that
707
+ * still expect a boolean (webui prefs). Writers must keep it in sync.
708
+ */
924
709
  streamFleet?: boolean | undefined;
710
+ /**
711
+ * How much fleet/subagent activity is streamed into the main TUI chat.
712
+ * - 'off': no subagent lines (failures/errors still surface); F2/F3 stay live.
713
+ * - 'compact': spawn, one tool/message summary per agent turn, completion.
714
+ * - 'full': every subagent tool call and interim message (legacy behavior).
715
+ * Resolved via {@link resolveFleetChatVerbosity}. Default: 'compact'.
716
+ */
717
+ fleetChatVerbosity?: FleetChatVerbosity | undefined;
925
718
  /** Ring terminal bell when an agent run completes. Default: false. */
926
719
  chime?: boolean | undefined;
927
720
  /** Ask for confirmation before interrupt/exit. Default: true. */
@@ -930,12 +723,29 @@ interface AutonomyConfig {
930
723
  mouseMode?: boolean | undefined;
931
724
  /** Enable prompt refinement before sending. Default: true. */
932
725
  enhance?: boolean | undefined;
726
+ /**
727
+ * Provider id to use for goal refinement (`/goal set`). When set,
728
+ * the refiner uses this provider's model (see `refinerModel`)
729
+ * instead of the session's main provider/model. Falls back to the
730
+ * main session provider when unset or when the provider is unavailable.
731
+ * Default: unset (uses the main session provider).
732
+ */
733
+ refinerProvider?: string | undefined;
734
+ /**
735
+ * Model id to use for goal refinement. When `refinerProvider` is
736
+ * also set, the refiner uses this specific model on that provider.
737
+ * When only `refinerModel` is set (without a provider), the model
738
+ * is used on the session's main provider. When both are unset, the
739
+ * session's main model is used. Falls back to heuristic on failure.
740
+ * Default: unset (uses the main session model).
741
+ */
742
+ refinerModel?: string | undefined;
933
743
  /** Prompt-refinement preview countdown in ms. Default: 60000. */
934
744
  enhanceDelayMs?: number | undefined;
935
745
  /** Prompt-refinement language mode. Default: "original". */
936
746
  enhanceLanguage?: 'original' | 'english' | undefined;
937
747
  /** TUI statusline density. Default: "detailed". */
938
- statuslineMode?: 'minimum' | 'detailed' | undefined;
748
+ statuslineMode?: 'minimum' | 'detailed' | 'no-color' | undefined;
939
749
  /** Single short word shown in the TUI rainbow working-state chip. Default: "thinking". */
940
750
  thinkingWord?: string | undefined;
941
751
  /**
@@ -950,7 +760,7 @@ interface AutonomyConfig {
950
760
  * `config.autonomy.inputHistory` because the TUI-specific knobs on Config
951
761
  * are grouped there.
952
762
  */
953
- interface InputHistoryConfig {
763
+ export interface InputHistoryConfig {
954
764
  /** Persist history to ~/.wrongstack/projects/<slug>/input-history.json. Default: true. */
955
765
  enabled?: boolean | undefined;
956
766
  /** Max entries kept on disk (and in memory). Default: 100. */
@@ -961,7 +771,7 @@ interface InputHistoryConfig {
961
771
  * index (SQLite, `~/.wrongstack/projects/<hash>/codebase-index/index.db`) fresh
962
772
  * without the user having to call `codebase-index` by hand.
963
773
  */
964
- interface IndexingConfig {
774
+ export interface IndexingConfig {
965
775
  /** Run a blocking incremental index at session start (with a visible summary). Default: true. */
966
776
  onSessionStart: boolean;
967
777
  /** Reindex files the agent writes/edits via tools, in the background. Default: true. */
@@ -982,7 +792,7 @@ interface IndexingConfig {
982
792
  * can offer a one-line "Continue with last settings? [Y/n]" instead of
983
793
  * re-asking every question from scratch.
984
794
  */
985
- interface LaunchConfig {
795
+ export interface LaunchConfig {
986
796
  /** Interactive mode: 'tui' (Ink TUI) or 'repl' (readline REPL). */
987
797
  mode?: 'tui' | 'repl' | undefined;
988
798
  /** Start with Director mode on (fleet manifest + multi-agent orchestration). */
@@ -998,7 +808,7 @@ interface LaunchConfig {
998
808
  * Controls how much detail is persisted to the per-session JSONL log
999
809
  * (`~/.wrongstack/projects/<hash>/sessions/<date>/sess_<ULID>.jsonl`).
1000
810
  */
1001
- interface SessionLoggingConfig {
811
+ export interface SessionLoggingConfig {
1002
812
  /**
1003
813
  * How much detail to write to the persistent session log.
1004
814
  *
@@ -1025,8 +835,8 @@ interface SessionLoggingConfig {
1025
835
  };
1026
836
  };
1027
837
  }
1028
- type SyncCategory = 'settings' | 'skills' | 'prompts' | 'memory' | 'history';
1029
- interface SyncConfig {
838
+ export type SyncCategory = 'settings' | 'skills' | 'prompts' | 'memory' | 'history';
839
+ export interface SyncConfig {
1030
840
  enabled: boolean;
1031
841
  repo: string;
1032
842
  /** GitHub token (fine-grained PAT). Encrypted at rest via SecretVault. */
@@ -1039,7 +849,7 @@ interface SyncConfig {
1039
849
  * Used to add models not in the models.dev catalog, or override catalog
1040
850
  * facts when the real backend differs (e.g. local Ollama models, proxies).
1041
851
  */
1042
- interface CustomModelDefinition {
852
+ export interface CustomModelDefinition {
1043
853
  /** Provider this model belongs to. Defaults to the owning ProviderConfig. */
1044
854
  provider?: string | undefined;
1045
855
  /** Optional display name. */
@@ -1059,7 +869,7 @@ interface CustomModelDefinition {
1059
869
  * (arbitrary directories are a prompt-injection vector) — only `readClaudeSkills`
1060
870
  * and `mode` survive there.
1061
871
  */
1062
- interface SkillsConfig {
872
+ export interface SkillsConfig {
1063
873
  /**
1064
874
  * Read skills from foreign coding-agent directories (`<project>/.claude/skills`
1065
875
  * and `~/.claude/skills`). Default `true`. Lets Claude Code / Codex / Gemini /
@@ -1111,7 +921,20 @@ interface SkillsConfig {
1111
921
  * switch. See `FleetSupervisor` (coordination/fleet-supervisor.ts) for the
1112
922
  * supervisor semantics.
1113
923
  */
1114
- interface FleetConfig {
924
+ export interface FleetConfig {
925
+ /** Subagent process/registry lifecycle after it is no longer doing work. */
926
+ lifecycle?: {
927
+ /**
928
+ * Remove a spawned or between-task subagent after this much idle time.
929
+ * This is separate from the in-task activity watchdog. Default 30000.
930
+ */
931
+ idleTimeoutMs?: number | undefined;
932
+ /**
933
+ * Retire a subagent as soon as its final task result is delivered and
934
+ * no queued task reused it in the same dispatch cycle. Default true.
935
+ */
936
+ retireOnTaskComplete?: boolean | undefined;
937
+ } | undefined;
1115
938
  /** Fleet-wide hard ceilings. In-flight work may finish; new spawns are refused at the cap. */
1116
939
  budget?: {
1117
940
  /** Maximum subagents spawned during one Director lifetime. Default 64 in CLI. */
@@ -1170,7 +993,7 @@ interface FleetConfig {
1170
993
  supervisor?: FleetSupervisorConfig | undefined;
1171
994
  }
1172
995
  /** Config surface for the brain-gated FleetSupervisor. */
1173
- interface FleetSupervisorConfig {
996
+ export interface FleetSupervisorConfig {
1174
997
  /** Kill switch. Default true (active whenever a Director is running). */
1175
998
  enabled?: boolean | undefined;
1176
999
  /** Evaluation tick. Default 20000. */
@@ -1194,7 +1017,149 @@ interface FleetSupervisorConfig {
1194
1017
  /** Allow the supervisor to terminate subagents (highest risk). Default false. */
1195
1018
  allowTerminate?: boolean | undefined;
1196
1019
  }
1197
- interface Config {
1020
+ /**
1021
+ * One member of the Brain's LLM pool or council. String entries elsewhere
1022
+ * (`Config.brain.models`, council voters) parse with the same `parseModelRef`
1023
+ * grammar as `fallbackModels`: bare `model`, `provider/model`, or
1024
+ * `provider model`.
1025
+ */
1026
+ export interface BrainModelEntry {
1027
+ /** Provider id (a key of `Config.providers` or a catalog id). Defaults to the session provider. */
1028
+ provider?: string | undefined;
1029
+ /** Model id, required. */
1030
+ model: string;
1031
+ }
1032
+ /** One voting seat on the Brain council. */
1033
+ export interface BrainCouncilVoterConfig extends BrainModelEntry {
1034
+ /**
1035
+ * Decision lens for this seat. Built-ins: 'executor' (progress-biased),
1036
+ * 'skeptic' (risk-hunting), 'auditor' (cost/waste-focused). Any other
1037
+ * string is injected verbatim as the persona description.
1038
+ */
1039
+ persona?: string | undefined;
1040
+ /** Vote weight in the tally. Default 1. */
1041
+ weight?: number | undefined;
1042
+ /** When true, this seat's explicit refusal denies the request outright. */
1043
+ veto?: boolean | undefined;
1044
+ }
1045
+ /** Multi-LLM council configuration for high-stakes Brain decisions. */
1046
+ export interface BrainCouncilConfig {
1047
+ /** Kill switch. Default: enabled when `voters` is non-empty or ≥2 pool models exist. */
1048
+ enabled?: boolean | undefined;
1049
+ /**
1050
+ * Minimum request risk that convenes the council instead of the single-LLM
1051
+ * tier. Default 'high'. 'critical' = council only for critical questions;
1052
+ * 'medium' = council for most non-trivial questions (slow + expensive).
1053
+ */
1054
+ minRisk?: 'medium' | 'high' | 'critical' | undefined;
1055
+ /**
1056
+ * Voting seats. String entries use the `parseModelRef` grammar and get
1057
+ * default personas (executor, skeptic w/ veto, auditor) assigned in order.
1058
+ * When omitted, seats are derived from `brain.models` (up to 3).
1059
+ */
1060
+ voters?: Array<string | BrainCouncilVoterConfig> | undefined;
1061
+ /** Fraction of seats that must return a valid vote. Default 0.5. */
1062
+ quorum?: number | undefined;
1063
+ /** Fraction of cast vote weight the winning option must exceed. Default 0.5. */
1064
+ approval?: number | undefined;
1065
+ /**
1066
+ * Tie-breaker / synthesizer model (`parseModelRef` grammar or entry).
1067
+ * Sees every vote's rationale and issues the final structured decision.
1068
+ * Default: the first pool/voter model.
1069
+ */
1070
+ judge?: string | BrainModelEntry | undefined;
1071
+ }
1072
+ /**
1073
+ * Brain decision-layer configuration. SECURITY: in the in-project config
1074
+ * DENY list — a repo-committed config must not be able to raise the
1075
+ * autonomy ceiling, remove the human tier, or point Brain decisions at an
1076
+ * attacker-chosen provider. Only honoured from `~/.wrongstack/config.json`.
1077
+ */
1078
+ export interface BrainConfig {
1079
+ /**
1080
+ * 'headless' — the Brain NEVER blocks on a human. Escalations resolve
1081
+ * via the terminal policy (recommended option for low/medium
1082
+ * risk, request fallback semantics, otherwise deny).
1083
+ * 'interactive' — escalations prompt the human in the TUI/WebUI.
1084
+ * Default (resolved at boot by `resolveBrainConfigDefaults`): 'headless' —
1085
+ * minimum-human out of the box. Switch live with `/brain mode <m>`.
1086
+ */
1087
+ mode?: 'headless' | 'interactive' | undefined;
1088
+ /**
1089
+ * Initial autonomy ceiling for the LLM tier. Default (resolved at boot):
1090
+ * adaptive — 'all' when a council can convene (≥2 voters/pool models),
1091
+ * otherwise 'high'. Live-set via `/brain risk`.
1092
+ */
1093
+ maxAutoRisk?: 'off' | 'low' | 'medium' | 'high' | 'all' | undefined;
1094
+ /**
1095
+ * Ordered LLM pool for Brain decisions (`parseModelRef` grammar or
1096
+ * entries). With `strategy: 'fallback'` the first entry is primary and the
1097
+ * rest are tried in order when it fails; with 'round-robin' calls rotate
1098
+ * across the pool. Default (resolved at boot): the user's `fallbackModels`
1099
+ * chain; with none configured, the session provider/model is used.
1100
+ */
1101
+ models?: Array<string | BrainModelEntry> | undefined;
1102
+ /** Pool selection strategy. Default 'fallback'. */
1103
+ strategy?: 'fallback' | 'round-robin' | undefined;
1104
+ /** Per-LLM-call decision timeout (ms). Default 15000. */
1105
+ decisionTimeoutMs?: number | undefined;
1106
+ /**
1107
+ * Interactive mode only: how long an ask-human prompt may stay unanswered
1108
+ * before it resolves through the terminal policy instead of blocking
1109
+ * forever. Default (resolved at boot): 120000. Set 0 to wait indefinitely
1110
+ * (legacy behavior).
1111
+ */
1112
+ humanTimeoutMs?: number | undefined;
1113
+ /** Multi-LLM council for high-stakes decisions. */
1114
+ council?: BrainCouncilConfig | undefined;
1115
+ /**
1116
+ * Persistent decision ledger (`<project>/.wrongstack/brain-ledger.jsonl`):
1117
+ * every decision + observed outcome is appended, and outcome stats for
1118
+ * similar past decisions are fed back into the LLM/council prompts.
1119
+ * Default: enabled.
1120
+ */
1121
+ ledger?: {
1122
+ enabled?: boolean | undefined;
1123
+ /**
1124
+ * Deterministic guard: once this many consecutive approvals of a
1125
+ * decision group ended in observed failures, deny outright without
1126
+ * consulting any LLM (a later success lifts the guard). Default 3.
1127
+ * 0 disables.
1128
+ */
1129
+ autoDenyAfterFailures?: number | undefined;
1130
+ } | undefined;
1131
+ /**
1132
+ * BrainMonitor distress-signal thresholds (self-activation). All optional;
1133
+ * defaults match `BrainMonitorOptions`.
1134
+ */
1135
+ monitor?: {
1136
+ /** Consecutive failures of the same tool before engaging. Default 3. */
1137
+ toolFailureStreak?: number | undefined;
1138
+ /** Errors within 60s before engaging. Default 4. */
1139
+ errorStormCount?: number | undefined;
1140
+ /** Active run with no progress for this long → stall signal (ms). Default 300000. 0 disables. */
1141
+ stallMs?: number | undefined;
1142
+ /** Edits to the same file within the churn window before engaging. Default 5. */
1143
+ fileChurnThreshold?: number | undefined;
1144
+ /** Sliding window for the file-churn signal (ms). Default 600000. */
1145
+ fileChurnWindowMs?: number | undefined;
1146
+ /** Per-signal re-engagement cooldown (ms). Default 120000. */
1147
+ cooldownMs?: number | undefined;
1148
+ } | undefined;
1149
+ }
1150
+ /** Git behavior overrides for agent-run git commands. See `Config.git`. */
1151
+ export interface GitBehaviorConfig {
1152
+ /**
1153
+ * Commit identity injected as `GIT_AUTHOR_NAME/EMAIL` +
1154
+ * `GIT_COMMITTER_NAME/EMAIL` into every child process. Either field may be
1155
+ * set alone; the missing one falls back to git's own config.
1156
+ */
1157
+ identity?: {
1158
+ name?: string | undefined;
1159
+ email?: string | undefined;
1160
+ } | undefined;
1161
+ }
1162
+ export interface Config {
1198
1163
  version: 1;
1199
1164
  provider: string;
1200
1165
  model: string;
@@ -1291,6 +1256,8 @@ interface Config {
1291
1256
  plugins?: (string | PluginConfig)[] | undefined;
1292
1257
  log: LogConfig;
1293
1258
  features: FeaturesConfig;
1259
+ /** Project-local structured memory, graph-ready anchors, retrieval, and hygiene. */
1260
+ superMemory?: SuperMemoryConfig | undefined;
1294
1261
  /** Skill subsystem options (readClaudeSkills / mode / extraDirs). */
1295
1262
  skills?: SkillsConfig | undefined;
1296
1263
  yolo?: boolean | undefined;
@@ -1346,11 +1313,34 @@ interface Config {
1346
1313
  * honoured from the user's `~/.wrongstack/config.json`.
1347
1314
  */
1348
1315
  fleet?: FleetConfig | undefined;
1316
+ /**
1317
+ * Brain decision-layer settings: escalation mode (headless = never block
1318
+ * on a human), LLM pool with fallback/round-robin, autonomy ceiling, and
1319
+ * the multi-LLM council. SECURITY: in the in-project config DENY list —
1320
+ * a repo-committed config must not be able to raise the autonomy ceiling
1321
+ * or reroute Brain decisions. Only honoured from `~/.wrongstack/config.json`.
1322
+ */
1323
+ brain?: BrainConfig | undefined;
1349
1324
  /**
1350
1325
  * Cloud sync configuration. Stored separately in sync.json to avoid
1351
1326
  * accidentally committing the GitHub token to project configs.
1352
1327
  */
1353
1328
  sync?: SyncConfig | undefined;
1329
+ /**
1330
+ * Git behavior overrides for agent-run git commands.
1331
+ *
1332
+ * `identity` sets the commit author/committer used by every git process
1333
+ * WrongStack spawns (git tool, bash/exec shells, worktree manager,
1334
+ * plugins) via the `GIT_AUTHOR_*` / `GIT_COMMITTER_*` env vars. It never
1335
+ * touches the repo's or the user's `git config`, so commits made outside
1336
+ * WrongStack keep their normal identity. Unset → git's own config applies
1337
+ * (today's behavior). Manage at runtime with `/gitid`.
1338
+ *
1339
+ * SECURITY: in the in-project config DENY list — a repo-committed config
1340
+ * must not be able to spoof the identity written into the user's commit
1341
+ * history. Only honoured from the user's `~/.wrongstack/config.json`.
1342
+ */
1343
+ git?: GitBehaviorConfig | undefined;
1354
1344
  /**
1355
1345
  * Per-plugin namespaced config sections. Each plugin reads its own
1356
1346
  * subtree via `ConfigStore.getExtension(pluginName)`. Plugins should
@@ -1365,7 +1355,7 @@ interface Config {
1365
1355
  */
1366
1356
  extensions?: Record<string, Record<string, unknown>>;
1367
1357
  }
1368
- interface ConfigLoader {
1358
+ export interface ConfigLoader {
1369
1359
  load(opts?: {
1370
1360
  cliFlags?: Partial<Config> | undefined;
1371
1361
  cwd?: string | undefined;
@@ -1385,7 +1375,7 @@ interface ConfigLoader {
1385
1375
  * Updates happen through `update(partial)`, which produces a new Config
1386
1376
  * (structurally cloned, then frozen) and notifies watchers.
1387
1377
  */
1388
- interface ConfigStore {
1378
+ export interface ConfigStore {
1389
1379
  get(): Readonly<Config>;
1390
1380
  /**
1391
1381
  * Get a typed top-level section. Convenience for consumers that only
@@ -1406,5 +1396,4 @@ interface ConfigStore {
1406
1396
  /** Subscribe to changes. Returns an unsubscribe function. */
1407
1397
  watch(cb: (next: Readonly<Config>, prev: Readonly<Config>) => void): () => void;
1408
1398
  }
1409
-
1410
- export { type LoopDetectionConfig as $, type AdaptiveConcurrencyConfig as A, type ContextWindowModeId as B, type ConfiguredHook as C, type ContextWindowThresholds as D, type CustomModelDefinition as E, type FleetConfig as F, DEFAULT_CONTEXT_WINDOW_MODE_ID as G, type HookEvent as H, type InProcessHook as I, DEFAULT_TUI_THINKING_WORD as J, type ExecDangerConfig as K, type ExecToolConfig as L, type ModelsRegistry as M, type FeaturesConfig as N, type FleetSupervisorConfig as O, type ProviderConfig as P, type HookFailurePolicy as Q, type ResolvedModel as R, type ShellHook as S, type ToolResultRenderMode as T, type HookInvocationContext as U, type HqClientConfig as V, type WireFamily as W, type IndexingConfig as X, type InputHistoryConfig as Y, type LaunchConfig as Z, type LogConfig as _, type ModelMatrixEntry as a, MAX_TUI_THINKING_WORD_LENGTH as a0, type ModelRuntimeCacheConfig as a1, type ModelRuntimeParametersConfig as a2, type ModelRuntimeReasoningConfig as a3, type ModelsDevProvider as a4, type PluginConfig as a5, type PreToolUseOutcome as a6, type PreToolUseStage as a7, type ProviderApiKey as a8, type SessionLoggingConfig as a9, type SkillsConfig as aa, type SyncCategory as ab, type ToolDescriptionMode as ac, type ToolDescriptionModeConfig as ad, type ToolResultRenderModeConfig as ae, type ToolsConfig as af, formatContextWindowModeList as ag, getContextWindowMode as ah, isContextWindowModeId as ai, listContextWindowModes as aj, normalizeTokenSavingTier as ak, normalizeTuiThinkingWord as al, resolveContextWindowPolicy as am, type MCPServerConfig as b, type ModelsDevPayload as c, type ResolvedProvider as d, type ModelsDevModel as e, type HookMatcher as f, type HookRegistrationOptions as g, type HttpHook as h, type HookEntry as i, type Config as j, type ModelRuntimeConfig as k, type ConfigLoader as l, type SyncConfig as m, type ConfigStore as n, type ContextWindowAggressiveOn as o, type ContextWindowPolicy as p, type TokenSavingTier as q, type HookInput as r, type HookOutcome as s, type AnyHookOutcome as t, type AutonomyConfig as u, CONTEXT_WINDOW_MODES as v, type CircuitBreakerRuntimeConfig as w, type ContextConfig as x, type ContextWindowConfigLike as y, type ContextWindowMode as z };
1399
+ //# sourceMappingURL=config.d.ts.map