@bubblelab/bubble-core 0.1.180 → 0.1.181

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 (62) hide show
  1. package/dist/bubble-bundle.d.ts +97 -96
  2. package/dist/bubbles/service-bubble/agi-inc.d.ts +20 -20
  3. package/dist/bubbles/service-bubble/ai-agent.d.ts +72 -72
  4. package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
  5. package/dist/bubbles/service-bubble/ai-agent.js +73 -11
  6. package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
  7. package/dist/bubbles/service-bubble/airtable.d.ts +76 -76
  8. package/dist/bubbles/service-bubble/apify/apify.d.ts +22 -22
  9. package/dist/bubbles/service-bubble/ashby/ashby.d.ts +2 -2
  10. package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +2 -2
  11. package/dist/bubbles/service-bubble/attio/attio.d.ts +2 -2
  12. package/dist/bubbles/service-bubble/attio/attio.schema.d.ts +2 -2
  13. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +1 -1
  14. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +1 -1
  15. package/dist/bubbles/service-bubble/capability-pipeline.d.ts.map +1 -1
  16. package/dist/bubbles/service-bubble/capability-pipeline.js +20 -6
  17. package/dist/bubbles/service-bubble/capability-pipeline.js.map +1 -1
  18. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +8 -8
  19. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +16 -16
  20. package/dist/bubbles/service-bubble/firecrawl.d.ts +346 -346
  21. package/dist/bubbles/service-bubble/followupboss.d.ts +4 -4
  22. package/dist/bubbles/service-bubble/github.d.ts +60 -60
  23. package/dist/bubbles/service-bubble/gmail.d.ts +164 -164
  24. package/dist/bubbles/service-bubble/google-calendar.d.ts +6 -6
  25. package/dist/bubbles/service-bubble/google-drive.d.ts +40 -40
  26. package/dist/bubbles/service-bubble/http.d.ts +2 -2
  27. package/dist/bubbles/service-bubble/insforge-db.d.ts +8 -8
  28. package/dist/bubbles/service-bubble/jira/jira.d.ts +42 -42
  29. package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +50 -50
  30. package/dist/bubbles/service-bubble/notion/notion.d.ts +848 -848
  31. package/dist/bubbles/service-bubble/postgresql.d.ts +8 -8
  32. package/dist/bubbles/service-bubble/posthog/posthog.d.ts +10 -10
  33. package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts +14 -14
  34. package/dist/bubbles/service-bubble/slack/slack.d.ts +240 -240
  35. package/dist/bubbles/service-bubble/stripe/stripe.d.ts +24 -24
  36. package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +28 -28
  37. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +2 -2
  38. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +2 -2
  39. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +4 -4
  40. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +10 -10
  41. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +330 -330
  42. package/dist/bubbles/tool-bubble/people-search-tool.d.ts +34 -34
  43. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +10 -10
  44. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +4 -4
  45. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +4 -4
  46. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +52 -52
  47. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +124 -124
  48. package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +8 -8
  49. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +20 -20
  50. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +12 -12
  51. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +16 -16
  52. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +2 -2
  53. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +26 -26
  54. package/dist/bubbles.json +1 -1
  55. package/dist/capabilities/define-capability.d.ts +5 -1
  56. package/dist/capabilities/define-capability.d.ts.map +1 -1
  57. package/dist/capabilities/define-capability.js +8 -1
  58. package/dist/capabilities/define-capability.js.map +1 -1
  59. package/dist/capabilities/index.d.ts +1 -1
  60. package/dist/capabilities/index.d.ts.map +1 -1
  61. package/dist/capabilities/index.js.map +1 -1
  62. package/package.json +2 -2
@@ -203,9 +203,9 @@ declare const AGIIncResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
203
203
  ok: boolean;
204
204
  status?: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated" | undefined;
205
205
  created_at?: string | undefined;
206
- agent_name?: string | undefined;
207
206
  session_id?: string | undefined;
208
207
  vnc_url?: string | undefined;
