qlogicagent 0.2.0 → 0.3.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 (453) hide show
  1. package/dist/agent.js +1 -0
  2. package/dist/cli.js +9 -0
  3. package/dist/contracts.js +1 -0
  4. package/dist/index.js +5 -16
  5. package/dist/orchestration.js +118 -0
  6. package/dist/{agent → types/agent}/agent.d.ts +0 -1
  7. package/dist/{agent → types/agent}/tool-loop.d.ts +0 -1
  8. package/dist/{agent → types/agent}/types.d.ts +0 -1
  9. package/dist/{cli → types/cli}/main.d.ts +0 -1
  10. package/dist/{cli → types/cli}/stdio-server.d.ts +0 -1
  11. package/dist/{config → types/config}/config.d.ts +0 -1
  12. package/dist/{contracts → types/contracts}/hooks.d.ts +0 -1
  13. package/dist/{contracts/index.js → types/contracts/index.d.ts} +0 -1
  14. package/dist/{contracts → types/contracts}/planner.d.ts +0 -1
  15. package/dist/{contracts → types/contracts}/skill-candidate.d.ts +0 -1
  16. package/dist/{contracts → types/contracts}/todo.d.ts +0 -1
  17. package/dist/{index.d.ts → types/index.d.ts} +0 -1
  18. package/dist/{llm → types/llm}/builtin-providers.d.ts +0 -1
  19. package/dist/{llm → types/llm}/index.d.ts +0 -1
  20. package/dist/{llm → types/llm}/llm-client.d.ts +0 -1
  21. package/dist/{llm → types/llm}/model-catalog.d.ts +0 -1
  22. package/dist/{llm → types/llm}/provider-def.d.ts +0 -1
  23. package/dist/{llm → types/llm}/provider-registry.d.ts +0 -1
  24. package/dist/{llm → types/llm}/transport.d.ts +0 -1
  25. package/dist/{llm → types/llm}/transports/anthropic-messages.d.ts +0 -1
  26. package/dist/{llm → types/llm}/transports/openai-chat.d.ts +0 -1
  27. package/dist/{orchestration → types/orchestration}/agent-registry.d.ts +0 -1
  28. package/dist/{orchestration → types/orchestration}/approval-aware-tool-plan.d.ts +0 -1
  29. package/dist/{orchestration → types/orchestration}/context-compression.d.ts +0 -1
  30. package/dist/{orchestration → types/orchestration}/conversation-repair.d.ts +0 -1
  31. package/dist/{orchestration → types/orchestration}/curator-scheduler.d.ts +0 -1
  32. package/dist/{orchestration → types/orchestration}/embedded-failover-policy.d.ts +0 -1
  33. package/dist/{orchestration → types/orchestration}/error-classification.d.ts +0 -1
  34. package/dist/{orchestration → types/orchestration}/failover-classification.d.ts +0 -1
  35. package/dist/{orchestration → types/orchestration}/failover-error.d.ts +0 -1
  36. package/dist/{orchestration → types/orchestration}/fork-subagent.d.ts +0 -1
  37. package/dist/{orchestration → types/orchestration}/index.d.ts +0 -1
  38. package/dist/{orchestration → types/orchestration}/memory-flush-policy.d.ts +0 -1
  39. package/dist/{orchestration → types/orchestration}/memory-provider.d.ts +0 -1
  40. package/dist/{orchestration → types/orchestration}/parallel-tool-calls.d.ts +0 -1
  41. package/dist/{orchestration → types/orchestration}/prompt-cache-strategy.d.ts +0 -1
  42. package/dist/{orchestration → types/orchestration}/reactive-compact.d.ts +0 -1
  43. package/dist/{orchestration → types/orchestration}/retry-loop.d.ts +0 -1
  44. package/dist/{orchestration → types/orchestration}/skill-candidate.d.ts +0 -1
  45. package/dist/{orchestration → types/orchestration}/skill-consolidation.d.ts +0 -1
  46. package/dist/{orchestration → types/orchestration}/skill-improvement.d.ts +0 -1
  47. package/dist/{orchestration → types/orchestration}/skill-similarity.d.ts +0 -1
  48. package/dist/{orchestration → types/orchestration}/streaming-tool-executor.d.ts +0 -1
  49. package/dist/{orchestration → types/orchestration}/team-orchestration.d.ts +0 -1
  50. package/dist/{orchestration → types/orchestration}/team-tool-loop-wiring.d.ts +0 -1
  51. package/dist/{orchestration → types/orchestration}/tool-choice-policy.d.ts +0 -1
  52. package/dist/{orchestration → types/orchestration}/tool-loop-state.d.ts +0 -1
  53. package/dist/{orchestration → types/orchestration}/tool-schema.d.ts +0 -1
  54. package/dist/{orchestration → types/orchestration}/transcript-repair.d.ts +0 -1
  55. package/dist/{orchestration → types/orchestration}/turn-loop-guard.d.ts +0 -1
  56. package/dist/{orchestration → types/orchestration}/web-browser-policy.d.ts +0 -1
  57. package/dist/{runtime → types/runtime}/context-compression.d.ts +0 -1
  58. package/dist/{runtime → types/runtime}/hook-registry.d.ts +0 -1
  59. package/dist/{runtime → types/runtime}/memory-hooks.d.ts +0 -1
  60. package/dist/{runtime → types/runtime}/tool-eligibility.d.ts +0 -1
  61. package/dist/{skills → types/skills}/index.d.ts +0 -1
  62. package/dist/{skills → types/skills}/memory-extractor.d.ts +0 -1
  63. package/dist/{skills → types/skills}/memory-query-tool.d.ts +0 -1
  64. package/dist/{skills → types/skills}/memory-store.d.ts +0 -1
  65. package/dist/{skills → types/skills}/memory-tool.d.ts +0 -1
  66. package/dist/{skills → types/skills}/portable-tool.d.ts +0 -1
  67. package/dist/{skills → types/skills}/qmemory-adapter.d.ts +0 -1
  68. package/dist/{skills → types/skills}/skill-frontmatter.d.ts +0 -1
  69. package/dist/{skills → types/skills}/skill-guard.d.ts +0 -1
  70. package/dist/{skills → types/skills}/skill-loader.d.ts +0 -1
  71. package/dist/{skills → types/skills}/skill-source.d.ts +0 -1
  72. package/dist/{skills → types/skills}/skill-types.d.ts +0 -1
  73. package/dist/{skills → types/skills}/think-tool.d.ts +0 -1
  74. package/dist/{skills → types/skills}/todo-tool.d.ts +0 -1
  75. package/dist/{skills → types/skills}/tools/agent-tool.d.ts +0 -1
  76. package/dist/{skills → types/skills}/tools/apply-patch-tool.d.ts +0 -1
  77. package/dist/{skills → types/skills}/tools/ask-user-tool.d.ts +0 -1
  78. package/dist/{skills → types/skills}/tools/brief-tool.d.ts +0 -1
  79. package/dist/{skills → types/skills}/tools/browser-tool.d.ts +0 -1
  80. package/dist/{skills → types/skills}/tools/checkpoint-tool.d.ts +0 -1
  81. package/dist/{skills → types/skills}/tools/config-tool.d.ts +0 -1
  82. package/dist/{skills → types/skills}/tools/cron-tool.d.ts +0 -1
  83. package/dist/{skills → types/skills}/tools/edit-tool.d.ts +0 -1
  84. package/dist/{skills → types/skills}/tools/exec-tool.d.ts +0 -1
  85. package/dist/{skills → types/skills}/tools/image-generate-tool.d.ts +0 -1
  86. package/dist/{skills → types/skills}/tools/instructions-tool.d.ts +0 -1
  87. package/dist/{skills → types/skills}/tools/lsp-tool.d.ts +0 -1
  88. package/dist/{skills → types/skills}/tools/mcp-client-types.d.ts +0 -1
  89. package/dist/{skills → types/skills}/tools/mcp-tool.d.ts +0 -1
  90. package/dist/{skills → types/skills}/tools/memory-tool.d.ts +0 -1
  91. package/dist/{skills → types/skills}/tools/monitor-tool.d.ts +0 -1
  92. package/dist/{skills → types/skills}/tools/music-generate-tool.d.ts +0 -1
  93. package/dist/{skills → types/skills}/tools/notify-tool.d.ts +0 -1
  94. package/dist/{skills → types/skills}/tools/patch-tool.d.ts +0 -1
  95. package/dist/{skills → types/skills}/tools/pdf-tool.d.ts +0 -1
  96. package/dist/{skills → types/skills}/tools/plan-mode-tool.d.ts +0 -1
  97. package/dist/{skills → types/skills}/tools/read-tool.d.ts +0 -1
  98. package/dist/{skills → types/skills}/tools/repl-tool.d.ts +0 -1
  99. package/dist/{skills → types/skills}/tools/search-tool.d.ts +0 -1
  100. package/dist/{skills → types/skills}/tools/send-message-tool.d.ts +0 -1
  101. package/dist/{skills → types/skills}/tools/skill-list-tool.d.ts +0 -1
  102. package/dist/{skills → types/skills}/tools/skill-manage-tool.d.ts +0 -1
  103. package/dist/{skills → types/skills}/tools/skill-view-tool.d.ts +0 -1
  104. package/dist/{skills → types/skills}/tools/sleep-tool.d.ts +0 -1
  105. package/dist/{skills → types/skills}/tools/structured-output-tool.d.ts +0 -1
  106. package/dist/{skills → types/skills}/tools/task-tool.d.ts +0 -1
  107. package/dist/{skills → types/skills}/tools/team-tool.d.ts +0 -1
  108. package/dist/{skills → types/skills}/tools/tool-search-tool.d.ts +0 -1
  109. package/dist/{skills → types/skills}/tools/tts-tool.d.ts +0 -1
  110. package/dist/{skills → types/skills}/tools/video-edit-tool.d.ts +0 -1
  111. package/dist/{skills → types/skills}/tools/video-generate-tool.d.ts +0 -1
  112. package/dist/{skills → types/skills}/tools/video-merge-tool.d.ts +0 -1
  113. package/dist/{skills → types/skills}/tools/video-upscale-tool.d.ts +0 -1
  114. package/dist/{skills → types/skills}/tools/web-fetch-tool.d.ts +0 -1
  115. package/dist/{skills → types/skills}/tools/web-search-tool.d.ts +0 -1
  116. package/dist/{skills → types/skills}/tools/worktree-tool.d.ts +0 -1
  117. package/dist/{skills → types/skills}/tools/write-tool.d.ts +0 -1
  118. package/package.json +56 -42
  119. package/dist/agent/agent.d.ts.map +0 -1
  120. package/dist/agent/agent.js +0 -114
  121. package/dist/agent/agent.js.map +0 -1
  122. package/dist/agent/tool-loop.d.ts.map +0 -1
  123. package/dist/agent/tool-loop.js +0 -576
  124. package/dist/agent/tool-loop.js.map +0 -1
  125. package/dist/agent/types.d.ts.map +0 -1
  126. package/dist/agent/types.js +0 -15
  127. package/dist/agent/types.js.map +0 -1
  128. package/dist/cli/main.d.ts.map +0 -1
  129. package/dist/cli/main.js +0 -24
  130. package/dist/cli/main.js.map +0 -1
  131. package/dist/cli/stdio-server.d.ts.map +0 -1
  132. package/dist/cli/stdio-server.js +0 -464
  133. package/dist/cli/stdio-server.js.map +0 -1
  134. package/dist/config/config.d.ts.map +0 -1
  135. package/dist/config/config.js +0 -22
  136. package/dist/config/config.js.map +0 -1
  137. package/dist/contracts/hooks.d.ts.map +0 -1
  138. package/dist/contracts/hooks.js +0 -8
  139. package/dist/contracts/hooks.js.map +0 -1
  140. package/dist/contracts/index.d.ts +0 -11
  141. package/dist/contracts/index.d.ts.map +0 -1
  142. package/dist/contracts/index.js.map +0 -1
  143. package/dist/contracts/planner.d.ts.map +0 -1
  144. package/dist/contracts/planner.js +0 -3
  145. package/dist/contracts/planner.js.map +0 -1
  146. package/dist/contracts/skill-candidate.d.ts.map +0 -1
  147. package/dist/contracts/skill-candidate.js +0 -196
  148. package/dist/contracts/skill-candidate.js.map +0 -1
  149. package/dist/contracts/todo.d.ts.map +0 -1
  150. package/dist/contracts/todo.js +0 -10
  151. package/dist/contracts/todo.js.map +0 -1
  152. package/dist/index.d.ts.map +0 -1
  153. package/dist/index.js.map +0 -1
  154. package/dist/llm/builtin-providers.d.ts.map +0 -1
  155. package/dist/llm/builtin-providers.js +0 -532
  156. package/dist/llm/builtin-providers.js.map +0 -1
  157. package/dist/llm/index.d.ts.map +0 -1
  158. package/dist/llm/index.js +0 -15
  159. package/dist/llm/index.js.map +0 -1
  160. package/dist/llm/llm-client.d.ts.map +0 -1
  161. package/dist/llm/llm-client.js +0 -68
  162. package/dist/llm/llm-client.js.map +0 -1
  163. package/dist/llm/model-catalog.d.ts.map +0 -1
  164. package/dist/llm/model-catalog.js +0 -192
  165. package/dist/llm/model-catalog.js.map +0 -1
  166. package/dist/llm/provider-def.d.ts.map +0 -1
  167. package/dist/llm/provider-def.js +0 -13
  168. package/dist/llm/provider-def.js.map +0 -1
  169. package/dist/llm/provider-registry.d.ts.map +0 -1
  170. package/dist/llm/provider-registry.js +0 -148
  171. package/dist/llm/provider-registry.js.map +0 -1
  172. package/dist/llm/transport.d.ts.map +0 -1
  173. package/dist/llm/transport.js +0 -28
  174. package/dist/llm/transport.js.map +0 -1
  175. package/dist/llm/transports/anthropic-messages.d.ts.map +0 -1
  176. package/dist/llm/transports/anthropic-messages.js +0 -294
  177. package/dist/llm/transports/anthropic-messages.js.map +0 -1
  178. package/dist/llm/transports/openai-chat.d.ts.map +0 -1
  179. package/dist/llm/transports/openai-chat.js +0 -166
  180. package/dist/llm/transports/openai-chat.js.map +0 -1
  181. package/dist/orchestration/agent-registry.d.ts.map +0 -1
  182. package/dist/orchestration/agent-registry.js +0 -117
  183. package/dist/orchestration/agent-registry.js.map +0 -1
  184. package/dist/orchestration/approval-aware-tool-plan.d.ts.map +0 -1
  185. package/dist/orchestration/approval-aware-tool-plan.js +0 -88
  186. package/dist/orchestration/approval-aware-tool-plan.js.map +0 -1
  187. package/dist/orchestration/context-compression.d.ts.map +0 -1
  188. package/dist/orchestration/context-compression.js +0 -584
  189. package/dist/orchestration/context-compression.js.map +0 -1
  190. package/dist/orchestration/conversation-repair.d.ts.map +0 -1
  191. package/dist/orchestration/conversation-repair.js +0 -430
  192. package/dist/orchestration/conversation-repair.js.map +0 -1
  193. package/dist/orchestration/curator-scheduler.d.ts.map +0 -1
  194. package/dist/orchestration/curator-scheduler.js +0 -136
  195. package/dist/orchestration/curator-scheduler.js.map +0 -1
  196. package/dist/orchestration/embedded-failover-policy.d.ts.map +0 -1
  197. package/dist/orchestration/embedded-failover-policy.js +0 -169
  198. package/dist/orchestration/embedded-failover-policy.js.map +0 -1
  199. package/dist/orchestration/error-classification.d.ts.map +0 -1
  200. package/dist/orchestration/error-classification.js +0 -78
  201. package/dist/orchestration/error-classification.js.map +0 -1
  202. package/dist/orchestration/failover-classification.d.ts.map +0 -1
  203. package/dist/orchestration/failover-classification.js +0 -382
  204. package/dist/orchestration/failover-classification.js.map +0 -1
  205. package/dist/orchestration/failover-error.d.ts.map +0 -1
  206. package/dist/orchestration/failover-error.js +0 -199
  207. package/dist/orchestration/failover-error.js.map +0 -1
  208. package/dist/orchestration/fork-subagent.d.ts.map +0 -1
  209. package/dist/orchestration/fork-subagent.js +0 -99
  210. package/dist/orchestration/fork-subagent.js.map +0 -1
  211. package/dist/orchestration/index.d.ts.map +0 -1
  212. package/dist/orchestration/index.js +0 -268
  213. package/dist/orchestration/index.js.map +0 -1
  214. package/dist/orchestration/memory-flush-policy.d.ts.map +0 -1
  215. package/dist/orchestration/memory-flush-policy.js +0 -86
  216. package/dist/orchestration/memory-flush-policy.js.map +0 -1
  217. package/dist/orchestration/memory-provider.d.ts.map +0 -1
  218. package/dist/orchestration/memory-provider.js +0 -3
  219. package/dist/orchestration/memory-provider.js.map +0 -1
  220. package/dist/orchestration/parallel-tool-calls.d.ts.map +0 -1
  221. package/dist/orchestration/parallel-tool-calls.js +0 -60
  222. package/dist/orchestration/parallel-tool-calls.js.map +0 -1
  223. package/dist/orchestration/prompt-cache-strategy.d.ts.map +0 -1
  224. package/dist/orchestration/prompt-cache-strategy.js +0 -229
  225. package/dist/orchestration/prompt-cache-strategy.js.map +0 -1
  226. package/dist/orchestration/reactive-compact.d.ts.map +0 -1
  227. package/dist/orchestration/reactive-compact.js +0 -79
  228. package/dist/orchestration/reactive-compact.js.map +0 -1
  229. package/dist/orchestration/retry-loop.d.ts.map +0 -1
  230. package/dist/orchestration/retry-loop.js +0 -25
  231. package/dist/orchestration/retry-loop.js.map +0 -1
  232. package/dist/orchestration/skill-candidate.d.ts.map +0 -1
  233. package/dist/orchestration/skill-candidate.js +0 -142
  234. package/dist/orchestration/skill-candidate.js.map +0 -1
  235. package/dist/orchestration/skill-consolidation.d.ts.map +0 -1
  236. package/dist/orchestration/skill-consolidation.js +0 -221
  237. package/dist/orchestration/skill-consolidation.js.map +0 -1
  238. package/dist/orchestration/skill-improvement.d.ts.map +0 -1
  239. package/dist/orchestration/skill-improvement.js +0 -67
  240. package/dist/orchestration/skill-improvement.js.map +0 -1
  241. package/dist/orchestration/skill-similarity.d.ts.map +0 -1
  242. package/dist/orchestration/skill-similarity.js +0 -132
  243. package/dist/orchestration/skill-similarity.js.map +0 -1
  244. package/dist/orchestration/streaming-tool-executor.d.ts.map +0 -1
  245. package/dist/orchestration/streaming-tool-executor.js +0 -97
  246. package/dist/orchestration/streaming-tool-executor.js.map +0 -1
  247. package/dist/orchestration/team-orchestration.d.ts.map +0 -1
  248. package/dist/orchestration/team-orchestration.js +0 -370
  249. package/dist/orchestration/team-orchestration.js.map +0 -1
  250. package/dist/orchestration/team-tool-loop-wiring.d.ts.map +0 -1
  251. package/dist/orchestration/team-tool-loop-wiring.js +0 -148
  252. package/dist/orchestration/team-tool-loop-wiring.js.map +0 -1
  253. package/dist/orchestration/tool-choice-policy.d.ts.map +0 -1
  254. package/dist/orchestration/tool-choice-policy.js +0 -165
  255. package/dist/orchestration/tool-choice-policy.js.map +0 -1
  256. package/dist/orchestration/tool-loop-state.d.ts.map +0 -1
  257. package/dist/orchestration/tool-loop-state.js +0 -134
  258. package/dist/orchestration/tool-loop-state.js.map +0 -1
  259. package/dist/orchestration/tool-schema.d.ts.map +0 -1
  260. package/dist/orchestration/tool-schema.js +0 -298
  261. package/dist/orchestration/tool-schema.js.map +0 -1
  262. package/dist/orchestration/transcript-repair.d.ts.map +0 -1
  263. package/dist/orchestration/transcript-repair.js +0 -427
  264. package/dist/orchestration/transcript-repair.js.map +0 -1
  265. package/dist/orchestration/turn-loop-guard.d.ts.map +0 -1
  266. package/dist/orchestration/turn-loop-guard.js +0 -93
  267. package/dist/orchestration/turn-loop-guard.js.map +0 -1
  268. package/dist/orchestration/web-browser-policy.d.ts.map +0 -1
  269. package/dist/orchestration/web-browser-policy.js +0 -40
  270. package/dist/orchestration/web-browser-policy.js.map +0 -1
  271. package/dist/runtime/context-compression.d.ts.map +0 -1
  272. package/dist/runtime/context-compression.js +0 -275
  273. package/dist/runtime/context-compression.js.map +0 -1
  274. package/dist/runtime/hook-registry.d.ts.map +0 -1
  275. package/dist/runtime/hook-registry.js +0 -54
  276. package/dist/runtime/hook-registry.js.map +0 -1
  277. package/dist/runtime/memory-hooks.d.ts.map +0 -1
  278. package/dist/runtime/memory-hooks.js +0 -66
  279. package/dist/runtime/memory-hooks.js.map +0 -1
  280. package/dist/runtime/tool-eligibility.d.ts.map +0 -1
  281. package/dist/runtime/tool-eligibility.js +0 -112
  282. package/dist/runtime/tool-eligibility.js.map +0 -1
  283. package/dist/skills/index.d.ts.map +0 -1
  284. package/dist/skills/index.js +0 -83
  285. package/dist/skills/index.js.map +0 -1
  286. package/dist/skills/memory-extractor.d.ts.map +0 -1
  287. package/dist/skills/memory-extractor.js +0 -174
  288. package/dist/skills/memory-extractor.js.map +0 -1
  289. package/dist/skills/memory-query-tool.d.ts.map +0 -1
  290. package/dist/skills/memory-query-tool.js +0 -128
  291. package/dist/skills/memory-query-tool.js.map +0 -1
  292. package/dist/skills/memory-store.d.ts.map +0 -1
  293. package/dist/skills/memory-store.js +0 -229
  294. package/dist/skills/memory-store.js.map +0 -1
  295. package/dist/skills/memory-tool.d.ts.map +0 -1
  296. package/dist/skills/memory-tool.js +0 -193
  297. package/dist/skills/memory-tool.js.map +0 -1
  298. package/dist/skills/portable-tool.d.ts.map +0 -1
  299. package/dist/skills/portable-tool.js +0 -15
  300. package/dist/skills/portable-tool.js.map +0 -1
  301. package/dist/skills/qmemory-adapter.d.ts.map +0 -1
  302. package/dist/skills/qmemory-adapter.js +0 -166
  303. package/dist/skills/qmemory-adapter.js.map +0 -1
  304. package/dist/skills/skill-frontmatter.d.ts.map +0 -1
  305. package/dist/skills/skill-frontmatter.js +0 -345
  306. package/dist/skills/skill-frontmatter.js.map +0 -1
  307. package/dist/skills/skill-guard.d.ts.map +0 -1
  308. package/dist/skills/skill-guard.js +0 -230
  309. package/dist/skills/skill-guard.js.map +0 -1
  310. package/dist/skills/skill-loader.d.ts.map +0 -1
  311. package/dist/skills/skill-loader.js +0 -304
  312. package/dist/skills/skill-loader.js.map +0 -1
  313. package/dist/skills/skill-source.d.ts.map +0 -1
  314. package/dist/skills/skill-source.js +0 -127
  315. package/dist/skills/skill-source.js.map +0 -1
  316. package/dist/skills/skill-types.d.ts.map +0 -1
  317. package/dist/skills/skill-types.js +0 -7
  318. package/dist/skills/skill-types.js.map +0 -1
  319. package/dist/skills/think-tool.d.ts.map +0 -1
  320. package/dist/skills/think-tool.js +0 -60
  321. package/dist/skills/think-tool.js.map +0 -1
  322. package/dist/skills/todo-tool.d.ts.map +0 -1
  323. package/dist/skills/todo-tool.js +0 -115
  324. package/dist/skills/todo-tool.js.map +0 -1
  325. package/dist/skills/tools/agent-tool.d.ts.map +0 -1
  326. package/dist/skills/tools/agent-tool.js +0 -143
  327. package/dist/skills/tools/agent-tool.js.map +0 -1
  328. package/dist/skills/tools/apply-patch-tool.d.ts.map +0 -1
  329. package/dist/skills/tools/apply-patch-tool.js +0 -185
  330. package/dist/skills/tools/apply-patch-tool.js.map +0 -1
  331. package/dist/skills/tools/ask-user-tool.d.ts.map +0 -1
  332. package/dist/skills/tools/ask-user-tool.js +0 -122
  333. package/dist/skills/tools/ask-user-tool.js.map +0 -1
  334. package/dist/skills/tools/brief-tool.d.ts.map +0 -1
  335. package/dist/skills/tools/brief-tool.js +0 -96
  336. package/dist/skills/tools/brief-tool.js.map +0 -1
  337. package/dist/skills/tools/browser-tool.d.ts.map +0 -1
  338. package/dist/skills/tools/browser-tool.js +0 -156
  339. package/dist/skills/tools/browser-tool.js.map +0 -1
  340. package/dist/skills/tools/checkpoint-tool.d.ts.map +0 -1
  341. package/dist/skills/tools/checkpoint-tool.js +0 -103
  342. package/dist/skills/tools/checkpoint-tool.js.map +0 -1
  343. package/dist/skills/tools/config-tool.d.ts.map +0 -1
  344. package/dist/skills/tools/config-tool.js +0 -144
  345. package/dist/skills/tools/config-tool.js.map +0 -1
  346. package/dist/skills/tools/cron-tool.d.ts.map +0 -1
  347. package/dist/skills/tools/cron-tool.js +0 -176
  348. package/dist/skills/tools/cron-tool.js.map +0 -1
  349. package/dist/skills/tools/edit-tool.d.ts.map +0 -1
  350. package/dist/skills/tools/edit-tool.js +0 -71
  351. package/dist/skills/tools/edit-tool.js.map +0 -1
  352. package/dist/skills/tools/exec-tool.d.ts.map +0 -1
  353. package/dist/skills/tools/exec-tool.js +0 -134
  354. package/dist/skills/tools/exec-tool.js.map +0 -1
  355. package/dist/skills/tools/image-generate-tool.d.ts.map +0 -1
  356. package/dist/skills/tools/image-generate-tool.js +0 -68
  357. package/dist/skills/tools/image-generate-tool.js.map +0 -1
  358. package/dist/skills/tools/instructions-tool.d.ts.map +0 -1
  359. package/dist/skills/tools/instructions-tool.js +0 -188
  360. package/dist/skills/tools/instructions-tool.js.map +0 -1
  361. package/dist/skills/tools/lsp-tool.d.ts.map +0 -1
  362. package/dist/skills/tools/lsp-tool.js +0 -228
  363. package/dist/skills/tools/lsp-tool.js.map +0 -1
  364. package/dist/skills/tools/mcp-client-types.d.ts.map +0 -1
  365. package/dist/skills/tools/mcp-client-types.js +0 -54
  366. package/dist/skills/tools/mcp-client-types.js.map +0 -1
  367. package/dist/skills/tools/mcp-tool.d.ts.map +0 -1
  368. package/dist/skills/tools/mcp-tool.js +0 -504
  369. package/dist/skills/tools/mcp-tool.js.map +0 -1
  370. package/dist/skills/tools/memory-tool.d.ts.map +0 -1
  371. package/dist/skills/tools/memory-tool.js +0 -89
  372. package/dist/skills/tools/memory-tool.js.map +0 -1
  373. package/dist/skills/tools/monitor-tool.d.ts.map +0 -1
  374. package/dist/skills/tools/monitor-tool.js +0 -132
  375. package/dist/skills/tools/monitor-tool.js.map +0 -1
  376. package/dist/skills/tools/music-generate-tool.d.ts.map +0 -1
  377. package/dist/skills/tools/music-generate-tool.js +0 -63
  378. package/dist/skills/tools/music-generate-tool.js.map +0 -1
  379. package/dist/skills/tools/notify-tool.d.ts.map +0 -1
  380. package/dist/skills/tools/notify-tool.js +0 -63
  381. package/dist/skills/tools/notify-tool.js.map +0 -1
  382. package/dist/skills/tools/patch-tool.d.ts.map +0 -1
  383. package/dist/skills/tools/patch-tool.js +0 -506
  384. package/dist/skills/tools/patch-tool.js.map +0 -1
  385. package/dist/skills/tools/pdf-tool.d.ts.map +0 -1
  386. package/dist/skills/tools/pdf-tool.js +0 -89
  387. package/dist/skills/tools/pdf-tool.js.map +0 -1
  388. package/dist/skills/tools/plan-mode-tool.d.ts.map +0 -1
  389. package/dist/skills/tools/plan-mode-tool.js +0 -123
  390. package/dist/skills/tools/plan-mode-tool.js.map +0 -1
  391. package/dist/skills/tools/read-tool.d.ts.map +0 -1
  392. package/dist/skills/tools/read-tool.js +0 -85
  393. package/dist/skills/tools/read-tool.js.map +0 -1
  394. package/dist/skills/tools/repl-tool.d.ts.map +0 -1
  395. package/dist/skills/tools/repl-tool.js +0 -70
  396. package/dist/skills/tools/repl-tool.js.map +0 -1
  397. package/dist/skills/tools/search-tool.d.ts.map +0 -1
  398. package/dist/skills/tools/search-tool.js +0 -226
  399. package/dist/skills/tools/search-tool.js.map +0 -1
  400. package/dist/skills/tools/send-message-tool.d.ts.map +0 -1
  401. package/dist/skills/tools/send-message-tool.js +0 -77
  402. package/dist/skills/tools/send-message-tool.js.map +0 -1
  403. package/dist/skills/tools/skill-list-tool.d.ts.map +0 -1
  404. package/dist/skills/tools/skill-list-tool.js +0 -55
  405. package/dist/skills/tools/skill-list-tool.js.map +0 -1
  406. package/dist/skills/tools/skill-manage-tool.d.ts.map +0 -1
  407. package/dist/skills/tools/skill-manage-tool.js +0 -154
  408. package/dist/skills/tools/skill-manage-tool.js.map +0 -1
  409. package/dist/skills/tools/skill-view-tool.d.ts.map +0 -1
  410. package/dist/skills/tools/skill-view-tool.js +0 -73
  411. package/dist/skills/tools/skill-view-tool.js.map +0 -1
  412. package/dist/skills/tools/sleep-tool.d.ts.map +0 -1
  413. package/dist/skills/tools/sleep-tool.js +0 -82
  414. package/dist/skills/tools/sleep-tool.js.map +0 -1
  415. package/dist/skills/tools/structured-output-tool.d.ts.map +0 -1
  416. package/dist/skills/tools/structured-output-tool.js +0 -177
  417. package/dist/skills/tools/structured-output-tool.js.map +0 -1
  418. package/dist/skills/tools/task-tool.d.ts.map +0 -1
  419. package/dist/skills/tools/task-tool.js +0 -162
  420. package/dist/skills/tools/task-tool.js.map +0 -1
  421. package/dist/skills/tools/team-tool.d.ts.map +0 -1
  422. package/dist/skills/tools/team-tool.js +0 -106
  423. package/dist/skills/tools/team-tool.js.map +0 -1
  424. package/dist/skills/tools/tool-search-tool.d.ts.map +0 -1
  425. package/dist/skills/tools/tool-search-tool.js +0 -111
  426. package/dist/skills/tools/tool-search-tool.js.map +0 -1
  427. package/dist/skills/tools/tts-tool.d.ts.map +0 -1
  428. package/dist/skills/tools/tts-tool.js +0 -46
  429. package/dist/skills/tools/tts-tool.js.map +0 -1
  430. package/dist/skills/tools/video-edit-tool.d.ts.map +0 -1
  431. package/dist/skills/tools/video-edit-tool.js +0 -75
  432. package/dist/skills/tools/video-edit-tool.js.map +0 -1
  433. package/dist/skills/tools/video-generate-tool.d.ts.map +0 -1
  434. package/dist/skills/tools/video-generate-tool.js +0 -67
  435. package/dist/skills/tools/video-generate-tool.js.map +0 -1
  436. package/dist/skills/tools/video-merge-tool.d.ts.map +0 -1
  437. package/dist/skills/tools/video-merge-tool.js +0 -93
  438. package/dist/skills/tools/video-merge-tool.js.map +0 -1
  439. package/dist/skills/tools/video-upscale-tool.d.ts.map +0 -1
  440. package/dist/skills/tools/video-upscale-tool.js +0 -53
  441. package/dist/skills/tools/video-upscale-tool.js.map +0 -1
  442. package/dist/skills/tools/web-fetch-tool.d.ts.map +0 -1
  443. package/dist/skills/tools/web-fetch-tool.js +0 -93
  444. package/dist/skills/tools/web-fetch-tool.js.map +0 -1
  445. package/dist/skills/tools/web-search-tool.d.ts.map +0 -1
  446. package/dist/skills/tools/web-search-tool.js +0 -87
  447. package/dist/skills/tools/web-search-tool.js.map +0 -1
  448. package/dist/skills/tools/worktree-tool.d.ts.map +0 -1
  449. package/dist/skills/tools/worktree-tool.js +0 -148
  450. package/dist/skills/tools/worktree-tool.js.map +0 -1
  451. package/dist/skills/tools/write-tool.d.ts.map +0 -1
  452. package/dist/skills/tools/write-tool.js +0 -82
  453. package/dist/skills/tools/write-tool.js.map +0 -1
