@tambo-ai/react 0.68.0 → 0.69.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 (326) hide show
  1. package/README.md +1 -1
  2. package/dist/context-helpers/context-helpers.test.js +16 -4
  3. package/dist/context-helpers/context-helpers.test.js.map +1 -1
  4. package/dist/context-helpers/current-interactables-context-helper.d.ts +2 -2
  5. package/dist/context-helpers/current-interactables-context-helper.d.ts.map +1 -1
  6. package/dist/context-helpers/current-interactables-context-helper.js +31 -15
  7. package/dist/context-helpers/current-interactables-context-helper.js.map +1 -1
  8. package/dist/context-helpers/registry.d.ts +2 -2
  9. package/dist/context-helpers/registry.d.ts.map +1 -1
  10. package/dist/context-helpers/registry.js.map +1 -1
  11. package/dist/context-helpers/types.d.ts +2 -2
  12. package/dist/context-helpers/types.d.ts.map +1 -1
  13. package/dist/context-helpers/types.js.map +1 -1
  14. package/dist/hooks/use-message-images.test.js +174 -37
  15. package/dist/hooks/use-message-images.test.js.map +1 -1
  16. package/dist/hooks/use-tambo-voice.d.ts +1 -1
  17. package/dist/hooks/use-tambo-voice.js +1 -1
  18. package/dist/hooks/use-tambo-voice.js.map +1 -1
  19. package/dist/hooks/use-tambo-voice.test.d.ts +2 -0
  20. package/dist/hooks/use-tambo-voice.test.d.ts.map +1 -0
  21. package/dist/hooks/use-tambo-voice.test.js +239 -0
  22. package/dist/hooks/use-tambo-voice.test.js.map +1 -0
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/mcp/elicitation.d.ts.map +1 -1
  27. package/dist/mcp/elicitation.js +12 -0
  28. package/dist/mcp/elicitation.js.map +1 -1
  29. package/dist/mcp/elicitation.test.js +8 -1
  30. package/dist/mcp/elicitation.test.js.map +1 -1
  31. package/dist/mcp/mcp-client.d.ts +6 -10
  32. package/dist/mcp/mcp-client.d.ts.map +1 -1
  33. package/dist/mcp/mcp-client.js.map +1 -1
  34. package/dist/mcp/mcp-hooks.d.ts +12 -60
  35. package/dist/mcp/mcp-hooks.d.ts.map +1 -1
  36. package/dist/mcp/mcp-hooks.js +90 -10
  37. package/dist/mcp/mcp-hooks.js.map +1 -1
  38. package/dist/mcp/mcp-hooks.test.js +423 -0
  39. package/dist/mcp/mcp-hooks.test.js.map +1 -1
  40. package/dist/mcp/tambo-mcp-provider.d.ts.map +1 -1
  41. package/dist/mcp/tambo-mcp-provider.js +3 -0
  42. package/dist/mcp/tambo-mcp-provider.js.map +1 -1
  43. package/dist/mcp/tambo-mcp-provider.test.js +37 -0
  44. package/dist/mcp/tambo-mcp-provider.test.js.map +1 -1
  45. package/dist/model/component-metadata.d.ts +53 -20
  46. package/dist/model/component-metadata.d.ts.map +1 -1
  47. package/dist/model/component-metadata.js.map +1 -1
  48. package/dist/model/tambo-interactable.d.ts +6 -0
  49. package/dist/model/tambo-interactable.d.ts.map +1 -1
  50. package/dist/model/tambo-interactable.js.map +1 -1
  51. package/dist/providers/index.d.ts +1 -1
  52. package/dist/providers/index.d.ts.map +1 -1
  53. package/dist/providers/index.js.map +1 -1
  54. package/dist/providers/tambo-client-provider.d.ts +8 -0
  55. package/dist/providers/tambo-client-provider.d.ts.map +1 -1
  56. package/dist/providers/tambo-client-provider.js +10 -11
  57. package/dist/providers/tambo-client-provider.js.map +1 -1
  58. package/dist/providers/tambo-client-provider.test.d.ts +2 -0
  59. package/dist/providers/tambo-client-provider.test.d.ts.map +1 -0
  60. package/dist/providers/tambo-client-provider.test.js +208 -0
  61. package/dist/providers/tambo-client-provider.test.js.map +1 -0
  62. package/dist/providers/tambo-context-attachment-provider.d.ts +34 -92
  63. package/dist/providers/tambo-context-attachment-provider.d.ts.map +1 -1
  64. package/dist/providers/tambo-context-attachment-provider.js +62 -105
  65. package/dist/providers/tambo-context-attachment-provider.js.map +1 -1
  66. package/dist/providers/tambo-context-attachment-provider.test.js +229 -463
  67. package/dist/providers/tambo-context-attachment-provider.test.js.map +1 -1
  68. package/dist/providers/tambo-interactable-provider.d.ts +2 -0
  69. package/dist/providers/tambo-interactable-provider.d.ts.map +1 -1
  70. package/dist/providers/tambo-interactable-provider.js +29 -4
  71. package/dist/providers/tambo-interactable-provider.js.map +1 -1
  72. package/dist/providers/tambo-interactable-provider.test.js +1 -1
  73. package/dist/providers/tambo-interactable-provider.test.js.map +1 -1
  74. package/dist/providers/tambo-interactables-additional-context.test.js +2 -5
  75. package/dist/providers/tambo-interactables-additional-context.test.js.map +1 -1
  76. package/dist/providers/tambo-provider.d.ts +2 -3
  77. package/dist/providers/tambo-provider.d.ts.map +1 -1
  78. package/dist/providers/tambo-provider.js +5 -6
  79. package/dist/providers/tambo-provider.js.map +1 -1
  80. package/dist/providers/tambo-registry-provider.test.js +16 -0
  81. package/dist/providers/tambo-registry-provider.test.js.map +1 -1
  82. package/dist/providers/tambo-registry-schema-compat.test.js +31 -0
  83. package/dist/providers/tambo-registry-schema-compat.test.js.map +1 -1
  84. package/dist/providers/tambo-thread-input-provider.d.ts +1 -1
  85. package/dist/providers/tambo-thread-input-provider.d.ts.map +1 -1
  86. package/dist/providers/tambo-thread-input-provider.js +5 -1
  87. package/dist/providers/tambo-thread-input-provider.js.map +1 -1
  88. package/dist/providers/tambo-thread-provider-initial-messages.test.js +84 -2
  89. package/dist/providers/tambo-thread-provider-initial-messages.test.js.map +1 -1
  90. package/dist/providers/tambo-thread-provider.d.ts.map +1 -1
  91. package/dist/providers/tambo-thread-provider.js +56 -43
  92. package/dist/providers/tambo-thread-provider.js.map +1 -1
  93. package/dist/providers/tambo-thread-provider.test.js +456 -262
  94. package/dist/providers/tambo-thread-provider.test.js.map +1 -1
  95. package/dist/schema/json-schema.js +29 -29
  96. package/dist/schema/json-schema.js.map +1 -1
  97. package/dist/schema/schema.test.js +237 -0
  98. package/dist/schema/schema.test.js.map +1 -1
  99. package/dist/schema/standard-schema.d.ts +1 -0
  100. package/dist/schema/standard-schema.d.ts.map +1 -1
  101. package/dist/schema/standard-schema.js +18 -13
  102. package/dist/schema/standard-schema.js.map +1 -1
  103. package/dist/schema/standard-schema.test.d.ts +2 -0
  104. package/dist/schema/standard-schema.test.d.ts.map +1 -0
  105. package/dist/schema/standard-schema.test.js +165 -0
  106. package/dist/schema/standard-schema.test.js.map +1 -0
  107. package/dist/schema/validate.test.js +149 -0
  108. package/dist/schema/validate.test.js.map +1 -1
  109. package/dist/schema/zod.d.ts +7 -4
  110. package/dist/schema/zod.d.ts.map +1 -1
  111. package/dist/schema/zod.js +65 -22
  112. package/dist/schema/zod.js.map +1 -1
  113. package/dist/schema/zod.test.js +112 -0
  114. package/dist/schema/zod.test.js.map +1 -1
  115. package/dist/testing/tools.d.ts +4 -1
  116. package/dist/testing/tools.d.ts.map +1 -1
  117. package/dist/testing/tools.js +6 -1
  118. package/dist/testing/tools.js.map +1 -1
  119. package/dist/util/generate-component.d.ts.map +1 -1
  120. package/dist/util/generate-component.js +18 -3
  121. package/dist/util/generate-component.js.map +1 -1
  122. package/dist/util/generate-component.test.d.ts +2 -0
  123. package/dist/util/generate-component.test.d.ts.map +1 -0
  124. package/dist/util/generate-component.test.js +340 -0
  125. package/dist/util/generate-component.test.js.map +1 -0
  126. package/dist/util/is-promise.d.ts +9 -0
  127. package/dist/util/is-promise.d.ts.map +1 -0
  128. package/dist/util/is-promise.js +20 -0
  129. package/dist/util/is-promise.js.map +1 -0
  130. package/dist/util/is-promise.test.d.ts +2 -0
  131. package/dist/util/is-promise.test.d.ts.map +1 -0
  132. package/dist/util/is-promise.test.js +48 -0
  133. package/dist/util/is-promise.test.js.map +1 -0
  134. package/dist/util/query-utils.test.d.ts +2 -0
  135. package/dist/util/query-utils.test.d.ts.map +1 -0
  136. package/dist/util/query-utils.test.js +382 -0
  137. package/dist/util/query-utils.test.js.map +1 -0
  138. package/dist/util/registry-validators.d.ts.map +1 -1
  139. package/dist/util/registry-validators.js +7 -0
  140. package/dist/util/registry-validators.js.map +1 -1
  141. package/dist/util/registry-validators.test.js +57 -0
  142. package/dist/util/registry-validators.test.js.map +1 -1
  143. package/dist/util/registry.d.ts.map +1 -1
  144. package/dist/util/registry.js +9 -0
  145. package/dist/util/registry.js.map +1 -1
  146. package/dist/util/registry.test.js +323 -1
  147. package/dist/util/registry.test.js.map +1 -1
  148. package/dist/util/resource-validators.test.d.ts +2 -0
  149. package/dist/util/resource-validators.test.d.ts.map +1 -0
  150. package/dist/util/resource-validators.test.js +90 -0
  151. package/dist/util/resource-validators.test.js.map +1 -0
  152. package/dist/util/tool-caller.d.ts +2 -2
  153. package/dist/util/tool-caller.d.ts.map +1 -1
  154. package/dist/util/tool-caller.js +8 -8
  155. package/dist/util/tool-caller.js.map +1 -1
  156. package/dist/util/validate-component-name.test.d.ts +2 -0
  157. package/dist/util/validate-component-name.test.d.ts.map +1 -0
  158. package/dist/util/validate-component-name.test.js +35 -0
  159. package/dist/util/validate-component-name.test.js.map +1 -0
  160. package/esm/context-helpers/context-helpers.test.js +16 -4
  161. package/esm/context-helpers/context-helpers.test.js.map +1 -1
  162. package/esm/context-helpers/current-interactables-context-helper.d.ts +2 -2
  163. package/esm/context-helpers/current-interactables-context-helper.d.ts.map +1 -1
  164. package/esm/context-helpers/current-interactables-context-helper.js +31 -15
  165. package/esm/context-helpers/current-interactables-context-helper.js.map +1 -1
  166. package/esm/context-helpers/registry.d.ts +2 -2
  167. package/esm/context-helpers/registry.d.ts.map +1 -1
  168. package/esm/context-helpers/registry.js.map +1 -1
  169. package/esm/context-helpers/types.d.ts +2 -2
  170. package/esm/context-helpers/types.d.ts.map +1 -1
  171. package/esm/context-helpers/types.js.map +1 -1
  172. package/esm/hooks/use-message-images.test.js +174 -37
  173. package/esm/hooks/use-message-images.test.js.map +1 -1
  174. package/esm/hooks/use-tambo-voice.d.ts +1 -1
  175. package/esm/hooks/use-tambo-voice.js +1 -1
  176. package/esm/hooks/use-tambo-voice.js.map +1 -1
  177. package/esm/hooks/use-tambo-voice.test.d.ts +2 -0
  178. package/esm/hooks/use-tambo-voice.test.d.ts.map +1 -0
  179. package/esm/hooks/use-tambo-voice.test.js +234 -0
  180. package/esm/hooks/use-tambo-voice.test.js.map +1 -0
  181. package/esm/index.d.ts +2 -2
  182. package/esm/index.d.ts.map +1 -1
  183. package/esm/index.js.map +1 -1
  184. package/esm/mcp/elicitation.d.ts.map +1 -1
  185. package/esm/mcp/elicitation.js +12 -0
  186. package/esm/mcp/elicitation.js.map +1 -1
  187. package/esm/mcp/elicitation.test.js +8 -1
  188. package/esm/mcp/elicitation.test.js.map +1 -1
  189. package/esm/mcp/mcp-client.d.ts +6 -10
  190. package/esm/mcp/mcp-client.d.ts.map +1 -1
  191. package/esm/mcp/mcp-client.js.map +1 -1
  192. package/esm/mcp/mcp-hooks.d.ts +12 -60
  193. package/esm/mcp/mcp-hooks.d.ts.map +1 -1
  194. package/esm/mcp/mcp-hooks.js +57 -10
  195. package/esm/mcp/mcp-hooks.js.map +1 -1
  196. package/esm/mcp/mcp-hooks.test.js +423 -0
  197. package/esm/mcp/mcp-hooks.test.js.map +1 -1
  198. package/esm/mcp/tambo-mcp-provider.d.ts.map +1 -1
  199. package/esm/mcp/tambo-mcp-provider.js +3 -0
  200. package/esm/mcp/tambo-mcp-provider.js.map +1 -1
  201. package/esm/mcp/tambo-mcp-provider.test.js +37 -0
  202. package/esm/mcp/tambo-mcp-provider.test.js.map +1 -1
  203. package/esm/model/component-metadata.d.ts +53 -20
  204. package/esm/model/component-metadata.d.ts.map +1 -1
  205. package/esm/model/component-metadata.js.map +1 -1
  206. package/esm/model/tambo-interactable.d.ts +6 -0
  207. package/esm/model/tambo-interactable.d.ts.map +1 -1
  208. package/esm/model/tambo-interactable.js.map +1 -1
  209. package/esm/providers/index.d.ts +1 -1
  210. package/esm/providers/index.d.ts.map +1 -1
  211. package/esm/providers/index.js.map +1 -1
  212. package/esm/providers/tambo-client-provider.d.ts +8 -0
  213. package/esm/providers/tambo-client-provider.d.ts.map +1 -1
  214. package/esm/providers/tambo-client-provider.js +11 -12
  215. package/esm/providers/tambo-client-provider.js.map +1 -1
  216. package/esm/providers/tambo-client-provider.test.d.ts +2 -0
  217. package/esm/providers/tambo-client-provider.test.d.ts.map +1 -0
  218. package/esm/providers/tambo-client-provider.test.js +203 -0
  219. package/esm/providers/tambo-client-provider.test.js.map +1 -0
  220. package/esm/providers/tambo-context-attachment-provider.d.ts +34 -92
  221. package/esm/providers/tambo-context-attachment-provider.d.ts.map +1 -1
  222. package/esm/providers/tambo-context-attachment-provider.js +63 -106
  223. package/esm/providers/tambo-context-attachment-provider.js.map +1 -1
  224. package/esm/providers/tambo-context-attachment-provider.test.js +230 -464
  225. package/esm/providers/tambo-context-attachment-provider.test.js.map +1 -1
  226. package/esm/providers/tambo-interactable-provider.d.ts +2 -0
  227. package/esm/providers/tambo-interactable-provider.d.ts.map +1 -1
  228. package/esm/providers/tambo-interactable-provider.js +29 -4
  229. package/esm/providers/tambo-interactable-provider.js.map +1 -1
  230. package/esm/providers/tambo-interactable-provider.test.js +1 -1
  231. package/esm/providers/tambo-interactable-provider.test.js.map +1 -1
  232. package/esm/providers/tambo-interactables-additional-context.test.js +2 -5
  233. package/esm/providers/tambo-interactables-additional-context.test.js.map +1 -1
  234. package/esm/providers/tambo-provider.d.ts +2 -3
  235. package/esm/providers/tambo-provider.d.ts.map +1 -1
  236. package/esm/providers/tambo-provider.js +5 -6
  237. package/esm/providers/tambo-provider.js.map +1 -1
  238. package/esm/providers/tambo-registry-provider.test.js +16 -0
  239. package/esm/providers/tambo-registry-provider.test.js.map +1 -1
  240. package/esm/providers/tambo-registry-schema-compat.test.js +31 -0
  241. package/esm/providers/tambo-registry-schema-compat.test.js.map +1 -1
  242. package/esm/providers/tambo-thread-input-provider.d.ts +1 -1
  243. package/esm/providers/tambo-thread-input-provider.d.ts.map +1 -1
  244. package/esm/providers/tambo-thread-input-provider.js +5 -1
  245. package/esm/providers/tambo-thread-input-provider.js.map +1 -1
  246. package/esm/providers/tambo-thread-provider-initial-messages.test.js +84 -2
  247. package/esm/providers/tambo-thread-provider-initial-messages.test.js.map +1 -1
  248. package/esm/providers/tambo-thread-provider.d.ts.map +1 -1
  249. package/esm/providers/tambo-thread-provider.js +56 -43
  250. package/esm/providers/tambo-thread-provider.js.map +1 -1
  251. package/esm/providers/tambo-thread-provider.test.js +456 -262
  252. package/esm/providers/tambo-thread-provider.test.js.map +1 -1
  253. package/esm/schema/json-schema.js +1 -1
  254. package/esm/schema/json-schema.js.map +1 -1
  255. package/esm/schema/schema.test.js +238 -1
  256. package/esm/schema/schema.test.js.map +1 -1
  257. package/esm/schema/standard-schema.d.ts +1 -0
  258. package/esm/schema/standard-schema.d.ts.map +1 -1
  259. package/esm/schema/standard-schema.js +18 -13
  260. package/esm/schema/standard-schema.js.map +1 -1
  261. package/esm/schema/standard-schema.test.d.ts +2 -0
  262. package/esm/schema/standard-schema.test.d.ts.map +1 -0
  263. package/esm/schema/standard-schema.test.js +130 -0
  264. package/esm/schema/standard-schema.test.js.map +1 -0
  265. package/esm/schema/validate.test.js +149 -0
  266. package/esm/schema/validate.test.js.map +1 -1
  267. package/esm/schema/zod.d.ts +7 -4
  268. package/esm/schema/zod.d.ts.map +1 -1
  269. package/esm/schema/zod.js +65 -22
  270. package/esm/schema/zod.js.map +1 -1
  271. package/esm/schema/zod.test.js +113 -1
  272. package/esm/schema/zod.test.js.map +1 -1
  273. package/esm/testing/tools.d.ts +4 -1
  274. package/esm/testing/tools.d.ts.map +1 -1
  275. package/esm/testing/tools.js +6 -1
  276. package/esm/testing/tools.js.map +1 -1
  277. package/esm/util/generate-component.d.ts.map +1 -1
  278. package/esm/util/generate-component.js +18 -3
  279. package/esm/util/generate-component.js.map +1 -1
  280. package/esm/util/generate-component.test.d.ts +2 -0
  281. package/esm/util/generate-component.test.d.ts.map +1 -0
  282. package/esm/util/generate-component.test.js +302 -0
  283. package/esm/util/generate-component.test.js.map +1 -0
  284. package/esm/util/is-promise.d.ts +9 -0
  285. package/esm/util/is-promise.d.ts.map +1 -0
  286. package/esm/util/is-promise.js +17 -0
  287. package/esm/util/is-promise.js.map +1 -0
  288. package/esm/util/is-promise.test.d.ts +2 -0
  289. package/esm/util/is-promise.test.d.ts.map +1 -0
  290. package/esm/util/is-promise.test.js +46 -0
  291. package/esm/util/is-promise.test.js.map +1 -0
  292. package/esm/util/query-utils.test.d.ts +2 -0
  293. package/esm/util/query-utils.test.d.ts.map +1 -0
  294. package/esm/util/query-utils.test.js +380 -0
  295. package/esm/util/query-utils.test.js.map +1 -0
  296. package/esm/util/registry-validators.d.ts.map +1 -1
  297. package/esm/util/registry-validators.js +7 -0
  298. package/esm/util/registry-validators.js.map +1 -1
  299. package/esm/util/registry-validators.test.js +57 -0
  300. package/esm/util/registry-validators.test.js.map +1 -1
  301. package/esm/util/registry.d.ts.map +1 -1
  302. package/esm/util/registry.js +9 -0
  303. package/esm/util/registry.js.map +1 -1
  304. package/esm/util/registry.test.js +324 -2
  305. package/esm/util/registry.test.js.map +1 -1
  306. package/esm/util/resource-validators.test.d.ts +2 -0
  307. package/esm/util/resource-validators.test.d.ts.map +1 -0
  308. package/esm/util/resource-validators.test.js +88 -0
  309. package/esm/util/resource-validators.test.js.map +1 -0
  310. package/esm/util/tool-caller.d.ts +2 -2
  311. package/esm/util/tool-caller.d.ts.map +1 -1
  312. package/esm/util/tool-caller.js +8 -8
  313. package/esm/util/tool-caller.js.map +1 -1
  314. package/esm/util/validate-component-name.test.d.ts +2 -0
  315. package/esm/util/validate-component-name.test.d.ts.map +1 -0
  316. package/esm/util/validate-component-name.test.js +33 -0
  317. package/esm/util/validate-component-name.test.js.map +1 -0
  318. package/package.json +15 -23
  319. package/dist/schema/alias.d.ts +0 -3
  320. package/dist/schema/alias.d.ts.map +0 -1
  321. package/dist/schema/alias.js +0 -6
  322. package/dist/schema/alias.js.map +0 -1
  323. package/esm/schema/alias.d.ts +0 -3
  324. package/esm/schema/alias.d.ts.map +0 -1
  325. package/esm/schema/alias.js +0 -13
  326. package/esm/schema/alias.js.map +0 -1
