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 @@
1
+ {"version":3,"file":"cron-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/cron-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gDAAgD;AAChD,sDAAsD;AACtD,mBAAmB;AACnB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAe,CAAC;AAsB9C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,QAAiB;YACv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AG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACzF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const EDIT_TOOL_NAME: "edit";
3
+ export interface EditToolParams {
4
+ path: string;
5
+ oldText: string;
6
+ newText: string;
7
+ }
8
+ export declare const EDIT_TOOL_SCHEMA: {
9
+ readonly type: "object";
10
+ readonly properties: {
11
+ readonly path: {
12
+ readonly type: "string";
13
+ readonly description: "Path to the file to edit (relative or absolute).";
14
+ };
15
+ readonly oldText: {
16
+ readonly type: "string";
17
+ readonly description: "Exact text to find and replace (must match exactly, including whitespace).";
18
+ };
19
+ readonly newText: {
20
+ readonly type: "string";
21
+ readonly description: "New text to replace the old text with.";
22
+ };
23
+ };
24
+ readonly required: readonly ["path", "oldText", "newText"];
25
+ };
26
+ /** Deps injected by the host runtime for file editing. */
27
+ export interface EditToolDeps {
28
+ /** Read file content as text. */
29
+ readFile(path: string): Promise<string>;
30
+ /** Write content back. */
31
+ writeFile(path: string, content: string): Promise<void>;
32
+ /** Resolve a relative path to absolute. */
33
+ resolvePath(input: string): string;
34
+ /**
35
+ * Check for concurrent modification before writing.
36
+ * The host tracks when each file was last read vs last modified on disk.
37
+ * Returns null if safe to write, or a descriptive warning if the file
38
+ * has been modified since last read (by user, another tool, or external process).
39
+ * If not provided, no concurrent modification check is performed.
40
+ */
41
+ checkConcurrentModification?(path: string): string | null;
42
+ }
43
+ export declare function createEditTool(deps: EditToolDeps): PortableTool<EditToolParams>;
44
+ //# sourceMappingURL=edit-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/edit-tool.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,cAAc,EAAG,MAAe,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CAiBnB,CAAC;AAEX,0DAA0D;AAC1D,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,0BAA0B;IAC1B,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;;;;;;OAMG;IACH,2BAA2B,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC3D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CAuD/E"}
@@ -0,0 +1,71 @@
1
+ // ============================================================
2
+ // File Edit Tool — surgical text replacement in files.
3
+ // Category: coding
4
+ // ============================================================
5
+ export const EDIT_TOOL_NAME = "edit";
6
+ export const EDIT_TOOL_SCHEMA = {
7
+ type: "object",
8
+ properties: {
9
+ path: {
10
+ type: "string",
11
+ description: "Path to the file to edit (relative or absolute).",
12
+ },
13
+ oldText: {
14
+ type: "string",
15
+ description: "Exact text to find and replace (must match exactly, including whitespace).",
16
+ },
17
+ newText: {
18
+ type: "string",
19
+ description: "New text to replace the old text with.",
20
+ },
21
+ },
22
+ required: ["path", "oldText", "newText"],
23
+ };
24
+ export function createEditTool(deps) {
25
+ return {
26
+ name: EDIT_TOOL_NAME,
27
+ label: "Edit File",
28
+ description: "Edit a file by replacing exact text. The oldText must match exactly (including whitespace). " +
29
+ "Use this for precise, surgical edits. For multiple edits, call this tool multiple times.",
30
+ parameters: EDIT_TOOL_SCHEMA,
31
+ execute: async (_toolCallId, params) => {
32
+ const resolved = deps.resolvePath(params.path);
33
+ // Concurrent modification check
34
+ if (deps.checkConcurrentModification) {
35
+ const conflict = deps.checkConcurrentModification(resolved);
36
+ if (conflict) {
37
+ return {
38
+ content: [{ type: "text", text: `Concurrent modification detected: ${conflict}. Re-read the file first.` }],
39
+ details: { type: "edit", path: resolved, success: false, reason: "concurrent_modification" },
40
+ };
41
+ }
42
+ }
43
+ const content = await deps.readFile(resolved);
44
+ const index = content.indexOf(params.oldText);
45
+ if (index === -1) {
46
+ return {
47
+ content: [{ type: "text", text: `Error: oldText not found in ${resolved}. Ensure it matches exactly.` }],
48
+ details: { type: "edit", path: resolved, success: false, reason: "not_found" },
49
+ };
50
+ }
51
+ // Check for multiple matches
52
+ const secondIndex = content.indexOf(params.oldText, index + 1);
53
+ if (secondIndex !== -1) {
54
+ return {
55
+ content: [{ type: "text", text: `Error: oldText matches multiple locations in ${resolved}. Include more context to make the match unique.` }],
56
+ details: { type: "edit", path: resolved, success: false, reason: "ambiguous" },
57
+ };
58
+ }
59
+ const newContent = content.slice(0, index) + params.newText + content.slice(index + params.oldText.length);
60
+ await deps.writeFile(resolved, newContent);
61
+ // Compute first changed line
62
+ const preLines = content.slice(0, index).split("\n");
63
+ const firstChangedLine = preLines.length;
64
+ return {
65
+ content: [{ type: "text", text: `Edited ${resolved} (line ${firstChangedLine})` }],
66
+ details: { type: "edit", path: resolved, success: true, firstChangedLine },
67
+ };
68
+ },
69
+ };
70
+ }
71
+ //# sourceMappingURL=edit-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/edit-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D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AAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACrD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC;YAEzC,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,QAAQ,UAAU,gBAAgB,GAAG,EAAE,CAAC;gBAClF,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE;aAC3E,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,103 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const EXEC_TOOL_NAME: "exec";
3
+ export interface ExecToolParams {
4
+ command: string;
5
+ description?: string;
6
+ workdir?: string;
7
+ timeout?: number;
8
+ background?: boolean;
9
+ }
10
+ export declare const EXEC_TOOL_SCHEMA: {
11
+ readonly type: "object";
12
+ readonly properties: {
13
+ readonly command: {
14
+ readonly type: "string";
15
+ readonly description: "Shell command to execute. On Windows uses PowerShell, on Unix uses bash.";
16
+ };
17
+ readonly description: {
18
+ readonly type: "string";
19
+ readonly description: string;
20
+ };
21
+ readonly workdir: {
22
+ readonly type: "string";
23
+ readonly description: "Working directory for the command.";
24
+ };
25
+ readonly timeout: {
26
+ readonly type: "number";
27
+ readonly description: "Timeout in seconds (default: 120). Only applies to foreground commands.";
28
+ };
29
+ readonly background: {
30
+ readonly type: "boolean";
31
+ readonly description: string;
32
+ };
33
+ };
34
+ readonly required: readonly ["command"];
35
+ };
36
+ export interface ExecResult {
37
+ exitCode: number;
38
+ stdout: string;
39
+ stderr: string;
40
+ timedOut?: boolean;
41
+ }
42
+ export interface BackgroundExecResult {
43
+ pid: string;
44
+ started: boolean;
45
+ hint?: string;
46
+ }
47
+ /**
48
+ * Deps injected by the host runtime for command execution.
49
+ * The host is responsible for sandboxing, approval, path restrictions,
50
+ * and security policies (dangerous command blocking).
51
+ */
52
+ export interface ExecToolDeps {
53
+ /**
54
+ * Execute a shell command in the foreground and return the result.
55
+ */
56
+ exec(command: string, options?: {
57
+ workdir?: string;
58
+ timeout?: number;
59
+ }): Promise<ExecResult>;
60
+ /**
61
+ * Start a background process and return its ID.
62
+ * The host manages the process lifecycle.
63
+ * If not provided, background=true will be rejected.
64
+ */
65
+ execBackground?(command: string, options?: {
66
+ workdir?: string;
67
+ }): Promise<BackgroundExecResult>;
68
+ /**
69
+ * Retrieve partial output from a background process.
70
+ * If not provided, background output queries are not supported.
71
+ */
72
+ getBackgroundOutput?(pid: string): Promise<{
73
+ stdout: string;
74
+ stderr: string;
75
+ running: boolean;
76
+ }>;
77
+ /**
78
+ * Validate a command before execution (skill-guard integration point).
79
+ * The host MUST implement this to block dangerous commands
80
+ * (rm -rf /, format, del /f /s /q, etc.).
81
+ * Returns null/undefined if allowed, or an error message string if blocked.
82
+ * If not provided, all commands are allowed (UNSAFE — only for tests).
83
+ */
84
+ validateCommand?(command: string): Promise<string | null | undefined>;
85
+ /**
86
+ * Persist large output to disk and return a reference URI.
87
+ * Called when stdout+stderr exceeds MAX_OUTPUT_CHARS.
88
+ * If provided, the tool returns a truncated preview + the persisted URI.
89
+ * This avoids flooding the LLM context with huge outputs.
90
+ */
91
+ persistOutput?(output: string, meta: {
92
+ command: string;
93
+ exitCode: number;
94
+ }): Promise<string>;
95
+ /**
96
+ * Interpret a non-zero exit code into a human-readable explanation.
97
+ * E.g. exit 127 → "command not found", exit 137 → "killed by SIGKILL (OOM?)".
98
+ * If not provided, raw exit code is shown.
99
+ */
100
+ interpretExitCode?(exitCode: number, stderr: string): string | undefined;
101
+ }
102
+ export declare function createExecTool(deps: ExecToolDeps): PortableTool<ExecToolParams>;
103
+ //# sourceMappingURL=exec-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exec-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/exec-tool.ts"],"names":[],"mappings":"AAMA,OAA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;OAMG;IACH,eAAe,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAEtE;;;;;OAKG;IACH,aAAa,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE7F;;;;OAIG;IACH,iBAAiB,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC1E;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CAgG/E"}
@@ -0,0 +1,134 @@
1
+ // ============================================================
2
+ // Exec Tool — execute shell commands in a sandbox/host env.
3
+ // Reference: claude-code-haha/src/tools/BashTool/BashTool.tsx
4
+ // Category: system
5
+ // ============================================================
6
+ export const EXEC_TOOL_NAME = "exec";
7
+ export const EXEC_TOOL_SCHEMA = {
8
+ type: "object",
9
+ properties: {
10
+ command: {
11
+ type: "string",
12
+ description: "Shell command to execute. On Windows uses PowerShell, on Unix uses bash.",
13
+ },
14
+ description: {
15
+ type: "string",
16
+ description: "Brief human-readable description of what this command does (e.g. \"Install dependencies\", " +
17
+ "\"Run unit tests\"). Used for UI display. For simple commands keep it 5-10 words; " +
18
+ "for complex piped/flagged commands add enough context to clarify intent.",
19
+ },
20
+ workdir: {
21
+ type: "string",
22
+ description: "Working directory for the command.",
23
+ },
24
+ timeout: {
25
+ type: "number",
26
+ description: "Timeout in seconds (default: 120). Only applies to foreground commands.",
27
+ },
28
+ background: {
29
+ type: "boolean",
30
+ description: "If true, start the command in the background and return immediately " +
31
+ "with a process ID. Use getOutput to check on it later. " +
32
+ "Good for dev servers, watchers, long builds. Default: false.",
33
+ },
34
+ },
35
+ required: ["command"],
36
+ };
37
+ const DEFAULT_TIMEOUT = 120;
38
+ const MAX_OUTPUT_CHARS = 50_000;
39
+ function truncateOutput(text, limit) {
40
+ if (text.length <= limit)
41
+ return text;
42
+ const half = Math.floor(limit / 2) - 50;
43
+ return `${text.slice(0, half)}\n\n... [truncated ${text.length - limit} chars] ...\n\n${text.slice(-half)}`;
44
+ }
45
+ export function createExecTool(deps) {
46
+ return {
47
+ name: EXEC_TOOL_NAME,
48
+ label: "Execute Command",
49
+ description: "Execute a shell command. Supports foreground (blocking, returns output) " +
50
+ "and background (non-blocking, returns pid) modes. " +
51
+ "On Windows uses PowerShell, on Unix uses bash. " +
52
+ "Output is truncated if too long.",
53
+ parameters: EXEC_TOOL_SCHEMA,
54
+ execute: async (_toolCallId, params) => {
55
+ // ── Validate command (skill-guard) ──────────────────
56
+ if (deps.validateCommand) {
57
+ const blocked = await deps.validateCommand(params.command);
58
+ if (blocked) {
59
+ return {
60
+ content: [{ type: "text", text: `Command blocked: ${blocked}` }],
61
+ details: { type: "exec", error: "blocked_by_guard", reason: blocked },
62
+ };
63
+ }
64
+ }
65
+ // ── Background mode ─────────────────────────────────
66
+ if (params.background) {
67
+ if (!deps.execBackground) {
68
+ return {
69
+ content: [{ type: "text", text: "Background execution is not supported by the current host." }],
70
+ details: { type: "exec", error: "background_not_supported" },
71
+ };
72
+ }
73
+ const bgResult = await deps.execBackground(params.command, {
74
+ workdir: params.workdir,
75
+ });
76
+ const text = bgResult.started
77
+ ? `Background process started (pid: ${bgResult.pid}).${bgResult.hint ? ` ${bgResult.hint}` : ""}\nUse getOutput with this pid to check on it later.`
78
+ : `Failed to start background process.`;
79
+ return {
80
+ content: [{ type: "text", text }],
81
+ details: {
82
+ type: "exec_background",
83
+ pid: bgResult.pid,
84
+ started: bgResult.started,
85
+ description: params.description,
86
+ },
87
+ };
88
+ }
89
+ // ── Foreground mode ─────────────────────────────────
90
+ const timeout = params.timeout ?? DEFAULT_TIMEOUT;
91
+ const result = await deps.exec(params.command, {
92
+ workdir: params.workdir,
93
+ timeout,
94
+ });
95
+ const fullOutput = (result.stdout || "") + (result.stderr || "");
96
+ const parts = [];
97
+ // Large output persistence
98
+ let persistedUri;
99
+ if (fullOutput.length > MAX_OUTPUT_CHARS && deps.persistOutput) {
100
+ persistedUri = await deps.persistOutput(fullOutput, { command: params.command, exitCode: result.exitCode });
101
+ }
102
+ if (result.stdout) {
103
+ parts.push(persistedUri
104
+ ? truncateOutput(result.stdout, MAX_OUTPUT_CHARS / 2)
105
+ : truncateOutput(result.stdout, MAX_OUTPUT_CHARS));
106
+ }
107
+ if (result.stderr)
108
+ parts.push(`[stderr]\n${truncateOutput(result.stderr, MAX_OUTPUT_CHARS / 4)}`);
109
+ if (result.timedOut)
110
+ parts.push(`[timed out after ${timeout}s]`);
111
+ if (persistedUri)
112
+ parts.push(`[full output persisted: ${persistedUri}]`);
113
+ // Semantic exit code interpretation
114
+ if (result.exitCode !== 0 && deps.interpretExitCode) {
115
+ const hint = deps.interpretExitCode(result.exitCode, result.stderr || "");
116
+ if (hint)
117
+ parts.push(`[exit ${result.exitCode}: ${hint}]`);
118
+ }
119
+ if (parts.length === 0)
120
+ parts.push(`(exit code ${result.exitCode}, no output)`);
121
+ return {
122
+ content: [{ type: "text", text: parts.join("\n") }],
123
+ details: {
124
+ type: "exec",
125
+ exitCode: result.exitCode,
126
+ timedOut: result.timedOut ?? false,
127
+ description: params.description,
128
+ persistedUri,
129
+ },
130
+ };
131
+ },
132
+ };
133
+ }
134
+ //# sourceMappingURL=exec-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exec-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/exec-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,4DAA4D;AAC5D,8DAA8D;AAC9D,mBAAmB;AACnB,+DAA+D;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAe,CAAC;AAU9C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,QAAiB;IAC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AAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,OAAO,IAAI,CAAC,CAAC;YACjE,IAAI,YAAY;gBAAE,KAAK,CAAC,IAAI,CAAC,2BAA2B,YAAY,GAAG,CAAC,CAAC;YAEzE,oCAAoC;YACpC,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACpD,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;gBAC1E,IAAI,IAAI;oBAAE,KAAK,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,QAAQ,KAAK,IAAI,GAAG,CAAC,CAAC;YAC7D,CAAC;YAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,cAAc,MAAM,CAAC,QAAQ,cAAc,CAAC,CAAC;YAEhF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnD,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,KAAK;oBAClC,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,YAAY;iBACb;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,63 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const IMAGE_GENERATE_TOOL_NAME: "image_generate";
3
+ export interface ImageGenerateToolParams {
4
+ prompt: string;
5
+ purpose?: string;
6
+ style?: string;
7
+ size?: string;
8
+ image_url?: string;
9
+ n?: number;
10
+ }
11
+ export declare const IMAGE_GENERATE_TOOL_SCHEMA: {
12
+ readonly type: "object";
13
+ readonly properties: {
14
+ readonly prompt: {
15
+ readonly type: "string";
16
+ readonly description: "Image generation prompt. Enrich vague requests with style, lighting, composition, color, mood details.";
17
+ };
18
+ readonly purpose: {
19
+ readonly type: "string";
20
+ readonly description: "Intended use: 'social-media', 'short-video-cover', 'phone-wallpaper', 'avatar', 'poster', etc.";
21
+ };
22
+ readonly style: {
23
+ readonly type: "string";
24
+ readonly description: "Visual art style: 'photorealistic', 'anime', 'watercolor', 'oil-painting', '3d-render', etc.";
25
+ };
26
+ readonly size: {
27
+ readonly type: "string";
28
+ readonly description: "Dimensions: e.g. '1024x1792' (portrait), '1792x1024' (landscape), '1024x1024' (square). Default: '1024x1024'.";
29
+ };
30
+ readonly image_url: {
31
+ readonly type: "string";
32
+ readonly description: "Reference image URL for image-to-image generation (img2img). Character reference sheet or style transfer.";
33
+ };
34
+ readonly n: {
35
+ readonly type: "number";
36
+ readonly description: "Number of images to generate (1-4). Default: 1.";
37
+ };
38
+ };
39
+ readonly required: readonly ["prompt"];
40
+ };
41
+ export interface ImageGenerateResult {
42
+ mediaUrls: string[];
43
+ model?: string;
44
+ size?: string;
45
+ durationMs?: number;
46
+ }
47
+ /** Deps injected by the host runtime for image generation. */
48
+ export interface ImageGenerateToolDeps {
49
+ /**
50
+ * Generate images via the configured backend (relay, direct API, etc.).
51
+ * The host handles model selection, failover, watermark, and storage.
52
+ */
53
+ generateImage(params: {
54
+ prompt: string;
55
+ purpose?: string;
56
+ style?: string;
57
+ size?: string;
58
+ imageUrl?: string;
59
+ n?: number;
60
+ }): Promise<ImageGenerateResult>;
61
+ }
62
+ export declare function createImageGenerateTool(deps: ImageGenerateToolDeps): PortableTool<ImageGenerateToolParams>;
63
+ //# sourceMappingURL=image-generate-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-generate-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/image-generate-tool.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,wBAAwB,EAAG,gBAAyB,CAAC;AAElE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC7B,CAAC;AAEX,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,8DAA8D;AAC9D,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,aAAa,CAAC,MAAM,EAAE;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,CAAC,CAAC,EAAE,MAAM,CAAC;KACZ,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAClC;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,qBAAqB,GAC1B,YAAY,CAAC,uBAAuB,CAAC,CAmCvC"}
@@ -0,0 +1,68 @@
1
+ // ============================================================
2
+ // Image Generate Tool — generate images via backend adapter.
3
+ // Category: media
4
+ // ============================================================
5
+ export const IMAGE_GENERATE_TOOL_NAME = "image_generate";
6
+ export const IMAGE_GENERATE_TOOL_SCHEMA = {
7
+ type: "object",
8
+ properties: {
9
+ prompt: {
10
+ type: "string",
11
+ description: "Image generation prompt. Enrich vague requests with style, lighting, composition, color, mood details.",
12
+ },
13
+ purpose: {
14
+ type: "string",
15
+ description: "Intended use: 'social-media', 'short-video-cover', 'phone-wallpaper', 'avatar', 'poster', etc.",
16
+ },
17
+ style: {
18
+ type: "string",
19
+ description: "Visual art style: 'photorealistic', 'anime', 'watercolor', 'oil-painting', '3d-render', etc.",
20
+ },
21
+ size: {
22
+ type: "string",
23
+ description: "Dimensions: e.g. '1024x1792' (portrait), '1792x1024' (landscape), '1024x1024' (square). Default: '1024x1024'.",
24
+ },
25
+ image_url: {
26
+ type: "string",
27
+ description: "Reference image URL for image-to-image generation (img2img). Character reference sheet or style transfer.",
28
+ },
29
+ n: {
30
+ type: "number",
31
+ description: "Number of images to generate (1-4). Default: 1.",
32
+ },
33
+ },
34
+ required: ["prompt"],
35
+ };
36
+ export function createImageGenerateTool(deps) {
37
+ return {
38
+ name: IMAGE_GENERATE_TOOL_NAME,
39
+ label: "Image Generate",
40
+ description: "Generate images from a text prompt. You MUST enrich vague prompts with details about style, lighting, " +
41
+ "composition, color, and mood before calling. Supports img2img via image_url reference. " +
42
+ "All generated images are saved locally and can be viewed immediately.",
43
+ parameters: IMAGE_GENERATE_TOOL_SCHEMA,
44
+ execute: async (_toolCallId, params) => {
45
+ const result = await deps.generateImage({
46
+ prompt: params.prompt,
47
+ purpose: params.purpose,
48
+ style: params.style,
49
+ size: params.size,
50
+ imageUrl: params.image_url,
51
+ n: params.n,
52
+ });
53
+ const count = result.mediaUrls.length;
54
+ const text = `Generated ${count} image${count > 1 ? "s" : ""}${result.model ? ` (model: ${result.model})` : ""}`;
55
+ return {
56
+ content: [{ type: "text", text }],
57
+ details: {
58
+ type: "image_generate",
59
+ model: result.model,
60
+ size: result.size,
61
+ durationMs: result.durationMs,
62
+ mediaUrls: result.mediaUrls,
63
+ },
64
+ };
65
+ },
66
+ };
67
+ }
68
+ //# sourceMappingURL=image-generate-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-generate-tool.js","sourceRoot":"","sources":["../../../src/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C,EAAE,MAAM,CAAC,CAAC;aACZ,CAAC,CAAC;YAEH,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;YACtC,MAAM,IAAI,GAAG,aAAa,KAAK,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAEjH,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;gBACjC,OAAO,EAAE;oBACP,IAAI,EAAE,gBAAgB;oBACtB,KAAK,EAAE,MAAM,CAAC,KAAK;oBACnB,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,UAAU,EAAE,MAAM,CAAC,UAAU;oBAC7B,SAAS,EAAE,MAAM,CAAC,SAAS;iBAC5B;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,104 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ /** A single instruction file entry. */
3
+ export interface InstructionFileInfo {
4
+ filename: string;
5
+ path: string;
6
+ size: number;
7
+ updatedAt: string;
8
+ }
9
+ /** Full instruction file (with content). */
10
+ export interface InstructionFileContent extends InstructionFileInfo {
11
+ content: string;
12
+ }
13
+ /** Deps injected by the host runtime for instructions CRUD. */
14
+ export interface InstructionsToolDeps {
15
+ /** List all instruction files for a project (recursive). */
16
+ list(projectId: string): InstructionFileInfo[];
17
+ /** Read a single instruction file. Returns null if not found. */
18
+ read(projectId: string, filename: string): InstructionFileContent | null;
19
+ /** Write (create or overwrite) an instruction file. */
20
+ write(projectId: string, filename: string, content: string): InstructionFileContent;
21
+ /** Remove an instruction file. Returns true if deleted. */
22
+ remove(projectId: string, filename: string): boolean;
23
+ }
24
+ export declare const INSTRUCTIONS_LIST_TOOL_NAME: "instructions_list";
25
+ export interface InstructionsListParams {
26
+ project_id: string;
27
+ }
28
+ export declare const INSTRUCTIONS_LIST_SCHEMA: {
29
+ readonly type: "object";
30
+ readonly properties: {
31
+ readonly project_id: {
32
+ readonly type: "string";
33
+ readonly description: "Project ID to list instructions for. Use \"default\" for the default project.";
34
+ };
35
+ };
36
+ readonly required: readonly ["project_id"];
37
+ };
38
+ export declare function createInstructionsListTool(deps: InstructionsToolDeps): PortableTool<InstructionsListParams>;
39
+ export declare const INSTRUCTIONS_READ_TOOL_NAME: "instructions_read";
40
+ export interface InstructionsReadParams {
41
+ project_id: string;
42
+ filename: string;
43
+ }
44
+ export declare const INSTRUCTIONS_READ_SCHEMA: {
45
+ readonly type: "object";
46
+ readonly properties: {
47
+ readonly project_id: {
48
+ readonly type: "string";
49
+ readonly description: "Project ID. Use \"default\" for the default project.";
50
+ };
51
+ readonly filename: {
52
+ readonly type: "string";
53
+ readonly description: "Instruction file name (e.g. \"code-style.md\"). Supports sub-paths like \"testing/unit-test.md\".";
54
+ };
55
+ };
56
+ readonly required: readonly ["project_id", "filename"];
57
+ };
58
+ export declare function createInstructionsReadTool(deps: InstructionsToolDeps): PortableTool<InstructionsReadParams>;
59
+ export declare const INSTRUCTIONS_WRITE_TOOL_NAME: "instructions_write";
60
+ export interface InstructionsWriteParams {
61
+ project_id: string;
62
+ filename: string;
63
+ content: string;
64
+ }
65
+ export declare const INSTRUCTIONS_WRITE_SCHEMA: {
66
+ readonly type: "object";
67
+ readonly properties: {
68
+ readonly project_id: {
69
+ readonly type: "string";
70
+ readonly description: "Project ID. Use \"default\" for the default project.";
71
+ };
72
+ readonly filename: {
73
+ readonly type: "string";
74
+ readonly description: "Instruction file name ending in .md (e.g. \"code-style.md\"). Sub-paths like \"testing/unit-test.md\" are supported.";
75
+ };
76
+ readonly content: {
77
+ readonly type: "string";
78
+ readonly description: "Markdown content for the instruction file.";
79
+ };
80
+ };
81
+ readonly required: readonly ["project_id", "filename", "content"];
82
+ };
83
+ export declare function createInstructionsWriteTool(deps: InstructionsToolDeps): PortableTool<InstructionsWriteParams>;
84
+ export declare const INSTRUCTIONS_DELETE_TOOL_NAME: "instructions_delete";
85
+ export interface InstructionsDeleteParams {
86
+ project_id: string;
87
+ filename: string;
88
+ }
89
+ export declare const INSTRUCTIONS_DELETE_SCHEMA: {
90
+ readonly type: "object";
91
+ readonly properties: {
92
+ readonly project_id: {
93
+ readonly type: "string";
94
+ readonly description: "Project ID. Use \"default\" for the default project.";
95
+ };
96
+ readonly filename: {
97
+ readonly type: "string";
98
+ readonly description: "Instruction file name to delete (e.g. \"code-style.md\").";
99
+ };
100
+ };
101
+ readonly required: readonly ["project_id", "filename"];
102
+ };
103
+ export declare function createInstructionsDeleteTool(deps: InstructionsToolDeps): PortableTool<InstructionsDeleteParams>;
104
+ //# sourceMappingURL=instructions-tool.d.ts.map