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,90 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const TEAM_TOOL_NAME: "team";
3
+ export type TeamAction = "create" | "delete" | "list" | "status";
4
+ export interface TeamMember {
5
+ name: string;
6
+ role: string;
7
+ tools?: string[];
8
+ }
9
+ export interface TeamToolParams {
10
+ action: TeamAction;
11
+ /** Team name (required for create/delete) */
12
+ teamName?: string;
13
+ /** Team description */
14
+ description?: string;
15
+ /** Members to include (for create) */
16
+ members?: TeamMember[];
17
+ }
18
+ export declare const TEAM_TOOL_SCHEMA: {
19
+ readonly type: "object";
20
+ readonly properties: {
21
+ readonly action: {
22
+ readonly type: "string";
23
+ readonly enum: readonly ["create", "delete", "list", "status"];
24
+ readonly description: "Team action: create (new team), delete (disband), list (all teams), status (team details).";
25
+ };
26
+ readonly teamName: {
27
+ readonly type: "string";
28
+ readonly description: "Team name. Required for create/delete/status.";
29
+ };
30
+ readonly description: {
31
+ readonly type: "string";
32
+ readonly description: "Team description/objective. Used for create.";
33
+ };
34
+ readonly members: {
35
+ readonly type: "array";
36
+ readonly description: "Team members with roles and tool restrictions.";
37
+ readonly items: {
38
+ readonly type: "object";
39
+ readonly properties: {
40
+ readonly name: {
41
+ readonly type: "string";
42
+ readonly description: "Agent name/role identifier.";
43
+ };
44
+ readonly role: {
45
+ readonly type: "string";
46
+ readonly description: "Role description (e.g. 'frontend developer').";
47
+ };
48
+ readonly tools: {
49
+ readonly type: "array";
50
+ readonly items: {
51
+ readonly type: "string";
52
+ };
53
+ readonly description: "Allowed tools for this member.";
54
+ };
55
+ };
56
+ readonly required: readonly ["name", "role"];
57
+ };
58
+ };
59
+ };
60
+ readonly required: readonly ["action"];
61
+ };
62
+ export interface Team {
63
+ name: string;
64
+ description?: string;
65
+ leadId: string;
66
+ members: TeamMember[];
67
+ createdAt: string;
68
+ }
69
+ export interface TeamResult {
70
+ success: boolean;
71
+ team?: Team;
72
+ teams?: Team[];
73
+ error?: string;
74
+ }
75
+ /**
76
+ * Host-provided team management backend.
77
+ * Creates agent teams where members coordinate via send_message.
78
+ */
79
+ export interface TeamToolDeps {
80
+ createTeam(params: {
81
+ teamName: string;
82
+ description?: string;
83
+ members?: TeamMember[];
84
+ }): Promise<TeamResult>;
85
+ deleteTeam(teamName: string): Promise<TeamResult>;
86
+ listTeams(): Promise<TeamResult>;
87
+ getTeamStatus(teamName: string): Promise<TeamResult>;
88
+ }
89
+ export declare function createTeamTool(deps: TeamToolDeps): PortableTool<TeamToolParams>;
90
+ //# sourceMappingURL=team-tool.d.ts.map
@@ -0,0 +1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,UAAU,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5G,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAClD,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IACjC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CAuE/E"}
@@ -0,0 +1,106 @@
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
@@ -0,0 +1 @@
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;Y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SAAS,EAAE,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;oBAChK,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;wBAC1B,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;wBAC/D,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC;oBAClD,CAAC;oBACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBAChI,CAAC;gBAED;oBACE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAC;YAClJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const TOOL_SEARCH_TOOL_NAME: "tool_search";
3
+ export interface ToolSearchToolParams {
4
+ query: string;
5
+ maxResults?: number;
6
+ }
7
+ export declare const TOOL_SEARCH_TOOL_SCHEMA: {
8
+ readonly type: "object";
9
+ readonly properties: {
10
+ readonly query: {
11
+ readonly type: "string";
12
+ readonly description: string;
13
+ };
14
+ readonly maxResults: {
15
+ readonly type: "number";
16
+ readonly description: "Maximum number of results to return (default: 5).";
17
+ };
18
+ };
19
+ readonly required: readonly ["query"];
20
+ };
21
+ export interface DeferredToolInfo {
22
+ name: string;
23
+ description: string;
24
+ /** Optional search hint for better discovery */
25
+ searchHint?: string;
26
+ }
27
+ export interface ToolSearchOutput {
28
+ matches: DeferredToolInfo[];
29
+ query: string;
30
+ totalDeferred: number;
31
+ }
32
+ /**
33
+ * Host-provided deferred tool registry.
34
+ * The host manages which tools are loaded vs deferred,
35
+ * and handles activation when selected.
36
+ */
37
+ export interface ToolSearchToolDeps {
38
+ /**
39
+ * Search deferred tools by query.
40
+ * Supports "select:name" for direct activation and keyword search.
41
+ */
42
+ searchTools(query: string, options?: {
43
+ maxResults?: number;
44
+ }): Promise<ToolSearchOutput>;
45
+ /**
46
+ * Activate a deferred tool so it appears in subsequent turns.
47
+ * Returns true if activation succeeded.
48
+ */
49
+ activateTool?(name: string): Promise<boolean>;
50
+ }
51
+ export declare function createToolSearchTool(deps: ToolSearchToolDeps): PortableTool<ToolSearchToolParams>;
52
+ //# sourceMappingURL=tool-search-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-search-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/tool-search-tool.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,qBAAqB,EAAG,aAAsB,CAAC;AAE5D,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;CAgB1B,CAAC;AAEX,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,WAAW,CACT,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,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"}
@@ -0,0 +1,111 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-search-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/tool-search-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gEAAgE;AAChE,yEAAyE;AACzE,mBAAmB;AACnB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAsB,CAAC;AAO5D,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAiB;YACvB,WAAW,EACT,sFAAsF;gBACtF,yDAAyD;gBACzD,wEAAwE;SAC3E;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,mDAAmD;SACjE;KACF;IACD,QAAQ,EAAE,CAAC,OAAO,CAAU;CACpB,CAAC;AAqCX,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,MAAM,UAAU,oBAAoB,CAAC,IAAwB;IAC3D,OAAO;QACL,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,aAAa;QACpB,WAAW,EACT,4DAA4D;YAC5D,kDAAkD;YAClD,qDAAqD;YACrD,8CAA8C;YAC9C,0DAA0D;QAC5D,UAAU,EAAE,uBAAuB;QAEnC,OAAO,EAAE,KAAK,EAAE,WAAmB,EAAE,MAA4B,EAA+B,EAAE;YAChG,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,IAA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C;IAED,MAAM,KAAK,GAAa;QACtB,SAAS,MAAM,CAAC,OAAO,CAAC,MAAM,sBAAsB,MAAM,CAAC,KAAK,MAAM,MAAM,CAAC,aAAa,mBAAmB;QAC7G,EAAE;KACH,CAAC;IAEF,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QAClC,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,0EAA0E,CAAC,CAAC;IAEvF,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,OAAO,EAAE;YACP,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM;YACjC,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAC3C;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const TTS_TOOL_NAME: "tts";
3
+ export interface TtsToolParams {
4
+ text: string;
5
+ channel?: string;
6
+ }
7
+ export declare const TTS_TOOL_SCHEMA: {
8
+ readonly type: "object";
9
+ readonly properties: {
10
+ readonly text: {
11
+ readonly type: "string";
12
+ readonly description: "Text to convert to speech.";
13
+ };
14
+ readonly channel: {
15
+ readonly type: "string";
16
+ readonly description: "Optional channel id to pick output format (e.g. telegram).";
17
+ };
18
+ };
19
+ readonly required: readonly ["text"];
20
+ };
21
+ export interface TtsResult {
22
+ audioPath: string;
23
+ provider?: string;
24
+ voiceCompatible?: boolean;
25
+ mediaUrls: string[];
26
+ }
27
+ /** Deps injected by the host runtime for TTS. */
28
+ export interface TtsToolDeps {
29
+ /**
30
+ * Convert text to speech via the configured backend.
31
+ * The host handles voice selection, format conversion, and storage.
32
+ */
33
+ textToSpeech(params: {
34
+ text: string;
35
+ channel?: string;
36
+ }): Promise<TtsResult>;
37
+ }
38
+ export declare function createTtsTool(deps: TtsToolDeps): PortableTool<TtsToolParams>;
39
+ //# sourceMappingURL=tts-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tts-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/tts-tool.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,aAAa,EAAG,KAAc,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAalB,CAAC;AAEX,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACxB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,WAAW,GAChB,YAAY,CAAC,aAAa,CAAC,CA4B7B"}
@@ -0,0 +1,46 @@
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
@@ -0,0 +1 @@
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,EAAE,QAAiB;YACvB,WAAW,EAAE,4DAA4D;SAC1E;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,CAAU;CACnB,CAAC;AAqBX,MAAM,UAAU,aAAa,CAC3B,IAAiB;IAEjB,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,KAAK;QACZ,WAAW,EACT,kEAAkE;YAClE,gEAAgE;YAChE,wEAAwE;QAC1E,UAAU,EAAE,eAAe;QAE3B,OAAO,EAAE,KAAK,EAAE,WAAmB,EAAE,MAAqB,EAA+B,EAAE;YACzF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC;gBACrC,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;gBAC7C,OAAO,EAAE;oBACP,IAAI,EAAE,KAAK;oBACX,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,eAAe,EAAE,MAAM,CAAC,eAAe;oBACvC,SAAS,EAAE,MAAM,CAAC,SAAS;iBAC5B;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,70 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const VIDEO_EDIT_TOOL_NAME: "video_edit";
3
+ export interface VideoEditToolParams {
4
+ prompt: string;
5
+ source_videos: string[];
6
+ reference_images?: string[];
7
+ duration?: number;
8
+ aspect_ratio?: string;
9
+ resolution?: string;
10
+ }
11
+ export declare const VIDEO_EDIT_TOOL_SCHEMA: {
12
+ readonly type: "object";
13
+ readonly properties: {
14
+ readonly prompt: {
15
+ readonly type: "string";
16
+ readonly description: string;
17
+ };
18
+ readonly source_videos: {
19
+ readonly type: "array";
20
+ readonly items: {
21
+ readonly type: "string";
22
+ };
23
+ readonly minItems: 1;
24
+ readonly maxItems: 3;
25
+ readonly description: "Video(s) to edit (1-3 URLs). Order: [0]=视频1, [1]=视频2, [2]=视频3.";
26
+ };
27
+ readonly reference_images: {
28
+ readonly type: "array";
29
+ readonly items: {
30
+ readonly type: "string";
31
+ };
32
+ readonly description: "Optional reference images for element replacement (up to 9).";
33
+ };
34
+ readonly duration: {
35
+ readonly type: "number";
36
+ readonly description: "Output duration in seconds (4-15s). Default: same as source.";
37
+ };
38
+ readonly aspect_ratio: {
39
+ readonly type: "string";
40
+ readonly description: "Output aspect ratio: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9. Default: same as source.";
41
+ };
42
+ readonly resolution: {
43
+ readonly type: "string";
44
+ readonly description: "Output resolution: '480p' or '720p'. Default: '720p'.";
45
+ };
46
+ };
47
+ readonly required: readonly ["prompt", "source_videos"];
48
+ };
49
+ export interface VideoEditResult {
50
+ mediaUrls: string[];
51
+ model?: string;
52
+ durationMs?: number;
53
+ }
54
+ /** Deps injected by the host runtime for video editing. */
55
+ export interface VideoEditToolDeps {
56
+ /**
57
+ * Edit a video via the configured backend (Seedance 2.0, etc.).
58
+ * The host handles URL resolution, model routing, and storage.
59
+ */
60
+ editVideo(params: {
61
+ prompt: string;
62
+ sourceVideos: string[];
63
+ referenceImages?: string[];
64
+ duration?: number;
65
+ aspectRatio?: string;
66
+ resolution?: string;
67
+ }): Promise<VideoEditResult>;
68
+ }
69
+ export declare function createVideoEditTool(deps: VideoEditToolDeps): PortableTool<VideoEditToolParams>;
70
+ //# sourceMappingURL=video-edit-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-edit-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/video-edit-tool.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,oBAAoB,EAAG,YAAqB,CAAC;AAE1D,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,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"}
@@ -0,0 +1,75 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-edit-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/video-edit-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,8D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