@5ss/ai-tools 2.11.1

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 (342) hide show
  1. package/CHANGELOG.md +112 -0
  2. package/LICENSE +21 -0
  3. package/README.md +221 -0
  4. package/dist/ai-sdk/index.d.ts +15 -0
  5. package/dist/ai-sdk/index.d.ts.map +1 -0
  6. package/dist/ai-sdk/index.js +24 -0
  7. package/dist/ai-sdk/index.js.map +1 -0
  8. package/dist/artifact-D064mHfK.js +44 -0
  9. package/dist/artifact-D064mHfK.js.map +1 -0
  10. package/dist/artifacts-O8g-40Pw.js +404 -0
  11. package/dist/artifacts-O8g-40Pw.js.map +1 -0
  12. package/dist/aws-json-CecFqzqX.js +23 -0
  13. package/dist/aws-json-CecFqzqX.js.map +1 -0
  14. package/dist/aws-service-msttbPrz.js +58 -0
  15. package/dist/aws-service-msttbPrz.js.map +1 -0
  16. package/dist/batch-BMM5dXqL.d.ts +22 -0
  17. package/dist/batch-BMM5dXqL.d.ts.map +1 -0
  18. package/dist/batch-Co1ujeAW.js +67 -0
  19. package/dist/batch-Co1ujeAW.js.map +1 -0
  20. package/dist/bedrock-agentcore-browser-a_qOs-NR.js +182 -0
  21. package/dist/bedrock-agentcore-browser-a_qOs-NR.js.map +1 -0
  22. package/dist/bedrock-agentcore-code-interpreter-MWK-8RhA.js +357 -0
  23. package/dist/bedrock-agentcore-code-interpreter-MWK-8RhA.js.map +1 -0
  24. package/dist/bytes-BxpimpQx.js +45 -0
  25. package/dist/bytes-BxpimpQx.js.map +1 -0
  26. package/dist/client-CCKGsTeI.js +743 -0
  27. package/dist/client-CCKGsTeI.js.map +1 -0
  28. package/dist/cloudflare/index.d.ts +37 -0
  29. package/dist/cloudflare/index.d.ts.map +1 -0
  30. package/dist/cloudflare/index.js +41 -0
  31. package/dist/cloudflare/index.js.map +1 -0
  32. package/dist/cloudflare-browser-B6Yolpin.js +428 -0
  33. package/dist/cloudflare-browser-B6Yolpin.js.map +1 -0
  34. package/dist/cloudflare-email-Dy0KHeDf.js +197 -0
  35. package/dist/cloudflare-email-Dy0KHeDf.js.map +1 -0
  36. package/dist/cloudflare-sandbox-Dp_uNaqW.js +982 -0
  37. package/dist/cloudflare-sandbox-Dp_uNaqW.js.map +1 -0
  38. package/dist/content-type-CORxaxcv.js +49 -0
  39. package/dist/content-type-CORxaxcv.js.map +1 -0
  40. package/dist/core/index.d.ts +4 -0
  41. package/dist/core/index.js +204 -0
  42. package/dist/core/index.js.map +1 -0
  43. package/dist/define-CvpJ_pNP.js +115 -0
  44. package/dist/define-CvpJ_pNP.js.map +1 -0
  45. package/dist/errors-DoSpNHvs.js +20 -0
  46. package/dist/errors-DoSpNHvs.js.map +1 -0
  47. package/dist/errors-aKhko9T1.d.ts +18 -0
  48. package/dist/errors-aKhko9T1.d.ts.map +1 -0
  49. package/dist/eventbridge-scheduler-Bh6GqZY2.js +349 -0
  50. package/dist/eventbridge-scheduler-Bh6GqZY2.js.map +1 -0
  51. package/dist/framework-context-DVIIY8ZO.js +24 -0
  52. package/dist/framework-context-DVIIY8ZO.js.map +1 -0
  53. package/dist/gotenberg-NuJjxyln.js +291 -0
  54. package/dist/gotenberg-NuJjxyln.js.map +1 -0
  55. package/dist/http/index.d.ts +47 -0
  56. package/dist/http/index.d.ts.map +1 -0
  57. package/dist/http/index.js +3 -0
  58. package/dist/http-service-DDNCO1s4.js +254 -0
  59. package/dist/http-service-DDNCO1s4.js.map +1 -0
  60. package/dist/http-service-T7E5UjP8.d.ts +80 -0
  61. package/dist/http-service-T7E5UjP8.d.ts.map +1 -0
  62. package/dist/imessage-BSAFOI8Z.js +154 -0
  63. package/dist/imessage-BSAFOI8Z.js.map +1 -0
  64. package/dist/index-BU4gmYO8.d.ts +254 -0
  65. package/dist/index-BU4gmYO8.d.ts.map +1 -0
  66. package/dist/index-CCivzmxO.d.ts +188 -0
  67. package/dist/index-CCivzmxO.d.ts.map +1 -0
  68. package/dist/index-CLmTrcu5.d.ts +22 -0
  69. package/dist/index-CLmTrcu5.d.ts.map +1 -0
  70. package/dist/index-CZX5OeOF.d.ts +235 -0
  71. package/dist/index-CZX5OeOF.d.ts.map +1 -0
  72. package/dist/index-CdFmEfZO.d.ts +359 -0
  73. package/dist/index-CdFmEfZO.d.ts.map +1 -0
  74. package/dist/index-Cuh6eMWc.d.ts +285 -0
  75. package/dist/index-Cuh6eMWc.d.ts.map +1 -0
  76. package/dist/index-DuOGj7vc.d.ts +107 -0
  77. package/dist/index-DuOGj7vc.d.ts.map +1 -0
  78. package/dist/index-ccZ1XOHw.d.ts +69 -0
  79. package/dist/index-ccZ1XOHw.d.ts.map +1 -0
  80. package/dist/index-n8JTpNf1.d.ts +247 -0
  81. package/dist/index-n8JTpNf1.d.ts.map +1 -0
  82. package/dist/index-pwW1OsOx.d.ts +134 -0
  83. package/dist/index-pwW1OsOx.d.ts.map +1 -0
  84. package/dist/index-zK1ZwS4m.d.ts +347 -0
  85. package/dist/index-zK1ZwS4m.d.ts.map +1 -0
  86. package/dist/limits-hjrO8zUG.js +80 -0
  87. package/dist/limits-hjrO8zUG.js.map +1 -0
  88. package/dist/mastra/index.d.ts +14 -0
  89. package/dist/mastra/index.d.ts.map +1 -0
  90. package/dist/mastra/index.js +26 -0
  91. package/dist/mastra/index.js.map +1 -0
  92. package/dist/mastra-vector-Dhc6XZ8l.js +234 -0
  93. package/dist/mastra-vector-Dhc6XZ8l.js.map +1 -0
  94. package/dist/mcp/index.d.ts +80 -0
  95. package/dist/mcp/index.d.ts.map +1 -0
  96. package/dist/mcp/index.js +97 -0
  97. package/dist/mcp/index.js.map +1 -0
  98. package/dist/modules/artifacts/index.d.ts +337 -0
  99. package/dist/modules/artifacts/index.d.ts.map +1 -0
  100. package/dist/modules/artifacts/index.js +348 -0
  101. package/dist/modules/artifacts/index.js.map +1 -0
  102. package/dist/modules/browser/index.d.ts +516 -0
  103. package/dist/modules/browser/index.d.ts.map +1 -0
  104. package/dist/modules/browser/index.js +475 -0
  105. package/dist/modules/browser/index.js.map +1 -0
  106. package/dist/modules/calendar/index.d.ts +93 -0
  107. package/dist/modules/calendar/index.d.ts.map +1 -0
  108. package/dist/modules/calendar/index.js +131 -0
  109. package/dist/modules/calendar/index.js.map +1 -0
  110. package/dist/modules/code-sandbox/index.d.ts +317 -0
  111. package/dist/modules/code-sandbox/index.d.ts.map +1 -0
  112. package/dist/modules/code-sandbox/index.js +537 -0
  113. package/dist/modules/code-sandbox/index.js.map +1 -0
  114. package/dist/modules/content-type/index.d.ts +22 -0
  115. package/dist/modules/content-type/index.d.ts.map +1 -0
  116. package/dist/modules/content-type/index.js +66 -0
  117. package/dist/modules/content-type/index.js.map +1 -0
  118. package/dist/modules/crypto/index.d.ts +115 -0
  119. package/dist/modules/crypto/index.d.ts.map +1 -0
  120. package/dist/modules/crypto/index.js +139 -0
  121. package/dist/modules/crypto/index.js.map +1 -0
  122. package/dist/modules/document/index.d.ts +575 -0
  123. package/dist/modules/document/index.d.ts.map +1 -0
  124. package/dist/modules/document/index.js +444 -0
  125. package/dist/modules/document/index.js.map +1 -0
  126. package/dist/modules/document-extract/index.d.ts +438 -0
  127. package/dist/modules/document-extract/index.d.ts.map +1 -0
  128. package/dist/modules/document-extract/index.js +127 -0
  129. package/dist/modules/document-extract/index.js.map +1 -0
  130. package/dist/modules/document-render/index.d.ts +336 -0
  131. package/dist/modules/document-render/index.d.ts.map +1 -0
  132. package/dist/modules/document-render/index.js +155 -0
  133. package/dist/modules/document-render/index.js.map +1 -0
  134. package/dist/modules/email/index.d.ts +311 -0
  135. package/dist/modules/email/index.d.ts.map +1 -0
  136. package/dist/modules/email/index.js +167 -0
  137. package/dist/modules/email/index.js.map +1 -0
  138. package/dist/modules/email-message/index.d.ts +95 -0
  139. package/dist/modules/email-message/index.d.ts.map +1 -0
  140. package/dist/modules/email-message/index.js +264 -0
  141. package/dist/modules/email-message/index.js.map +1 -0
  142. package/dist/modules/file-convert/index.d.ts +273 -0
  143. package/dist/modules/file-convert/index.d.ts.map +1 -0
  144. package/dist/modules/file-convert/index.js +103 -0
  145. package/dist/modules/file-convert/index.js.map +1 -0
  146. package/dist/modules/files/index.d.ts +452 -0
  147. package/dist/modules/files/index.d.ts.map +1 -0
  148. package/dist/modules/files/index.js +733 -0
  149. package/dist/modules/files/index.js.map +1 -0
  150. package/dist/modules/image/index.d.ts +342 -0
  151. package/dist/modules/image/index.d.ts.map +1 -0
  152. package/dist/modules/image/index.js +281 -0
  153. package/dist/modules/image/index.js.map +1 -0
  154. package/dist/modules/messaging/index.d.ts +608 -0
  155. package/dist/modules/messaging/index.d.ts.map +1 -0
  156. package/dist/modules/messaging/index.js +1067 -0
  157. package/dist/modules/messaging/index.js.map +1 -0
  158. package/dist/modules/pdf/index.d.ts +287 -0
  159. package/dist/modules/pdf/index.d.ts.map +1 -0
  160. package/dist/modules/pdf/index.js +259 -0
  161. package/dist/modules/pdf/index.js.map +1 -0
  162. package/dist/modules/presentation/index.d.ts +247 -0
  163. package/dist/modules/presentation/index.d.ts.map +1 -0
  164. package/dist/modules/presentation/index.js +12657 -0
  165. package/dist/modules/presentation/index.js.map +1 -0
  166. package/dist/modules/queue/index.d.ts +129 -0
  167. package/dist/modules/queue/index.d.ts.map +1 -0
  168. package/dist/modules/queue/index.js +131 -0
  169. package/dist/modules/queue/index.js.map +1 -0
  170. package/dist/modules/rag/index.d.ts +250 -0
  171. package/dist/modules/rag/index.d.ts.map +1 -0
  172. package/dist/modules/rag/index.js +366 -0
  173. package/dist/modules/rag/index.js.map +1 -0
  174. package/dist/modules/scheduler/index.d.ts +216 -0
  175. package/dist/modules/scheduler/index.d.ts.map +1 -0
  176. package/dist/modules/scheduler/index.js +153 -0
  177. package/dist/modules/scheduler/index.js.map +1 -0
  178. package/dist/modules/skills/index.d.ts +205 -0
  179. package/dist/modules/skills/index.d.ts.map +1 -0
  180. package/dist/modules/skills/index.js +203 -0
  181. package/dist/modules/skills/index.js.map +1 -0
  182. package/dist/modules/tasks/index.d.ts +287 -0
  183. package/dist/modules/tasks/index.d.ts.map +1 -0
  184. package/dist/modules/tasks/index.js +207 -0
  185. package/dist/modules/tasks/index.js.map +1 -0
  186. package/dist/modules/vector-store/index.d.ts +3 -0
  187. package/dist/modules/vector-store/index.js +3 -0
  188. package/dist/modules/web-fetch/index.d.ts +99 -0
  189. package/dist/modules/web-fetch/index.d.ts.map +1 -0
  190. package/dist/modules/web-fetch/index.js +242 -0
  191. package/dist/modules/web-fetch/index.js.map +1 -0
  192. package/dist/object-artifact-store-CMTzCm_G.d.ts +7 -0
  193. package/dist/object-artifact-store-CMTzCm_G.d.ts.map +1 -0
  194. package/dist/object-artifact-store-wZ2j9cto.js +28 -0
  195. package/dist/object-artifact-store-wZ2j9cto.js.map +1 -0
  196. package/dist/pinecone-umY4t6OF.js +190 -0
  197. package/dist/pinecone-umY4t6OF.js.map +1 -0
  198. package/dist/provider-CgDAlg6K.js +34 -0
  199. package/dist/provider-CgDAlg6K.js.map +1 -0
  200. package/dist/qdrant-DMp4NhKR.js +253 -0
  201. package/dist/qdrant-DMp4NhKR.js.map +1 -0
  202. package/dist/resend-BAC38_dA.js +155 -0
  203. package/dist/resend-BAC38_dA.js.map +1 -0
  204. package/dist/s3-CsOaPWMP.js +955 -0
  205. package/dist/s3-CsOaPWMP.js.map +1 -0
  206. package/dist/schemas-ChOAhdo9.js +192 -0
  207. package/dist/schemas-ChOAhdo9.js.map +1 -0
  208. package/dist/slack-Di5BBNpt.js +1455 -0
  209. package/dist/slack-Di5BBNpt.js.map +1 -0
  210. package/dist/sqs-DCwS1i2N.js +225 -0
  211. package/dist/sqs-DCwS1i2N.js.map +1 -0
  212. package/dist/supabase-vector-Dpp9mmJR.js +218 -0
  213. package/dist/supabase-vector-Dpp9mmJR.js.map +1 -0
  214. package/dist/tanstack/index.d.ts +15 -0
  215. package/dist/tanstack/index.d.ts.map +1 -0
  216. package/dist/tanstack/index.js +28 -0
  217. package/dist/tanstack/index.js.map +1 -0
  218. package/dist/teams-DYAHNb39.js +835 -0
  219. package/dist/teams-DYAHNb39.js.map +1 -0
  220. package/dist/telegram-DDXWzkfL.js +734 -0
  221. package/dist/telegram-DDXWzkfL.js.map +1 -0
  222. package/dist/textract-CPLiB22H.js +554 -0
  223. package/dist/textract-CPLiB22H.js.map +1 -0
  224. package/dist/transport-B4vn-XiQ.js +157 -0
  225. package/dist/transport-B4vn-XiQ.js.map +1 -0
  226. package/dist/transport-i96ACAI_.d.ts +46 -0
  227. package/dist/transport-i96ACAI_.d.ts.map +1 -0
  228. package/dist/types-Ccb0DXY9.d.ts +150 -0
  229. package/dist/types-Ccb0DXY9.d.ts.map +1 -0
  230. package/dist/unique-EwBH1JPB.js +19 -0
  231. package/dist/unique-EwBH1JPB.js.map +1 -0
  232. package/dist/vector-store-C3nEO80e.js +193 -0
  233. package/dist/vector-store-C3nEO80e.js.map +1 -0
  234. package/dist/vendors/amazon-sp-api/index.d.ts +526 -0
  235. package/dist/vendors/amazon-sp-api/index.d.ts.map +1 -0
  236. package/dist/vendors/amazon-sp-api/index.js +975 -0
  237. package/dist/vendors/amazon-sp-api/index.js.map +1 -0
  238. package/dist/vendors/bedrock-agentcore-browser/index.d.ts +2 -0
  239. package/dist/vendors/bedrock-agentcore-browser/index.js +2 -0
  240. package/dist/vendors/bedrock-agentcore-code-interpreter/index.d.ts +228 -0
  241. package/dist/vendors/bedrock-agentcore-code-interpreter/index.d.ts.map +1 -0
  242. package/dist/vendors/bedrock-agentcore-code-interpreter/index.js +2 -0
  243. package/dist/vendors/cloudflare-browser/index.d.ts +2 -0
  244. package/dist/vendors/cloudflare-browser/index.js +2 -0
  245. package/dist/vendors/cloudflare-email/index.d.ts +260 -0
  246. package/dist/vendors/cloudflare-email/index.d.ts.map +1 -0
  247. package/dist/vendors/cloudflare-email/index.js +3 -0
  248. package/dist/vendors/cloudflare-sandbox/index.d.ts +565 -0
  249. package/dist/vendors/cloudflare-sandbox/index.d.ts.map +1 -0
  250. package/dist/vendors/cloudflare-sandbox/index.js +2 -0
  251. package/dist/vendors/eventbridge-scheduler/index.d.ts +2 -0
  252. package/dist/vendors/eventbridge-scheduler/index.js +2 -0
  253. package/dist/vendors/gotenberg/index.d.ts +306 -0
  254. package/dist/vendors/gotenberg/index.d.ts.map +1 -0
  255. package/dist/vendors/gotenberg/index.js +2 -0
  256. package/dist/vendors/imessage/index.d.ts +420 -0
  257. package/dist/vendors/imessage/index.d.ts.map +1 -0
  258. package/dist/vendors/imessage/index.js +4 -0
  259. package/dist/vendors/katana/index.d.ts +1570 -0
  260. package/dist/vendors/katana/index.d.ts.map +1 -0
  261. package/dist/vendors/katana/index.js +1639 -0
  262. package/dist/vendors/katana/index.js.map +1 -0
  263. package/dist/vendors/mastra-vector/index.d.ts +120 -0
  264. package/dist/vendors/mastra-vector/index.d.ts.map +1 -0
  265. package/dist/vendors/mastra-vector/index.js +3 -0
  266. package/dist/vendors/pinecone/index.d.ts +75 -0
  267. package/dist/vendors/pinecone/index.d.ts.map +1 -0
  268. package/dist/vendors/pinecone/index.js +3 -0
  269. package/dist/vendors/qdrant/index.d.ts +75 -0
  270. package/dist/vendors/qdrant/index.d.ts.map +1 -0
  271. package/dist/vendors/qdrant/index.js +3 -0
  272. package/dist/vendors/resend/index.d.ts +3 -0
  273. package/dist/vendors/resend/index.js +3 -0
  274. package/dist/vendors/s3/index.d.ts +2 -0
  275. package/dist/vendors/s3/index.js +2 -0
  276. package/dist/vendors/slack/index.d.ts +576 -0
  277. package/dist/vendors/slack/index.d.ts.map +1 -0
  278. package/dist/vendors/slack/index.js +3 -0
  279. package/dist/vendors/sqs/index.d.ts +2 -0
  280. package/dist/vendors/sqs/index.js +2 -0
  281. package/dist/vendors/supabase-vector/index.d.ts +89 -0
  282. package/dist/vendors/supabase-vector/index.d.ts.map +1 -0
  283. package/dist/vendors/supabase-vector/index.js +3 -0
  284. package/dist/vendors/teams/index.d.ts +303 -0
  285. package/dist/vendors/teams/index.d.ts.map +1 -0
  286. package/dist/vendors/teams/index.js +3 -0
  287. package/dist/vendors/telegram/index.d.ts +319 -0
  288. package/dist/vendors/telegram/index.d.ts.map +1 -0
  289. package/dist/vendors/telegram/index.js +3 -0
  290. package/dist/vendors/textract/index.d.ts +2 -0
  291. package/dist/vendors/textract/index.js +2 -0
  292. package/dist/vendors/woocommerce/index.d.ts +1700 -0
  293. package/dist/vendors/woocommerce/index.d.ts.map +1 -0
  294. package/dist/vendors/woocommerce/index.js +1427 -0
  295. package/dist/vendors/woocommerce/index.js.map +1 -0
  296. package/dist/with-auth-CpKqTrGK.js +240 -0
  297. package/dist/with-auth-CpKqTrGK.js.map +1 -0
  298. package/logos/LUCIDE-ATTRIBUTION.txt +4 -0
  299. package/logos/README.md +89 -0
  300. package/logos/amazon.svg +6 -0
  301. package/logos/artifacts.svg +9 -0
  302. package/logos/browser.svg +9 -0
  303. package/logos/calendar.svg +15 -0
  304. package/logos/cloudflare-browser.svg +5 -0
  305. package/logos/cloudflare-email.svg +5 -0
  306. package/logos/cloudflare.svg +4 -0
  307. package/logos/code-sandbox.svg +8 -0
  308. package/logos/content-type.svg +10 -0
  309. package/logos/crypto.svg +7 -0
  310. package/logos/document-extract.svg +12 -0
  311. package/logos/document-render.svg +8 -0
  312. package/logos/document.svg +10 -0
  313. package/logos/email-message.svg +8 -0
  314. package/logos/email.svg +7 -0
  315. package/logos/file-convert.svg +9 -0
  316. package/logos/files.svg +6 -0
  317. package/logos/gotenberg.svg +340 -0
  318. package/logos/image.svg +8 -0
  319. package/logos/imessage.svg +7 -0
  320. package/logos/katana.svg +13 -0
  321. package/logos/mastra.svg +7 -0
  322. package/logos/messaging.svg +7 -0
  323. package/logos/pack-logos.json +48 -0
  324. package/logos/pdf.svg +10 -0
  325. package/logos/pinecone.svg +25 -0
  326. package/logos/presentation.svg +8 -0
  327. package/logos/qdrant.svg +4 -0
  328. package/logos/queue.svg +11 -0
  329. package/logos/rag.svg +18 -0
  330. package/logos/resend.svg +5 -0
  331. package/logos/scheduler.svg +7 -0
  332. package/logos/skills.svg +10 -0
  333. package/logos/slack.svg +14 -0
  334. package/logos/supabase.svg +4 -0
  335. package/logos/tasks.svg +10 -0
  336. package/logos/teams.svg +6 -0
  337. package/logos/telegram.svg +10 -0
  338. package/logos/textract.svg +5 -0
  339. package/logos/vector-store.svg +8 -0
  340. package/logos/web-fetch.svg +8 -0
  341. package/logos/woocommerce.svg +4 -0
  342. package/package.json +373 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,112 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@5ss/ai-tools` are documented here.
4
+
5
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Releases are cut by [semantic-release](https://semantic-release.gitbook.io/) from [conventional commits](https://www.conventionalcommits.org/).
6
+
7
+ ## [2.11.1](https://github.com/harryy2510/ai-tools/compare/v2.11.0...v2.11.1) (2026-08-07)
8
+
9
+ ## [2.11.0](https://github.com/harryy2510/ai-tools/compare/v2.10.2...v2.11.0) (2026-08-07)
10
+
11
+ ## [2.10.2](https://github.com/harryy2510/ai-tools/compare/v2.10.1...v2.10.2) (2026-08-07)
12
+
13
+ ## [2.10.1](https://github.com/harryy2510/ai-tools/compare/v2.10.0...v2.10.1) (2026-08-05)
14
+
15
+ ## [2.10.0](https://github.com/harryy2510/ai-tools/compare/v2.9.0...v2.10.0) (2026-08-03)
16
+
17
+ ## [2.9.0](https://github.com/harryy2510/ai-tools/compare/v2.8.0...v2.9.0) (2026-08-02)
18
+
19
+ ## [2.8.0](https://github.com/harryy2510/ai-tools/compare/v2.7.1...v2.8.0) (2026-07-29)
20
+
21
+ ## [2.7.1](https://github.com/harryy2510/ai-tools/compare/v2.7.0...v2.7.1) (2026-07-29)
22
+
23
+ ## [2.7.0](https://github.com/harryy2510/ai-tools/compare/v2.6.0...v2.7.0) (2026-07-29)
24
+
25
+ ## [2.6.0](https://github.com/harryy2510/ai-tools/compare/v2.5.1...v2.6.0) (2026-07-29)
26
+
27
+ ## [2.5.1](https://github.com/harryy2510/ai-tools/compare/v2.5.0...v2.5.1) (2026-07-28)
28
+
29
+ ## [2.5.0](https://github.com/harryy2510/ai-tools/compare/v2.4.0...v2.5.0) (2026-07-28)
30
+
31
+ ## [2.4.0](https://github.com/harryy2510/ai-tools/compare/v2.3.0...v2.4.0) (2026-07-28)
32
+
33
+ ## [2.3.0](https://github.com/harryy2510/ai-tools/compare/v2.2.0...v2.3.0) (2026-07-28)
34
+
35
+ ## [2.2.0](https://github.com/harryy2510/ai-tools/compare/v2.1.0...v2.2.0) (2026-07-28)
36
+
37
+ ## [2.1.0](https://github.com/harryy2510/ai-tools/compare/v2.0.1...v2.1.0) (2026-07-28)
38
+
39
+ ## [2.0.1](https://github.com/harryy2510/ai-tools/compare/v2.0.0...v2.0.1) (2026-07-27)
40
+
41
+ ## [2.0.0](https://github.com/harryy2510/ai-tools/compare/v1.6.1...v2.0.0) (2026-07-27)
42
+
43
+ ## [1.6.1](https://github.com/harryy2510/ai-tools/compare/v1.6.0...v1.6.1) (2026-07-24)
44
+
45
+ ## [1.6.0](https://github.com/harryy2510/ai-tools/compare/v1.5.0...v1.6.0) (2026-07-24)
46
+
47
+ ## [1.5.0](https://github.com/harryy2510/ai-tools/compare/v1.4.0...v1.5.0) (2026-07-24)
48
+
49
+ ## [1.4.0](https://github.com/harryy2510/ai-tools/compare/v1.3.0...v1.4.0) (2026-07-23)
50
+
51
+ ## [1.3.0](https://github.com/harryy2510/ai-tools/compare/v1.2.1...v1.3.0) (2026-07-23)
52
+
53
+ ## [1.2.1](https://github.com/harryy2510/ai-tools/compare/v1.2.0...v1.2.1) (2026-07-23)
54
+
55
+ ## [1.2.0](https://github.com/harryy2510/ai-tools/compare/v1.1.0...v1.2.0) (2026-07-23)
56
+
57
+ ## [1.1.0](https://github.com/harryy2510/ai-tools/compare/v1.0.0...v1.1.0) (2026-07-21)
58
+
59
+ ## 1.0.0 (2026-07-21)
60
+
61
+ # Changelog
62
+
63
+ All notable changes to `@5ss/ai-tools` are documented here.
64
+
65
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66
+ Releases are cut by semantic-release from conventional commits. See [docs/versioning.md](./docs/versioning.md).
67
+
68
+ ## [Unreleased]
69
+
70
+ Notes for the next cut (hand-maintained until semantic-release rewrites on release). Empty `## [1.x.x]` sections above are produced by release automation.
71
+
72
+ ### BREAKING CHANGE
73
+
74
+ Public surfaces removed or renamed since **v1.6.1** — next release **must** be a **major** (use `BREAKING CHANGE` footer / `type!:` on the release commit).
75
+
76
+ | Removed / changed | Migration |
77
+ | --- | --- |
78
+ | `@5ss/ai-tools/mime` | Use `@5ss/ai-tools/email-message` (parse/build) and/or `content-type` |
79
+ | `@5ss/ai-tools/storage` | Use `@5ss/ai-tools/s3` (or nested S3 auth on `files` / messaging media) |
80
+ | `@5ss/ai-tools/r2` | Use `s3` with R2 S3-compatible `endpoint` |
81
+ | `@5ss/ai-tools/supabase-storage` | Use S3-compatible storage or host Supabase client |
82
+ | `messaging-unsend` tool / seam `unsend` | Use `@5ss/ai-tools/imessage` `imessage-unsend` (or channel vendor) |
83
+ | email-message attachment `mimeType` | Renamed to **`mime_type`** |
84
+ | messaging media `source.store: 'host'` | Not accepted; use `store: 'object'` + nested `storage` auth |
85
+ | `messaging-download-file` output | When `destination_key` is set, response may include **`artifact`** and omit `body_base64` — handle both shapes |
86
+ | Messaging host client media | Prefer `MessagingClient.fromContext` / nested `storage` auth for ArtifactRef media; resolve storage before send |
87
+ | Invalid base64 on media/bodies | Always `ToolError` code **`bad_input`** (never raw `DOMException`) |
88
+ | Hooks + output validation | `runTool` owns bind → hooks → execute → output validation; output schema is parsed **once** |
89
+ | `mergeToolContext` / adapter `createContext` | Explicit `undefined` fields **do not** erase base `signal` / `fetch` / `auth` / `now` |
90
+ | MCP `context` | Still accepts static `ToolContext` **or** factory `() => ToolContext \| Promise<…>` (and deprecated `contextFactory`) |
91
+
92
+ ### Notes (compat preserved)
93
+
94
+ - Adapter `createContext` callbacks use the installed framework execution-context types.
95
+ - S3 `get` / `getBytes({ maxBytes })` use HEAD + conditional Range GET (`If-Match` when etag is known) plus bounded response streaming.
96
+
97
+ ### Historical note
98
+
99
+ Early public notes under **0.0.1** below are archival. MIME parse/build is **`email-message`** (not a `mime` pack). Object store is **`s3`** (+ nested S3 on `files` / artifact media); there is no multi-provider `storage` seam or published `r2` / `supabase-storage` packs.
100
+
101
+ ## [0.0.1] - 2026-07-21
102
+
103
+ Initial public package surface (archival).
104
+
105
+ ### Added
106
+
107
+ - **Kernel (`@5ss/ai-tools/core`)** — `defineTool`, `defineModule`, `withAuth`, `runTool`, contracts, catalog, JSON Schema projection, stable `ToolError` codes.
108
+ - **HTTP** surface and framework adapters (Mastra, AI SDK, TanStack, Cloudflare, MCP).
109
+ - Early product modules and tooling (see git history for full evolution).
110
+
111
+ [Unreleased]: https://github.com/harryy2510/ai-tools/compare/v1.6.1...HEAD
112
+ [0.0.1]: https://github.com/harryy2510/ai-tools/releases/tag/v0.0.1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 harryy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,221 @@
1
+ # @5ss/ai-tools
2
+
3
+ Reusable **AI tools** with strict Zod schemas and model-facing contracts. Define once in the kernel; project to **Mastra**, **Vercel AI SDK**, **TanStack AI**, **Cloudflare Workers AI**, **MCP**, or call via class clients / `runTool`.
4
+
5
+ [![ci](https://github.com/harryy2510/ai-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/harryy2510/ai-tools/actions/workflows/ci.yml)
6
+ [![release](https://github.com/harryy2510/ai-tools/actions/workflows/release.yml/badge.svg)](https://github.com/harryy2510/ai-tools/actions/workflows/release.yml)
7
+
8
+ **Docs:** [docs/README.md](./docs/README.md) · **Changelog:** [CHANGELOG.md](./CHANGELOG.md) · **Release:** [docs/versioning.md](./docs/versioning.md)
9
+
10
+ ## Why
11
+
12
+ - **One authoring path** — `defineTool` / `defineModule` only; adapters never re-implement business logic.
13
+ - **Host-owned secrets** — auth schemas + `withAuth`; model inputs never carry API keys.
14
+ - **Two product roots** — `modules/` (our seams) vs `vendors/` (3rd-party packs); flat public imports.
15
+ - **Class clients + tools** — host uses `new ResendClient(auth)`; agents use the same implementation via tools.
16
+ - **Subpath imports** — tree-shake friendly; no root mega-barrel.
17
+ - **Honest runtimes** — `node` | `edge` | `both`.
18
+ - **Stable tool ids** — kebab-case, vendor- or capability-prefixed.
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ bun add @5ss/ai-tools
24
+
25
+ # optional peers for adapters you use:
26
+ bun add @mastra/core
27
+ bun add ai
28
+ bun add @tanstack/ai
29
+ bun add @modelcontextprotocol/sdk # registerMcpTools only
30
+ ```
31
+
32
+ Requires **Bun ≥ 1.3.14** or **Node ≥ 24**.
33
+
34
+ ## Quick start
35
+
36
+ ```ts
37
+ import { withAuth } from '@5ss/ai-tools/core'
38
+ import { resendModule, ResendClient } from '@5ss/ai-tools/resend'
39
+ import { createMastraTools } from '@5ss/ai-tools/mastra'
40
+
41
+ // Host DX (class client)
42
+ const resend = new ResendClient({ api_key: process.env.RESEND_API_KEY! })
43
+ await resend.send({ to: 'a@example.com', from: 'b@example.com', subject: 'Hi', text: 'Hello' })
44
+
45
+ // Agent tools (same implementation)
46
+ const bound = withAuth(resendModule, { api_key: process.env.RESEND_API_KEY! })
47
+ export const tools = createMastraTools(bound)
48
+ ```
49
+
50
+ Multi-provider **seam** (host picks provider on auth):
51
+
52
+ ```ts
53
+ import { withAuth } from '@5ss/ai-tools/core'
54
+ import { emailModule } from '@5ss/ai-tools/email'
55
+
56
+ const bound = withAuth(emailModule, {
57
+ provider: 'resend',
58
+ api_key: process.env.RESEND_API_KEY!,
59
+ sender: { email: 'verified@example.com', name: 'Product' },
60
+ })
61
+ ```
62
+
63
+ No-auth pure helpers:
64
+
65
+ ```ts
66
+ import { emailMessageModule } from '@5ss/ai-tools/email-message'
67
+ import { createAiSdkTools } from '@5ss/ai-tools/ai-sdk'
68
+
69
+ export const tools = createAiSdkTools(emailMessageModule)
70
+ ```
71
+
72
+ ## Architecture
73
+
74
+ ```text
75
+ src/
76
+ core/ kernel (defineTool, withAuth, runTool, …)
77
+ transport/ HttpService / AwsService → @5ss/ai-tools/http
78
+ adapters/ mastra · ai-sdk · tanstack · cloudflare · mcp
79
+ modules/ our seams (email, messaging, files, …)
80
+ vendors/ 3rd-party packs (resend, telegram, s3, …)
81
+ + vertical kits: _email · _storage · _messaging · _vector (not published)
82
+ shared/ bytes, batch, artifact, content-type, pagination
83
+ ```
84
+
85
+ | Root | Role |
86
+ | --- | --- |
87
+ | **`modules/`** | Capability seams we own; usually multi-provider, with explicit product-locked host or single-provider seams |
88
+ | **`vendors/`** | Full first-party API of one product; grow tools over time |
89
+ | **`vendors/_…`** | Vertical kits (codegen-skipped); shared by packs in that category |
90
+
91
+ Public imports are **flat**: `@5ss/ai-tools/resend`, not `@5ss/ai-tools/vendors/resend`.
92
+
93
+ ```text
94
+ defineTool / defineModule
95
+
96
+ ├─► Host: Class client (new ResendClient(auth).send(…))
97
+ ├─► Agent: withAuth(module) → tools → adapters
98
+ └─► Direct: runTool(tool, input, ctx)
99
+ ```
100
+
101
+ ## Subpaths
102
+
103
+ ### Brain
104
+
105
+ | Import | Role | Docs |
106
+ | --- | --- | --- |
107
+ | `@5ss/ai-tools/core` | Kernel, contracts, `withAuth`, `runTool` | [core](./docs/packages/core.md) |
108
+ | `@5ss/ai-tools/http` | `HttpService` / `AwsService` | [http transport](./docs/reference/http-and-aws-services.md) |
109
+ | `@5ss/ai-tools/mastra` | Mastra projector | [mastra](./docs/packages/mastra.md) |
110
+ | `@5ss/ai-tools/ai-sdk` | Vercel AI SDK projector | [ai-sdk](./docs/packages/ai-sdk.md) |
111
+ | `@5ss/ai-tools/tanstack` | TanStack AI projector | [tanstack](./docs/packages/tanstack.md) |
112
+ | `@5ss/ai-tools/cloudflare` | Workers AI tool defs | [cloudflare](./docs/packages/cloudflare.md) |
113
+ | `@5ss/ai-tools/mcp` | MCP list/call + register | [mcp](./docs/packages/mcp.md) |
114
+
115
+ ### Seams (`modules/`)
116
+
117
+ | Import | Kind | Tools (ids) | Docs |
118
+ | --- | --- | --- | --- |
119
+ | `@5ss/ai-tools/email` | multi-provider | `email-send`, `email-send-batch` | [email](./docs/modules/email.md) |
120
+ | `@5ss/ai-tools/messaging` | multi-provider | `messaging-send-text`, edit, media, reactions, … (telegram/slack/teams/imessage) | [messaging](./docs/modules/messaging.md) |
121
+ | `@5ss/ai-tools/files` | path root over nested S3 | `files-*` | [files](./docs/modules/files.md) |
122
+ | `@5ss/ai-tools/artifacts` | object + host providers | `artifacts-create`, `-read-range`, `-read-lines` | [artifacts](./docs/modules/artifacts.md) |
123
+ | `@5ss/ai-tools/vector-store` | qdrant, pinecone, supabase, mastra | `vector-store-*` | [vector-store](./docs/modules/vector-store.md) |
124
+ | `@5ss/ai-tools/rag` | embed + nested vector-store | `rag-*` | [rag](./docs/modules/rag.md) |
125
+ | `@5ss/ai-tools/document-extract` | multi-provider | `document-extract-text`, `-status`, `-text-batch` | [document-extract](./docs/modules/document-extract.md) |
126
+ | `@5ss/ai-tools/document-render` | multi-provider | `document-render-pdf`, `-screenshot`, batches | [document-render](./docs/modules/document-render.md) |
127
+ | `@5ss/ai-tools/file-convert` | gotenberg LO | `file-convert` (`office-to-pdf`), batch | [file-convert](./docs/modules/file-convert.md) |
128
+ | `@5ss/ai-tools/document` | core reader/builder/editor | read text/PDF/DOCX/XLSX/images; build text/DOCX/XLSX; edit text/DOCX/XLSX/CSV | [document](./docs/modules/document.md) |
129
+ | `@5ss/ai-tools/presentation` | PPTX reader/builder/editor | read, build, and edit PPTX presentations; Node ESM only | [presentation](./docs/modules/presentation.md) |
130
+ | `@5ss/ai-tools/web-fetch` | host policy | `web-fetch-get`, `web-fetch-request` | [web-fetch](./docs/modules/web-fetch.md) |
131
+ | `@5ss/ai-tools/email-message` | pure (no auth) | `email-message-parse`, `email-message-build` | [email-message](./docs/modules/email-message.md) |
132
+ | `@5ss/ai-tools/content-type` | pure (no auth) | `content-type-get`, `-extension`, `-extensions` | [content-type](./docs/modules/content-type.md) |
133
+ | `@5ss/ai-tools/skills` | host-bound catalog | `skills-list`, `skills-get`, `skills-search` | [skills](./docs/modules/skills.md) |
134
+ | `@5ss/ai-tools/tasks` | host-backed definitions | `tasks-create`, `-get`, `-list`, `-update`, `-delete` | [tasks](./docs/modules/tasks.md) |
135
+ | `@5ss/ai-tools/scheduler` | eventbridge provider | `scheduler-create`, `-update`, `-get`, `-list`, `-delete` | [scheduler](./docs/modules/scheduler.md) |
136
+ | `@5ss/ai-tools/pdf` | artifact utilities | inspect, merge, extract, split, rotate | [pdf](./docs/modules/pdf.md) |
137
+ | `@5ss/ai-tools/image` | artifact transforms | metadata, resize, crop, thumbnail, convert | [image](./docs/modules/image.md) |
138
+ | `@5ss/ai-tools/crypto` | Web Crypto | hash, HMAC sign/verify, random bytes | [crypto](./docs/modules/crypto.md) |
139
+ | `@5ss/ai-tools/calendar` | pure iCalendar | build and parse ICS | [calendar](./docs/modules/calendar.md) |
140
+ | `@5ss/ai-tools/queue` | sqs provider | enqueue, receive, acknowledge, extend visibility | [queue](./docs/modules/queue.md) |
141
+ | `@5ss/ai-tools/browser` | AgentCore + Cloudflare providers | start, get, stop | [browser](./docs/modules/browser.md) |
142
+
143
+ ### Vendors (`vendors/`)
144
+
145
+ | Import | Tools (ids) | Docs |
146
+ | --- | --- | --- |
147
+ | `@5ss/ai-tools/resend` | `resend-send`, `resend-send-batch` | [resend](./docs/vendors/resend.md) |
148
+ | `@5ss/ai-tools/cloudflare-email` | `cloudflare-email-send`, `-send-batch` | [cloudflare-email](./docs/vendors/cloudflare-email.md) |
149
+ | `@5ss/ai-tools/telegram` | `telegram-send-text`, `-edit-text`, media, reactions, … | [telegram](./docs/vendors/telegram.md) |
150
+ | `@5ss/ai-tools/slack` | `slack-send-text`, edit, media, reactions, files, … | [slack](./docs/vendors/slack.md) |
151
+ | `@5ss/ai-tools/teams` | `teams-send-text`, edit, media, Bot Framework activities | [teams](./docs/vendors/teams.md) |
152
+ | `@5ss/ai-tools/imessage` | send/edit/react/unsend/read via Photon Advanced iMessage HTTP | [imessage](./docs/vendors/imessage.md) |
153
+ | `@5ss/ai-tools/s3` | `s3-*` (+ signed URL, multipart) | [s3](./docs/vendors/s3.md) |
154
+ | `@5ss/ai-tools/sqs` | `sqs-send`, `-receive`, `-delete`, `-change-visibility` | [sqs](./docs/vendors/sqs.md) |
155
+ | `@5ss/ai-tools/qdrant` | `qdrant-upsert`, `-query`, `-delete` | [qdrant](./docs/vendors/qdrant.md) |
156
+ | `@5ss/ai-tools/pinecone` | `pinecone-upsert`, `-query`, `-delete` | [pinecone](./docs/vendors/pinecone.md) |
157
+ | `@5ss/ai-tools/supabase-vector` | `supabase-vector-*` (pgvector/PostgREST) | [supabase-vector](./docs/vendors/supabase-vector.md) |
158
+ | `@5ss/ai-tools/mastra-vector` | `mastra-vector-*` (PgVector, node) | [mastra-vector](./docs/vendors/mastra-vector.md) |
159
+ | `@5ss/ai-tools/textract` | `textract-extract-text`, `-get-status`, `-extract-text-batch` | [textract](./docs/vendors/textract.md) |
160
+ | `@5ss/ai-tools/eventbridge-scheduler` | create/update/get/list/delete (task_ref) | [eventbridge-scheduler](./docs/vendors/eventbridge-scheduler.md) |
161
+ | `@5ss/ai-tools/bedrock-agentcore-code-interpreter` | session + execute + files | [bedrock-agentcore-code-interpreter](./docs/vendors/bedrock-agentcore-code-interpreter.md) |
162
+ | `@5ss/ai-tools/bedrock-agentcore-browser` | start/stop/get session + stream endpoints | [bedrock-agentcore-browser](./docs/vendors/bedrock-agentcore-browser.md) |
163
+
164
+ | `@5ss/ai-tools/gotenberg` | render PDF/screenshot + `office-to-pdf` convert | [gotenberg](./docs/vendors/gotenberg.md) |
165
+ | `@5ss/ai-tools/cloudflare-browser` | sessions + PDF/screenshot quick actions | [cloudflare-browser](./docs/vendors/cloudflare-browser.md) |
166
+ | `@5ss/ai-tools/woocommerce` | orders, notes, refunds, products, variations, customers, coupons, categories | [woocommerce](./docs/vendors/woocommerce.md) |
167
+ | `@5ss/ai-tools/katana` | sales/purchase/manufacturing orders, products, materials, customers, suppliers, inventory | [katana](./docs/vendors/katana.md) |
168
+ | `@5ss/ai-tools/amazon-sp-api` | orders + items, FBA inventory, reports + documents, catalog search | [amazon-sp-api](./docs/vendors/amazon-sp-api.md) |
169
+
170
+ Auth fields are **snake_case** (`api_key`, `bot_token`, `access_key_id`, …).
171
+
172
+ ## Guides
173
+
174
+ | Guide | Purpose |
175
+ | --- | --- |
176
+ | [Getting started](./docs/guides/getting-started.md) | Install, import map, first bind |
177
+ | [Auth and binding](./docs/guides/auth-and-binding.md) | Host-owned secrets, `withAuth` |
178
+ | [Adapters](./docs/guides/adapters.md) | Project kernel tools into frameworks |
179
+ | [Authoring packs](./docs/guides/authoring-modules.md) | modules vs vendors, layout, codegen |
180
+ | [Errors](./docs/guides/errors.md) | `ToolError` codes and retry |
181
+ | [HTTP / AWS transport](./docs/reference/http-and-aws-services.md) | `HttpService` / `AwsService` |
182
+ | [Package surface](./docs/specs/package-surface-architecture.md) | modules · vendors architecture |
183
+ | [Provider seam](./docs/specs/provider-seam.md) | Multi-provider capability modules |
184
+
185
+ ## Develop
186
+
187
+ ```bash
188
+ bun install
189
+ bun run hooks:install
190
+ oxfmt --write <touched-paths>
191
+ bun run check # format:check + lint + codegen:check + test
192
+ bun run codegen
193
+ bun run new-module <kebab-key> [--title …] [--description …] [--auth none|custom]
194
+ bun run build
195
+ ```
196
+
197
+ Codegen owns `package.json` exports for packs under `src/modules|vendors/<key>/` with `index.ts`. Underscore kits (`_email`, `_storage`, `_messaging`) are skipped.
198
+
199
+ ## Artifacts (extract · convert · render)
200
+
201
+ - Objects are **S3 keys** (`ArtifactRef`), not base64 in the model. Spec: [artifacts-extract-convert](./docs/specs/artifacts-extract-convert.md).
202
+ - **Read / build / edit:** text, PDF, DOCX, spreadsheet, and image-metadata work lives in [`document`](./docs/modules/document.md); PPTX work lives in [`presentation`](./docs/modules/presentation.md). Product lock: [document plane](./docs/specs/document-plane.md).
203
+ - **Extract:** Amazon Textract (object must live in AWS S3 Textract can read).
204
+ - **Convert (office→PDF):** self-host [Gotenberg](https://gotenberg.dev/) LibreOffice (`file-convert` path `office-to-pdf`).
205
+ - **Render (HTML/URL):** Gotenberg Chromium or Cloudflare Browser Rendering → storage `ArtifactRef`.
206
+
207
+ ## Release
208
+
209
+ **[semantic-release](https://semantic-release.gitbook.io/)** on `main` from **conventional commits**. No manual version bump.
210
+
211
+ | Commit | Version |
212
+ | --- | --- |
213
+ | `feat:` | minor |
214
+ | `fix:` / `perf:` / `refactor:` | patch |
215
+ | `BREAKING CHANGE` / `type!:` | major |
216
+
217
+ Details: [docs/versioning.md](./docs/versioning.md).
218
+
219
+ ## License
220
+
221
+ [MIT](./LICENSE) © harryy
@@ -0,0 +1,15 @@
1
+ import { g as ToolSource, o as ToolContext, s as ToolDefinition } from "../types-Ccb0DXY9.js";
2
+ import { dynamicTool } from "ai";
3
+ //#region src/adapters/ai-sdk/create-ai-sdk-tool.d.ts
4
+ type AiSdkTool = ReturnType<typeof dynamicTool>;
5
+ /** Exact execute options supplied by the installed AI SDK. */
6
+ type AiSdkExecuteOptions = Parameters<NonNullable<AiSdkTool['execute']>>[1];
7
+ type AiSdkToolsOptions = {
8
+ context?: ToolContext;
9
+ createContext?: (options: AiSdkExecuteOptions) => ToolContext | Promise<ToolContext>;
10
+ };
11
+ declare function createAiSdkTool(kernelTool: ToolDefinition, options?: AiSdkToolsOptions): AiSdkTool;
12
+ declare function createAiSdkTools(source: ToolSource, options?: AiSdkToolsOptions): Record<string, AiSdkTool>;
13
+ //#endregion
14
+ export { type AiSdkExecuteOptions, type AiSdkToolsOptions, createAiSdkTool, createAiSdkTools };
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/adapters/ai-sdk/create-ai-sdk-tool.ts"],"mappings":";;;KASK,YAAY,kBAAkB;;KAGvB,sBAAsB,WAAW,YAAY;KAE7C;EACX,UAAU;EACV,iBAAiB,SAAS,wBAAwB,cAAc,QAAQ;;iBAGzD,gBAAgB,YAAY,gBAAgB,UAAS,oBAAyB;iBAW9E,iBAAiB,QAAQ,YAAY,UAAS,oBAAyB,eAAe"}
@@ -0,0 +1,24 @@
1
+ import { n as runTool, s as resolveTools } from "../with-auth-CpKqTrGK.js";
2
+ import { t as assertUniqueBy } from "../unique-EwBH1JPB.js";
3
+ import { t as mergeAdapterToolContext } from "../framework-context-DVIIY8ZO.js";
4
+ import { keyBy, mapValues } from "es-toolkit";
5
+ import { dynamicTool } from "ai";
6
+ //#region src/adapters/ai-sdk/create-ai-sdk-tool.ts
7
+ function createAiSdkTool(kernelTool, options = {}) {
8
+ return dynamicTool({
9
+ description: kernelTool.description,
10
+ inputSchema: kernelTool.inputSchema,
11
+ execute: async (input, execOptions) => {
12
+ return runTool(kernelTool, input, await mergeAdapterToolContext(execOptions, options, "abortSignal"));
13
+ }
14
+ });
15
+ }
16
+ function createAiSdkTools(source, options = {}) {
17
+ const tools = resolveTools(source);
18
+ assertUniqueBy(tools, (t) => t.id, (id) => `Duplicate tool id when building AI SDK tools: ${id}`);
19
+ return mapValues(keyBy(tools, (t) => t.id), (tool) => createAiSdkTool(tool, options));
20
+ }
21
+ //#endregion
22
+ export { createAiSdkTool, createAiSdkTools };
23
+
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/adapters/ai-sdk/create-ai-sdk-tool.ts"],"sourcesContent":["import { dynamicTool } from 'ai'\nimport { keyBy, mapValues } from 'es-toolkit'\n\nimport { mergeAdapterToolContext } from '../framework-context'\nimport { resolveTools } from '../../core/resolve-tools'\nimport type { ToolContext, ToolDefinition, ToolSource } from '../../core/types'\nimport { assertUniqueBy } from '../../core/unique'\nimport { runTool } from '../../core/with-auth'\n\ntype AiSdkTool = ReturnType<typeof dynamicTool>\n\n/** Exact execute options supplied by the installed AI SDK. */\nexport type AiSdkExecuteOptions = Parameters<NonNullable<AiSdkTool['execute']>>[1]\n\nexport type AiSdkToolsOptions = {\n\tcontext?: ToolContext\n\tcreateContext?: (options: AiSdkExecuteOptions) => ToolContext | Promise<ToolContext>\n}\n\nexport function createAiSdkTool(kernelTool: ToolDefinition, options: AiSdkToolsOptions = {}): AiSdkTool {\n\treturn dynamicTool({\n\t\tdescription: kernelTool.description,\n\t\tinputSchema: kernelTool.inputSchema,\n\t\texecute: async (input, execOptions) => {\n\t\t\tconst ctx = await mergeAdapterToolContext(execOptions, options, 'abortSignal')\n\t\t\treturn runTool(kernelTool, input, ctx)\n\t\t}\n\t})\n}\n\nexport function createAiSdkTools(source: ToolSource, options: AiSdkToolsOptions = {}): Record<string, AiSdkTool> {\n\tconst tools = resolveTools(source)\n\tassertUniqueBy(\n\t\ttools,\n\t\t(t) => t.id,\n\t\t(id) => `Duplicate tool id when building AI SDK tools: ${id}`\n\t)\n\treturn mapValues(\n\t\tkeyBy(tools, (t) => t.id),\n\t\t(tool) => createAiSdkTool(tool, options)\n\t)\n}\n"],"mappings":";;;;;;AAmBA,SAAgB,gBAAgB,YAA4B,UAA6B,CAAC,GAAc;CACvG,OAAO,YAAY;EAClB,aAAa,WAAW;EACxB,aAAa,WAAW;EACxB,SAAS,OAAO,OAAO,gBAAgB;GAEtC,OAAO,QAAQ,YAAY,OAAO,MADhB,wBAAwB,aAAa,SAAS,aAAa,CACxC;EACtC;CACD,CAAC;AACF;AAEA,SAAgB,iBAAiB,QAAoB,UAA6B,CAAC,GAA8B;CAChH,MAAM,QAAQ,aAAa,MAAM;CACjC,eACC,QACC,MAAM,EAAE,KACR,OAAO,iDAAiD,IAC1D;CACA,OAAO,UACN,MAAM,QAAQ,MAAM,EAAE,EAAE,IACvB,SAAS,gBAAgB,MAAM,OAAO,CACxC;AACD"}
@@ -0,0 +1,44 @@
1
+ import { isPlainObject } from "es-toolkit";
2
+ import { z } from "zod";
3
+ //#region src/shared/artifact.ts
4
+ /** Durable blob handle — bytes never pass through the LLM. */
5
+ const artifactRefSchema = z.object({
6
+ store: z.enum(["object", "host"]).describe("Who owns the bytes. object = bound object storage; host = host-mapped key"),
7
+ key: z.string().min(1).describe("Object key (or host id when store is host)"),
8
+ media_type: z.string().min(1).optional().describe("MIME or format hint when known"),
9
+ filename: z.string().min(1).optional().describe("Original or display file name"),
10
+ byte_length: z.int().min(0).optional().describe("Size in bytes when known")
11
+ });
12
+ /** Find unique ArtifactRefs in a structured tool output, in depth-first order. */
13
+ function findArtifactRefs(output) {
14
+ const artifacts = [];
15
+ const identities = /* @__PURE__ */ new Set();
16
+ const visited = /* @__PURE__ */ new WeakSet();
17
+ const visit = (value) => {
18
+ if (Array.isArray(value)) {
19
+ if (visited.has(value)) return;
20
+ visited.add(value);
21
+ for (const item of value) visit(item);
22
+ return;
23
+ }
24
+ if (!isPlainObject(value)) return;
25
+ if (visited.has(value)) return;
26
+ visited.add(value);
27
+ const parsed = artifactRefSchema.safeParse(value);
28
+ if (parsed.success) {
29
+ const identity = JSON.stringify([parsed.data.store, parsed.data.key]);
30
+ if (!identities.has(identity)) {
31
+ identities.add(identity);
32
+ artifacts.push(parsed.data);
33
+ }
34
+ return;
35
+ }
36
+ for (const item of Object.values(value)) visit(item);
37
+ };
38
+ visit(output);
39
+ return artifacts;
40
+ }
41
+ //#endregion
42
+ export { findArtifactRefs as n, artifactRefSchema as t };
43
+
44
+ //# sourceMappingURL=artifact-D064mHfK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-D064mHfK.js","names":[],"sources":["../src/shared/artifact.ts"],"sourcesContent":["import { isPlainObject } from 'es-toolkit'\nimport { z } from 'zod'\n\n/** Durable blob handle — bytes never pass through the LLM. */\nexport const artifactRefSchema = z.object({\n\tstore: z\n\t\t.enum(['object', 'host'])\n\t\t.describe('Who owns the bytes. object = bound object storage; host = host-mapped key'),\n\tkey: z.string().min(1).describe('Object key (or host id when store is host)'),\n\tmedia_type: z.string().min(1).optional().describe('MIME or format hint when known'),\n\tfilename: z.string().min(1).optional().describe('Original or display file name'),\n\tbyte_length: z.int().min(0).optional().describe('Size in bytes when known')\n})\n\nexport type ArtifactRef = z.infer<typeof artifactRefSchema>\n\n/** Find unique ArtifactRefs in a structured tool output, in depth-first order. */\nexport function findArtifactRefs(output: unknown): ArtifactRef[] {\n\tconst artifacts: ArtifactRef[] = []\n\tconst identities = new Set<string>()\n\tconst visited = new WeakSet<object>()\n\n\tconst visit = (value: unknown): void => {\n\t\tif (Array.isArray(value)) {\n\t\t\tif (visited.has(value)) return\n\t\t\tvisited.add(value)\n\t\t\tfor (const item of value) visit(item)\n\t\t\treturn\n\t\t}\n\t\tif (!isPlainObject(value)) return\n\t\tif (visited.has(value)) return\n\t\tvisited.add(value)\n\n\t\tconst parsed = artifactRefSchema.safeParse(value)\n\t\tif (parsed.success) {\n\t\t\tconst identity = JSON.stringify([parsed.data.store, parsed.data.key])\n\t\t\tif (!identities.has(identity)) {\n\t\t\t\tidentities.add(identity)\n\t\t\t\tartifacts.push(parsed.data)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tfor (const item of Object.values(value)) visit(item)\n\t}\n\n\tvisit(output)\n\treturn artifacts\n}\n"],"mappings":";;;;AAIA,MAAa,oBAAoB,EAAE,OAAO;CACzC,OAAO,EACL,KAAK,CAAC,UAAU,MAAM,CAAC,CAAC,CACxB,SAAS,2EAA2E;CACtF,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,4CAA4C;CAC5E,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,gCAAgC;CAClF,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,+BAA+B;CAC/E,aAAa,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,0BAA0B;AAC3E,CAAC;;AAKD,SAAgB,iBAAiB,QAAgC;CAChE,MAAM,YAA2B,CAAC;CAClC,MAAM,6BAAa,IAAI,IAAY;CACnC,MAAM,0BAAU,IAAI,QAAgB;CAEpC,MAAM,SAAS,UAAyB;EACvC,IAAI,MAAM,QAAQ,KAAK,GAAG;GACzB,IAAI,QAAQ,IAAI,KAAK,GAAG;GACxB,QAAQ,IAAI,KAAK;GACjB,KAAK,MAAM,QAAQ,OAAO,MAAM,IAAI;GACpC;EACD;EACA,IAAI,CAAC,cAAc,KAAK,GAAG;EAC3B,IAAI,QAAQ,IAAI,KAAK,GAAG;EACxB,QAAQ,IAAI,KAAK;EAEjB,MAAM,SAAS,kBAAkB,UAAU,KAAK;EAChD,IAAI,OAAO,SAAS;GACnB,MAAM,WAAW,KAAK,UAAU,CAAC,OAAO,KAAK,OAAO,OAAO,KAAK,GAAG,CAAC;GACpE,IAAI,CAAC,WAAW,IAAI,QAAQ,GAAG;IAC9B,WAAW,IAAI,QAAQ;IACvB,UAAU,KAAK,OAAO,IAAI;GAC3B;GACA;EACD;EAEA,KAAK,MAAM,QAAQ,OAAO,OAAO,KAAK,GAAG,MAAM,IAAI;CACpD;CAEA,MAAM,MAAM;CACZ,OAAO;AACR"}