@wrongstack/core 0.284.1 → 0.286.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (831) hide show
  1. package/dist/agent-status-tracker.d.ts +74 -0
  2. package/dist/agent-status-tracker.d.ts.map +1 -0
  3. package/dist/autophase/auto-phase-planner.d.ts +79 -0
  4. package/dist/autophase/auto-phase-planner.d.ts.map +1 -0
  5. package/dist/autophase/auto-phase-runner.d.ts +79 -0
  6. package/dist/autophase/auto-phase-runner.d.ts.map +1 -0
  7. package/dist/autophase/checkpoint.d.ts +49 -0
  8. package/dist/autophase/checkpoint.d.ts.map +1 -0
  9. package/dist/autophase/index.d.ts +9 -0
  10. package/dist/autophase/index.d.ts.map +1 -0
  11. package/dist/autophase/phase-graph-builder.d.ts +46 -0
  12. package/dist/autophase/phase-graph-builder.d.ts.map +1 -0
  13. package/dist/autophase/phase-orchestrator.d.ts +150 -0
  14. package/dist/autophase/phase-orchestrator.d.ts.map +1 -0
  15. package/dist/autophase/phase-store.d.ts +29 -0
  16. package/dist/autophase/phase-store.d.ts.map +1 -0
  17. package/dist/autophase/types.d.ts +329 -0
  18. package/dist/autophase/types.d.ts.map +1 -0
  19. package/dist/boot.d.ts +73 -0
  20. package/dist/boot.d.ts.map +1 -0
  21. package/dist/coordination/adaptive-concurrency.d.ts +63 -0
  22. package/dist/coordination/adaptive-concurrency.d.ts.map +1 -0
  23. package/dist/coordination/agent-bridge.d.ts +24 -0
  24. package/dist/coordination/agent-bridge.d.ts.map +1 -0
  25. package/dist/coordination/agent-monitor.d.ts +129 -0
  26. package/dist/coordination/agent-monitor.d.ts.map +1 -0
  27. package/dist/coordination/agent-subagent-runner.d.ts +74 -0
  28. package/dist/coordination/agent-subagent-runner.d.ts.map +1 -0
  29. package/dist/coordination/agents/agent-prompts.d.ts +2 -0
  30. package/dist/coordination/agents/agent-prompts.d.ts.map +1 -0
  31. package/dist/coordination/agents/index.d.ts +35 -0
  32. package/dist/coordination/agents/index.d.ts.map +1 -0
  33. package/dist/coordination/agents/phase1-discovery.d.ts +4 -0
  34. package/dist/coordination/agents/phase1-discovery.d.ts.map +1 -0
  35. package/dist/coordination/agents/phase2-planning.d.ts +4 -0
  36. package/dist/coordination/agents/phase2-planning.d.ts.map +1 -0
  37. package/dist/coordination/agents/phase3-build.d.ts +4 -0
  38. package/dist/coordination/agents/phase3-build.d.ts.map +1 -0
  39. package/dist/coordination/agents/phase3-techstack.d.ts +13 -0
  40. package/dist/coordination/agents/phase3-techstack.d.ts.map +1 -0
  41. package/dist/coordination/agents/phase4-verify.d.ts +4 -0
  42. package/dist/coordination/agents/phase4-verify.d.ts.map +1 -0
  43. package/dist/coordination/agents/phase5-review.d.ts +4 -0
  44. package/dist/coordination/agents/phase5-review.d.ts.map +1 -0
  45. package/dist/coordination/agents/phase6-domain.d.ts +4 -0
  46. package/dist/coordination/agents/phase6-domain.d.ts.map +1 -0
  47. package/dist/coordination/agents/phase7-knowledge.d.ts +4 -0
  48. package/dist/coordination/agents/phase7-knowledge.d.ts.map +1 -0
  49. package/dist/coordination/agents/phase8-delivery.d.ts +4 -0
  50. package/dist/coordination/agents/phase8-delivery.d.ts.map +1 -0
  51. package/dist/coordination/agents/phase9-meta.d.ts +4 -0
  52. package/dist/coordination/agents/phase9-meta.d.ts.map +1 -0
  53. package/dist/coordination/agents/types.d.ts +79 -0
  54. package/dist/coordination/agents/types.d.ts.map +1 -0
  55. package/dist/coordination/agents.d.ts +8 -0
  56. package/dist/coordination/agents.d.ts.map +1 -0
  57. package/dist/coordination/auto-extend.d.ts +46 -0
  58. package/dist/coordination/auto-extend.d.ts.map +1 -0
  59. package/dist/coordination/autonomous-brain.d.ts +152 -0
  60. package/dist/coordination/autonomous-brain.d.ts.map +1 -0
  61. package/dist/coordination/autonomous-coordinator.d.ts +243 -0
  62. package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
  63. package/dist/coordination/brain-ledger.d.ts +142 -0
  64. package/dist/coordination/brain-ledger.d.ts.map +1 -0
  65. package/dist/coordination/brain-monitor.d.ts +103 -0
  66. package/dist/coordination/brain-monitor.d.ts.map +1 -0
  67. package/dist/coordination/brain.d.ts +147 -0
  68. package/dist/coordination/brain.d.ts.map +1 -0
  69. package/dist/coordination/change-manager.d.ts +151 -0
  70. package/dist/coordination/change-manager.d.ts.map +1 -0
  71. package/dist/coordination/checkpoint-wiring.d.ts +61 -0
  72. package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
  73. package/dist/coordination/collab-bus.d.ts +132 -0
  74. package/dist/coordination/collab-bus.d.ts.map +1 -0
  75. package/dist/coordination/collab-debug.d.ts +302 -0
  76. package/dist/coordination/collab-debug.d.ts.map +1 -0
  77. package/dist/coordination/commit-safety.d.ts +72 -0
  78. package/dist/coordination/commit-safety.d.ts.map +1 -0
  79. package/dist/coordination/consensus-protocol.d.ts +106 -0
  80. package/dist/coordination/consensus-protocol.d.ts.map +1 -0
  81. package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
  82. package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
  83. package/dist/coordination/delegate-tool.d.ts +101 -0
  84. package/dist/coordination/delegate-tool.d.ts.map +1 -0
  85. package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
  86. package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
  87. package/dist/coordination/dep-watcher.d.ts +74 -0
  88. package/dist/coordination/dep-watcher.d.ts.map +1 -0
  89. package/dist/coordination/director/director-errors.d.ts +29 -0
  90. package/dist/coordination/director/director-errors.d.ts.map +1 -0
  91. package/dist/coordination/director-construction.d.ts +90 -0
  92. package/dist/coordination/director-construction.d.ts.map +1 -0
  93. package/dist/coordination/director-prompts.d.ts +119 -0
  94. package/dist/coordination/director-prompts.d.ts.map +1 -0
  95. package/dist/coordination/director-session.d.ts +68 -0
  96. package/dist/coordination/director-session.d.ts.map +1 -0
  97. package/dist/coordination/director-tools.d.ts +65 -0
  98. package/dist/coordination/director-tools.d.ts.map +1 -0
  99. package/dist/coordination/director.d.ts +802 -0
  100. package/dist/coordination/director.d.ts.map +1 -0
  101. package/dist/coordination/dispatcher.d.ts +82 -0
  102. package/dist/coordination/dispatcher.d.ts.map +1 -0
  103. package/dist/coordination/file-author-tracker.d.ts +76 -0
  104. package/dist/coordination/file-author-tracker.d.ts.map +1 -0
  105. package/dist/coordination/fleet-bus.d.ts +122 -0
  106. package/dist/coordination/fleet-bus.d.ts.map +1 -0
  107. package/dist/coordination/fleet-event-validation.d.ts +10 -0
  108. package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
  109. package/dist/coordination/fleet-manager.d.ts +234 -0
  110. package/dist/coordination/fleet-manager.d.ts.map +1 -0
  111. package/dist/coordination/fleet-spawn.d.ts +102 -0
  112. package/dist/coordination/fleet-spawn.d.ts.map +1 -0
  113. package/dist/coordination/fleet-status-tool.d.ts +36 -0
  114. package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
  115. package/dist/coordination/fleet-supervisor.d.ts +157 -0
  116. package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
  117. package/dist/coordination/fleet.d.ts +96 -0
  118. package/dist/coordination/fleet.d.ts.map +1 -0
  119. package/dist/coordination/global-mailbox.d.ts +295 -0
  120. package/dist/coordination/global-mailbox.d.ts.map +1 -0
  121. package/dist/coordination/icoordinator.d.ts +97 -0
  122. package/dist/coordination/icoordinator.d.ts.map +1 -0
  123. package/dist/coordination/ifleet-manager.d.ts +177 -0
  124. package/dist/coordination/ifleet-manager.d.ts.map +1 -0
  125. package/dist/coordination/in-memory-transport.d.ts +12 -0
  126. package/dist/coordination/in-memory-transport.d.ts.map +1 -0
  127. package/dist/coordination/index.d.ts +79 -2587
  128. package/dist/coordination/index.d.ts.map +1 -0
  129. package/dist/coordination/index.js +2262 -673
  130. package/dist/coordination/index.js.map +7 -1
  131. package/dist/coordination/knowledge-graph.d.ts +229 -0
  132. package/dist/coordination/knowledge-graph.d.ts.map +1 -0
  133. package/dist/coordination/large-answer-store.d.ts +61 -0
  134. package/dist/coordination/large-answer-store.d.ts.map +1 -0
  135. package/dist/coordination/mail-tools.d.ts +34 -0
  136. package/dist/coordination/mail-tools.d.ts.map +1 -0
  137. package/dist/coordination/mailbox-actions.d.ts +67 -0
  138. package/dist/coordination/mailbox-actions.d.ts.map +1 -0
  139. package/dist/coordination/mailbox-constants.d.ts +64 -0
  140. package/dist/coordination/mailbox-constants.d.ts.map +1 -0
  141. package/dist/coordination/mailbox-events.d.ts +32 -0
  142. package/dist/coordination/mailbox-events.d.ts.map +1 -0
  143. package/dist/coordination/mailbox-health.d.ts +131 -0
  144. package/dist/coordination/mailbox-health.d.ts.map +1 -0
  145. package/dist/coordination/mailbox-hooks.d.ts +55 -0
  146. package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
  147. package/dist/coordination/mailbox-message-codec.d.ts +8 -0
  148. package/dist/coordination/mailbox-message-codec.d.ts.map +1 -0
  149. package/dist/coordination/mailbox-tool.d.ts +75 -0
  150. package/dist/coordination/mailbox-tool.d.ts.map +1 -0
  151. package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +125 -26
  152. package/dist/coordination/mailbox-types.d.ts.map +1 -0
  153. package/dist/coordination/mailbox.d.ts +88 -0
  154. package/dist/coordination/mailbox.d.ts.map +1 -0
  155. package/dist/coordination/model-matrix.d.ts +98 -0
  156. package/dist/coordination/model-matrix.d.ts.map +1 -0
  157. package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
  158. package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
  159. package/dist/coordination/null-fleet-bus.d.ts +10 -0
  160. package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
  161. package/dist/coordination/package-author-tracker.d.ts +87 -0
  162. package/dist/coordination/package-author-tracker.d.ts.map +1 -0
  163. package/dist/coordination/package-outdated-watcher.d.ts +83 -0
  164. package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
  165. package/dist/coordination/single-instance-mailbox.d.ts +154 -0
  166. package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
  167. package/dist/coordination/spawn-budget.d.ts +6 -0
  168. package/dist/coordination/spawn-budget.d.ts.map +1 -0
  169. package/dist/coordination/subagent-budget.d.ts +323 -0
  170. package/dist/coordination/subagent-budget.d.ts.map +1 -0
  171. package/dist/coordination/subagent-nicknames.d.ts +42 -0
  172. package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
  173. package/dist/coordination/subagent-result-tool.d.ts +20 -0
  174. package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
  175. package/dist/coordination/task-auctioneer.d.ts +143 -0
  176. package/dist/coordination/task-auctioneer.d.ts.map +1 -0
  177. package/dist/coordination/task-dag.d.ts +147 -0
  178. package/dist/coordination/task-dag.d.ts.map +1 -0
  179. package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
  180. package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
  181. package/dist/coordination/transport.d.ts +2 -0
  182. package/dist/coordination/transport.d.ts.map +1 -0
  183. package/dist/coordination/worktree-task-runner.d.ts +45 -0
  184. package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
  185. package/dist/core/agent-internals.d.ts +41 -0
  186. package/dist/core/agent-internals.d.ts.map +1 -0
  187. package/dist/core/agent-loop.d.ts +18 -0
  188. package/dist/core/agent-loop.d.ts.map +1 -0
  189. package/dist/core/agent-response.d.ts +21 -0
  190. package/dist/core/agent-response.d.ts.map +1 -0
  191. package/dist/core/agent-tools.d.ts +21 -0
  192. package/dist/core/agent-tools.d.ts.map +1 -0
  193. package/dist/core/agent-types.d.ts +95 -0
  194. package/dist/core/agent-types.d.ts.map +1 -0
  195. package/dist/core/agent.d.ts +54 -0
  196. package/dist/core/agent.d.ts.map +1 -0
  197. package/dist/core/btw.d.ts +40 -0
  198. package/dist/core/btw.d.ts.map +1 -0
  199. package/dist/core/context.d.ts +269 -0
  200. package/dist/core/context.d.ts.map +1 -0
  201. package/dist/core/continue-intent.d.ts +92 -0
  202. package/dist/core/continue-intent.d.ts.map +1 -0
  203. package/dist/core/continue-to-next-iteration.d.ts +96 -0
  204. package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
  205. package/dist/core/conversation-state.d.ts +96 -0
  206. package/dist/core/conversation-state.d.ts.map +1 -0
  207. package/dist/core/fallback-model.d.ts +94 -0
  208. package/dist/core/fallback-model.d.ts.map +1 -0
  209. package/dist/core/fleet-pulse.d.ts +42 -0
  210. package/dist/core/fleet-pulse.d.ts.map +1 -0
  211. package/dist/core/input-builder.d.ts +95 -0
  212. package/dist/core/input-builder.d.ts.map +1 -0
  213. package/dist/core/instruction-bundle.d.ts +22 -0
  214. package/dist/core/instruction-bundle.d.ts.map +1 -0
  215. package/dist/core/iteration-limit.d.ts +35 -0
  216. package/dist/core/iteration-limit.d.ts.map +1 -0
  217. package/dist/core/mailbox-loop.d.ts +63 -0
  218. package/dist/core/mailbox-loop.d.ts.map +1 -0
  219. package/dist/core/modes/brief.d.ts +2 -0
  220. package/dist/core/modes/brief.d.ts.map +1 -0
  221. package/dist/core/modes/default.d.ts +8 -0
  222. package/dist/core/modes/default.d.ts.map +1 -0
  223. package/dist/core/modes/teach.d.ts +2 -0
  224. package/dist/core/modes/teach.d.ts.map +1 -0
  225. package/dist/core/provider-runner.d.ts +24 -0
  226. package/dist/core/provider-runner.d.ts.map +1 -0
  227. package/dist/core/queued-messages.d.ts +55 -0
  228. package/dist/core/queued-messages.d.ts.map +1 -0
  229. package/dist/core/run-env.d.ts +49 -0
  230. package/dist/core/run-env.d.ts.map +1 -0
  231. package/dist/core/streaming-response-builder.d.ts +78 -0
  232. package/dist/core/streaming-response-builder.d.ts.map +1 -0
  233. package/dist/core/system-prompt-builder.d.ts +213 -0
  234. package/dist/core/system-prompt-builder.d.ts.map +1 -0
  235. package/dist/defaults/index.d.ts +68 -158
  236. package/dist/defaults/index.d.ts.map +1 -0
  237. package/dist/defaults/index.js +2061 -1300
  238. package/dist/defaults/index.js.map +7 -1
  239. package/dist/execution/auto-compaction-middleware.d.ts +123 -0
  240. package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
  241. package/dist/execution/autonomous-runner.d.ts +61 -0
  242. package/dist/execution/autonomous-runner.d.ts.map +1 -0
  243. package/dist/execution/autonomy-brain.d.ts +151 -0
  244. package/dist/execution/autonomy-brain.d.ts.map +1 -0
  245. package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
  246. package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
  247. package/dist/execution/brain-chain.d.ts +53 -0
  248. package/dist/execution/brain-chain.d.ts.map +1 -0
  249. package/dist/execution/brain-evaluation.d.ts +66 -0
  250. package/dist/execution/brain-evaluation.d.ts.map +1 -0
  251. package/dist/execution/brain-runtime.d.ts +171 -0
  252. package/dist/execution/brain-runtime.d.ts.map +1 -0
  253. package/dist/execution/compaction-core.d.ts +103 -0
  254. package/dist/execution/compaction-core.d.ts.map +1 -0
  255. package/dist/execution/compactor.d.ts +56 -0
  256. package/dist/execution/compactor.d.ts.map +1 -0
  257. package/dist/execution/council-brain.d.ts +79 -0
  258. package/dist/execution/council-brain.d.ts.map +1 -0
  259. package/dist/execution/design-color.d.ts +31 -0
  260. package/dist/execution/design-color.d.ts.map +1 -0
  261. package/dist/execution/design-detect.d.ts +96 -0
  262. package/dist/execution/design-detect.d.ts.map +1 -0
  263. package/dist/execution/design-kit-loader.d.ts +53 -0
  264. package/dist/execution/design-kit-loader.d.ts.map +1 -0
  265. package/dist/execution/design-materialize.d.ts +32 -0
  266. package/dist/execution/design-materialize.d.ts.map +1 -0
  267. package/dist/execution/design-project-store.d.ts +57 -0
  268. package/dist/execution/design-project-store.d.ts.map +1 -0
  269. package/dist/execution/design-verify.d.ts +44 -0
  270. package/dist/execution/design-verify.d.ts.map +1 -0
  271. package/dist/execution/error-handler.d.ts +34 -0
  272. package/dist/execution/error-handler.d.ts.map +1 -0
  273. package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +22 -225
  274. package/dist/execution/eternal-autonomy.d.ts.map +1 -0
  275. package/dist/execution/goal-preamble.d.ts +2 -0
  276. package/dist/execution/goal-preamble.d.ts.map +1 -0
  277. package/dist/execution/index.d.ts +25 -180
  278. package/dist/execution/index.d.ts.map +1 -0
  279. package/dist/execution/index.js +1748 -490
  280. package/dist/execution/index.js.map +7 -1
  281. package/dist/execution/intelligent-compactor.d.ts +85 -0
  282. package/dist/execution/intelligent-compactor.d.ts.map +1 -0
  283. package/dist/execution/model-runtime.d.ts +75 -0
  284. package/dist/execution/model-runtime.d.ts.map +1 -0
  285. package/dist/execution/parallel-eternal-engine.d.ts +142 -0
  286. package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
  287. package/dist/execution/prompt-enhancer.d.ts +12 -13
  288. package/dist/execution/prompt-enhancer.d.ts.map +1 -0
  289. package/dist/execution/prompt-enhancer.js +13 -7
  290. package/dist/execution/prompt-enhancer.js.map +7 -1
  291. package/dist/execution/prompt-loader.d.ts +52 -0
  292. package/dist/execution/prompt-loader.d.ts.map +1 -0
  293. package/dist/execution/provider-runner-impl.d.ts +14 -0
  294. package/dist/execution/provider-runner-impl.d.ts.map +1 -0
  295. package/dist/execution/regex-patterns.d.ts +7 -0
  296. package/dist/execution/regex-patterns.d.ts.map +1 -0
  297. package/dist/execution/retry-policy.d.ts +35 -0
  298. package/dist/execution/retry-policy.d.ts.map +1 -0
  299. package/dist/execution/selective-compactor.d.ts +94 -0
  300. package/dist/execution/selective-compactor.d.ts.map +1 -0
  301. package/dist/execution/skill-loader.d.ts +43 -0
  302. package/dist/execution/skill-loader.d.ts.map +1 -0
  303. package/dist/execution/strategy-compactor.d.ts +43 -0
  304. package/dist/execution/strategy-compactor.d.ts.map +1 -0
  305. package/dist/execution/tool-executor.d.ts +112 -0
  306. package/dist/execution/tool-executor.d.ts.map +1 -0
  307. package/dist/extension/extension-points.d.ts +121 -0
  308. package/dist/extension/extension-points.d.ts.map +1 -0
  309. package/dist/extension/index.d.ts +3 -10
  310. package/dist/extension/index.d.ts.map +1 -0
  311. package/dist/extension/index.js +59 -5
  312. package/dist/extension/index.js.map +7 -1
  313. package/dist/extension/registry.d.ts +86 -0
  314. package/dist/extension/registry.d.ts.map +1 -0
  315. package/dist/fleet-notifier.d.ts +28 -0
  316. package/dist/fleet-notifier.d.ts.map +1 -0
  317. package/dist/hooks/http-executor.d.ts +11 -0
  318. package/dist/hooks/http-executor.d.ts.map +1 -0
  319. package/dist/hooks/index.d.ts +10 -0
  320. package/dist/hooks/index.d.ts.map +1 -0
  321. package/dist/hooks/registry.d.ts +71 -0
  322. package/dist/hooks/registry.d.ts.map +1 -0
  323. package/dist/hooks/runner.d.ts +65 -0
  324. package/dist/hooks/runner.d.ts.map +1 -0
  325. package/dist/hooks/shell-executor.d.ts +33 -0
  326. package/dist/hooks/shell-executor.d.ts.map +1 -0
  327. package/dist/hooks/shell-hooks-equal.d.ts +15 -0
  328. package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
  329. package/dist/hq/agent-bridge.d.ts +27 -0
  330. package/dist/hq/agent-bridge.d.ts.map +1 -0
  331. package/dist/hq/alerts.d.ts +67 -0
  332. package/dist/hq/alerts.d.ts.map +1 -0
  333. package/dist/hq/auth-store.d.ts +179 -0
  334. package/dist/hq/auth-store.d.ts.map +1 -0
  335. package/dist/hq/brain-bridge.d.ts +37 -0
  336. package/dist/hq/brain-bridge.d.ts.map +1 -0
  337. package/dist/hq/commands.d.ts +122 -0
  338. package/dist/hq/commands.d.ts.map +1 -0
  339. package/dist/hq/cost-bridge.d.ts +36 -0
  340. package/dist/hq/cost-bridge.d.ts.map +1 -0
  341. package/dist/hq/factory.d.ts +69 -0
  342. package/dist/hq/factory.d.ts.map +1 -0
  343. package/dist/hq/fleet-bridge.d.ts +39 -0
  344. package/dist/hq/fleet-bridge.d.ts.map +1 -0
  345. package/dist/hq/index.d.ts +18 -816
  346. package/dist/hq/index.d.ts.map +1 -0
  347. package/dist/hq/index.js +1043 -192
  348. package/dist/hq/index.js.map +7 -1
  349. package/dist/hq/mailbox-mapper.d.ts +27 -0
  350. package/dist/hq/mailbox-mapper.d.ts.map +1 -0
  351. package/dist/hq/persistence.d.ts +121 -0
  352. package/dist/hq/persistence.d.ts.map +1 -0
  353. package/dist/hq/protocol.d.ts +612 -0
  354. package/dist/hq/protocol.d.ts.map +1 -0
  355. package/dist/hq/publisher.d.ts +181 -0
  356. package/dist/hq/publisher.d.ts.map +1 -0
  357. package/dist/hq/redaction.d.ts +30 -0
  358. package/dist/hq/redaction.d.ts.map +1 -0
  359. package/dist/hq/session-bridge.d.ts +29 -0
  360. package/dist/hq/session-bridge.d.ts.map +1 -0
  361. package/dist/hq/tool-bridge.d.ts +41 -0
  362. package/dist/hq/tool-bridge.d.ts.map +1 -0
  363. package/dist/hq/transcript-mapper.d.ts +36 -0
  364. package/dist/hq/transcript-mapper.d.ts.map +1 -0
  365. package/dist/hq/worktree-bridge.d.ts +34 -0
  366. package/dist/hq/worktree-bridge.d.ts.map +1 -0
  367. package/dist/index.d.ts +114 -2872
  368. package/dist/index.d.ts.map +1 -0
  369. package/dist/index.js +6104 -2737
  370. package/dist/index.js.map +7 -1
  371. package/dist/infrastructure/context-manager.d.ts +92 -0
  372. package/dist/infrastructure/context-manager.d.ts.map +1 -0
  373. package/dist/infrastructure/index.d.ts +6 -64
  374. package/dist/infrastructure/index.d.ts.map +1 -0
  375. package/dist/infrastructure/index.js +39 -12
  376. package/dist/infrastructure/index.js.map +7 -1
  377. package/dist/infrastructure/logger.d.ts +99 -0
  378. package/dist/infrastructure/logger.d.ts.map +1 -0
  379. package/dist/infrastructure/mcp-servers.d.ts +83 -0
  380. package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
  381. package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
  382. package/dist/infrastructure/path-resolver.d.ts.map +1 -0
  383. package/dist/infrastructure/token-counter.d.ts +57 -0
  384. package/dist/infrastructure/token-counter.d.ts.map +1 -0
  385. package/dist/kernel/container.d.ts +84 -0
  386. package/dist/kernel/container.d.ts.map +1 -0
  387. package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +134 -210
  388. package/dist/kernel/events.d.ts.map +1 -0
  389. package/dist/kernel/index.d.ts +6 -107
  390. package/dist/kernel/index.d.ts.map +1 -0
  391. package/dist/kernel/index.js +56 -4
  392. package/dist/kernel/index.js.map +7 -1
  393. package/dist/kernel/pipeline.d.ts +105 -0
  394. package/dist/kernel/pipeline.d.ts.map +1 -0
  395. package/dist/kernel/run-controller.d.ts +55 -0
  396. package/dist/kernel/run-controller.d.ts.map +1 -0
  397. package/dist/kernel/tokens.d.ts +53 -0
  398. package/dist/kernel/tokens.d.ts.map +1 -0
  399. package/dist/mailbox-attach.d.ts +27 -0
  400. package/dist/mailbox-attach.d.ts.map +1 -0
  401. package/dist/middleware/collab-pause.d.ts +73 -0
  402. package/dist/middleware/collab-pause.d.ts.map +1 -0
  403. package/dist/models/codex-catalog.d.ts +41 -0
  404. package/dist/models/codex-catalog.d.ts.map +1 -0
  405. package/dist/models/index.d.ts +8 -163
  406. package/dist/models/index.d.ts.map +1 -0
  407. package/dist/models/index.js +150 -51
  408. package/dist/models/index.js.map +7 -1
  409. package/dist/models/llm-selector.d.ts +47 -0
  410. package/dist/models/llm-selector.d.ts.map +1 -0
  411. package/dist/models/mode-store.d.ts +22 -0
  412. package/dist/models/mode-store.d.ts.map +1 -0
  413. package/dist/models/model-intelligence.d.ts +56 -0
  414. package/dist/models/model-intelligence.d.ts.map +1 -0
  415. package/dist/models/model-router.d.ts +100 -0
  416. package/dist/models/model-router.d.ts.map +1 -0
  417. package/dist/models/models-registry.d.ts +106 -0
  418. package/dist/models/models-registry.d.ts.map +1 -0
  419. package/dist/models/provider-model-resolve.d.ts +69 -0
  420. package/dist/models/provider-model-resolve.d.ts.map +1 -0
  421. package/dist/observability/event-bridge.d.ts +10 -0
  422. package/dist/observability/event-bridge.d.ts.map +1 -0
  423. package/dist/observability/health.d.ts +18 -0
  424. package/dist/observability/health.d.ts.map +1 -0
  425. package/dist/observability/index.d.ts +9 -354
  426. package/dist/observability/index.d.ts.map +1 -0
  427. package/dist/observability/index.js +37 -23
  428. package/dist/observability/index.js.map +7 -1
  429. package/dist/observability/metrics.d.ts +26 -0
  430. package/dist/observability/metrics.d.ts.map +1 -0
  431. package/dist/observability/otel-tracer.d.ts +41 -0
  432. package/dist/observability/otel-tracer.d.ts.map +1 -0
  433. package/dist/observability/otlp-metrics.d.ts +111 -0
  434. package/dist/observability/otlp-metrics.d.ts.map +1 -0
  435. package/dist/observability/otlp-traces.d.ts +95 -0
  436. package/dist/observability/otlp-traces.d.ts.map +1 -0
  437. package/dist/observability/prometheus.d.ts +49 -0
  438. package/dist/observability/prometheus.d.ts.map +1 -0
  439. package/dist/observability/tracer.d.ts +9 -0
  440. package/dist/observability/tracer.d.ts.map +1 -0
  441. package/dist/plugin/api.d.ts +226 -0
  442. package/dist/plugin/api.d.ts.map +1 -0
  443. package/dist/plugin/loader.d.ts +73 -0
  444. package/dist/plugin/loader.d.ts.map +1 -0
  445. package/dist/plugins/chimera-plugin.d.ts +37 -0
  446. package/dist/plugins/chimera-plugin.d.ts.map +1 -0
  447. package/dist/plugins/prompts-plugin.d.ts +26 -0
  448. package/dist/plugins/prompts-plugin.d.ts.map +1 -0
  449. package/dist/plugins/security-plugin.d.ts +19 -0
  450. package/dist/plugins/security-plugin.d.ts.map +1 -0
  451. package/dist/plugins/skills-plugin.d.ts +42 -0
  452. package/dist/plugins/skills-plugin.d.ts.map +1 -0
  453. package/dist/plugins/sync-plugin.d.ts +22 -0
  454. package/dist/plugins/sync-plugin.d.ts.map +1 -0
  455. package/dist/prompts/index.d.ts +3 -0
  456. package/dist/prompts/index.d.ts.map +1 -0
  457. package/dist/prompts/prompt-installer.d.ts +50 -0
  458. package/dist/prompts/prompt-installer.d.ts.map +1 -0
  459. package/dist/prompts/prompt-manifest-store.d.ts +18 -0
  460. package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
  461. package/dist/registry/provider-registry.d.ts +51 -0
  462. package/dist/registry/provider-registry.d.ts.map +1 -0
  463. package/dist/registry/slash-command-registry.d.ts +61 -0
  464. package/dist/registry/slash-command-registry.d.ts.map +1 -0
  465. package/dist/registry/tool-registry.d.ts +154 -0
  466. package/dist/registry/tool-registry.d.ts.map +1 -0
  467. package/dist/replay/hash.d.ts +31 -0
  468. package/dist/replay/hash.d.ts.map +1 -0
  469. package/dist/replay/replay-provider-runner.d.ts +53 -0
  470. package/dist/replay/replay-provider-runner.d.ts.map +1 -0
  471. package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
  472. package/dist/security/capabilities.d.ts.map +1 -0
  473. package/dist/security/config-secrets.d.ts +25 -0
  474. package/dist/security/config-secrets.d.ts.map +1 -0
  475. package/dist/security/index.d.ts +7 -8
  476. package/dist/security/index.d.ts.map +1 -0
  477. package/dist/security/index.js +354 -401
  478. package/dist/security/index.js.map +7 -1
  479. package/dist/security/permission-policy-schema.d.ts +77 -0
  480. package/dist/security/permission-policy-schema.d.ts.map +1 -0
  481. package/dist/security/permission-policy.d.ts +158 -0
  482. package/dist/security/permission-policy.d.ts.map +1 -0
  483. package/dist/security/secret-scrubber.d.ts +14 -0
  484. package/dist/security/secret-scrubber.d.ts.map +1 -0
  485. package/dist/security/secret-vault.d.ts +96 -0
  486. package/dist/security/secret-vault.d.ts.map +1 -0
  487. package/dist/security/yolo-risk.d.ts +11 -0
  488. package/dist/security/yolo-risk.d.ts.map +1 -0
  489. package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
  490. package/dist/session-registry.d.ts.map +1 -0
  491. package/dist/skills/foreign-sources.d.ts +59 -0
  492. package/dist/skills/foreign-sources.d.ts.map +1 -0
  493. package/dist/skills/frontmatter.d.ts +44 -0
  494. package/dist/skills/frontmatter.d.ts.map +1 -0
  495. package/dist/skills/github-fetcher.d.ts +38 -0
  496. package/dist/skills/github-fetcher.d.ts.map +1 -0
  497. package/dist/skills/index.d.ts +11 -582
  498. package/dist/skills/index.d.ts.map +1 -0
  499. package/dist/skills/index.js +81 -43
  500. package/dist/skills/index.js.map +7 -1
  501. package/dist/skills/limits.d.ts +92 -0
  502. package/dist/skills/limits.d.ts.map +1 -0
  503. package/dist/skills/manifest-store.d.ts +42 -0
  504. package/dist/skills/manifest-store.d.ts.map +1 -0
  505. package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
  506. package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
  507. package/dist/skills/registry/registry-adapter.d.ts +84 -0
  508. package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
  509. package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
  510. package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
  511. package/dist/skills/skill-generator.d.ts +82 -0
  512. package/dist/skills/skill-generator.d.ts.map +1 -0
  513. package/dist/skills/skill-installer.d.ts +124 -0
  514. package/dist/skills/skill-installer.d.ts.map +1 -0
  515. package/dist/storage/annotations-store.d.ts +118 -0
  516. package/dist/storage/annotations-store.d.ts.map +1 -0
  517. package/dist/storage/attachment-store.d.ts +31 -0
  518. package/dist/storage/attachment-store.d.ts.map +1 -0
  519. package/dist/storage/cloud-sync.d.ts +44 -0
  520. package/dist/storage/cloud-sync.d.ts.map +1 -0
  521. package/dist/storage/completed-work-checkpoint.d.ts +11 -0
  522. package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
  523. package/dist/storage/config-loader.d.ts +114 -0
  524. package/dist/storage/config-loader.d.ts.map +1 -0
  525. package/dist/storage/config-migration.d.ts +87 -0
  526. package/dist/storage/config-migration.d.ts.map +1 -0
  527. package/dist/storage/config-store.d.ts +22 -0
  528. package/dist/storage/config-store.d.ts.map +1 -0
  529. package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
  530. package/dist/storage/director-state.d.ts.map +1 -0
  531. package/dist/storage/file-session-writer.d.ts +169 -0
  532. package/dist/storage/file-session-writer.d.ts.map +1 -0
  533. package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
  534. package/dist/storage/goal-store.d.ts.map +1 -0
  535. package/dist/storage/index.d.ts +39 -1031
  536. package/dist/storage/index.d.ts.map +1 -0
  537. package/dist/storage/index.js +783 -443
  538. package/dist/storage/index.js.map +7 -1
  539. package/dist/storage/input-history-store.d.ts +56 -0
  540. package/dist/storage/input-history-store.d.ts.map +1 -0
  541. package/dist/storage/memory-backend.d.ts +66 -0
  542. package/dist/storage/memory-backend.d.ts.map +1 -0
  543. package/dist/storage/memory-consolidator.d.ts +50 -0
  544. package/dist/storage/memory-consolidator.d.ts.map +1 -0
  545. package/dist/storage/memory-graph-backend.d.ts +117 -0
  546. package/dist/storage/memory-graph-backend.d.ts.map +1 -0
  547. package/dist/storage/memory-store.d.ts +119 -0
  548. package/dist/storage/memory-store.d.ts.map +1 -0
  549. package/dist/storage/plan-store.d.ts +78 -0
  550. package/dist/storage/plan-store.d.ts.map +1 -0
  551. package/dist/storage/plan-templates.d.ts +21 -0
  552. package/dist/storage/plan-templates.d.ts.map +1 -0
  553. package/dist/storage/prompt-store.d.ts +37 -0
  554. package/dist/storage/prompt-store.d.ts.map +1 -0
  555. package/dist/storage/prompt-usage-store.d.ts +29 -0
  556. package/dist/storage/prompt-usage-store.d.ts.map +1 -0
  557. package/dist/storage/provider-config-watcher.d.ts +34 -0
  558. package/dist/storage/provider-config-watcher.d.ts.map +1 -0
  559. package/dist/storage/queue-store.d.ts +41 -0
  560. package/dist/storage/queue-store.d.ts.map +1 -0
  561. package/dist/storage/recovery-lock.d.ts +79 -0
  562. package/dist/storage/recovery-lock.d.ts.map +1 -0
  563. package/dist/storage/replay-log-store.d.ts +97 -0
  564. package/dist/storage/replay-log-store.d.ts.map +1 -0
  565. package/dist/storage/session-analyzer.d.ts +48 -0
  566. package/dist/storage/session-analyzer.d.ts.map +1 -0
  567. package/dist/storage/session-checkpoint-cas.d.ts +37 -0
  568. package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
  569. package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
  570. package/dist/storage/session-event-bridge.d.ts.map +1 -0
  571. package/dist/storage/session-helpers.d.ts +9 -0
  572. package/dist/storage/session-helpers.d.ts.map +1 -0
  573. package/dist/storage/session-id.d.ts +18 -0
  574. package/dist/storage/session-id.d.ts.map +1 -0
  575. package/dist/storage/session-reader.d.ts +21 -0
  576. package/dist/storage/session-reader.d.ts.map +1 -0
  577. package/dist/storage/session-recovery.d.ts +93 -0
  578. package/dist/storage/session-recovery.d.ts.map +1 -0
  579. package/dist/storage/session-resume-validation.d.ts +6 -0
  580. package/dist/storage/session-resume-validation.d.ts.map +1 -0
  581. package/dist/storage/session-rewinder.d.ts +21 -0
  582. package/dist/storage/session-rewinder.d.ts.map +1 -0
  583. package/dist/storage/session-store.d.ts +219 -0
  584. package/dist/storage/session-store.d.ts.map +1 -0
  585. package/dist/storage/session-summary.d.ts +12 -0
  586. package/dist/storage/session-summary.d.ts.map +1 -0
  587. package/dist/storage/session-tool-call-ends.d.ts +5 -0
  588. package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
  589. package/dist/storage/storage-concurrency.d.ts +2 -0
  590. package/dist/storage/storage-concurrency.d.ts.map +1 -0
  591. package/dist/storage/task-store.d.ts +33 -0
  592. package/dist/storage/task-store.d.ts.map +1 -0
  593. package/dist/storage/todos-checkpoint.d.ts +39 -0
  594. package/dist/storage/todos-checkpoint.d.ts.map +1 -0
  595. package/dist/storage/tool-audit-log.d.ts +141 -0
  596. package/dist/storage/tool-audit-log.d.ts.map +1 -0
  597. package/dist/tasking/index.d.ts +3 -124
  598. package/dist/tasking/index.d.ts.map +1 -0
  599. package/dist/tasking/index.js +57 -4
  600. package/dist/tasking/index.js.map +7 -1
  601. package/dist/tasking/task-store.d.ts +22 -0
  602. package/dist/tasking/task-store.d.ts.map +1 -0
  603. package/dist/tasking/task-tracker.d.ts +102 -0
  604. package/dist/tasking/task-tracker.d.ts.map +1 -0
  605. package/dist/tools/index.d.ts +2 -59
  606. package/dist/tools/index.d.ts.map +1 -0
  607. package/dist/tools/index.js +93 -14
  608. package/dist/tools/index.js.map +7 -1
  609. package/dist/tools/mcp-control.d.ts +53 -0
  610. package/dist/tools/mcp-control.d.ts.map +1 -0
  611. package/dist/tools/mcp-use.d.ts +24 -0
  612. package/dist/tools/mcp-use.d.ts.map +1 -0
  613. package/dist/types/agent-bridge.d.ts +42 -0
  614. package/dist/types/agent-bridge.d.ts.map +1 -0
  615. package/dist/types/attachment.d.ts +54 -0
  616. package/dist/types/attachment.d.ts.map +1 -0
  617. package/dist/types/autonomy.d.ts +5 -0
  618. package/dist/types/autonomy.d.ts.map +1 -0
  619. package/dist/types/blocks.d.ts +76 -0
  620. package/dist/types/blocks.d.ts.map +1 -0
  621. package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
  622. package/dist/types/compactor.d.ts.map +1 -0
  623. package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +344 -355
  624. package/dist/types/config.d.ts.map +1 -0
  625. package/dist/types/context-evidence.d.ts +68 -0
  626. package/dist/types/context-evidence.d.ts.map +1 -0
  627. package/dist/types/context-window.d.ts +35 -0
  628. package/dist/types/context-window.d.ts.map +1 -0
  629. package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
  630. package/dist/types/default-config.d.ts.map +1 -0
  631. package/dist/types/design-kit.d.ts +91 -0
  632. package/dist/types/design-kit.d.ts.map +1 -0
  633. package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
  634. package/dist/types/error-handler.d.ts.map +1 -0
  635. package/dist/types/errors.d.ts +277 -0
  636. package/dist/types/errors.d.ts.map +1 -0
  637. package/dist/types/hooks.d.ts +167 -0
  638. package/dist/types/hooks.d.ts.map +1 -0
  639. package/dist/types/index.d.ts +40 -244
  640. package/dist/types/index.d.ts.map +1 -0
  641. package/dist/types/index.js +101 -12
  642. package/dist/types/index.js.map +7 -1
  643. package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
  644. package/dist/types/input-reader.d.ts.map +1 -0
  645. package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
  646. package/dist/types/logger.d.ts.map +1 -0
  647. package/dist/types/memory.d.ts +89 -0
  648. package/dist/types/memory.d.ts.map +1 -0
  649. package/dist/types/messages.d.ts +24 -0
  650. package/dist/types/messages.d.ts.map +1 -0
  651. package/dist/types/mode-prompts.d.ts +2 -0
  652. package/dist/types/mode-prompts.d.ts.map +1 -0
  653. package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
  654. package/dist/types/mode.d.ts.map +1 -0
  655. package/dist/types/models-registry.d.ts +105 -0
  656. package/dist/types/models-registry.d.ts.map +1 -0
  657. package/dist/types/multi-agent.d.ts +443 -0
  658. package/dist/types/multi-agent.d.ts.map +1 -0
  659. package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +17 -13
  660. package/dist/types/observability.d.ts.map +1 -0
  661. package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
  662. package/dist/types/path-resolver.d.ts.map +1 -0
  663. package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
  664. package/dist/types/permission.d.ts.map +1 -0
  665. package/dist/types/plugin.d.ts +385 -0
  666. package/dist/types/plugin.d.ts.map +1 -0
  667. package/dist/types/prompt-registry.d.ts +81 -0
  668. package/dist/types/prompt-registry.d.ts.map +1 -0
  669. package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
  670. package/dist/types/prompt.d.ts.map +1 -0
  671. package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
  672. package/dist/types/provider-runner.d.ts.map +1 -0
  673. package/dist/types/provider.d.ts +387 -0
  674. package/dist/types/provider.d.ts.map +1 -0
  675. package/dist/types/renderer.d.ts +23 -0
  676. package/dist/types/renderer.d.ts.map +1 -0
  677. package/dist/types/retry-policy.d.ts +7 -0
  678. package/dist/types/retry-policy.d.ts.map +1 -0
  679. package/dist/types/secret-scrubber.d.ts +5 -0
  680. package/dist/types/secret-scrubber.d.ts.map +1 -0
  681. package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
  682. package/dist/types/secret-vault.d.ts.map +1 -0
  683. package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
  684. package/dist/types/selector.d.ts.map +1 -0
  685. package/dist/types/session-reader.d.ts +81 -0
  686. package/dist/types/session-reader.d.ts.map +1 -0
  687. package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
  688. package/dist/types/session-rewinder.d.ts.map +1 -0
  689. package/dist/types/session.d.ts +650 -0
  690. package/dist/types/session.d.ts.map +1 -0
  691. package/dist/types/side-effect.d.ts +34 -0
  692. package/dist/types/side-effect.d.ts.map +1 -0
  693. package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
  694. package/dist/types/skill.d.ts.map +1 -0
  695. package/dist/types/slash-command.d.ts +59 -0
  696. package/dist/types/slash-command.d.ts.map +1 -0
  697. package/dist/types/spec.d.ts +77 -0
  698. package/dist/types/spec.d.ts.map +1 -0
  699. package/dist/types/system-prompt-contributor.d.ts +20 -0
  700. package/dist/types/system-prompt-contributor.d.ts.map +1 -0
  701. package/dist/types/system-prompt.d.ts +51 -0
  702. package/dist/types/system-prompt.d.ts.map +1 -0
  703. package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
  704. package/dist/types/task-graph.d.ts.map +1 -0
  705. package/dist/types/token-counter.d.ts +42 -0
  706. package/dist/types/token-counter.d.ts.map +1 -0
  707. package/dist/types/tool-executor.d.ts +133 -0
  708. package/dist/types/tool-executor.d.ts.map +1 -0
  709. package/dist/types/tool-markers.d.ts +23 -0
  710. package/dist/types/tool-markers.d.ts.map +1 -0
  711. package/dist/types/tool.d.ts +252 -0
  712. package/dist/types/tool.d.ts.map +1 -0
  713. package/dist/types/utility-types.d.ts +31 -0
  714. package/dist/types/utility-types.d.ts.map +1 -0
  715. package/dist/utils/assert-never.d.ts +14 -0
  716. package/dist/utils/assert-never.d.ts.map +1 -0
  717. package/dist/utils/atomic-write.d.ts +12 -0
  718. package/dist/utils/atomic-write.d.ts.map +1 -0
  719. package/dist/utils/child-env.d.ts +67 -0
  720. package/dist/utils/child-env.d.ts.map +1 -0
  721. package/dist/utils/color.d.ts +20 -0
  722. package/dist/utils/color.d.ts.map +1 -0
  723. package/dist/utils/config-json.d.ts +14 -0
  724. package/dist/utils/config-json.d.ts.map +1 -0
  725. package/dist/utils/context-evidence.d.ts +47 -0
  726. package/dist/utils/context-evidence.d.ts.map +1 -0
  727. package/dist/utils/deep-merge.d.ts +64 -0
  728. package/dist/utils/deep-merge.d.ts.map +1 -0
  729. package/dist/utils/diff.d.ts +11 -0
  730. package/dist/utils/diff.d.ts.map +1 -0
  731. package/dist/utils/error.d.ts +2 -3
  732. package/dist/utils/error.d.ts.map +1 -0
  733. package/dist/utils/error.js +3 -3
  734. package/dist/utils/error.js.map +7 -1
  735. package/dist/utils/expect-defined.d.ts +2 -3
  736. package/dist/utils/expect-defined.d.ts.map +1 -0
  737. package/dist/utils/expect-defined.js +3 -3
  738. package/dist/utils/expect-defined.js.map +7 -1
  739. package/dist/utils/glob-expand.d.ts +10 -0
  740. package/dist/utils/glob-expand.d.ts.map +1 -0
  741. package/dist/utils/glob-match.d.ts +4 -0
  742. package/dist/utils/glob-match.d.ts.map +1 -0
  743. package/dist/utils/incoming-images.d.ts +39 -0
  744. package/dist/utils/incoming-images.d.ts.map +1 -0
  745. package/dist/utils/index.d.ts +38 -920
  746. package/dist/utils/index.d.ts.map +1 -0
  747. package/dist/utils/index.js +323 -36
  748. package/dist/utils/index.js.map +7 -1
  749. package/dist/utils/instruction-file.d.ts +3 -0
  750. package/dist/utils/instruction-file.d.ts.map +1 -0
  751. package/dist/utils/ip-guard.d.ts +34 -0
  752. package/dist/utils/ip-guard.d.ts.map +1 -0
  753. package/dist/utils/json-repair.d.ts +23 -0
  754. package/dist/utils/json-repair.d.ts.map +1 -0
  755. package/dist/utils/json-schema-validate.d.ts +42 -0
  756. package/dist/utils/json-schema-validate.d.ts.map +1 -0
  757. package/dist/utils/lru-cache.d.ts +29 -0
  758. package/dist/utils/lru-cache.d.ts.map +1 -0
  759. package/dist/utils/merge-custom-models.d.ts +12 -0
  760. package/dist/utils/merge-custom-models.d.ts.map +1 -0
  761. package/dist/utils/merge-models-payload.d.ts +20 -0
  762. package/dist/utils/merge-models-payload.d.ts.map +1 -0
  763. package/dist/utils/message-invariants.d.ts +22 -0
  764. package/dist/utils/message-invariants.d.ts.map +1 -0
  765. package/dist/utils/newline-normalize.d.ts +5 -0
  766. package/dist/utils/newline-normalize.d.ts.map +1 -0
  767. package/dist/utils/regex-guard.d.ts +21 -0
  768. package/dist/utils/regex-guard.d.ts.map +1 -0
  769. package/dist/utils/safe-json.d.ts +31 -0
  770. package/dist/utils/safe-json.d.ts.map +1 -0
  771. package/dist/utils/session-scoped-path.d.ts +13 -0
  772. package/dist/utils/session-scoped-path.d.ts.map +1 -0
  773. package/dist/utils/sleep.d.ts +5 -0
  774. package/dist/utils/sleep.d.ts.map +1 -0
  775. package/dist/utils/slug.d.ts +13 -0
  776. package/dist/utils/slug.d.ts.map +1 -0
  777. package/dist/utils/string.d.ts +9 -0
  778. package/dist/utils/string.d.ts.map +1 -0
  779. package/dist/utils/task-format.d.ts +22 -0
  780. package/dist/utils/task-format.d.ts.map +1 -0
  781. package/dist/utils/term.d.ts +133 -0
  782. package/dist/utils/term.d.ts.map +1 -0
  783. package/dist/utils/todos-format.d.ts +30 -0
  784. package/dist/utils/todos-format.d.ts.map +1 -0
  785. package/dist/utils/token-estimate.d.ts +112 -0
  786. package/dist/utils/token-estimate.d.ts.map +1 -0
  787. package/dist/utils/tool-description-mode.d.ts +28 -0
  788. package/dist/utils/tool-description-mode.d.ts.map +1 -0
  789. package/dist/utils/tool-output-serializer.d.ts +40 -0
  790. package/dist/utils/tool-output-serializer.d.ts.map +1 -0
  791. package/dist/utils/tool-result-render-mode.d.ts +55 -0
  792. package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
  793. package/dist/utils/tool-subject.d.ts +5 -0
  794. package/dist/utils/tool-subject.d.ts.map +1 -0
  795. package/dist/utils/tool-wire-compact.d.ts +28 -0
  796. package/dist/utils/tool-wire-compact.d.ts.map +1 -0
  797. package/dist/utils/ulid.d.ts +11 -0
  798. package/dist/utils/ulid.d.ts.map +1 -0
  799. package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
  800. package/dist/utils/wstack-paths.d.ts.map +1 -0
  801. package/dist/worktree/index.d.ts +2 -0
  802. package/dist/worktree/index.d.ts.map +1 -0
  803. package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +32 -17
  804. package/dist/worktree/worktree-manager.d.ts.map +1 -0
  805. package/instructions/agents/browser.md +25 -16
  806. package/instructions/autonomy/active-mission.md +2 -4
  807. package/instructions/coordination/subagent-baseline.md +16 -2
  808. package/instructions/leader-after-task.md +3 -1
  809. package/instructions/sections/tool/common-patterns.md +7 -1
  810. package/instructions/sections/tool/delegation-full.md +1 -1
  811. package/instructions/system.md +47 -0
  812. package/package.json +4 -5
  813. package/skills/docker-deploy/SKILL.md +1 -1
  814. package/skills/node-modern/SKILL.md +2 -2
  815. package/skills/plugin-author/SKILL.md +9 -16
  816. package/skills/wrongstack-mailbox/SKILL.md +51 -12
  817. package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
  818. package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
  819. package/dist/index--Gm41aBJ.d.ts +0 -671
  820. package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
  821. package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
  822. package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
  823. package/dist/pipeline-DGDyIohT.d.ts +0 -331
  824. package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
  825. package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
  826. package/dist/secret-vault-DxohkUBc.d.ts +0 -272
  827. package/dist/session-reader-7Esxrkpw.d.ts +0 -155
  828. package/dist/task-format-GX0B1mMC.d.ts +0 -23
  829. package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
  830. package/dist/tool-BNlnIJvo.d.ts +0 -2190
  831. package/dist/tool-executor-CckSCM5E.d.ts +0 -906