@@ -1,162 +0,0 @@
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
@@ -1 +0,0 @@
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,IAAI,EAAE,QAAiB;YACvB,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC;YACjD,WAAW,EACT,sBAAsB;gBACtB,+CAA+C;gBAC/C,6CAA6C;gBAC7C,8CAA8C;gBAC9C,gEAAgE;gBAChE,kCAAkC;SACrC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,wCAAwC;SACtD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAiB;YACvB,WAAW,EACT,4EAA4E;gBAC5E,0DAA0D;SAC7D;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,0EAA0E;SACxF;QACD,YAAY,EAAE;YACZ,IAAI,EA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Ac,CAAC,CAuE/E"}
@@ -1,106 +0,0 @@
1
- // ============================================================
2
- // Team Tool — create and manage multi-agent teams (Swarm).
3
- // Reference: claude-code-haha/src/tools/TeamCreateTool/TeamCreateTool.ts
4
- // claude-code-haha/src/tools/TeamDeleteTool/TeamDeleteTool.ts
5
- // Category: system
6
- // ============================================================
7
- export const TEAM_TOOL_NAME = "team";
8
- export const TEAM_TOOL_SCHEMA = {
9
- type: "object",
10
- properties: {
11
- action: {
12
- type: "string",
13
- enum: ["create", "delete", "list", "status"],
14
- description: "Team action: create (new team), delete (disband), list (all teams), status (team details).",
15
- },
16
- teamName: {
17
- type: "string",
18
- description: "Team name. Required for create/delete/status.",
19
- },
20
- description: {
21
- type: "string",
22
- description: "Team description/objective. Used for create.",
23
- },
24
- members: {
25
- type: "array",
26
- description: "Team members with roles and tool restrictions.",
27
- items: {
28
- type: "object",
29
- properties: {
30
- name: { type: "string", description: "Agent name/role identifier." },
31
- role: { type: "string", description: "Role description (e.g. 'frontend developer')." },
32
- tools: { type: "array", items: { type: "string" }, description: "Allowed tools for this member." },
33
- },
34
- required: ["name", "role"],
35
- },
36
- },
37
- },
38
- required: ["action"],
39
- };
40
- export function createTeamTool(deps) {
41
- return {
42
- name: TEAM_TOOL_NAME,
43
- label: "Team",
44
- description: "Manage multi-agent teams. Create teams of specialized agents that collaborate via send_message. " +
45
- "Each member has a role and optional tool restrictions. Use for complex tasks requiring parallel work.",
46
- parameters: TEAM_TOOL_SCHEMA,
47
- execute: async (_toolCallId, params) => {
48
- switch (params.action) {
49
- case "create": {
50
- if (!params.teamName) {
51
- return { content: [{ type: "text", text: "Error: teamName required for create." }], details: { type: "team", error: "missing_name" } };
52
- }
53
- const r = await deps.createTeam({ teamName: params.teamName, description: params.description, members: params.members });
54
- if (!r.success) {
55
- return { content: [{ type: "text", text: `Error: ${r.error}` }], details: { type: "team", error: r.error } };
56
- }
57
- const lines = [`Team "${r.team.name}" created.`, `Lead: ${r.team.leadId}`, `Members: ${r.team.members.length}`];
58
- for (const m of r.team.members) {
59
- lines.push(` - ${m.name} (${m.role})`);
60
- }
61
- return { content: [{ type: "text", text: lines.join("\n") }], details: { type: "team", action: "create", teamName: r.team.name } };
62
- }
63
- case "delete": {
64
- if (!params.teamName) {
65
- return { content: [{ type: "text", text: "Error: teamName required for delete." }], details: { type: "team", error: "missing_name" } };
66
- }
67
- const r = await deps.deleteTeam(params.teamName);
68
- if (!r.success) {
69
- return { content: [{ type: "text", text: `Error: ${r.error}` }], details: { type: "team", error: r.error } };
70
- }
71
- return { content: [{ type: "text", text: `Team "${params.teamName}" disbanded.` }], details: { type: "team", action: "delete", teamName: params.teamName } };
72
- }
73
- case "list": {
74
- const r = await deps.listTeams();
75
- if (!r.teams || r.teams.length === 0) {
76
- return { content: [{ type: "text", text: "No active teams." }], details: { type: "team", action: "list", count: 0 } };
77
- }
78
- const lines = [`Active teams (${r.teams.length}):`, ""];
79
- for (const t of r.teams) {
80
- lines.push(`- **${t.name}**: ${t.description || "(no description)"} — ${t.members.length} members`);
81
- }
82
- return { content: [{ type: "text", text: lines.join("\n") }], details: { type: "team", action: "list", count: r.teams.length } };
83
- }
84
- case "status": {
85
- if (!params.teamName) {
86
- return { content: [{ type: "text", text: "Error: teamName required for status." }], details: { type: "team", error: "missing_name" } };
87
- }
88
- const r = await deps.getTeamStatus(params.teamName);
89
- if (!r.success) {
90
- return { content: [{ type: "text", text: `Error: ${r.error}` }], details: { type: "team", error: r.error } };
91
- }
92
- const t = r.team;
93
- const lines = [`Team: ${t.name}`, `Description: ${t.description || "—"}`, `Lead: ${t.leadId}`, `Created: ${t.createdAt}`, "", `Members (${t.members.length}):`];
94
- for (const m of t.members) {
95
- const tools = m.tools ? ` [tools: ${m.tools.join(", ")}]` : "";
96
- lines.push(` - ${m.name} (${m.role})${tools}`);
97
- }
98
- return { content: [{ type: "text", text: lines.join("\n") }], details: { type: "team", action: "status", teamName: t.name } };
99
- }
100
- default:
101
- return { content: [{ type: "text", text: `Error: unknown action "${params.action}".` }], details: { type: "team", error: "unknown_action" } };
102
- }
103
- },
104
- };
105
- }
106
- //# sourceMappingURL=team-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"team-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/team-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,2DAA2D;AAC3D,yEAAyE;AACzE,yEAAyE;AACzE,mBAAmB;AACnB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAe,CAAC;AAoB9C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,QAAiB;YACvB,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;YAC5C,WAAW,EAAE,4FAA4F;SAC1G;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,+CAA+C;SAC7D;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,8CAA8C;SAC5D;QACD,OAAO,EAAE;YACP,IAAI,EAAE,OAAgB;YACtB,WAAW,EAAE,gDAAgD;YAC7D,KAAK,EAAE;gBACL,IAAI,EAAE,QAAiB;gBACvB,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,6BAA6B,EAAE;oBAC7E,IAAI,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,WAAW,EAAE,+CAA+C,EAAE;oBAC/F,KAAK,EAAE,EAAE,IAAI,EAAE,OAAgB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE;iBACrH;gBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAU;aACpC;SACF;KACF;IACD,QAAQ,EAAE,CAAC,QAAQ,CAAU;CAC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C,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAChC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7B;;;OAGG;IACH,YAAY,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/C;AAID,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,YAAY,CAAC,oBAAoB,CAAC,CA2DjG"}
@@ -1,111 +0,0 @@
1
- // ============================================================
2
- // Tool Search Tool — discover deferred/hidden tools by keyword.
3
- // Reference: claude-code-haha/src/tools/ToolSearchTool/ToolSearchTool.ts
4
- // Category: system
5
- // ============================================================
6
- export const TOOL_SEARCH_TOOL_NAME = "tool_search";
7
- export const TOOL_SEARCH_TOOL_SCHEMA = {
8
- type: "object",
9
- properties: {
10
- query: {
11
- type: "string",
12
- description: 'Search query for tools. Use "select:toolName" to directly activate a deferred tool, ' +
13
- "or provide keywords to search tool names/descriptions. " +
14
- 'Prefix a term with "+" to mark it as required (all +terms must match).',
15
- },
16
- maxResults: {
17
- type: "number",
18
- description: "Maximum number of results to return (default: 5).",
19
- },
20
- },
21
- required: ["query"],
22
- };
23
- const DEFAULT_MAX_RESULTS = 5;
24
- export function createToolSearchTool(deps) {
25
- return {
26
- name: TOOL_SEARCH_TOOL_NAME,
27
- label: "Tool Search",
28
- description: "Search for available tools that are not currently loaded. " +
29
- "Many tools are deferred to save context tokens. " +
30
- 'Use "select:toolName" to directly activate a tool, ' +
31
- "or provide keywords to find relevant tools. " +
32
- "Activated tools become available in subsequent messages.",
33
- parameters: TOOL_SEARCH_TOOL_SCHEMA,
34
- execute: async (_toolCallId, params) => {
35
- if (!params.query || params.query.trim().length === 0) {
36
- return {
37
- content: [{ type: "text", text: "Error: query is required." }],
38
- details: { type: "tool_search", error: "empty_query" },
39
- };
40
- }
41
- const query = params.query.trim();
42
- const maxResults = params.maxResults ?? DEFAULT_MAX_RESULTS;
43
- // Handle direct selection: "select:toolName" or "select:A,B,C"
44
- if (query.startsWith("select:")) {
45
- const names = query.slice(7).split(",").map((n) => n.trim()).filter(Boolean);
46
- const activated = [];
47
- const notFound = [];
48
- if (deps.activateTool) {
49
- for (const name of names) {
50
- const ok = await deps.activateTool(name);
51
- if (ok)
52
- activated.push(name);
53
- else
54
- notFound.push(name);
55
- }
56
- }
57
- else {
58
- // No activation support — just search
59
- const result = await deps.searchTools(query, { maxResults });
60
- return formatSearchResult(result);
61
- }
62
- const parts = [];
63
- if (activated.length > 0) {
64
- parts.push(`Activated: ${activated.join(", ")}. These tools are now available.`);
65
- }
66
- if (notFound.length > 0) {
67
- parts.push(`Not found: ${notFound.join(", ")}.`);
68
- }
69
- return {
70
- content: [{ type: "text", text: parts.join("\n") }],
71
- details: { type: "tool_search", activated, notFound, mode: "select" },
72
- };
73
- }
74
- // Keyword search
75
- const result = await deps.searchTools(query, { maxResults });
76
- return formatSearchResult(result);
77
- },
78
- };
79
- }
80
- function formatSearchResult(result) {
81
- if (result.matches.length === 0) {
82
- return {
83
- content: [{
84
- type: "text",
85
- text: `No tools found matching "${result.query}". ` +
86
- `Total deferred tools available: ${result.totalDeferred}.`,
87
- }],
88
- details: { type: "tool_search", query: result.query, matchCount: 0, totalDeferred: result.totalDeferred },
89
- };
90
- }
91
- const lines = [
92
- `Found ${result.matches.length} tool(s) matching "${result.query}" (${result.totalDeferred} total deferred):`,
93
- "",
94
- ];
95
- for (const tool of result.matches) {
96
- lines.push(`- **${tool.name}**: ${tool.description}`);
97
- }
98
- lines.push("");
99
- lines.push('Use "select:toolName" to activate a tool for use in subsequent messages.');
100
- return {
101
- content: [{ type: "text", text: lines.join("\n") }],
102
- details: {
103
- type: "tool_search",
104
- query: result.query,
105
- matchCount: result.matches.length,
106
- totalDeferred: result.totalDeferred,
107
- matches: result.matches.map((m) => m.name),
108
- },
109
- };
110
- }
111
- //# sourceMappingURL=tool-search-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-search-tool.js","sour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AC3B,IAAI,EAAE,WAAW,GAChB,YAAY,CAAC,aAAa,CAAC,CA4B7B"}
@@ -1,46 +0,0 @@
1
- // ============================================================
2
- // TTS Tool — text-to-speech via backend adapter.
3
- // Category: media
4
- // ============================================================
5
- export const TTS_TOOL_NAME = "tts";
6
- export const TTS_TOOL_SCHEMA = {
7
- type: "object",
8
- properties: {
9
- text: {
10
- type: "string",
11
- description: "Text to convert to speech.",
12
- },
13
- channel: {
14
- type: "string",
15
- description: "Optional channel id to pick output format (e.g. telegram).",
16
- },
17
- },
18
- required: ["text"],
19
- };
20
- export function createTtsTool(deps) {
21
- return {
22
- name: TTS_TOOL_NAME,
23
- label: "TTS",
24
- description: "Convert text to speech (TTS) — read text aloud as spoken audio. " +
25
- "Use for narration, voice messages, or any spoken-word output. " +
26
- "DO NOT use for music, songs, or melodies — use music_generate instead.",
27
- parameters: TTS_TOOL_SCHEMA,
28
- execute: async (_toolCallId, params) => {
29
- const result = await deps.textToSpeech({
30
- text: params.text,
31
- channel: params.channel,
32
- });
33
- return {
34
- content: [{ type: "text", text: "已成功生成语音。" }],
35
- details: {
36
- type: "tts",
37
- audioPath: result.audioPath,
38
- provider: result.provider,
39
- voiceCompatible: result.voiceCompatible,
40
- mediaUrls: result.mediaUrls,
41
- },
42
- };
43
- },
44
- };
45
- }
46
- //# sourceMappingURL=tts-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tts-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/tts-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,iDAAiD;AACjD,kBAAkB;AAClB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,aAAa,GAAG,KAAc,CAAC;AAO5C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,4BAA4B;SAC1C;QACD,OAAO,EAAE;YACP,IAAI,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AAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCzB,CAAC;AAEX,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC9B;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,iBAAiB,GACtB,YAAY,CAAC,mBAAmB,CAAC,CAqCnC"}
@@ -1,75 +0,0 @@
1
- // ============================================================
2
- // Video Edit Tool — edit existing videos via backend adapter.
3
- // Category: media
4
- // ============================================================
5
- export const VIDEO_EDIT_TOOL_NAME = "video_edit";
6
- export const VIDEO_EDIT_TOOL_SCHEMA = {
7
- type: "object",
8
- properties: {
9
- prompt: {
10
- type: "string",
11
- description: "Edit instruction. Reference videos as 视频1, 视频2, 视频3. " +
12
- "Reference images as 图片1, 图片2. " +
13
- "Operations: add/remove/modify elements, extend, track fill.",
14
- },
15
- source_videos: {
16
- type: "array",
17
- items: { type: "string" },
18
- minItems: 1,
19
- maxItems: 3,
20
- description: "Video(s) to edit (1-3 URLs). Order: [0]=视频1, [1]=视频2, [2]=视频3.",
21
- },
22
- reference_images: {
23
- type: "array",
24
- items: { type: "string" },
25
- description: "Optional reference images for element replacement (up to 9).",
26
- },
27
- duration: {
28
- type: "number",
29
- description: "Output duration in seconds (4-15s). Default: same as source.",
30
- },
31
- aspect_ratio: {
32
- type: "string",
33
- description: "Output aspect ratio: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9. Default: same as source.",
34
- },
35
- resolution: {
36
- type: "string",
37
- description: "Output resolution: '480p' or '720p'. Default: '720p'.",
38
- },
39
- },
40
- required: ["prompt", "source_videos"],
41
- };
42
- export function createVideoEditTool(deps) {
43
- return {
44
- name: VIDEO_EDIT_TOOL_NAME,
45
- label: "Video Edit",
46
- description: "Edit existing videos: add/remove/modify elements, extend, or bridge clips. " +
47
- "Requires source_videos. Max 3 source videos, max 720p. " +
48
- "For generating NEW videos from scratch, use video_generate instead.",
49
- parameters: VIDEO_EDIT_TOOL_SCHEMA,
50
- execute: async (_toolCallId, params) => {
51
- if (!params.source_videos?.length) {
52
- return { content: [{ type: "text", text: "Error: source_videos is required." }] };
53
- }
54
- const result = await deps.editVideo({
55
- prompt: params.prompt,
56
- sourceVideos: params.source_videos,
57
- referenceImages: params.reference_images,
58
- duration: params.duration,
59
- aspectRatio: params.aspect_ratio,
60
- resolution: params.resolution,
61
- });
62
- const text = `Video edited successfully${result.model ? ` (model: ${result.model})` : ""}`;
63
- return {
64
- content: [{ type: "text", text }],
65
- details: {
66
- type: "video_edit",
67
- model: result.model,
68
- durationMs: result.durationMs,
69
- mediaUrls: result.mediaUrls,
70
- },
71
- };
72
- },
73
- };
74
- }
75
- //# sourceMappingURL=video-edit-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"video-edit-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/video-edit-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,8DAA8D;AAC9D,kBAAkB;AAClB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAqB,CAAC;AAW1D,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,QAA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AE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,8DAA8D;AAC9D,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,aAAa,CAAC,MAAM,EAAE;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAClC;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,qBAAqB,GAC1B,YAAY,CAAC,uBAAuB,CAAC,CAkCvC"}
@@ -1,67 +0,0 @@
1
- // ============================================================
2
- // Video Generate Tool — generate video clips via backend.
3
- // Category: media
4
- // ============================================================
5
- export const VIDEO_GENERATE_TOOL_NAME = "video_generate";
6
- export const VIDEO_GENERATE_TOOL_SCHEMA = {
7
- type: "object",
8
- properties: {
9
- prompt: {
10
- type: "string",
11
- description: "Video generation prompt. MUST be in English. Include scene, movement, camera motion, lighting, style.",
12
- },
13
- purpose: {
14
- type: "string",
15
- description: "Intended use: 'social-media', 'short-video', 'presentation', etc.",
16
- },
17
- style: {
18
- type: "string",
19
- description: "Visual style: 'cinematic', 'anime', 'watercolor', etc.",
20
- },
21
- image_url: {
22
- type: "string",
23
- description: "Reference image for image-to-video. Preview image from storyboard Step 3, or user-uploaded image.",
24
- },
25
- aspect_ratio: {
26
- type: "string",
27
- description: "Video aspect ratio: '9:16' (vertical), '16:9' (horizontal), '1:1' (square). Default: '16:9'.",
28
- },
29
- duration: {
30
- type: "number",
31
- description: "Video duration in seconds (3-10s single-shot, >10s requires multi-shot workflow). Must be confirmed by user.",
32
- },
33
- },
34
- required: ["prompt"],
35
- };
36
- export function createVideoGenerateTool(deps) {
37
- return {
38
- name: VIDEO_GENERATE_TOOL_NAME,
39
- label: "Video Generate",
40
- description: "Generate a short video clip from a text prompt (and optional reference image). " +
41
- "Prompt MUST be in English. Include scene, movement, camera motion, lighting details. " +
42
- "Single-shot: 3–10s. For longer videos (>10s), use multi-shot storyboard workflow.",
43
- parameters: VIDEO_GENERATE_TOOL_SCHEMA,
44
- execute: async (_toolCallId, params) => {
45
- const result = await deps.generateVideo({
46
- prompt: params.prompt,
47
- purpose: params.purpose,
48
- style: params.style,
49
- imageUrl: params.image_url,
50
- aspectRatio: params.aspect_ratio,
51
- duration: params.duration,
52
- });
53
- const count = result.mediaUrls.length;
54
- const text = `Generated ${count} video${count > 1 ? "s" : ""}${result.model ? ` (model: ${result.model})` : ""}`;
55
- return {
56
- content: [{ type: "text", text }],
57
- details: {
58
- type: "video_generate",
59
- model: result.model,
60
- durationMs: result.durationMs,
61
- mediaUrls: result.mediaUrls,
62
- },
63
- };
64
- },
65
- };
66
- }
67
- //# sourceMappingURL=video-generate-tool.js.map