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 +0,0 @@
1
- {"version":3,"file":"video-generate-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/video-generate-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,0DAA0D;AAC1D,kBAAkB;AAClB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAyB,CAAC;AAWlE,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,QAAiB;YACvB,WAAW,EACT,uGAAuG;SAC1G;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,mEAAmE;SACjF;QACD,KAAK,EAAE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CACrB;AAED,2DAA2D;AAC3D,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,cAAc,EAAE,CAAC;QACxB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC/B;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,kBAAkB,GACvB,YAAY,CAAC,oBAAoB,CAAC,CA2CpC"}
@@ -1,93 +0,0 @@
1
- // ============================================================
2
- // Video Merge Tool — merge multiple video clips with transitions.
3
- // Category: media
4
- // ============================================================
5
- export const VIDEO_MERGE_TOOL_NAME = "video_merge";
6
- export const VIDEO_MERGE_TOOL_SCHEMA = {
7
- type: "object",
8
- properties: {
9
- clips: {
10
- type: "array",
11
- items: {
12
- type: "object",
13
- properties: {
14
- video: { type: "string", description: "Video file path." },
15
- audio: { type: "string", description: "Narration audio file path (from TTS)." },
16
- trimStart: { type: "number", description: "Trim start in seconds (default 0)." },
17
- trimEnd: { type: "number", description: "Trim end in seconds (default: full)." },
18
- },
19
- required: ["video"],
20
- },
21
- minItems: 2,
22
- description: "Array of video clips to merge, in order.",
23
- },
24
- transition: {
25
- type: "string",
26
- description: "Transition effect: 'crossfade' (default), 'fade', 'wipeleft', 'cut', 'dissolve', etc.",
27
- },
28
- transitionDuration: {
29
- type: "number",
30
- description: "Transition duration in seconds (0.1-2.0, default 0.5).",
31
- },
32
- subtitles: {
33
- type: "string",
34
- description: "Path to SRT subtitle file to burn-in.",
35
- },
36
- bgm: {
37
- type: "string",
38
- description: "Background music file path.",
39
- },
40
- bgmVolume: {
41
- type: "number",
42
- description: "BGM volume (0.0-1.0, default 0.15).",
43
- },
44
- outputResolution: {
45
- type: "string",
46
- description: "Output resolution: '1920x1080', '1080x1920', etc. Default: auto.",
47
- },
48
- outputFps: {
49
- type: "number",
50
- description: "Output FPS (default 30).",
51
- },
52
- },
53
- required: ["clips"],
54
- };
55
- export function createVideoMergeTool(deps) {
56
- return {
57
- name: VIDEO_MERGE_TOOL_NAME,
58
- label: "Video Merge",
59
- description: "Merge multiple video clips into a single video with transitions, subtitles, and background music. " +
60
- "Requires at least 2 clips. Supports crossfade, fade, wipe, dissolve, and cut transitions. " +
61
- "Audio per clip is preserved; BGM is mixed at adjustable volume.",
62
- parameters: VIDEO_MERGE_TOOL_SCHEMA,
63
- execute: async (_toolCallId, params) => {
64
- if (!params.clips || params.clips.length < 2) {
65
- return { content: [{ type: "text", text: "Error: at least 2 clips are required for merging." }] };
66
- }
67
- const result = await deps.mergeVideos({
68
- clips: params.clips,
69
- transition: params.transition,
70
- transitionDuration: params.transitionDuration,
71
- subtitles: params.subtitles,
72
- bgm: params.bgm,
73
- bgmVolume: params.bgmVolume,
74
- outputResolution: params.outputResolution,
75
- outputFps: params.outputFps,
76
- });
77
- const text = `Merged ${result.clipCount} clips → ${result.durationSec.toFixed(1)}s video` +
78
- (params.transition ? ` (transition: ${params.transition})` : "");
79
- return {
80
- content: [{ type: "text", text }],
81
- details: {
82
- type: "video_merge",
83
- localPath: result.localPath,
84
- servePath: result.servePath,
85
- durationSec: result.durationSec,
86
- clipCount: result.clipCount,
87
- mediaUrls: result.mediaUrls,
88
- },
89
- };
90
- },
91
- };
92
- }
93
- //# sourceMappingURL=video-merge-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"video-merge-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/video-merge-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,kEAAkE;AAClE,kBAAkB;AAClB,+DAA+D;AAI/D,MAAM,CAAC,M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B,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;iBAC5B;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"video-upscale-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/video-upscale-tool.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,uBAAuB,EAAG,eAAwB,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;CAiB5B,CAAC;AAEX,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,6DAA6D;AAC7D,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACjC;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,GACzB,YAAY,CAAC,sBAAsB,CAAC,CAgCtC"}
@@ -1,53 +0,0 @@
1
- // ============================================================
2
- // Video Upscale Tool — upscale video resolution + sharpen.
3
- // Category: media
4
- // ============================================================
5
- export const VIDEO_UPSCALE_TOOL_NAME = "video_upscale";
6
- export const VIDEO_UPSCALE_TOOL_SCHEMA = {
7
- type: "object",
8
- properties: {
9
- video: {
10
- type: "string",
11
- description: "Video file path (local or serve path).",
12
- },
13
- targetResolution: {
14
- type: "string",
15
- description: "Target resolution: '1080p' (default, 1920x1080/1080x1920), '2k' (2560x1440/1440x2560).",
16
- },
17
- sharpness: {
18
- type: "string",
19
- description: "Sharpening intensity: 'light' (default), 'medium', 'strong'.",
20
- },
21
- },
22
- required: ["video"],
23
- };
24
- export function createVideoUpscaleTool(deps) {
25
- return {
26
- name: VIDEO_UPSCALE_TOOL_NAME,
27
- label: "Video Upscale",
28
- description: "Upscale a video to higher resolution with optional sharpening. " +
29
- "Auto-detects orientation (landscape/portrait). Uses Lanczos interpolation + unsharp mask. " +
30
- "Supports 1080p and 2K targets. Best used as post-processing after video_merge.",
31
- parameters: VIDEO_UPSCALE_TOOL_SCHEMA,
32
- execute: async (_toolCallId, params) => {
33
- const result = await deps.upscaleVideo({
34
- video: params.video,
35
- targetResolution: params.targetResolution,
36
- sharpness: params.sharpness,
37
- });
38
- const text = `Upscaled to ${result.resolution}${params.sharpness ? ` (sharpness: ${params.sharpness})` : ""}`;
39
- return {
40
- content: [{ type: "text", text }],
41
- details: {
42
- type: "video_upscale",
43
- localPath: result.localPath,
44
- servePath: result.servePath,
45
- resolution: result.resolution,
46
- durationSec: result.durationSec,
47
- mediaUrls: result.mediaUrls,
48
- },
49
- };
50
- },
51
- };
52
- }
53
- //# sourceMappingURL=video-upscale-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"video-upscale-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/video-upscale-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,2DAA2D;AAC3D,kBAAkB;AAClB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAwB,CAAC;AAQhE,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EA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AC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAE5B;;;;OAIG;IACH,gBAAgB,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACrE;AAID,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,gBAAgB,GACrB,YAAY,CAAC,kBAAkB,CAAC,CAyDlC"}
@@ -1,93 +0,0 @@
1
- // ============================================================
2
- // Web Fetch Tool — fetch and extract web page content.
3
- // Category: web
4
- // ============================================================
5
- export const WEB_FETCH_TOOL_NAME = "web_fetch";
6
- export const WEB_FETCH_TOOL_SCHEMA = {
7
- type: "object",
8
- properties: {
9
- url: {
10
- type: "string",
11
- description: "HTTP or HTTPS URL to fetch.",
12
- },
13
- extractMode: {
14
- type: "string",
15
- enum: ["markdown", "text", "json"],
16
- description: 'Extraction mode: "markdown" (default), "text", or "json" (LLM-driven structured extraction).',
17
- },
18
- maxChars: {
19
- type: "number",
20
- description: "Maximum characters to return (truncates when exceeded).",
21
- minimum: 100,
22
- },
23
- query: {
24
- type: "string",
25
- description: "Original search query. When provided, returns the most query-relevant sections.",
26
- },
27
- extract: {
28
- type: "boolean",
29
- description: "When true, returns structured extraction (title, summary, key facts, entities, topics, sentiment).",
30
- },
31
- summarize: {
32
- type: "boolean",
33
- description: "When true, returns a concise summary (< 500 chars) of the page content. " +
34
- "Useful for long pages to reduce context usage while preserving key information.",
35
- },
36
- },
37
- required: ["url"],
38
- };
39
- const DEFAULT_MAX_CHARS = 50000;
40
- export function createWebFetchTool(deps) {
41
- return {
42
- name: WEB_FETCH_TOOL_NAME,
43
- label: "Web Fetch",
44
- description: "Fetch content from a URL and extract it as markdown, text, or structured JSON. " +
45
- "Supports query-based relevance filtering and structured extraction " +
46
- "(title, summary, key facts, entities, topics, sentiment).",
47
- parameters: WEB_FETCH_TOOL_SCHEMA,
48
- execute: async (_toolCallId, params) => {
49
- const result = await deps.fetchUrl({
50
- url: params.url,
51
- extractMode: params.extractMode,
52
- maxChars: params.maxChars ?? DEFAULT_MAX_CHARS,
53
- query: params.query,
54
- extract: params.extract,
55
- });
56
- // Summarization: if requested and content is long enough to warrant it
57
- if (params.summarize && deps.summarizeContent && result.content.length > 1000) {
58
- const summary = await deps.summarizeContent(result.content, params.query);
59
- return {
60
- content: [{ type: "text", text: result.title ? `# ${result.title}\n\n${summary}` : summary }],
61
- details: {
62
- type: "web_fetch",
63
- url: params.url,
64
- summarized: true,
65
- originalLength: result.content.length,
66
- summaryLength: summary.length,
67
- },
68
- };
69
- }
70
- const parts = [];
71
- if (result.title)
72
- parts.push(`# ${result.title}\n`);
73
- parts.push(result.content);
74
- if (result.relevantExcerpts?.length) {
75
- parts.push("\n---\n## Relevant Excerpts\n");
76
- for (const excerpt of result.relevantExcerpts) {
77
- parts.push(`- ${excerpt}`);
78
- }
79
- }
80
- return {
81
- content: [{ type: "text", text: parts.join("\n") }],
82
- details: {
83
- type: "web_fetch",
84
- url: params.url,
85
- extractMode: params.extractMode ?? "markdown",
86
- hasExtraction: !!result.extraction,
87
- extraction: result.extraction,
88
- },
89
- };
90
- },
91
- };
92
- }
93
- //# sourceMappingURL=web-fetch-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-fetch-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/web-fetch-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,uDAAuD;AACvD,gBAAgB;AAChB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAoB,CAAC;AAWxD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,GAAG,EAAE;YACH,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,6BAA6B;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,IAAI,UAAU;oBAC7C,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU;oBAClC,UAAU,EAAE,MAAM,CAAC,UAAU;iBAC9B;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-search-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/web-search-tool.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,oBAAoB,EAAG,YAAqB,CAAC;AAE1D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;CAsBzB,CAAC;AAEX,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,MAAM,CACJ,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GACA,OAAO,CAAC,eAAe,CAAC,CAAC;CAC7B;AAID,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAgE9F"}
@@ -1,87 +0,0 @@
1
- // ============================================================
2
- // Web Search Tool — search the web for information.
3
- // Reference: claude-code-haha/src/tools/WebSearchTool/WebSearchTool.ts
4
- // hermes-agent-2026.4.30/tools/web_tools.py
5
- // Category: web
6
- // ============================================================
7
- export const WEB_SEARCH_TOOL_NAME = "web_search";
8
- export const WEB_SEARCH_TOOL_SCHEMA = {
9
- type: "object",
10
- properties: {
11
- query: {
12
- type: "string",
13
- description: "Search query string. Be specific and concise for best results.",
14
- },
15
- allowedDomains: {
16
- type: "array",
17
- items: { type: "string" },
18
- description: "Only include results from these domains (e.g. ['docs.python.org', 'stackoverflow.com']). " +
19
- "Cannot be used together with blockedDomains.",
20
- },
21
- blockedDomains: {
22
- type: "array",
23
- items: { type: "string" },
24
- description: "Exclude results from these domains. Cannot be used together with allowedDomains.",
25
- },
26
- },
27
- required: ["query"],
28
- };
29
- const MAX_RESULTS = 10;
30
- export function createWebSearchTool(deps) {
31
- return {
32
- name: WEB_SEARCH_TOOL_NAME,
33
- label: "Web Search",
34
- description: "Search the web for current information. Returns top results with title, URL, and snippet. " +
35
- "Use this when you need up-to-date information that may not be in your training data. " +
36
- "You MUST include source URLs as markdown links when citing search results.",
37
- parameters: WEB_SEARCH_TOOL_SCHEMA,
38
- execute: async (_toolCallId, params) => {
39
- // Validate mutual exclusivity
40
- if (params.allowedDomains?.length && params.blockedDomains?.length) {
41
- return {
42
- content: [{ type: "text", text: "Error: allowedDomains and blockedDomains cannot both be specified." }],
43
- details: { type: "web_search", error: "mutual_exclusion" },
44
- };
45
- }
46
- // Validate query
47
- if (!params.query || params.query.trim().length < 2) {
48
- return {
49
- content: [{ type: "text", text: "Error: query must be at least 2 characters." }],
50
- details: { type: "web_search", error: "invalid_query" },
51
- };
52
- }
53
- const output = await deps.search(params.query.trim(), {
54
- allowedDomains: params.allowedDomains,
55
- blockedDomains: params.blockedDomains,
56
- maxResults: MAX_RESULTS,
57
- });
58
- if (output.results.length === 0) {
59
- return {
60
- content: [{ type: "text", text: `No results found for: "${params.query}"` }],
61
- details: { type: "web_search", query: params.query, resultCount: 0 },
62
- };
63
- }
64
- const lines = [
65
- `Web search results for: "${output.query}"`,
66
- "",
67
- "REMINDER: You MUST include source URLs as markdown links when referencing these results.",
68
- "",
69
- ];
70
- for (let i = 0; i < output.results.length; i++) {
71
- const r = output.results[i];
72
- lines.push(`${i + 1}. [${r.title}](${r.url})`);
73
- lines.push(` ${r.snippet}`);
74
- lines.push("");
75
- }
76
- return {
77
- content: [{ type: "text", text: lines.join("\n") }],
78
- details: {
79
- type: "web_search",
80
- query: output.query,
81
- resultCount: output.results.length,
82
- },
83
- };
84
- },
85
- };
86
- }
87
- //# sourceMappingURL=web-search-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-search-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/web-search-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oDAAoD;AACpD,uEAAuE;AACvE,uDAAuD;AACvD,gBAAgB;AAChB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAqB,CAAC;AAQ1D,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,gEAAgE;SAC9E;QACD,cAAc,EAAE;YACd,IAAI,EAAE,OAAgB;YACtB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE;YAClC,WAAW,EACT,2FAA2F;gBAC3F,8CAA8C;SACjD;QACD,cAAc,EAAE;YACd,IAAI,EAAE,OAAgB;YACtB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE;YAClC,WAAW,EACT,kFAAkF;SACrF;KACF;IACD,QAAQ,EAAE,CAAC,OAAO,CAAU;CACpB,CAAC;AAiCX,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,MAAM,UAAU,mBAAmB,CAAC,IAAuB;IACzD,OAAO;QACL,IAAI,EAAE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AC,IAAI,EAAE,gBAAgB,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAuH3F"}
@@ -1,148 +0,0 @@
1
- // ============================================================
2
- // Worktree Tool — git worktree isolation for parallel development.
3
- // Reference: claude-code-haha/src/tools/EnterWorktreeTool/EnterWorktreeTool.ts
4
- // claude-code-haha/src/tools/ExitWorktreeTool/ExitWorktreeTool.ts
5
- // Category: system (git)
6
- // Dependency: #13 AgentTool
7
- // ============================================================
8
- export const WORKTREE_TOOL_NAME = "worktree";
9
- export const WORKTREE_TOOL_SCHEMA = {
10
- type: "object",
11
- properties: {
12
- action: {
13
- type: "string",
14
- enum: ["enter", "exit", "list"],
15
- description: "enter: Create and switch to an isolated git worktree branch.\n" +
16
- "exit: Leave worktree (keep or remove it).\n" +
17
- "list: Show all active worktrees.",
18
- },
19
- name: {
20
- type: "string",
21
- description: "Worktree/branch name (for enter). Must be kebab-case, max 64 characters. " +
22
- "If omitted, auto-generated from task context.",
23
- },
24
- exitAction: {
25
- type: "string",
26
- enum: ["keep", "remove"],
27
- description: "For exit: 'keep' retains the worktree for later use; 'remove' deletes it.",
28
- },
29
- discardChanges: {
30
- type: "boolean",
31
- description: "Required true to confirm discarding uncommitted changes when exitAction='remove'. " +
32
- "Safety mechanism to prevent data loss.",
33
- },
34
- },
35
- required: ["action"],
36
- };
37
- const NAME_PATTERN = /^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]?$/;
38
- export function createWorktreeTool(deps) {
39
- return {
40
- name: WORKTREE_TOOL_NAME,
41
- label: "Git Worktree",
42
- description: "Create isolated git worktree branches for parallel development. " +
43
- "Each worktree has its own working directory independent of the main branch. " +
44
- "Use for: parallel features, safe experimentation, sub-agent isolation. " +
45
- "Exit to keep or remove the worktree when done.",
46
- parameters: WORKTREE_TOOL_SCHEMA,
47
- execute: async (_toolCallId, params) => {
48
- switch (params.action) {
49
- case "enter": {
50
- if (deps.isInWorktree()) {
51
- return {
52
- content: [{ type: "text", text: "Error: already in a worktree. Exit first before entering another." }],
53
- details: { type: "worktree", error: "already_in_worktree" },
54
- };
55
- }
56
- if (params.name && !NAME_PATTERN.test(params.name)) {
57
- return {
58
- content: [{ type: "text", text: "Error: name must be kebab-case (a-z, 0-9, hyphens), 2-64 characters." }],
59
- details: { type: "worktree", error: "invalid_name" },
60
- };
61
- }
62
- const result = await deps.enterWorktree(params.name);
63
- if (!result.success) {
64
- return {
65
- content: [{ type: "text", text: `Error: ${result.error || "failed to create worktree"}` }],
66
- details: { type: "worktree", error: result.error },
67
- };
68
- }
69
- const wt = result.worktree;
70
- const lines = [
71
- `Entered worktree: ${wt.name}`,
72
- ` Branch: ${wt.branch}`,
73
- ` Path: ${wt.path}`,
74
- "",
75
- "Working in isolated branch. Changes here do not affect the main branch.",
76
- "Use action='exit' when done (keep or remove).",
77
- ];
78
- return {
79
- content: [{ type: "text", text: lines.join("\n") }],
80
- details: { type: "worktree", action: "enter", name: wt.name, branch: wt.branch, path: wt.path },
81
- };
82
- }
83
- case "exit": {
84
- if (!deps.isInWorktree()) {
85
- return {
86
- content: [{ type: "text", text: "Error: not in a worktree." }],
87
- details: { type: "worktree", error: "not_in_worktree" },
88
- };
89
- }
90
- const exitAction = params.exitAction || "keep";
91
- // Safety: require explicit discard confirmation for remove with changes
92
- if (exitAction === "remove") {
93
- const current = deps.currentWorktree?.();
94
- if (current && (current.hasChanges || current.unpushedCommits > 0) && !params.discardChanges) {
95
- const warnings = [];
96
- if (current.hasChanges)
97
- warnings.push("uncommitted changes");
98
- if (current.unpushedCommits > 0)
99
- warnings.push(`${current.unpushedCommits} unpushed commit(s)`);
100
- return {
101
- content: [{ type: "text", text: `Error: worktree has ${warnings.join(" and ")}. Set discardChanges=true to confirm removal, or use exitAction='keep'.` }],
102
- details: { type: "worktree", error: "has_changes", hasChanges: current.hasChanges, unpushedCommits: current.unpushedCommits },
103
- };
104
- }
105
- }
106
- const result = await deps.exitWorktree(exitAction, params.discardChanges);
107
- if (!result.success) {
108
- return {
109
- content: [{ type: "text", text: `Error: ${result.error || "failed to exit worktree"}` }],
110
- details: { type: "worktree", error: result.error },
111
- };
112
- }
113
- const action = exitAction === "keep" ? "Worktree kept for later use." : "Worktree removed.";
114
- return {
115
- content: [{ type: "text", text: `Exited worktree. ${action}\nRestored to: ${result.previousCwd || "main workspace"}` }],
116
- details: { type: "worktree", action: "exit", exitAction, previousCwd: result.previousCwd },
117
- };
118
- }
119
- case "list": {
120
- const result = await deps.listWorktrees();
121
- if (!result.worktrees || result.worktrees.length === 0) {
122
- return {
123
- content: [{ type: "text", text: "No worktrees (only the main working tree)." }],
124
- details: { type: "worktree", action: "list", count: 0 },
125
- };
126
- }
127
- const lines = [`Worktrees (${result.worktrees.length}):`, ""];
128
- for (const wt of result.worktrees) {
129
- const current = wt.isCurrent ? " ← current" : "";
130
- const status = wt.hasChanges ? " (has changes)" : "";
131
- lines.push(` ${wt.name} [${wt.branch}]${current}${status}`);
132
- lines.push(` path: ${wt.path}`);
133
- }
134
- return {
135
- content: [{ type: "text", text: lines.join("\n") }],
136
- details: { type: "worktree", action: "list", count: result.worktrees.length },
137
- };
138
- }
139
- default:
140
- return {
141
- content: [{ type: "text", text: `Error: unknown action "${params.action}".` }],
142
- details: { type: "worktree", error: "unknown_action" },
143
- };
144
- }
145
- },
146
- };
147
- }
148
- //# sourceMappingURL=worktree-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worktree-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/worktree-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,mEAAmE;AACnE,+EAA+E;AAC/E,6EAA6E;AAC7E,yBAAyB;AACzB,4BAA4B;AAC5B,+DAA+D;AAI/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAmB,CAAC;AAetD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,QAAiB;YACvB,IAAI,EAAE,CAAC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AC;CACjB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAapB,CAAC;AAEX,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,2CAA2C;IAC3C,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC;;;;OAIG;IACH,oBAAoB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACnD;;;OAGG;IACH,YAAY,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC3C;;;;OAIG;IACH,2BAA2B,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC3D;AAID,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC,eAAe,CAAC,CAmElF"}
@@ -1,82 +0,0 @@
1
- // ============================================================
2
- // File Write Tool — create/overwrite files.
3
- // Reference: claude-code-haha/src/tools/FileWriteTool/FileWriteTool.ts
4
- // Category: coding
5
- // ============================================================
6
- export const WRITE_TOOL_NAME = "write";
7
- export const WRITE_TOOL_SCHEMA = {
8
- type: "object",
9
- properties: {
10
- path: {
11
- type: "string",
12
- description: "Absolute path to the file to write.",
13
- },
14
- content: {
15
- type: "string",
16
- description: "Content to write to the file.",
17
- },
18
- },
19
- required: ["path", "content"],
20
- };
21
- const MAX_WRITE_SIZE = 500_000; // 500KB safety limit
22
- export function createWriteTool(deps) {
23
- return {
24
- name: WRITE_TOOL_NAME,
25
- label: "Write File",
26
- description: "Write content to a file. Creates the file if it doesn't exist, overwrites if it does. " +
27
- "Automatically creates parent directories. " +
28
- "Prefer edit/patch for modifying existing files (safer than full overwrite).",
29
- parameters: WRITE_TOOL_SCHEMA,
30
- execute: async (_toolCallId, params) => {
31
- const resolved = deps.resolvePath(params.path);
32
- // Validate path access
33
- if (deps.validatePath) {
34
- const blocked = deps.validatePath(resolved);
35
- if (blocked) {
36
- return {
37
- content: [{ type: "text", text: `Access denied: ${blocked}` }],
38
- details: { type: "write", path: resolved, error: "access_denied" },
39
- };
40
- }
41
- }
42
- // Large file protection
43
- if (params.content.length > MAX_WRITE_SIZE) {
44
- return {
45
- content: [{
46
- type: "text",
47
- text: `Content too large (${params.content.length} chars, max ${MAX_WRITE_SIZE}). ` +
48
- "Split into multiple writes or use a different approach.",
49
- }],
50
- details: { type: "write", path: resolved, error: "content_too_large" },
51
- };
52
- }
53
- // First-read-then-write protection
54
- if (deps.checkReadBeforeWrite) {
55
- const warning = deps.checkReadBeforeWrite(resolved);
56
- if (warning) {
57
- return {
58
- content: [{ type: "text", text: warning }],
59
- details: { type: "write", path: resolved, error: "not_read_first" },
60
- };
61
- }
62
- }
63
- // Concurrent modification detection
64
- if (deps.checkConcurrentModification) {
65
- const conflict = deps.checkConcurrentModification(resolved);
66
- if (conflict) {
67
- return {
68
- content: [{ type: "text", text: `Concurrent modification detected: ${conflict}. Re-read the file first.` }],
69
- details: { type: "write", path: resolved, error: "concurrent_modification" },
70
- };
71
- }
72
- }
73
- await deps.writeFile(resolved, params.content);
74
- const lineCount = params.content.split("\n").length;
75
- return {
76
- content: [{ type: "text", text: `Wrote ${lineCount} lines to ${resolved}` }],
77
- details: { type: "write", path: resolved, lineCount },
78
- };
79
- },
80
- };
81
- }
82
- //# sourceMappingURL=write-tool.js.map