@@ -0,0 +1,112 @@
1
+ import type { Message } from '../types/messages.js';
2
+ /**
3
+ * Estimate tokens for a tool_use block input.
4
+ * Caches the stringified result keyed by the stable string representation
5
+ * to avoid repeated JSON.stringify calls during context window checks.
6
+ */
7
+ export declare function estimateToolInputTokens(input: unknown): number;
8
+ /**
9
+ * Estimate tokens for a tool_result content.
10
+ */
11
+ export declare function estimateToolResultTokens(content: string | unknown): number;
12
+ /**
13
+ * Estimate tokens for a text block.
14
+ */
15
+ export declare function estimateTextTokens(text: string): number;
16
+ /**
17
+ * Compute and cache the token estimate for a single message. This is the
18
+ * canonical per-message estimator — called once by ConversationState on
19
+ * append/replace so the O(n·m) content-block walk happens at mutation time,
20
+ * not on every context-pressure check.
21
+ */
22
+ export declare function computeMessageTokens(msg: Message): number;
23
+ /**
24
+ * Estimate tokens for an array of messages (text + tool I/O), using the shared
25
+ * 3.5 chars/token basis. This is the single canonical message-array estimator —
26
+ * compactors, the context_manager tool, and the `/context` display all route
27
+ * through it so the number a user sees matches the number compaction decides on.
28
+ *
29
+ * When a message carries a pre-computed `_estTokens` field (set by
30
+ * ConversationState on append/replace), it is used directly instead of
31
+ * re-walking the content blocks — turning the O(n·m) scan into an O(n)
32
+ * sum for fully-cached arrays.
33
+ */
34
+ export declare function estimateMessageTokens(messages: readonly Message[]): number;
35
+ /**
36
+ * Rough estimate of tokens in a tool definition (name + description + schema).
37
+ * Accounts for the JSON-serialized inputSchema which is sent to the API
38
+ * but NOT included in roughEstimate(content).
39
+ */
40
+ export declare function estimateToolDefTokens(tool: {
41
+ name: string;
42
+ description?: string | undefined;
43
+ inputSchema: unknown;
44
+ }): number;
45
+ /**
46
+ * Estimate the total API request token count: system prompt + tool definitions
47
+ * + conversation messages. Use this for context-window bar calculations
48
+ * instead of roughEstimate (which only counts messages).
49
+ *
50
+ * The overhead ratio (overhead / messages) varies by conversation length:
51
+ * - Short conversations (< 10 messages): ~30-50% overhead (large system+tools)
52
+ * - Medium (10-50 messages): ~15-30%
53
+ * - Long (> 50 messages): ~5-15%
54
+ *
55
+ * Returns { messages, systemPrompt, tools, total } for debugging display.
56
+ */
57
+ export interface RequestTokenBreakdown {
58
+ messages: number;
59
+ systemPrompt: number;
60
+ tools: number;
61
+ total: number;
62
+ }
63
+ export declare function estimateRequestTokens(messages: unknown, systemPrompt: unknown, tools: {
64
+ name: string;
65
+ description?: string | undefined;
66
+ inputSchema: unknown;
67
+ }[], calibrationKey?: string): RequestTokenBreakdown;
68
+ /**
69
+ * Record the actual API input token count after a provider call so
70
+ * `estimateRequestTokensCalibrated` can self-correct on subsequent calls.
71
+ *
72
+ * Prefer passing `estimatedInputTokens` explicitly (the calibrated pre-flight
73
+ * estimate from the middleware) — this avoids race conditions when other code
74
+ * also calls `estimateRequestTokens` between the pre-flight and this call
75
+ * (e.g. audit logging in agent.ts).
76
+ *
77
+ * When `estimatedInputTokens` is omitted, falls back to the keyed bucket's
78
+ * `prevEst` for backward compatibility with callers that don't have the
79
+ * pre-flight value. `calibrationKey` selects the per-(provider,model) bucket
80
+ * (defaults to the shared global bucket).
81
+ */
82
+ export declare function recordActualUsage(actualInputTokens: number, estimatedInputTokens?: number, calibrationKey?: string): void;
83
+ /**
84
+ * Returns the current calibration state for a bucket. Exposed for debugging
85
+ * and tests — not needed by normal callers.
86
+ */
87
+ export declare function getCalibrationState(calibrationKey?: string): {
88
+ ratio: number;
89
+ count: number;
90
+ calibrated: boolean;
91
+ };
92
+ /**
93
+ * Like `estimateRequestTokens` but applies the rolling calibration factor
94
+ * so context pressure readings converge on reality within a few iterations.
95
+ *
96
+ * Before any `recordActualUsage` samples are collected, returns the same
97
+ * result as `estimateRequestTokens` (ratio = 1.0, no distortion).
98
+ * After `MIN_SAMPLES_FOR_CALIBRATION` samples, applies the calibrated
99
+ * multiplier capped to the range [0.5, 1.5] as a sanity bound.
100
+ */
101
+ export declare function estimateRequestTokensCalibrated(messages: unknown, systemPrompt: unknown, tools: {
102
+ name: string;
103
+ description?: string | undefined;
104
+ inputSchema: unknown;
105
+ }[], calibrationKey?: string): RequestTokenBreakdown;
106
+ /**
107
+ * Resets calibration state. Primarily for tests that run in the same
108
+ * process and need a clean slate between suites. With no argument it clears
109
+ * every bucket (including the global one); pass a key to reset just that bucket.
110
+ */
111
+ export declare function resetCalibration(calibrationKey?: string): void;
112
+ //# sourceMappingURL=token-estimate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-estimate.d.ts","sourceRoot":"","sources":["../../src/utils/token-estimate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAyGpD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQ9D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAG1E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAUzD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAU1E;AAED;;;;GAIG;AACH,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gB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAM9D"}
@@ -0,0 +1,28 @@
1
+ import type { ToolDescriptionMode, ToolDescriptionModeConfig } from '../types/config.js';
2
+ import type { Tool } from '../types/tool.js';
3
+ export declare const DEFAULT_TOOL_DESCRIPTION_MODE: ToolDescriptionMode;
4
+ export interface ToolDescriptionRegistryLike {
5
+ get(name: string): Tool | undefined;
6
+ list(): Tool[];
7
+ wrap?(name: string, wrapper: (tool: Tool) => Tool, owner?: string): void;
8
+ setDescriptionMode?(name: string, mode: ToolDescriptionMode): boolean;
9
+ applyDescriptionModes?(modes?: ToolDescriptionModeConfig): {
10
+ applied: number;
11
+ missing: string[];
12
+ };
13
+ getDescriptionMode?(name: string): ToolDescriptionMode;
14
+ }
15
+ export declare function normalizeToolDescriptionMode(value: unknown): ToolDescriptionMode | undefined;
16
+ export declare function resolveToolDescriptionMode(modes: ToolDescriptionModeConfig | undefined, toolName: string): ToolDescriptionMode;
17
+ export declare function simplifyToolDescription(text: string, opts?: {
18
+ maxSentences?: number | undefined;
19
+ maxChars?: number | undefined;
20
+ }): string;
21
+ export declare function applyToolDescriptionModeToTool(tool: Tool, mode: ToolDescriptionMode): Tool;
22
+ export declare function setToolDescriptionMode(registry: ToolDescriptionRegistryLike, name: string, mode: ToolDescriptionMode): boolean;
23
+ export declare function getToolDescriptionMode(registry: ToolDescriptionRegistryLike, name: string): ToolDescriptionMode;
24
+ export declare function applyToolDescriptionModes(registry: ToolDescriptionRegistryLike, modes?: ToolDescriptionModeConfig): {
25
+ applied: number;
26
+ missing: string[];
27
+ };
28
+ //# sourceMappingURL=tool-description-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-description-mode.d.ts","sourceRoot":"","sources":["../../src/utils/tool-description-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,KAAK,EAAE,IAAI,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ED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,2BAA2B,EACrC,IAAI,EAAE,MAAM,GACX,mBAAmB,CAErB;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,2BAA2B,EACrC,KAAK,CAAC,EAAE,yBAAyB,GAChC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAexC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Tool output serialization utilities.
3
+ * Extracted from Agent.executeTools to allow reuse and consistent output handling.
4
+ */
5
+ export interface ToolOutputSerializerOptions {
6
+ perIterationOutputCapBytes?: number | undefined;
7
+ estimator?: ((text: string) => number) | undefined;
8
+ }
9
+ export interface ToolOutputSerializeContext {
10
+ toolName?: string | undefined;
11
+ input?: unknown;
12
+ /**
13
+ * Optional reference to the Tool object. When present and the tool defines
14
+ * a `serialize()` method, the serializer delegates to it instead of the
15
+ * central `renderToolObject()` switch (P3 #21).
16
+ */
17
+ tool?: {
18
+ serialize?: (output: unknown, input: unknown) => string;
19
+ } | undefined;
20
+ }
21
+ export declare function createToolOutputSerializer(opts?: ToolOutputSerializerOptions): {
22
+ serialize: (value: unknown, context?: ToolOutputSerializeContext) => string;
23
+ enforceCap: (text: string, remainingBudget: number) => {
24
+ text: string;
25
+ newBudget: number;
26
+ };
27
+ capBytes: number;
28
+ };
29
+ /**
30
+ * Render a tool result body for inclusion in the `tool.executed` event.
31
+ * Tool outputs can be large (file dumps, command output); UIs only want a
32
+ * preview line, so cap at ~400 chars with an ellipsis marker.
33
+ */
34
+ export declare function truncateForEvent(content: string, max?: number): string;
35
+ export declare function sizeSignals(toolName: string | undefined, content: string): {
36
+ outputBytes: number;
37
+ outputTokens: number;
38
+ outputLines: number | undefined;
39
+ };
40
+ //# sourceMappingURL=tool-output-serializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-output-serializer.d.ts","sourceRoot":"","sources":["../../src/utils/tool-output-serializer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,2BAA2B;IAC1C,0BAA0B,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;CACpD;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CAChF;AAiBD,wBAAgB,0BAA0B,CAAC,IAAI,GAAE,2BAAgC;uBAGrD,OAAO,YAAW,0BAA0B,KAAQ,MAAM;uBAkC1D,MAAM,mBAAmB,MAAM,KAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;;EAqBhG;AAmrBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAM,GAAG,MAAM,CAGnE;AAcD,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,GACd;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAuBhF"}
@@ -0,0 +1,55 @@
1
+ import type { ToolResultRenderMode, ToolResultRenderModeConfig } from '../types/config.js';
2
+ import type { Tool } from '../types/tool.js';
3
+ export declare const DEFAULT_TOOL_RESULT_RENDER_MODE: ToolResultRenderMode;
4
+ /**
5
+ * Normalize a raw value to a {@link ToolResultRenderMode}. Accepts the
6
+ * canonical strings (`'extend' | 'simple'`) plus a few synonyms so the
7
+ * slash command feels forgiving (`extended`/`full` → `extend`,
8
+ * `short`/`brief` → `simple`). Returns `undefined` for anything else so
9
+ * the caller can reject unknown input without throwing.
10
+ */
11
+ export declare function normalizeToolResultRenderMode(value: unknown): ToolResultRenderMode | undefined;
12
+ /**
13
+ * Look up the result-render mode for `toolName` from a config map. Falls
14
+ * back to the default `'extend'` when the map is missing the entry.
15
+ */
16
+ export declare function resolveToolResultRenderMode(modes: ToolResultRenderModeConfig | undefined, toolName: string): ToolResultRenderMode;
17
+ /**
18
+ * Subset of {@link import('../registry/tool-registry.js').ToolRegistry}
19
+ * the result-render-mode setters need. Decouples this module from the
20
+ * concrete registry class so it can be reused by tests and by tools
21
+ * that wrap their own registry.
22
+ */
23
+ export interface ToolResultRenderModeRegistryLike {
24
+ get(name: string): Tool | undefined;
25
+ setResultRenderMode?(name: string, mode: ToolResultRenderMode): boolean;
26
+ applyResultRenderModes?(modes?: ToolResultRenderModeConfig): {
27
+ applied: number;
28
+ missing: string[];
29
+ };
30
+ getResultRenderMode?(name: string): ToolResultRenderMode;
31
+ }
32
+ /**
33
+ * Set a single tool's result-render mode on a registry. Prefers the
34
+ * registry's native accessor (so it can update any internal state, e.g.
35
+ * usage caches); falls back to a no-op so callers stay decoupled from
36
+ * the registry implementation.
37
+ */
38
+ export declare function setToolResultRenderMode(registry: ToolResultRenderModeRegistryLike, name: string, mode: ToolResultRenderMode): boolean;
39
+ /**
40
+ * Look up the current result-render mode for a single tool. Returns the
41
+ * registry's view if it has one, otherwise the default. This is what the
42
+ * tool-executor calls on each tool invocation to decide whether the next
43
+ * `writeToolResult` should be `simple` or `extend`.
44
+ */
45
+ export declare function getToolResultRenderMode(registry: ToolResultRenderModeRegistryLike, name: string): ToolResultRenderMode;
46
+ /**
47
+ * Bulk-apply a config map (`tools.resultRenderMode`) to a registry.
48
+ * Mirrors {@link import('./tool-description-mode.js').applyToolDescriptionModes}
49
+ * for symmetry with the LLM-side description mode.
50
+ */
51
+ export declare function applyToolResultRenderModes(registry: ToolResultRenderModeRegistryLike, modes?: ToolResultRenderModeConfig): {
52
+ applied: number;
53
+ missing: string[];
54
+ };
55
+ //# sourceMappingURL=tool-result-render-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-result-render-mode.d.ts","sourceRoot":"","sources":["../../src/utils/tool-result-render-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,eAAO,MAAM,+BAA+B,EAAE,oBAA+B,CAAC;AAE9E;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,GAAG,SAAS,CAM9F;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,0BAA0B,GAAG,SAAS,EAC7C,QAAQ,EAAE,MAAM,GACf,oBAAoB,CAEtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gCAAgC;IAC/C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,mBAAmB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC;IACxE,sBAAsB,CAAC,CACrB,KAAK,CAAC,EAAE,0BAA0B,GACjC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC1C,mBAAmB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAAC;CAC1D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,gCAAgC,EAC1C,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,gCAAgC,EAC1C,IAAI,EAAE,MAAM,GACX,oBAAoB,CAEtB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,gCAAgC,EAC1C,KAAK,CAAC,EAAE,0BAA0B,GACjC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAexC"}
@@ -0,0 +1,5 @@
1
+ export declare function escapeGlobSubject(value: string): string;
2
+ export declare function normalizePathSubject(value: string): string;
3
+ export declare function isPathSubjectKey(subjectKey: string): boolean;
4
+ export declare function subjectForToolInput(toolName: string, input: unknown, subjectKey?: string): string | undefined;
5
+ //# sourceMappingURL=tool-subject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-subject.d.ts","sourceRoot":"","sources":["../../src/utils/tool-subject.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAwBpB"}
@@ -0,0 +1,28 @@
1
+ export interface ToolWireDefinitionLike {
2
+ name: string;
3
+ description?: string | undefined;
4
+ inputSchema: unknown;
5
+ }
6
+ export interface CompactToolDefinitionForWireOptions {
7
+ /** Top-level tool description budget. */
8
+ descriptionMaxChars?: number | undefined;
9
+ /** Per-JSON-Schema `description` annotation budget. */
10
+ schemaDescriptionMaxChars?: number | undefined;
11
+ }
12
+ export interface CompactWireToolDefinition {
13
+ name: string;
14
+ description: string;
15
+ inputSchema: Record<string, unknown>;
16
+ }
17
+ /**
18
+ * Return the provider-wire version of a tool definition.
19
+ *
20
+ * Tool schemas remain structurally intact: validation keywords, property
21
+ * names, required fields, enum values, and nested shapes are preserved. The
22
+ * only reduction is on human prose annotations (`description`), which are the
23
+ * largest repeated cost in provider tool declarations.
24
+ */
25
+ export declare function compactToolDefinitionForWire(tool: ToolWireDefinitionLike, opts?: CompactToolDefinitionForWireOptions): CompactWireToolDefinition;
26
+ export declare function compactSchemaDescriptions(schema: unknown, maxDescriptionChars?: number): Record<string, unknown>;
27
+ export declare function compactDescription(text: string, maxChars: number): string;
28
+ //# sourceMappingURL=tool-wire-compact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-wire-compact.d.ts","sourceRoot":"","sources":["../../src/utils/tool-wire-compact.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,mCAAmC;IAClD,yCAAyC;IACzC,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,uDAAuD;IACvD,yBAAyB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAOD;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,sBAAsB,EAC5B,IAAI,GAAE,mCAAwC,GAC7C,yBAAyB,CAwB3B;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,mBAAmB,SAA+B,GACjD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGzB;AAmBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CASzE"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generate a ULID — a 26-char Crockford-base32 identifier whose first 10 chars
3
+ * encode the millisecond timestamp (so IDs sort lexicographically by creation
4
+ * time) followed by 16 chars of randomness. Zero runtime dependencies.
5
+ *
6
+ * The codebase convention is "IDs are ULIDs"; use this for any new store key.
7
+ */
8
+ export declare function ulid(seedTime?: number): string;
9
+ /** True for a well-formed 26-char Crockford-base32 ULID. */
10
+ export declare function isUlid(value: string): boolean;
11
+ //# sourceMappingURL=ulid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ulid.d.ts","sourceRoot":"","sources":["../../src/utils/ulid.ts"],"names":[],"mappings":"AA8BA;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,QAAQ,GAAE,MAAmB,GAAG,MAAM,CAE1D;AAED,4DAA4D;AAC5D,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAM7C"}
@@ -6,7 +6,7 @@
6
6
  * The ONLY thing inside the project tree is the optional
