@wrongstack/core 0.284.0 → 0.285.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (810) hide show
  1. package/dist/agent-status-tracker.d.ts +74 -0
  2. package/dist/agent-status-tracker.d.ts.map +1 -0
  3. package/dist/autophase/auto-phase-planner.d.ts +79 -0
  4. package/dist/autophase/auto-phase-planner.d.ts.map +1 -0
  5. package/dist/autophase/auto-phase-runner.d.ts +79 -0
  6. package/dist/autophase/auto-phase-runner.d.ts.map +1 -0
  7. package/dist/autophase/checkpoint.d.ts +49 -0
  8. package/dist/autophase/checkpoint.d.ts.map +1 -0
  9. package/dist/autophase/index.d.ts +9 -0
  10. package/dist/autophase/index.d.ts.map +1 -0
  11. package/dist/autophase/phase-graph-builder.d.ts +46 -0
  12. package/dist/autophase/phase-graph-builder.d.ts.map +1 -0
  13. package/dist/autophase/phase-orchestrator.d.ts +150 -0
  14. package/dist/autophase/phase-orchestrator.d.ts.map +1 -0
  15. package/dist/autophase/phase-store.d.ts +29 -0
  16. package/dist/autophase/phase-store.d.ts.map +1 -0
  17. package/dist/autophase/types.d.ts +329 -0
  18. package/dist/autophase/types.d.ts.map +1 -0
  19. package/dist/boot.d.ts +73 -0
  20. package/dist/boot.d.ts.map +1 -0
  21. package/dist/coordination/adaptive-concurrency.d.ts +63 -0
  22. package/dist/coordination/adaptive-concurrency.d.ts.map +1 -0
  23. package/dist/coordination/agent-bridge.d.ts +24 -0
  24. package/dist/coordination/agent-bridge.d.ts.map +1 -0
  25. package/dist/coordination/agent-monitor.d.ts +100 -0
  26. package/dist/coordination/agent-monitor.d.ts.map +1 -0
  27. package/dist/coordination/agent-subagent-runner.d.ts +74 -0
  28. package/dist/coordination/agent-subagent-runner.d.ts.map +1 -0
  29. package/dist/coordination/agents/agent-prompts.d.ts +2 -0
  30. package/dist/coordination/agents/agent-prompts.d.ts.map +1 -0
  31. package/dist/coordination/agents/index.d.ts +35 -0
  32. package/dist/coordination/agents/index.d.ts.map +1 -0
  33. package/dist/coordination/agents/phase1-discovery.d.ts +4 -0
  34. package/dist/coordination/agents/phase1-discovery.d.ts.map +1 -0
  35. package/dist/coordination/agents/phase2-planning.d.ts +4 -0
  36. package/dist/coordination/agents/phase2-planning.d.ts.map +1 -0
  37. package/dist/coordination/agents/phase3-build.d.ts +4 -0
  38. package/dist/coordination/agents/phase3-build.d.ts.map +1 -0
  39. package/dist/coordination/agents/phase3-techstack.d.ts +13 -0
  40. package/dist/coordination/agents/phase3-techstack.d.ts.map +1 -0
  41. package/dist/coordination/agents/phase4-verify.d.ts +4 -0
  42. package/dist/coordination/agents/phase4-verify.d.ts.map +1 -0
  43. package/dist/coordination/agents/phase5-review.d.ts +4 -0
  44. package/dist/coordination/agents/phase5-review.d.ts.map +1 -0
  45. package/dist/coordination/agents/phase6-domain.d.ts +4 -0
  46. package/dist/coordination/agents/phase6-domain.d.ts.map +1 -0
  47. package/dist/coordination/agents/phase7-knowledge.d.ts +4 -0
  48. package/dist/coordination/agents/phase7-knowledge.d.ts.map +1 -0
  49. package/dist/coordination/agents/phase8-delivery.d.ts +4 -0
  50. package/dist/coordination/agents/phase8-delivery.d.ts.map +1 -0
  51. package/dist/coordination/agents/phase9-meta.d.ts +4 -0
  52. package/dist/coordination/agents/phase9-meta.d.ts.map +1 -0
  53. package/dist/coordination/agents/types.d.ts +79 -0
  54. package/dist/coordination/agents/types.d.ts.map +1 -0
  55. package/dist/coordination/agents.d.ts +8 -0
  56. package/dist/coordination/agents.d.ts.map +1 -0
  57. package/dist/coordination/auto-extend.d.ts +46 -0
  58. package/dist/coordination/auto-extend.d.ts.map +1 -0
  59. package/dist/coordination/autonomous-brain.d.ts +154 -0
  60. package/dist/coordination/autonomous-brain.d.ts.map +1 -0
  61. package/dist/coordination/autonomous-coordinator.d.ts +239 -0
  62. package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
  63. package/dist/coordination/brain-monitor.d.ts +74 -0
  64. package/dist/coordination/brain-monitor.d.ts.map +1 -0
  65. package/dist/coordination/brain.d.ts +104 -0
  66. package/dist/coordination/brain.d.ts.map +1 -0
  67. package/dist/coordination/change-manager.d.ts +151 -0
  68. package/dist/coordination/change-manager.d.ts.map +1 -0
  69. package/dist/coordination/checkpoint-wiring.d.ts +61 -0
  70. package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
  71. package/dist/coordination/collab-bus.d.ts +132 -0
  72. package/dist/coordination/collab-bus.d.ts.map +1 -0
  73. package/dist/coordination/collab-debug.d.ts +302 -0
  74. package/dist/coordination/collab-debug.d.ts.map +1 -0
  75. package/dist/coordination/commit-safety.d.ts +72 -0
  76. package/dist/coordination/commit-safety.d.ts.map +1 -0
  77. package/dist/coordination/consensus-protocol.d.ts +106 -0
  78. package/dist/coordination/consensus-protocol.d.ts.map +1 -0
  79. package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
  80. package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
  81. package/dist/coordination/delegate-tool.d.ts +101 -0
  82. package/dist/coordination/delegate-tool.d.ts.map +1 -0
  83. package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
  84. package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
  85. package/dist/coordination/dep-watcher.d.ts +74 -0
  86. package/dist/coordination/dep-watcher.d.ts.map +1 -0
  87. package/dist/coordination/director/director-errors.d.ts +29 -0
  88. package/dist/coordination/director/director-errors.d.ts.map +1 -0
  89. package/dist/coordination/director-construction.d.ts +90 -0
  90. package/dist/coordination/director-construction.d.ts.map +1 -0
  91. package/dist/coordination/director-prompts.d.ts +119 -0
  92. package/dist/coordination/director-prompts.d.ts.map +1 -0
  93. package/dist/coordination/director-session.d.ts +68 -0
  94. package/dist/coordination/director-session.d.ts.map +1 -0
  95. package/dist/coordination/director-tools.d.ts +65 -0
  96. package/dist/coordination/director-tools.d.ts.map +1 -0
  97. package/dist/coordination/director.d.ts +802 -0
  98. package/dist/coordination/director.d.ts.map +1 -0
  99. package/dist/coordination/dispatcher.d.ts +82 -0
  100. package/dist/coordination/dispatcher.d.ts.map +1 -0
  101. package/dist/coordination/file-author-tracker.d.ts +76 -0
  102. package/dist/coordination/file-author-tracker.d.ts.map +1 -0
  103. package/dist/coordination/fleet-bus.d.ts +122 -0
  104. package/dist/coordination/fleet-bus.d.ts.map +1 -0
  105. package/dist/coordination/fleet-event-validation.d.ts +10 -0
  106. package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
  107. package/dist/coordination/fleet-manager.d.ts +234 -0
  108. package/dist/coordination/fleet-manager.d.ts.map +1 -0
  109. package/dist/coordination/fleet-spawn.d.ts +102 -0
  110. package/dist/coordination/fleet-spawn.d.ts.map +1 -0
  111. package/dist/coordination/fleet-status-tool.d.ts +36 -0
  112. package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
  113. package/dist/coordination/fleet-supervisor.d.ts +157 -0
  114. package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
  115. package/dist/coordination/fleet.d.ts +96 -0
  116. package/dist/coordination/fleet.d.ts.map +1 -0
  117. package/dist/coordination/global-mailbox.d.ts +234 -0
  118. package/dist/coordination/global-mailbox.d.ts.map +1 -0
  119. package/dist/coordination/icoordinator.d.ts +97 -0
  120. package/dist/coordination/icoordinator.d.ts.map +1 -0
  121. package/dist/coordination/ifleet-manager.d.ts +177 -0
  122. package/dist/coordination/ifleet-manager.d.ts.map +1 -0
  123. package/dist/coordination/in-memory-transport.d.ts +12 -0
  124. package/dist/coordination/in-memory-transport.d.ts.map +1 -0
  125. package/dist/coordination/index.d.ts +78 -2587
  126. package/dist/coordination/index.d.ts.map +1 -0
  127. package/dist/coordination/index.js +739 -254
  128. package/dist/coordination/index.js.map +7 -1
  129. package/dist/coordination/knowledge-graph.d.ts +217 -0
  130. package/dist/coordination/knowledge-graph.d.ts.map +1 -0
  131. package/dist/coordination/large-answer-store.d.ts +61 -0
  132. package/dist/coordination/large-answer-store.d.ts.map +1 -0
  133. package/dist/coordination/mail-tools.d.ts +34 -0
  134. package/dist/coordination/mail-tools.d.ts.map +1 -0
  135. package/dist/coordination/mailbox-actions.d.ts +68 -0
  136. package/dist/coordination/mailbox-actions.d.ts.map +1 -0
  137. package/dist/coordination/mailbox-health.d.ts +131 -0
  138. package/dist/coordination/mailbox-health.d.ts.map +1 -0
  139. package/dist/coordination/mailbox-hooks.d.ts +55 -0
  140. package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
  141. package/dist/coordination/mailbox-tool.d.ts +75 -0
  142. package/dist/coordination/mailbox-tool.d.ts.map +1 -0
  143. package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +37 -22
  144. package/dist/coordination/mailbox-types.d.ts.map +1 -0
  145. package/dist/coordination/mailbox.d.ts +69 -0
  146. package/dist/coordination/mailbox.d.ts.map +1 -0
  147. package/dist/coordination/model-matrix.d.ts +98 -0
  148. package/dist/coordination/model-matrix.d.ts.map +1 -0
  149. package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
  150. package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
  151. package/dist/coordination/null-fleet-bus.d.ts +10 -0
  152. package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
  153. package/dist/coordination/package-author-tracker.d.ts +87 -0
  154. package/dist/coordination/package-author-tracker.d.ts.map +1 -0
  155. package/dist/coordination/package-outdated-watcher.d.ts +83 -0
  156. package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
  157. package/dist/coordination/single-instance-mailbox.d.ts +154 -0
  158. package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
  159. package/dist/coordination/spawn-budget.d.ts +6 -0
  160. package/dist/coordination/spawn-budget.d.ts.map +1 -0
  161. package/dist/coordination/subagent-budget.d.ts +323 -0
  162. package/dist/coordination/subagent-budget.d.ts.map +1 -0
  163. package/dist/coordination/subagent-nicknames.d.ts +42 -0
  164. package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
  165. package/dist/coordination/subagent-result-tool.d.ts +20 -0
  166. package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
  167. package/dist/coordination/task-auctioneer.d.ts +143 -0
  168. package/dist/coordination/task-auctioneer.d.ts.map +1 -0
  169. package/dist/coordination/task-dag.d.ts +147 -0
  170. package/dist/coordination/task-dag.d.ts.map +1 -0
  171. package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
  172. package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
  173. package/dist/coordination/transport.d.ts +2 -0
  174. package/dist/coordination/transport.d.ts.map +1 -0
  175. package/dist/coordination/worktree-task-runner.d.ts +45 -0
  176. package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
  177. package/dist/core/agent-internals.d.ts +41 -0
  178. package/dist/core/agent-internals.d.ts.map +1 -0
  179. package/dist/core/agent-loop.d.ts +18 -0
  180. package/dist/core/agent-loop.d.ts.map +1 -0
  181. package/dist/core/agent-response.d.ts +21 -0
  182. package/dist/core/agent-response.d.ts.map +1 -0
  183. package/dist/core/agent-tools.d.ts +21 -0
  184. package/dist/core/agent-tools.d.ts.map +1 -0
  185. package/dist/core/agent-types.d.ts +95 -0
  186. package/dist/core/agent-types.d.ts.map +1 -0
  187. package/dist/core/agent.d.ts +54 -0
  188. package/dist/core/agent.d.ts.map +1 -0
  189. package/dist/core/btw.d.ts +40 -0
  190. package/dist/core/btw.d.ts.map +1 -0
  191. package/dist/core/context.d.ts +269 -0
  192. package/dist/core/context.d.ts.map +1 -0
  193. package/dist/core/continue-intent.d.ts +92 -0
  194. package/dist/core/continue-intent.d.ts.map +1 -0
  195. package/dist/core/continue-to-next-iteration.d.ts +96 -0
  196. package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
  197. package/dist/core/conversation-state.d.ts +96 -0
  198. package/dist/core/conversation-state.d.ts.map +1 -0
  199. package/dist/core/fallback-model.d.ts +94 -0
  200. package/dist/core/fallback-model.d.ts.map +1 -0
  201. package/dist/core/fleet-pulse.d.ts +42 -0
  202. package/dist/core/fleet-pulse.d.ts.map +1 -0
  203. package/dist/core/input-builder.d.ts +95 -0
  204. package/dist/core/input-builder.d.ts.map +1 -0
  205. package/dist/core/instruction-bundle.d.ts +22 -0
  206. package/dist/core/instruction-bundle.d.ts.map +1 -0
  207. package/dist/core/iteration-limit.d.ts +35 -0
  208. package/dist/core/iteration-limit.d.ts.map +1 -0
  209. package/dist/core/mailbox-loop.d.ts +63 -0
  210. package/dist/core/mailbox-loop.d.ts.map +1 -0
  211. package/dist/core/modes/brief.d.ts +2 -0
  212. package/dist/core/modes/brief.d.ts.map +1 -0
  213. package/dist/core/modes/default.d.ts +8 -0
  214. package/dist/core/modes/default.d.ts.map +1 -0
  215. package/dist/core/modes/teach.d.ts +2 -0
  216. package/dist/core/modes/teach.d.ts.map +1 -0
  217. package/dist/core/provider-runner.d.ts +24 -0
  218. package/dist/core/provider-runner.d.ts.map +1 -0
  219. package/dist/core/queued-messages.d.ts +55 -0
  220. package/dist/core/queued-messages.d.ts.map +1 -0
  221. package/dist/core/run-env.d.ts +49 -0
  222. package/dist/core/run-env.d.ts.map +1 -0
  223. package/dist/core/streaming-response-builder.d.ts +78 -0
  224. package/dist/core/streaming-response-builder.d.ts.map +1 -0
  225. package/dist/core/system-prompt-builder.d.ts +213 -0
  226. package/dist/core/system-prompt-builder.d.ts.map +1 -0
  227. package/dist/defaults/index.d.ts +68 -158
  228. package/dist/defaults/index.d.ts.map +1 -0
  229. package/dist/defaults/index.js +1257 -819
  230. package/dist/defaults/index.js.map +7 -1
  231. package/dist/execution/auto-compaction-middleware.d.ts +123 -0
  232. package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
  233. package/dist/execution/autonomous-runner.d.ts +55 -0
  234. package/dist/execution/autonomous-runner.d.ts.map +1 -0
  235. package/dist/execution/autonomy-brain.d.ts +90 -0
  236. package/dist/execution/autonomy-brain.d.ts.map +1 -0
  237. package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
  238. package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
  239. package/dist/execution/compaction-core.d.ts +103 -0
  240. package/dist/execution/compaction-core.d.ts.map +1 -0
  241. package/dist/execution/compactor.d.ts +56 -0
  242. package/dist/execution/compactor.d.ts.map +1 -0
  243. package/dist/execution/design-color.d.ts +31 -0
  244. package/dist/execution/design-color.d.ts.map +1 -0
  245. package/dist/execution/design-detect.d.ts +96 -0
  246. package/dist/execution/design-detect.d.ts.map +1 -0
  247. package/dist/execution/design-kit-loader.d.ts +53 -0
  248. package/dist/execution/design-kit-loader.d.ts.map +1 -0
  249. package/dist/execution/design-materialize.d.ts +32 -0
  250. package/dist/execution/design-materialize.d.ts.map +1 -0
  251. package/dist/execution/design-project-store.d.ts +57 -0
  252. package/dist/execution/design-project-store.d.ts.map +1 -0
  253. package/dist/execution/design-verify.d.ts +44 -0
  254. package/dist/execution/design-verify.d.ts.map +1 -0
  255. package/dist/execution/error-handler.d.ts +34 -0
  256. package/dist/execution/error-handler.d.ts.map +1 -0
  257. package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +10 -225
  258. package/dist/execution/eternal-autonomy.d.ts.map +1 -0
  259. package/dist/execution/goal-preamble.d.ts +2 -0
  260. package/dist/execution/goal-preamble.d.ts.map +1 -0
  261. package/dist/execution/index.d.ts +21 -180
  262. package/dist/execution/index.d.ts.map +1 -0
  263. package/dist/execution/index.js +465 -180
  264. package/dist/execution/index.js.map +7 -1
  265. package/dist/execution/intelligent-compactor.d.ts +85 -0
  266. package/dist/execution/intelligent-compactor.d.ts.map +1 -0
  267. package/dist/execution/model-runtime.d.ts +75 -0
  268. package/dist/execution/model-runtime.d.ts.map +1 -0
  269. package/dist/execution/parallel-eternal-engine.d.ts +130 -0
  270. package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
  271. package/dist/execution/prompt-enhancer.d.ts +12 -13
  272. package/dist/execution/prompt-enhancer.d.ts.map +1 -0
  273. package/dist/execution/prompt-enhancer.js +13 -7
  274. package/dist/execution/prompt-enhancer.js.map +7 -1
  275. package/dist/execution/prompt-loader.d.ts +52 -0
  276. package/dist/execution/prompt-loader.d.ts.map +1 -0
  277. package/dist/execution/provider-runner-impl.d.ts +14 -0
  278. package/dist/execution/provider-runner-impl.d.ts.map +1 -0
  279. package/dist/execution/regex-patterns.d.ts +7 -0
  280. package/dist/execution/regex-patterns.d.ts.map +1 -0
  281. package/dist/execution/retry-policy.d.ts +35 -0
  282. package/dist/execution/retry-policy.d.ts.map +1 -0
  283. package/dist/execution/selective-compactor.d.ts +94 -0
  284. package/dist/execution/selective-compactor.d.ts.map +1 -0
  285. package/dist/execution/skill-loader.d.ts +43 -0
  286. package/dist/execution/skill-loader.d.ts.map +1 -0
  287. package/dist/execution/strategy-compactor.d.ts +43 -0
  288. package/dist/execution/strategy-compactor.d.ts.map +1 -0
  289. package/dist/execution/tool-executor.d.ts +112 -0
  290. package/dist/execution/tool-executor.d.ts.map +1 -0
  291. package/dist/extension/extension-points.d.ts +121 -0
  292. package/dist/extension/extension-points.d.ts.map +1 -0
  293. package/dist/extension/index.d.ts +3 -10
  294. package/dist/extension/index.d.ts.map +1 -0
  295. package/dist/extension/index.js +59 -5
  296. package/dist/extension/index.js.map +7 -1
  297. package/dist/extension/registry.d.ts +86 -0
  298. package/dist/extension/registry.d.ts.map +1 -0
  299. package/dist/fleet-notifier.d.ts +28 -0
  300. package/dist/fleet-notifier.d.ts.map +1 -0
  301. package/dist/hooks/http-executor.d.ts +11 -0
  302. package/dist/hooks/http-executor.d.ts.map +1 -0
  303. package/dist/hooks/index.d.ts +10 -0
  304. package/dist/hooks/index.d.ts.map +1 -0
  305. package/dist/hooks/registry.d.ts +71 -0
  306. package/dist/hooks/registry.d.ts.map +1 -0
  307. package/dist/hooks/runner.d.ts +65 -0
  308. package/dist/hooks/runner.d.ts.map +1 -0
  309. package/dist/hooks/shell-executor.d.ts +33 -0
  310. package/dist/hooks/shell-executor.d.ts.map +1 -0
  311. package/dist/hooks/shell-hooks-equal.d.ts +15 -0
  312. package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
  313. package/dist/hq/agent-bridge.d.ts +27 -0
  314. package/dist/hq/agent-bridge.d.ts.map +1 -0
  315. package/dist/hq/alerts.d.ts +67 -0
  316. package/dist/hq/alerts.d.ts.map +1 -0
  317. package/dist/hq/auth-store.d.ts +161 -0
  318. package/dist/hq/auth-store.d.ts.map +1 -0
  319. package/dist/hq/brain-bridge.d.ts +37 -0
  320. package/dist/hq/brain-bridge.d.ts.map +1 -0
  321. package/dist/hq/commands.d.ts +122 -0
  322. package/dist/hq/commands.d.ts.map +1 -0
  323. package/dist/hq/cost-bridge.d.ts +36 -0
  324. package/dist/hq/cost-bridge.d.ts.map +1 -0
  325. package/dist/hq/factory.d.ts +66 -0
  326. package/dist/hq/factory.d.ts.map +1 -0
  327. package/dist/hq/fleet-bridge.d.ts +39 -0
  328. package/dist/hq/fleet-bridge.d.ts.map +1 -0
  329. package/dist/hq/index.d.ts +18 -816
  330. package/dist/hq/index.d.ts.map +1 -0
  331. package/dist/hq/index.js +417 -122
  332. package/dist/hq/index.js.map +7 -1
  333. package/dist/hq/mailbox-mapper.d.ts +27 -0
  334. package/dist/hq/mailbox-mapper.d.ts.map +1 -0
  335. package/dist/hq/persistence.d.ts +121 -0
  336. package/dist/hq/persistence.d.ts.map +1 -0
  337. package/dist/hq/protocol.d.ts +560 -0
  338. package/dist/hq/protocol.d.ts.map +1 -0
  339. package/dist/hq/publisher.d.ts +177 -0
  340. package/dist/hq/publisher.d.ts.map +1 -0
  341. package/dist/hq/redaction.d.ts +30 -0
  342. package/dist/hq/redaction.d.ts.map +1 -0
  343. package/dist/hq/session-bridge.d.ts +29 -0
  344. package/dist/hq/session-bridge.d.ts.map +1 -0
  345. package/dist/hq/tool-bridge.d.ts +41 -0
  346. package/dist/hq/tool-bridge.d.ts.map +1 -0
  347. package/dist/hq/transcript-mapper.d.ts +36 -0
  348. package/dist/hq/transcript-mapper.d.ts.map +1 -0
  349. package/dist/hq/worktree-bridge.d.ts +34 -0
  350. package/dist/hq/worktree-bridge.d.ts.map +1 -0
  351. package/dist/index.d.ts +108 -2872
  352. package/dist/index.d.ts.map +1 -0
  353. package/dist/index.js +2724 -1344
  354. package/dist/index.js.map +7 -1
  355. package/dist/infrastructure/context-manager.d.ts +92 -0
  356. package/dist/infrastructure/context-manager.d.ts.map +1 -0
  357. package/dist/infrastructure/index.d.ts +6 -64
  358. package/dist/infrastructure/index.d.ts.map +1 -0
  359. package/dist/infrastructure/index.js +39 -12
  360. package/dist/infrastructure/index.js.map +7 -1
  361. package/dist/infrastructure/logger.d.ts +99 -0
  362. package/dist/infrastructure/logger.d.ts.map +1 -0
  363. package/dist/infrastructure/mcp-servers.d.ts +83 -0
  364. package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
  365. package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
  366. package/dist/infrastructure/path-resolver.d.ts.map +1 -0
  367. package/dist/infrastructure/token-counter.d.ts +57 -0
  368. package/dist/infrastructure/token-counter.d.ts.map +1 -0
  369. package/dist/kernel/container.d.ts +84 -0
  370. package/dist/kernel/container.d.ts.map +1 -0
  371. package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +112 -206
  372. package/dist/kernel/events.d.ts.map +1 -0
  373. package/dist/kernel/index.d.ts +6 -107
  374. package/dist/kernel/index.d.ts.map +1 -0
  375. package/dist/kernel/index.js +56 -4
  376. package/dist/kernel/index.js.map +7 -1
  377. package/dist/kernel/pipeline.d.ts +105 -0
  378. package/dist/kernel/pipeline.d.ts.map +1 -0
  379. package/dist/kernel/run-controller.d.ts +55 -0
  380. package/dist/kernel/run-controller.d.ts.map +1 -0
  381. package/dist/kernel/tokens.d.ts +53 -0
  382. package/dist/kernel/tokens.d.ts.map +1 -0
  383. package/dist/mailbox-attach.d.ts +27 -0
  384. package/dist/mailbox-attach.d.ts.map +1 -0
  385. package/dist/middleware/collab-pause.d.ts +73 -0
  386. package/dist/middleware/collab-pause.d.ts.map +1 -0
  387. package/dist/models/codex-catalog.d.ts +41 -0
  388. package/dist/models/codex-catalog.d.ts.map +1 -0
  389. package/dist/models/index.d.ts +8 -163
  390. package/dist/models/index.d.ts.map +1 -0
  391. package/dist/models/index.js +150 -51
  392. package/dist/models/index.js.map +7 -1
  393. package/dist/models/llm-selector.d.ts +47 -0
  394. package/dist/models/llm-selector.d.ts.map +1 -0
  395. package/dist/models/mode-store.d.ts +22 -0
  396. package/dist/models/mode-store.d.ts.map +1 -0
  397. package/dist/models/model-intelligence.d.ts +56 -0
  398. package/dist/models/model-intelligence.d.ts.map +1 -0
  399. package/dist/models/model-router.d.ts +100 -0
  400. package/dist/models/model-router.d.ts.map +1 -0
  401. package/dist/models/models-registry.d.ts +106 -0
  402. package/dist/models/models-registry.d.ts.map +1 -0
  403. package/dist/models/provider-model-resolve.d.ts +69 -0
  404. package/dist/models/provider-model-resolve.d.ts.map +1 -0
  405. package/dist/observability/event-bridge.d.ts +10 -0
  406. package/dist/observability/event-bridge.d.ts.map +1 -0
  407. package/dist/observability/health.d.ts +18 -0
  408. package/dist/observability/health.d.ts.map +1 -0
  409. package/dist/observability/index.d.ts +9 -354
  410. package/dist/observability/index.d.ts.map +1 -0
  411. package/dist/observability/index.js +21 -8
  412. package/dist/observability/index.js.map +7 -1
  413. package/dist/observability/metrics.d.ts +26 -0
  414. package/dist/observability/metrics.d.ts.map +1 -0
  415. package/dist/observability/otel-tracer.d.ts +41 -0
  416. package/dist/observability/otel-tracer.d.ts.map +1 -0
  417. package/dist/observability/otlp-metrics.d.ts +111 -0
  418. package/dist/observability/otlp-metrics.d.ts.map +1 -0
  419. package/dist/observability/otlp-traces.d.ts +95 -0
  420. package/dist/observability/otlp-traces.d.ts.map +1 -0
  421. package/dist/observability/prometheus.d.ts +49 -0
  422. package/dist/observability/prometheus.d.ts.map +1 -0
  423. package/dist/observability/tracer.d.ts +9 -0
  424. package/dist/observability/tracer.d.ts.map +1 -0
  425. package/dist/plugin/api.d.ts +226 -0
  426. package/dist/plugin/api.d.ts.map +1 -0
  427. package/dist/plugin/loader.d.ts +73 -0
  428. package/dist/plugin/loader.d.ts.map +1 -0
  429. package/dist/plugins/chimera-plugin.d.ts +37 -0
  430. package/dist/plugins/chimera-plugin.d.ts.map +1 -0
  431. package/dist/plugins/git-plugin.d.ts +15 -0
  432. package/dist/plugins/git-plugin.d.ts.map +1 -0
  433. package/dist/plugins/observability-plugin.d.ts +19 -0
  434. package/dist/plugins/observability-plugin.d.ts.map +1 -0
  435. package/dist/plugins/plan-plugin.d.ts +16 -0
  436. package/dist/plugins/plan-plugin.d.ts.map +1 -0
  437. package/dist/plugins/prompts-plugin.d.ts +26 -0
  438. package/dist/plugins/prompts-plugin.d.ts.map +1 -0
  439. package/dist/plugins/security-plugin.d.ts +19 -0
  440. package/dist/plugins/security-plugin.d.ts.map +1 -0
  441. package/dist/plugins/skills-plugin.d.ts +42 -0
  442. package/dist/plugins/skills-plugin.d.ts.map +1 -0
  443. package/dist/plugins/sync-plugin.d.ts +22 -0
  444. package/dist/plugins/sync-plugin.d.ts.map +1 -0
  445. package/dist/prompts/index.d.ts +3 -0
  446. package/dist/prompts/index.d.ts.map +1 -0
  447. package/dist/prompts/prompt-installer.d.ts +50 -0
  448. package/dist/prompts/prompt-installer.d.ts.map +1 -0
  449. package/dist/prompts/prompt-manifest-store.d.ts +18 -0
  450. package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
  451. package/dist/registry/provider-registry.d.ts +51 -0
  452. package/dist/registry/provider-registry.d.ts.map +1 -0
  453. package/dist/registry/slash-command-registry.d.ts +61 -0
  454. package/dist/registry/slash-command-registry.d.ts.map +1 -0
  455. package/dist/registry/tool-registry.d.ts +154 -0
  456. package/dist/registry/tool-registry.d.ts.map +1 -0
  457. package/dist/replay/hash.d.ts +31 -0
  458. package/dist/replay/hash.d.ts.map +1 -0
  459. package/dist/replay/replay-provider-runner.d.ts +53 -0
  460. package/dist/replay/replay-provider-runner.d.ts.map +1 -0
  461. package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
  462. package/dist/security/capabilities.d.ts.map +1 -0
  463. package/dist/security/config-secrets.d.ts +25 -0
  464. package/dist/security/config-secrets.d.ts.map +1 -0
  465. package/dist/security/index.d.ts +6 -8
  466. package/dist/security/index.d.ts.map +1 -0
  467. package/dist/security/index.js +102 -381
  468. package/dist/security/index.js.map +7 -1
  469. package/dist/security/permission-policy.d.ts +153 -0
  470. package/dist/security/permission-policy.d.ts.map +1 -0
  471. package/dist/security/secret-scrubber.d.ts +14 -0
  472. package/dist/security/secret-scrubber.d.ts.map +1 -0
  473. package/dist/security/secret-vault.d.ts +87 -0
  474. package/dist/security/secret-vault.d.ts.map +1 -0
  475. package/dist/security/yolo-risk.d.ts +11 -0
  476. package/dist/security/yolo-risk.d.ts.map +1 -0
  477. package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
  478. package/dist/session-registry.d.ts.map +1 -0
  479. package/dist/skills/foreign-sources.d.ts +59 -0
  480. package/dist/skills/foreign-sources.d.ts.map +1 -0
  481. package/dist/skills/frontmatter.d.ts +44 -0
  482. package/dist/skills/frontmatter.d.ts.map +1 -0
  483. package/dist/skills/github-fetcher.d.ts +38 -0
  484. package/dist/skills/github-fetcher.d.ts.map +1 -0
  485. package/dist/skills/index.d.ts +11 -582
  486. package/dist/skills/index.d.ts.map +1 -0
  487. package/dist/skills/index.js +81 -43
  488. package/dist/skills/index.js.map +7 -1
  489. package/dist/skills/limits.d.ts +92 -0
  490. package/dist/skills/limits.d.ts.map +1 -0
  491. package/dist/skills/manifest-store.d.ts +42 -0
  492. package/dist/skills/manifest-store.d.ts.map +1 -0
  493. package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
  494. package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
  495. package/dist/skills/registry/registry-adapter.d.ts +84 -0
  496. package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
  497. package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
  498. package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
  499. package/dist/skills/skill-generator.d.ts +82 -0
  500. package/dist/skills/skill-generator.d.ts.map +1 -0
  501. package/dist/skills/skill-installer.d.ts +124 -0
  502. package/dist/skills/skill-installer.d.ts.map +1 -0
  503. package/dist/storage/annotations-store.d.ts +118 -0
  504. package/dist/storage/annotations-store.d.ts.map +1 -0
  505. package/dist/storage/attachment-store.d.ts +31 -0
  506. package/dist/storage/attachment-store.d.ts.map +1 -0
  507. package/dist/storage/cloud-sync.d.ts +44 -0
  508. package/dist/storage/cloud-sync.d.ts.map +1 -0
  509. package/dist/storage/completed-work-checkpoint.d.ts +11 -0
  510. package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
  511. package/dist/storage/config-loader.d.ts +104 -0
  512. package/dist/storage/config-loader.d.ts.map +1 -0
  513. package/dist/storage/config-migration.d.ts +87 -0
  514. package/dist/storage/config-migration.d.ts.map +1 -0
  515. package/dist/storage/config-store.d.ts +22 -0
  516. package/dist/storage/config-store.d.ts.map +1 -0
  517. package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
  518. package/dist/storage/director-state.d.ts.map +1 -0
  519. package/dist/storage/file-session-writer.d.ts +169 -0
  520. package/dist/storage/file-session-writer.d.ts.map +1 -0
  521. package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
  522. package/dist/storage/goal-store.d.ts.map +1 -0
  523. package/dist/storage/index.d.ts +39 -1031
  524. package/dist/storage/index.d.ts.map +1 -0
  525. package/dist/storage/index.js +655 -300
  526. package/dist/storage/index.js.map +7 -1
  527. package/dist/storage/input-history-store.d.ts +56 -0
  528. package/dist/storage/input-history-store.d.ts.map +1 -0
  529. package/dist/storage/memory-backend.d.ts +66 -0
  530. package/dist/storage/memory-backend.d.ts.map +1 -0
  531. package/dist/storage/memory-consolidator.d.ts +50 -0
  532. package/dist/storage/memory-consolidator.d.ts.map +1 -0
  533. package/dist/storage/memory-graph-backend.d.ts +117 -0
  534. package/dist/storage/memory-graph-backend.d.ts.map +1 -0
  535. package/dist/storage/memory-store.d.ts +119 -0
  536. package/dist/storage/memory-store.d.ts.map +1 -0
  537. package/dist/storage/plan-store.d.ts +78 -0
  538. package/dist/storage/plan-store.d.ts.map +1 -0
  539. package/dist/storage/plan-templates.d.ts +21 -0
  540. package/dist/storage/plan-templates.d.ts.map +1 -0
  541. package/dist/storage/prompt-store.d.ts +37 -0
  542. package/dist/storage/prompt-store.d.ts.map +1 -0
  543. package/dist/storage/prompt-usage-store.d.ts +29 -0
  544. package/dist/storage/prompt-usage-store.d.ts.map +1 -0
  545. package/dist/storage/provider-config-watcher.d.ts +34 -0
  546. package/dist/storage/provider-config-watcher.d.ts.map +1 -0
  547. package/dist/storage/queue-store.d.ts +37 -0
  548. package/dist/storage/queue-store.d.ts.map +1 -0
  549. package/dist/storage/recovery-lock.d.ts +79 -0
  550. package/dist/storage/recovery-lock.d.ts.map +1 -0
  551. package/dist/storage/replay-log-store.d.ts +97 -0
  552. package/dist/storage/replay-log-store.d.ts.map +1 -0
  553. package/dist/storage/session-analyzer.d.ts +48 -0
  554. package/dist/storage/session-analyzer.d.ts.map +1 -0
  555. package/dist/storage/session-checkpoint-cas.d.ts +37 -0
  556. package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
  557. package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
  558. package/dist/storage/session-event-bridge.d.ts.map +1 -0
  559. package/dist/storage/session-helpers.d.ts +9 -0
  560. package/dist/storage/session-helpers.d.ts.map +1 -0
  561. package/dist/storage/session-id.d.ts +18 -0
  562. package/dist/storage/session-id.d.ts.map +1 -0
  563. package/dist/storage/session-reader.d.ts +21 -0
  564. package/dist/storage/session-reader.d.ts.map +1 -0
  565. package/dist/storage/session-recovery.d.ts +93 -0
  566. package/dist/storage/session-recovery.d.ts.map +1 -0
  567. package/dist/storage/session-resume-validation.d.ts +6 -0
  568. package/dist/storage/session-resume-validation.d.ts.map +1 -0
  569. package/dist/storage/session-rewinder.d.ts +21 -0
  570. package/dist/storage/session-rewinder.d.ts.map +1 -0
  571. package/dist/storage/session-store.d.ts +210 -0
  572. package/dist/storage/session-store.d.ts.map +1 -0
  573. package/dist/storage/session-summary.d.ts +12 -0
  574. package/dist/storage/session-summary.d.ts.map +1 -0
  575. package/dist/storage/session-tool-call-ends.d.ts +5 -0
  576. package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
  577. package/dist/storage/storage-concurrency.d.ts +2 -0
  578. package/dist/storage/storage-concurrency.d.ts.map +1 -0
  579. package/dist/storage/task-store.d.ts +33 -0
  580. package/dist/storage/task-store.d.ts.map +1 -0
  581. package/dist/storage/todos-checkpoint.d.ts +39 -0
  582. package/dist/storage/todos-checkpoint.d.ts.map +1 -0
  583. package/dist/storage/tool-audit-log.d.ts +141 -0
  584. package/dist/storage/tool-audit-log.d.ts.map +1 -0
  585. package/dist/tasking/index.d.ts +3 -124
  586. package/dist/tasking/index.d.ts.map +1 -0
  587. package/dist/tasking/index.js +57 -4
  588. package/dist/tasking/index.js.map +7 -1
  589. package/dist/tasking/task-store.d.ts +22 -0
  590. package/dist/tasking/task-store.d.ts.map +1 -0
  591. package/dist/tasking/task-tracker.d.ts +102 -0
  592. package/dist/tasking/task-tracker.d.ts.map +1 -0
  593. package/dist/tools/index.d.ts +2 -59
  594. package/dist/tools/index.d.ts.map +1 -0
  595. package/dist/tools/index.js +93 -14
  596. package/dist/tools/index.js.map +7 -1
  597. package/dist/tools/mcp-control.d.ts +53 -0
  598. package/dist/tools/mcp-control.d.ts.map +1 -0
  599. package/dist/tools/mcp-use.d.ts +24 -0
  600. package/dist/tools/mcp-use.d.ts.map +1 -0
  601. package/dist/types/agent-bridge.d.ts +42 -0
  602. package/dist/types/agent-bridge.d.ts.map +1 -0
  603. package/dist/types/attachment.d.ts +54 -0
  604. package/dist/types/attachment.d.ts.map +1 -0
  605. package/dist/types/autonomy.d.ts +5 -0
  606. package/dist/types/autonomy.d.ts.map +1 -0
  607. package/dist/types/blocks.d.ts +76 -0
  608. package/dist/types/blocks.d.ts.map +1 -0
  609. package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
  610. package/dist/types/compactor.d.ts.map +1 -0
  611. package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +135 -354
  612. package/dist/types/config.d.ts.map +1 -0
  613. package/dist/types/context-evidence.d.ts +68 -0
  614. package/dist/types/context-evidence.d.ts.map +1 -0
  615. package/dist/types/context-window.d.ts +35 -0
  616. package/dist/types/context-window.d.ts.map +1 -0
  617. package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
  618. package/dist/types/default-config.d.ts.map +1 -0
  619. package/dist/types/design-kit.d.ts +91 -0
  620. package/dist/types/design-kit.d.ts.map +1 -0
  621. package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
  622. package/dist/types/error-handler.d.ts.map +1 -0
  623. package/dist/types/errors.d.ts +277 -0
  624. package/dist/types/errors.d.ts.map +1 -0
  625. package/dist/types/hooks.d.ts +167 -0
  626. package/dist/types/hooks.d.ts.map +1 -0
  627. package/dist/types/index.d.ts +40 -244
  628. package/dist/types/index.d.ts.map +1 -0
  629. package/dist/types/index.js +90 -12
  630. package/dist/types/index.js.map +7 -1
  631. package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
  632. package/dist/types/input-reader.d.ts.map +1 -0
  633. package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
  634. package/dist/types/logger.d.ts.map +1 -0
  635. package/dist/types/memory.d.ts +89 -0
  636. package/dist/types/memory.d.ts.map +1 -0
  637. package/dist/types/messages.d.ts +24 -0
  638. package/dist/types/messages.d.ts.map +1 -0
  639. package/dist/types/mode-prompts.d.ts +2 -0
  640. package/dist/types/mode-prompts.d.ts.map +1 -0
  641. package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
  642. package/dist/types/mode.d.ts.map +1 -0
  643. package/dist/types/models-registry.d.ts +105 -0
  644. package/dist/types/models-registry.d.ts.map +1 -0
  645. package/dist/types/multi-agent.d.ts +435 -0
  646. package/dist/types/multi-agent.d.ts.map +1 -0
  647. package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +12 -13
  648. package/dist/types/observability.d.ts.map +1 -0
  649. package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
  650. package/dist/types/path-resolver.d.ts.map +1 -0
  651. package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
  652. package/dist/types/permission.d.ts.map +1 -0
  653. package/dist/types/plugin.d.ts +385 -0
  654. package/dist/types/plugin.d.ts.map +1 -0
  655. package/dist/types/prompt-registry.d.ts +81 -0
  656. package/dist/types/prompt-registry.d.ts.map +1 -0
  657. package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
  658. package/dist/types/prompt.d.ts.map +1 -0
  659. package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
  660. package/dist/types/provider-runner.d.ts.map +1 -0
  661. package/dist/types/provider.d.ts +387 -0
  662. package/dist/types/provider.d.ts.map +1 -0
  663. package/dist/types/renderer.d.ts +23 -0
  664. package/dist/types/renderer.d.ts.map +1 -0
  665. package/dist/types/retry-policy.d.ts +7 -0
  666. package/dist/types/retry-policy.d.ts.map +1 -0
  667. package/dist/types/secret-scrubber.d.ts +5 -0
  668. package/dist/types/secret-scrubber.d.ts.map +1 -0
  669. package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
  670. package/dist/types/secret-vault.d.ts.map +1 -0
  671. package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
  672. package/dist/types/selector.d.ts.map +1 -0
  673. package/dist/types/session-reader.d.ts +81 -0
  674. package/dist/types/session-reader.d.ts.map +1 -0
  675. package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
  676. package/dist/types/session-rewinder.d.ts.map +1 -0
  677. package/dist/types/session.d.ts +650 -0
  678. package/dist/types/session.d.ts.map +1 -0
  679. package/dist/types/side-effect.d.ts +34 -0
  680. package/dist/types/side-effect.d.ts.map +1 -0
  681. package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
  682. package/dist/types/skill.d.ts.map +1 -0
  683. package/dist/types/slash-command.d.ts +59 -0
  684. package/dist/types/slash-command.d.ts.map +1 -0
  685. package/dist/types/spec.d.ts +77 -0
  686. package/dist/types/spec.d.ts.map +1 -0
  687. package/dist/types/system-prompt-contributor.d.ts +20 -0
  688. package/dist/types/system-prompt-contributor.d.ts.map +1 -0
  689. package/dist/types/system-prompt.d.ts +51 -0
  690. package/dist/types/system-prompt.d.ts.map +1 -0
  691. package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
  692. package/dist/types/task-graph.d.ts.map +1 -0
  693. package/dist/types/token-counter.d.ts +42 -0
  694. package/dist/types/token-counter.d.ts.map +1 -0
  695. package/dist/types/tool-executor.d.ts +133 -0
  696. package/dist/types/tool-executor.d.ts.map +1 -0
  697. package/dist/types/tool-markers.d.ts +23 -0
  698. package/dist/types/tool-markers.d.ts.map +1 -0
  699. package/dist/types/tool.d.ts +245 -0
  700. package/dist/types/tool.d.ts.map +1 -0
  701. package/dist/types/utility-types.d.ts +31 -0
  702. package/dist/types/utility-types.d.ts.map +1 -0
  703. package/dist/utils/assert-never.d.ts +14 -0
  704. package/dist/utils/assert-never.d.ts.map +1 -0
  705. package/dist/utils/atomic-write.d.ts +12 -0
  706. package/dist/utils/atomic-write.d.ts.map +1 -0
  707. package/dist/utils/child-env.d.ts +67 -0
  708. package/dist/utils/child-env.d.ts.map +1 -0
  709. package/dist/utils/color.d.ts +20 -0
  710. package/dist/utils/color.d.ts.map +1 -0
  711. package/dist/utils/config-json.d.ts +14 -0
  712. package/dist/utils/config-json.d.ts.map +1 -0
  713. package/dist/utils/context-evidence.d.ts +47 -0
  714. package/dist/utils/context-evidence.d.ts.map +1 -0
  715. package/dist/utils/deep-merge.d.ts +64 -0
  716. package/dist/utils/deep-merge.d.ts.map +1 -0
  717. package/dist/utils/diff.d.ts +11 -0
  718. package/dist/utils/diff.d.ts.map +1 -0
  719. package/dist/utils/error.d.ts +2 -3
  720. package/dist/utils/error.d.ts.map +1 -0
  721. package/dist/utils/error.js +3 -3
  722. package/dist/utils/error.js.map +7 -1
  723. package/dist/utils/expect-defined.d.ts +2 -3
  724. package/dist/utils/expect-defined.d.ts.map +1 -0
  725. package/dist/utils/expect-defined.js +3 -3
  726. package/dist/utils/expect-defined.js.map +7 -1
  727. package/dist/utils/glob-expand.d.ts +10 -0
  728. package/dist/utils/glob-expand.d.ts.map +1 -0
  729. package/dist/utils/glob-match.d.ts +4 -0
  730. package/dist/utils/glob-match.d.ts.map +1 -0
  731. package/dist/utils/index.d.ts +37 -920
  732. package/dist/utils/index.d.ts.map +1 -0
  733. package/dist/utils/index.js +242 -33
  734. package/dist/utils/index.js.map +7 -1
  735. package/dist/utils/instruction-file.d.ts +3 -0
  736. package/dist/utils/instruction-file.d.ts.map +1 -0
  737. package/dist/utils/ip-guard.d.ts +34 -0
  738. package/dist/utils/ip-guard.d.ts.map +1 -0
  739. package/dist/utils/json-repair.d.ts +23 -0
  740. package/dist/utils/json-repair.d.ts.map +1 -0
  741. package/dist/utils/json-schema-validate.d.ts +42 -0
  742. package/dist/utils/json-schema-validate.d.ts.map +1 -0
  743. package/dist/utils/lru-cache.d.ts +29 -0
  744. package/dist/utils/lru-cache.d.ts.map +1 -0
  745. package/dist/utils/merge-custom-models.d.ts +12 -0
  746. package/dist/utils/merge-custom-models.d.ts.map +1 -0
  747. package/dist/utils/merge-models-payload.d.ts +20 -0
  748. package/dist/utils/merge-models-payload.d.ts.map +1 -0
  749. package/dist/utils/message-invariants.d.ts +22 -0
  750. package/dist/utils/message-invariants.d.ts.map +1 -0
  751. package/dist/utils/newline-normalize.d.ts +5 -0
  752. package/dist/utils/newline-normalize.d.ts.map +1 -0
  753. package/dist/utils/regex-guard.d.ts +21 -0
  754. package/dist/utils/regex-guard.d.ts.map +1 -0
  755. package/dist/utils/safe-json.d.ts +31 -0
  756. package/dist/utils/safe-json.d.ts.map +1 -0
  757. package/dist/utils/session-scoped-path.d.ts +13 -0
  758. package/dist/utils/session-scoped-path.d.ts.map +1 -0
  759. package/dist/utils/sleep.d.ts +5 -0
  760. package/dist/utils/sleep.d.ts.map +1 -0
  761. package/dist/utils/slug.d.ts +13 -0
  762. package/dist/utils/slug.d.ts.map +1 -0
  763. package/dist/utils/string.d.ts +9 -0
  764. package/dist/utils/string.d.ts.map +1 -0
  765. package/dist/utils/task-format.d.ts +22 -0
  766. package/dist/utils/task-format.d.ts.map +1 -0
  767. package/dist/utils/term.d.ts +133 -0
  768. package/dist/utils/term.d.ts.map +1 -0
  769. package/dist/utils/todos-format.d.ts +30 -0
  770. package/dist/utils/todos-format.d.ts.map +1 -0
  771. package/dist/utils/token-estimate.d.ts +112 -0
  772. package/dist/utils/token-estimate.d.ts.map +1 -0
  773. package/dist/utils/tool-description-mode.d.ts +28 -0
  774. package/dist/utils/tool-description-mode.d.ts.map +1 -0
  775. package/dist/utils/tool-output-serializer.d.ts +40 -0
  776. package/dist/utils/tool-output-serializer.d.ts.map +1 -0
  777. package/dist/utils/tool-result-render-mode.d.ts +55 -0
  778. package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
  779. package/dist/utils/tool-subject.d.ts +5 -0
  780. package/dist/utils/tool-subject.d.ts.map +1 -0
  781. package/dist/utils/tool-wire-compact.d.ts +28 -0
  782. package/dist/utils/tool-wire-compact.d.ts.map +1 -0
  783. package/dist/utils/ulid.d.ts +11 -0
  784. package/dist/utils/ulid.d.ts.map +1 -0
  785. package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
  786. package/dist/utils/wstack-paths.d.ts.map +1 -0
  787. package/dist/worktree/index.d.ts +2 -0
  788. package/dist/worktree/index.d.ts.map +1 -0
  789. package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +19 -13
  790. package/dist/worktree/worktree-manager.d.ts.map +1 -0
  791. package/instructions/autonomy/active-mission.md +2 -4
  792. package/instructions/sections/tool/delegation-full.md +1 -1
  793. package/package.json +4 -5
  794. package/skills/node-modern/SKILL.md +2 -2
  795. package/skills/plugin-author/SKILL.md +9 -16
  796. package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
  797. package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
  798. package/dist/index--Gm41aBJ.d.ts +0 -671
  799. package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
  800. package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
  801. package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
  802. package/dist/pipeline-DGDyIohT.d.ts +0 -331
  803. package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
  804. package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
  805. package/dist/secret-vault-DxohkUBc.d.ts +0 -272
  806. package/dist/session-reader-7Esxrkpw.d.ts +0 -155
  807. package/dist/task-format-GX0B1mMC.d.ts +0 -23
  808. package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
  809. package/dist/tool-BNlnIJvo.d.ts +0 -2190
  810. package/dist/tool-executor-CckSCM5E.d.ts +0 -906
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Centralized skill system limits.
3
+ *
4
+ * Before this file existed, the magic numbers below were scattered across five
5
+ * modules (`skill-installer`, `github-fetcher`, `skill` tool, system-prompt
6
+ * builder, skill-loader), sometimes duplicated (e.g. per-skill body cap was
7
+ * defined independently in the builder and the tool). Centralizing them here
8
+ * keeps the budget model coherent — change one, change everywhere — and makes
9
+ * the trade-offs visible in one place.
10
+ *
11
+ * Values are frozen at their pre-centralization defaults so this is a pure
12
+ * refactor (no behavior change).
13
+ */
14
+ export declare const SKILL_LIMITS: {
15
+ /**
16
+ * Per-skill body cap when injecting a full skill body into the system prompt
17
+ * (eager mode), and when returning a skill body from the `skill` tool.
18
+ * ~4k tokens. Oversized bodies are truncated at a paragraph boundary.
19
+ *
20
+ * Consumers: `system-prompt-builder.capSkillBody`, `skill` tool body return.
21
+ */
22
+ readonly MAX_SKILL_BODY_CHARS: 16000;
23
+ /**
24
+ * Per-resource cap when the `skill` tool loads a bundled file
25
+ * (`scripts/`, `references/`, `assets/`). ~8k tokens.
26
+ *
27
+ * Consumer: `skill` tool `loadResource`.
28
+ */
29
+ readonly MAX_RESOURCE_CHARS: 32000;
30
+ /**
31
+ * Maximum number of bundled resource paths the `skill` tool lists in one
32
+ * response. Caps a pathological skill (huge `assets/` tree) from blowing up
33
+ * the tool result.
34
+ *
35
+ * Consumer: `skill` tool resource listing.
36
+ */
37
+ readonly MAX_LISTED_RESOURCES: 100;
38
+ /**
39
+ * Max size of a single installed skill file (SKILL.md or a bundled resource).
40
+ * Guards against a malicious registry skill shipping a multi-MB blob that
41
+ * then flows into the prompt. 100KB.
42
+ *
43
+ * Consumer: `SkillInstaller.install` / `importFromDir`.
44
+ */
45
+ readonly MAX_SKILL_FILE_SIZE: number;
46
+ /**
47
+ * Max size of a GitHub tarball downloaded by the skill installer. Guards
48
+ * against a repo accidentally (or maliciously) shipping a giant tarball that
49
+ * would be extracted into a temp dir. 50MB.
50
+ *
51
+ * Consumer: `downloadGitHubTarball`.
52
+ */
53
+ readonly MAX_TARBALL_SIZE: number;
54
+ /**
55
+ * Default total char budget for skill bodies injected in eager mode when
56
+ * `config.skills.eagerMaxChars` is unset. ~6k tokens. Skills are injected
57
+ * highest-priority first; once the budget is exhausted the remaining skills
58
+ * are listed as a manifest the agent loads via the `skill` tool. Set very
59
+ * high to effectively disable budgeting.
60
+ *
61
+ * Consumer: `DefaultSystemPromptBuilder.buildMemoryAndSkills` (default for
62
+ * `skillEagerMaxChars`).
63
+ */
64
+ readonly EAGER_DEFAULT_MAX_CHARS: 24000;
65
+ /**
66
+ * Auto-compact body limits (the token-saving fallback used when a skill has
67
+ * no hand-crafted `SKILL.save.md`). The Overview and Rules sections are
68
+ * extracted and trimmed to these char budgets, then the total is capped.
69
+ *
70
+ * Consumer: `DefaultSkillLoader.compactSkillBody`.
71
+ */
72
+ readonly COMPACT_OVERVIEW_MAX: 200;
73
+ readonly COMPACT_RULES_MAX: 350;
74
+ readonly COMPACT_TOTAL_MAX: 450;
75
+ /**
76
+ * Max length of a skill name (agentskills.io spec). Enforced by the
77
+ * frontmatter validator's format regex plus this length bound.
78
+ *
79
+ * Consumer: `isValidSkillNameFormat`.
80
+ */
81
+ readonly SKILL_NAME_MAX_LEN: 64;
82
+ /**
83
+ * Soft line limit for a SKILL.md body, per the bundled `skill-creator` rule.
84
+ * Not enforced in code (a skill can exceed it) — surfaced by `/skill-gen
85
+ * validate` and the `skill-creator` skill as guidance to move deep material
86
+ * into `references/`.
87
+ *
88
+ * Consumer: `skill-creator` skill, `/skill-gen validate` advisory.
89
+ */
90
+ readonly SKILL_BODY_LINE_LIMIT: 500;
91
+ };
92
+ //# sourceMappingURL=limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/skills/limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY;IACvB;;;;;;OAMG;aACH,oBAAoB,EAAE,KAAM;IAE5B;;;;;OAKG;aACH,kBAAkB,EAAE,KAAM;IAE1B;;;;;;OAMG;aACH,oBAAoB,EAAE,GAAG;IAEzB;;;;;;OAMG;aACH,mBAAmB;IAEnB;;;;;;OAMG;aACH,gBAAgB;IAEhB;;;;;;;;;OASG;aACH,uBAAuB,EAAE,KAAM;IAE/B;;;;;;OAMG;aACH,oBAAoB,EAAE,GAAG;aACzB,iBAAiB,EAAE,GAAG;aACtB,iBAAiB,EAAE,GAAG;IAEtB;;;;;OAKG;aACH,kBAAkB,EAAE,EAAE;IAEtB;;;;;;;OAOG;aACH,qBAAqB,EAAE,GAAG;CAClB,CAAC"}
@@ -0,0 +1,42 @@
1
+ export interface InstalledSkillEntry {
2
+ name: string;
3
+ /** Source identifier, e.g. "github:user/repo" */
4
+ source: string;
5
+ /** Git ref that was installed (branch, tag, commit) */
6
+ ref: string;
7
+ /** Installation scope */
8
+ scope: 'project' | 'user';
9
+ /** Project hash — only set when scope=project */
10
+ projectHash?: string | undefined;
11
+ /** ISO 8601 timestamp */
12
+ installedAt: string;
13
+ /** List of files that were installed (relative to skill dir) */
14
+ files: string[];
15
+ /**
16
+ * When the install was resolved through a registry (e.g. `skills.sh`), the
17
+ * adapter id + registry id that mapped to the GitHub `source`. Absent for
18
+ * direct `user/repo` installs.
19
+ */
20
+ registryFrom?: {
21
+ adapterId: string;
22
+ registryId: string;
23
+ } | undefined;
24
+ }
25
+ export interface ManifestData {
26
+ skills: InstalledSkillEntry[];
27
+ }
28
+ export declare class SkillManifestStore {
29
+ private readonly manifestPath;
30
+ private cache?;
31
+ constructor(manifestPath: string);
32
+ read(): Promise<ManifestData>;
33
+ write(data: ManifestData): Promise<void>;
34
+ addEntry(entry: InstalledSkillEntry): Promise<void>;
35
+ removeEntry(name: string, scope: 'project' | 'user'): Promise<boolean>;
36
+ findByName(name: string): Promise<InstalledSkillEntry[]>;
37
+ findBySource(source: string): Promise<InstalledSkillEntry[]>;
38
+ listAll(): Promise<InstalledSkillEntry[]>;
39
+ /** Invalidate the in-memory cache (e.g. after external file changes). */
40
+ invalidateCache(): void;
41
+ }
42
+ //# sourceMappingURL=manifest-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-store.d.ts","sourceRoot":"","sources":["../../src/skills/manifest-store.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB;IACzB,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CACtE;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,mBAAmB,EAAE,CAAC;CAC/B;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,KAAK,CAAC,CAA2B;IAEzC,YAAY,YAAY,EAAE,MAAM,EAE/B;IAEK,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC,CAclC;IAEK,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAK7C;IAEK,QAAQ,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMxD;IAEK,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO3E;IAEK,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAG7D;IAEK,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAGjE;IAEK,OAAO,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAG9C;IAED,yEAAyE;IACzE,eAAe,IAAI,IAAI,CAEtB;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * GitHub-direct registry adapter.
3
+ *
4
+ * This is the original pre-registry install path wrapped in the adapter
5
+ * interface: the user types `user/repo[@ref]` directly. It does NOT search
6
+ * (GitHub code search is a separate API with its own auth/rate-limit story and
7
+ * isn't a skill catalog), so `search()` returns an empty result. Its job is
8
+ * solely to make `user/repo` flow through the same `<adapterId>:<registryId>`
9
+ * resolution as the skills.sh adapter — except here the "registry id" IS the
10
+ * install ref already.
11
+ *
12
+ * Registered as the fallback adapter so `/skill-install user/repo` keeps
13
+ * working unchanged when no `<adapterId>:` prefix is given.
14
+ */
15
+ import type { SkillRegistryAdapter } from './registry-adapter.js';
16
+ export declare const githubDirectAdapter: SkillRegistryAdapter;
17
+ //# sourceMappingURL=github-direct-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-direct-adapter.d.ts","sourceRoot":"","sources":["../../../src/skills/registry/github-direct-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,mBAAmB,EAAE,oBAqBjC,CAAC"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Skill registry adapter contract.
3
+ *
4
+ * A registry is a searchable catalog of skills that resolves to a concrete
5
+ * install target (a GitHub `user/repo[@ref]`). Two adapters ship out of the
6
+ * box:
7
+ *
8
+ * - `githubDirectAdapter` — no search; `user/repo` is typed directly. This
9
+ * is the original pre-registry install path.
10
+ * - `skillsShAdapter` — searches the skills.sh marketplace
11
+ * (https://skills.sh/api/skills), which indexes
12
+ * 34k+ skills from 2.8k+ repos and computes a
13
+ * per-skill security score (0–100).
14
+ *
15
+ * The adapter layer keeps the installer registry-agnostic: it asks each
16
+ * adapter to resolve a `<adapterId>:<registryId>` ref to a `user/repo@ref`
17
+ * and reuses the existing GitHub tarball path. New registries (an internal
18
+ * company hub, ags, …) are added by implementing this interface and passing
19
+ * them to the `SkillInstaller`.
20
+ */
21
+ /**
22
+ * One hit from a registry search. Fields are optional where the underlying
23
+ * registry doesn't guarantee them — every adapter normalizes to this shape.
24
+ */
25
+ export interface RegistrySkillSummary {
26
+ /** Registry-native id (used as `<adapterId>:<id>` in `/skill-install`). */
27
+ id: string;
28
+ /** Skill name (kebab-case, as it will appear once installed). */
29
+ name: string;
30
+ /** Short description / trigger line. */
31
+ description: string;
32
+ /** Author / owner (often the GitHub owner). */
33
+ author?: string | undefined;
34
+ /** Install count, if the registry reports it. */
35
+ installs?: number | undefined;
36
+ /** Star count, if the registry reports it. */
37
+ stars?: number | undefined;
38
+ /**
39
+ * Security score 0–100 (skills.sh computes this; ags uses the same scale).
40
+ * Lower = riskier. Below 30 the install command prompts for confirmation.
41
+ */
42
+ securityScore?: number | undefined;
43
+ /** ISO timestamp of the skill's last update, if known. */
44
+ updatedAt?: string | undefined;
45
+ /**
46
+ * The `user/repo[@ref]` the installer passes to `downloadGitHubTarball`.
47
+ * Always present for real registry hits — it's the whole point of resolving.
48
+ */
49
+ installRef: string;
50
+ }
51
+ export interface RegistrySearchOptions {
52
+ /** 1-indexed page (default 1). */
53
+ page?: number | undefined;
54
+ /** Page size (default 20; registries may cap this). */
55
+ pageSize?: number | undefined;
56
+ }
57
+ export interface RegistrySearchResult {
58
+ /** Which adapter produced these results. */
59
+ adapterId: string;
60
+ results: RegistrySkillSummary[];
61
+ /** True when the registry indicates more pages exist. */
62
+ hasMore?: boolean | undefined;
63
+ }
64
+ /**
65
+ * A searchable skill catalog that resolves to a GitHub install target.
66
+ *
67
+ * `search` is optional in spirit (the github-direct adapter doesn't search),
68
+ * but the interface requires it so callers can fan out uniformly — adapters
69
+ * that can't search simply return `[]`.
70
+ */
71
+ export interface SkillRegistryAdapter {
72
+ /** Stable id used in `<adapterId>:<registryId>` refs (e.g. `'skills.sh'`). */
73
+ readonly id: string;
74
+ /** Human label for UI (e.g. `'skills.sh'`). */
75
+ readonly displayName: string;
76
+ /** Search the catalog. Return `[]` if the adapter doesn't support search. */
77
+ search(query: string, opts?: RegistrySearchOptions): Promise<RegistrySearchResult>;
78
+ /**
79
+ * Resolve a registry-native id to a `user/repo[@ref]` install ref. Should
80
+ * validate the id shape and throw on an id this adapter can't resolve.
81
+ */
82
+ resolveInstallRef(registryId: string): string;
83
+ }
84
+ //# sourceMappingURL=registry-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-adapter.d.ts","sourceRoot":"","sources":["../../../src/skills/registry/registry-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,2EAA2E;IAC3E,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6EAA6E;IAC7E,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnF;;;OAGG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/C"}
@@ -0,0 +1,13 @@
1
+ import type { SkillRegistryAdapter } from './registry-adapter.js';
2
+ /** Default skills.sh base URL. Override via `config.skills.registryUrl`. */
3
+ export declare const DEFAULT_SKILLS_SH_URL = "https://skills.sh";
4
+ /** Injectable fetcher (mirrors the `prompt-installer` JsonFetcher pattern). */
5
+ export type SkillsShFetcher = (url: string) => Promise<unknown>;
6
+ export interface SkillsShAdapterOptions {
7
+ /** Base URL (no trailing slash). Defaults to {@link DEFAULT_SKILLS_SH_URL}. */
8
+ baseUrl?: string | undefined;
9
+ /** Injectable fetcher for tests. */
10
+ fetcher?: SkillsShFetcher | undefined;
11
+ }
12
+ export declare function createSkillsShAdapter(opts?: SkillsShAdapterOptions): SkillRegistryAdapter;
13
+ //# sourceMappingURL=skills-sh-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-sh-adapter.d.ts","sourceRoot":"","sources":["../../../src/skills/registry/skills-sh-adapter.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAIV,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAE/B,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AAKzD,+EAA+E;AAC/E,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AA6ChE,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,oCAAoC;IACpC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;CACvC;AAED,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,sBAA2B,GAAG,oBAAoB,CAwD7F"}
@@ -0,0 +1,82 @@
1
+ import type { SkillEntry, SkillLoader } from '../types/skill.js';
2
+ /** Result of validating a proposed skill name. */
3
+ export interface SkillNameValidation {
4
+ /** Whether the name is valid kebab-case AND free of collisions. */
5
+ ok: boolean;
6
+ /** Format violations (empty when the name is valid kebab-case). */
7
+ formatViolations: string[];
8
+ /** Existing skills with the same name (empty when there's no collision). */
9
+ conflicts: SkillEntry[];
10
+ }
11
+ /**
12
+ * Validate a proposed skill name: format (kebab-case, ≤64 chars) plus collision
13
+ * check against every skill the loader can see (project, user, foreign,
14
+ * bundled). A collision isn't fatal — project skills intentionally shadow
15
+ * lower layers — so `ok` is true when the only collision is with a foreign or
16
+ * bundled skill (intended shadowing), but `conflicts` is still populated so the
17
+ * user can decide. A collision with another project or user skill of the same
18
+ * name does fail (`ok: false`), since that would silently overwrite it.
19
+ */
20
+ export declare function validateSkillNameAvailable(name: string, loader?: SkillLoader): Promise<SkillNameValidation>;
21
+ export interface SkillSkeletonOptions {
22
+ name: string;
23
+ description: string;
24
+ /** Trigger keywords for the `Triggers:` line. */
25
+ triggerKeywords?: string[] | undefined;
26
+ /** Optional version (default `1.0.0`). */
27
+ version?: string | undefined;
28
+ }
29
+ /**
30
+ * Generate a SKILL.md body (with frontmatter) following the agentskills.io
31
+ * format and the `skill-creator` skill's recommended skeleton. Deterministic:
32
+ * the same inputs always produce the same output, and the result round-trips
33
+ * through `parseSkillFrontmatter` (so what we write is what the loader reads).
34
+ *
35
+ * The body is a skeleton — the user fills in Rules/Patterns/etc. The
36
+ * `skill-creator` skill is the right tool for the open-ended authoring; this
37
+ * is the scaffold.
38
+ */
39
+ export declare function generateSkillSkeleton(opts: SkillSkeletonOptions): string;
40
+ /** Result of extracting a skill draft from a free-form prompt. */
41
+ export interface ExtractedSkillDraft {
42
+ /** Suggested name (kebab-case) derived from the prompt, or empty. */
43
+ suggestedName: string;
44
+ /** Description (first paragraph of the prompt). */
45
+ description: string;
46
+ /** Remaining prompt text, used as the skill body. */
47
+ body: string;
48
+ /** Trigger keywords extracted from the prompt. */
49
+ triggerKeywords: string[];
50
+ }
51
+ /**
52
+ * Heuristically extract a skill draft from a free-form prompt. No LLM — just
53
+ * light structure detection:
54
+ * - First non-empty paragraph → `description`.
55
+ * - A `# heading` or the first line → suggested kebab-case `suggestedName`.
56
+ * - Remaining text → `body`.
57
+ * - Quoted tokens and the heading words → `triggerKeywords`.
58
+ *
59
+ * The output is a starting point the user (or the skill-creator wizard) refines.
60
+ */
61
+ export declare function extractSkillFromPrompt(prompt: string): ExtractedSkillDraft;
62
+ /**
63
+ * Open a file in the user's editor (`$VISUAL` → `$EDITOR` → platform default).
64
+ * Detached + unref'd so the editor outlives the WrongStack process. Throws a
65
+ * `WrongStackError` when no editor can be resolved.
66
+ */
67
+ export declare function openInEditor(filePath: string, env?: NodeJS.ProcessEnv): Promise<void>;
68
+ /**
69
+ * Write a skeleton skill to `<skillsDir>/<name>/SKILL.md`. Returns the written
70
+ * path. Used by `/skill-gen skeleton` and `/skill-gen from-prompt`. Refuses to
71
+ * overwrite an existing SKILL.md unless `overwrite` is set — a guard against
72
+ * clobbering a hand-edited skill.
73
+ */
74
+ export declare function writeSkeletonSkill(skillsDir: string, body: string, opts?: {
75
+ overwrite?: boolean | undefined;
76
+ }): Promise<string>;
77
+ /** Soft length advisory for a SKILL.md body (the `skill-creator` 500-line rule). */
78
+ export declare function bodyLineAdvisory(body: string): {
79
+ lines: number;
80
+ over: boolean;
81
+ };
82
+ //# sourceMappingURL=skill-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-generator.d.ts","sourceRoot":"","sources":["../../src/skills/skill-generator.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIjE,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,EAAE,EAAE,OAAO,CAAC;IACZ,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,4EAA4E;IAC5E,SAAS,EAAE,UAAU,EAAE,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,mBAAmB,CAAC,CAa9B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACvC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CA2DxE;AAED,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAqC1E;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,IAAI,CAAC,CAkCf;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GAC7C,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED,oFAAoF;AACpF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAG/E"}
@@ -0,0 +1,124 @@
1
+ import type { SkillLoader } from '../types/skill.js';
2
+ import { type InstalledSkillEntry } from './manifest-store.js';
3
+ import type { RegistrySearchOptions, RegistrySearchResult, SkillRegistryAdapter } from './registry/registry-adapter.js';
4
+ export interface SkillInstallerOptions {
5
+ /** Path to the manifest file (~/.wrongstack/installed-skills.json) */
6
+ manifestPath: string;
7
+ /** Path to project-level skills dir (<project>/.wrongstack/skills/) */
8
+ projectSkillsDir: string;
9
+ /** Path to user-global skills dir (~/.wrongstack/skills/) */
10
+ globalSkillsDir: string;
11
+ /** Current project hash (for manifest tracking) */
12
+ projectHash: string;
13
+ /** Skill loader — cache will be invalidated after mutations */
14
+ skillLoader?: SkillLoader | undefined;
15
+ /** Logger for status messages */
16
+ log?: ((msg: string) => void) | undefined;
17
+ /**
18
+ * Skill registries used to resolve `<adapterId>:<registryId>` refs and to
19
+ * serve `/skill-search`. Defaults to `[githubDirectAdapter]` (the original
20
+ * direct `user/repo` install path). Add a skills.sh adapter to enable
21
+ * searching the marketplace and installing registry hits by id.
22
+ */
23
+ registryAdapters?: SkillRegistryAdapter[] | undefined;
24
+ }
25
+ export interface InstallResult {
26
+ name: string;
27
+ path: string;
28
+ scope: 'project' | 'user';
29
+ source: string;
30
+ ref: string;
31
+ skillCount: number;
32
+ }
33
+ export interface UpdateResult {
34
+ updated: Array<{
35
+ name: string;
36
+ oldRef: string;
37
+ newRef: string;
38
+ }>;
39
+ unchanged: string[];
40
+ errors: Array<{
41
+ name: string;
42
+ error: string;
43
+ }>;
44
+ }
45
+ export declare class SkillInstaller {
46
+ private readonly opts;
47
+ private readonly manifest;
48
+ private readonly adapters;
49
+ constructor(opts: SkillInstallerOptions);
50
+ /**
51
+ * Install skills from a skill reference.
52
+ *
53
+ * Accepts two ref formats:
54
+ * - `user/repo[@ref]` — direct GitHub install (original path)
55
+ * - `<adapterId>:<registryId>` — registry-resolved (e.g.
56
+ * `skills.sh:owner/repo@v1`); the
57
+ * adapter resolves it to a `user/repo`
58
+ * ref and the install proceeds as above.
59
+ *
60
+ * Supports both single-skill repos (SKILL.md at root) and multi-skill repos
61
+ * (skills/ subdirectory). The manifest records the GitHub source as
62
+ * `github:owner/repo` (so `/skill-update` keeps working) plus the originating
63
+ * registry in `registryFrom` when the install came through a registry.
64
+ */
65
+ install(refInput: string, opts?: {
66
+ global?: boolean | undefined;
67
+ }): Promise<InstallResult[]>;
68
+ /**
69
+ * Import skills from a local directory (e.g. `.claude/skills`) into the
70
+ * project or user skills dir, optionally as symlinks. Used by `/skill-import`
71
+ * to take ownership of foreign skills so they can be edited/committed.
72
+ * Each direct subdirectory containing a valid `SKILL.md` is copied verbatim.
73
+ */
74
+ importFromDir(srcDir: string, opts?: {
75
+ global?: boolean | undefined;
76
+ link?: boolean | undefined;
77
+ }): Promise<InstallResult[]>;
78
+ /**
79
+ * Update installed skills.
80
+ * - No args: update all
81
+ * - Name: update that specific skill
82
+ * - Name + newRef: update to a different ref
83
+ */
84
+ update(nameOrRef?: string | undefined, _opts?: {
85
+ global?: boolean | undefined;
86
+ } | undefined): Promise<UpdateResult>;
87
+ /**
88
+ * Uninstall a skill by name.
89
+ */
90
+ uninstall(name: string, opts?: {
91
+ global?: boolean | undefined;
92
+ }): Promise<void>;
93
+ /**
94
+ * List all installed skills from the manifest.
95
+ */
96
+ listInstalled(): Promise<InstalledSkillEntry[]>;
97
+ /**
98
+ * Search across all configured registry adapters. Results from each adapter
99
+ * are merged (deduplicated by `installRef`, adapters earlier in the list win
100
+ * conflicts). Adapters that don't support search (e.g. github-direct)
101
+ * contribute nothing.
102
+ */
103
+ search(query: string, opts?: RegistrySearchOptions): Promise<RegistrySearchResult[]>;
104
+ /**
105
+ * Detect skills in an extracted repository.
106
+ * Returns an array of detected skills with their files.
107
+ */
108
+ private detectSkills;
109
+ /**
110
+ * Remove all files for an installed skill.
111
+ */
112
+ private removeSkillFiles;
113
+ /**
114
+ * Invalidate the skill loader's cache so newly installed skills appear.
115
+ */
116
+ private invalidateLoaderCache;
117
+ /**
118
+ * Resolve an install ref, dispatching registry-prefixed refs to the matching
119
+ * adapter. Returns the concrete `user/repo[@ref]` install ref plus provenance
120
+ * (which adapter resolved it, if any).
121
+ */
122
+ private resolveRef;
123
+ }
124
+ //# sourceMappingURL=skill-installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-installer.d.ts","sourceRoot":"","sources":["../../src/skills/skill-installer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,OAAO,EAAE,KAAK,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AAEnF,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EAEpB,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AACxC,MAAM,WAAW,qBAAqB;IACpC,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,gBAAgB,EAAE,MAAM,CAAC;IACzB,6DAA6D;IAC7D,eAAe,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACtC,iCAAiC;IACjC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1C;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;CACvD;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAID,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwB;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAElD,YAAY,IAAI,EAAE,qBAAqB,EAItC;IAED;;;;;;;;;;;;;;OAcG;IACG,OAAO,CACX,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE,GACtC,OAAO,CAAC,aAAa,EAAE,CAAC,CAiH1B;IAED;;;;;OAKG;IACG,aAAa,CACjB,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE,GAClE,OAAO,CAAC,aAAa,EAAE,CAAC,CAsF1B;IAED;;;;;OAKG;IACG,MAAM,CACV,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,EAC9B,KAAK,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS,GACnD,OAAO,CAAC,YAAY,CAAC,CAkFvB;IAED;;OAEG;IACG,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBpF;IAED;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAEpD;IAED;;;;;OAKG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAkBzF;IAID;;;OAGG;YACW,YAAY;IAsD1B;;OAEG;YACW,gBAAgB;IAM9B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAS7B;;;;OAIG;IACH,OAAO,CAAC,UAAU;CAuBnB"}
@@ -0,0 +1,118 @@
1
+ import type { EventBus } from '../kernel/events.js';
2
+ /**
3
+ * L2-B: AnnotationsStore — sidecar storage for collaboration annotations
4
+ * (Phase 2 of idea #13 from IDEAS.md).
5
+ *
6
+ * Why a sidecar file, not the session JSONL?
7
+ *
8
+ * The session log is an event-sourced append-only journal
9
+ * (`packages/core/src/types/session.ts` invariant: events are
10
+ * append-only, with `truncateToCheckpoint` only as an explicit
11
+ * rewind). Mixing in human-typed annotations would break that
12
+ * invariant — the user's note about "this rm looks dangerous"
13
+ * is not part of the agent's event history; it is meta-commentary
14
+ * on the history.
15
+ *
16
+ * So we keep annotations in a sibling file: one JSON document per
17
+ * session, resolved with `sessionScopedPath(sessionDir, sessionId,
18
+ * '.annotations.json')`. The shape is a simple versioned array,
19
+ * written atomically.
20
+ *
21
+ * Concurrency model:
22
+ *
23
+ * The store uses a per-session Promise chain to serialize writes.
24
+ * Multiple annotators adding notes at the same time will queue,
25
+ * not race. The atomic write itself is the second line of
26
+ * defense (in case the chain is bypassed — e.g. two processes
27
+ * pointing at the same dir).
28
+ */
29
+ /** Wire/storage shape for one annotation. */
30
+ export interface Annotation {
31
+ /** Stable id (UUIDv4-ish). Referenced by resolve/delete. */
32
+ id: string;
33
+ /** Session this annotation belongs to. */
34
+ sessionId: string;
35
+ /** Index into the session event log the annotation refers to. */
36
+ atEventIndex: number;
37
+ /** Participant id of the annotator (matches WSCollabParticipantJoined.participantId). */
38
+ authorId: string;
39
+ /** Human-readable role label snapshot for display (e.g. "annotator"). */
40
+ authorRole: 'annotator';
41
+ /** The note itself. Trimmed, capped at `MAX_TEXT_LENGTH` on add. */
42
+ text: string;
43
+ /** ISO timestamp of creation. */
44
+ createdAt: string;
45
+ /** Resolved state. Annotations start unresolved. */
46
+ resolved: boolean;
47
+ /** ISO timestamp when resolved (if resolved). */
48
+ resolvedAt?: string | undefined;
49
+ /** Participant id of the resolver (if resolved). */
50
+ resolvedBy?: string | undefined;
51
+ }
52
+ export interface AnnotationsStoreOptions {
53
+ /** Root sessions directory used with `sessionScopedPath(..., '.annotations.json')`. */
54
+ dir: string;
55
+ events?: EventBus;
56
+ traceId?: string;
57
+ /**
58
+ * Override the max annotations per session (default 1000).
59
+ * Exposed for tests to avoid 1001 sequential disk writes on every eviction test.
60
+ */
61
+ maxAnnotations?: number;
62
+ }
63
+ export declare class AnnotationsStore {
64
+ private readonly dir;
65
+ private readonly events;
66
+ private readonly traceId;
67
+ private readonly maxAnnotations;
68
+ /** Per-session write queue. Created lazily on first add. */
69
+ private readonly writeChains;
70
+ constructor(opts: AnnotationsStoreOptions);
71
+ /**
72
+ * Return all annotations for `sessionId` in insertion order
73
+ * (oldest first). Returns an empty array when no file exists
74
+ * yet (the normal case for a fresh session) and also degrades
75
+ * gracefully to `[]` on a read error (permissions, corruption) —
76
+ * the failure is still surfaced via a `storage.read` event so it
77
+ * never silently hides I/O problems from observers.
78
+ */
79
+ list(sessionId: string): Promise<Annotation[]>;
80
+ /**
81
+ * Convenience: only unresolved annotations, newest first — the
82
+ * common UI rendering for "what still needs attention?".
83
+ */
84
+ listOpen(sessionId: string): Promise<Annotation[]>;
85
+ /**
86
+ * Add a new annotation. Returns the persisted record (with id
87
+ * and timestamps filled in). Throws when `text` is empty or
88
+ * exceeds `MAX_TEXT_LENGTH`.
89
+ */
90
+ add(input: {
91
+ sessionId: string;
92
+ atEventIndex: number;
93
+ authorId: string;
94
+ text: string;
95
+ }): Promise<Annotation>;
96
+ /**
97
+ * Mark an annotation as resolved. Returns the updated record, or
98
+ * `null` if no annotation with that id exists in this session.
99
+ * Idempotent: resolving an already-resolved annotation refreshes
100
+ * `resolvedAt` / `resolvedBy` to the latest call.
101
+ */
102
+ resolve(input: {
103
+ sessionId: string;
104
+ annotationId: string;
105
+ resolvedBy: string;
106
+ }): Promise<Annotation | null>;
107
+ private filePath;
108
+ private readFile;
109
+ private writeFile;
110
+ /**
111
+ * Serialize writes per-sessionId. We chain promises instead of
112
+ * using a Mutex class so the contract is obvious from the
113
+ * call-site: `enqueue(sid, fn)` runs `fn` after every prior
114
+ * enqueue for `sid` has settled.
115
+ */
116
+ private enqueue;
117
+ }
118
+ //# sourceMappingURL=annotations-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations-store.d.ts","sourceRoot":"","sources":["../../src/storage/annotations-store.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,yFAAyF;IACzF,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,UAAU,EAAE,WAAW,CAAC;IACxB,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,QAAQ,EAAE,OAAO,CAAC;IAClB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAeD,MAAM,WAAW,uBAAuB;IACtC,uFAAuF;IACvF,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAC9C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,4DAA4D;IAC5D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoC;IAEhE,YAAY,IAAI,EAAE,uBAAuB,EAKxC;IAID;;;;;;;OAOG;IACG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CA6BnD;IAED;;;OAGG;IACG,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAGvD;IAID;;;;OAIG;IACG,GAAG,CAAC,KAAK,EAAE;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,UAAU,CAAC,CAiGtB;IAED;;;;;OAKG;IACG,OAAO,CAAC,KAAK,EAAE;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAiD7B;IAID,OAAO,CAAC,QAAQ;YAOF,QAAQ;YAuBR,SAAS;IAKvB;;;;;OAKG;IACH,OAAO,CAAC,OAAO;CAWhB"}
@@ -0,0 +1,31 @@
1
+ import type { AddAttachmentInput, Attachment, AttachmentRef, AttachmentStore } from '../types/attachment.js';
2
+ import type { ContentBlock } from '../types/blocks.js';
3
+ export interface AttachmentStoreOptions {
4
+ /**
5
+ * Directory for spooling payloads larger than `spoolThresholdBytes`.
6
+ * When omitted, all payloads stay in memory.
7
+ */
8
+ spoolDir?: string | undefined;
9
+ spoolThresholdBytes?: number | undefined;
10
+ }
11
+ /**
12
+ * In-memory attachment store with optional disk spool. Placeholder syntax
13
+ * is `[<kind> #<seq>]` (seq-keyed) or `[file:<path>]` (path-keyed) where kind
14
+ * is `pasted` / `image` / `file`. Unknown placeholders are passed through
15
+ * as-is so users can write that literal text without losing it.
16
+ */
17
+ export declare class DefaultAttachmentStore implements AttachmentStore {
18
+ private readonly items;
19
+ private readonly refs;
20
+ private nextSeq;
21
+ private readonly spoolDir;
22
+ private readonly spoolThreshold;
23
+ constructor(opts?: AttachmentStoreOptions);
24
+ add(input: AddAttachmentInput): Promise<AttachmentRef>;
25
+ get(id: string): Promise<Attachment | undefined>;
26
+ list(): AttachmentRef[];
27
+ expand(text: string): Promise<ContentBlock[]>;
28
+ clear(): Promise<void>;
29
+ private toBlock;
30
+ }
31
+ //# sourceMappingURL=attachment-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-store.d.ts","sourceRoot":"","sources":["../../src/storage/attachment-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EAEV,aAAa,EACb,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAWD;;;;;GAKG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC5D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiC;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAuB;IAC5C,OAAO,CAAC,OAAO,CAAkE;IACjF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IAExC,YAAY,IAAI,GAAE,sBAA2B,EAG5C;IAEK,GAAG,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CA6B3D;IAEK,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAErD;IAED,IAAI,IAAI,aAAa,EAAE,CAEtB;IAEK,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CA8BlD;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAa3B;YAEa,OAAO;CAkBtB"}