208
+ agent_name?: string | undefined;
209
209
  }, {
210
210
  error: string;
211
211
  success: boolean;
@@ -213,9 +213,9 @@ declare const AGIIncResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
213
213
  ok: boolean;
214
214
  status?: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated" | undefined;
215
215
  created_at?: string | undefined;
216
- agent_name?: string | undefined;
217
216
  session_id?: string | undefined;
218
217
  vnc_url?: string | undefined;
218
+ agent_name?: string | undefined;
219
219
  }>, z.ZodObject<{
220
220
  operation: z.ZodLiteral<"list_sessions">;
221
221
  ok: z.ZodBoolean;
@@ -228,14 +228,14 @@ declare const AGIIncResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
228
228
  }, "strip", z.ZodTypeAny, {
229
229
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
230
230
  created_at: string;
231
- agent_name: string;
232
231
  session_id: string;
232
+ agent_name: string;
233
233
  vnc_url?: string | undefined;
234
234
  }, {
235
235
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
236
236
  created_at: string;
237
- agent_name: string;
238
237
  session_id: string;
238
+ agent_name: string;
239
239
  vnc_url?: string | undefined;
240
240
  }>, "many">>;
241
241
  error: z.ZodString;
@@ -248,8 +248,8 @@ declare const AGIIncResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
248
248
  sessions?: {
249
249
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
250
250
  created_at: string;
251
- agent_name: string;
252
251
  session_id: string;
252
+ agent_name: string;
253
253
  vnc_url?: string | undefined;
254
254
  }[] | undefined;
255
255
  }, {
@@ -260,8 +260,8 @@ declare const AGIIncResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
260
260
  sessions?: {
261
261
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
262
262
  created_at: string;
263
- agent_name: string;
264
263
  session_id: string;
264
+ agent_name: string;
265
265
  vnc_url?: string | undefined;
266
266
  }[] | undefined;
267
267
  }>, z.ZodObject<{
@@ -276,14 +276,14 @@ declare const AGIIncResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
276
276
  }, "strip", z.ZodTypeAny, {
277
277
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
278
278
  created_at: string;
279
- agent_name: string;
280
279
  session_id: string;
280
+ agent_name: string;
281
281
  vnc_url?: string | undefined;
282
282
  }, {
283
283
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
284
284
  created_at: string;
285
- agent_name: string;
286
285
  session_id: string;
286
+ agent_name: string;
287
287
  vnc_url?: string | undefined;
288
288
  }>>;
289
289
  error: z.ZodString;
@@ -296,8 +296,8 @@ declare const AGIIncResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
296
296
  session?: {
297
297
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
298
298
  created_at: string;
299
- agent_name: string;
300
299
  session_id: string;
300
+ agent_name: string;
301
301
  vnc_url?: string | undefined;
302
302
  } | undefined;
303
303
  }, {
@@ -308,8 +308,8 @@ declare const AGIIncResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
308
308
  session?: {
309
309
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
310
310
  created_at: string;
311
- agent_name: string;
312
311
  session_id: string;
312
+ agent_name: string;
313
313
  vnc_url?: string | undefined;
314
314
  } | undefined;
315
315
  }>, z.ZodObject<{
@@ -756,9 +756,9 @@ export declare class AGIIncBubble<T extends AGIIncParams = AGIIncParams> extends
756
756
  ok: boolean;
757
757
  status?: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated" | undefined;
758
758
  created_at?: string | undefined;
759
- agent_name?: string | undefined;
760
759
  session_id?: string | undefined;
761
760
  vnc_url?: string | undefined;
761
+ agent_name?: string | undefined;
762
762
  }, {
763
763
  error: string;
764
764
  success: boolean;
@@ -766,9 +766,9 @@ export declare class AGIIncBubble<T extends AGIIncParams = AGIIncParams> extends
766
766
  ok: boolean;
767
767
  status?: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated" | undefined;
768
768
  created_at?: string | undefined;
769
- agent_name?: string | undefined;
770
769
  session_id?: string | undefined;
771
770
  vnc_url?: string | undefined;
771
+ agent_name?: string | undefined;
772
772
  }>, z.ZodObject<{
773
773
  operation: z.ZodLiteral<"list_sessions">;
774
774
  ok: z.ZodBoolean;
@@ -781,14 +781,14 @@ export declare class AGIIncBubble<T extends AGIIncParams = AGIIncParams> extends
781
781
  }, "strip", z.ZodTypeAny, {
782
782
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
783
783
  created_at: string;
784
- agent_name: string;
785
784
  session_id: string;
785
+ agent_name: string;
786
786
  vnc_url?: string | undefined;
787
787
  }, {
788
788
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
789
789
  created_at: string;
790
- agent_name: string;
791
790
  session_id: string;
791
+ agent_name: string;
792
792
  vnc_url?: string | undefined;
793
793
  }>, "many">>;
