qlogicagent 0.1.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 (450) hide show
  1. package/README.md +45 -0
  2. package/dist/agent/agent.d.ts +44 -0
  3. package/dist/agent/agent.d.ts.map +1 -0
  4. package/dist/agent/agent.js +114 -0
  5. package/dist/agent/agent.js.map +1 -0
  6. package/dist/agent/tool-loop.d.ts +65 -0
  7. package/dist/agent/tool-loop.d.ts.map +1 -0
  8. package/dist/agent/tool-loop.js +576 -0
  9. package/dist/agent/tool-loop.js.map +1 -0
  10. package/dist/agent/types.d.ts +176 -0
  11. package/dist/agent/types.d.ts.map +1 -0
  12. package/dist/agent/types.js +15 -0
  13. package/dist/agent/types.js.map +1 -0
  14. package/dist/cli/main.d.ts +12 -0
  15. package/dist/cli/main.d.ts.map +1 -0
  16. package/dist/cli/main.js +24 -0
  17. package/dist/cli/main.js.map +1 -0
  18. package/dist/cli/stdio-server.d.ts +46 -0
  19. package/dist/cli/stdio-server.d.ts.map +1 -0
  20. package/dist/cli/stdio-server.js +464 -0
  21. package/dist/cli/stdio-server.js.map +1 -0
  22. package/dist/config/config.d.ts +18 -0
  23. package/dist/config/config.d.ts.map +1 -0
  24. package/dist/config/config.js +22 -0
  25. package/dist/config/config.js.map +1 -0
  26. package/dist/contracts/hooks.d.ts +121 -0
  27. package/dist/contracts/hooks.d.ts.map +1 -0
  28. package/dist/contracts/hooks.js +8 -0
  29. package/dist/contracts/hooks.js.map +1 -0
  30. package/dist/contracts/index.d.ts +11 -0
  31. package/dist/contracts/index.d.ts.map +1 -0
  32. package/dist/contracts/index.js +11 -0
  33. package/dist/contracts/index.js.map +1 -0
  34. package/dist/contracts/planner.d.ts +36 -0
  35. package/dist/contracts/planner.d.ts.map +1 -0
  36. package/dist/contracts/planner.js +3 -0
  37. package/dist/contracts/planner.js.map +1 -0
  38. package/dist/contracts/skill-candidate.d.ts +64 -0
  39. package/dist/contracts/skill-candidate.d.ts.map +1 -0
  40. package/dist/contracts/skill-candidate.js +196 -0
  41. package/dist/contracts/skill-candidate.js.map +1 -0
  42. package/dist/contracts/todo.d.ts +15 -0
  43. package/dist/contracts/todo.d.ts.map +1 -0
  44. package/dist/contracts/todo.js +10 -0
  45. package/dist/contracts/todo.js.map +1 -0
  46. package/dist/index.d.ts +14 -0
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/index.js +16 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/llm/builtin-providers.d.ts +11 -0
  51. package/dist/llm/builtin-providers.d.ts.map +1 -0
  52. package/dist/llm/builtin-providers.js +532 -0
  53. package/dist/llm/builtin-providers.js.map +1 -0
  54. package/dist/llm/index.d.ts +16 -0
  55. package/dist/llm/index.d.ts.map +1 -0
  56. package/dist/llm/index.js +15 -0
  57. package/dist/llm/index.js.map +1 -0
  58. package/dist/llm/llm-client.d.ts +44 -0
  59. package/dist/llm/llm-client.d.ts.map +1 -0
  60. package/dist/llm/llm-client.js +68 -0
  61. package/dist/llm/llm-client.js.map +1 -0
  62. package/dist/llm/model-catalog.d.ts +54 -0
  63. package/dist/llm/model-catalog.d.ts.map +1 -0
  64. package/dist/llm/model-catalog.js +192 -0
  65. package/dist/llm/model-catalog.js.map +1 -0
  66. package/dist/llm/provider-def.d.ts +60 -0
  67. package/dist/llm/provider-def.d.ts.map +1 -0
  68. package/dist/llm/provider-def.js +13 -0
  69. package/dist/llm/provider-def.js.map +1 -0
  70. package/dist/llm/provider-registry.d.ts +55 -0
  71. package/dist/llm/provider-registry.d.ts.map +1 -0
  72. package/dist/llm/provider-registry.js +148 -0
  73. package/dist/llm/provider-registry.js.map +1 -0
  74. package/dist/llm/transport.d.ts +63 -0
  75. package/dist/llm/transport.d.ts.map +1 -0
  76. package/dist/llm/transport.js +28 -0
  77. package/dist/llm/transport.js.map +1 -0
  78. package/dist/llm/transports/anthropic-messages.d.ts +32 -0
  79. package/dist/llm/transports/anthropic-messages.d.ts.map +1 -0
  80. package/dist/llm/transports/anthropic-messages.js +294 -0
  81. package/dist/llm/transports/anthropic-messages.js.map +1 -0
  82. package/dist/llm/transports/openai-chat.d.ts +37 -0
  83. package/dist/llm/transports/openai-chat.d.ts.map +1 -0
  84. package/dist/llm/transports/openai-chat.js +166 -0
  85. package/dist/llm/transports/openai-chat.js.map +1 -0
  86. package/dist/orchestration/agent-registry.d.ts +42 -0
  87. package/dist/orchestration/agent-registry.d.ts.map +1 -0
  88. package/dist/orchestration/agent-registry.js +117 -0
  89. package/dist/orchestration/agent-registry.js.map +1 -0
  90. package/dist/orchestration/approval-aware-tool-plan.d.ts +33 -0
  91. package/dist/orchestration/approval-aware-tool-plan.d.ts.map +1 -0
  92. package/dist/orchestration/approval-aware-tool-plan.js +88 -0
  93. package/dist/orchestration/approval-aware-tool-plan.js.map +1 -0
  94. package/dist/orchestration/context-compression.d.ts +221 -0
  95. package/dist/orchestration/context-compression.d.ts.map +1 -0
  96. package/dist/orchestration/context-compression.js +584 -0
  97. package/dist/orchestration/context-compression.js.map +1 -0
  98. package/dist/orchestration/conversation-repair.d.ts +62 -0
  99. package/dist/orchestration/conversation-repair.d.ts.map +1 -0
  100. package/dist/orchestration/conversation-repair.js +430 -0
  101. package/dist/orchestration/conversation-repair.js.map +1 -0
  102. package/dist/orchestration/curator-scheduler.d.ts +120 -0
  103. package/dist/orchestration/curator-scheduler.d.ts.map +1 -0
  104. package/dist/orchestration/curator-scheduler.js +136 -0
  105. package/dist/orchestration/curator-scheduler.js.map +1 -0
  106. package/dist/orchestration/embedded-failover-policy.d.ts +111 -0
  107. package/dist/orchestration/embedded-failover-policy.d.ts.map +1 -0
  108. package/dist/orchestration/embedded-failover-policy.js +169 -0
  109. package/dist/orchestration/embedded-failover-policy.js.map +1 -0
  110. package/dist/orchestration/error-classification.d.ts +13 -0
  111. package/dist/orchestration/error-classification.d.ts.map +1 -0
  112. package/dist/orchestration/error-classification.js +78 -0
  113. package/dist/orchestration/error-classification.js.map +1 -0
  114. package/dist/orchestration/failover-classification.d.ts +9 -0
  115. package/dist/orchestration/failover-classification.d.ts.map +1 -0
  116. package/dist/orchestration/failover-classification.js +382 -0
  117. package/dist/orchestration/failover-classification.js.map +1 -0
  118. package/dist/orchestration/failover-error.d.ts +34 -0
  119. package/dist/orchestration/failover-error.d.ts.map +1 -0
  120. package/dist/orchestration/failover-error.js +199 -0
  121. package/dist/orchestration/failover-error.js.map +1 -0
  122. package/dist/orchestration/fork-subagent.d.ts +101 -0
  123. package/dist/orchestration/fork-subagent.d.ts.map +1 -0
  124. package/dist/orchestration/fork-subagent.js +99 -0
  125. package/dist/orchestration/fork-subagent.js.map +1 -0
  126. package/dist/orchestration/index.d.ts +121 -0
  127. package/dist/orchestration/index.d.ts.map +1 -0
  128. package/dist/orchestration/index.js +268 -0
  129. package/dist/orchestration/index.js.map +1 -0
  130. package/dist/orchestration/memory-flush-policy.d.ts +58 -0
  131. package/dist/orchestration/memory-flush-policy.d.ts.map +1 -0
  132. package/dist/orchestration/memory-flush-policy.js +86 -0
  133. package/dist/orchestration/memory-flush-policy.js.map +1 -0
  134. package/dist/orchestration/memory-provider.d.ts +15 -0
  135. package/dist/orchestration/memory-provider.d.ts.map +1 -0
  136. package/dist/orchestration/memory-provider.js +3 -0
  137. package/dist/orchestration/memory-provider.js.map +1 -0
  138. package/dist/orchestration/parallel-tool-calls.d.ts +42 -0
  139. package/dist/orchestration/parallel-tool-calls.d.ts.map +1 -0
  140. package/dist/orchestration/parallel-tool-calls.js +60 -0
  141. package/dist/orchestration/parallel-tool-calls.js.map +1 -0
  142. package/dist/orchestration/prompt-cache-strategy.d.ts +127 -0
  143. package/dist/orchestration/prompt-cache-strategy.d.ts.map +1 -0
  144. package/dist/orchestration/prompt-cache-strategy.js +229 -0
  145. package/dist/orchestration/prompt-cache-strategy.js.map +1 -0
  146. package/dist/orchestration/reactive-compact.d.ts +74 -0
  147. package/dist/orchestration/reactive-compact.d.ts.map +1 -0
  148. package/dist/orchestration/reactive-compact.js +79 -0
  149. package/dist/orchestration/reactive-compact.js.map +1 -0
  150. package/dist/orchestration/retry-loop.d.ts +23 -0
  151. package/dist/orchestration/retry-loop.d.ts.map +1 -0
  152. package/dist/orchestration/retry-loop.js +25 -0
  153. package/dist/orchestration/retry-loop.js.map +1 -0
  154. package/dist/orchestration/skill-candidate.d.ts +53 -0
  155. package/dist/orchestration/skill-candidate.d.ts.map +1 -0
  156. package/dist/orchestration/skill-candidate.js +142 -0
  157. package/dist/orchestration/skill-candidate.js.map +1 -0
  158. package/dist/orchestration/skill-consolidation.d.ts +124 -0
  159. package/dist/orchestration/skill-consolidation.d.ts.map +1 -0
  160. package/dist/orchestration/skill-consolidation.js +221 -0
  161. package/dist/orchestration/skill-consolidation.js.map +1 -0
  162. package/dist/orchestration/skill-improvement.d.ts +60 -0
  163. package/dist/orchestration/skill-improvement.d.ts.map +1 -0
  164. package/dist/orchestration/skill-improvement.js +67 -0
  165. package/dist/orchestration/skill-improvement.js.map +1 -0
  166. package/dist/orchestration/skill-similarity.d.ts +99 -0
  167. package/dist/orchestration/skill-similarity.d.ts.map +1 -0
  168. package/dist/orchestration/skill-similarity.js +132 -0
  169. package/dist/orchestration/skill-similarity.js.map +1 -0
  170. package/dist/orchestration/streaming-tool-executor.d.ts +74 -0
  171. package/dist/orchestration/streaming-tool-executor.d.ts.map +1 -0
  172. package/dist/orchestration/streaming-tool-executor.js +97 -0
  173. package/dist/orchestration/streaming-tool-executor.js.map +1 -0
  174. package/dist/orchestration/team-orchestration.d.ts +196 -0
  175. package/dist/orchestration/team-orchestration.d.ts.map +1 -0
  176. package/dist/orchestration/team-orchestration.js +370 -0
  177. package/dist/orchestration/team-orchestration.js.map +1 -0
  178. package/dist/orchestration/team-tool-loop-wiring.d.ts +93 -0
  179. package/dist/orchestration/team-tool-loop-wiring.d.ts.map +1 -0
  180. package/dist/orchestration/team-tool-loop-wiring.js +148 -0
  181. package/dist/orchestration/team-tool-loop-wiring.js.map +1 -0
  182. package/dist/orchestration/tool-choice-policy.d.ts +55 -0
  183. package/dist/orchestration/tool-choice-policy.d.ts.map +1 -0
  184. package/dist/orchestration/tool-choice-policy.js +165 -0
  185. package/dist/orchestration/tool-choice-policy.js.map +1 -0
  186. package/dist/orchestration/tool-loop-state.d.ts +51 -0
  187. package/dist/orchestration/tool-loop-state.d.ts.map +1 -0
  188. package/dist/orchestration/tool-loop-state.js +134 -0
  189. package/dist/orchestration/tool-loop-state.js.map +1 -0
  190. package/dist/orchestration/tool-schema.d.ts +40 -0
  191. package/dist/orchestration/tool-schema.d.ts.map +1 -0
  192. package/dist/orchestration/tool-schema.js +298 -0
  193. package/dist/orchestration/tool-schema.js.map +1 -0
  194. package/dist/orchestration/transcript-repair.d.ts +43 -0
  195. package/dist/orchestration/transcript-repair.d.ts.map +1 -0
  196. package/dist/orchestration/transcript-repair.js +427 -0
  197. package/dist/orchestration/transcript-repair.js.map +1 -0
  198. package/dist/orchestration/turn-loop-guard.d.ts +87 -0
  199. package/dist/orchestration/turn-loop-guard.d.ts.map +1 -0
  200. package/dist/orchestration/turn-loop-guard.js +93 -0
  201. package/dist/orchestration/turn-loop-guard.js.map +1 -0
  202. package/dist/orchestration/web-browser-policy.d.ts +18 -0
  203. package/dist/orchestration/web-browser-policy.d.ts.map +1 -0
  204. package/dist/orchestration/web-browser-policy.js +40 -0
  205. package/dist/orchestration/web-browser-policy.js.map +1 -0
  206. package/dist/runtime/context-compression.d.ts +62 -0
  207. package/dist/runtime/context-compression.d.ts.map +1 -0
  208. package/dist/runtime/context-compression.js +275 -0
  209. package/dist/runtime/context-compression.js.map +1 -0
  210. package/dist/runtime/hook-registry.d.ts +13 -0
  211. package/dist/runtime/hook-registry.d.ts.map +1 -0
  212. package/dist/runtime/hook-registry.js +54 -0
  213. package/dist/runtime/hook-registry.js.map +1 -0
  214. package/dist/runtime/memory-hooks.d.ts +24 -0
  215. package/dist/runtime/memory-hooks.d.ts.map +1 -0
  216. package/dist/runtime/memory-hooks.js +66 -0
  217. package/dist/runtime/memory-hooks.js.map +1 -0
  218. package/dist/runtime/tool-eligibility.d.ts +60 -0
  219. package/dist/runtime/tool-eligibility.d.ts.map +1 -0
  220. package/dist/runtime/tool-eligibility.js +112 -0
  221. package/dist/runtime/tool-eligibility.js.map +1 -0
  222. package/dist/skills/index.d.ts +109 -0
  223. package/dist/skills/index.d.ts.map +1 -0
  224. package/dist/skills/index.js +83 -0
  225. package/dist/skills/index.js.map +1 -0
  226. package/dist/skills/memory-extractor.d.ts +65 -0
  227. package/dist/skills/memory-extractor.d.ts.map +1 -0
  228. package/dist/skills/memory-extractor.js +174 -0
  229. package/dist/skills/memory-extractor.js.map +1 -0
  230. package/dist/skills/memory-query-tool.d.ts +44 -0
  231. package/dist/skills/memory-query-tool.d.ts.map +1 -0
  232. package/dist/skills/memory-query-tool.js +128 -0
  233. package/dist/skills/memory-query-tool.js.map +1 -0
  234. package/dist/skills/memory-store.d.ts +67 -0
  235. package/dist/skills/memory-store.d.ts.map +1 -0
  236. package/dist/skills/memory-store.js +229 -0
  237. package/dist/skills/memory-store.js.map +1 -0
  238. package/dist/skills/memory-tool.d.ts +68 -0
  239. package/dist/skills/memory-tool.d.ts.map +1 -0
  240. package/dist/skills/memory-tool.js +193 -0
  241. package/dist/skills/memory-tool.js.map +1 -0
  242. package/dist/skills/portable-tool.d.ts +72 -0
  243. package/dist/skills/portable-tool.d.ts.map +1 -0
  244. package/dist/skills/portable-tool.js +15 -0
  245. package/dist/skills/portable-tool.js.map +1 -0
  246. package/dist/skills/qmemory-adapter.d.ts +53 -0
  247. package/dist/skills/qmemory-adapter.d.ts.map +1 -0
  248. package/dist/skills/qmemory-adapter.js +166 -0
  249. package/dist/skills/qmemory-adapter.js.map +1 -0
  250. package/dist/skills/skill-frontmatter.d.ts +20 -0
  251. package/dist/skills/skill-frontmatter.d.ts.map +1 -0
  252. package/dist/skills/skill-frontmatter.js +345 -0
  253. package/dist/skills/skill-frontmatter.js.map +1 -0
  254. package/dist/skills/skill-guard.d.ts +24 -0
  255. package/dist/skills/skill-guard.d.ts.map +1 -0
  256. package/dist/skills/skill-guard.js +230 -0
  257. package/dist/skills/skill-guard.js.map +1 -0
  258. package/dist/skills/skill-loader.d.ts +17 -0
  259. package/dist/skills/skill-loader.d.ts.map +1 -0
  260. package/dist/skills/skill-loader.js +304 -0
  261. package/dist/skills/skill-loader.js.map +1 -0
  262. package/dist/skills/skill-source.d.ts +120 -0
  263. package/dist/skills/skill-source.d.ts.map +1 -0
  264. package/dist/skills/skill-source.js +127 -0
  265. package/dist/skills/skill-source.js.map +1 -0
  266. package/dist/skills/skill-types.d.ts +200 -0
  267. package/dist/skills/skill-types.d.ts.map +1 -0
  268. package/dist/skills/skill-types.js +7 -0
  269. package/dist/skills/skill-types.js.map +1 -0
  270. package/dist/skills/think-tool.d.ts +17 -0
  271. package/dist/skills/think-tool.d.ts.map +1 -0
  272. package/dist/skills/think-tool.js +60 -0
  273. package/dist/skills/think-tool.js.map +1 -0
  274. package/dist/skills/todo-tool.d.ts +64 -0
  275. package/dist/skills/todo-tool.d.ts.map +1 -0
  276. package/dist/skills/todo-tool.js +115 -0
  277. package/dist/skills/todo-tool.js.map +1 -0
  278. package/dist/skills/tools/agent-tool.d.ts +92 -0
  279. package/dist/skills/tools/agent-tool.d.ts.map +1 -0
  280. package/dist/skills/tools/agent-tool.js +143 -0
  281. package/dist/skills/tools/agent-tool.js.map +1 -0
  282. package/dist/skills/tools/apply-patch-tool.d.ts +30 -0
  283. package/dist/skills/tools/apply-patch-tool.d.ts.map +1 -0
  284. package/dist/skills/tools/apply-patch-tool.js +185 -0
  285. package/dist/skills/tools/apply-patch-tool.js.map +1 -0
  286. package/dist/skills/tools/ask-user-tool.d.ts +81 -0
  287. package/dist/skills/tools/ask-user-tool.d.ts.map +1 -0
  288. package/dist/skills/tools/ask-user-tool.js +122 -0
  289. package/dist/skills/tools/ask-user-tool.js.map +1 -0
  290. package/dist/skills/tools/brief-tool.d.ts +75 -0
  291. package/dist/skills/tools/brief-tool.d.ts.map +1 -0
  292. package/dist/skills/tools/brief-tool.js +96 -0
  293. package/dist/skills/tools/brief-tool.js.map +1 -0
  294. package/dist/skills/tools/browser-tool.d.ts +115 -0
  295. package/dist/skills/tools/browser-tool.d.ts.map +1 -0
  296. package/dist/skills/tools/browser-tool.js +156 -0
  297. package/dist/skills/tools/browser-tool.js.map +1 -0
  298. package/dist/skills/tools/checkpoint-tool.d.ts +67 -0
  299. package/dist/skills/tools/checkpoint-tool.d.ts.map +1 -0
  300. package/dist/skills/tools/checkpoint-tool.js +103 -0
  301. package/dist/skills/tools/checkpoint-tool.js.map +1 -0
  302. package/dist/skills/tools/config-tool.d.ts +64 -0
  303. package/dist/skills/tools/config-tool.d.ts.map +1 -0
  304. package/dist/skills/tools/config-tool.js +144 -0
  305. package/dist/skills/tools/config-tool.js.map +1 -0
  306. package/dist/skills/tools/cron-tool.d.ts +117 -0
  307. package/dist/skills/tools/cron-tool.d.ts.map +1 -0
  308. package/dist/skills/tools/cron-tool.js +176 -0
  309. package/dist/skills/tools/cron-tool.js.map +1 -0
  310. package/dist/skills/tools/edit-tool.d.ts +44 -0
  311. package/dist/skills/tools/edit-tool.d.ts.map +1 -0
  312. package/dist/skills/tools/edit-tool.js +71 -0
  313. package/dist/skills/tools/edit-tool.js.map +1 -0
  314. package/dist/skills/tools/exec-tool.d.ts +103 -0
  315. package/dist/skills/tools/exec-tool.d.ts.map +1 -0
  316. package/dist/skills/tools/exec-tool.js +134 -0
  317. package/dist/skills/tools/exec-tool.js.map +1 -0
  318. package/dist/skills/tools/image-generate-tool.d.ts +63 -0
  319. package/dist/skills/tools/image-generate-tool.d.ts.map +1 -0
  320. package/dist/skills/tools/image-generate-tool.js +68 -0
  321. package/dist/skills/tools/image-generate-tool.js.map +1 -0
  322. package/dist/skills/tools/instructions-tool.d.ts +104 -0
  323. package/dist/skills/tools/instructions-tool.d.ts.map +1 -0
  324. package/dist/skills/tools/instructions-tool.js +188 -0
  325. package/dist/skills/tools/instructions-tool.js.map +1 -0
  326. package/dist/skills/tools/lsp-tool.d.ts +154 -0
  327. package/dist/skills/tools/lsp-tool.d.ts.map +1 -0
  328. package/dist/skills/tools/lsp-tool.js +228 -0
  329. package/dist/skills/tools/lsp-tool.js.map +1 -0
  330. package/dist/skills/tools/mcp-client-types.d.ts +270 -0
  331. package/dist/skills/tools/mcp-client-types.d.ts.map +1 -0
  332. package/dist/skills/tools/mcp-client-types.js +54 -0
  333. package/dist/skills/tools/mcp-client-types.js.map +1 -0
  334. package/dist/skills/tools/mcp-tool.d.ts +250 -0
  335. package/dist/skills/tools/mcp-tool.d.ts.map +1 -0
  336. package/dist/skills/tools/mcp-tool.js +504 -0
  337. package/dist/skills/tools/mcp-tool.js.map +1 -0
  338. package/dist/skills/tools/memory-tool.d.ts +75 -0
  339. package/dist/skills/tools/memory-tool.d.ts.map +1 -0
  340. package/dist/skills/tools/memory-tool.js +89 -0
  341. package/dist/skills/tools/memory-tool.js.map +1 -0
  342. package/dist/skills/tools/monitor-tool.d.ts +114 -0
  343. package/dist/skills/tools/monitor-tool.d.ts.map +1 -0
  344. package/dist/skills/tools/monitor-tool.js +132 -0
  345. package/dist/skills/tools/monitor-tool.js.map +1 -0
  346. package/dist/skills/tools/music-generate-tool.d.ts +56 -0
  347. package/dist/skills/tools/music-generate-tool.d.ts.map +1 -0
  348. package/dist/skills/tools/music-generate-tool.js +63 -0
  349. package/dist/skills/tools/music-generate-tool.js.map +1 -0
  350. package/dist/skills/tools/notify-tool.d.ts +54 -0
  351. package/dist/skills/tools/notify-tool.d.ts.map +1 -0
  352. package/dist/skills/tools/notify-tool.js +63 -0
  353. package/dist/skills/tools/notify-tool.js.map +1 -0
  354. package/dist/skills/tools/patch-tool.d.ts +46 -0
  355. package/dist/skills/tools/patch-tool.d.ts.map +1 -0
  356. package/dist/skills/tools/patch-tool.js +506 -0
  357. package/dist/skills/tools/patch-tool.js.map +1 -0
  358. package/dist/skills/tools/pdf-tool.d.ts +67 -0
  359. package/dist/skills/tools/pdf-tool.d.ts.map +1 -0
  360. package/dist/skills/tools/pdf-tool.js +89 -0
  361. package/dist/skills/tools/pdf-tool.js.map +1 -0
  362. package/dist/skills/tools/plan-mode-tool.d.ts +60 -0
  363. package/dist/skills/tools/plan-mode-tool.d.ts.map +1 -0
  364. package/dist/skills/tools/plan-mode-tool.js +123 -0
  365. package/dist/skills/tools/plan-mode-tool.js.map +1 -0
  366. package/dist/skills/tools/read-tool.d.ts +52 -0
  367. package/dist/skills/tools/read-tool.d.ts.map +1 -0
  368. package/dist/skills/tools/read-tool.js +85 -0
  369. package/dist/skills/tools/read-tool.js.map +1 -0
  370. package/dist/skills/tools/repl-tool.d.ts +71 -0
  371. package/dist/skills/tools/repl-tool.d.ts.map +1 -0
  372. package/dist/skills/tools/repl-tool.js +70 -0
  373. package/dist/skills/tools/repl-tool.js.map +1 -0
  374. package/dist/skills/tools/search-tool.d.ts +113 -0
  375. package/dist/skills/tools/search-tool.d.ts.map +1 -0
  376. package/dist/skills/tools/search-tool.js +226 -0
  377. package/dist/skills/tools/search-tool.js.map +1 -0
  378. package/dist/skills/tools/send-message-tool.d.ts +52 -0
  379. package/dist/skills/tools/send-message-tool.d.ts.map +1 -0
  380. package/dist/skills/tools/send-message-tool.js +77 -0
  381. package/dist/skills/tools/send-message-tool.js.map +1 -0
  382. package/dist/skills/tools/skill-list-tool.d.ts +34 -0
  383. package/dist/skills/tools/skill-list-tool.d.ts.map +1 -0
  384. package/dist/skills/tools/skill-list-tool.js +55 -0
  385. package/dist/skills/tools/skill-list-tool.js.map +1 -0
  386. package/dist/skills/tools/skill-manage-tool.d.ts +74 -0
  387. package/dist/skills/tools/skill-manage-tool.d.ts.map +1 -0
  388. package/dist/skills/tools/skill-manage-tool.js +154 -0
  389. package/dist/skills/tools/skill-manage-tool.js.map +1 -0
  390. package/dist/skills/tools/skill-view-tool.d.ts +38 -0
  391. package/dist/skills/tools/skill-view-tool.d.ts.map +1 -0
  392. package/dist/skills/tools/skill-view-tool.js +73 -0
  393. package/dist/skills/tools/skill-view-tool.js.map +1 -0
  394. package/dist/skills/tools/sleep-tool.d.ts +50 -0
  395. package/dist/skills/tools/sleep-tool.d.ts.map +1 -0
  396. package/dist/skills/tools/sleep-tool.js +82 -0
  397. package/dist/skills/tools/sleep-tool.js.map +1 -0
  398. package/dist/skills/tools/structured-output-tool.d.ts +117 -0
  399. package/dist/skills/tools/structured-output-tool.d.ts.map +1 -0
  400. package/dist/skills/tools/structured-output-tool.js +177 -0
  401. package/dist/skills/tools/structured-output-tool.js.map +1 -0
  402. package/dist/skills/tools/task-tool.d.ts +105 -0
  403. package/dist/skills/tools/task-tool.d.ts.map +1 -0
  404. package/dist/skills/tools/task-tool.js +162 -0
  405. package/dist/skills/tools/task-tool.js.map +1 -0
  406. package/dist/skills/tools/team-tool.d.ts +90 -0
  407. package/dist/skills/tools/team-tool.d.ts.map +1 -0
  408. package/dist/skills/tools/team-tool.js +106 -0
  409. package/dist/skills/tools/team-tool.js.map +1 -0
  410. package/dist/skills/tools/tool-search-tool.d.ts +52 -0
  411. package/dist/skills/tools/tool-search-tool.d.ts.map +1 -0
  412. package/dist/skills/tools/tool-search-tool.js +111 -0
  413. package/dist/skills/tools/tool-search-tool.js.map +1 -0
  414. package/dist/skills/tools/tts-tool.d.ts +39 -0
  415. package/dist/skills/tools/tts-tool.d.ts.map +1 -0
  416. package/dist/skills/tools/tts-tool.js +46 -0
  417. package/dist/skills/tools/tts-tool.js.map +1 -0
  418. package/dist/skills/tools/video-edit-tool.d.ts +70 -0
  419. package/dist/skills/tools/video-edit-tool.d.ts.map +1 -0
  420. package/dist/skills/tools/video-edit-tool.js +75 -0
  421. package/dist/skills/tools/video-edit-tool.js.map +1 -0
  422. package/dist/skills/tools/video-generate-tool.d.ts +63 -0
  423. package/dist/skills/tools/video-generate-tool.d.ts.map +1 -0
  424. package/dist/skills/tools/video-generate-tool.js +67 -0
  425. package/dist/skills/tools/video-generate-tool.js.map +1 -0
  426. package/dist/skills/tools/video-merge-tool.d.ts +106 -0
  427. package/dist/skills/tools/video-merge-tool.d.ts.map +1 -0
  428. package/dist/skills/tools/video-merge-tool.js +93 -0
  429. package/dist/skills/tools/video-merge-tool.js.map +1 -0
  430. package/dist/skills/tools/video-upscale-tool.d.ts +46 -0
  431. package/dist/skills/tools/video-upscale-tool.d.ts.map +1 -0
  432. package/dist/skills/tools/video-upscale-tool.js +53 -0
  433. package/dist/skills/tools/video-upscale-tool.js.map +1 -0
  434. package/dist/skills/tools/web-fetch-tool.d.ts +79 -0
  435. package/dist/skills/tools/web-fetch-tool.d.ts.map +1 -0
  436. package/dist/skills/tools/web-fetch-tool.js +93 -0
  437. package/dist/skills/tools/web-fetch-tool.js.map +1 -0
  438. package/dist/skills/tools/web-search-tool.d.ts +58 -0
  439. package/dist/skills/tools/web-search-tool.d.ts.map +1 -0
  440. package/dist/skills/tools/web-search-tool.js +87 -0
  441. package/dist/skills/tools/web-search-tool.js.map +1 -0
  442. package/dist/skills/tools/worktree-tool.d.ts +70 -0
  443. package/dist/skills/tools/worktree-tool.d.ts.map +1 -0
  444. package/dist/skills/tools/worktree-tool.js +148 -0
  445. package/dist/skills/tools/worktree-tool.js.map +1 -0
  446. package/dist/skills/tools/write-tool.d.ts +46 -0
  447. package/dist/skills/tools/write-tool.d.ts.map +1 -0
  448. package/dist/skills/tools/write-tool.js +82 -0
  449. package/dist/skills/tools/write-tool.js.map +1 -0
  450. package/package.json +41 -0
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Built-in Agent Registry — CC-aligned agent definitions for fork/subagent.
3
+ *
4
+ * Each built-in agent defines a role with constrained tools, system prompt,
5
+ * and execution budget. The LLM can invoke these via the AgentTool.
6
+ */
7
+ export interface AgentDefinition {
8
+ /** Unique identifier for the agent (kebab-case). */
9
+ name: string;
10
+ /** Human-readable label. */
11
+ label: string;
12
+ /** Short description (appears in tool_search / LLM prompt). */
13
+ description: string;
14
+ /** Maximum turns this agent can execute before forced stop. */
15
+ maxTurns: number;
16
+ /** Tool access mode. */
17
+ toolAccessMode: "full" | "read-only" | "none";
18
+ /** Explicit allowed tool names (if empty, uses toolAccessMode filter). */
19
+ allowedTools?: string[];
20
+ /** Whether this agent can fork sub-agents itself. */
21
+ canFork: boolean;
22
+ /** System prompt override for this agent. */
23
+ systemPromptSuffix?: string;
24
+ }
25
+ /**
26
+ * Get the full list of built-in agent definitions.
27
+ */
28
+ export declare function getBuiltInAgents(): AgentDefinition[];
29
+ /**
30
+ * Look up a built-in agent by name.
31
+ */
32
+ export declare function getBuiltInAgent(name: string): AgentDefinition | undefined;
33
+ /**
34
+ * Check if a given agent name is a built-in agent.
35
+ */
36
+ export declare function isBuiltInAgent(name: string): boolean;
37
+ /**
38
+ * Resolve tool access for an agent definition.
39
+ * Returns the set of tool names the agent is allowed to use.
40
+ */
41
+ export declare function resolveAgentToolSet(agent: AgentDefinition, availableTools: string[]): string[];
42
+ //# sourceMappingURL=agent-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-registry.d.ts","sourceRoot":"","sources":["../../src/orchestration/agent-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,cAAc,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IAC9C,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA2ED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,eAAe,EAAE,CAEpD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAEzE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,eAAe,EACtB,cAAc,EAAE,MAAM,EAAE,GACvB,MAAM,EAAE,CAoBV"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Built-in Agent Registry — CC-aligned agent definitions for fork/subagent.
3
+ *
4
+ * Each built-in agent defines a role with constrained tools, system prompt,
5
+ * and execution budget. The LLM can invoke these via the AgentTool.
6
+ */
7
+ /** General-purpose sub-agent for delegated tasks. */
8
+ const GENERAL_PURPOSE_AGENT = {
9
+ name: "general",
10
+ label: "General Purpose",
11
+ description: "A general-purpose sub-agent that can perform any task with full tool access.",
12
+ maxTurns: 200,
13
+ toolAccessMode: "full",
14
+ canFork: false,
15
+ };
16
+ /** Explore agent — read-only exploration (code search, file reading, analysis). */
17
+ const EXPLORE_AGENT = {
18
+ name: "explore",
19
+ label: "Explore",
20
+ description: "Fast read-only codebase exploration. Search files, read code, analyze structure. Cannot write or execute.",
21
+ maxTurns: 50,
22
+ toolAccessMode: "read-only",
23
+ allowedTools: ["read_file", "search", "web_search", "web_fetch", "think", "memory_query", "tool_search"],
24
+ canFork: false,
25
+ };
26
+ /** Plan agent — read-only planning mode (explore + propose, no execution). */
27
+ const PLAN_AGENT = {
28
+ name: "plan",
29
+ label: "Plan",
30
+ description: "Planning mode. Explore, analyze, and produce a structured plan. Cannot write files or execute commands.",
31
+ maxTurns: 80,
32
+ toolAccessMode: "read-only",
33
+ allowedTools: ["read_file", "search", "web_search", "web_fetch", "think", "memory_query", "todo", "tool_search"],
34
+ canFork: false,
35
+ };
36
+ /** Code agent — full execution capability for code tasks. */
37
+ const CODE_AGENT = {
38
+ name: "code",
39
+ label: "Code",
40
+ description: "A coding sub-agent with full tool access for implementation tasks.",
41
+ maxTurns: 200,
42
+ toolAccessMode: "full",
43
+ canFork: true,
44
+ };
45
+ /** Research agent — web research and information gathering. */
46
+ const RESEARCH_AGENT = {
47
+ name: "research",
48
+ label: "Research",
49
+ description: "Web research and information gathering. Searches the web, fetches pages, and synthesizes findings.",
50
+ maxTurns: 30,
51
+ toolAccessMode: "read-only",
52
+ allowedTools: ["web_search", "web_fetch", "read_file", "search", "think", "memory_query"],
53
+ canFork: false,
54
+ };
55
+ /** Verification agent — runs tests and validates changes. */
56
+ const VERIFY_AGENT = {
57
+ name: "verify",
58
+ label: "Verify",
59
+ description: "Verification agent. Runs tests, checks build output, validates changes are correct.",
60
+ maxTurns: 40,
61
+ toolAccessMode: "full",
62
+ allowedTools: ["exec", "read_file", "search", "think"],
63
+ canFork: false,
64
+ };
65
+ const BUILT_IN_AGENTS = [
66
+ GENERAL_PURPOSE_AGENT,
67
+ EXPLORE_AGENT,
68
+ PLAN_AGENT,
69
+ CODE_AGENT,
70
+ RESEARCH_AGENT,
71
+ VERIFY_AGENT,
72
+ ];
73
+ /**
74
+ * Get the full list of built-in agent definitions.
75
+ */
76
+ export function getBuiltInAgents() {
77
+ return [...BUILT_IN_AGENTS];
78
+ }
79
+ /**
80
+ * Look up a built-in agent by name.
81
+ */
82
+ export function getBuiltInAgent(name) {
83
+ return BUILT_IN_AGENTS.find((a) => a.name === name);
84
+ }
85
+ /**
86
+ * Check if a given agent name is a built-in agent.
87
+ */
88
+ export function isBuiltInAgent(name) {
89
+ return BUILT_IN_AGENTS.some((a) => a.name === name);
90
+ }
91
+ /**
92
+ * Resolve tool access for an agent definition.
93
+ * Returns the set of tool names the agent is allowed to use.
94
+ */
95
+ export function resolveAgentToolSet(agent, availableTools) {
96
+ if (agent.allowedTools && agent.allowedTools.length > 0) {
97
+ const allowed = new Set(agent.allowedTools);
98
+ return availableTools.filter((t) => allowed.has(t));
99
+ }
100
+ if (agent.toolAccessMode === "none")
101
+ return [];
102
+ if (agent.toolAccessMode === "read-only") {
103
+ const writeTools = new Set([
104
+ "file_edit", "create_file", "write_file", "replace_string_in_file",
105
+ "multi_replace_string_in_file", "create_directory", "delete_file",
106
+ "rename_file", "move_file", "exec", "run_in_terminal", "run_command",
107
+ "git_commit", "git_push", "patch",
108
+ ]);
109
+ return availableTools.filter((t) => !writeTools.has(t));
110
+ }
111
+ // "full" — all tools except agent_tool itself (no recursive fork for non-canFork)
112
+ if (!agent.canFork) {
113
+ return availableTools.filter((t) => t !== "agent_tool" && t !== "team_create");
114
+ }
115
+ return [...availableTools];
116
+ }
117
+ //# sourceMappingURL=agent-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-registry.js","sourceRoot":"","sources":["../../src/orchestration/agent-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,qDAAqD;AACrD,MAAM,qBAAqB,GAAoB;IAC7C,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,8EAA8E;IAC3F,QAAQ,EAAE,GAAG;IACb,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,KAAK;CACf,CAAC;AAEF,mFAAmF;AACnF,MAAM,aAAa,GAAoB;IACrC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,2GAA2G;IACxH,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,WAAW;IAC3B,YAAY,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,CAAC;IACxG,OAAO,EAAE,KAAK;CACf,CAAC;AAEF,8EAA8E;AAC9E,MAAM,UAAU,GAAoB;IAClC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,yGAAyG;IACtH,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,WAAW;IAC3B,YAAY,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE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,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { ToolCallBatch, ToolCallLike } from "./parallel-tool-calls.js";
2
+ import type { ToolEligibilityLike } from "./tool-choice-policy.js";
3
+ export type ToolExecutionStepContext = {
4
+ stepIndex?: number;
5
+ stepTotal?: number;
6
+ stepSummary?: string;
7
+ };
8
+ export type ApprovalAwareToolCapability = {
9
+ name: string;
10
+ requiresApproval?: boolean;
11
+ approvalMode?: string;
12
+ };
13
+ export type ApprovalAwareToolPlanStep = {
14
+ stepIndex: number;
15
+ stepCount: number;
16
+ mode: "parallel" | "serial";
17
+ callIds: string[];
18
+ toolNames: string[];
19
+ approvalRequired: boolean;
20
+ approvalToolNames: string[];
21
+ summary: string;
22
+ };
23
+ export declare function summarizeApprovalAwareToolPlan<TCall extends ToolCallLike>(params: {
24
+ batches: Array<ToolCallBatch<TCall>>;
25
+ toolCapabilities: readonly ApprovalAwareToolCapability[];
26
+ eligibility?: readonly ToolEligibilityLike[];
27
+ }): ApprovalAwareToolPlanStep[];
28
+ export declare function buildApprovalAwareReason(params: {
29
+ toolName: string;
30
+ step: ApprovalAwareToolPlanStep | undefined;
31
+ }): string;
32
+ export declare function buildApprovalStepContext(step: ApprovalAwareToolPlanStep | undefined): ToolExecutionStepContext;
33
+ //# sourceMappingURL=approval-aware-tool-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-aware-tool-plan.d.ts","sourceRoot":"","sources":["../../src/orchestration/approval-aware-tool-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwCF,wBAAgB,8BAA8B,CAAC,KAAK,SAAS,YAAY,EAAE,MAAM,EAAE;IACjF,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IACrC,gBAAgB,EAAE,SAAS,2BAA2B,EAAE,CAAC;IACzD,WAAW,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAC9C,GAAG,yBAAyB,EAAE,CAuC9B;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,yBAAyB,GAAG,SAAS,CAAC;CAC7C,GAAG,MAAM,CAUT;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,yBAAyB,GAAG,SAAS,GAAG,wBAAwB,CAS9G"}
@@ -0,0 +1,88 @@
1
+ function formatToolList(toolNames) {
2
+ if (toolNames.length === 0) {
3
+ return "no tools";
4
+ }
5
+ if (toolNames.length === 1) {
6
+ return toolNames[0];
7
+ }
8
+ if (toolNames.length === 2) {
9
+ return `${toolNames[0]} and ${toolNames[1]}`;
10
+ }
11
+ return `${toolNames.slice(0, -1).join(", ")}, and ${toolNames.at(-1)}`;
12
+ }
13
+ function requiresInteractiveApproval(capability) {
14
+ if (!capability) {
15
+ return false;
16
+ }
17
+ return capability.requiresApproval === true || capability.approvalMode === "user-confirm";
18
+ }
19
+ function buildEligibilityMap(eligibility) {
20
+ return new Map((eligibility ?? []).map((entry) => [entry.toolName, entry]));
21
+ }
22
+ function requiresApprovalForTool(params) {
23
+ const eligibility = params.eligibilityMap.get(params.toolName);
24
+ if (eligibility?.approvalRequired !== undefined) {
25
+ return eligibility.approvalRequired;
26
+ }
27
+ return requiresInteractiveApproval(params.capabilityMap.get(params.toolName));
28
+ }
29
+ export function summarizeApprovalAwareToolPlan(params) {
30
+ const capabilityMap = new Map(params.toolCapabilities.map((capability) => [capability.name, capability]));
31
+ const eligibilityMap = buildEligibilityMap(params.eligibility);
32
+ const stepCount = params.batches.length;
33
+ return params.batches.map((batch, index) => {
34
+ const toolNames = batch.calls.map((call) => call.function.name);
35
+ const approvalToolNames = batch.calls
36
+ .map((call) => requiresApprovalForTool({
37
+ toolName: call.function.name,
38
+ capabilityMap,
39
+ eligibilityMap,
40
+ }) ? call.function.name : null)
41
+ .filter((toolName) => Boolean(toolName));
42
+ const approvalRequired = approvalToolNames.length > 0;
43
+ const headline = batch.mode === "parallel"
44
+ ? `Step ${index + 1}/${stepCount}: run ${toolNames.length} tools in parallel: ${formatToolList(toolNames)}.`
45
+ : approvalRequired
46
+ ? `Step ${index + 1}/${stepCount}: approval-gated execution for ${formatToolList(approvalToolNames)}.`
47
+ : `Step ${index + 1}/${stepCount}: run ${formatToolList(toolNames)} serially.`;
48
+ const detail = approvalRequired
49
+ ? stepCount > index + 1
50
+ ? "This step must be approved before later steps continue."
51
+ : "This is the final planned step and requires approval before execution."
52
+ : batch.mode === "parallel"
53
+ ? "Parallel-safe tools are grouped to avoid unnecessary waiting."
54
+ : "This step stays serial because the tool is not parallel-safe.";
55
+ return {
56
+ stepIndex: index + 1,
57
+ stepCount,
58
+ mode: batch.mode,
59
+ callIds: batch.calls.map((call) => call.id),
60
+ toolNames,
61
+ approvalRequired,
62
+ approvalToolNames,
63
+ summary: `${headline} ${detail}`,
64
+ };
65
+ });
66
+ }
67
+ export function buildApprovalAwareReason(params) {
68
+ if (!params.step) {
69
+ return `semantic turn requested local tool: ${params.toolName}`;
70
+ }
71
+ const suffix = params.step.approvalRequired
72
+ ? params.step.approvalToolNames.length > 1
73
+ ? ` Approval is currently blocking ${formatToolList(params.step.approvalToolNames)}.`
74
+ : " Approval is required before this step can continue."
75
+ : "";
76
+ return `${params.step.summary}${suffix}`;
77
+ }
78
+ export function buildApprovalStepContext(step) {
79
+ if (!step) {
80
+ return {};
81
+ }
82
+ return {
83
+ stepIndex: step.stepIndex,
84
+ stepTotal: step.stepCount,
85
+ stepSummary: step.summary,
86
+ };
87
+ }
88
+ //# sourceMappingURL=approval-aware-tool-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-aware-tool-plan.js","sourceRoot":"","sources":["../../src/orchestration/approval-aware-tool-plan.ts"],"names":[],"mappings":"AA0BA,SAAS,cAAc,CAAC,SAAmB;IACzC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC,CAAC,CAAE,CAAC;IACvB,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,CAAC;IACD,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACzE,CAAC;AAED,SAAS,2BAA2B,CAAC,UAAmD;IACtF,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,KAAK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I,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3C,SAAS;YACT,gBAAgB;YAChB,iBAAiB;YACjB,OAAO,EAAE,GAAG,QAAQ,IAAI,MAAM,EAAE;SACjC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,MAGxC;IACC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACjB,OAAO,uCAAuC,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClE,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB;QACzC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC;YACxC,CAAC,CAAC,mCAAmC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG;YACrF,CAAC,CAAC,sDAAsD;QAC1D,CAAC,CAAC,EAAE,CAAC;IACP,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,IAA2C;IAClF,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,WAAW,EAAE,IAAI,CAAC,OAAO;KAC1B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,221 @@
1
+ export interface CompressibleMessage {
2
+ role: string;
3
+ content?: string | unknown;
4
+ tool_call_id?: string;
5
+ tool_calls?: unknown;
6
+ name?: string;
7
+ }
8
+ export interface CompressionResult {
9
+ messages: CompressibleMessage[];
10
+ droppedCount: number;
11
+ strategy: string;
12
+ /** Phase 4: optional metrics from the compression pass */
13
+ metrics?: CompressionMetrics;
14
+ }
15
+ export interface CompressionMetrics {
16
+ tokensBefore: number;
17
+ tokensAfter: number;
18
+ compressionRatio: number;
19
+ /** ms elapsed for this strategy pass */
20
+ latencyMs: number;
21
+ /** Whether an LLM call was made during this pass */
22
+ usedLlm: boolean;
23
+ /** Whether prompt cache was invalidated by compression */
24
+ cacheInvalidated?: boolean;
25
+ }
26
+ export interface CompressionStrategy {
27
+ compress(messages: CompressibleMessage[], budget: number): CompressionResult;
28
+ }
29
+ /**
30
+ * Async compression strategy — required for LLM-based summarization.
31
+ * Falls back to sync `compress` when the caller doesn't support async.
32
+ */
33
+ export interface AsyncCompressionStrategy extends CompressionStrategy {
34
+ compressAsync(messages: CompressibleMessage[], budget: number): Promise<CompressionResult>;
35
+ }
36
+ export declare function isAsyncCompressionStrategy(s: CompressionStrategy): s is AsyncCompressionStrategy;
37
+ /** Caller-provided LLM summarization function (wired by Hub). */
38
+ export type SummarizeFn = (messages: CompressibleMessage[], instruction: string) => Promise<string>;
39
+ export declare class SlidingWindowStrategy implements CompressionStrategy {
40
+ private estimateTokens;
41
+ constructor(estimateTokens: (msg: CompressibleMessage) => number);
42
+ compress(messages: CompressibleMessage[], budget: number): CompressionResult;
43
+ }
44
+ export declare class SummarizeOldStrategy implements CompressionStrategy {
45
+ private recentCount;
46
+ private summarize;
47
+ constructor(recentCount: number, summarize: (messages: CompressibleMessage[]) => string);
48
+ compress(messages: CompressibleMessage[], _budget: number): CompressionResult;
49
+ }
50
+ export declare class ToolResultTrimStrategy implements CompressionStrategy {
51
+ private maxToolResultChars;
52
+ constructor(maxToolResultChars?: number);
53
+ compress(messages: CompressibleMessage[], _budget: number): CompressionResult;
54
+ }
55
+ export declare function composeStrategies(...strategies: CompressionStrategy[]): CompressionStrategy;
56
+ /**
57
+ * Compose strategies with async support — if any strategy is async,
58
+ * the pipeline becomes async.
59
+ */
60
+ export declare function composeAsyncStrategies(...strategies: CompressionStrategy[]): AsyncCompressionStrategy;
61
+ /**
62
+ * Build the structured 9-section summary instruction for the LLM.
63
+ * Based on Claude Code's Full Compact mode, adapted for Hub.
64
+ */
65
+ export declare function buildStructuredSummaryPrompt(messagesToSummarize: CompressibleMessage[], opts?: {
66
+ taskContext?: string;
67
+ }): string;
68
+ export interface HeadTailProtectionConfig {
69
+ /** Number of initial user-assistant exchanges to protect (default: 1) */
70
+ protectedHeadExchanges: number;
71
+ /** Number of recent messages to always keep (default: 8 = ~4 exchanges) */
72
+ protectedTailMessages: number;
73
+ /** The summarization callback */
74
+ summarize: SummarizeFn;
75
+ /** Optional token estimator */
76
+ estimateTokens?: (msg: CompressibleMessage) => number;
77
+ /** Optional extra context for the summary prompt */
78
+ taskContext?: string;
79
+ }
80
+ /**
81
+ * Phase 2.2: Head/Tail protected summarization.
82
+ *
83
+ * Protects: system messages + first exchange + last N messages.
84
+ * Compresses: middle section via LLM summarization.
85
+ */
86
+ export declare class HeadTailProtectedStrategy implements AsyncCompressionStrategy {
87
+ private config;
88
+ constructor(config: HeadTailProtectionConfig);
89
+ compress(messages: CompressibleMessage[], _budget: number): CompressionResult;
90
+ compressAsync(messages: CompressibleMessage[], budget: number): Promise<CompressionResult>;
91
+ }
92
+ export interface IncrementalCompactConfig {
93
+ /** Messages newer than this count are never summarized (default: 12) */
94
+ preserveRecentCount: number;
95
+ /** Summarization callback */
96
+ summarize: SummarizeFn;
97
+ /** Token estimator */
98
+ estimateTokens?: (msg: CompressibleMessage) => number;
99
+ }
100
+ /**
101
+ * Phase 2.3: Incremental (partial) compaction.
102
+ *
103
+ * Only summarizes the oldest messages beyond the preserve window.
104
+ * Avoids repeatedly re-summarizing already-compressed content.
105
+ * If a previous summary marker exists, only new old messages are compressed.
106
+ */
107
+ export declare class IncrementalCompactStrategy implements AsyncCompressionStrategy {
108
+ private config;
109
+ constructor(config: IncrementalCompactConfig);
110
+ compress(messages: CompressibleMessage[], _budget: number): CompressionResult;
111
+ compressAsync(messages: CompressibleMessage[], budget: number): Promise<CompressionResult>;
112
+ }
113
+ export interface CacheAwareCompressionConfig {
114
+ /** The inner strategy to delegate to */
115
+ inner: CompressionStrategy;
116
+ /** Token estimator */
117
+ estimateTokens?: (msg: CompressibleMessage) => number;
118
+ /**
119
+ * Callback: notify when prompt cache was invalidated by compression.
120
+ * Hub uses this to set pendingPostCompaction and track cache miss rate.
121
+ */
122
+ onCacheInvalidated?: (info: {
123
+ droppedCount: number;
124
+ strategy: string;
125
+ }) => void;
126
+ }
127
+ /**
128
+ * Phase 3: Cache-aware wrapper.
129
+ *
130
+ * Wraps any strategy and tracks whether compression invalidated the
131
+ * provider prompt cache. System prompt prefix stability is preserved
132
+ * by never modifying system[0] (the original system prompt).
133
+ */
134
+ export declare class CacheAwareCompressionStrategy implements AsyncCompressionStrategy {
135
+ private config;
136
+ constructor(config: CacheAwareCompressionConfig);
137
+ compress(messages: CompressibleMessage[], budget: number): CompressionResult;
138
+ compressAsync(messages: CompressibleMessage[], budget: number): Promise<CompressionResult>;
139
+ }
140
+ export interface AdaptiveBudgetConfig {
141
+ /** Model context window size in tokens */
142
+ modelContextWindow: number;
143
+ /** Target usage ratio (0.0–1.0, default 0.75) — trigger compaction at this fraction */
144
+ targetUsageRatio: number;
145
+ /** Minimum guaranteed budget in tokens */
146
+ minBudget: number;
147
+ /** Maximum budget (usually = modelContextWindow) */
148
+ maxBudget: number;
149
+ }
150
+ export declare const DEFAULT_ADAPTIVE_BUDGET_CONFIG: AdaptiveBudgetConfig;
151
+ /**
152
+ * Compute the adaptive token budget for a given model + message history.
153
+ *
154
+ * Adjusts based on model context window, and uses the target ratio
155
+ * so compression triggers before hitting the hard limit.
156
+ */
157
+ export declare function computeAdaptiveBudget(config?: Partial<AdaptiveBudgetConfig>): number;
158
+ /**
159
+ * Decide which compression tier to use based on current token count vs budget.
160
+ */
161
+ export type CompressionTier = "none" | "trim-only" | "sliding-window" | "llm-summarize";
162
+ export declare function selectCompressionTier(currentTokens: number, budget: number): CompressionTier;
163
+ export interface CompressionEvent {
164
+ timestamp: number;
165
+ strategy: string;
166
+ tokensBefore: number;
167
+ tokensAfter: number;
168
+ droppedCount: number;
169
+ latencyMs: number;
170
+ usedLlm: boolean;
171
+ cacheInvalidated: boolean;
172
+ tier: CompressionTier;
173
+ }
174
+ export interface CompressionMetricsSnapshot {
175
+ totalCompressions: number;
176
+ totalLlmCalls: number;
177
+ totalCacheInvalidations: number;
178
+ averageCompressionRatio: number;
179
+ averageLatencyMs: number;
180
+ totalTokensSaved: number;
181
+ recentEvents: CompressionEvent[];
182
+ }
183
+ export declare class CompressionMetricsCollector {
184
+ private events;
185
+ private maxEvents;
186
+ constructor(maxEvents?: number);
187
+ record(event: CompressionEvent): void;
188
+ snapshot(): CompressionMetricsSnapshot;
189
+ reset(): void;
190
+ }
191
+ /**
192
+ * A pluggable context engine. Only one can be active at a time.
193
+ * The default engine uses the 4-layer compression funnel.
194
+ */
195
+ export interface ContextEngine {
196
+ /** Unique engine identifier */
197
+ readonly id: string;
198
+ /** Human-readable label */
199
+ readonly label: string;
200
+ /** Compress messages for a turn */
201
+ compressAsync(messages: CompressibleMessage[], budget: number, context?: {
202
+ model?: string;
203
+ sessionId?: string;
204
+ }): Promise<CompressionResult>;
205
+ }
206
+ /**
207
+ * Registry for context engines. Enforces single-active constraint.
208
+ */
209
+ export declare class ContextEngineRegistry {
210
+ private engines;
211
+ private activeId;
212
+ register(engine: ContextEngine): void;
213
+ activate(id: string): boolean;
214
+ getActive(): ContextEngine | undefined;
215
+ listEngines(): Array<{
216
+ id: string;
217
+ label: string;
218
+ active: boolean;
219
+ }>;
220
+ }
221
+ //# sourceMappingURL=context-compression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-compression.d.ts","sourceRoot":"","sources":["../../src/orchestration/context-compression.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAA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