@@ -1 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\n * These tests verify that tool schemas are correctly converted to parameter specifications:\n *\n * **New interface (inputSchema)**:\n * - inputSchema should be an object schema (Zod object, Valibot object, JSON Schema object)\n * - Returns an array of parameters extracted from the object's properties\n * - Tool function receives single object argument: tool({ name: \"...\", age: 30 })\n *\n * **Deprecated interface (toolSchema)**:\n * - toolSchema uses z.function().args(...) pattern\n * - Returns positional parameters: param1, param2, etc.\n * - Tool function receives spread arguments: tool(value1, value2)\n */\nimport type { JSONSchema7 } from \"json-schema\";\nimport * as z3 from \"zod/v3\";\nimport * as z4 from \"zod/v4\";\nimport { createMockTool, createMockToolWithToolSchema } from \"../testing/tools\";\nimport { mapTamboToolToContextTool } from \"./registry\";\n\ndescribe(\"getParametersFromToolSchema (via mapTamboToolToContextTool)\", () => {\n describe(\"Deprecated toolSchema interface (Zod function schemas)\", () => {\n it(\"should handle tool with toolSchema\", () => {\n const tool = createMockToolWithToolSchema(\n z3.function().args(z3.string().describe(\"The name\")).returns(z3.void()),\n );\n const result = mapTamboToolToContextTool(tool);\n // Should have at least one parameter (either extracted or wrapped)\n expect(result.parameters.length).toBeGreaterThanOrEqual(1);\n expect(result.name).toBe(\"testTool\");\n expect(result.description).toBe(\"A test tool\");\n });\n\n it(\"should handle toolSchema with multiple args\", () => {\n const tool = createMockToolWithToolSchema(\n z3\n .function()\n .args(\n z3.string().describe(\"First name\"),\n z3.number().describe(\"Age\"),\n z3.boolean().describe(\"Is active\"),\n )\n .returns(z3.void()),\n );\n const result = mapTamboToolToContextTool(tool);\n // Should have parameters (extraction depends on JSON Schema conversion)\n expect(result.parameters.length).toBeGreaterThanOrEqual(1);\n });\n });\n\n describe(\"New inputSchema interface (object schemas)\", () => {\n describe(\"Zod 4 object schemas\", () => {\n it(\"should extract parameters from object schema properties\", () => {\n const tool = createMockTool({\n inputSchema: z4.object({\n name: z4.string().describe(\"User name\"),\n age: z4.number().describe(\"User age\"),\n }),\n outputSchema: z4.boolean(),\n });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n // Parameters should be extracted from object properties\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n expect(nameParam?.description).toBe(\"User name\");\n expect(nameParam?.isRequired).toBe(true);\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n expect(ageParam?.description).toBe(\"User age\");\n expect(ageParam?.isRequired).toBe(true);\n\n expect(result.parameters).toMatchSnapshot();\n });\n\n it(\"should handle complex nested objects\", () => {\n const tool = createMockTool({\n inputSchema: z4.object({\n point: z4.object({ x: z4.number(), y: z4.number() }),\n tags: z4.array(z4.string()),\n color: z4.enum([\"red\", \"green\", \"blue\"]),\n }),\n outputSchema: z4.void(),\n });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(3);\n\n const pointParam = result.parameters.find((p) => p.name === \"point\");\n const tagsParam = result.parameters.find((p) => p.name === \"tags\");\n const colorParam = result.parameters.find((p) => p.name === \"color\");\n\n expect(pointParam).toBeDefined();\n expect(pointParam?.type).toBe(\"object\");\n\n expect(tagsParam).toBeDefined();\n expect(tagsParam?.type).toBe(\"array\");\n\n expect(colorParam).toBeDefined();\n expect(colorParam?.type).toBe(\"string\");\n\n expect(result.parameters).toMatchSnapshot();\n });\n });\n\n describe(\"Zod 3 object schemas\", () => {\n it(\"should extract parameters from object schema properties\", () => {\n const tool = createMockTool({\n inputSchema: z3.object({\n name: z3.string().describe(\"User name\"),\n age: z3.number().describe(\"User age\"),\n }),\n outputSchema: z3.boolean(),\n });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n expect(nameParam?.isRequired).toBe(true);\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n expect(ageParam?.isRequired).toBe(true);\n\n expect(result.parameters).toMatchSnapshot();\n });\n });\n\n describe(\"JSON Schema object schemas\", () => {\n it(\"should extract parameters from object schema properties\", () => {\n const schema: JSONSchema7 = {\n type: \"object\",\n properties: {\n name: { type: \"string\", description: \"User name\" },\n age: { type: \"number\", description: \"User age\" },\n },\n required: [\"name\"],\n description: \"User data\",\n };\n const tool = createMockTool({ inputSchema: schema, outputSchema: {} });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n expect(nameParam?.description).toBe(\"User name\");\n expect(nameParam?.isRequired).toBe(true);\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n expect(ageParam?.description).toBe(\"User age\");\n expect(ageParam?.isRequired).toBe(false);\n\n expect(result.parameters).toMatchSnapshot();\n });\n\n it(\"should handle empty object schema\", () => {\n const schema: JSONSchema7 = {\n type: \"object\",\n properties: {},\n };\n const tool = createMockTool({ inputSchema: schema, outputSchema: {} });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(0);\n });\n });\n });\n\n describe(\"Direct schema (shorthand for inputSchema)\", () => {\n it(\"should accept Zod 4 object schema directly and extract parameters\", () => {\n const tool = createMockTool(\n z4.object({\n name: z4.string(),\n age: z4.number(),\n }),\n );\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n\n expect(result.parameters).toMatchSnapshot();\n });\n\n it(\"should accept Zod 3 object schema directly and extract parameters\", () => {\n const tool = createMockTool(\n z3.object({\n name: z3.string(),\n age: z3.number(),\n }),\n );\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(ageParam).toBeDefined();\n\n expect(result.parameters).toMatchSnapshot();\n });\n\n it(\"should accept JSON Schema object directly and extract parameters\", () => {\n const schema: JSONSchema7 = {\n type: \"object\",\n properties: {\n name: { type: \"string\" },\n age: { type: \"number\" },\n },\n };\n const tool = createMockTool(schema);\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n\n expect(result.parameters).toMatchSnapshot();\n });\n });\n});\n"]}
1
+ {"version":3,"file":"registry.test.js","sourceRoot":"","sources":["../../src/util/registry.test.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,QAAQ,CAAC;AAQ7B,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,YAAY,CAAC;AAEpB,QAAQ,CAAC,6DAA6D,EAAE,GAAG,EAAE;IAC3E,QAAQ,CAAC,wDAAwD,EAAE,GAAG,EAAE;QACtE,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;YAC5C,MAAM,IAAI,GAAG,4BAA4B,CACvC,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,CA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IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,MAAM,GAAG,oBAAoB,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACnE,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Tests for registry utilities:\n * - getParametersFromToolSchema via mapTamboToolToContextTool\n * - convertPropsToJsonSchema\n * - adaptToolFromFnSchema\n * - getComponentFromRegistry\n * - getAvailableComponents\n * - getUnassociatedTools\n */\nimport type { JSONSchema7 } from \"json-schema\";\nimport * as z3 from \"zod/v3\";\nimport * as z4 from \"zod/v4\";\nimport {\n ComponentRegistry,\n RegisteredComponent,\n TamboTool,\n TamboToolAssociations,\n TamboToolRegistry,\n} from \"../model/component-metadata\";\nimport { createMockTool, createMockToolWithToolSchema } from \"../testing/tools\";\nimport {\n adaptToolFromFnSchema,\n convertPropsToJsonSchema,\n getAvailableComponents,\n getComponentFromRegistry,\n getUnassociatedTools,\n mapTamboToolToContextTool,\n} from \"./registry\";\n\ndescribe(\"getParametersFromToolSchema (via mapTamboToolToContextTool)\", () => {\n describe(\"Deprecated toolSchema interface (Zod function schemas)\", () => {\n it(\"should handle tool with toolSchema\", () => {\n const tool = createMockToolWithToolSchema(\n z3.function().args(z3.string().describe(\"The name\")).returns(z3.void()),\n 3,\n );\n const result = mapTamboToolToContextTool(tool);\n // Should have at least one parameter (either extracted or wrapped)\n expect(result.parameters.length).toBeGreaterThanOrEqual(1);\n expect(result.name).toBe(\"testTool\");\n expect(result.description).toBe(\"A test tool\");\n expect(result.maxCalls).toBe(3);\n });\n\n it(\"should handle toolSchema with multiple args\", () => {\n const tool = createMockToolWithToolSchema(\n z3\n .function()\n .args(\n z3.string().describe(\"First name\"),\n z3.number().describe(\"Age\"),\n z3.boolean().describe(\"Is active\"),\n )\n .returns(z3.void()),\n );\n const result = mapTamboToolToContextTool(tool);\n // Should have parameters (extraction depends on JSON Schema conversion)\n expect(result.parameters.length).toBeGreaterThanOrEqual(1);\n });\n });\n\n describe(\"New inputSchema interface (object schemas)\", () => {\n describe(\"Zod 4 object schemas\", () => {\n it(\"should extract parameters from object schema properties\", () => {\n const tool = createMockTool({\n inputSchema: z4.object({\n name: z4.string().describe(\"User name\"),\n age: z4.number().describe(\"User age\"),\n }),\n outputSchema: z4.boolean(),\n maxCalls: 10,\n });\n const result = mapTamboToolToContextTool(tool);\n expect(result.maxCalls).toBe(10);\n expect(result.parameters).toHaveLength(2);\n\n // Parameters should be extracted from object properties\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n expect(nameParam?.description).toBe(\"User name\");\n expect(nameParam?.isRequired).toBe(true);\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n expect(ageParam?.description).toBe(\"User age\");\n expect(ageParam?.isRequired).toBe(true);\n\n expect(result.parameters).toMatchSnapshot();\n });\n\n it(\"should handle complex nested objects\", () => {\n const tool = createMockTool({\n inputSchema: z4.object({\n point: z4.object({ x: z4.number(), y: z4.number() }),\n tags: z4.array(z4.string()),\n color: z4.enum([\"red\", \"green\", \"blue\"]),\n }),\n outputSchema: z4.void(),\n });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(3);\n\n const pointParam = result.parameters.find((p) => p.name === \"point\");\n const tagsParam = result.parameters.find((p) => p.name === \"tags\");\n const colorParam = result.parameters.find((p) => p.name === \"color\");\n\n expect(pointParam).toBeDefined();\n expect(pointParam?.type).toBe(\"object\");\n\n expect(tagsParam).toBeDefined();\n expect(tagsParam?.type).toBe(\"array\");\n\n expect(colorParam).toBeDefined();\n expect(colorParam?.type).toBe(\"string\");\n\n expect(result.parameters).toMatchSnapshot();\n });\n });\n\n describe(\"Zod 3 object schemas\", () => {\n it(\"should extract parameters from object schema properties\", () => {\n const tool = createMockTool({\n inputSchema: z3.object({\n name: z3.string().describe(\"User name\"),\n age: z3.number().describe(\"User age\"),\n }),\n outputSchema: z3.boolean(),\n });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n expect(nameParam?.isRequired).toBe(true);\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n expect(ageParam?.isRequired).toBe(true);\n\n expect(result.parameters).toMatchSnapshot();\n });\n });\n\n describe(\"JSON Schema object schemas\", () => {\n it(\"should extract parameters from object schema properties\", () => {\n const schema: JSONSchema7 = {\n type: \"object\",\n properties: {\n name: { type: \"string\", description: \"User name\" },\n age: { type: \"number\", description: \"User age\" },\n },\n required: [\"name\"],\n description: \"User data\",\n };\n const tool = createMockTool({ inputSchema: schema, outputSchema: {} });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n expect(nameParam?.description).toBe(\"User name\");\n expect(nameParam?.isRequired).toBe(true);\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n expect(ageParam?.description).toBe(\"User age\");\n expect(ageParam?.isRequired).toBe(false);\n\n expect(result.parameters).toMatchSnapshot();\n });\n\n it(\"should handle empty object schema\", () => {\n const schema: JSONSchema7 = {\n type: \"object\",\n properties: {},\n };\n const tool = createMockTool({ inputSchema: schema, outputSchema: {} });\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(0);\n });\n });\n });\n\n describe(\"Direct schema (shorthand for inputSchema)\", () => {\n it(\"should accept Zod 4 object schema directly and extract parameters\", () => {\n const tool = createMockTool(\n z4.object({\n name: z4.string(),\n age: z4.number(),\n }),\n );\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n\n expect(result.parameters).toMatchSnapshot();\n });\n\n it(\"should accept Zod 3 object schema directly and extract parameters\", () => {\n const tool = createMockTool(\n z3.object({\n name: z3.string(),\n age: z3.number(),\n }),\n );\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(ageParam).toBeDefined();\n\n expect(result.parameters).toMatchSnapshot();\n });\n\n it(\"should accept JSON Schema object directly and extract parameters\", () => {\n const schema: JSONSchema7 = {\n type: \"object\",\n properties: {\n name: { type: \"string\" },\n age: { type: \"number\" },\n },\n };\n const tool = createMockTool(schema);\n const result = mapTamboToolToContextTool(tool);\n expect(result.parameters).toHaveLength(2);\n\n const nameParam = result.parameters.find((p) => p.name === \"name\");\n const ageParam = result.parameters.find((p) => p.name === \"age\");\n\n expect(nameParam).toBeDefined();\n expect(nameParam?.type).toBe(\"string\");\n\n expect(ageParam).toBeDefined();\n expect(ageParam?.type).toBe(\"number\");\n\n expect(result.parameters).toMatchSnapshot();\n });\n });\n});\n\ndescribe(\"registry util: maxCalls\", () => {\n it(\"adaptToolFromFnSchema preserves maxCalls for legacy toolSchema\", () => {\n const legacy = createMockToolWithToolSchema(\n z3.function().args(z3.string()).returns(z3.string()),\n 2,\n );\n const adapted = adaptToolFromFnSchema(legacy);\n expect(adapted.maxCalls).toBe(2);\n });\n\n it(\"mapTamboToolToContextTool includes maxCalls when present\", () => {\n const tool = createMockTool({\n inputSchema: z3.object({ q: z3.string() }),\n maxCalls: 5,\n });\n const meta = mapTamboToolToContextTool(tool);\n expect(meta.maxCalls).toBe(5);\n });\n\n it(\"getUnassociatedTools does not drop unassociated tools and preserves maxCalls\", () => {\n const t1: TamboTool = {\n name: \"a\",\n description: \"a\",\n tool: () => {},\n inputSchema: {},\n outputSchema: {},\n maxCalls: 3,\n };\n const registry = { a: t1 };\n const associations = { SomeComponent: [] as string[] };\n const out = getUnassociatedTools(registry, associations);\n expect(out.find((t) => t.name === \"a\")?.maxCalls).toBe(3);\n });\n});\n\ndescribe(\"registry util: annotations\", () => {\n it(\"mapTamboToolToContextTool includes annotations when present\", () => {\n const tool: TamboTool = {\n name: \"read-only-tool\",\n description: \"A tool that can be called with partial args\",\n tool: () => {},\n inputSchema: z3.object({ text: z3.string() }),\n outputSchema: z3.string(),\n annotations: { readOnlyHint: true },\n };\n const meta = mapTamboToolToContextTool(tool);\n expect(meta.annotations).toEqual({ readOnlyHint: true });\n });\n\n it(\"mapTamboToolToContextTool does not include annotations when undefined\", () => {\n const tool: TamboTool = {\n name: \"regular-tool\",\n description: \"A regular tool\",\n tool: () => {},\n inputSchema: z3.object({ text: z3.string() }),\n outputSchema: z3.string(),\n };\n const meta = mapTamboToolToContextTool(tool);\n expect(meta.annotations).toBeUndefined();\n });\n\n it(\"mapTamboToolToContextTool includes annotations with readOnlyHint: false when explicitly set\", () => {\n const tool: TamboTool = {\n name: \"explicit-non-read-only-tool\",\n description: \"A tool explicitly marked as non-read-only\",\n tool: () => {},\n inputSchema: z3.object({ text: z3.string() }),\n outputSchema: z3.string(),\n annotations: { readOnlyHint: false },\n };\n const meta = mapTamboToolToContextTool(tool);\n expect(meta.annotations).toEqual({ readOnlyHint: false });\n });\n\n it(\"getUnassociatedTools preserves annotations\", () => {\n const tool: TamboTool = {\n name: \"streaming-tool\",\n description: \"A streaming tool\",\n tool: () => {},\n inputSchema: {},\n outputSchema: {},\n annotations: { readOnlyHint: true },\n };\n const registry = { \"streaming-tool\": tool };\n const associations = { SomeComponent: [] as string[] };\n const out = getUnassociatedTools(registry, associations);\n expect(out.find((t) => t.name === \"streaming-tool\")?.annotations).toEqual({\n readOnlyHint: true,\n });\n });\n\n it(\"mapTamboToolToContextTool includes tamboStreamableHint annotation\", () => {\n const tool: TamboTool = {\n name: \"streamable-tool\",\n description: \"A tool safe to call during streaming\",\n tool: () => {},\n inputSchema: z3.object({ text: z3.string() }),\n outputSchema: z3.string(),\n annotations: { tamboStreamableHint: true },\n };\n const meta = mapTamboToolToContextTool(tool);\n expect(meta.annotations).toEqual({ tamboStreamableHint: true });\n });\n\n it(\"mapTamboToolToContextTool preserves multiple combined annotations\", () => {\n const tool: TamboTool = {\n name: \"combined-annotations-tool\",\n description: \"A tool with multiple annotations\",\n tool: () => {},\n inputSchema: z3.object({ text: z3.string() }),\n outputSchema: z3.string(),\n annotations: { readOnlyHint: true, tamboStreamableHint: true },\n };\n const meta = mapTamboToolToContextTool(tool);\n expect(meta.annotations).toEqual({\n readOnlyHint: true,\n tamboStreamableHint: true,\n });\n });\n});\n\ndescribe(\"convertPropsToJsonSchema\", () => {\n it(\"should return undefined when component has no props\", () => {\n const component = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => null,\n props: undefined,\n contextTools: [],\n } as unknown as RegisteredComponent;\n expect(convertPropsToJsonSchema(component)).toBeUndefined();\n });\n\n it(\"should convert Standard Schema (Zod) props to JSON Schema\", () => {\n const zodSchema = z4.object({\n title: z4.string(),\n count: z4.number(),\n });\n const component = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => null,\n props: zodSchema,\n contextTools: [],\n } as unknown as RegisteredComponent;\n const result = convertPropsToJsonSchema(component);\n expect(result).toEqual(\n expect.objectContaining({\n type: \"object\",\n properties: expect.objectContaining({\n title: expect.objectContaining({ type: \"string\" }),\n count: expect.objectContaining({ type: \"number\" }),\n }),\n }),\n );\n });\n\n it(\"should pass through JSON Schema props as-is\", () => {\n const jsonSchema: JSONSchema7 = {\n type: \"object\",\n properties: {\n title: { type: \"string\" },\n count: { type: \"number\" },\n },\n };\n const component = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => null,\n props: jsonSchema,\n contextTools: [],\n } as unknown as RegisteredComponent;\n const result = convertPropsToJsonSchema(component);\n expect(result).toBe(jsonSchema); // Should be the same reference\n });\n\n it(\"should pass through unknown format as-is\", () => {\n const unknownFormat = { custom: \"format\", notStandard: true };\n const component = {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => null,\n props: unknownFormat as unknown,\n contextTools: [],\n } as RegisteredComponent;\n const result = convertPropsToJsonSchema(component);\n expect(result).toBe(unknownFormat);\n });\n});\n\ndescribe(\"adaptToolFromFnSchema\", () => {\n it(\"should return tool unchanged when it has inputSchema (new interface)\", () => {\n const tool = createMockTool({\n inputSchema: z4.object({ name: z4.string() }),\n outputSchema: z4.string(),\n });\n const result = adaptToolFromFnSchema(tool);\n expect(result).toBe(tool); // Same reference\n expect(result.inputSchema).toBeDefined();\n });\n\n it(\"should adapt toolSchema to inputSchema/outputSchema\", () => {\n const tool = createMockToolWithToolSchema(\n z3\n .function()\n .args(z3.string().describe(\"Name\"), z3.number().describe(\"Age\"))\n .returns(z3.boolean()),\n );\n const result = adaptToolFromFnSchema(tool);\n expect(result.inputSchema).toBeDefined();\n expect(result.outputSchema).toBeDefined();\n expect(\"toolSchema\" in result).toBe(false);\n });\n});\n\ndescribe(\"getComponentFromRegistry\", () => {\n const mockRegistry: ComponentRegistry = {\n TestComponent: {\n name: \"TestComponent\",\n description: \"A test component\",\n component: () => null,\n props: { type: \"object\" },\n contextTools: [],\n },\n AnotherComponent: {\n name: \"AnotherComponent\",\n description: \"Another component\",\n component: () => null,\n props: { type: \"object\" },\n contextTools: [],\n },\n };\n\n it(\"should return component when found in registry\", () => {\n const result = getComponentFromRegistry(\"TestComponent\", mockRegistry);\n expect(result.name).toBe(\"TestComponent\");\n expect(result.description).toBe(\"A test component\");\n });\n\n it(\"should throw error when component not found\", () => {\n expect(() => getComponentFromRegistry(\"NonExistent\", mockRegistry)).toThrow(\n \"Tambo tried to use Component NonExistent, but it was not found\",\n );\n });\n\n it(\"should be case-sensitive for component names\", () => {\n expect(() =>\n getComponentFromRegistry(\"testcomponent\", mockRegistry),\n ).toThrow(\n \"Tambo tried to use Component testcomponent, but it was not found\",\n );\n });\n});\n\ndescribe(\"getAvailableComponents\", () => {\n const mockComponent = () => null;\n\n const mockRegistry: ComponentRegistry = {\n TestComponent: {\n name: \"TestComponent\",\n description: \"A test component\",\n component: mockComponent,\n props: { type: \"object\", properties: { title: { type: \"string\" } } },\n contextTools: [],\n },\n };\n\n const mockTool = createMockTool({\n inputSchema: z4.object({ query: z4.string() }),\n outputSchema: z4.string(),\n });\n mockTool.name = \"testTool\";\n\n const mockToolRegistry: TamboToolRegistry = {\n testTool: mockTool,\n };\n\n it(\"should return available components with no tools when no associations\", () => {\n const associations: TamboToolAssociations = {};\n const result = getAvailableComponents(\n mockRegistry,\n mockToolRegistry,\n associations,\n );\n\n expect(result).toHaveLength(1);\n expect(result[0].name).toBe(\"TestComponent\");\n expect(result[0].description).toBe(\"A test component\");\n expect(result[0].contextTools).toHaveLength(0);\n });\n\n it(\"should include associated tools with components\", () => {\n const associations: TamboToolAssociations = {\n TestComponent: [\"testTool\"],\n };\n const result = getAvailableComponents(\n mockRegistry,\n mockToolRegistry,\n associations,\n );\n\n expect(result).toHaveLength(1);\n expect(result[0].contextTools).toHaveLength(1);\n expect(result[0].contextTools?.[0].name).toBe(\"testTool\");\n });\n\n it(\"should skip tools not found in registry\", () => {\n const associations: TamboToolAssociations = {\n TestComponent: [\"testTool\", \"nonExistentTool\"],\n };\n const result = getAvailableComponents(\n mockRegistry,\n mockToolRegistry,\n associations,\n );\n\n expect(result[0].contextTools).toHaveLength(1);\n expect(result[0].contextTools?.[0].name).toBe(\"testTool\");\n });\n\n it(\"should handle empty registries\", () => {\n const result = getAvailableComponents({}, {}, {});\n expect(result).toHaveLength(0);\n });\n});\n\ndescribe(\"getUnassociatedTools\", () => {\n const mockTool1 = createMockTool({\n inputSchema: z4.object({ a: z4.string() }),\n outputSchema: z4.void(),\n });\n mockTool1.name = \"tool1\";\n\n const mockTool2 = createMockTool({\n inputSchema: z4.object({ b: z4.string() }),\n outputSchema: z4.void(),\n });\n mockTool2.name = \"tool2\";\n\n const mockTool3 = createMockTool({\n inputSchema: z4.object({ c: z4.string() }),\n outputSchema: z4.void(),\n });\n mockTool3.name = \"tool3\";\n\n const mockToolRegistry: TamboToolRegistry = {\n tool1: mockTool1,\n tool2: mockTool2,\n tool3: mockTool3,\n };\n\n it(\"should return all tools when no associations exist\", () => {\n const associations: TamboToolAssociations = {};\n const result = getUnassociatedTools(mockToolRegistry, associations);\n\n expect(result).toHaveLength(3);\n expect(result.map((t) => t.name)).toEqual(\n expect.arrayContaining([\"tool1\", \"tool2\", \"tool3\"]),\n );\n });\n\n it(\"should exclude tools that are associated with components\", () => {\n const associations: TamboToolAssociations = {\n ComponentA: [\"tool1\"],\n ComponentB: [\"tool2\"],\n };\n const result = getUnassociatedTools(mockToolRegistry, associations);\n\n expect(result).toHaveLength(1);\n expect(result[0].name).toBe(\"tool3\");\n });\n\n it(\"should return empty array when all tools are associated\", () => {\n const associations: TamboToolAssociations = {\n ComponentA: [\"tool1\", \"tool2\", \"tool3\"],\n };\n const result = getUnassociatedTools(mockToolRegistry, associations);\n\n expect(result).toHaveLength(0);\n });\n\n it(\"should handle empty tool registry\", () => {\n const result = getUnassociatedTools({}, { ComponentA: [\"tool1\"] });\n expect(result).toHaveLength(0);\n });\n});\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resource-validators.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-validators.test.d.ts","sourceRoot":"","sources":["../../src/util/resource-validators.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,88 @@
1
+ import { validateResource, validateResourceSource, } from "./resource-validators";
2
+ describe("validateResourceSource", () => {
3
+ it("should throw when has listResources but not getResource", () => {
4
+ const listResources = async () => [];
5
+ const getResource = undefined;
6
+ expect(() => {
7
+ validateResourceSource(listResources, getResource);
8
+ }).toThrow("Both listResources and getResource must be provided together, or neither should be provided. " +
9
+ "Got: listResources=defined, getResource=undefined");
10
+ });
11
+ it("should throw when has getResource but not listResources", () => {
12
+ const listResources = undefined;
13
+ const getResource = async () => ({
14
+ contents: [
15
+ {
16
+ uri: "https://resource",
17
+ mimeType: "text/plain",
18
+ text: "test",
19
+ },
20
+ ],
21
+ });
22
+ expect(() => {
23
+ validateResourceSource(listResources, getResource);
24
+ }).toThrow("Both listResources and getResource must be provided together, or neither should be provided. " +
25
+ "Got: listResources=undefined, getResource=defined");
26
+ });
27
+ it("should not throw when both listResources and getResource are provided", () => {
28
+ const listResources = async () => [];
29
+ const getResource = async () => ({
30
+ contents: [
31
+ {
32
+ uri: "https://resource",
33
+ mimeType: "text/plain",
34
+ text: "test",
35
+ },
36
+ ],
37
+ });
38
+ expect(() => {
39
+ validateResourceSource(listResources, getResource);
40
+ }).not.toThrow();
41
+ });
42
+ it("should not throw when neither listResources nor getResource are provided", () => {
43
+ const listResources = undefined;
44
+ const getResource = undefined;
45
+ expect(() => {
46
+ validateResourceSource(listResources, getResource);
47
+ }).not.toThrow();
48
+ });
49
+ });
50
+ describe("validateResource", () => {
51
+ it("should throw when resource is missing uri field", () => {
52
+ const resource = {
53
+ name: "Test Resource",
54
+ };
55
+ expect(() => {
56
+ validateResource(resource);
57
+ }).toThrow("Resource must have a 'uri' field");
58
+ });
59
+ it("should throw when resource is missing name field", () => {
60
+ const resource = {
61
+ uri: "https://resource",
62
+ };
63
+ expect(() => {
64
+ validateResource(resource);
65
+ }).toThrow("Resource with URI 'https://resource' must have a 'name' field");
66
+ });
67
+ it("should not throw when resource has both uri and name fields", () => {
68
+ const resource = {
69
+ uri: "https://resource",
70
+ name: "Test Resource",
71
+ };
72
+ expect(() => {
73
+ validateResource(resource);
74
+ }).not.toThrow();
75
+ });
76
+ it("should not throw when resource has uri, name, and optional fields", () => {
77
+ const resource = {
78
+ uri: "https://resource",
79
+ name: "Test Resource",
80
+ description: "A test resource",
81
+ mimeType: "text/plain",
82
+ };
83
+ expect(() => {
84
+ validateResource(resource);
85
+ }).not.toThrow();
86
+ });
87
+ });
88
+ //# sourceMappingURL=resource-validators.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-validators.test.js","sourceRoot":"","sources":["../../src/util/resource-validators.test.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;QACrC,MAAM,WAAW,GAAG,SAAS,CAAC;QAE9B,MAAM,CAAC,GAAG,EAAE;YACV,sBAAsB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC,OAAO,CACR,+FAA+F;YAC7F,mDAAmD,CACtD,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,aAAa,GAAG,SAAS,CAAC;QAChC,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE,CAAC,CAAC;YAC/B,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,kBAAkB;oBACvB,QAAQ,EAAE,YAAY;oBACtB,IAAI,EAAE,MAAM;iBACb;aACF;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,GAAG,EAAE;YACV,sBAAsB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC,OAAO,CACR,+FAA+F;YAC7F,mDAAmD,CACtD,CAAC;IAC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AQ,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC,OAAO,CAAC,+DAA+D,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACrE,MAAM,QAAQ,GAAqB;YACjC,GAAG,EAAE,kBAAkB;YACvB,IAAI,EAAE,eAAe;SACtB,CAAC;QAEF,MAAM,CAAC,GAAG,EAAE;YACV,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;QAC3E,MAAM,QAAQ,GAAqB;YACjC,GAAG,EAAE,kBAAkB;YACvB,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,iBAAiB;YAC9B,QAAQ,EAAE,YAAY;SACvB,CAAC;QAEF,MAAM,CAAC,GAAG,EAAE;YACV,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import type { ListResourceItem } from \"../model/resource-info\";\nimport {\n validateResource,\n validateResourceSource,\n} from \"./resource-validators\";\n\ndescribe(\"validateResourceSource\", () => {\n it(\"should throw when has listResources but not getResource\", () => {\n const listResources = async () => [];\n const getResource = undefined;\n\n expect(() => {\n validateResourceSource(listResources, getResource);\n }).toThrow(\n \"Both listResources and getResource must be provided together, or neither should be provided. \" +\n \"Got: listResources=defined, getResource=undefined\",\n );\n });\n\n it(\"should throw when has getResource but not listResources\", () => {\n const listResources = undefined;\n const getResource = async () => ({\n contents: [\n {\n uri: \"https://resource\",\n mimeType: \"text/plain\",\n text: \"test\",\n },\n ],\n });\n\n expect(() => {\n validateResourceSource(listResources, getResource);\n }).toThrow(\n \"Both listResources and getResource must be provided together, or neither should be provided. \" +\n \"Got: listResources=undefined, getResource=defined\",\n );\n });\n\n it(\"should not throw when both listResources and getResource are provided\", () => {\n const listResources = async () => [];\n const getResource = async () => ({\n contents: [\n {\n uri: \"https://resource\",\n mimeType: \"text/plain\",\n text: \"test\",\n },\n ],\n });\n\n expect(() => {\n validateResourceSource(listResources, getResource);\n }).not.toThrow();\n });\n\n it(\"should not throw when neither listResources nor getResource are provided\", () => {\n const listResources = undefined;\n const getResource = undefined;\n\n expect(() => {\n validateResourceSource(listResources, getResource);\n }).not.toThrow();\n });\n});\n\ndescribe(\"validateResource\", () => {\n it(\"should throw when resource is missing uri field\", () => {\n const resource = {\n name: \"Test Resource\",\n } as ListResourceItem;\n\n expect(() => {\n validateResource(resource);\n }).toThrow(\"Resource must have a 'uri' field\");\n });\n\n it(\"should throw when resource is missing name field\", () => {\n const resource = {\n uri: \"https://resource\",\n } as ListResourceItem;\n\n expect(() => {\n validateResource(resource);\n }).toThrow(\"Resource with URI 'https://resource' must have a 'name' field\");\n });\n\n it(\"should not throw when resource has both uri and name fields\", () => {\n const resource: ListResourceItem = {\n uri: \"https://resource\",\n name: \"Test Resource\",\n };\n\n expect(() => {\n validateResource(resource);\n }).not.toThrow();\n });\n\n it(\"should not throw when resource has uri, name, and optional fields\", () => {\n const resource: ListResourceItem = {\n uri: \"https://resource\",\n name: \"Test Resource\",\n description: \"A test resource\",\n mimeType: \"text/plain\",\n };\n\n expect(() => {\n validateResource(resource);\n }).not.toThrow();\n });\n});\n"]}
@@ -2,11 +2,11 @@ import TamboAI from "@tambo-ai/typescript-sdk";
2
2
  import { TamboTool, TamboToolRegistry, TamboToolWithToolSchema } from "../model/component-metadata";
3
3
  /**
4
4
  * Process a message from the thread, invoking the appropriate tool and returning the result.
5
- * @param message - The message to handle
5
+ * @param toolCallRequest - The message to handle
6
6
  * @param toolRegistry - The tool registry
7
7
  * @returns The result of the tool call along with the tool definition
8
8
  */
9
- export declare const handleToolCall: (message: TamboAI.Beta.Threads.ThreadMessage, toolRegistry: TamboToolRegistry, onCallUnregisteredTool?: (toolName: string, args: TamboAI.ToolCallParameter[]) => Promise<string>) => Promise<{
9
+ export declare const handleToolCall: (toolCallRequest: TamboAI.ToolCallRequest, toolRegistry: TamboToolRegistry, onCallUnregisteredTool?: (toolName: string, args: TamboAI.ToolCallParameter[]) => Promise<string>) => Promise<{
10
10
  result: unknown;
11
11
  error?: string;
12
12
  tamboTool?: TamboTool | TamboToolWithToolSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"tool-caller.d.ts","sourceRoot":"","sources":["../../src/util/tool-caller.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAEL,SAAS,EACT,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAIrC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAC3C,cAAc,iBAAiB,EAC/B,yBAAyB,CACvB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,CAAC,iBAAiB,EAAE,KAC9B,OAAO,CAAC,MAAM,CAAC,KACnB,OAAO,CAAC;IACT,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,GAAG,uBAAuB,CAAC;CACjD,CAmCA,CAAC"}
1
+ {"version":3,"file":"tool-caller.d.ts","sourceRoot":"","sources":["../../src/util/tool-caller.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAEL,SAAS,EACT,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAIrC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,iBAAiB,OAAO,CAAC,eAAe,EACxC,cAAc,iBAAiB,EAC/B,yBAAyB,CACvB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,CAAC,iBAAiB,EAAE,KAC9B,OAAO,CAAC,MAAM,CAAC,KACnB,OAAO,CAAC;IACT,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,GAAG,uBAAuB,CAAC;CACjD,CAiCA,CAAC"}
@@ -2,34 +2,34 @@ import { hasInputSchema } from "../schema";
2
2
  import { mapTamboToolToContextTool } from "./registry";
3
3
  /**
4
4
  * Process a message from the thread, invoking the appropriate tool and returning the result.
5
- * @param message - The message to handle
5
+ * @param toolCallRequest - The message to handle
6
6
  * @param toolRegistry - The tool registry
7
7
  * @returns The result of the tool call along with the tool definition
8
8
  */
9
- export const handleToolCall = async (message, toolRegistry, onCallUnregisteredTool) => {
10
- if (!message?.toolCallRequest?.toolName) {
9
+ export const handleToolCall = async (toolCallRequest, toolRegistry, onCallUnregisteredTool) => {
10
+ if (!toolCallRequest?.toolName) {
11
11
  throw new Error("Tool name is required");
12
12
  }
13
13
  try {
14
- const { tool, tamboTool } = findTool(message.toolCallRequest.toolName, toolRegistry);
14
+ const { tool, tamboTool } = findTool(toolCallRequest.toolName, toolRegistry);
15
15
  if (!tool) {
16
16
  if (onCallUnregisteredTool) {
17
- const result = await onCallUnregisteredTool(message.toolCallRequest.toolName, message.toolCallRequest.parameters);
17
+ const result = await onCallUnregisteredTool(toolCallRequest.toolName, toolCallRequest.parameters);
18
18
  return {
19
19
  result,
20
20
  };
21
21
  }
22
- throw new Error(`Tool ${message.toolCallRequest.toolName} not found in registry`);
22
+ throw new Error(`Tool ${toolCallRequest.toolName} not found in registry`);
23
23
  }
24
24
  return {
25
- result: await runToolChoice(message.toolCallRequest, tool, tamboTool),
25
+ result: await runToolChoice(toolCallRequest, tool, tamboTool),
26
26
  tamboTool,
27
27
  };
28
28
  }
29
29
  catch (error) {
30
30
  console.error("Error in calling tool: ", error);
31
31
  return {
32
- result: `When attempting to call tool ${message.toolCallRequest.toolName} the following error occurred: ${error}. Explain to the user that the tool call failed and try again if needed.`,
32
+ result: `When attempting to call tool ${toolCallRequest.toolName} the following error occurred: ${error}. Explain to the user that the tool call failed and try again if needed.`,
33
33
  error: error instanceof Error ? error.message : "Unknown error",
34
34
  };
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tool-caller.js","sourceRoot":"","sources":["../../src/util/tool-caller.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,OAA2C,EAC3C,YAA+B,EAC/B,sBAGoB,EAKnB,EAAE;IACH,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,QAAQ,CAClC,OAAO,CAAC,eAAe,CAAC,QAAQ,EAChC,YAAY,CACb,CAAC;QACF,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,sBAAsB,EAAE,CAAC;gBAC3B,MAAM,MAAM,GAAG,MAAM,sBAAsB,CACzC,OAAO,CAAC,eAAe,CAAC,QAAQ,EAChC,OAAO,CAAC,eAAe,CAAC,UAAU,CACnC,CAAC;gBACF,OAAO;oBACL,MAAM;iBACP,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,KAAK,CACb,QAAQ,OAAO,CAAC,eAAe,CAAC,QAAQ,wBAAwB,CACjE,CAAC;QACJ,CAAC;QACD,OAAO;YACL,MAAM,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC,eAAe,EAAE,IAAI,EAAE,SAAS,CAAC;YACrE,SAAS;SACV,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,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AG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACxE,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["import TamboAI from \"@tambo-ai/typescript-sdk\";\nimport {\n ComponentContextTool,\n TamboTool,\n TamboToolRegistry,\n TamboToolWithToolSchema,\n} from \"../model/component-metadata\";\nimport { hasInputSchema } from \"../schema\";\nimport { mapTamboToolToContextTool } from \"./registry\";\n\n/**\n * Process a message from the thread, invoking the appropriate tool and returning the result.\n * @param message - The message to handle\n * @param toolRegistry - The tool registry\n * @returns The result of the tool call along with the tool definition\n */\nexport const handleToolCall = async (\n message: TamboAI.Beta.Threads.ThreadMessage,\n toolRegistry: TamboToolRegistry,\n onCallUnregisteredTool?: (\n toolName: string,\n args: TamboAI.ToolCallParameter[],\n ) => Promise<string>,\n): Promise<{\n result: unknown;\n error?: string;\n tamboTool?: TamboTool | TamboToolWithToolSchema;\n}> => {\n if (!message?.toolCallRequest?.toolName) {\n throw new Error(\"Tool name is required\");\n }\n\n try {\n const { tool, tamboTool } = findTool(\n message.toolCallRequest.toolName,\n toolRegistry,\n );\n if (!tool) {\n if (onCallUnregisteredTool) {\n const result = await onCallUnregisteredTool(\n message.toolCallRequest.toolName,\n message.toolCallRequest.parameters,\n );\n return {\n result,\n };\n }\n throw new Error(\n `Tool ${message.toolCallRequest.toolName} not found in registry`,\n );\n }\n return {\n result: await runToolChoice(message.toolCallRequest, tool, tamboTool),\n tamboTool,\n };\n } catch (error) {\n console.error(\"Error in calling tool: \", error);\n return {\n result: `When attempting to call tool ${message.toolCallRequest.toolName} the following error occurred: ${error}. Explain to the user that the tool call failed and try again if needed.`,\n error: error instanceof Error ? error.message : \"Unknown error\",\n };\n }\n};\n\nconst findTool = (\n toolName: string,\n toolRegistry: TamboToolRegistry,\n):\n | {\n tool: ComponentContextTool;\n tamboTool: TamboTool | TamboToolWithToolSchema;\n }\n | { tool: null; tamboTool: null } => {\n const registryTool = toolRegistry[toolName];\n\n if (!registryTool) {\n return { tool: null, tamboTool: null };\n }\n\n const contextTool = mapTamboToolToContextTool(registryTool);\n return {\n tool: {\n getComponentContext: registryTool.tool,\n definition: contextTool,\n },\n tamboTool: registryTool,\n };\n};\n\nconst runToolChoice = async (\n toolCallRequest: TamboAI.ToolCallRequest,\n tool: ComponentContextTool,\n tamboTool: TamboTool | TamboToolWithToolSchema,\n): Promise<unknown> => {\n const parameters = toolCallRequest.parameters ?? [];\n\n // New interface (inputSchema): pass single object argument\n if (hasInputSchema(tamboTool)) {\n // Reconstruct the object from parameter name-value pairs\n const inputObject = Object.fromEntries(\n parameters.map((param) => [param.parameterName, param.parameterValue]),\n );\n return await tool.getComponentContext(inputObject);\n }\n\n // Deprecated interface (toolSchema): spread positional arguments\n const parameterValues = parameters.map((param) => param.parameterValue);\n return await tool.getComponentContext(...parameterValues);\n};\n"]}
1
+ {"version":3,"file":"tool-caller.js","sourceRoot":"","sources":["../../src/util/tool-caller.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,eAAwC,EACxC,YAA+B,EAC/B,sBAGoB,EAKnB,EAAE;IACH,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,QAAQ,CAClC,eAAe,CAAC,QAAQ,EACxB,YAAY,CACb,CAAC;QACF,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,sBAAsB,EAAE,CAAC;gBAC3B,MAAM,MAAM,GAAG,MAAM,sBAAsB,CACz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3D,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,yDAAyD;QACzD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CACpC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CACvE,CAAC;QACF,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;IAED,iEAAiE;IACjE,MAAM,eAAe,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACxE,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["import TamboAI from \"@tambo-ai/typescript-sdk\";\nimport {\n ComponentContextTool,\n TamboTool,\n TamboToolRegistry,\n TamboToolWithToolSchema,\n} from \"../model/component-metadata\";\nimport { hasInputSchema } from \"../schema\";\nimport { mapTamboToolToContextTool } from \"./registry\";\n\n/**\n * Process a message from the thread, invoking the appropriate tool and returning the result.\n * @param toolCallRequest - The message to handle\n * @param toolRegistry - The tool registry\n * @returns The result of the tool call along with the tool definition\n */\nexport const handleToolCall = async (\n toolCallRequest: TamboAI.ToolCallRequest,\n toolRegistry: TamboToolRegistry,\n onCallUnregisteredTool?: (\n toolName: string,\n args: TamboAI.ToolCallParameter[],\n ) => Promise<string>,\n): Promise<{\n result: unknown;\n error?: string;\n tamboTool?: TamboTool | TamboToolWithToolSchema;\n}> => {\n if (!toolCallRequest?.toolName) {\n throw new Error(\"Tool name is required\");\n }\n\n try {\n const { tool, tamboTool } = findTool(\n toolCallRequest.toolName,\n toolRegistry,\n );\n if (!tool) {\n if (onCallUnregisteredTool) {\n const result = await onCallUnregisteredTool(\n toolCallRequest.toolName,\n toolCallRequest.parameters,\n );\n return {\n result,\n };\n }\n throw new Error(`Tool ${toolCallRequest.toolName} not found in registry`);\n }\n return {\n result: await runToolChoice(toolCallRequest, tool, tamboTool),\n tamboTool,\n };\n } catch (error) {\n console.error(\"Error in calling tool: \", error);\n return {\n result: `When attempting to call tool ${toolCallRequest.toolName} the following error occurred: ${error}. Explain to the user that the tool call failed and try again if needed.`,\n error: error instanceof Error ? error.message : \"Unknown error\",\n };\n }\n};\n\nconst findTool = (\n toolName: string,\n toolRegistry: TamboToolRegistry,\n):\n | {\n tool: ComponentContextTool;\n tamboTool: TamboTool | TamboToolWithToolSchema;\n }\n | { tool: null; tamboTool: null } => {\n const registryTool = toolRegistry[toolName];\n\n if (!registryTool) {\n return { tool: null, tamboTool: null };\n }\n\n const contextTool = mapTamboToolToContextTool(registryTool);\n return {\n tool: {\n getComponentContext: registryTool.tool,\n definition: contextTool,\n },\n tamboTool: registryTool,\n };\n};\n\nconst runToolChoice = async (\n toolCallRequest: TamboAI.ToolCallRequest,\n tool: ComponentContextTool,\n tamboTool: TamboTool | TamboToolWithToolSchema,\n): Promise<unknown> => {\n const parameters = toolCallRequest.parameters ?? [];\n\n // New interface (inputSchema): pass single object argument\n if (hasInputSchema(tamboTool)) {\n // Reconstruct the object from parameter name-value pairs\n const inputObject = Object.fromEntries(\n parameters.map((param) => [param.parameterName, param.parameterValue]),\n );\n return await tool.getComponentContext(inputObject);\n }\n\n // Deprecated interface (toolSchema): spread positional arguments\n const parameterValues = parameters.map((param) => param.parameterValue);\n return await tool.getComponentContext(...parameterValues);\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validate-component-name.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-component-name.test.d.ts","sourceRoot":"","sources":["../../src/util/validate-component-name.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,33 @@
1
+ import { assertValidName } from "./validate-component-name";
2
+ describe("assertValidName", () => {
3
+ // Valid names
4
+ it("should not throw an error for a valid name with letters only", () => {
5
+ expect(() => assertValidName("MyComponent", "component")).not.toThrow();
6
+ });
7
+ it("should not throw an error for letters, numbers, underscore", () => {
8
+ expect(() => assertValidName("component_123", "component")).not.toThrow();
9
+ });
10
+ it("should not throw an error for letters, numbers, hyphen", () => {
11
+ expect(() => assertValidName("tool-456", "tool")).not.toThrow();
12
+ });
13
+ it("should not throw an error for mix of letters, numbers, underscores, hyphens", () => {
14
+ expect(() => assertValidName("A1_b-2C", "component")).not.toThrow();
15
+ });
16
+ it("should not throw an error with single underscore, and hyphen", () => {
17
+ expect(() => assertValidName("_", "tool")).not.toThrow();
18
+ expect(() => assertValidName("-", "tool")).not.toThrow();
19
+ });
20
+ // Invalid names
21
+ it("should throw an error for name with space", () => {
22
+ expect(() => assertValidName("My Component", "component")).toThrow(`component "My Component" must only contain letters, numbers, underscores, and hyphens.`);
23
+ });
24
+ it("should throw an error for name with special characters", () => {
25
+ expect(() => assertValidName("tool@123", "tool")).toThrow(`tool "tool@123" must only contain letters, numbers, underscores, and hyphens.`);
26
+ expect(() => assertValidName("component!$", "component")).toThrow(`component "component!$" must only contain letters, numbers, underscores, and hyphens.`);
27
+ });
28
+ // Edge Cases
29
+ it("should throw an error for name with empty string", () => {
30
+ expect(() => assertValidName("", "component")).toThrow(`component "" must only contain letters, numbers, underscores, and hyphens.`);
31
+ });
32
+ });
33
+ //# sourceMappingURL=validate-component-name.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-component-name.test.js","sourceRoot":"","sources":["../../src/util/validate-component-name.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,cAAc;IACd,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IAC1E,CAA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,GAAG,EAAE,CAAC,eAAe,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAC/D,uFAAuF,CACxF,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,aAAa;IACb,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC1D,MAAM,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CACpD,4EAA4E,CAC7E,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { assertValidName } from \"./validate-component-name\";\ndescribe(\"assertValidName\", () => {\n // Valid names\n it(\"should not throw an error for a valid name with letters only\", () => {\n expect(() => assertValidName(\"MyComponent\", \"component\")).not.toThrow();\n });\n it(\"should not throw an error for letters, numbers, underscore\", () => {\n expect(() => assertValidName(\"component_123\", \"component\")).not.toThrow();\n });\n it(\"should not throw an error for letters, numbers, hyphen\", () => {\n expect(() => assertValidName(\"tool-456\", \"tool\")).not.toThrow();\n });\n it(\"should not throw an error for mix of letters, numbers, underscores, hyphens\", () => {\n expect(() => assertValidName(\"A1_b-2C\", \"component\")).not.toThrow();\n });\n it(\"should not throw an error with single underscore, and hyphen\", () => {\n expect(() => assertValidName(\"_\", \"tool\")).not.toThrow();\n expect(() => assertValidName(\"-\", \"tool\")).not.toThrow();\n });\n // Invalid names\n it(\"should throw an error for name with space\", () => {\n expect(() => assertValidName(\"My Component\", \"component\")).toThrow(\n `component \"My Component\" must only contain letters, numbers, underscores, and hyphens.`,\n );\n });\n it(\"should throw an error for name with special characters\", () => {\n expect(() => assertValidName(\"tool@123\", \"tool\")).toThrow(\n `tool \"tool@123\" must only contain letters, numbers, underscores, and hyphens.`,\n );\n expect(() => assertValidName(\"component!$\", \"component\")).toThrow(\n `component \"component!$\" must only contain letters, numbers, underscores, and hyphens.`,\n );\n });\n // Edge Cases\n it(\"should throw an error for name with empty string\", () => {\n expect(() => assertValidName(\"\", \"component\")).toThrow(\n `component \"\" must only contain letters, numbers, underscores, and hyphens.`,\n );\n });\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tambo-ai/react",
3
- "version": "0.68.0",
3
+ "version": "0.69.1",
4
4
  "description": "React client package for Tambo AI",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -29,10 +29,6 @@
29
29
  "esm",
30
30
  "LICENSE"
31
31
  ],
32
- "engines": {
33
- "node": ">=22",
34
- "npm": ">=11"
35
- },
36
32
  "volta": {
37
33
  "extends": "../package.json"
38
34
  },
@@ -60,55 +56,51 @@
60
56
  ]
61
57
  },
62
58
  "peerDependencies": {
63
- "@modelcontextprotocol/sdk": "^1.24.0",
59
+ "@modelcontextprotocol/sdk": "^1.25.1",
64
60
  "@types/react": "^18.0.0 || ^19.0.0",
65
61
  "@types/react-dom": "^18.0.0 || ^19.0.0",
66
62
  "react": "^18.0.0 || ^19.0.0",
67
63
  "react-dom": "^18.0.0 || ^19.0.0",
68
- "zod": "^3.25.76 || ^4.1.0",
69
- "zod-to-json-schema": "^3.25.0"
64
+ "zod": "^3.25.76 || ~4.0.0",
65
+ "zod-to-json-schema": "^3.25.1"
70
66
  },
71
67
  "peerDependenciesMeta": {
72
68
  "@modelcontextprotocol/sdk": {
73
69
  "optional": true
74
70
  },
75
- "zod": {
76
- "optional": true
77
- },
78
71
  "zod-to-json-schema": {
79
72
  "optional": true
80
73
  }
81
74
  },
82
75
  "dependencies": {
83
76
  "@standard-community/standard-json": "^0.3.5",
84
- "@standard-schema/spec": "^1.0.0",
77
+ "@standard-schema/spec": "^1.1.0",
85
78
  "@tambo-ai/typescript-sdk": "^0.80.0",
86
- "@tanstack/react-query": "^5.90.10",
79
+ "@tanstack/react-query": "^5.90.16",
87
80
  "fast-equals": "^5.3.3",
88
81
  "partial-json": "^0.1.7",
89
82
  "react-fast-compare": "^3.2.2",
90
83
  "react-media-recorder": "^1.7.2",
91
84
  "ts-essentials": "^10.1.1",
92
85
  "ts-node": "^10.9.2",
93
- "use-debounce": "^10.0.6",
94
- "zodInternalAlias": "npm:zod@^4.1.0"
86
+ "use-debounce": "^10.0.6"
95
87
  },
96
88
  "devDependencies": {
97
89
  "@eslint/js": "^9.39.2",
98
- "@modelcontextprotocol/sdk": "^1.24.0",
90
+ "@modelcontextprotocol/sdk": "^1.25.1",
99
91
  "@tambo-ai/eslint-config": "*",
100
92
  "@tambo-ai/typescript-config": "*",
101
93
  "@testing-library/jest-dom": "^6.9.1",
102
- "@testing-library/react": "^16.3.0",
94
+ "@testing-library/react": "^16.3.1",
103
95
  "@types/jest": "^30.0.0",
104
96
  "@types/json-schema": "^7.0.15",
105
- "@types/node": "^22.15.32",
97
+ "@types/node": "^22.19.5",
106
98
  "@types/react": "^18.3.23",
107
99
  "@types/react-dom": "^18.3.7",
108
- "@valibot/to-json-schema": "^1.4.0",
100
+ "@valibot/to-json-schema": "^1.5.0",
109
101
  "concurrently": "^9.2.1",
110
102
  "eslint": "^9.39.2",
111
- "eslint-plugin-jsdoc": "^61.5.0",
103
+ "eslint-plugin-jsdoc": "^61.7.1",
112
104
  "eslint-plugin-react": "^7.37.5",
113
105
  "eslint-plugin-react-hooks": "^6.1.1",
114
106
  "jest": "^30.2.0",
@@ -120,8 +112,8 @@
120
112
  "react-dom": "^18.3.1",
121
113
  "ts-jest": "^29.4.6",
122
114
  "typescript": "^5.9.3",
123
- "typescript-eslint": "^8.49.0",
124
- "zod": "^3.25.76 || ^4.1.0",
125
- "zod-to-json-schema": "^3.25.0"
115
+ "typescript-eslint": "^8.52.0",
116
+ "zod": "^3.25.76 || ~4.0.0",
117
+ "zod-to-json-schema": "^3.25.1"
126
118
  }
127
119
  }
@@ -1,3 +0,0 @@
1
- import { z } from "zodInternalAlias";
2
- export { z };
3
- //# sourceMappingURL=alias.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alias.d.ts","sourceRoot":"","sources":["../../src/schema/alias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAarC,OAAO,EAAE,CAAC,EAAE,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.z = void 0;
4
- const zodInternalAlias_1 = require("zodInternalAlias");
5
- Object.defineProperty(exports, "z", { enumerable: true, get: function () { return zodInternalAlias_1.z; } });
6
- //# sourceMappingURL=alias.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alias.js","sourceRoot":"","sources":["../../src/schema/alias.ts"],"names":[],"mappings":";;;AAAA,uDAAqC;AAa5B,kFAbA,oBAAC,OAaA","sourcesContent":["import { z } from \"zodInternalAlias\";\n\n/*\n * # Why \"zodInternalAlias\"?\n *\n * We use a custom alias for the zod package because we want to use zod for\n * schema parsing/validation, but we also want to use the _types_ from the\n * user-installed version of zod which could be either 3 or 4. By using an\n * alias, we can ensure that these schemas use our version of zod (v4.1), but\n * the user can use their own version elsewhere in their project without type\n * conflicts and sometimes circular dependencies.\n */\n\nexport { z };\n"]}
@@ -1,3 +0,0 @@
1
- import { z } from "zodInternalAlias";
2
- export { z };
3
- //# sourceMappingURL=alias.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alias.d.ts","sourceRoot":"","sources":["../../src/schema/alias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAarC,OAAO,EAAE,CAAC,EAAE,CAAC"}
@@ -1,13 +0,0 @@
1
- import { z } from "zodInternalAlias";
2
- /*
3
- * # Why "zodInternalAlias"?
4
- *
5
- * We use a custom alias for the zod package because we want to use zod for
6
- * schema parsing/validation, but we also want to use the _types_ from the
7
- * user-installed version of zod which could be either 3 or 4. By using an
8
- * alias, we can ensure that these schemas use our version of zod (v4.1), but
9
- * the user can use their own version elsewhere in their project without type
10
- * conflicts and sometimes circular dependencies.
11
- */
12
- export { z };
13
- //# sourceMappingURL=alias.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alias.js","sourceRoot":"","sources":["../../src/schema/alias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAErC;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,CAAC","sourcesContent":["import { z } from \"zodInternalAlias\";\n\n/*\n * # Why \"zodInternalAlias\"?\n *\n * We use a custom alias for the zod package because we want to use zod for\n * schema parsing/validation, but we also want to use the _types_ from the\n * user-installed version of zod which could be either 3 or 4. By using an\n * alias, we can ensure that these schemas use our version of zod (v4.1), but\n * the user can use their own version elsewhere in their project without type\n * conflicts and sometimes circular dependencies.\n */\n\nexport { z };\n"]}