794
794
  error: z.ZodString;
@@ -801,8 +801,8 @@ export declare class AGIIncBubble<T extends AGIIncParams = AGIIncParams> extends
801
801
  sessions?: {
802
802
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
803
803
  created_at: string;
804
- agent_name: string;
805
804
  session_id: string;
805
+ agent_name: string;
806
806
  vnc_url?: string | undefined;
807
807
  }[] | undefined;
808
808
  }, {
@@ -813,8 +813,8 @@ export declare class AGIIncBubble<T extends AGIIncParams = AGIIncParams> extends
813
813
  sessions?: {
814
814
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
815
815
  created_at: string;
816
- agent_name: string;
817
816
  session_id: string;
817
+ agent_name: string;
818
818
  vnc_url?: string | undefined;
819
819
  }[] | undefined;
820
820
  }>, z.ZodObject<{
@@ -829,14 +829,14 @@ export declare class AGIIncBubble<T extends AGIIncParams = AGIIncParams> extends
829
829
  }, "strip", z.ZodTypeAny, {
830
830
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
831
831
  created_at: string;
832
- agent_name: string;
833
832
  session_id: string;
833
+ agent_name: string;
834
834
  vnc_url?: string | undefined;
835
835
  }, {
836
836
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
837
837
  created_at: string;
838
- agent_name: string;
839
838
  session_id: string;
839
+ agent_name: string;
840
840
  vnc_url?: string | undefined;
841
841
  }>>;
842
842
  error: z.ZodString;
@@ -849,8 +849,8 @@ export declare class AGIIncBubble<T extends AGIIncParams = AGIIncParams> extends
849
849
  session?: {
850
850
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
851
851
  created_at: string;
852
- agent_name: string;
853
852
  session_id: string;
853
+ agent_name: string;
854
854
  vnc_url?: string | undefined;
855
855
  } | undefined;
