@bubblelab/bubble-core 0.1.8 → 0.1.10
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.
- package/dist/bubble-bundle.d.ts +333 -1438
- package/dist/bubble-factory.d.ts.map +1 -1
- package/dist/bubble-factory.js +64 -28
- package/dist/bubble-factory.js.map +1 -1
- package/dist/bubble-flow/bubble-flow-class.d.ts +17 -1
- package/dist/bubble-flow/bubble-flow-class.d.ts.map +1 -1
- package/dist/bubble-flow/bubble-flow-class.js +16 -0
- package/dist/bubble-flow/bubble-flow-class.js.map +1 -1
- package/dist/bubble-flow/sample/data-analyst-flow.d.ts +1 -1
- package/dist/bubble-flow/sample/data-analyst-flow.d.ts.map +1 -1
- package/dist/bubble-flow/sample/error-ts.d.ts +1 -1
- package/dist/bubble-flow/sample/error-ts.d.ts.map +1 -1
- package/dist/bubble-flow/sample/sanitytest.d.ts +1 -1
- package/dist/bubble-flow/sample/sanitytest.d.ts.map +1 -1
- package/dist/bubble-flow/sample/simple-webhook-2.d.ts +1 -1
- package/dist/bubble-flow/sample/simple-webhook-2.d.ts.map +1 -1
- package/dist/bubble-flow/sample/simple-webhook.d.ts +1 -1
- package/dist/bubble-flow/sample/simple-webhook.d.ts.map +1 -1
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts +1 -1
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts.map +1 -1
- package/dist/bubble-flow/sample/slack-v0.1.d.ts +1 -1
- package/dist/bubble-flow/sample/slack-v0.1.d.ts.map +1 -1
- package/dist/bubble-flow/sample/slackagenttest.d.ts +1 -1
- package/dist/bubble-flow/sample/slackagenttest.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/ai-agent.d.ts +115 -97
- package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/ai-agent.js +276 -96
- package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
- package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +805 -0
- package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.js +131 -0
- package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +485 -0
- package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.js +176 -0
- package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +302 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.js +138 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +642 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.js +123 -0
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +184 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.js +145 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-transcript-scraper.d.ts +52 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-transcript-scraper.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-transcript-scraper.js +29 -0
- package/dist/bubbles/service-bubble/apify/actors/youtube-transcript-scraper.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +1999 -0
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.js +54 -0
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/apify.d.ts +143 -0
- package/dist/bubbles/service-bubble/apify/apify.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/apify.js +276 -0
- package/dist/bubbles/service-bubble/apify/apify.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/index.d.ts +6 -0
- package/dist/bubbles/service-bubble/apify/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/index.js +6 -0
- package/dist/bubbles/service-bubble/apify/index.js.map +1 -0
- package/dist/bubbles/service-bubble/apify/types.d.ts +7 -0
- package/dist/bubbles/service-bubble/apify/types.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/apify/types.js +5 -0
- package/dist/bubbles/service-bubble/apify/types.js.map +1 -0
- package/dist/bubbles/service-bubble/gmail.d.ts +626 -132
- package/dist/bubbles/service-bubble/gmail.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/gmail.js +435 -7
- package/dist/bubbles/service-bubble/gmail.js.map +1 -1
- package/dist/bubbles/service-bubble/google-calendar.d.ts +36 -36
- package/dist/bubbles/service-bubble/google-drive.d.ts +233 -4
- package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/google-drive.js +65 -75
- package/dist/bubbles/service-bubble/google-drive.js.map +1 -1
- package/dist/bubbles/service-bubble/google-sheets.d.ts +52 -52
- package/dist/bubbles/service-bubble/hello-world.js +2 -2
- package/dist/bubbles/service-bubble/hello-world.js.map +1 -1
- package/dist/bubbles/service-bubble/http.d.ts +6 -6
- package/dist/bubbles/service-bubble/postgresql.d.ts +4 -4
- package/dist/bubbles/service-bubble/resend.d.ts +5 -5
- package/dist/bubbles/service-bubble/resend.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/resend.js +16 -5
- package/dist/bubbles/service-bubble/resend.js.map +1 -1
- package/dist/bubbles/service-bubble/slack.d.ts +18 -18
- package/dist/bubbles/service-bubble/storage.d.ts +4 -4
- package/dist/bubbles/service-bubble/storage.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/storage.js +16 -5
- package/dist/bubbles/service-bubble/storage.js.map +1 -1
- package/dist/bubbles/service-bubble/x-twitter.d.ts +814 -0
- package/dist/bubbles/service-bubble/x-twitter.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/x-twitter.js +445 -0
- package/dist/bubbles/service-bubble/x-twitter.js.map +1 -0
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +20 -20
- package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +16 -16
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +14 -1
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.js +101 -47
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/instagram-tool.d.ts +435 -0
- package/dist/bubbles/tool-bubble/instagram-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/instagram-tool.js +474 -0
- package/dist/bubbles/tool-bubble/instagram-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +2136 -0
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/linkedin-tool.js +608 -0
- package/dist/bubbles/tool-bubble/linkedin-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +69 -64
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.js +97 -22
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +6 -6
- package/dist/bubbles/tool-bubble/research-agent-tool.js +5 -5
- package/dist/bubbles/tool-bubble/research-agent-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/tool-template.d.ts +8 -8
- package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +14 -14
- package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +28 -28
- package/dist/bubbles/tool-bubble/web-scrape-tool.js +1 -1
- package/dist/bubbles/tool-bubble/web-scrape-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/web-search-tool.d.ts +5 -4
- package/dist/bubbles/tool-bubble/web-search-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/web-search-tool.js +6 -2
- package/dist/bubbles/tool-bubble/web-search-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts +394 -0
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/youtube-tool.js +352 -0
- package/dist/bubbles/tool-bubble/youtube-tool.js.map +1 -0
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts +47 -36
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts.map +1 -1
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js +96 -65
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js.map +1 -1
- package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +38 -38
- package/dist/bubbles/workflow-bubble/generate-document.workflow.js +1 -1
- package/dist/bubbles/workflow-bubble/generate-document.workflow.js.map +1 -1
- package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +42 -42
- package/dist/bubbles/workflow-bubble/parse-document.workflow.js +1 -1
- package/dist/bubbles/workflow-bubble/parse-document.workflow.js.map +1 -1
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +22 -22
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts.map +1 -1
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js +1 -4
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js.map +1 -1
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +60 -60
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts.map +1 -1
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js +2 -2
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +20 -20
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js +1 -1
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +66 -66
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.js +1 -1
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.js.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +18 -18
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts.map +1 -1
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js +1 -2
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js.map +1 -1
- package/dist/bubbles.json +489 -0
- package/dist/index.d.ts +16 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/logging/BubbleLogger.d.ts +11 -0
- package/dist/logging/BubbleLogger.d.ts.map +1 -1
- package/dist/logging/BubbleLogger.js +87 -33
- package/dist/logging/BubbleLogger.js.map +1 -1
- package/dist/logging/StreamingBubbleLogger.d.ts.map +1 -1
- package/dist/logging/StreamingBubbleLogger.js +23 -16
- package/dist/logging/StreamingBubbleLogger.js.map +1 -1
- package/dist/test-gm.d.ts +10 -0
- package/dist/test-gm.d.ts.map +1 -0
- package/dist/test-gm.js +95 -0
- package/dist/test-gm.js.map +1 -0
- package/dist/types/available-tools.d.ts +1 -1
- package/dist/types/available-tools.d.ts.map +1 -1
- package/dist/types/available-tools.js +2 -0
- package/dist/types/available-tools.js.map +1 -1
- package/dist/types/base-bubble-class.d.ts +6 -1
- package/dist/types/base-bubble-class.d.ts.map +1 -1
- package/dist/types/base-bubble-class.js +47 -24
- package/dist/types/base-bubble-class.js.map +1 -1
- package/dist/types/bubble.d.ts +3 -13
- package/dist/types/bubble.d.ts.map +1 -1
- package/dist/types/bubble.js +1 -1
- package/dist/types/bubble.js.map +1 -1
- package/dist/types/service-bubble-class.d.ts +5 -5
- package/dist/types/service-bubble-class.d.ts.map +1 -1
- package/dist/types/service-bubble-class.js +6 -7
- package/dist/types/service-bubble-class.js.map +1 -1
- package/dist/types/tool-bubble-class.d.ts +1 -1
- package/dist/types/tool-bubble-class.d.ts.map +1 -1
- package/dist/types/tool-bubble-class.js +9 -3
- package/dist/types/tool-bubble-class.js.map +1 -1
- package/dist/types/workflow-bubble-class.d.ts +1 -1
- package/dist/types/workflow-bubble-class.d.ts.map +1 -1
- package/dist/utils/agent-formatter.d.ts +17 -0
- package/dist/utils/agent-formatter.d.ts.map +1 -0
- package/dist/utils/agent-formatter.js +139 -0
- package/dist/utils/agent-formatter.js.map +1 -0
- package/dist/utils/bubbleflow-validation.d.ts.map +1 -1
- package/dist/utils/bubbleflow-validation.js +89 -32
- package/dist/utils/bubbleflow-validation.js.map +1 -1
- package/dist/utils/error-sanitizer.d.ts +12 -0
- package/dist/utils/error-sanitizer.d.ts.map +1 -0
- package/dist/utils/error-sanitizer.js +77 -0
- package/dist/utils/error-sanitizer.js.map +1 -0
- package/dist/utils/json-parsing.d.ts +1 -0
- package/dist/utils/json-parsing.d.ts.map +1 -1
- package/dist/utils/json-parsing.js +205 -32
- package/dist/utils/json-parsing.js.map +1 -1
- package/package.json +6 -5
- package/dist/bubble-trigger/index.d.ts +0 -2
- package/dist/bubble-trigger/index.d.ts.map +0 -1
- package/dist/bubble-trigger/index.js +0 -2
- package/dist/bubble-trigger/index.js.map +0 -1
- package/dist/bubble-trigger/types.d.ts +0 -87
- package/dist/bubble-trigger/types.d.ts.map +0 -1
- package/dist/bubble-trigger/types.js +0 -14
- package/dist/bubble-trigger/types.js.map +0 -1
- package/dist/types/ai-models.d.ts +0 -4
- package/dist/types/ai-models.d.ts.map +0 -1
- package/dist/types/ai-models.js +0 -16
- package/dist/types/ai-models.js.map +0 -1
|
@@ -2,70 +2,24 @@ import { z } from 'zod';
|
|
|
2
2
|
import { ServiceBubble } from '../../types/service-bubble-class.js';
|
|
3
3
|
import type { BubbleContext } from '../../types/bubble.js';
|
|
4
4
|
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
type: 'llm_start';
|
|
15
|
-
data: {
|
|
16
|
-
model: string;
|
|
17
|
-
temperature: number;
|
|
18
|
-
};
|
|
19
|
-
} | {
|
|
20
|
-
type: 'token';
|
|
21
|
-
data: {
|
|
22
|
-
content: string;
|
|
23
|
-
messageId: string;
|
|
24
|
-
};
|
|
25
|
-
} | {
|
|
26
|
-
type: 'llm_complete';
|
|
27
|
-
data: {
|
|
28
|
-
messageId: string;
|
|
29
|
-
totalTokens?: number;
|
|
30
|
-
};
|
|
31
|
-
} | {
|
|
32
|
-
type: 'tool_start';
|
|
33
|
-
data: {
|
|
34
|
-
tool: string;
|
|
35
|
-
input: unknown;
|
|
36
|
-
callId: string;
|
|
37
|
-
};
|
|
38
|
-
} | {
|
|
39
|
-
type: 'tool_complete';
|
|
40
|
-
data: {
|
|
41
|
-
callId: string;
|
|
42
|
-
output: unknown;
|
|
43
|
-
duration: number;
|
|
44
|
-
};
|
|
45
|
-
} | {
|
|
46
|
-
type: 'iteration_start';
|
|
47
|
-
data: {
|
|
48
|
-
iteration: number;
|
|
49
|
-
};
|
|
50
|
-
} | {
|
|
51
|
-
type: 'iteration_complete';
|
|
52
|
-
data: {
|
|
53
|
-
iteration: number;
|
|
54
|
-
hasToolCalls: boolean;
|
|
55
|
-
};
|
|
56
|
-
} | {
|
|
57
|
-
type: 'error';
|
|
58
|
-
data: {
|
|
59
|
-
error: string;
|
|
60
|
-
recoverable: boolean;
|
|
61
|
-
};
|
|
62
|
-
} | {
|
|
63
|
-
type: 'complete';
|
|
64
|
-
data: {
|
|
65
|
-
result: AIAgentResult;
|
|
66
|
-
totalDuration: number;
|
|
67
|
-
};
|
|
5
|
+
import type { BaseMessage } from '@langchain/core/messages';
|
|
6
|
+
import { type AvailableTool } from '../../types/available-tools.js';
|
|
7
|
+
import type { BubbleName, BubbleResult } from '@bubblelab/shared-schemas';
|
|
8
|
+
import type { StreamingEvent } from '@bubblelab/shared-schemas';
|
|
9
|
+
export type ToolHookContext = {
|
|
10
|
+
toolName: AvailableTool;
|
|
11
|
+
toolInput: unknown;
|
|
12
|
+
toolOutput?: BubbleResult<unknown>;
|
|
13
|
+
messages: BaseMessage[];
|
|
68
14
|
};
|
|
15
|
+
export type ToolHookAfter = (context: ToolHookContext) => Promise<{
|
|
16
|
+
messages: BaseMessage[];
|
|
17
|
+
shouldStop?: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
export type ToolHookBefore = (context: ToolHookContext) => Promise<{
|
|
20
|
+
messages: BaseMessage[];
|
|
21
|
+
toolInput: Record<string, any>;
|
|
22
|
+
}>;
|
|
69
23
|
export type StreamingCallback = (event: StreamingEvent) => Promise<void> | void;
|
|
70
24
|
declare const AIAgentParamsSchema: z.ZodObject<{
|
|
71
25
|
message: z.ZodString;
|
|
@@ -75,8 +29,8 @@ declare const AIAgentParamsSchema: z.ZodObject<{
|
|
|
75
29
|
mimeType: z.ZodDefault<z.ZodString>;
|
|
76
30
|
description: z.ZodOptional<z.ZodString>;
|
|
77
31
|
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
data: string;
|
|
79
32
|
type: "base64";
|
|
33
|
+
data: string;
|
|
80
34
|
mimeType: string;
|
|
81
35
|
description?: string | undefined;
|
|
82
36
|
}, {
|
|
@@ -100,48 +54,64 @@ declare const AIAgentParamsSchema: z.ZodObject<{
|
|
|
100
54
|
systemPrompt: z.ZodDefault<z.ZodString>;
|
|
101
55
|
name: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
102
56
|
model: z.ZodDefault<z.ZodObject<{
|
|
103
|
-
model: z.ZodDefault<z.ZodEnum<["openai/gpt-5", "openai/gpt-5-mini", "
|
|
57
|
+
model: z.ZodDefault<z.ZodEnum<["openai/gpt-5", "openai/gpt-5-mini", "google/gemini-2.5-pro", "google/gemini-2.5-flash", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash-image-preview", "anthropic/claude-sonnet-4-5", "anthropic/claude-haiku-4-5", "openrouter/x-ai/grok-code-fast-1", "openrouter/z-ai/glm-4.6"]>>;
|
|
104
58
|
temperature: z.ZodDefault<z.ZodNumber>;
|
|
105
59
|
maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
106
60
|
jsonMode: z.ZodDefault<z.ZodBoolean>;
|
|
107
61
|
}, "strip", z.ZodTypeAny, {
|
|
108
|
-
model: "openai/gpt-5" | "openai/gpt-5-mini" | "
|
|
62
|
+
model: "openai/gpt-5" | "openai/gpt-5-mini" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6";
|
|
109
63
|
temperature: number;
|
|
110
64
|
maxTokens: number;
|
|
111
65
|
jsonMode: boolean;
|
|
112
66
|
}, {
|
|
113
|
-
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "
|
|
67
|
+
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | undefined;
|
|
114
68
|
temperature?: number | undefined;
|
|
115
69
|
maxTokens?: number | undefined;
|
|
116
70
|
jsonMode?: boolean | undefined;
|
|
117
71
|
}>>;
|
|
118
72
|
tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
119
|
-
name: z.ZodEnum<["web-search-tool", "web-scrape-tool", "web-crawl-tool", "web-extract-tool", "research-agent-tool", "reddit-scrape-tool", "list-bubbles-tool", "get-bubble-details-tool", "bubbleflow-validation-tool", "chart-js-tool", "sql-query-tool"]>;
|
|
73
|
+
name: z.ZodEnum<["web-search-tool", "web-scrape-tool", "web-crawl-tool", "web-extract-tool", "research-agent-tool", "reddit-scrape-tool", "instagram-tool", "list-bubbles-tool", "get-bubble-details-tool", "bubbleflow-validation-tool", "chart-js-tool", "sql-query-tool"]>;
|
|
120
74
|
credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>;
|
|
121
75
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
122
76
|
}, "strip", z.ZodTypeAny, {
|
|
123
|
-
name: "get-bubble-details-tool" | "list-bubbles-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";
|
|
77
|
+
name: "get-bubble-details-tool" | "list-bubbles-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" | "instagram-tool";
|
|
124
78
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
125
79
|
config?: Record<string, unknown> | undefined;
|
|
126
80
|
}, {
|
|
127
|
-
name: "get-bubble-details-tool" | "list-bubbles-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";
|
|
81
|
+
name: "get-bubble-details-tool" | "list-bubbles-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" | "instagram-tool";
|
|
128
82
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
129
83
|
config?: Record<string, unknown> | undefined;
|
|
130
84
|
}>, "many">>;
|
|
85
|
+
customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
description: z.ZodString;
|
|
88
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
89
|
+
func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
description: string;
|
|
92
|
+
name: string;
|
|
93
|
+
schema: Record<string, unknown>;
|
|
94
|
+
func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
|
|
95
|
+
}, {
|
|
96
|
+
description: string;
|
|
97
|
+
name: string;
|
|
98
|
+
schema: Record<string, unknown>;
|
|
99
|
+
func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
|
|
100
|
+
}>, "many">>>;
|
|
131
101
|
maxIterations: z.ZodDefault<z.ZodNumber>;
|
|
132
102
|
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
133
103
|
streaming: z.ZodDefault<z.ZodBoolean>;
|
|
134
104
|
}, "strip", z.ZodTypeAny, {
|
|
135
105
|
message: string;
|
|
136
106
|
model: {
|
|
137
|
-
model: "openai/gpt-5" | "openai/gpt-5-mini" | "
|
|
107
|
+
model: "openai/gpt-5" | "openai/gpt-5-mini" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6";
|
|
138
108
|
temperature: number;
|
|
139
109
|
maxTokens: number;
|
|
140
110
|
jsonMode: boolean;
|
|
141
111
|
};
|
|
142
112
|
images: ({
|
|
143
|
-
data: string;
|
|
144
113
|
type: "base64";
|
|
114
|
+
data: string;
|
|
145
115
|
mimeType: string;
|
|
146
116
|
description?: string | undefined;
|
|
147
117
|
} | {
|
|
@@ -151,7 +121,7 @@ declare const AIAgentParamsSchema: z.ZodObject<{
|
|
|
151
121
|
})[];
|
|
152
122
|
systemPrompt: string;
|
|
153
123
|
tools: {
|
|
154
|
-
name: "get-bubble-details-tool" | "list-bubbles-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";
|
|
124
|
+
name: "get-bubble-details-tool" | "list-bubbles-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" | "instagram-tool";
|
|
155
125
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
156
126
|
config?: Record<string, unknown> | undefined;
|
|
157
127
|
}[];
|
|
@@ -159,12 +129,18 @@ declare const AIAgentParamsSchema: z.ZodObject<{
|
|
|
159
129
|
streaming: boolean;
|
|
160
130
|
name?: string | undefined;
|
|
161
131
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
132
|
+
customTools?: {
|
|
133
|
+
description: string;
|
|
134
|
+
name: string;
|
|
135
|
+
schema: Record<string, unknown>;
|
|
136
|
+
func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
|
|
137
|
+
}[] | undefined;
|
|
162
138
|
}, {
|
|
163
139
|
message: string;
|
|
164
140
|
name?: string | undefined;
|
|
165
141
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
166
142
|
model?: {
|
|
167
|
-
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "
|
|
143
|
+
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | undefined;
|
|
168
144
|
temperature?: number | undefined;
|
|
169
145
|
maxTokens?: number | undefined;
|
|
170
146
|
jsonMode?: boolean | undefined;
|
|
@@ -181,10 +157,16 @@ declare const AIAgentParamsSchema: z.ZodObject<{
|
|
|
181
157
|
})[] | undefined;
|
|
182
158
|
systemPrompt?: string | undefined;
|
|
183
159
|
tools?: {
|
|
184
|
-
name: "get-bubble-details-tool" | "list-bubbles-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";
|
|
160
|
+
name: "get-bubble-details-tool" | "list-bubbles-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" | "instagram-tool";
|
|
185
161
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
186
162
|
config?: Record<string, unknown> | undefined;
|
|
187
163
|
}[] | undefined;
|
|
164
|
+
customTools?: {
|
|
165
|
+
description: string;
|
|
166
|
+
name: string;
|
|
167
|
+
schema: Record<string, unknown>;
|
|
168
|
+
func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
|
|
169
|
+
}[] | undefined;
|
|
188
170
|
maxIterations?: number | undefined;
|
|
189
171
|
streaming?: boolean | undefined;
|
|
190
172
|
}>;
|
|
@@ -227,8 +209,16 @@ declare const AIAgentResultSchema: z.ZodObject<{
|
|
|
227
209
|
}[];
|
|
228
210
|
iterations: number;
|
|
229
211
|
}>;
|
|
230
|
-
type AIAgentParams = z.input<typeof AIAgentParamsSchema
|
|
231
|
-
|
|
212
|
+
type AIAgentParams = z.input<typeof AIAgentParamsSchema> & {
|
|
213
|
+
beforeToolCall?: ToolHookBefore;
|
|
214
|
+
afterToolCall?: ToolHookAfter;
|
|
215
|
+
streamingCallback?: StreamingCallback;
|
|
216
|
+
};
|
|
217
|
+
type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & {
|
|
218
|
+
beforeToolCall?: ToolHookBefore;
|
|
219
|
+
afterToolCall?: ToolHookAfter;
|
|
220
|
+
streamingCallback?: StreamingCallback;
|
|
221
|
+
};
|
|
232
222
|
type AIAgentResult = z.output<typeof AIAgentResultSchema>;
|
|
233
223
|
export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AIAgentResult> {
|
|
234
224
|
static readonly type: "service";
|
|
@@ -243,8 +233,8 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
|
|
|
243
233
|
mimeType: z.ZodDefault<z.ZodString>;
|
|
244
234
|
description: z.ZodOptional<z.ZodString>;
|
|
245
235
|
}, "strip", z.ZodTypeAny, {
|
|
246
|
-
data: string;
|
|
247
236
|
type: "base64";
|
|
237
|
+
data: string;
|
|
248
238
|
mimeType: string;
|
|
249
239
|
description?: string | undefined;
|
|
250
240
|
}, {
|
|
@@ -268,48 +258,64 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
|
|
|
268
258
|
systemPrompt: z.ZodDefault<z.ZodString>;
|
|
269
259
|
name: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
270
260
|
model: z.ZodDefault<z.ZodObject<{
|
|
271
|
-
model: z.ZodDefault<z.ZodEnum<["openai/gpt-5", "openai/gpt-5-mini", "
|
|
261
|
+
model: z.ZodDefault<z.ZodEnum<["openai/gpt-5", "openai/gpt-5-mini", "google/gemini-2.5-pro", "google/gemini-2.5-flash", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash-image-preview", "anthropic/claude-sonnet-4-5", "anthropic/claude-haiku-4-5", "openrouter/x-ai/grok-code-fast-1", "openrouter/z-ai/glm-4.6"]>>;
|
|
272
262
|
temperature: z.ZodDefault<z.ZodNumber>;
|
|
273
263
|
maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
274
264
|
jsonMode: z.ZodDefault<z.ZodBoolean>;
|
|
275
265
|
}, "strip", z.ZodTypeAny, {
|
|
276
|
-
model: "openai/gpt-5" | "openai/gpt-5-mini" | "
|
|
266
|
+
model: "openai/gpt-5" | "openai/gpt-5-mini" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6";
|
|
277
267
|
temperature: number;
|
|
278
268
|
maxTokens: number;
|
|
279
269
|
jsonMode: boolean;
|
|
280
270
|
}, {
|
|
281
|
-
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "
|
|
271
|
+
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | undefined;
|
|
282
272
|
temperature?: number | undefined;
|
|
283
273
|
maxTokens?: number | undefined;
|
|
284
274
|
jsonMode?: boolean | undefined;
|
|
285
275
|
}>>;
|
|
286
276
|
tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
287
|
-
name: z.ZodEnum<["web-search-tool", "web-scrape-tool", "web-crawl-tool", "web-extract-tool", "research-agent-tool", "reddit-scrape-tool", "list-bubbles-tool", "get-bubble-details-tool", "bubbleflow-validation-tool", "chart-js-tool", "sql-query-tool"]>;
|
|
277
|
+
name: z.ZodEnum<["web-search-tool", "web-scrape-tool", "web-crawl-tool", "web-extract-tool", "research-agent-tool", "reddit-scrape-tool", "instagram-tool", "list-bubbles-tool", "get-bubble-details-tool", "bubbleflow-validation-tool", "chart-js-tool", "sql-query-tool"]>;
|
|
288
278
|
credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>;
|
|
289
279
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
290
280
|
}, "strip", z.ZodTypeAny, {
|
|
291
|
-
name: "get-bubble-details-tool" | "list-bubbles-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";
|
|
281
|
+
name: "get-bubble-details-tool" | "list-bubbles-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" | "instagram-tool";
|
|
292
282
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
293
283
|
config?: Record<string, unknown> | undefined;
|
|
294
284
|
}, {
|
|
295
|
-
name: "get-bubble-details-tool" | "list-bubbles-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";
|
|
285
|
+
name: "get-bubble-details-tool" | "list-bubbles-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" | "instagram-tool";
|
|
296
286
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
297
287
|
config?: Record<string, unknown> | undefined;
|
|
298
288
|
}>, "many">>;
|
|
289
|
+
customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
290
|
+
name: z.ZodString;
|
|
291
|
+
description: z.ZodString;
|
|
292
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
293
|
+
func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
description: string;
|
|
296
|
+
name: string;
|
|
297
|
+
schema: Record<string, unknown>;
|
|
298
|
+
func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
|
|
299
|
+
}, {
|
|
300
|
+
description: string;
|
|
301
|
+
name: string;
|
|
302
|
+
schema: Record<string, unknown>;
|
|
303
|
+
func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
|
|
304
|
+
}>, "many">>>;
|
|
299
305
|
maxIterations: z.ZodDefault<z.ZodNumber>;
|
|
300
306
|
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
301
307
|
streaming: z.ZodDefault<z.ZodBoolean>;
|
|
302
308
|
}, "strip", z.ZodTypeAny, {
|
|
303
309
|
message: string;
|
|
304
310
|
model: {
|
|
305
|
-
model: "openai/gpt-5" | "openai/gpt-5-mini" | "
|
|
311
|
+
model: "openai/gpt-5" | "openai/gpt-5-mini" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6";
|
|
306
312
|
temperature: number;
|
|
307
313
|
maxTokens: number;
|
|
308
314
|
jsonMode: boolean;
|
|
309
315
|
};
|
|
310
316
|
images: ({
|
|
311
|
-
data: string;
|
|
312
317
|
type: "base64";
|
|
318
|
+
data: string;
|
|
313
319
|
mimeType: string;
|
|
314
320
|
description?: string | undefined;
|
|
315
321
|
} | {
|
|
@@ -319,7 +325,7 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
|
|
|
319
325
|
})[];
|
|
320
326
|
systemPrompt: string;
|
|
321
327
|
tools: {
|
|
322
|
-
name: "get-bubble-details-tool" | "list-bubbles-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";
|
|
328
|
+
name: "get-bubble-details-tool" | "list-bubbles-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" | "instagram-tool";
|
|
323
329
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
324
330
|
config?: Record<string, unknown> | undefined;
|
|
325
331
|
}[];
|
|
@@ -327,12 +333,18 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
|
|
|
327
333
|
streaming: boolean;
|
|
328
334
|
name?: string | undefined;
|
|
329
335
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
336
|
+
customTools?: {
|
|
337
|
+
description: string;
|
|
338
|
+
name: string;
|
|
339
|
+
schema: Record<string, unknown>;
|
|
340
|
+
func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
|
|
341
|
+
}[] | undefined;
|
|
330
342
|
}, {
|
|
331
343
|
message: string;
|
|
332
344
|
name?: string | undefined;
|
|
333
345
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
334
346
|
model?: {
|
|
335
|
-
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "
|
|
347
|
+
model?: "openai/gpt-5" | "openai/gpt-5-mini" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.5-flash-lite" | "google/gemini-2.5-flash-image-preview" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-haiku-4-5" | "openrouter/x-ai/grok-code-fast-1" | "openrouter/z-ai/glm-4.6" | undefined;
|
|
336
348
|
temperature?: number | undefined;
|
|
337
349
|
maxTokens?: number | undefined;
|
|
338
350
|
jsonMode?: boolean | undefined;
|
|
@@ -349,10 +361,16 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
|
|
|
349
361
|
})[] | undefined;
|
|
350
362
|
systemPrompt?: string | undefined;
|
|
351
363
|
tools?: {
|
|
352
|
-
name: "get-bubble-details-tool" | "list-bubbles-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";
|
|
364
|
+
name: "get-bubble-details-tool" | "list-bubbles-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" | "instagram-tool";
|
|
353
365
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
354
366
|
config?: Record<string, unknown> | undefined;
|
|
355
367
|
}[] | undefined;
|
|
368
|
+
customTools?: {
|
|
369
|
+
description: string;
|
|
370
|
+
name: string;
|
|
371
|
+
schema: Record<string, unknown>;
|
|
372
|
+
func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>;
|
|
373
|
+
}[] | undefined;
|
|
356
374
|
maxIterations?: number | undefined;
|
|
357
375
|
streaming?: boolean | undefined;
|
|
358
376
|
}>;
|
|
@@ -399,6 +417,10 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
|
|
|
399
417
|
static readonly longDescription = "\n An AI agent powered by LangGraph that can use any tool bubble to answer questions.\n Use cases:\n - Add tools to enhance the AI agent's capabilities (web-search-tool, web-scrape-tool)\n - Multi-step reasoning with tool assistance\n - Tool-augmented conversations with any registered tool\n - JSON mode for structured output (strips markdown formatting)\n ";
|
|
400
418
|
static readonly alias = "agent";
|
|
401
419
|
private factory;
|
|
420
|
+
private beforeToolCallHook;
|
|
421
|
+
private afterToolCallHook;
|
|
422
|
+
private streamingCallback;
|
|
423
|
+
private shouldStopAfterTools;
|
|
402
424
|
constructor(params?: AIAgentParams, context?: BubbleContext);
|
|
403
425
|
testCredential(): Promise<boolean>;
|
|
404
426
|
protected performAction(context?: BubbleContext): Promise<AIAgentResult>;
|
|
@@ -407,16 +429,12 @@ export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AI
|
|
|
407
429
|
*/
|
|
408
430
|
actionWithStreaming(streamingCallback: StreamingCallback, context?: BubbleContext): Promise<AIAgentResult>;
|
|
409
431
|
protected chooseCredential(): string | undefined;
|
|
410
|
-
/**
|
|
411
|
-
* Format final response with special handling for Gemini image models and JSON mode
|
|
412
|
-
*/
|
|
413
|
-
private formatFinalResponse;
|
|
414
|
-
/**
|
|
415
|
-
* Convert Gemini's inlineData format to LangChain-compatible data URI format
|
|
416
|
-
*/
|
|
417
|
-
private formatGeminiImageResponse;
|
|
418
432
|
private initializeModel;
|
|
419
433
|
private initializeTools;
|
|
434
|
+
/**
|
|
435
|
+
* Custom tool execution node that supports hooks
|
|
436
|
+
*/
|
|
437
|
+
private executeToolsWithHooks;
|
|
420
438
|
private createAgentGraph;
|
|
421
439
|
private executeAgent;
|
|
422
440
|
/**
|
|
@@ -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,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,cAAc,EAEf,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-agent.d.ts","sourceRoot":"","sources":["../../../src/bubbles/service-bubble/ai-agent.ts"],"names":[],"mappings":"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"}
|