@bubblelab/bubble-core 0.1.10 → 0.1.12

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 (350) hide show
  1. package/dist/bubble-bundle.d.ts +803 -351
  2. package/dist/bubble-factory.d.ts.map +1 -1
  3. package/dist/bubble-factory.js +130 -35
  4. package/dist/bubble-factory.js.map +1 -1
  5. package/dist/bubble-flow/bubble-flow-class.d.ts +5 -0
  6. package/dist/bubble-flow/bubble-flow-class.d.ts.map +1 -1
  7. package/dist/bubble-flow/bubble-flow-class.js +20 -0
  8. package/dist/bubble-flow/bubble-flow-class.js.map +1 -1
  9. package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts.map +1 -1
  10. package/dist/bubble-flow/sample/simplified-data-analysis.flow.js +6 -3
  11. package/dist/bubble-flow/sample/simplified-data-analysis.flow.js.map +1 -1
  12. package/dist/bubbles/service-bubble/agi-inc.d.ts +1121 -0
  13. package/dist/bubbles/service-bubble/agi-inc.d.ts.map +1 -0
  14. package/dist/bubbles/service-bubble/agi-inc.js +730 -0
  15. package/dist/bubbles/service-bubble/agi-inc.js.map +1 -0
  16. package/dist/bubbles/service-bubble/ai-agent.d.ts +273 -61
  17. package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
  18. package/dist/bubbles/service-bubble/ai-agent.js +536 -405
  19. package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
  20. package/dist/bubbles/service-bubble/airtable.d.ts +1753 -0
  21. package/dist/bubbles/service-bubble/airtable.d.ts.map +1 -0
  22. package/dist/bubbles/service-bubble/airtable.js +1173 -0
  23. package/dist/bubbles/service-bubble/airtable.js.map +1 -0
  24. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts +240 -0
  25. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts.map +1 -0
  26. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.js +119 -0
  27. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.js.map +1 -0
  28. package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +4 -4
  29. package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +14 -14
  30. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +137 -0
  31. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts.map +1 -0
  32. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.js +81 -0
  33. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.js.map +1 -0
  34. package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +6 -6
  35. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +32 -32
  36. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +488 -0
  37. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts.map +1 -0
  38. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.js +463 -0
  39. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.js.map +1 -0
  40. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +262 -0
  41. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts.map +1 -0
  42. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.js +291 -0
  43. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.js.map +1 -0
  44. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +12 -12
  45. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +1301 -170
  46. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts.map +1 -1
  47. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.js +32 -0
  48. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.js.map +1 -1
  49. package/dist/bubbles/service-bubble/apify/apify.d.ts +158 -13
  50. package/dist/bubbles/service-bubble/apify/apify.d.ts.map +1 -1
  51. package/dist/bubbles/service-bubble/apify/apify.js +222 -37
  52. package/dist/bubbles/service-bubble/apify/apify.js.map +1 -1
  53. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +542 -0
  54. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts.map +1 -0
  55. package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.d.ts +37 -0
  56. package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.d.ts.map +1 -0
  57. package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.js +203 -0
  58. package/dist/bubbles/service-bubble/browserbase/browserbase.integration.flow.js.map +1 -0
  59. package/dist/bubbles/service-bubble/browserbase/browserbase.js +593 -0
  60. package/dist/bubbles/service-bubble/browserbase/browserbase.js.map +1 -0
  61. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +518 -0
  62. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts.map +1 -0
  63. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js +311 -0
  64. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.js.map +1 -0
  65. package/dist/bubbles/service-bubble/browserbase/index.d.ts +3 -0
  66. package/dist/bubbles/service-bubble/browserbase/index.d.ts.map +1 -0
  67. package/dist/bubbles/service-bubble/browserbase/index.js +3 -0
  68. package/dist/bubbles/service-bubble/browserbase/index.js.map +1 -0
  69. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +1358 -0
  70. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts.map +1 -0
  71. package/dist/bubbles/service-bubble/crustdata/crustdata.js +219 -0
  72. package/dist/bubbles/service-bubble/crustdata/crustdata.js.map +1 -0
  73. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +1604 -0
  74. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts.map +1 -0
  75. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.js +194 -0
  76. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.js.map +1 -0
  77. package/dist/bubbles/service-bubble/crustdata/index.d.ts +3 -0
  78. package/dist/bubbles/service-bubble/crustdata/index.d.ts.map +1 -0
  79. package/dist/bubbles/service-bubble/crustdata/index.js +3 -0
  80. package/dist/bubbles/service-bubble/crustdata/index.js.map +1 -0
  81. package/dist/bubbles/service-bubble/eleven-labs.d.ts +421 -0
  82. package/dist/bubbles/service-bubble/eleven-labs.d.ts.map +1 -0
  83. package/dist/bubbles/service-bubble/eleven-labs.js +479 -0
  84. package/dist/bubbles/service-bubble/eleven-labs.js.map +1 -0
  85. package/dist/bubbles/service-bubble/firecrawl.d.ts +37748 -0
  86. package/dist/bubbles/service-bubble/firecrawl.d.ts.map +1 -0
  87. package/dist/bubbles/service-bubble/firecrawl.js +1489 -0
  88. package/dist/bubbles/service-bubble/firecrawl.js.map +1 -0
  89. package/dist/bubbles/service-bubble/followupboss.d.ts +6822 -0
  90. package/dist/bubbles/service-bubble/followupboss.d.ts.map +1 -0
  91. package/dist/bubbles/service-bubble/followupboss.js +1394 -0
  92. package/dist/bubbles/service-bubble/followupboss.js.map +1 -0
  93. package/dist/bubbles/service-bubble/github.d.ts +2393 -0
  94. package/dist/bubbles/service-bubble/github.d.ts.map +1 -0
  95. package/dist/bubbles/service-bubble/github.js +1046 -0
  96. package/dist/bubbles/service-bubble/github.js.map +1 -0
  97. package/dist/bubbles/service-bubble/gmail.d.ts +180 -180
  98. package/dist/bubbles/service-bubble/google-calendar.d.ts +60 -60
  99. package/dist/bubbles/service-bubble/google-drive.d.ts +69 -68
  100. package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -1
  101. package/dist/bubbles/service-bubble/google-drive.js +35 -3
  102. package/dist/bubbles/service-bubble/google-drive.js.map +1 -1
  103. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +943 -0
  104. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts.map +1 -0
  105. package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.d.ts +31 -0
  106. package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.d.ts.map +1 -0
  107. package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.js +184 -0
  108. package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.js.map +1 -0
  109. package/dist/bubbles/service-bubble/google-sheets/google-sheets.js +401 -0
  110. package/dist/bubbles/service-bubble/google-sheets/google-sheets.js.map +1 -0
  111. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts +1024 -0
  112. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts.map +1 -0
  113. package/dist/bubbles/service-bubble/{google-sheets.js → google-sheets/google-sheets.schema.js} +45 -409
  114. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.js.map +1 -0
  115. package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.d.ts +38 -0
  116. package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.d.ts.map +1 -0
  117. package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.js +183 -0
  118. package/dist/bubbles/service-bubble/google-sheets/google-sheets.utils.js.map +1 -0
  119. package/dist/bubbles/service-bubble/google-sheets/index.d.ts +4 -0
  120. package/dist/bubbles/service-bubble/google-sheets/index.d.ts.map +1 -0
  121. package/dist/bubbles/service-bubble/google-sheets/index.js +4 -0
  122. package/dist/bubbles/service-bubble/google-sheets/index.js.map +1 -0
  123. package/dist/bubbles/service-bubble/hello-world.d.ts +4 -4
  124. package/dist/bubbles/service-bubble/http.d.ts +17 -5
  125. package/dist/bubbles/service-bubble/http.d.ts.map +1 -1
  126. package/dist/bubbles/service-bubble/http.integration.flow.d.ts +49 -0
  127. package/dist/bubbles/service-bubble/http.integration.flow.d.ts.map +1 -0
  128. package/dist/bubbles/service-bubble/http.integration.flow.js +425 -0
  129. package/dist/bubbles/service-bubble/http.integration.flow.js.map +1 -0
  130. package/dist/bubbles/service-bubble/http.js +47 -5
  131. package/dist/bubbles/service-bubble/http.js.map +1 -1
  132. package/dist/bubbles/service-bubble/insforge-db.d.ts +140 -0
  133. package/dist/bubbles/service-bubble/insforge-db.d.ts.map +1 -0
  134. package/dist/bubbles/service-bubble/insforge-db.js +260 -0
  135. package/dist/bubbles/service-bubble/insforge-db.js.map +1 -0
  136. package/dist/bubbles/service-bubble/notion/index.d.ts +3 -0
  137. package/dist/bubbles/service-bubble/notion/index.d.ts.map +1 -0
  138. package/dist/bubbles/service-bubble/notion/index.js +3 -0
  139. package/dist/bubbles/service-bubble/notion/index.js.map +1 -0
  140. package/dist/bubbles/service-bubble/notion/notion.d.ts +35405 -0
  141. package/dist/bubbles/service-bubble/notion/notion.d.ts.map +1 -0
  142. package/dist/bubbles/service-bubble/notion/notion.js +1492 -0
  143. package/dist/bubbles/service-bubble/notion/notion.js.map +1 -0
  144. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +1148 -0
  145. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts.map +1 -0
  146. package/dist/bubbles/service-bubble/notion/property-schemas.js +341 -0
  147. package/dist/bubbles/service-bubble/notion/property-schemas.js.map +1 -0
  148. package/dist/bubbles/service-bubble/postgresql.d.ts +12 -12
  149. package/dist/bubbles/service-bubble/resend.d.ts +30 -9
  150. package/dist/bubbles/service-bubble/resend.d.ts.map +1 -1
  151. package/dist/bubbles/service-bubble/resend.js +133 -2
  152. package/dist/bubbles/service-bubble/resend.js.map +1 -1
  153. package/dist/bubbles/service-bubble/slack.d.ts +1741 -798
  154. package/dist/bubbles/service-bubble/slack.d.ts.map +1 -1
  155. package/dist/bubbles/service-bubble/slack.js +322 -28
  156. package/dist/bubbles/service-bubble/slack.js.map +1 -1
  157. package/dist/bubbles/service-bubble/storage.d.ts +26 -22
  158. package/dist/bubbles/service-bubble/storage.d.ts.map +1 -1
  159. package/dist/bubbles/service-bubble/storage.js +45 -4
  160. package/dist/bubbles/service-bubble/storage.js.map +1 -1
  161. package/dist/bubbles/service-bubble/telegram.d.ts +7742 -0
  162. package/dist/bubbles/service-bubble/telegram.d.ts.map +1 -0
  163. package/dist/bubbles/service-bubble/telegram.js +1132 -0
  164. package/dist/bubbles/service-bubble/telegram.js.map +1 -0
  165. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +494 -0
  166. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts.map +1 -0
  167. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.d.ts +31 -0
  168. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.d.ts.map +1 -0
  169. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.js +100 -0
  170. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.integration.flow.js.map +1 -0
  171. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.js +1301 -0
  172. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.js.map +1 -0
  173. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +473 -0
  174. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts.map +1 -0
  175. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.js +230 -0
  176. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.js.map +1 -0
  177. package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.d.ts +3 -0
  178. package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.d.ts.map +1 -0
  179. package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.js +3 -0
  180. package/dist/bubbles/tool-bubble/amazon-shopping-tool/index.js.map +1 -0
  181. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +76 -20
  182. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts.map +1 -1
  183. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js +12 -0
  184. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js.map +1 -1
  185. package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +14 -14
  186. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts +188 -0
  187. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts.map +1 -0
  188. package/dist/bubbles/tool-bubble/code-edit-tool.js +321 -0
  189. package/dist/bubbles/tool-bubble/code-edit-tool.js.map +1 -0
  190. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +740 -0
  191. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts.map +1 -0
  192. package/dist/bubbles/tool-bubble/company-enrichment-tool.js +350 -0
  193. package/dist/bubbles/tool-bubble/company-enrichment-tool.js.map +1 -0
  194. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +8 -4
  195. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts.map +1 -1
  196. package/dist/bubbles/tool-bubble/get-bubble-details-tool.js +115 -10
  197. package/dist/bubbles/tool-bubble/get-bubble-details-tool.js.map +1 -1
  198. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +455 -0
  199. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts.map +1 -0
  200. package/dist/bubbles/tool-bubble/google-maps-tool.js +206 -0
  201. package/dist/bubbles/tool-bubble/google-maps-tool.js.map +1 -0
  202. package/dist/bubbles/tool-bubble/instagram-tool.d.ts +36 -36
  203. package/dist/bubbles/tool-bubble/instagram-tool.d.ts.map +1 -1
  204. package/dist/bubbles/tool-bubble/instagram-tool.js +4 -2
  205. package/dist/bubbles/tool-bubble/instagram-tool.js.map +1 -1
  206. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +830 -453
  207. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts.map +1 -1
  208. package/dist/bubbles/tool-bubble/linkedin-tool.js +236 -14
  209. package/dist/bubbles/tool-bubble/linkedin-tool.js.map +1 -1
  210. package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +4 -4
  211. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +66 -66
  212. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +17 -16
  213. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts.map +1 -1
  214. package/dist/bubbles/tool-bubble/research-agent-tool.js +32 -17
  215. package/dist/bubbles/tool-bubble/research-agent-tool.js.map +1 -1
  216. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +8 -8
  217. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +485 -0
  218. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts.map +1 -0
  219. package/dist/bubbles/tool-bubble/tiktok-tool.js +226 -0
  220. package/dist/bubbles/tool-bubble/tiktok-tool.js.map +1 -0
  221. package/dist/bubbles/tool-bubble/tool-template.d.ts +8 -8
  222. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +947 -0
  223. package/dist/bubbles/tool-bubble/twitter-tool.d.ts.map +1 -0
  224. package/dist/bubbles/tool-bubble/twitter-tool.js +497 -0
  225. package/dist/bubbles/tool-bubble/twitter-tool.js.map +1 -0
  226. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +22 -16
  227. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts.map +1 -1
  228. package/dist/bubbles/tool-bubble/web-crawl-tool.js +58 -59
  229. package/dist/bubbles/tool-bubble/web-crawl-tool.js.map +1 -1
  230. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +8 -8
  231. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts.map +1 -1
  232. package/dist/bubbles/tool-bubble/web-extract-tool.js +17 -17
  233. package/dist/bubbles/tool-bubble/web-extract-tool.js.map +1 -1
  234. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +21 -113
  235. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts.map +1 -1
  236. package/dist/bubbles/tool-bubble/web-scrape-tool.js +55 -73
  237. package/dist/bubbles/tool-bubble/web-scrape-tool.js.map +1 -1
  238. package/dist/bubbles/tool-bubble/web-search-tool.d.ts +20 -9
  239. package/dist/bubbles/tool-bubble/web-search-tool.d.ts.map +1 -1
  240. package/dist/bubbles/tool-bubble/web-search-tool.js +45 -35
  241. package/dist/bubbles/tool-bubble/web-search-tool.js.map +1 -1
  242. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +25 -25
  243. package/dist/bubbles/tool-bubble/youtube-tool.d.ts.map +1 -1
  244. package/dist/bubbles/tool-bubble/youtube-tool.js +8 -5
  245. package/dist/bubbles/tool-bubble/youtube-tool.js.map +1 -1
  246. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts +4 -4
  247. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +30 -30
  248. package/dist/bubbles/workflow-bubble/generate-document.workflow.js +1 -1
  249. package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +22 -22
  250. package/dist/bubbles/workflow-bubble/parse-document.workflow.js +1 -1
  251. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +70 -70
  252. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts.map +1 -1
  253. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js +4 -4
  254. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js.map +1 -1
  255. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +36 -36
  256. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js +1 -1
  257. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +14 -14
  258. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts.map +1 -1
  259. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js +6 -6
  260. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js.map +1 -1
  261. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +18 -18
  262. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts.map +1 -1
  263. package/dist/bubbles/workflow-bubble/slack-formatter-agent.js +24 -4
  264. package/dist/bubbles/workflow-bubble/slack-formatter-agent.js.map +1 -1
  265. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +19 -19
  266. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts.map +1 -1
  267. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js +8 -8
  268. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js.map +1 -1
  269. package/dist/bubbles.json +260 -77
  270. package/dist/index.d.ts +25 -4
  271. package/dist/index.d.ts.map +1 -1
  272. package/dist/index.js +18 -3
  273. package/dist/index.js.map +1 -1
  274. package/dist/logging/BubbleLogger.d.ts +55 -16
  275. package/dist/logging/BubbleLogger.d.ts.map +1 -1
  276. package/dist/logging/BubbleLogger.js +192 -77
  277. package/dist/logging/BubbleLogger.js.map +1 -1
  278. package/dist/logging/StreamingBubbleLogger.d.ts +21 -1
  279. package/dist/logging/StreamingBubbleLogger.d.ts.map +1 -1
  280. package/dist/logging/StreamingBubbleLogger.js +80 -8
  281. package/dist/logging/StreamingBubbleLogger.js.map +1 -1
  282. package/dist/logging/WebhookStreamLogger.d.ts +66 -0
  283. package/dist/logging/WebhookStreamLogger.d.ts.map +1 -0
  284. package/dist/logging/WebhookStreamLogger.js +291 -0
  285. package/dist/logging/WebhookStreamLogger.js.map +1 -0
  286. package/dist/types/available-tools.d.ts +1 -1
  287. package/dist/types/available-tools.d.ts.map +1 -1
  288. package/dist/types/available-tools.js +7 -0
  289. package/dist/types/available-tools.js.map +1 -1
  290. package/dist/types/base-bubble-class.d.ts +6 -4
  291. package/dist/types/base-bubble-class.d.ts.map +1 -1
  292. package/dist/types/base-bubble-class.js +30 -23
  293. package/dist/types/base-bubble-class.js.map +1 -1
  294. package/dist/types/bubble.d.ts +2 -0
  295. package/dist/types/bubble.d.ts.map +1 -1
  296. package/dist/types/service-bubble-class.d.ts +1 -1
  297. package/dist/types/service-bubble-class.d.ts.map +1 -1
  298. package/dist/types/service-bubble-class.js +2 -2
  299. package/dist/types/service-bubble-class.js.map +1 -1
  300. package/dist/types/tool-bubble-class.d.ts +1 -1
  301. package/dist/types/tool-bubble-class.d.ts.map +1 -1
  302. package/dist/types/tool-bubble-class.js +60 -10
  303. package/dist/types/tool-bubble-class.js.map +1 -1
  304. package/dist/types/workflow-bubble-class.d.ts +1 -1
  305. package/dist/types/workflow-bubble-class.d.ts.map +1 -1
  306. package/dist/types/workflow-bubble-class.js +2 -2
  307. package/dist/types/workflow-bubble-class.js.map +1 -1
  308. package/dist/utils/agent-formatter.d.ts +14 -2
  309. package/dist/utils/agent-formatter.d.ts.map +1 -1
  310. package/dist/utils/agent-formatter.js +174 -26
  311. package/dist/utils/agent-formatter.js.map +1 -1
  312. package/dist/utils/bubbleflow-validation.d.ts +7 -0
  313. package/dist/utils/bubbleflow-validation.d.ts.map +1 -1
  314. package/dist/utils/bubbleflow-validation.js +171 -6
  315. package/dist/utils/bubbleflow-validation.js.map +1 -1
  316. package/dist/utils/json-parsing.d.ts.map +1 -1
  317. package/dist/utils/json-parsing.js +146 -0
  318. package/dist/utils/json-parsing.js.map +1 -1
  319. package/dist/utils/safe-gemini-chat.d.ts +31 -0
  320. package/dist/utils/safe-gemini-chat.d.ts.map +1 -0
  321. package/dist/utils/safe-gemini-chat.js +93 -0
  322. package/dist/utils/safe-gemini-chat.js.map +1 -0
  323. package/dist/utils/schema-comparison.d.ts +92 -0
  324. package/dist/utils/schema-comparison.d.ts.map +1 -0
  325. package/dist/utils/schema-comparison.js +716 -0
  326. package/dist/utils/schema-comparison.js.map +1 -0
  327. package/dist/utils/zod-schema.d.ts +24 -0
  328. package/dist/utils/zod-schema.d.ts.map +1 -0
  329. package/dist/utils/zod-schema.js +56 -0
  330. package/dist/utils/zod-schema.js.map +1 -0
  331. package/package.json +6 -4
  332. package/dist/bubbles/service-bubble/google-sheets.d.ts +0 -1811
  333. package/dist/bubbles/service-bubble/google-sheets.d.ts.map +0 -1
  334. package/dist/bubbles/service-bubble/google-sheets.js.map +0 -1
  335. package/dist/bubbles/service-bubble/x-twitter.d.ts +0 -814
  336. package/dist/bubbles/service-bubble/x-twitter.d.ts.map +0 -1
  337. package/dist/bubbles/service-bubble/x-twitter.js +0 -445
  338. package/dist/bubbles/service-bubble/x-twitter.js.map +0 -1
  339. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts +0 -125
  340. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts.map +0 -1
  341. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js +0 -808
  342. package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js.map +0 -1
  343. package/dist/test-gm.d.ts +0 -10
  344. package/dist/test-gm.d.ts.map +0 -1
  345. package/dist/test-gm.js +0 -95
  346. package/dist/test-gm.js.map +0 -1
  347. package/dist/utils/param-helper.d.ts +0 -2
  348. package/dist/utils/param-helper.d.ts.map +0 -1
  349. package/dist/utils/param-helper.js +0 -5
  350. package/dist/utils/param-helper.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company-enrichment-tool.d.ts","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/company-enrichment-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQ5E,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEjB,CAAC;AAkBH,QAAA,MAAM,iCAAiC;;;;;;;;;;;;EAiBrC,CAAC;AAGH,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAqC;IACjE,MAAM,CAAC,QAAQ,CAAC,gBAAgB,yFACwD;IACxF,MAAM,CAAC,QAAQ,CAAC,eAAe,qzCAqC7B;IACF,MAAM,CAAC,QAAQ,CAAC,KAAK,YAAY;IACjC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;gBAG5B,MAAM,GAAE,gCAG6B,EACrC,OAAO,CAAC,EAAE,aAAa;IAKnB,aAAa,IAAI,OAAO,CAAC,2BAA2B,CAAC;IAuF3D;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAoB5B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAmCzB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAgDxB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAqB5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAS1B"}
