@bubblelab/bubble-core 0.1.197 → 0.1.199
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 +6 -4
- package/dist/bubbles/service-bubble/ai-agent.d.ts +7 -0
- package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/ai-agent.js +248 -18
- package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
- package/dist/bubbles/tool-bubble/code-edit-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/code-edit-tool.js +17 -6
- package/dist/bubbles/tool-bubble/code-edit-tool.js.map +1 -1
- package/dist/bubbles.json +1 -1
- package/package.json +2 -2
package/dist/bubble-bundle.d.ts
CHANGED
|
@@ -170,7 +170,9 @@ export declare const WorkflowNodeTypeSchema: z.ZodEnum<["bubble", "if", "for", "
|
|
|
170
170
|
export declare function buildParameterObjectLiteral(parameters: BubbleParameter[], options?: BuildParameterObjectOptions): string; export declare const flowRoleSchema: z.ZodEnum<["owner", "editor", "runner", "viewer"]>; export type FlowRole = z.infer<typeof flowRoleSchema>; export declare const flowPermissionSchema: z.ZodObject<{ userId: z.ZodString; email: z.ZodString; name: z.ZodNullable<z.ZodString>; avatarUrl: z.ZodOptional<z.ZodString>; role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>; grantedAt: z.ZodString; grantedBy: z.ZodNullable<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "owner" | "editor" | "runner" | "viewer"; name: string | null; userId: string; email: string; grantedAt: string; grantedBy: string | null; avatarUrl?: string | undefined; }, { role: "owner" | "editor" | "runner" | "viewer"; name: string | null; userId: string; email: string; grantedAt: string; grantedBy: string | null; avatarUrl?: string | undefined; }>; export type FlowPermission = z.infer<typeof flowPermissionSchema>; export declare const trashedFlowSchema: z.ZodObject<{ id: z.ZodNumber; name: z.ZodString; organizationId: z.ZodNullable<z.ZodNumber>; organizationName: z.ZodNullable<z.ZodString>; deletedAt: z.ZodString; deletedBy: z.ZodNullable<z.ZodString>; canRestore: z.ZodBoolean; canPermanentDelete: z.ZodBoolean; }, "strip", z.ZodTypeAny, { name: string; id: number; organizationId: number | null; organizationName: string | null; deletedAt: string; deletedBy: string | null; canRestore: boolean; canPermanentDelete: boolean; }, { name: string; id: number; organizationId: number | null; organizationName: string | null; deletedAt: string; deletedBy: string | null; canRestore: boolean; canPermanentDelete: boolean; }>; export type TrashedFlow = z.infer<typeof trashedFlowSchema>; export declare const grantPermissionSchema: z.ZodEffects<z.ZodObject<{ email: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodString>; role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>; }, "strip", z.ZodTypeAny, { role: "owner" | "editor" | "runner" | "viewer"; userId?: string | undefined; email?: string | undefined; }, { role: "owner" | "editor" | "runner" | "viewer"; userId?: string | undefined; email?: string | undefined; }>, { role: "owner" | "editor" | "runner" | "viewer"; userId?: string | undefined; email?: string | undefined; }, { role: "owner" | "editor" | "runner" | "viewer"; userId?: string | undefined; email?: string | undefined; }>; export type GrantPermissionRequest = z.infer<typeof grantPermissionSchema>; export declare const updatePermissionSchema: z.ZodObject<{ role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>; }, "strip", z.ZodTypeAny, { role: "owner" | "editor" | "runner" | "viewer"; }, { role: "owner" | "editor" | "runner" | "viewer"; }>; export type UpdatePermissionRequest = z.infer<typeof updatePermissionSchema>; export declare const transferOwnershipSchema: z.ZodObject<{ fromUserId: z.ZodString; toUserId: z.ZodString; }, "strip", z.ZodTypeAny, { fromUserId: string; toUserId: string; }, { fromUserId: string; toUserId: string; }>; export type TransferOwnershipRequest = z.infer<typeof transferOwnershipSchema>; export declare const listFlowPermissionsResponseSchema: z.ZodObject<{ permissions: z.ZodArray<z.ZodObject<{ userId: z.ZodString; email: z.ZodString; name: z.ZodNullable<z.ZodString>; avatarUrl: z.ZodOptional<z.ZodString>; role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>; grantedAt: z.ZodString; grantedBy: z.ZodNullable<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "owner" | "editor" | "runner" | "viewer"; name: string | null; userId: string; email: string; grantedAt: string; grantedBy: string | null; avatarUrl?: string | undefined; }, { role: "owner" | "editor" | "runner" | "viewer"; name: string | null; userId: string; email: string; grantedAt: string; grantedBy: string | null; avatarUrl?: string | undefined; }>, "many">; organizationId: z.ZodNullable<z.ZodNumber>; isInTrash: z.ZodBoolean; }, "strip", z.ZodTypeAny, { organizationId: number | null; permissions: { role: "owner" | "editor" | "runner" | "viewer"; name: string | null; userId: string; email: string; grantedAt: string; grantedBy: string | null; avatarUrl?: string | undefined; }[]; isInTrash: boolean; }, { organizationId: number | null; permissions: { role: "owner" | "editor" | "runner" | "viewer"; name: string | null; userId: string; email: string; grantedAt: string; grantedBy: string | null; avatarUrl?: string | undefined; }[]; isInTrash: boolean; }>; export type ListFlowPermissionsResponse = z.infer<typeof listFlowPermissionsResponseSchema>; export declare const grantPermissionResponseSchema: z.ZodObject<{ userId: z.ZodString; role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>; grantedAt: z.ZodString; }, "strip", z.ZodTypeAny, { role: "owner" | "editor" | "runner" | "viewer"; userId: string; grantedAt: string; }, { role: "owner" | "editor" | "runner" | "viewer"; userId: string; grantedAt: string; }>; export type GrantPermissionResponse = z.infer<typeof grantPermissionResponseSchema>; export declare const updatePermissionResponseSchema: z.ZodObject<{ userId: z.ZodString; role: z.ZodEnum<["owner", "editor", "runner", "viewer"]>; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { role: "owner" | "editor" | "runner" | "viewer"; userId: string; updatedAt: string; }, { role: "owner" | "editor" | "runner" | "viewer"; userId: string; updatedAt: string; }>; export type UpdatePermissionResponse = z.infer<typeof updatePermissionResponseSchema>; export declare const transferOwnershipResponseSchema: z.ZodObject<{ previousOwner: z.ZodString; newOwner: z.ZodString; transferredAt: z.ZodString; }, "strip", z.ZodTypeAny, { previousOwner: string; newOwner: string; transferredAt: string; }, { previousOwner: string; newOwner: string; transferredAt: string; }>; export type TransferOwnershipResponse = z.infer<typeof transferOwnershipResponseSchema>; export declare const listTrashResponseSchema: z.ZodObject<{ workflows: z.ZodArray<z.ZodObject<{ id: z.ZodNumber; name: z.ZodString; organizationId: z.ZodNullable<z.ZodNumber>; organizationName: z.ZodNullable<z.ZodString>; deletedAt: z.ZodString; deletedBy: z.ZodNullable<z.ZodString>; canRestore: z.ZodBoolean; canPermanentDelete: z.ZodBoolean; }, "strip", z.ZodTypeAny, { name: string; id: number; organizationId: number | null; organizationName: string | null; deletedAt: string; deletedBy: string | null; canRestore: boolean; canPermanentDelete: boolean; }, { name: string; id: number; organizationId: number | null; organizationName: string | null; deletedAt: string; deletedBy: string | null; canRestore: boolean; canPermanentDelete: boolean; }>, "many">; }, "strip", z.ZodTypeAny, { workflows: { name: string; id: number; organizationId: number | null; organizationName: string | null; deletedAt: string; deletedBy: string | null; canRestore: boolean; canPermanentDelete: boolean; }[]; }, { workflows: { name: string; id: number; organizationId: number | null; organizationName: string | null; deletedAt: string; deletedBy: string | null; canRestore: boolean; canPermanentDelete: boolean; }[]; }>; export type ListTrashResponse = z.infer<typeof listTrashResponseSchema>; export declare const restoreFlowResponseSchema: z.ZodObject<{ id: z.ZodNumber; restoredAt: z.ZodString; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; id: number; restoredAt: string; }, { message: string; id: number; restoredAt: string; }>; export type RestoreFlowResponse = z.infer<typeof restoreFlowResponseSchema>; export declare const orgRoleSchema: z.ZodEnum<["owner", "admin", "member"]>; export type OrgRole = z.infer<typeof orgRoleSchema>; export declare const orgTypeSchema: z.ZodEnum<["personal", "organization"]>; export type OrgType = z.infer<typeof orgTypeSchema>; export declare const organizationSchema: z.ZodObject<{ id: z.ZodNumber; name: z.ZodString; slug: z.ZodString; type: z.ZodEnum<["personal", "organization"]>; domain: z.ZodOptional<z.ZodNullable<z.ZodString>>; role: z.ZodEnum<["owner", "admin", "member"]>; memberCount: z.ZodNumber; createdAt: z.ZodString; }, "strip", z.ZodTypeAny, { role: "owner" | "admin" | "member"; name: string; type: "personal" | "organization"; id: number; createdAt: string; slug: string; memberCount: number; domain?: string | null | undefined; }, { role: "owner" | "admin" | "member"; name: string; type: "personal" | "organization"; id: number; createdAt: string; slug: string; memberCount: number; domain?: string | null | undefined; }>; export type Organization = z.infer<typeof organizationSchema>; export declare const organizationDetailSchema: z.ZodObject<{ id: z.ZodNumber; name: z.ZodString; slug: z.ZodString; type: z.ZodEnum<["personal", "organization"]>; domain: z.ZodOptional<z.ZodNullable<z.ZodString>>; role: z.ZodEnum<["owner", "admin", "member"]>; memberCount: z.ZodNumber; createdAt: z.ZodString; } & { workflowCount: z.ZodNumber; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { role: "owner" | "admin" | "member"; name: string; type: "personal" | "organization"; id: number; updatedAt: string; createdAt: string; slug: string; memberCount: number; workflowCount: number; domain?: string | null | undefined; }, { role: "owner" | "admin" | "member"; name: string; type: "personal" | "organization"; id: number; updatedAt: string; createdAt: string; slug: string; memberCount: number; workflowCount: number; domain?: string | null | undefined; }>; export type OrganizationDetail = z.infer<typeof organizationDetailSchema>; export declare const organizationMemberSchema: z.ZodObject<{ userId: z.ZodString; email: z.ZodString; name: z.ZodNullable<z.ZodString>; avatarUrl: z.ZodOptional<z.ZodString>; role: z.ZodEnum<["owner", "admin", "member"]>; joinedAt: z.ZodString; }, "strip", z.ZodTypeAny, { role: "owner" | "admin" | "member"; name: string | null; userId: string; email: string; joinedAt: string; avatarUrl?: string | undefined; }, { role: "owner" | "admin" | "member"; name: string | null; userId: string; email: string; joinedAt: string; avatarUrl?: string | undefined; }>; export type OrganizationMember = z.infer<typeof organizationMemberSchema>; export declare const createOrganizationSchema: z.ZodObject<{ name: z.ZodString; slug: z.ZodString; domain: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; slug: string; domain?: string | undefined; }, { name: string; slug: string; domain?: string | undefined; }>; export type CreateOrganizationRequest = z.infer<typeof createOrganizationSchema>; export declare const updateOrganizationSchema: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; slug: z.ZodOptional<z.ZodString>; domain: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { name?: string | undefined; domain?: string | null | undefined; slug?: string | undefined; }, { name?: string | undefined; domain?: string | null | undefined; slug?: string | undefined; }>; export type UpdateOrganizationRequest = z.infer<typeof updateOrganizationSchema>; export declare const addMemberSchema: z.ZodObject<{ email: z.ZodString; role: z.ZodEnum<["admin", "member"]>; }, "strip", z.ZodTypeAny, { role: "admin" | "member"; email: string; }, { role: "admin" | "member"; email: string; }>; export type AddMemberRequest = z.infer<typeof addMemberSchema>; export declare const updateMemberRoleSchema: z.ZodObject<{ role: z.ZodEnum<["admin", "member"]>; }, "strip", z.ZodTypeAny, { role: "admin" | "member"; }, { role: "admin" | "member"; }>; export type UpdateMemberRoleRequest = z.infer<typeof updateMemberRoleSchema>; export declare const listOrganizationsResponseSchema: z.ZodObject<{ organizations: z.ZodArray<z.ZodObject<{ id: z.ZodNumber; name: z.ZodString; slug: z.ZodString; type: z.ZodEnum<["personal", "organization"]>; domain: z.ZodOptional<z.ZodNullable<z.ZodString>>; role: z.ZodEnum<["owner", "admin", "member"]>; memberCount: z.ZodNumber; createdAt: z.ZodString; }, "strip", z.ZodTypeAny, { role: "owner" | "admin" | "member"; name: string; type: "personal" | "organization"; id: number; createdAt: string; slug: string; memberCount: number; domain?: string | null | undefined; }, { role: "owner" | "admin" | "member"; name: string; type: "personal" | "organization"; id: number; createdAt: string; slug: string; memberCount: number; domain?: string | null | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { organizations: { role: "owner" | "admin" | "member"; name: string; type: "personal" | "organization"; id: number; createdAt: string; slug: string; memberCount: number; domain?: string | null | undefined; }[]; }, { organizations: { role: "owner" | "admin" | "member"; name: string; type: "personal" | "organization"; id: number; createdAt: string; slug: string; memberCount: number; domain?: string | null | undefined; }[]; }>; export type ListOrganizationsResponse = z.infer<typeof listOrganizationsResponseSchema>; export declare const updateOrganizationResponseSchema: z.ZodObject<{ id: z.ZodNumber; name: z.ZodString; slug: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; id: number; updatedAt: string; slug: string; }, { name: string; id: number; updatedAt: string; slug: string; }>; export type UpdateOrganizationResponse = z.infer<typeof updateOrganizationResponseSchema>; export declare const listMembersResponseSchema: z.ZodObject<{ members: z.ZodArray<z.ZodObject<{ userId: z.ZodString; email: z.ZodString; name: z.ZodNullable<z.ZodString>; avatarUrl: z.ZodOptional<z.ZodString>; role: z.ZodEnum<["owner", "admin", "member"]>; joinedAt: z.ZodString; }, "strip", z.ZodTypeAny, { role: "owner" | "admin" | "member"; name: string | null; userId: string; email: string; joinedAt: string; avatarUrl?: string | undefined; }, { role: "owner" | "admin" | "member"; name: string | null; userId: string; email: string; joinedAt: string; avatarUrl?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { members: { role: "owner" | "admin" | "member"; name: string | null; userId: string; email: string; joinedAt: string; avatarUrl?: string | undefined; }[]; }, { members: { role: "owner" | "admin" | "member"; name: string | null; userId: string; email: string; joinedAt: string; avatarUrl?: string | undefined; }[]; }>; export type ListMembersResponse = z.infer<typeof listMembersResponseSchema>; export declare const addMemberResponseSchema: z.ZodObject<{ userId: z.ZodString; role: z.ZodEnum<["owner", "admin", "member"]>; joinedAt: z.ZodString; }, "strip", z.ZodTypeAny, { role: "owner" | "admin" | "member"; userId: string; joinedAt: string; }, { role: "owner" | "admin" | "member"; userId: string; joinedAt: string; }>; export type AddMemberResponse = z.infer<typeof addMemberResponseSchema>; export declare const updateMemberRoleResponseSchema: z.ZodObject<{ userId: z.ZodString; role: z.ZodEnum<["owner", "admin", "member"]>; }, "strip", z.ZodTypeAny, { role: "owner" | "admin" | "member"; userId: string; }, { role: "owner" | "admin" | "member"; userId: string; }>; export type UpdateMemberRoleResponse = z.infer<typeof updateMemberRoleResponseSchema>; export declare const successResponseSchema: z.ZodObject<{ success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; }, { success: boolean; }>; export type SuccessResponse = z.infer<typeof successResponseSchema>; export declare enum CredentialType { CREDENTIAL_WILDCARD = "*", OPENAI_CRED = "OPENAI_CRED", GOOGLE_GEMINI_CRED = "GOOGLE_GEMINI_CRED", ANTHROPIC_CRED = "ANTHROPIC_CRED", OPENROUTER_CRED = "OPENROUTER_CRED", FIRECRAWL_API_KEY = "FIRECRAWL_API_KEY", DATABASE_CRED = "DATABASE_CRED", SLACK_CRED = "SLACK_CRED", SLACK_API = "SLACK_API", TELEGRAM_BOT_TOKEN = "TELEGRAM_BOT_TOKEN", RESEND_CRED = "RESEND_CRED", CLOUDFLARE_R2_ACCESS_KEY = "CLOUDFLARE_R2_ACCESS_KEY", CLOUDFLARE_R2_SECRET_KEY = "CLOUDFLARE_R2_SECRET_KEY", CLOUDFLARE_R2_ACCOUNT_ID = "CLOUDFLARE_R2_ACCOUNT_ID", APIFY_CRED = "APIFY_CRED", ELEVENLABS_API_KEY = "ELEVENLABS_API_KEY", GOOGLE_DRIVE_CRED = "GOOGLE_DRIVE_CRED", GMAIL_CRED = "GMAIL_CRED", GOOGLE_SHEETS_CRED = "GOOGLE_SHEETS_CRED", GOOGLE_CALENDAR_CRED = "GOOGLE_CALENDAR_CRED", FUB_CRED = "FUB_CRED", NOTION_OAUTH_TOKEN = "NOTION_OAUTH_TOKEN", NOTION_API = "NOTION_API", AIRTABLE_OAUTH = "AIRTABLE_OAUTH", GITHUB_TOKEN = "GITHUB_TOKEN", AGI_API_KEY = "AGI_API_KEY", AIRTABLE_CRED = "AIRTABLE_CRED", INSFORGE_BASE_URL = "INSFORGE_BASE_URL", INSFORGE_API_KEY = "INSFORGE_API_KEY", CUSTOM_AUTH_KEY = "CUSTOM_AUTH_KEY", AMAZON_CRED = "AMAZON_CRED", LINKEDIN_CRED = "LINKEDIN_CRED", BROWSERBASE_CRED = "BROWSERBASE_CRED", CRUSTDATA_API_KEY = "CRUSTDATA_API_KEY", JIRA_CRED = "JIRA_CRED", ASHBY_CRED = "ASHBY_CRED", FULLENRICH_API_KEY = "FULLENRICH_API_KEY", STRIPE_CRED = "STRIPE_CRED", CONFLUENCE_CRED = "CONFLUENCE_CRED", POSTHOG_API_KEY = "POSTHOG_API_KEY", SENDSAFELY_CRED = "SENDSAFELY_CRED", LINEAR_CRED = "LINEAR_CRED", ATTIO_CRED = "ATTIO_CRED", HUBSPOT_CRED = "HUBSPOT_CRED" }
|
|
171
171
|
export type BubbleName = 'hello-world' | 'ai-agent' | 'postgresql' | 'slack' | 'resend' | 'http' | 'slack-formatter-agent' | 'database-analyzer' | 'slack-notifier' | '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' | 'slack-data-assistant' | 'bubbleflow-code-generator' | 'bubbleflow-generator' | 'pdf-form-operations' | 'pdf-ocr-workflow' | 'generate-document-workflow' | 'parse-document-workflow' | 'bubbleflow-validation-tool' | 'code-edit-tool' | 'storage' | 'google-drive' | 'gmail' | 'google-sheets' | 'google-calendar' | 'apify' | 'instagram-tool' | 'linkedin-tool' | 'tiktok-tool' | 'twitter-tool' | 'google-maps-tool' | 'youtube-tool' | 'github' | 'eleven-labs' | 'followupboss' | 'agi-inc' | 'telegram' | 'airtable' | 'notion' | 'firecrawl' | 'insforge-db' | 'browserbase' | 'amazon-shopping-tool' | 'crustdata' | 'company-enrichment-tool' | 'people-search-tool' | 'jira' | 'ashby' | 'fullenrich' | 'linkedin-connection-tool' | 'linkedin-sent-invitations-tool' | 'linkedin-received-invitations-tool' | 'linkedin-accept-invitations-tool' | 'stripe' | 'confluence' | 'sendsafely' | 'yc-scraper-tool' | 'posthog' | 'linear' | 'attio' | 'hubspot'; export type CapabilityId = 'knowledge-base' | 'google-doc-knowledge-base' | 'data-analyst' | 'chart-maker' | 'gmail-assistant' | 'google-calendar' | 'jira-assistant' | 'notion-assistant' | 'stripe-assistant' | 'airtable-assistant' | 'github-assistant' | 'ashby-assistant' | 'google-sheets-assistant' | 'slack-assistant' | 'google-docs-assistant' | 'google-drive-assistant' | 'confluence-assistant' | 'telegram-assistant' | 'resend-assistant' | 'eleven-labs-assistant' | 'firecrawl-assistant' | 'apify-assistant' | 'browserbase-assistant' | 'crustdata-assistant' | 'fullenrich-assistant' | 'followupboss-assistant' | 'posthog-assistant' | 'linear-assistant' | 'attio-assistant' | 'hubspot-assistant' | 'flow-assistant' | 'research-assistant'; export declare const CapabilityProviderMetadataSchema: z.ZodObject<{ value: z.ZodString; label: z.ZodString; credentialType: z.ZodNativeEnum<typeof CredentialType>; icon: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; label: string; credentialType: CredentialType; icon: string; }, { value: string; label: string; credentialType: CredentialType; icon: string; }>; export type CapabilityProviderMetadata = z.infer<typeof CapabilityProviderMetadataSchema>; export declare const CapabilityInputSchema: z.ZodObject<{ name: z.ZodString; type: z.ZodEnum<["string", "number", "boolean", "string[]"]>; label: z.ZodOptional<z.ZodString>; description: z.ZodString; required: z.ZodDefault<z.ZodBoolean>; default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>; }, "strip", z.ZodTypeAny, { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; required: boolean; default?: string | number | boolean | string[] | undefined; label?: string | undefined; }, { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; default?: string | number | boolean | string[] | undefined; required?: boolean | undefined; label?: string | undefined; }>; export type CapabilityInput = z.infer<typeof CapabilityInputSchema>; export declare const CapabilityToolDefSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodString; parameterSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>; internalBubbles: z.ZodOptional<z.ZodArray<z.ZodType<BubbleName, z.ZodTypeDef, BubbleName>, "many">>; requiresApproval: z.ZodOptional<z.ZodBoolean>; masterTool: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; requiresApproval?: boolean | undefined; masterTool?: boolean | undefined; }, { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; requiresApproval?: boolean | undefined; masterTool?: boolean | undefined; }>; export type CapabilityToolDef = z.infer<typeof CapabilityToolDefSchema>; export declare const CapabilityModelConfigOverrideSchema: z.ZodObject<{ model: z.ZodOptional<z.ZodString>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxTokens: z.ZodOptional<z.ZodNumber>; maxIterations: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { model?: string | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxTokens?: number | undefined; maxIterations?: number | undefined; }, { model?: string | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxTokens?: number | undefined; maxIterations?: number | undefined; }>; export type CapabilityModelConfigOverride = z.infer<typeof CapabilityModelConfigOverrideSchema>; export declare const CapabilityMetadataSchema: z.ZodObject<{ id: z.ZodType<CapabilityId>; name: z.ZodString; description: z.ZodString; icon: z.ZodOptional<z.ZodString>; category: z.ZodOptional<z.ZodString>; version: z.ZodDefault<z.ZodString>; requiredCredentials: z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">; optionalCredentials: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">>; inputs: z.ZodArray<z.ZodObject<{ name: z.ZodString; type: z.ZodEnum<["string", "number", "boolean", "string[]"]>; label: z.ZodOptional<z.ZodString>; description: z.ZodString; required: z.ZodDefault<z.ZodBoolean>; default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>; }, "strip", z.ZodTypeAny, { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; required: boolean; default?: string | number | boolean | string[] | undefined; label?: string | undefined; }, { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; default?: string | number | boolean | string[] | undefined; required?: boolean | undefined; label?: string | undefined; }>, "many">; tools: z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; parameterSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>; internalBubbles: z.ZodOptional<z.ZodArray<z.ZodType<BubbleName, z.ZodTypeDef, BubbleName>, "many">>; requiresApproval: z.ZodOptional<z.ZodBoolean>; masterTool: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; requiresApproval?: boolean | undefined; masterTool?: boolean | undefined; }, { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; requiresApproval?: boolean | undefined; masterTool?: boolean | undefined; }>, "many">; systemPromptAddition: z.ZodOptional<z.ZodString>; modelConfigOverride: z.ZodOptional<z.ZodObject<{ model: z.ZodOptional<z.ZodString>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxTokens: z.ZodOptional<z.ZodNumber>; maxIterations: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { model?: string | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxTokens?: number | undefined; maxIterations?: number | undefined; }, { model?: string | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxTokens?: number | undefined; maxIterations?: number | undefined; }>>; delegationHint: z.ZodOptional<z.ZodString>; hidden: z.ZodOptional<z.ZodBoolean>; providers: z.ZodOptional<z.ZodArray<z.ZodObject<{ value: z.ZodString; label: z.ZodString; credentialType: z.ZodNativeEnum<typeof CredentialType>; icon: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; label: string; credentialType: CredentialType; icon: string; }, { value: string; label: string; credentialType: CredentialType; icon: string; }>, "many">>; }, "strip", z.ZodTypeAny, { name: string; description: string; tools: { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; requiresApproval?: boolean | undefined; masterTool?: boolean | undefined; }[]; id: CapabilityId; requiredCredentials: CredentialType[]; version: string; inputs: { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; required: boolean; default?: string | number | boolean | string[] | undefined; label?: string | undefined; }[]; optionalCredentials?: CredentialType[] | undefined; icon?: string | undefined; category?: string | undefined; systemPromptAddition?: string | undefined; modelConfigOverride?: { model?: string | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxTokens?: number | undefined; maxIterations?: number | undefined; } | undefined; delegationHint?: string | undefined; hidden?: boolean | undefined; providers?: { value: string; label: string; credentialType: CredentialType; icon: string; }[] | undefined; }, { name: string; description: string; tools: { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; requiresApproval?: boolean | undefined; masterTool?: boolean | undefined; }[]; id: CapabilityId; requiredCredentials: CredentialType[]; inputs: { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; default?: string | number | boolean | string[] | undefined; required?: boolean | undefined; label?: string | undefined; }[]; optionalCredentials?: CredentialType[] | undefined; icon?: string | undefined; category?: string | undefined; version?: string | undefined; systemPromptAddition?: string | undefined; modelConfigOverride?: { model?: string | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxTokens?: number | undefined; maxIterations?: number | undefined; } | undefined; delegationHint?: string | undefined; hidden?: boolean | undefined; providers?: { value: string; label: string; credentialType: CredentialType; icon: string; }[] | undefined; }>; export type CapabilityMetadata = z.infer<typeof CapabilityMetadataSchema>; export interface PendingApproval { id: string; action: string; targetFlowId: number; expiresAt: number; targetFlowName?: string; aiReasoning?: string; toolInputSummary?: string; }
|
|
172
172
|
export interface MemoryToolDef { name: string; description: string; schema: ZodTypeAny; func: (input: Record<string, unknown>) => Promise<string>; }
|
|
173
|
-
export interface
|
|
173
|
+
export interface MasterAgentSnapshot { messages: Array<Record<string, unknown>>; capabilityId: string; capabilityTask: string; }
|
|
174
|
+
export interface ResumeAgentStateV2 { __version: 2; masterState: Array<Record<string, unknown>>; capabilityId: string; capabilityTask: string; subagentState: Array<Record<string, unknown>>; }
|
|
175
|
+
export interface ExecutionMeta { flowId?: number; executionId?: number; studioBaseUrl?: string; apiBaseUrl?: string; _thinkingMessageTs?: string; _thinkingMessageChannel?: string; _slackChannel?: string; _slackThreadTs?: string; _slackTriggerCredentialId?: number; _isSlackBot?: boolean; _originalTriggerPayload?: Record<string, unknown>; _resumeAgentState?: Array<Record<string, unknown>>; _resumeAgentStateV2?: ResumeAgentStateV2; _pendingApproval?: PendingApproval; _masterAgentSnapshot?: MasterAgentSnapshot; triggerConversationHistory?: Array<{ role: string; content: string; }>; memoryTools?: MemoryToolDef[]; memorySystemPrompt?: string; memoryCallLLMInit?: (callLLM: (prompt: string) => Promise<string>) => void; memoryReflectionCallback?: (messages: Array<{ role: string; content: string; }>) => Promise<void>; _onToolCallStart?: (toolName: string, toolInput: unknown) => void; _onToolCallError?: (detail: { toolName: string; toolInput: unknown; error: string; errorType: string; variableId?: number; model?: string; }) => void; _onAgentError?: (detail: { error: string; model: string; iterations: number; toolCalls: Array<{ tool: string; input?: unknown; output?: unknown; }>; conversationHistory?: Array<{ role: string; content: string; }>; variableId?: number; }) => void; [key: string]: unknown; }
|
|
174
176
|
export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
|
|
175
177
|
export declare class BubbleValidationError extends BubbleError { readonly validationErrors?: string[]; constructor(message: string, options?: { variableId?: number; bubbleName?: string; validationErrors?: string[]; cause?: Error; }); }
|
|
176
178
|
export declare class BubbleExecutionError extends BubbleError { readonly executionPhase?: 'instantiation' | 'execution' | 'validation'; constructor(message: string, options?: { variableId?: number; bubbleName?: string; executionPhase?: 'instantiation' | 'execution' | 'validation'; cause?: Error; }); }
|
|
@@ -206,7 +208,7 @@ export interface IUIBubble extends IBubble { readonly type: 'ui'; template: stri
|
|
|
206
208
|
export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
|
|
207
209
|
export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; executionMeta?: ExecutionMeta; [key: string]: unknown; }
|
|
208
210
|
export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export declare const AvailableTools: 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; export type AvailableTool = z.infer<typeof AvailableTools>; export type ToolHookContext = { toolName: AvailableTool; toolInput: unknown; toolOutput?: BubbleResult<unknown>; messages: BaseMessage[]; bubbleContext?: BubbleContext; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; shouldSkip?: boolean; skipMessage?: string; }>; export type AfterLLMCallContext = { messages: BaseMessage[]; lastAIMessage: AIMessage | AIMessageChunk; hasToolCalls: boolean; }; export type AfterLLMCallHook = (context: AfterLLMCallContext) => Promise<{ messages: BaseMessage[]; continueToAgent?: boolean; }>; export type StreamingCallback = (event: StreamingEvent) => Promise<void> | void; export type ConversationMessage = z.infer<typeof ConversationMessageSchema>; declare const AIAgentParamsSchema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; declare const AIAgentResultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; export
|
|
209
|
-
type AIAgentParams = z.input<typeof AIAgentParamsSchema>;;; & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentResult = z.output<typeof AIAgentResultSchema>; export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AIAgentResult> { static readonly type: "service"; static readonly service = "ai-agent"; static readonly authType: "apikey"; static readonly bubbleName: BubbleName; static readonly schema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; static readonly resultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; static readonly shortDescription = "AI agent with LangGraph for tool-enabled conversations, multimodal support, and JSON mode"; 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 "; static readonly alias = "agent"; private factory; private beforeToolCallHook; private afterToolCallHook; private capabilityBeforeHooks; private capabilityAfterHooks; private afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; private rescueAttempts; private static readonly MAX_RESCUE_ATTEMPTS; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; private runMemoryReflectionIfNeeded; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private resolveCapabilityCredentials; private resolveCapabilityToolNode; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
|
|
211
|
+
type AIAgentParams = z.input<typeof AIAgentParamsSchema>;;; & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentResult = z.output<typeof AIAgentResultSchema>; export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AIAgentResult> { static readonly type: "service"; static readonly service = "ai-agent"; static readonly authType: "apikey"; static readonly bubbleName: BubbleName; static readonly schema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; static readonly resultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; static readonly shortDescription = "AI agent with LangGraph for tool-enabled conversations, multimodal support, and JSON mode"; 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 "; static readonly alias = "agent"; private factory; private beforeToolCallHook; private afterToolCallHook; private capabilityBeforeHooks; private capabilityAfterHooks; private afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; private rescueAttempts; private _currentGraphMessages; private _trace; private static readonly MAX_RESCUE_ATTEMPTS; private static readonly MAX_TOOL_RESULT_CHARS; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; private runMemoryReflectionIfNeeded; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private resolveCapabilityCredentials; private resolveCapabilityToolNode; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
|
|
210
212
|
export {}; export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
|
|
211
213
|
export declare class BubbleValidationError extends BubbleError { readonly validationErrors?: string[]; constructor(message: string, options?: { variableId?: number; bubbleName?: string; validationErrors?: string[]; cause?: Error; }); }
|
|
212
214
|
export declare class BubbleExecutionError extends BubbleError { readonly executionPhase?: 'instantiation' | 'execution' | 'validation'; constructor(message: string, options?: { variableId?: number; bubbleName?: string; executionPhase?: 'instantiation' | 'execution' | 'validation'; cause?: Error; }); }
|
|
@@ -244,7 +246,7 @@ export interface IToolBubble<TResult extends BubbleOperationResult = BubbleOpera
|
|
|
244
246
|
export interface IUIBubble extends IBubble { readonly type: 'ui'; template: string; }
|
|
245
247
|
export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
|
|
246
248
|
export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; executionMeta?: ExecutionMeta; [key: string]: unknown; }
|
|
247
|
-
export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export declare const AvailableTools: 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; export type AvailableTool = z.infer<typeof AvailableTools>; export type ToolHookContext = { toolName: AvailableTool; toolInput: unknown; toolOutput?: BubbleResult<unknown>; messages: BaseMessage[]; bubbleContext?: BubbleContext; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; shouldSkip?: boolean; skipMessage?: string; }>; export type AfterLLMCallContext = { messages: BaseMessage[]; lastAIMessage: AIMessage | AIMessageChunk; hasToolCalls: boolean; }; export type AfterLLMCallHook = (context: AfterLLMCallContext) => Promise<{ messages: BaseMessage[]; continueToAgent?: boolean; }>; export type StreamingCallback = (event: StreamingEvent) => Promise<void> | void; export type ConversationMessage = z.infer<typeof ConversationMessageSchema>; declare const AIAgentParamsSchema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; declare const AIAgentResultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; export type AIAgentParams = z.input<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentResult = z.output<typeof AIAgentResultSchema>; export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AIAgentResult> { static readonly type: "service"; static readonly service = "ai-agent"; static readonly authType: "apikey"; static readonly bubbleName: BubbleName; static readonly schema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; static readonly resultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; static readonly shortDescription = "AI agent with LangGraph for tool-enabled conversations, multimodal support, and JSON mode"; 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 "; static readonly alias = "agent"; private factory; private beforeToolCallHook; private afterToolCallHook; private capabilityBeforeHooks; private capabilityAfterHooks; private afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; private rescueAttempts; private static readonly MAX_RESCUE_ATTEMPTS; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; private runMemoryReflectionIfNeeded; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private resolveCapabilityCredentials; private resolveCapabilityToolNode; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
|
|
249
|
+
export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export declare const AvailableTools: 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; export type AvailableTool = z.infer<typeof AvailableTools>; export type ToolHookContext = { toolName: AvailableTool; toolInput: unknown; toolOutput?: BubbleResult<unknown>; messages: BaseMessage[]; bubbleContext?: BubbleContext; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; shouldSkip?: boolean; skipMessage?: string; }>; export type AfterLLMCallContext = { messages: BaseMessage[]; lastAIMessage: AIMessage | AIMessageChunk; hasToolCalls: boolean; }; export type AfterLLMCallHook = (context: AfterLLMCallContext) => Promise<{ messages: BaseMessage[]; continueToAgent?: boolean; }>; export type StreamingCallback = (event: StreamingEvent) => Promise<void> | void; export type ConversationMessage = z.infer<typeof ConversationMessageSchema>; declare const AIAgentParamsSchema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; declare const AIAgentResultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; export type AIAgentParams = z.input<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentResult = z.output<typeof AIAgentResultSchema>; export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AIAgentResult> { static readonly type: "service"; static readonly service = "ai-agent"; static readonly authType: "apikey"; static readonly bubbleName: BubbleName; static readonly schema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; static readonly resultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; static readonly shortDescription = "AI agent with LangGraph for tool-enabled conversations, multimodal support, and JSON mode"; 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 "; static readonly alias = "agent"; private factory; private beforeToolCallHook; private afterToolCallHook; private capabilityBeforeHooks; private capabilityAfterHooks; private afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; private rescueAttempts; private _currentGraphMessages; private _trace; private static readonly MAX_RESCUE_ATTEMPTS; private static readonly MAX_TOOL_RESULT_CHARS; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; private runMemoryReflectionIfNeeded; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private resolveCapabilityCredentials; private resolveCapabilityToolNode; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
|
|
248
250
|
export {}; export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
|
|
249
251
|
export declare class BubbleValidationError extends BubbleError { readonly validationErrors?: string[]; constructor(message: string, options?: { variableId?: number; bubbleName?: string; validationErrors?: string[]; cause?: Error; }); }
|
|
250
252
|
export declare class BubbleExecutionError extends BubbleError { readonly executionPhase?: 'instantiation' | 'execution' | 'validation'; constructor(message: string, options?: { variableId?: number; bubbleName?: string; executionPhase?: 'instantiation' | 'execution' | 'validation'; cause?: Error; }); }
|
|
@@ -338,7 +340,7 @@ export interface IToolBubble<TResult extends BubbleOperationResult = BubbleOpera
|
|
|
338
340
|
export interface IUIBubble extends IBubble { readonly type: 'ui'; template: string; }
|
|
339
341
|
export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
|
|
340
342
|
export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; executionMeta?: ExecutionMeta; [key: string]: unknown; }
|
|
341
|
-
export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export declare const AvailableTools: 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; export type AvailableTool = z.infer<typeof AvailableTools>; export type ToolHookContext = { toolName: AvailableTool; toolInput: unknown; toolOutput?: BubbleResult<unknown>; messages: BaseMessage[]; bubbleContext?: BubbleContext; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; shouldSkip?: boolean; skipMessage?: string; }>; export type AfterLLMCallContext = { messages: BaseMessage[]; lastAIMessage: AIMessage | AIMessageChunk; hasToolCalls: boolean; }; export type AfterLLMCallHook = (context: AfterLLMCallContext) => Promise<{ messages: BaseMessage[]; continueToAgent?: boolean; }>; export type StreamingCallback = (event: StreamingEvent) => Promise<void> | void; export type ConversationMessage = z.infer<typeof ConversationMessageSchema>; declare const AIAgentParamsSchema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; declare const AIAgentResultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; export type AIAgentParams = z.input<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentResult = z.output<typeof AIAgentResultSchema>; export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AIAgentResult> { static readonly type: "service"; static readonly service = "ai-agent"; static readonly authType: "apikey"; static readonly bubbleName: BubbleName; static readonly schema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; static readonly resultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; static readonly shortDescription = "AI agent with LangGraph for tool-enabled conversations, multimodal support, and JSON mode"; 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 "; static readonly alias = "agent"; private factory; private beforeToolCallHook; private afterToolCallHook; private capabilityBeforeHooks; private capabilityAfterHooks; private afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; private rescueAttempts; private static readonly MAX_RESCUE_ATTEMPTS; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; private runMemoryReflectionIfNeeded; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private resolveCapabilityCredentials; private resolveCapabilityToolNode; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
|
|
343
|
+
export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export declare const AvailableTools: 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; export type AvailableTool = z.infer<typeof AvailableTools>; export type ToolHookContext = { toolName: AvailableTool; toolInput: unknown; toolOutput?: BubbleResult<unknown>; messages: BaseMessage[]; bubbleContext?: BubbleContext; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; shouldSkip?: boolean; skipMessage?: string; }>; export type AfterLLMCallContext = { messages: BaseMessage[]; lastAIMessage: AIMessage | AIMessageChunk; hasToolCalls: boolean; }; export type AfterLLMCallHook = (context: AfterLLMCallContext) => Promise<{ messages: BaseMessage[]; continueToAgent?: boolean; }>; export type StreamingCallback = (event: StreamingEvent) => Promise<void> | void; export type ConversationMessage = z.infer<typeof ConversationMessageSchema>; declare const AIAgentParamsSchema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; declare const AIAgentResultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; export type AIAgentParams = z.input<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; export type AIAgentResult = z.output<typeof AIAgentResultSchema>; export declare class AIAgentBubble extends ServiceBubble<AIAgentParamsParsed, AIAgentResult> { static readonly type: "service"; static readonly service = "ai-agent"; static readonly authType: "apikey"; static readonly bubbleName: BubbleName; static readonly schema: z.ZodObject<{ message: z.ZodString; images: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodDefault<z.ZodLiteral<"base64">>; data: z.ZodString; mimeType: z.ZodDefault<z.ZodString>; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "base64"; data: string; mimeType: string; description?: string | undefined; }, { data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { type: "url"; url: string; description?: string | undefined; }, { type: "url"; url: string; description?: string | undefined; }>]>, "many">>; conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "tool"]>; content: z.ZodString; toolCallId: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }, { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }>, "many">>; systemPrompt: z.ZodDefault<z.ZodString>; name: z.ZodOptional<z.ZodDefault<z.ZodString>>; model: z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodDefault<z.ZodNumber>; maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodDefault<z.ZodNumber>; provider: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; jsonMode: z.ZodDefault<z.ZodBoolean>; backupModel: z.ZodOptional<z.ZodDefault<z.ZodObject<{ model: z.ZodEnum<["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", "google/gemini-3.1-pro-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"]>; temperature: z.ZodOptional<z.ZodNumber>; maxTokens: z.ZodOptional<z.ZodNumber>; reasoningEffort: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>; maxRetries: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; }>>>; }, "strip", z.ZodTypeAny, { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }, { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }>>; tools: z.ZodDefault<z.ZodArray<z.ZodObject<{ 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", "list-capabilities-tool", "get-bubble-details-tool", "get-trigger-detail-tool", "bubbleflow-validation-tool", "code-edit-tool", "chart-js-tool", "amazon-shopping-tool", "linkedin-tool", "tiktok-tool", "twitter-tool", "google-maps-tool", "youtube-tool", "people-search-tool", "sql-query-tool"]>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }, { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }>, "many">>; customTools: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; schema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>]>; func: z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, z.ZodPromise<z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }>, "many">>>; maxIterations: z.ZodDefault<z.ZodNumber>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; streaming: z.ZodDefault<z.ZodBoolean>; capabilities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ id: z.ZodString; inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; memoryEnabled: z.ZodDefault<z.ZodBoolean>; enableSlackHistory: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { message: string; images: ({ type: "base64"; data: string; mimeType: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; model: { 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" | "google/gemini-3.1-pro-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"; temperature: number; maxTokens: number; maxRetries: number; jsonMode: boolean; reasoningEffort?: "low" | "medium" | "high" | undefined; provider?: string[] | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; }; tools: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[]; maxIterations: number; streaming: boolean; memoryEnabled: boolean; enableSlackHistory: boolean; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean | string[]>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, string>> | undefined; images?: ({ data: string; type?: "base64" | undefined; description?: string | undefined; mimeType?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[] | undefined; conversationHistory?: { role: "user" | "assistant" | "tool"; content: string; toolCallId?: string | undefined; name?: string | undefined; }[] | undefined; systemPrompt?: string | undefined; model?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; provider?: string[] | undefined; jsonMode?: boolean | undefined; backupModel?: { 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" | "google/gemini-3.1-pro-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"; temperature?: number | undefined; maxTokens?: number | undefined; reasoningEffort?: "low" | "medium" | "high" | undefined; maxRetries?: number | undefined; } | undefined; } | undefined; tools?: { 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"; credentials?: Partial<Record<CredentialType, string>> | undefined; config?: Record<string, unknown> | undefined; }[] | undefined; customTools?: { description: string; name: string; schema: z.ZodTypeAny | Record<string, unknown>; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; streaming?: boolean | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; memoryEnabled?: boolean | undefined; enableSlackHistory?: boolean | undefined; }>; static readonly resultSchema: z.ZodObject<{ response: z.ZodString; reasoning: z.ZodOptional<z.ZodNullable<z.ZodString>>; toolCalls: z.ZodArray<z.ZodObject<{ tool: z.ZodString; input: z.ZodUnknown; output: z.ZodUnknown; }, "strip", z.ZodTypeAny, { tool: string; input?: unknown; output?: unknown; }, { tool: string; input?: unknown; output?: unknown; }>, "many">; iterations: z.ZodNumber; totalCost: z.ZodOptional<z.ZodNumber>; error: z.ZodString; success: z.ZodBoolean; }, "strip", z.ZodTypeAny, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { success: boolean; error: string; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; static readonly shortDescription = "AI agent with LangGraph for tool-enabled conversations, multimodal support, and JSON mode"; 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 "; static readonly alias = "agent"; private factory; private beforeToolCallHook; private afterToolCallHook; private capabilityBeforeHooks; private capabilityAfterHooks; private afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; private rescueAttempts; private _currentGraphMessages; private _trace; private static readonly MAX_RESCUE_ATTEMPTS; private static readonly MAX_TOOL_RESULT_CHARS; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; private runMemoryReflectionIfNeeded; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private resolveCapabilityCredentials; private resolveCapabilityToolNode; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
|
|
342
344
|
export {}; export declare abstract class BaseBubble<TParams = unknown, TResult extends BubbleOperationResult = BubbleOperationResult> implements IBubble<TResult> { readonly name: string; readonly schema: z.ZodObject<z.ZodRawShape>; readonly resultSchema: z.ZodObject<z.ZodRawShape>; readonly shortDescription: string; readonly longDescription: string; readonly alias?: string; abstract readonly type: 'service' | 'workflow' | 'tool' | 'ui' | 'infra'; protected readonly params: TParams; protected context?: BubbleContext; previousResult: BubbleResult<BubbleOperationResult> | undefined; protected readonly instanceId?: string; constructor(params: unknown, context?: BubbleContext, instanceId?: string); private computeChildContext; saveResult<R extends BubbleOperationResult>(result: BubbleResult<R>): void; clearSavedResult(): void; toJSON(): Record<string, unknown>; action(): Promise<BubbleResult<TResult>>; generateMockResult(): BubbleResult<TResult>; generateMockResultWithSeed(seed: number): BubbleResult<TResult>; protected abstract performAction(context?: BubbleContext): Promise<TResult>; }
|
|
343
345
|
export declare abstract class ServiceBubble<TParams extends ServiceBubbleParams = ServiceBubbleParams, TResult extends BubbleOperationResult = BubbleOperationResult> extends BaseBubble<TParams, TResult> { readonly type: "service"; authType?: 'oauth' | 'apikey' | 'none' | 'connection-string'; constructor(params: unknown, context?: BubbleContext, instanceId?: string); abstract testCredential(): Promise<boolean>; protected abstract chooseCredential(): string | undefined; getCredentialMetadata(): Promise<DatabaseMetadata | undefined>; get currentParams(): Omit<TParams, 'credentials'>; setParam<K extends keyof TParams>(paramName: K, paramValue: TParams[K]): void; get currentContext(): BubbleContext | undefined; }
|
|
344
346
|
export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
|