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,117 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const STRUCTURED_OUTPUT_TOOL_NAME: "structured_output";
3
+ /** Maximum content size for structured output results. */
4
+ export declare const STRUCTURED_OUTPUT_MAX_CHARS = 100000;
5
+ export interface StructuredOutputToolParams {
6
+ /** The structured data to return. Must conform to the session's output schema. */
7
+ data: Record<string, unknown>;
8
+ }
9
+ /**
10
+ * Base schema — accepts any object.
11
+ * When used with createConfiguredStructuredOutputTool, the host overrides
12
+ * this with the actual JSON Schema from `response_format.json_schema`.
13
+ */
14
+ export declare const STRUCTURED_OUTPUT_TOOL_SCHEMA: {
15
+ readonly type: "object";
16
+ readonly properties: {
17
+ readonly data: {
18
+ readonly type: "object";
19
+ readonly description: string;
20
+ readonly additionalProperties: true;
21
+ };
22
+ };
23
+ readonly required: readonly ["data"];
24
+ };
25
+ /** Schema validation error detail. */
26
+ export interface SchemaValidationError {
27
+ path: string;
28
+ message: string;
29
+ keyword?: string;
30
+ }
31
+ /** Result of structured output validation. */
32
+ export interface StructuredOutputResult {
33
+ valid: boolean;
34
+ errors?: SchemaValidationError[];
35
+ }
36
+ /**
37
+ * Whether the structured output tool should be enabled for this session.
38
+ * CC equivalent: `isSyntheticOutputToolEnabled`.
39
+ */
40
+ export declare function isStructuredOutputEnabled(opts: {
41
+ isNonInteractiveSession: boolean;
42
+ }): boolean;
43
+ /**
44
+ * Runtime dependencies injected by the host.
45
+ *
46
+ * The host provides:
47
+ * 1. The JSON Schema to validate against (from session config)
48
+ * 2. A validator function (host may use Ajv, Zod, or any validator)
49
+ * 3. An output sink to deliver the validated data
50
+ *
51
+ * The tool is only available in non-interactive (SDK/API) sessions
52
+ * where a `response_format.json_schema` has been specified.
53
+ */
54
+ export interface StructuredOutputToolDeps {
55
+ /**
56
+ * Get the JSON Schema that the output must conform to.
57
+ * Returns undefined if no schema is configured (tool should not be registered).
58
+ */
59
+ getOutputSchema(): Record<string, unknown> | undefined;
60
+ /**
61
+ * Validate data against the output schema.
62
+ * Returns { valid: true } or { valid: false, errors: [...] }.
63
+ */
64
+ validateOutput(data: Record<string, unknown>): StructuredOutputResult;
65
+ /**
66
+ * Deliver the validated output to the caller.
67
+ * Called only after successful validation.
68
+ */
69
+ deliverOutput(data: Record<string, unknown>): Promise<void>;
70
+ }
71
+ /**
72
+ * Create the base structured output tool with DI-based validation.
73
+ * This is the standard factory for runtime integration.
74
+ */
75
+ export declare function createStructuredOutputTool(deps: StructuredOutputToolDeps): PortableTool<StructuredOutputToolParams>;
76
+ /**
77
+ * Result of creating a configured structured output tool.
78
+ * Success: { tool } — ready-to-use tool with compiled schema.
79
+ * Failure: { error } — schema was invalid.
80
+ */
81
+ export type ConfiguredToolResult = {
82
+ tool: PortableTool<StructuredOutputToolParams>;
83
+ } | {
84
+ error: string;
85
+ };
86
+ /**
87
+ * Host-provided schema compilation interface.
88
+ * Allows the host to use any validator (Ajv, Zod, custom).
89
+ */
90
+ export interface SchemaCompiler {
91
+ /**
92
+ * Validate that the schema itself is a valid JSON Schema.
93
+ * Returns null if valid, or an error message string if invalid.
94
+ */
95
+ validateSchema(schema: Record<string, unknown>): string | null;
96
+ /**
97
+ * Compile the schema into a reusable validator function.
98
+ * Returns a function that validates data and returns StructuredOutputResult.
99
+ */
100
+ compile(schema: Record<string, unknown>): (data: Record<string, unknown>) => StructuredOutputResult;
101
+ }
102
+ /**
103
+ * Create a StructuredOutputTool configured with a specific JSON Schema.
104
+ * Mirrors CC's `createSyntheticOutputTool(jsonSchema)`.
105
+ *
106
+ * Features:
107
+ * - Validates the schema itself at creation time
108
+ * - Compiles the validator for reuse (cached via WeakMap)
109
+ * - Overrides the tool's `parameters` with the provided schema (dynamic input)
110
+ * - Returns { tool } on success or { error } if schema is invalid
111
+ *
112
+ * @param jsonSchema The JSON Schema to validate output against.
113
+ * @param compiler Schema compiler/validator provided by the host.
114
+ * @param deliver Output delivery function (called after successful validation).
115
+ */
116
+ export declare function createConfiguredStructuredOutputTool(jsonSchema: Record<string, unknown>, compiler: SchemaCompiler, deliver: (data: Record<string, unknown>) => Promise<void>): ConfiguredToolResult;
117
+ //# sourceMappingURL=structured-output-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structured-output-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/structured-output-tool.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,2BAA2B,EAAG,mBAA4B,CAAC;AAExE,0DAA0D;AAC1D,eAAO,M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OAGG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC;IAE/D;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,sBAAsB,CAAC;CACrG;AAKD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GACxD,oBAAoB,CAOtB"}
@@ -0,0 +1,177 @@
1
+ // ============================================================
2
+ // Structured Output Tool — validated JSON schema output for
3
+ // non-interactive (SDK/API) sessions.
4
+ // Reference: claude-code-haha/src/tools/SyntheticOutputTool/SyntheticOutputTool.ts
5
+ // Category: output / structured
6
+ // ============================================================
7
+ export const STRUCTURED_OUTPUT_TOOL_NAME = "structured_output";
8
+ /** Maximum content size for structured output results. */
9
+ export const STRUCTURED_OUTPUT_MAX_CHARS = 100_000;
10
+ /**
11
+ * Base schema — accepts any object.
12
+ * When used with createConfiguredStructuredOutputTool, the host overrides
13
+ * this with the actual JSON Schema from `response_format.json_schema`.
14
+ */
15
+ export const STRUCTURED_OUTPUT_TOOL_SCHEMA = {
16
+ type: "object",
17
+ properties: {
18
+ data: {
19
+ type: "object",
20
+ description: "The structured JSON data to return as this turn's output. " +
21
+ "Must conform to the output schema specified for this session.",
22
+ additionalProperties: true,
23
+ },
24
+ },
25
+ required: ["data"],
26
+ };
27
+ /**
28
+ * Whether the structured output tool should be enabled for this session.
29
+ * CC equivalent: `isSyntheticOutputToolEnabled`.
30
+ */
31
+ export function isStructuredOutputEnabled(opts) {
32
+ return opts.isNonInteractiveSession;
33
+ }
34
+ /**
35
+ * Create the base structured output tool with DI-based validation.
36
+ * This is the standard factory for runtime integration.
37
+ */
38
+ export function createStructuredOutputTool(deps) {
39
+ return {
40
+ name: STRUCTURED_OUTPUT_TOOL_NAME,
41
+ label: "Structured Output",
42
+ shouldDefer: false,
43
+ isConcurrencySafe: true,
44
+ isReadOnly: true,
45
+ searchHint: "return the final response as structured JSON",
46
+ maxResultSizeChars: STRUCTURED_OUTPUT_MAX_CHARS,
47
+ description: [
48
+ "Return your final response as structured JSON data.",
49
+ "",
50
+ "Use this tool ONLY when the session requests structured output (via response_format).",
51
+ "You MUST call this tool exactly once at the end of your response to provide the structured output.",
52
+ "The data you provide must conform to the output JSON Schema specified for this session.",
53
+ "",
54
+ "Rules:",
55
+ "â€ĸ Call this exactly once at the end of your turn to deliver results",
56
+ "â€ĸ The data must be a valid JSON object matching the required schema",
57
+ "â€ĸ If validation fails, you'll see the errors — fix your data and try again",
58
+ "â€ĸ This is typically the last tool call in a turn",
59
+ ].join("\n"),
60
+ parameters: STRUCTURED_OUTPUT_TOOL_SCHEMA,
61
+ execute: async (_toolCallId, params) => {
62
+ const schema = deps.getOutputSchema();
63
+ if (!schema) {
64
+ return {
65
+ content: [{
66
+ type: "text",
67
+ text: "Error: No output schema configured for this session. " +
68
+ "structured_output is only available when response_format.json_schema is specified.",
69
+ }],
70
+ details: { valid: false, error: "no_schema" },
71
+ };
72
+ }
73
+ const validation = deps.validateOutput(params.data);
74
+ if (!validation.valid) {
75
+ const errorLines = (validation.errors ?? []).map((e) => ` â€ĸ ${e.path || "/"}: ${e.message}`);
76
+ return {
77
+ content: [{
78
+ type: "text",
79
+ text: [
80
+ "Output does not match required schema:",
81
+ ...errorLines,
82
+ ].join("\n"),
83
+ }],
84
+ details: { valid: false, errors: validation.errors },
85
+ };
86
+ }
87
+ // Validation passed — deliver the output
88
+ await deps.deliverOutput(params.data);
89
+ return {
90
+ content: [{ type: "text", text: "Structured output provided successfully." }],
91
+ details: { valid: true, structured_output: params.data },
92
+ };
93
+ },
94
+ };
95
+ }
96
+ /** WeakMap cache for compiled schema tools (mirrors CC's toolCache). */
97
+ const configuredToolCache = new WeakMap();
98
+ /**
99
+ * Create a StructuredOutputTool configured with a specific JSON Schema.
100
+ * Mirrors CC's `createSyntheticOutputTool(jsonSchema)`.
101
+ *
102
+ * Features:
103
+ * - Validates the schema itself at creation time
104
+ * - Compiles the validator for reuse (cached via WeakMap)
105
+ * - Overrides the tool's `parameters` with the provided schema (dynamic input)
106
+ * - Returns { tool } on success or { error } if schema is invalid
107
+ *
108
+ * @param jsonSchema The JSON Schema to validate output against.
109
+ * @param compiler Schema compiler/validator provided by the host.
110
+ * @param deliver Output delivery function (called after successful validation).
111
+ */
112
+ export function createConfiguredStructuredOutputTool(jsonSchema, compiler, deliver) {
113
+ const cached = configuredToolCache.get(jsonSchema);
114
+ if (cached)
115
+ return cached;
116
+ const result = buildConfiguredTool(jsonSchema, compiler, deliver);
117
+ configuredToolCache.set(jsonSchema, result);
118
+ return result;
119
+ }
120
+ function buildConfiguredTool(jsonSchema, compiler, deliver) {
121
+ try {
122
+ // Step 1: Validate the schema itself
123
+ const schemaError = compiler.validateSchema(jsonSchema);
124
+ if (schemaError) {
125
+ return { error: `Invalid JSON Schema: ${schemaError}` };
126
+ }
127
+ // Step 2: Compile the validator
128
+ const validate = compiler.compile(jsonSchema);
129
+ // Step 3: Build the tool with dynamic input schema
130
+ const tool = {
131
+ name: STRUCTURED_OUTPUT_TOOL_NAME,
132
+ label: "Structured Output",
133
+ shouldDefer: false,
134
+ isConcurrencySafe: true,
135
+ isReadOnly: true,
136
+ searchHint: "return the final response as structured JSON",
137
+ maxResultSizeChars: STRUCTURED_OUTPUT_MAX_CHARS,
138
+ description: [
139
+ "Use this tool to return your final response in the requested structured format.",
140
+ "You MUST call this tool exactly once at the end of your response to provide the structured output.",
141
+ ].join(" "),
142
+ // Dynamic: override with the actual JSON Schema so LLM gets type guidance
143
+ parameters: {
144
+ type: "object",
145
+ properties: {
146
+ data: jsonSchema,
147
+ },
148
+ required: ["data"],
149
+ },
150
+ execute: async (_toolCallId, params) => {
151
+ const validation = validate(params.data);
152
+ if (!validation.valid) {
153
+ const errors = (validation.errors ?? [])
154
+ .map((e) => `${e.path || "root"}: ${e.message}`)
155
+ .join(", ");
156
+ return {
157
+ content: [{
158
+ type: "text",
159
+ text: `Output does not match required schema: ${errors}`,
160
+ }],
161
+ details: { valid: false, errors: validation.errors },
162
+ };
163
+ }
164
+ await deliver(params.data);
165
+ return {
166
+ content: [{ type: "text", text: "Structured output provided successfully." }],
167
+ details: { valid: true, structured_output: params.data },
168
+ };
169
+ },
170
+ };
171
+ return { tool };
172
+ }
173
+ catch (e) {
174
+ return { error: e instanceof Error ? e.message : String(e) };
175
+ }
176
+ }
177
+ //# sourceMappingURL=structured-output-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structured-output-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/structured-output-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,4DAA4D;AAC5D,sCAAsC;AACtC,mFAAmF;AACnF,gCAAgC;AAChC,+DAA+D;AAI/D,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAA4B,CAAC;AAExE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAOnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAiB;YACvB,WAAW,EACT,4DAA4D;gBAC5D,+DAA+D;YACjE,oBAAoB,EAAE,IAAI;SAC3B;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,CAAU;CACnB,CAAC;AAeX;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,IAEzC;IACC,OAAO,IAAI,CAAC,uBAAuB,CAAC;AACtC,CAAC;AAiCD;;;GAGG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C;gBAE3B,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0CAA0C,EAAE,CAAC;oBAC7E,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,CAAC,IAAI,EAAE;iBACzD,CAAC;YACJ,CAAC;SACF,CAAC;QAEF,OAAO,EAAE,IAAI,EAAE,CAAC;IAClB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,EAAE,KAAK,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/D,CAAC;AACH,CAAC"}
@@ -0,0 +1,105 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const TASK_TOOL_NAME: "task";
3
+ export type TaskAction = "create" | "get" | "list" | "output" | "stop";
4
+ export type TaskStatus = "pending" | "running" | "completed" | "failed" | "stopped";
5
+ export interface TaskToolParams {
6
+ action: TaskAction;
7
+ /** Task ID (required for get/output/stop) */
8
+ taskId?: string;
9
+ /** Task prompt (required for create) */
10
+ prompt?: string;
11
+ /** Short description (3-7 words, for create) */
12
+ description?: string;
13
+ /** Allowed tools for the background agent */
14
+ allowedTools?: string[];
15
+ /** Working directory for the task */
16
+ cwd?: string;
17
+ /** Model override for the task agent */
18
+ model?: string;
19
+ /** Max output lines to return (for output action, default 100) */
20
+ maxLines?: number;
21
+ }
22
+ export declare const TASK_TOOL_SCHEMA: {
23
+ readonly type: "object";
24
+ readonly properties: {
25
+ readonly action: {
26
+ readonly type: "string";
27
+ readonly enum: readonly ["create", "get", "list", "output", "stop"];
28
+ readonly description: string;
29
+ };
30
+ readonly taskId: {
31
+ readonly type: "string";
32
+ readonly description: "Task ID. Required for get/output/stop.";
33
+ };
34
+ readonly prompt: {
35
+ readonly type: "string";
36
+ readonly description: string;
37
+ };
38
+ readonly description: {
39
+ readonly type: "string";
40
+ readonly description: "Short (3-7 word) description of the task. Used for tracking and display.";
41
+ };
42
+ readonly allowedTools: {
43
+ readonly type: "array";
44
+ readonly items: {
45
+ readonly type: "string";
46
+ };
47
+ readonly description: "Restrict background agent to only these tools. If omitted, inherits parent's tools.";
48
+ };
49
+ readonly cwd: {
50
+ readonly type: "string";
51
+ readonly description: "Working directory for the background task (absolute path).";
52
+ };
53
+ readonly model: {
54
+ readonly type: "string";
55
+ readonly description: "Model override for the task agent (e.g. 'sonnet', 'opus').";
56
+ };
57
+ readonly maxLines: {
58
+ readonly type: "number";
59
+ readonly description: "Max output lines to return for the 'output' action (default: 100).";
60
+ readonly minimum: 1;
61
+ readonly maximum: 2000;
62
+ };
63
+ };
64
+ readonly required: readonly ["action"];
65
+ };
66
+ export interface TaskInfo {
67
+ taskId: string;
68
+ status: TaskStatus;
69
+ description?: string;
70
+ prompt?: string;
71
+ createdAt: number;
72
+ completedAt?: number;
73
+ result?: string;
74
+ error?: string;
75
+ }
76
+ export interface TaskResult {
77
+ success: boolean;
78
+ task?: TaskInfo;
79
+ tasks?: TaskInfo[];
80
+ output?: string;
81
+ error?: string;
82
+ }
83
+ /** Host-provided task management backend. */
84
+ export interface TaskToolDeps {
85
+ /** Create a new background agent task. Returns the created task info. */
86
+ createTask(params: {
87
+ prompt: string;
88
+ description?: string;
89
+ allowedTools?: string[];
90
+ cwd?: string;
91
+ model?: string;
92
+ }): Promise<TaskInfo>;
93
+ /** Get a task by ID. Returns null if not found. */
94
+ getTask(taskId: string): Promise<TaskInfo | null>;
95
+ /** List all tasks (optionally filtered by status). */
96
+ listTasks(filter?: {
97
+ status?: TaskStatus;
98
+ }): Promise<TaskInfo[]>;
99
+ /** Get output/logs from a task. */
100
+ getTaskOutput(taskId: string, maxLines?: number): Promise<string>;
101
+ /** Stop a running task. Returns true if stopped successfully. */
102
+ stopTask(taskId: string): Promise<boolean>;
103
+ }
104
+ export declare function createTaskTool(deps: TaskToolDeps): PortableTool<TaskToolParams>;
105
+ //# sourceMappingURL=task-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/task-tool.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,cAAc,EAAG,MAAe,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AACvE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpF,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,qCAAqC;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDnB,CAAC;AAEX,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,6CAA6C;AAC7C,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,UAAU,CAAC,MAAM,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEtB,mDAAmD;IACnD,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAElD,sDAAsD;IACtD,SAAS,CAAC,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEjE,mCAAmC;IACnC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5C;AAID,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CA4G/E"}
@@ -0,0 +1,162 @@
1
+ // ============================================================
2
+ // Task Tool — background agent task management (CRUD + output).
3
+ // Reference: claude-code-haha/src/tools/TaskCreateTool/TaskCreateTool.ts
4
+ // claude-code-haha/src/tools/TaskGetTool/TaskGetTool.ts
5
+ // claude-code-haha/src/tools/TaskListTool/TaskListTool.ts
6
+ // claude-code-haha/src/tools/TaskOutputTool/TaskOutputTool.tsx
7
+ // claude-code-haha/src/tools/TaskStopTool/TaskStopTool.ts
8
+ // Category: system
9
+ // ============================================================
10
+ export const TASK_TOOL_NAME = "task";
11
+ export const TASK_TOOL_SCHEMA = {
12
+ type: "object",
13
+ properties: {
14
+ action: {
15
+ type: "string",
16
+ enum: ["create", "get", "list", "output", "stop"],
17
+ description: "Action to perform:\n" +
18
+ "- create: Spawn a new background agent task\n" +
19
+ "- get: Get task status and metadata by ID\n" +
20
+ "- list: List all tasks with their statuses\n" +
21
+ "- output: Get stdout/output from a running or completed task\n" +
22
+ "- stop: Terminate a running task",
23
+ },
24
+ taskId: {
25
+ type: "string",
26
+ description: "Task ID. Required for get/output/stop.",
27
+ },
28
+ prompt: {
29
+ type: "string",
30
+ description: "Detailed prompt for the background agent. Must contain all context needed " +
31
+ "to complete the task independently. Required for create.",
32
+ },
33
+ description: {
34
+ type: "string",
35
+ description: "Short (3-7 word) description of the task. Used for tracking and display.",
36
+ },
37
+ allowedTools: {
38
+ type: "array",
39
+ items: { type: "string" },
40
+ description: "Restrict background agent to only these tools. If omitted, inherits parent's tools.",
41
+ },
42
+ cwd: {
43
+ type: "string",
44
+ description: "Working directory for the background task (absolute path).",
45
+ },
46
+ model: {
47
+ type: "string",
48
+ description: "Model override for the task agent (e.g. 'sonnet', 'opus').",
49
+ },
50
+ maxLines: {
51
+ type: "number",
52
+ description: "Max output lines to return for the 'output' action (default: 100).",
53
+ minimum: 1,
54
+ maximum: 2000,
55
+ },
56
+ },
57
+ required: ["action"],
58
+ };
59
+ const DEFAULT_MAX_LINES = 100;
60
+ export function createTaskTool(deps) {
61
+ return {
62
+ name: TASK_TOOL_NAME,
63
+ label: "Task",
64
+ shouldDefer: true,
65
+ description: "Manage background agent tasks. Use this to spawn long-running tasks (image generation, " +
66
+ "code refactoring, research) that run independently while you continue working. " +
67
+ "Actions: create (spawn), get (status check), list (all tasks), output (logs), stop (terminate).",
68
+ parameters: TASK_TOOL_SCHEMA,
69
+ execute: async (_toolCallId, params) => {
70
+ switch (params.action) {
71
+ case "create": {
72
+ if (!params.prompt || params.prompt.trim().length < 10) {
73
+ return {
74
+ content: [{ type: "text", text: "Error: 'prompt' is required for create (min 10 chars)." }],
75
+ };
76
+ }
77
+ const task = await deps.createTask({
78
+ prompt: params.prompt.trim(),
79
+ description: params.description,
80
+ allowedTools: params.allowedTools,
81
+ cwd: params.cwd,
82
+ model: params.model,
83
+ });
84
+ return {
85
+ content: [{
86
+ type: "text",
87
+ text: [
88
+ `Task created successfully.`,
89
+ `ID: ${task.taskId}`,
90
+ `Status: ${task.status}`,
91
+ task.description ? `Description: ${task.description}` : "",
92
+ ].filter(Boolean).join("\n"),
93
+ }],
94
+ details: { type: "task", action: "create", taskId: task.taskId, status: task.status },
95
+ };
96
+ }
97
+ case "get": {
98
+ if (!params.taskId) {
99
+ return { content: [{ type: "text", text: "Error: 'taskId' is required for get." }] };
100
+ }
101
+ const task = await deps.getTask(params.taskId);
102
+ if (!task) {
103
+ return { content: [{ type: "text", text: `Error: task "${params.taskId}" not found.` }] };
104
+ }
105
+ const lines = [
106
+ `Task: ${task.taskId}`,
107
+ `Status: ${task.status}`,
108
+ task.description ? `Description: ${task.description}` : "",
109
+ `Created: ${new Date(task.createdAt).toISOString()}`,
110
+ task.completedAt ? `Completed: ${new Date(task.completedAt).toISOString()}` : "",
111
+ task.result ? `Result: ${task.result.slice(0, 500)}` : "",
112
+ task.error ? `Error: ${task.error}` : "",
113
+ ];
114
+ return {
115
+ content: [{ type: "text", text: lines.filter(Boolean).join("\n") }],
116
+ details: { type: "task", action: "get", task },
117
+ };
118
+ }
119
+ case "list": {
120
+ const tasks = await deps.listTasks();
121
+ if (tasks.length === 0) {
122
+ return { content: [{ type: "text", text: "No tasks found." }] };
123
+ }
124
+ const lines = tasks.map(t => {
125
+ const icon = t.status === "completed" ? "✅" :
126
+ t.status === "running" ? "🔄" :
127
+ t.status === "failed" ? "❌" :
128
+ t.status === "stopped" ? "âšī¸" : "âŗ";
129
+ return `${icon} [${t.taskId}] ${t.description || "(no description)"} — ${t.status}`;
130
+ });
131
+ return {
132
+ content: [{ type: "text", text: `Tasks (${tasks.length}):\n${lines.join("\n")}` }],
133
+ details: { type: "task", action: "list", count: tasks.length },
134
+ };
135
+ }
136
+ case "output": {
137
+ if (!params.taskId) {
138
+ return { content: [{ type: "text", text: "Error: 'taskId' is required for output." }] };
139
+ }
140
+ const output = await deps.getTaskOutput(params.taskId, params.maxLines ?? DEFAULT_MAX_LINES);
141
+ return {
142
+ content: [{ type: "text", text: output || "(no output yet)" }],
143
+ details: { type: "task", action: "output", taskId: params.taskId },
144
+ };
145
+ }
146
+ case "stop": {
147
+ if (!params.taskId) {
148
+ return { content: [{ type: "text", text: "Error: 'taskId' is required for stop." }] };
149
+ }
150
+ const stopped = await deps.stopTask(params.taskId);
151
+ return {
152
+ content: [{ type: "text", text: stopped ? `Task ${params.taskId} stopped.` : `Failed to stop task ${params.taskId} (may already be completed).` }],
153
+ details: { type: "task", action: "stop", taskId: params.taskId, stopped },
154
+ };
155
+ }
156
+ default:
157
+ return { content: [{ type: "text", text: `Error: unknown action "${params.action}". Use: create/get/list/output/stop.` }] };
158
+ }
159
+ },
160
+ };
161
+ }
162
+ //# sourceMappingURL=task-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/task-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gEAAgE;AAChE,yEAAyE;AACzE,mEAAmE;AACnE,qEAAqE;AACrE,0EAA0E;AAC1E,qEAAqE;AACrE,mBAAmB;AACnB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAe,CAAC;AAuB9C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,MAAM,EAAE;YACN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