856
856
  }, {
@@ -861,8 +861,8 @@ export declare class AGIIncBubble<T extends AGIIncParams = AGIIncParams> extends
861
861
  session?: {
862
862
  status: "error" | "completed" | "initializing" | "ready" | "running" | "paused" | "terminated";
863
863
  created_at: string;
864
- agent_name: string;
865
864
  session_id: string;
865
+ agent_name: string;
866
866
  vnc_url?: string | undefined;
867
867
  } | undefined;
868
868
  }>, z.ZodObject<{
@@ -164,12 +164,12 @@ declare const AIAgentParamsSchema: z.ZodObject<{
164
164
  }, "strip", z.ZodTypeAny, {
165
165
  description: string;
166
166
  name: string;
167
- schema: z.ZodTypeAny | Record<string, unknown>;
167
+ schema: Record<string, unknown> | z.ZodTypeAny;
168
168
  func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
169
169
  }, {
170
170
  description: string;
171
171
  name: string;
172
- schema: z.ZodTypeAny | Record<string, unknown>;
172
+ schema: Record<string, unknown> | z.ZodTypeAny;
173
173
  func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
174
174
  }>, "many">>>;
175
175
  maxIterations: z.ZodDefault<z.ZodNumber>;
@@ -193,17 +193,6 @@ declare const AIAgentParamsSchema: z.ZodObject<{
193
193
  enableSlackHistory: z.ZodDefault<z.ZodBoolean>;
194
194
  }, "strip", z.ZodTypeAny, {
195
195
  message: string;
196
- images: ({
197
- type: "base64";
198
- data: string;
199
- mimeType: string;
200
- description?: string | undefined;
201
- } | {
202
- type: "url";
203
- url: string;
204
- description?: string | undefined;
205
- })[];
206
- systemPrompt: string;
207
196
  model: {
208
197
  model: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-sonnet-4-6" | "anthropic/claude-opus-4-5" | "anthropic/claude-opus-4-6" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/z-ai/glm-4.7" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/anthropic/claude-sonnet-4.6" | "openrouter/anthropic/claude-opus-4.5" | "openrouter/anthropic/claude-opus-4.6" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/openai/gpt-oss-120b" | "openrouter/openai/o3-deep-research" | "openrouter/openai/o4-mini-deep-research";
209
198
  temperature: number;
@@ -220,27 +209,38 @@ declare const AIAgentParamsSchema: z.ZodObject<{
220
209
  maxRetries?: number | undefined;
221
210
  } | undefined;
222
211
  };
212
+ streaming: boolean;
223
213
  tools: {
224
214
  name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "list-capabilities-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "code-edit-tool" | "instagram-tool" | "linkedin-tool" | "tiktok-tool" | "twitter-tool" | "google-maps-tool" | "youtube-tool" | "amazon-shopping-tool" | "people-search-tool";
225
215
  credentials?: Partial<Record<CredentialType, string>> | undefined;
226
216
  config?: Record<string, unknown> | undefined;
227
217
  }[];
218
+ images: ({
219
+ type: "base64";
220
+ data: string;
221
+ mimeType: string;
222
+ description?: string | undefined;
223
+ } | {
224
+ type: "url";
225
+ url: string;
226
+ description?: string | undefined;
227
+ })[];
228
+ systemPrompt: string;
228
229
  maxIterations: number;
229
- streaming: boolean;
230
230
  memoryEnabled: boolean;
231
231
  enableSlackHistory: boolean;
232
232
  name?: string | undefined;
233
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
233
234
  conversationHistory?: {
234
235
  role: "user" | "assistant" | "tool";
235
236
  content: string;
236
237
  toolCallId?: string | undefined;
237
238
  name?: string | undefined;
238
239
  }[] | undefined;
239
- credentials?: Partial<Record<CredentialType, string>> | undefined;
240
240
  customTools?: {
241
241
  description: string;
242
242
  name: string;
243
- schema: z.ZodTypeAny | Record<string, unknown>;
243
+ schema: Record<string, unknown> | z.ZodTypeAny;
244
244
  func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
245
245
  }[] | undefined;
246
246
  capabilities?: {
@@ -252,23 +252,7 @@ declare const AIAgentParamsSchema: z.ZodObject<{
252
252
  }, {
253
253
  message: string;
254
254
  name?: string | undefined;
255
- images?: ({
256
- data: string;
257
- type?: "base64" | undefined;
258
- description?: string | undefined;
259
- mimeType?: string | undefined;
260
- } | {
261
- type: "url";
262
- url: string;
263
- description?: string | undefined;
264
- })[] | undefined;
265
- conversationHistory?: {
266
- role: "user" | "assistant" | "tool";
267
- content: string;
268
- toolCallId?: string | undefined;
269
- name?: string | undefined;
270
- }[] | undefined;
271
- systemPrompt?: string | undefined;
255
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
272
256
  model?: {
273
257
  model: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-sonnet-4-6" | "anthropic/claude-opus-4-5" | "anthropic/claude-opus-4-6" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/z-ai/glm-4.7" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/anthropic/claude-sonnet-4.6" | "openrouter/anthropic/claude-opus-4.5" | "openrouter/anthropic/claude-opus-4.6" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/openai/gpt-oss-120b" | "openrouter/openai/o3-deep-research" | "openrouter/openai/o4-mini-deep-research";
274
258
  temperature?: number | undefined;
@@ -285,20 +269,36 @@ declare const AIAgentParamsSchema: z.ZodObject<{
285
269
  maxRetries?: number | undefined;
286
270
  } | undefined;
287
271
  } | undefined;
288
- credentials?: Partial<Record<CredentialType, string>> | undefined;
272
+ streaming?: boolean | undefined;
289
273
  tools?: {
290
274
  name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "list-capabilities-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "code-edit-tool" | "instagram-tool" | "linkedin-tool" | "tiktok-tool" | "twitter-tool" | "google-maps-tool" | "youtube-tool" | "amazon-shopping-tool" | "people-search-tool";
291
275
  credentials?: Partial<Record<CredentialType, string>> | undefined;
292
276
  config?: Record<string, unknown> | undefined;
293
277
  }[] | undefined;
278
+ images?: ({
279
+ data: string;
280
+ type?: "base64" | undefined;
281
+ description?: string | undefined;
282
+ mimeType?: string | undefined;
283
+ } | {
284
+ type: "url";
285
+ url: string;
286
+ description?: string | undefined;
287
+ })[] | undefined;
288
+ conversationHistory?: {
289
+ role: "user" | "assistant" | "tool";
290
+ content: string;
291
+ toolCallId?: string | undefined;
292
+ name?: string | undefined;
293
+ }[] | undefined;
294
+ systemPrompt?: string | undefined;
294
295
  customTools?: {
295
296
  description: string;
296
297
  name: string;
297
- schema: z.ZodTypeAny | Record<string, unknown>;
298
+ schema: Record<string, unknown> | z.ZodTypeAny;
298
299
  func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
299
300
  }[] | undefined;
300
301
  maxIterations?: number | undefined;
301
- streaming?: boolean | undefined;
302
302
  capabilities?: {
303
303
  id: string;
304
304
  credentials?: Partial<Record<CredentialType, string>> | undefined;
@@ -498,12 +498,12 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
498
498
  }, "strip", z.ZodTypeAny, {
499
499
  description: string;
500
500
  name: string;
501
- schema: z.ZodTypeAny | Record<string, unknown>;
501
+ schema: Record<string, unknown> | z.ZodTypeAny;
502
502
  func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
503
503
  }, {
504
504
  description: string;
505
505
  name: string;
506
- schema: z.ZodTypeAny | Record<string, unknown>;
506
+ schema: Record<string, unknown> | z.ZodTypeAny;
507
507
  func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
508
508
  }>, "many">>>;
509
509
  maxIterations: z.ZodDefault<z.ZodNumber>;
@@ -527,17 +527,6 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
527
527
  enableSlackHistory: z.ZodDefault<z.ZodBoolean>;
528
528
  }, "strip", z.ZodTypeAny, {
529
529
  message: string;
530
- images: ({
531
- type: "base64";
532
- data: string;
533
- mimeType: string;
534
- description?: string | undefined;
535
- } | {
536
- type: "url";
537
- url: string;
538
- description?: string | undefined;
539
- })[];
540
- systemPrompt: string;
541
530
  model: {
542
531
  model: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-sonnet-4-6" | "anthropic/claude-opus-4-5" | "anthropic/claude-opus-4-6" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/z-ai/glm-4.7" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/anthropic/claude-sonnet-4.6" | "openrouter/anthropic/claude-opus-4.5" | "openrouter/anthropic/claude-opus-4.6" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/openai/gpt-oss-120b" | "openrouter/openai/o3-deep-research" | "openrouter/openai/o4-mini-deep-research";
543
532
  temperature: number;
@@ -554,27 +543,38 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
554
543
  maxRetries?: number | undefined;
555
544
  } | undefined;
556
545
  };
546
+ streaming: boolean;
557
547
  tools: {
558
548
  name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "list-capabilities-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "code-edit-tool" | "instagram-tool" | "linkedin-tool" | "tiktok-tool" | "twitter-tool" | "google-maps-tool" | "youtube-tool" | "amazon-shopping-tool" | "people-search-tool";
559
549
  credentials?: Partial<Record<CredentialType, string>> | undefined;
560
550
  config?: Record<string, unknown> | undefined;
561
551
  }[];
552
+ images: ({
553
+ type: "base64";
554
+ data: string;
555
+ mimeType: string;
556
+ description?: string | undefined;
557
+ } | {
558
+ type: "url";
559
+ url: string;
560
+ description?: string | undefined;
561
+ })[];
562
+ systemPrompt: string;
562
563
  maxIterations: number;
563
- streaming: boolean;
564
564
  memoryEnabled: boolean;
565
565
  enableSlackHistory: boolean;
566
566
  name?: string | undefined;
567
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
567
568
  conversationHistory?: {
568
569
  role: "user" | "assistant" | "tool";
569
570
  content: string;
570
571
  toolCallId?: string | undefined;
571
572
  name?: string | undefined;
572
573
  }[] | undefined;
573
- credentials?: Partial<Record<CredentialType, string>> | undefined;
574
574
  customTools?: {
575
575
  description: string;
576
576
  name: string;
577
- schema: z.ZodTypeAny | Record<string, unknown>;
577
+ schema: Record<string, unknown> | z.ZodTypeAny;
578
578
  func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
579
579
  }[] | undefined;
580
580
  capabilities?: {
@@ -586,23 +586,7 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
586
586
  }, {
587
587
  message: string;
588
588
  name?: string | undefined;
589
- images?: ({
590
- data: string;
591
- type?: "base64" | undefined;
592
- description?: string | undefined;
593
- mimeType?: string | undefined;
594
- } | {
595
- type: "url";
596
- url: string;
597
- description?: string | undefined;
598
- })[] | undefined;
599
- conversationHistory?: {
600
- role: "user" | "assistant" | "tool";
601
- content: string;
602
- toolCallId?: string | undefined;
603
- name?: string | undefined;
604
- }[] | undefined;
605
- systemPrompt?: string | undefined;
589
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
606
590
  model?: {
607
591
  model: "openai/gpt-5" | "openai/gpt-5-mini" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "google/gemini-3-pro-preview" | "google/gemini-3-pro-image-preview" | "google/gemini-3-flash-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-sonnet-4-6" | "anthropic/claude-opus-4-5" | "anthropic/claude-opus-4-6" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | "openrouter/z-ai/glm-4.7" | "openrouter/anthropic/claude-sonnet-4.5" | "openrouter/anthropic/claude-sonnet-4.6" | "openrouter/anthropic/claude-opus-4.5" | "openrouter/anthropic/claude-opus-4.6" | "openrouter/google/gemini-3-pro-preview" | "openrouter/morph/morph-v3-large" | "openrouter/openai/gpt-oss-120b" | "openrouter/openai/o3-deep-research" | "openrouter/openai/o4-mini-deep-research";
608
592
  temperature?: number | undefined;
@@ -619,20 +603,36 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
619
603
  maxRetries?: number | undefined;
620
604
  } | undefined;
621
605
  } | undefined;
622
- credentials?: Partial<Record<CredentialType, string>> | undefined;
606
+ streaming?: boolean | undefined;
623
607
  tools?: {
624
608
  name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "list-capabilities-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "code-edit-tool" | "instagram-tool" | "linkedin-tool" | "tiktok-tool" | "twitter-tool" | "google-maps-tool" | "youtube-tool" | "amazon-shopping-tool" | "people-search-tool";
625
609
  credentials?: Partial<Record<CredentialType, string>> | undefined;
626
610
  config?: Record<string, unknown> | undefined;
627
611
  }[] | undefined;
612
+ images?: ({
613
+ data: string;
614
+ type?: "base64" | undefined;
615
+ description?: string | undefined;
616
+ mimeType?: string | undefined;
617
+ } | {
618
+ type: "url";
619
+ url: string;
620
+ description?: string | undefined;
621
+ })[] | undefined;
622
+ conversationHistory?: {
623
+ role: "user" | "assistant" | "tool";
624
+ content: string;
625
+ toolCallId?: string | undefined;
626
+ name?: string | undefined;
627
+ }[] | undefined;
628
+ systemPrompt?: string | undefined;
628
629
  customTools?: {
629
630
  description: string;
630
631
  name: string;
631
- schema: z.ZodTypeAny | Record<string, unknown>;
632
+ schema: Record<string, unknown> | z.ZodTypeAny;
632
633
  func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
633
634
  }[] | undefined;
634
635
  maxIterations?: number | undefined;
635
- streaming?: boolean | undefined;
636
636
  capabilities?: {
637
637
  id: string;
638
638
  credentials?: Partial<Record<CredentialType, string>> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ai-agent.d.ts","sourceRoot":"","sources":["../../../src/bubbles/service-bubble/ai-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAmB,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,cAAc,EAGf,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAEL,SAAS,EAET,cAAc,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM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,QAAQ,CAAC,mBAAmB,CAAK;gBAG9C,MAAM,GAAE,aAIP,EACD,OAAO,CAAC,EAAE,aAAa,EACvB,UAAU,CAAC,EAAE,MAAM;IAUR,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAW/C;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAmBxB;;OAEG;YACW,gBAAgB;IAkC9B;;OAEG;YACW,YAAY;cA8HV,aAAa,CAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,aAAa,CAAC;IAkDzB;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IA2CnC,SAAS,CAAC,iBAAiB,IAAI,cAAc;IAI7C;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAgBjC,SAAS,CAAC,gBAAgB,IAAI,MAAM,GAAG,SAAS;IA2BhD;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;;OAGG;YACW,gCAAgC;IA6J9C,OAAO,CAAC,eAAe;YAyKT,eAAe;IA2Y7B;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAgCpC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAgDjC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAuDvB;;OAEG;YACW,qBAAqB;YAuMrB,gBAAgB;YAmUhB,YAAY;CAkc3B"}
@@ -345,7 +345,7 @@ export class AIAgentBubble extends ServiceBubble {
345
345
  // Create the agent graph
346
346
  const graph = await this.createAgentGraph(llm, agentTools, systemPrompt);
347
347
  // Execute the agent
348
- return this.executeAgent(graph, message, images, maxIterations, modelConfig, conversationHistory);
348
+ return this.executeAgent(graph, message, images, maxIterations, modelConfig, conversationHistory, agentTools);
349
349
  }
350
350
  /**
351
351
  * Modify params before execution - centralizes all param transformations
@@ -1245,6 +1245,8 @@ export class AIAgentBubble extends ServiceBubble {
1245
1245
  variableId: this.context?.variableId,
1246
1246
  },
1247
1247
  });
1248
+ // Notify executionMeta callback (e.g. Slack thinking-message status updates)
1249
+ this.context?.executionMeta?._onToolCallStart?.(toolCall.name, toolCall.args);
1248
1250
  // Send tool_complete event with error
1249
1251
  this.streamingCallback?.({
1250
1252
  type: 'tool_call_complete',
@@ -1285,6 +1287,8 @@ export class AIAgentBubble extends ServiceBubble {
1285
1287
  variableId: this.context?.variableId,
1286
1288
  },
1287
1289
  });
1290
+ // Notify executionMeta callback (e.g. Slack thinking-message status updates)
1291
+ this.context?.executionMeta?._onToolCallStart?.(toolCall.name, toolCall.args);
1288
1292
  // If hook returns modified messages/toolInput, apply them
1289
1293
  if (hookResult_before) {
1290
1294
  if (hookResult_before.messages) {
@@ -1629,7 +1633,7 @@ export class AIAgentBubble extends ServiceBubble {
1629
1633
  }
1630
1634
  return graph.compile();
1631
1635
  }
1632
- async executeAgent(graph, message, images, maxIterations, modelConfig, conversationHistory) {
1636
+ async executeAgent(graph, message, images, maxIterations, modelConfig, conversationHistory, tools) {
1633
1637
  const jsonMode = modelConfig.jsonMode;
1634
1638
  const toolCalls = [];
1635
1639
  let iterations = 0;
@@ -1642,21 +1646,79 @@ export class AIAgentBubble extends ServiceBubble {
1642
1646
  if (resumeState && Array.isArray(resumeState) && resumeState.length > 0) {
1643
1647
  const { mapStoredMessagesToChatMessages } = await import('@langchain/core/messages');
1644
1648
  const restored = mapStoredMessagesToChatMessages(resumeState);
1645
- initialMessages.push(...restored);
1646
- // If last restored message is AIMessage with pending tool_calls,
1647
- // add synthetic ToolMessages so the message sequence is valid
1648
- const lastMsg = restored[restored.length - 1];
1649
- if (lastMsg && 'tool_calls' in lastMsg) {
1650
- const toolCalls = lastMsg.tool_calls;
1651
- if (toolCalls?.length) {
1652
- for (const tc of toolCalls) {
1653
- initialMessages.push(new ToolMessage({
1649
+ // Collect existing tool_call_ids that already have ToolMessage responses
1650
+ const existingToolResultIds = new Set();
1651
+ for (const msg of restored) {
1652
+ if (msg._getType() === 'tool') {
1653
+ const tm = msg;
1654
+ if (tm.tool_call_id)
1655
+ existingToolResultIds.add(tm.tool_call_id);
1656
+ }
1657
+ }
1658
+ // Find AIMessages with unresolved tool_calls (no matching ToolMessage)
1659
+ // The LAST such AIMessage is the one that triggered approval
1660
+ let approvalAiMsgIndex = -1;
1661
+ for (let i = restored.length - 1; i >= 0; i--) {
1662
+ const msg = restored[i];
1663
+ if (msg._getType() === 'ai') {
1664
+ const aiMsg = msg;
1665
+ const pending = aiMsg.tool_calls?.filter((tc) => tc.id && !existingToolResultIds.has(tc.id));
1666
+ if (pending?.length) {
1667
+ approvalAiMsgIndex = i;
1668
+ break;
1669
+ }
1670
+ }
1671
+ }
1672
+ // Build a lookup of available tools by name for direct execution
1673
+ const toolsByName = new Map();
1674
+ if (tools) {
1675
+ for (const t of tools)
1676
+ toolsByName.set(t.name, t);
1677
+ }
1678
+ // Process all AIMessages: execute or add synthetic results for unresolved tool_calls
1679
+ // We iterate in order and insert ToolMessages right after their AIMessage
1680
+ const repairedMessages = [];
1681
+ for (let i = 0; i < restored.length; i++) {
1682
+ repairedMessages.push(restored[i]);
1683
+ const msg = restored[i];
1684
+ if (msg._getType() !== 'ai')
1685
+ continue;
1686
+ const aiMsg = msg;
1687
+ const pendingCalls = aiMsg.tool_calls?.filter((tc) => tc.id && !existingToolResultIds.has(tc.id));
1688
+ if (!pendingCalls?.length)
1689
+ continue;
1690
+ for (const tc of pendingCalls) {
1691
+ if (i === approvalAiMsgIndex && toolsByName.has(tc.name)) {
1692
+ // This is the approval-triggering AIMessage — execute the tool directly
1693
+ // This bypasses beforeToolCall (no re-approval check) and gives real results
1694
+ try {
1695
+ console.log(`[AIAgent] Resume: executing approved tool "${tc.name}" directly`);
1696
+ const tool = toolsByName.get(tc.name);
1697
+ const result = await tool.invoke(tc.args);
1698
+ const content = typeof result === 'string'
1699
+ ? result
1700
+ : JSON.stringify(result);
1701
+ repairedMessages.push(new ToolMessage({ content, tool_call_id: tc.id }));
1702
+ }
1703
+ catch (err) {
1704
+ console.warn(`[AIAgent] Resume: direct tool execution failed for "${tc.name}":`, err);
1705
+ repairedMessages.push(new ToolMessage({
1706
+ content: `Tool execution failed: ${err instanceof Error ? err.message : String(err)}`,
1707
+ tool_call_id: tc.id,
1708
+ }));
1709
+ }
1710
+ }
1711
+ else {
1712
+ // Safety net: synthetic result for any other unresolved tool_calls
1713
+ repairedMessages.push(new ToolMessage({
1654
1714
  content: 'This action has been approved by the user. You may now execute this tool.',
1655
1715
  tool_call_id: tc.id,
1656
1716
  }));
1657
1717
  }
1718
+ existingToolResultIds.add(tc.id);
1658
1719
  }
1659
1720
  }
1721
+ initialMessages.push(...repairedMessages);
1660
1722
  }
1661
1723
  else if (conversationHistory && conversationHistory.length > 0) {
1662
1724
  // Normal path: lossy ConversationMessage[] → BaseMessage[]