@@ -0,0 +1,350 @@
1
+ import { z } from 'zod';
2
+ import { ToolBubble } from '../../types/tool-bubble-class.js';
3
+ import { CredentialType } from '@bubblelab/shared-schemas';
4
+ import { CrustdataBubble, } from '../service-bubble/crustdata/index.js';
5
+ // Contact schema with full profile information
6
+ const ContactSchema = z.object({
7
+ // Basic info
8
+ name: z.string().nullable().describe('Full name'),
9
+ title: z.string().nullable().describe('Current job title'),
10
+ headline: z.string().nullable().describe('LinkedIn headline'),
11
+ linkedinUrl: z.string().nullable().describe('LinkedIn profile URL'),
12
+ profilePictureUrl: z.string().nullable().describe('Profile picture URL'),
13
+ // Contact info
14
+ email: z.string().nullable().describe('Email address'),
15
+ twitterHandle: z.string().nullable().describe('Twitter/X handle'),
16
+ // Classification (CXOs prioritized)
17
+ role: z
18
+ .enum(['cxo', 'decision_maker', 'founder'])
19
+ .describe('Role classification'),
20
+ // Location
21
+ location: z.string().nullable().describe('Location'),
22
+ // Professional background
23
+ skills: z.array(z.string()).nullable().describe('Professional skills'),
24
+ languages: z.array(z.string()).nullable().describe('Languages spoken'),
25
+ summary: z.string().nullable().describe('Professional summary'),
26
+ // Work history
27
+ currentEmployment: z
28
+ .array(z.object({
29
+ title: z.string().nullable().describe('Job title'),
30
+ companyName: z.string().nullable().describe('Company name'),
31
+ companyLinkedinUrl: z
32
+ .string()
33
+ .nullable()
34
+ .describe('Company LinkedIn URL'),
35
+ startDate: z.string().nullable().describe('Start date'),
36
+ description: z.string().nullable().describe('Role description'),
37
+ }))
38
+ .nullable()
39
+ .describe('Current employment positions'),
40
+ pastEmployment: z
41
+ .array(z.object({
42
+ title: z.string().nullable().describe('Job title'),
43
+ companyName: z.string().nullable().describe('Company name'),
44
+ startDate: z.string().nullable().describe('Start date'),
45
+ endDate: z.string().nullable().describe('End date'),
46
+ }))
47
+ .nullable()
48
+ .describe('Past employment positions'),
49
+ // Education
50
+ education: z
51
+ .array(z.object({
52
+ instituteName: z.string().nullable().describe('Institution name'),
53
+ degreeName: z.string().nullable().describe('Degree name'),
54
+ fieldOfStudy: z.string().nullable().describe('Field of study'),
55
+ }))
56
+ .nullable()
57
+ .describe('Education history'),
58
+ });
59
+ // Company info schema for the result
60
+ const CompanyInfoOutputSchema = z.object({
61
+ name: z.string().nullable().describe('Company name'),
62
+ linkedinUrl: z.string().nullable().describe('Company LinkedIn URL'),
63
+ website: z.string().nullable().describe('Company website'),
64
+ industry: z.string().nullable().describe('Industry'),
65
+ description: z.string().nullable().describe('Company description'),
66
+ headcount: z.number().nullable().describe('Employee count'),
67
+ hqCity: z.string().nullable().describe('Headquarters city'),
68
+ hqCountry: z.string().nullable().describe('Headquarters country'),
69
+ yearFounded: z.number().nullable().describe('Year founded'),
70
+ fundingStage: z.string().nullable().describe('Funding stage'),
71
+ totalFunding: z.string().nullable().describe('Total funding raised'),
72
+ });
73
+ // Tool parameters - simple, agent-friendly interface
74
+ const CompanyEnrichmentToolParamsSchema = z.object({
75
+ companyIdentifier: z
76
+ .string()
77
+ .min(1)
78
+ .describe('Company name, domain (e.g., "stripe.com"), or LinkedIn URL. Auto-detects type.'),
79
+ limit: z
80
+ .number()
81
+ .max(50)
82
+ .default(10)
83
+ .optional()
84
+ .describe('Maximum contacts to return (default: 10)'),
85
+ credentials: z
86
+ .record(z.nativeEnum(CredentialType), z.string())
87
+ .optional()
88
+ .describe('Required credentials (auto-injected)'),
89
+ });
90
+ // Tool result schema
91
+ const CompanyEnrichmentToolResultSchema = z.object({
92
+ contacts: z.array(ContactSchema).describe('List of contacts at the company'),
93
+ company: CompanyInfoOutputSchema.nullable().describe('Company information'),
94
+ totalContacts: z.number().describe('Total number of contacts found'),
95
+ success: z.boolean().describe('Whether the operation was successful'),
96
+ error: z.string().describe('Error message if operation failed'),
97
+ });
98
+ /**
99
+ * Company Enrichment Tool
100
+ *
101
+ * Agent-friendly tool for company enrichment and lead generation.
102
+ * Takes a simple company identifier (name, domain, or LinkedIn URL)
103
+ * and returns key contacts with full profiles.
104
+ *
105
+ * Features:
106
+ * - Auto-detects identifier type (name, domain, LinkedIn URL)
107
+ * - Returns CXOs, decision makers, and founders
108
+ * - Full contact profiles with work history and education
109
+ * - Prioritized results (CXOs first, then decision makers, then founders)
110
+ *
111
+ * Uses CrustdataBubble under the hood with a two-step process:
112
+ * 1. Identify company (FREE) to get company_id
113
+ * 2. Enrich company (1 credit) to get contacts
114
+ */
115
+ export class CompanyEnrichmentTool extends ToolBubble {
116
+ static bubbleName = 'company-enrichment-tool';
117
+ static schema = CompanyEnrichmentToolParamsSchema;
118
+ static resultSchema = CompanyEnrichmentToolResultSchema;
119
+ static shortDescription = 'Get key contacts (executives, decision makers) from any company for lead generation';
120
+ static longDescription = `
121
+ Company enrichment tool for lead generation and sales prospecting.
122
+
123
+ **SIMPLE INTERFACE:**
124
+ Just provide a company name, domain, or LinkedIn URL to get key contacts.
125
+ The tool automatically:
126
+ - Detects the identifier type
127
+ - Identifies the company
128
+ - Enriches with contact data
129
+ - Returns prioritized contacts (CXOs first)
130
+
131
+ **WHAT YOU GET:**
132
+ - Contact names and titles
133
+ - LinkedIn profiles and email addresses
134
+ - Work history and education
135
+ - Skills and professional summary
136
+
137
+ **CONTACT TYPES (prioritized):**
138
+ 1. CXOs - C-level executives (CEO, CTO, CFO, etc.)
139
+ 2. Decision makers - VP, Director, Head of, etc.
140
+ 3. Founders - Company founders
141
+
142
+ **USE CASES:**
143
+ - Sales prospecting - find decision makers to reach out to
144
+ - Lead generation - build contact lists for outreach
145
+ - Company research - understand company leadership
146
+ - Competitive intelligence - track competitor executives
147
+ - Partnership opportunities - find the right contacts
148
+
149
+ **EXAMPLES:**
150
+ - "stripe.com" - get contacts from Stripe
151
+ - "Anthropic" - search by company name
152
+ - "https://www.linkedin.com/company/openai" - use LinkedIn URL
153
+
154
+ **CREDITS:**
155
+ - Identify operation: FREE
156
+ - Enrich operation: 1 credit per company
157
+ `;
158
+ static alias = 'enrich';
159
+ static type = 'tool';
160
+ constructor(params = {
161
+ companyIdentifier: 'stripe.com',
162
+ limit: 10,
163
+ }, context) {
164
+ super(params, context);
165
+ }
166
+ async performAction() {
167
+ const credentials = this.params?.credentials;
168
+ if (!credentials || !credentials[CredentialType.CRUSTDATA_API_KEY]) {
169
+ return this.createErrorResult('Company enrichment requires CRUSTDATA_API_KEY credential. Please configure it in your settings.');
170
+ }
171
+ try {
172
+ const { companyIdentifier, limit = 10 } = this.params;
173
+ // Step 1: Detect identifier type and identify company
174
+ const identifierType = this.detectIdentifierType(companyIdentifier);
175
+ const identifyParams = this.buildIdentifyParams(identifierType, companyIdentifier);
176
+ const identifyBubble = new CrustdataBubble({
177
+ operation: 'identify',
178
+ ...identifyParams,
179
+ credentials,
180
+ }, this.context);
181
+ const identifyResult = await identifyBubble.action();
182
+ if (!identifyResult.data.success) {
183
+ return this.createErrorResult(`Failed to identify company: ${identifyResult.data.error}`);
184
+ }
185
+ const results = identifyResult.data.results || [];
186
+ if (results.length === 0 || !results[0]?.company_id) {
187
+ return this.createErrorResult(`No company found matching "${companyIdentifier}". Try using a domain (e.g., "stripe.com") or LinkedIn URL for better results.`);
188
+ }
189
+ const companyId = results[0].company_id;
190
+ // Step 2: Enrich company to get contacts
191
+ const enrichBubble = new CrustdataBubble({
192
+ operation: 'enrich',
193
+ company_id: companyId,
194
+ fields: 'decision_makers,cxos,founders.profiles',
195
+ credentials,
196
+ }, this.context);
197
+ const enrichResult = await enrichBubble.action();
198
+ if (!enrichResult.data.success) {
199
+ return this.createErrorResult(`Failed to enrich company: ${enrichResult.data.error}`);
200
+ }
201
+ // Step 3: Transform and merge contacts
202
+ const contacts = this.transformContacts(enrichResult.data.cxos || [], enrichResult.data.decision_makers || [], enrichResult.data.founders?.profiles || [], limit);
203
+ const company = this.transformCompanyInfo(enrichResult.data.company);
204
+ return {
205
+ contacts,
206
+ company,
207
+ totalContacts: contacts.length,
208
+ success: true,
209
+ error: '',
210
+ };
211
+ }
212
+ catch (error) {
213
+ return this.createErrorResult(error instanceof Error ? error.message : 'Unknown error occurred');
214
+ }
215
+ }
216
+ /**
217
+ * Detect identifier type from the input string
218
+ */
219
+ detectIdentifierType(identifier) {
220
+ // LinkedIn URL
221
+ if (identifier.includes('linkedin.com/company') ||
222
+ identifier.includes('linkedin.com/in')) {
223
+ return 'linkedin';
224
+ }
225
+ // Domain: has dot and no spaces, doesn't look like a sentence
226
+ if (identifier.includes('.') && !identifier.includes(' ')) {
227
+ return 'domain';
228
+ }
229
+ // Default to name
230
+ return 'name';
231
+ }
232
+ /**
233
+ * Build identify params based on identifier type
234
+ */
235
+ buildIdentifyParams(type, identifier) {
236
+ switch (type) {
237
+ case 'linkedin':
238
+ return { query_company_linkedin_url: identifier };
239
+ case 'domain':
240
+ return { query_company_website: identifier };
241
+ case 'name':
242
+ return { query_company_name: identifier };
243
+ }
244
+ }
245
+ /**
246
+ * Transform and merge contacts from different sources
247
+ * Priority: CXOs > Decision Makers > Founders
248
+ */
249
+ transformContacts(cxos, decisionMakers, founders, limit) {
250
+ const contacts = [];
251
+ const seenLinkedInUrls = new Set();
252
+ // Helper to add contacts without duplicates
253
+ const addContacts = (profiles, role) => {
254
+ for (const profile of profiles) {
255
+ if (contacts.length >= limit)
256
+ break;
257
+ // Dedupe by LinkedIn URL
258
+ const linkedinUrl = profile.linkedin_profile_url || profile.linkedin_flagship_url;
259
+ if (linkedinUrl && seenLinkedInUrls.has(linkedinUrl))
260
+ continue;
261
+ if (linkedinUrl)
262
+ seenLinkedInUrls.add(linkedinUrl);
263
+ contacts.push(this.transformProfile(profile, role));
264
+ }
265
+ };
266
+ // Add in priority order
267
+ addContacts(cxos, 'cxo');
268
+ addContacts(decisionMakers, 'decision_maker');
269
+ addContacts(founders, 'founder');
270
+ return contacts;
271
+ }
272
+ /**
273
+ * Transform a single profile to Contact format
274
+ */
275
+ transformProfile(profile, role) {
276
+ return {
277
+ name: profile.name ||
278
+ [profile.first_name, profile.last_name].filter(Boolean).join(' ') ||
279
+ null,
280
+ title: profile.title || null,
281
+ headline: profile.headline || null,
282
+ linkedinUrl: profile.linkedin_profile_url || profile.linkedin_flagship_url || null,
283
+ profilePictureUrl: profile.profile_picture_url || null,
284
+ email: profile.email || null,
285
+ twitterHandle: profile.twitter_handle || null,
286
+ role,
287
+ location: profile.location || null,
288
+ skills: profile.skills || null,
289
+ languages: profile.languages || null,
290
+ summary: profile.summary || null,
291
+ currentEmployment: profile.current_positions
292
+ ? profile.current_positions.map((pos) => ({
293
+ title: pos.title || null,
294
+ companyName: pos.company_name || null,
295
+ companyLinkedinUrl: pos.company_linkedin_url || null,
296
+ startDate: pos.start_date || null,
297
+ description: pos.description || null,
298
+ }))
299
+ : null,
300
+ pastEmployment: profile.past_positions
301
+ ? profile.past_positions.map((pos) => ({
302
+ title: pos.title || null,
303
+ companyName: pos.company_name || null,
304
+ startDate: pos.start_date || null,
305
+ endDate: pos.end_date || null,
306
+ }))
307
+ : null,
308
+ education: profile.education
309
+ ? profile.education.map((edu) => ({
310
+ instituteName: edu.institute_name || null,
311
+ degreeName: edu.degree_name || null,
312
+ fieldOfStudy: edu.field_of_study || null,
313
+ }))
314
+ : null,
315
+ };
316
+ }
317
+ /**
318
+ * Transform company info to output format
319
+ */
320
+ transformCompanyInfo(company) {
321
+ if (!company)
322
+ return null;
323
+ return {
324
+ name: company.name || null,
325
+ linkedinUrl: company.linkedin_profile_url || null,
326
+ website: company.company_website || company.company_website_domain || null,
327
+ industry: company.industry || null,
328
+ description: company.description || null,
329
+ headcount: company.headcount || company.linkedin_headcount || null,
330
+ hqCity: company.hq_city || null,
331
+ hqCountry: company.hq_country || null,
332
+ yearFounded: company.year_founded || null,
333
+ fundingStage: company.funding_stage || null,
334
+ totalFunding: company.total_funding || null,
335
+ };
336
+ }
337
+ /**
338
+ * Create an error result
339
+ */
340
+ createErrorResult(errorMessage) {
341
+ return {
342
+ contacts: [],
343
+ company: null,
344
+ totalContacts: 0,
345
+ success: false,
346
+ error: errorMessage,
347
+ };
348
+ }
349
+ }
350
+ //# sourceMappingURL=company-enrichment-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company-enrichment-tool.js","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/company-enrichment-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAmB,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EACL,eAAe,GAGhB,MAAM,sCAAsC,CAAC;AAE9C,+CAA+C;AAC/C,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,aAAa;IACb,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC1D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CA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AC,CAAC;gBACL,CAAC,CAAC,IAAI;SACT,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,oBAAoB,CAC1B,OAAuC;QAEvC,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAE1B,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI;YAC1B,WAAW,EAAE,OAAO,CAAC,oBAAoB,IAAI,IAAI;YACjD,OAAO,EACL,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,sBAAsB,IAAI,IAAI;YACnE,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;YAClC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI;YACxC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,kBAAkB,IAAI,IAAI;YAClE,MAAM,EAAE,OAAO,CAAC,OAAO,IAAI,IAAI;YAC/B,SAAS,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI;YACrC,WAAW,EAAE,OAAO,CAAC,YAAY,IAAI,IAAI;YACzC,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;YAC3C,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;SAC5C,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,iBAAiB,CAAC,YAAoB;QAC5C,OAAO;YACL,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,CAAC;YAChB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,YAAY;SACpB,CAAC;IACJ,CAAC"}
@@ -28,16 +28,16 @@ declare const GetBubbleDetailsToolResultSchema: z.ZodObject<{
28
28
  error: z.ZodString;
29
29
  }, "strip", z.ZodTypeAny, {
30
30
  name: string;
31
- success: boolean;
32
31
  error: string;
32
+ success: boolean;
33
33
  outputSchema: string;
34
34
  usageExample: string;
35
35
  alias?: string | undefined;
36
36
  inputSchema?: string | undefined;
37
37
  }, {
38
38
  name: string;
39
- success: boolean;
40
39
  error: string;
40
+ success: boolean;
41
41
  outputSchema: string;
42
42
  usageExample: string;
43
43
  alias?: string | undefined;
@@ -69,16 +69,16 @@ export declare class GetBubbleDetailsTool extends ToolBubble<GetBubbleDetailsToo
69
69
  error: z.ZodString;
70
70
  }, "strip", z.ZodTypeAny, {
71
71
  name: string;
72
- success: boolean;
73
72
  error: string;
73
+ success: boolean;
74
74
  outputSchema: string;
75
75
  usageExample: string;
76
76
  alias?: string | undefined;
77
77
  inputSchema?: string | undefined;
78
78
  }, {
79
79
  name: string;
80
- success: boolean;
81
80
  error: string;
81
+ success: boolean;
82
82
  outputSchema: string;
83
83
  usageExample: string;
84
84
  alias?: string | undefined;
@@ -105,6 +105,10 @@ export declare class GetBubbleDetailsTool extends ToolBubble<GetBubbleDetailsToo
105
105
  private getParameterDescription;
106
106
  private generateExampleParams;
107
107
  private generateExampleValue;
108
+ /**
109
+ * Checks if a key represents a credential parameter that should be omitted from examples
110
+ */
111
+ private isCredentialKey;
108
112
  private toCamelCase;
109
113
  private toPascalCase;
110
114
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-bubble-details-tool.d.ts","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/get-bubble-details-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAK3D,QAAA,MAAM,gCAAgC;;;;;;;;;;;;EAgBpC,CAAC;AAGH,KAAK,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CACxC,CAAC;AACF,KAAK,0BAA0B,GAAG,CAAC,CAAC,MAAM,CACxC,OAAO,gCAAgC,CACxC,CAAC;AAEF,KAAK,0BAA0B,GAAG,CAAC,CAAC,MAAM,C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CAAC,oBAAoB;IA4B5B,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,yBAAyB;IAkIjC,OAAO,CAAC,qBAAqB;IA0D7B,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,qBAAqB;IAuC7B,OAAO,CAAC,0BAA0B;IAwBlC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAyB/B,OAAO,CAAC,qBAAqB;IAoF7B,OAAO,CAAC,oBAAoB;IAyN5B;;OAEG;IACH,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,YAAY;CAIrB"}
@@ -70,6 +70,11 @@ export class GetBubbleDetailsTool extends ToolBubble {
70
70
  if (!metadata) {
71
71
  throw new Error(`Bubble '${this.params.bubbleName}' not found in registry`);
72
72
  }
73
+ // Get the actual bubble class to extract its class name
74
+ const BubbleClass = this.factory.get(this.params.bubbleName);
75
+ const className = BubbleClass
76
+ ? BubbleClass.name
77
+ : this.toPascalCase(metadata.name) + 'Bubble'; // Fallback
73
78
  // Format schema for AI consumption
74
79
  // const schemaProperties = JSON.stringify(zodToJsonSchema(metadata.schema));
75
80
  // const resultSchemaProperties = JSON.stringify(
@@ -78,6 +83,7 @@ export class GetBubbleDetailsTool extends ToolBubble {
78
83
  // Create formatted description for AI agents
79
84
  const usageExample = this.generateUsageExample({
80
85
  name: metadata.name,
86
+ className,
81
87
  schema: metadata.schema,
82
88
  resultSchema: metadata.resultSchema,
83
89
  });
@@ -157,6 +163,8 @@ export class GetBubbleDetailsTool extends ToolBubble {
157
163
  const shape = zodType.shape;
158
164
  const properties = [];
159
165
  for (const [key, value] of Object.entries(shape)) {
166
+ if (this.isCredentialKey(key))
167
+ continue; // Skip credentials in nested objects
160
168
  if (value && typeof value === 'object' && '_def' in value) {
161
169
  const zodValue = value;
162
170
  const typeInfo = this.generateTypeInfo(zodValue, includeNestedDescriptions);
@@ -210,7 +218,46 @@ export class GetBubbleDetailsTool extends ToolBubble {
210
218
  return 'Record<string, unknown>';
211
219
  }
212
220
  else if (def.typeName === 'ZodDiscriminatedUnion') {
213
- return 'DiscriminatedUnion'; // Simplified for complex unions
221
+ // Expand discriminated union to show all possible options
222
+ const options = def.options;
223
+ if (options.length === 0) {
224
+ return 'DiscriminatedUnion';
225
+ }
226
+ // Generate type info for each option
227
+ const optionTypes = [];
228
+ for (const option of options) {
229
+ if (option && typeof option === 'object' && 'shape' in option) {
230
+ const shape = option.shape;
231
+ const properties = [];
232
+ for (const [key, value] of Object.entries(shape)) {
233
+ if (this.isCredentialKey(key))
234
+ continue;
235
+ if (value && typeof value === 'object' && '_def' in value) {
236
+ const zodValue = value;
237
+ const typeInfo = this.generateTypeInfo(zodValue, includeNestedDescriptions);
238
+ if (typeInfo) {
239
+ let propertyLine = `${key}: ${typeInfo}`;
240
+ // Include descriptions for nested properties if flag is set
241
+ if (includeNestedDescriptions) {
242
+ const description = this.getParameterDescription(zodValue);
243
+ if (description) {
244
+ propertyLine += ` // ${description}`;
245
+ }
246
+ }
247
+ properties.push(propertyLine);
248
+ }
249
+ }
250
+ }
251
+ if (properties.length > 0) {
252
+ optionTypes.push(`{ ${properties.join(', ')} }`);
253
+ }
254
+ }
255
+ }
256
+ if (optionTypes.length > 0) {
257
+ // Show all discriminated union options
258
+ return optionTypes.join(' | ');
259
+ }
260
+ return 'DiscriminatedUnion';
214
261
  }
215
262
  return 'unknown';
216
263
  }
@@ -273,11 +320,11 @@ export class GetBubbleDetailsTool extends ToolBubble {
273
320
  lines.push(`// ${operationComment}`);
274
321
  // Create variable name with operation suffix
275
322
  const variableName = `${this.toCamelCase(metadata.name)}_${operationName.replace(/[^a-zA-Z0-9]/g, '_')}`;
276
- lines.push(`const ${variableName} = new ${this.toPascalCase(metadata.name)}Bubble({`);
323
+ lines.push(`const ${variableName} = new ${metadata.className}({`);
277
324
  // Generate parameters for this specific operation
278
325
  const operationParams = [];
279
326
  Object.entries(shape).forEach(([key, value]) => {
280
- if (key === 'credentials')
327
+ if (this.isCredentialKey(key))
281
328
  return; // Skip credentials
282
329
  if (value && typeof value === 'object' && '_def' in value) {
283
330
  const zodType = value;
@@ -343,7 +390,7 @@ export class GetBubbleDetailsTool extends ToolBubble {
343
390
  lines.push(`// Example usage of ${metadata.name} bubble`);
344
391
  // Try to extract example parameters from schema
345
392
  const exampleParams = this.generateExampleParams(metadata.schema);
346
- lines.push(`const ${this.toCamelCase(metadata.name)} = new ${this.toPascalCase(metadata.name)}Bubble({`);
393
+ lines.push(`const ${this.toCamelCase(metadata.name)} = new ${metadata.className}({`);
347
394
  if (exampleParams.length > 0) {
348
395
  lines.push(...exampleParams.map((param) => ` ${param},`));
349
396
  }
@@ -489,7 +536,7 @@ export class GetBubbleDetailsTool extends ToolBubble {
489
536
  params.push(`// Operation: ${operationName}`);
490
537
  // Add parameters for this operation
491
538
  Object.entries(shape).forEach(([key, value]) => {
492
- if (key === 'credentials' || key === discriminatorKey)
539
+ if (this.isCredentialKey(key) || key === discriminatorKey)
493
540
  return; // Skip credentials and discriminator
494
541
  if (value && typeof value === 'object' && '_def' in value) {
495
542
  const zodType = value;
@@ -516,7 +563,7 @@ export class GetBubbleDetailsTool extends ToolBubble {
516
563
  const zodSchema = schema;
517
564
  const shape = zodSchema.shape;
518
565
  Object.entries(shape).forEach(([key, value]) => {
519
- if (key === 'credentials')
566
+ if (this.isCredentialKey(key))
520
567
  return; // Skip credentials in examples
521
568
  if (value && typeof value === 'object' && '_def' in value) {
522
569
  const zodType = value;
@@ -567,6 +614,8 @@ export class GetBubbleDetailsTool extends ToolBubble {
567
614
  // Limit properties to avoid too verbose examples
568
615
  let count = 0;
569
616
  for (const [key, value] of Object.entries(shape)) {
617
+ if (this.isCredentialKey(key))
618
+ continue; // Skip credentials in nested objects
570
619
  if (value && typeof value === 'object' && '_def' in value) {
571
620
  const zodValue = value;
572
621
  const exampleValue = this.generateExampleValue(zodValue);
@@ -642,6 +691,42 @@ export class GetBubbleDetailsTool extends ToolBubble {
642
691
  }
643
692
  return `"${enumValues[0]}"`;
644
693
  }
694
+ else if (def.typeName === 'ZodUnion') {
695
+ // For unions, try to find the most descriptive option
696
+ const options = def.options;
697
+ if (options.length === 0) {
698
+ return null;
699
+ }
700
+ // Prefer objects, then arrays, then other complex types over primitives
701
+ const optionPriority = (option) => {
702
+ const optionDef = option._def;
703
+ if (optionDef.typeName === 'ZodObject')
704
+ return 4;
705
+ if (optionDef.typeName === 'ZodArray')
706
+ return 3;
707
+ if (optionDef.typeName === 'ZodAny')
708
+ return 2; // z.any() can represent schemas
709
+ if (optionDef.typeName === 'ZodString')
710
+ return 1;
711
+ return 0;
712
+ };
713
+ // Sort options by priority (highest first)
714
+ const sortedOptions = [...options].sort((a, b) => optionPriority(b) - optionPriority(a));
715
+ // Try each option in priority order
716
+ for (const option of sortedOptions) {
717
+ const example = this.generateExampleValue(option);
718
+ if (example !== null) {
719
+ // For z.any(), show a simple schema example
720
+ if (option._def.typeName === 'ZodAny') {
721
+ return `z.object({ result: z.array(z.object({ trend: z.string().describe('An array of trends') })) }) // Zod schema object or JSON schema string`;
722
+ }
723
+ // For other types, just show the example without internal Zod type names
724
+ return example;
725
+ }
726
+ }
727
+ // Fallback: show first option as string representation
728
+ return `"example" // union type`;
729
+ }
645
730
  else if (def.typeName === 'ZodDiscriminatedUnion') {
646
731
  // For discriminated unions, generate a proper example object from the first option
647
732
  const options = def.options;
@@ -656,6 +741,8 @@ export class GetBubbleDetailsTool extends ToolBubble {
656
741
  const shape = firstOption.shape;
657
742
  const properties = [];
658
743
  for (const [key, value] of Object.entries(shape)) {
744
+ if (this.isCredentialKey(key))
745
+ continue; // Skip credentials
659
746
  if (value && typeof value === 'object' && '_def' in value) {
660
747
  const zodValue = value;
661
748
  const exampleValue = this.generateExampleValue(zodValue);
@@ -676,18 +763,36 @@ export class GetBubbleDetailsTool extends ToolBubble {
676
763
  return JSON.stringify(def.value);
677
764
  }
678
765
  else if (def.typeName === 'ZodRecord') {
679
- // For records, show an example with a key-value pair
766
+ // For records, check if value type is a discriminated union
680
767
  const valueType = def.valueType;
681
- if (valueType) {
768
+ if (valueType &&
769
+ valueType._def &&
770
+ valueType._def.typeName === 'ZodDiscriminatedUnion') {
771
+ // For discriminated unions, show the type structure instead of multiple examples
772
+ const typeInfo = this.generateTypeInfo(valueType, true);
773
+ if (typeInfo) {
774
+ return `{ "PUT_PROPERTY_TYPE_HERE": ${typeInfo} }`;
775
+ }
776
+ }
777
+ else if (valueType) {
778
+ // For non-discriminated union records, show single example
682
779
  const valueExample = this.generateExampleValue(valueType);
683
780
  if (valueExample) {
684
- return `{ "example_key": ${valueExample} } // record/object with string keys`;
781
+ return `{ "example_key": ${valueExample} }`;
685
782
  }
686
783
  }
687
- return '{} // record/object with string keys';
784
+ return '{}';
688
785
  }
689
786
  return null;
690
787
  }
788
+ /**
789
+ * Checks if a key represents a credential parameter that should be omitted from examples
790
+ */
791
+ isCredentialKey(key) {
792
+ // Check for exact match or case-insensitive variations
793
+ const lowerKey = key.toLowerCase();
794
+ return lowerKey === 'credentials' || lowerKey === 'credential';
795
+ }
691
796
  toCamelCase(str) {
692
797
  return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
693
798
  }