7
7
  * .wrongstack/AGENTS.md (committed) and .wrongstack/skills/ (committed).
8
8
  */
9
- interface WstackPaths {
9
+ export interface WstackPaths {
10
10
  /** ~/.wrongstack — global root. */
11
11
  globalRoot: string;
12
12
  /** Absolute project root. */
@@ -108,13 +108,13 @@ interface WstackPaths {
108
108
  /** Function to get the status.json path for a project given its hash. */
109
109
  projectStatus: (projectHash: string) => string;
110
110
  }
111
- declare function projectHash(absRoot: string): string;
111
+ export declare function projectHash(absRoot: string): string;
112
112
  /**
113
113
  * Human-readable project directory name: slugified folder name + short hash
114
114
  * suffix for uniqueness. e.g. `wrongstack-a1b2c3` instead of `3024e5e6fa58`.
115
115
  */
116
- declare function projectSlug(absRoot: string): string;
117
- interface WstackPathOptions {
116
+ export declare function projectSlug(absRoot: string): string;
117
+ export interface WstackPathOptions {
118
118
  userHome?: string | undefined;
119
119
  projectRoot: string;
120
120
  /** Override the global root (e.g. for tests). Default: `${userHome}/.wrongstack`. */
@@ -132,7 +132,6 @@ interface WstackPathOptions {
132
132
  * Every code path that wants the global dir must come through here (or
133
133
  * through `resolveWstackPaths`) instead of `path.join(os.homedir(), '.wrongstack')`.
134
134
  */
135
- declare function wstackGlobalRoot(): string;
136
- declare function resolveWstackPaths(opts: WstackPathOptions): WstackPaths;
137
-
138
- export { type WstackPaths as W, type WstackPathOptions as a, projectSlug as b, projectHash as p, resolveWstackPaths as r, wstackGlobalRoot as w };
135
+ export declare function wstackGlobalRoot(): string;
136
+ export declare function resolveWstackPaths(opts: WstackPathOptions): WstackPaths;
137
+ //# sourceMappingURL=wstack-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wstack-paths.d.ts","sourceRoot":"","sources":["../../src/utils/wstack-paths.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,2GAA2G;IAC3G,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kEAAkE;IAClE,gBAAgB,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;I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AM,CAAC;IACzB,6FAA6F;IAC7F,gBAAgB,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;CAChD;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAInD;AAcD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAIzC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,WAAW,CA4DvE"}
@@ -0,0 +1,2 @@
1
+ export { WorktreeManager, assertSafePath, type WorktreeHandle, type WorktreeStatus, type WorktreeManagerOptions, type AllocateOpts, type MergeOpts, type MergeResult, type RunResult as WorktreeRunResult, } from './worktree-manager.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/worktree/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,SAAS,IAAI,iBAAiB,GACpC,MAAM,uBAAuB,CAAC"}
@@ -1,5 +1,4 @@
1
- import { E as EventBus } from './events-Bgnh43r9.js';
2
-
1
+ import type { EventBus } from '../kernel/events.js';
3
2
  /**
4
3
  * Lifecycle of a single worktree handle.
5
4
  *
@@ -7,8 +6,8 @@ import { E as EventBus } from './events-Bgnh43r9.js';
7
6
  * └─→ needs-review (conflict, kept)
8
7
  * (any) → failed
9
8
  */
10
- type WorktreeStatus = 'allocating' | 'active' | 'committing' | 'merging' | 'merged' | 'needs-review' | 'failed';
11
- interface WorktreeHandle {
9
+ export type WorktreeStatus = 'allocating' | 'active' | 'committing' | 'merging' | 'merged' | 'needs-review' | 'failed';
10
+ export interface WorktreeHandle {
12
11
  /** Stable id (== slug). Used as the event `handleId`. */
13
12
  id: string;
14
13
  /** Caller-supplied owner (a phase id in AutoPhase). */
@@ -33,14 +32,14 @@ interface WorktreeHandle {
33
32
  lastError?: string | undefined;
34
33
  conflictFiles?: string[] | undefined;
35
34
  }
36
- interface AllocateOpts {
35
+ export interface AllocateOpts {
37
36
  /** Friendly basis for the slug/branch (e.g. the phase name). */
38
37
  slugHint?: string | undefined;
39
38
  ownerLabel?: string | undefined;
40
39
  /** Override the detected base branch. */
41
40
  baseBranch?: string | undefined;
42
41
  }
43
- interface MergeOpts {
42
+ export interface MergeOpts {
44
43
  squash?: boolean | undefined;
45
44
  message?: string | undefined;
46
45
  /**
@@ -57,7 +56,7 @@ interface MergeOpts {
57
56
  cwd: string;
58
57
  }) => Promise<boolean>;
59
58
  }
60
- interface MergeResult {
59
+ export interface MergeResult {
61
60
  ok: boolean;
62
61
  conflict?: boolean | undefined;
63
62
  conflictFiles?: string[] | undefined;
@@ -65,12 +64,12 @@ interface MergeResult {
65
64
  /** True when an initial conflict was successfully resolved by `opts.resolve`. */
66
65
  resolved?: boolean | undefined;
67
66
  }
68
- interface RunResult {
67
+ export interface RunResult {
69
68
  code: number;
70
69
  stdout: string;
71
70
  stderr: string;
72
71
  }
73
- interface WorktreeManagerOptions {
72
+ export interface WorktreeManagerOptions {
74
73
  projectRoot: string;
75
74
  events?: EventBus | undefined;
76
75
  sessionId?: string | (() => string | undefined) | undefined;
@@ -87,7 +86,7 @@ interface WorktreeManagerOptions {
87
86
  * worktree directories without the tool's permission gate or `findGitDir`
88
87
  * resolution, and so `@wrongstack/core` keeps no dependency on `@wrongstack/tools`.
89
88
  */
90
- declare class WorktreeManager {
89
+ export declare class WorktreeManager {
91
90
  private readonly projectRoot;
92
91
  private readonly events?;
93
92
  private readonly sessionIdSource;
@@ -231,10 +230,19 @@ declare class WorktreeManager {
231
230
  */
232
231
  private tryResolveConflict;
233
232
  /**
234
- * True when staged content still carries conflict markers. `git diff --cached
235
- * --check` exits nonzero and prints a "leftover conflict marker" line for each
236
- * survivor; whitespace-only errors (also flagged by --check) are ignored so a
237
- * clean resolution with unrelated whitespace is not rejected.
233
+ * True when staged content still carries conflict markers.
234
+ *
235
+ * Primary probe: `git grep --cached` scans the STAGED blobs directly for a
236
+ * full marker line (`<<<<<<< `, `=======`, `>>>>>>> `, `||||||| `) — exit 0
237
+ * means found. This is byte-level and independent of git version, locale,
238
+ * and human-output phrasing. When the caller knows which files conflicted,
239
+ * the scan is restricted to them so an unrelated `=======` underline in
240
+ * some document can't false-positive.
241
+ *
242
+ * Fallback probe: `git diff --cached --check` prints a "leftover conflict
243
+ * marker" line per survivor. Kept as belt-and-braces — it was the original
244
+ * sole probe, but CI runners were observed to miss markers through it
245
+ * (output parsing), which let a half-resolved merge commit.
238
246
  */
239
247
  private hasConflictMarkers;
240
248
  /**
@@ -267,7 +275,14 @@ declare class WorktreeManager {
267
275
  private currentSessionId;
268
276
  private defaultRun;
269
277
  }
278
+ /**
279
+ * Extract conflicted paths from git merge output. Git prints one
280
+ * `CONFLICT (<kind>): Merge conflict in <path>` line per conflicted file to
281
+ * stdout — a portable signal that doesn't depend on the post-merge index
282
+ * state (which `git diff --diff-filter=U` can report as empty on some runners
283
+ * after a `--squash` conflict).
284
+ */
285
+ export declare function parseConflictPaths(output: string): string[];
270
286
  /** Throw if `dir` resolves outside `projectRoot`. */
271
- declare function assertSafePath(dir: string, projectRoot: string): void;
272
-
273
- export { type AllocateOpts as A, type MergeOpts as M, type RunResult as R, WorktreeManager as W, type MergeResult as a, type WorktreeHandle as b, type WorktreeManagerOptions as c, type WorktreeStatus as d, assertSafePath as e };
287
+ export declare function assertSafePath(dir: string, projectRoot: string): void;
288
+ //# sourceMappingURL=worktree-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree-manager.d.ts","sourceRoot":"","sources":["../../src/worktree/worktree-manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAIpD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,QAAQ,GACR,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,cAAc,GACd,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS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QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAkC7D;IAED;;;;;;OAMG;YACW,kBAAkB;IAuChC;;;;;;;;;;;;;;OAcG;YACW,kBAAkB;IAahC;;;OAGG;IACG,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,GAAE;QAAE,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAc9F;IAED,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAE/C;IAED,IAAI,IAAI,cAAc,EAAE,CAEvB;IAID,OAAO,CAAC,aAAa;YAIP,gBAAgB;IAS9B,OAAO,CAAC,QAAQ;YAgBF,YAAY;IAkB1B;;;;;;;OAOG;YACW,YAAY;YAYZ,aAAa;IAQ3B,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,IAAI;IAWZ,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,IAAI;IAaZ,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,UAAU;CAyBnB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAO3D;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAMrE"}
@@ -10,18 +10,26 @@ Scope:
10
10
  - Evaluate JavaScript in the page context to extract structured data
11
11
  - Verify visual state (element visibility, text content, attribute values)
12
12
 
13
- Playwright tools available (require the "playwright" MCP server to be enabled):
14
- playwright_navigate(url) open a page at the given URL
15
- playwright_screenshot() capture a full-page or viewport screenshot
16
- playwright_click(selector) click on an element matching a CSS selector
17
- playwright_type(selector, text) type text into a focused input element
18
- playwright_evaluate(script) run arbitrary JavaScript in the page context
19
- playwright_select_option(selector, value) pick a <select> dropdown option
20
- playwright_hover(selector) hover the mouse over an element
21
- playwright_fill_form(fields) — fill multiple form fields in one call
22
- playwright_wait_for(selector) block until an element appears on the page
23
- playwright_press_key(key) press a keyboard key (Enter, Tab, Escape, …)
24
- playwright_drag(from, to) drag an element from one selector to another
13
+ First-party browser tools (no MCP server configuration required):
14
+ browser_status() check Playwright Chromium installation
15
+ browser_open(url?) open an isolated session; returns sessionId
16
+ browser_list() list only this agent's sessions
17
+ browser_navigate(sessionId, url) navigate to an approved URL
18
+ browser_snapshot(sessionId) bounded accessibility + console/network evidence
19
+ browser_screenshot(sessionId, ...) capture a durable PNG artifact
20
+ browser_click(sessionId, selector) click an element
21
+ browser_type(sessionId, selector, text) — fill an input
22
+ browser_select(sessionId, selector, value) pick a select option
23
+ browser_hover(sessionId, selector) hover an element
24
+ browser_wait(sessionId, selector?) wait for an element or bounded duration
25
+ browser_press(sessionId, key) — press a keyboard key
26
+ browser_drag(sessionId, from, to) — drag between elements
27
+ browser_evaluate(sessionId, expression) — confirmed arbitrary page evaluation
28
+ browser_upload(sessionId, selector, files) — confirmed project-local upload
29
+ browser_close(sessionId) — close and return the trace artifact
30
+
31
+ The optional Playwright MCP preset may coexist; its `playwright_*` names do not
32
+ collide with the first-party `browser_*` namespace.
25
33
 
26
34
  Input format you accept:
27
35
  { "task": "navigate | screenshot | extract | interact | verify", "url": "<url>", "steps": ["step1", "step2"] }
@@ -34,10 +42,11 @@ Output: Structured markdown report:
34
42
  - ## Errors (any failures with stack traces)
35
43
 
36
44
  Working rules:
37
- - Always playwright_navigate first before any interaction
38
- - Always playwright_wait_for after navigation to ensure the page is ready
39
- - playwright_screenshot is your primary evidence — use it before and after interactions
40
- - Use playwright_evaluate for structured data extraction (JSON, text content)
45
+ - Always browser_open first, then pass its sessionId to every operation
46
+ - Always browser_wait after navigation to ensure the page is ready
47
+ - browser_screenshot is your primary evidence — use it before and after interactions
48
+ - Use browser_snapshot before browser_evaluate; evaluation is confirmed and reserved for data the snapshot cannot expose
49
+ - Always browser_close when finished; run disposal also closes owned sessions as a safety net
41
50
  - If a selector fails, try alternative selectors before giving up
42
51
  - Report exact CSS selectors used — they're part of the evidence
43
52
  - If playwright tools are unavailable, report the error immediately — do not guess
@@ -21,10 +21,8 @@ whitespace-tolerant, but they must occupy the entire line:
21
21
  decide.
22
22
 
23
23
  ### Operating principles
24
- - YOLO is active for normal project work. Proceed with routine
25
- in-project tool use without pre-confirming; pick the best path and execute it.
26
- If the permission system raises a destructive-gated confirmation, wait
27
- for that flow instead of trying to bypass it.
24
+ - YOLO is active. Proceed with tool use without pre-confirming unless an
25
+ explicit deny rule blocks the call; pick the best path and execute it.
28
26
  - Use tools freely; multiple calls per turn are normal and expected.
29
27
  - When working on a todo, mark it `in_progress` via the todos tool
30
28
  before tool work and `completed` (or `cancelled` with a reason)
@@ -6,6 +6,13 @@ Capabilities & operating rules:
6
6
  dependency install) and run non-interactively: routine work is
7
7
  pre-authorized, so finish the task end-to-end without stopping to ask
8
8
  permission to read, edit, or build.
9
+ - Memory tools (`remember`, `search_memory`, `find_related_memories`) are
10
+ available and share the project's knowledge base. Before every tool call
11
+ on an unfamiliar file, `search_memory` for relevant context. After
12
+ discovering a convention, file path, bug root cause, or making a
13
+ decision, `remember` it with type, scope, priority, and tags so the
14
+ Director and future agents see it. Use `project-memory` scope for
15
+ codebase facts, `user-memory` for preferences.
9
16
  - Stay inside the project root. Do not touch machine config, credentials,
10
17
  or global state — those require an explicit grant you do not have.
11
18
  - Respect your current working directory. When the Director gives you an
@@ -42,8 +49,15 @@ Bridge contract:
42
49
  CRITICAL CONSTRAINT — NO FURTHER DELEGATION:
43
50
  - You MUST NOT call `delegate`, `spawn_subagent`, `assign_task`, or any
44
51
  equivalent. Execute the assigned task yourself; do not orchestrate.
45
- - If a subtask is too complex, report what you found and let the Director
46
- decide how to decompose.
52
+ - If the assigned task is genuinely too large for one worker, finish a clean,
53
+ useful checkpoint instead of running until forced termination. Call
54
+ `submit_result` with `completion: "partial"` and a concrete `remaining_work`
55
+ description; the `delegate` tool can hand that remainder to a fresh worker.
56
+ - You still MUST NOT spawn that worker yourself. If an independent parallel
57
+ helper would materially improve the result, use `mail_send` (or mailbox
58
+ send) with type `ask` to request one from the leader. Name the exact helper
59
+ task, why it is independent, and what result you need; then continue your
60
+ own assigned slice unless blocked.
47
61
 
48
62
  Inter-agent mailbox (if you have the `mail_send`/`mail_inbox`/`mailbox` tools):
49
63
  - Your identity is `<your-name>@<session-tag>` (unique per session). Mail
@@ -18,5 +18,7 @@ Rules:
18
18
  - **Omit the tag entirely while the live `ctx.todos` list has any `pending` or `in_progress` item.** Finishing the in-flight todo list takes priority, and the runtime discards `<nextsteps>` in that state anyway. Emit it again on the turn the last todo flips to `completed`.
19
19
  - If you have no genuinely useful suggestions, omit the tag.
20
20
 
21
- **After a significant task, also post a status update** to the inter-agent mailbox so other agents can discover what you finished and route follow-on work:
21
+ **After a significant task, remember key findings** file paths you touched, conventions you noticed, decisions you made. Use `remember` with appropriate type, scope, priority, and tags so future sessions benefit.
22
+
23
+ **Also post a status update** to the inter-agent mailbox so other agents can discover what you finished and route follow-on work:
22
24
  `mailbox action=send to=* type=status subject="<one-line task summary>" body="<brief outcome>"`
@@ -5,5 +5,11 @@
5
5
  - **Verify after mutate:** `write`/`edit`/`patch` -> `read` back to confirm -> report outcome
6
6
  - **Explore project:** `glob` for structure -> `read` key files -> `grep` for patterns
7
7
  - **Batch ops:** Use `replace` with glob patterns for multi-file surgical changes
8
+ - **Memory before tool calls:** Before `read`/`edit`/`grep`/`glob` on unfamiliar files, `search_memory` for relevant context and include a hint in your reasoning
9
+ - **Remember every file path:** Every time you discover a useful file, `remember` its path with `type: "reference"`, tags: #path
10
+ - **Remember every convention:** Every time you notice a pattern, `remember` it with `type: "convention"`, appropriate scope, and tags
11
+ - **Remember decisions:** Before resolving ambiguity, `remember` the decision with `type: "decision"` so future turns don't re-litigate
12
+ - **Resume informed:** When starting work on a new area, `search_memory`/`find_related_memories` to surface past decisions
13
+ - **Memory-driven context:** Include memory hints in your reasoning during tool calls — the LLM reasons better with concrete context
8
14
 
9
- When unsure about a file's current state, read it first rather than assuming.
15
+ When unsure about a file's current state, read it first rather than assuming. When unsure about a project's conventions, search memory first.