@bubblelab/bubble-core 0.1.109 → 0.1.112

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.
@@ -53,14 +53,14 @@ export declare const slackUrlVerificationSchema: z.ZodObject<{ token: z.ZodStrin
53
53
  export type DatabaseStatus = 'connected' | 'disconnected' | 'error'; export type DatabaseType = 'postgresql' | 'mysql' | 'mongodb' | 'bigquery' | 'sqlite'; export interface DatabaseColumn { name: string; type: string; isNullable: boolean; defaultValue?: string; constraints?: string[]; }
54
54
  export interface DatabaseTable { name: string; schema: string; columns: DatabaseColumn[]; rowCount?: number; size?: string; }
55
55
  export interface DatabaseSchema { tables: DatabaseTable[]; totalTables: number; totalSize?: string; }
56
- export declare const databaseMetadataSchema: z.ZodObject<{ tables: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>; tableNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; databaseName: z.ZodOptional<z.ZodString>; databaseType: z.ZodOptional<z.ZodEnum<["postgresql", "mysql", "sqlite", "mssql", "oracle"]>>; rules: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; text: z.ZodString; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }>, "many">>; notes: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }>; export type DatabaseMetadata = z.infer<typeof databaseMetadataSchema>; export declare const jiraOAuthMetadataSchema: z.ZodObject<{ cloudId: z.ZodString; siteUrl: z.ZodString; siteName: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }>; export type JiraOAuthMetadata = z.infer<typeof jiraOAuthMetadataSchema>; export declare const stripeOAuthMetadataSchema: z.ZodObject<{ stripeUserId: z.ZodString; stripePublishableKey: z.ZodString; livemode: z.ZodBoolean; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; }, { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; }>; export type StripeOAuthMetadata = z.infer<typeof stripeOAuthMetadataSchema>; export declare const slackOAuthMetadataSchema: z.ZodObject<{ teamId: z.ZodString; teamName: z.ZodString; botUserId: z.ZodString; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; }, { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; }>; export type SlackOAuthMetadata = z.infer<typeof slackOAuthMetadataSchema>; export declare const airtableOAuthMetadataSchema: z.ZodObject<{ airtableUserId: z.ZodString; email: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; }, { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; }>; export type AirtableOAuthMetadata = z.infer<typeof airtableOAuthMetadataSchema>; export declare const credentialPreferencesSchema: z.ZodObject<{ isDefault: z.ZodOptional<z.ZodBoolean>; lastUsedAt: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; }, { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; }>; export type CredentialPreferences = z.infer<typeof credentialPreferencesSchema>; export declare const confluenceOAuthMetadataSchema: z.ZodObject<{ cloudId: z.ZodString; siteUrl: z.ZodString; siteName: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }>; export type ConfluenceOAuthMetadata = z.infer<typeof confluenceOAuthMetadataSchema>; export type CredentialMetadata = DatabaseMetadata | JiraOAuthMetadata | SlackOAuthMetadata | AirtableOAuthMetadata | ConfluenceOAuthMetadata | StripeOAuthMetadata | CredentialPreferences; 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", 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", 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", 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" }
56
+ export declare const databaseMetadataSchema: z.ZodObject<{ tables: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>; tableNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; databaseName: z.ZodOptional<z.ZodString>; databaseType: z.ZodOptional<z.ZodEnum<["postgresql", "mysql", "sqlite", "mssql", "oracle"]>>; rules: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; text: z.ZodString; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }>, "many">>; notes: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }>; export type DatabaseMetadata = z.infer<typeof databaseMetadataSchema>; export declare const jiraOAuthMetadataSchema: z.ZodObject<{ cloudId: z.ZodString; siteUrl: z.ZodString; siteName: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }>; export type JiraOAuthMetadata = z.infer<typeof jiraOAuthMetadataSchema>; export declare const stripeOAuthMetadataSchema: z.ZodObject<{ stripeUserId: z.ZodString; stripePublishableKey: z.ZodString; livemode: z.ZodBoolean; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; }, { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; }>; export type StripeOAuthMetadata = z.infer<typeof stripeOAuthMetadataSchema>; export declare const slackOAuthMetadataSchema: z.ZodObject<{ teamId: z.ZodString; teamName: z.ZodString; botUserId: z.ZodString; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; }, { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; }>; export type SlackOAuthMetadata = z.infer<typeof slackOAuthMetadataSchema>; export declare const airtableOAuthMetadataSchema: z.ZodObject<{ airtableUserId: z.ZodString; email: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; }, { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; }>; export type AirtableOAuthMetadata = z.infer<typeof airtableOAuthMetadataSchema>; export declare const googleOAuthMetadataSchema: z.ZodObject<{ email: z.ZodString; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { email: string; displayName?: string | undefined; }, { email: string; displayName?: string | undefined; }>; export type GoogleOAuthMetadata = z.infer<typeof googleOAuthMetadataSchema>; export declare const credentialPreferencesSchema: z.ZodObject<{ isDefault: z.ZodOptional<z.ZodBoolean>; lastUsedAt: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; }, { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; }>; export type CredentialPreferences = z.infer<typeof credentialPreferencesSchema>; export declare const confluenceOAuthMetadataSchema: z.ZodObject<{ cloudId: z.ZodString; siteUrl: z.ZodString; siteName: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }>; export type ConfluenceOAuthMetadata = z.infer<typeof confluenceOAuthMetadataSchema>; export type CredentialMetadata = DatabaseMetadata | JiraOAuthMetadata | SlackOAuthMetadata | AirtableOAuthMetadata | GoogleOAuthMetadata | ConfluenceOAuthMetadata | StripeOAuthMetadata | CredentialPreferences; 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", 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", 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", 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" }
57
57
  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' | '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' | 'stripe' | 'confluence' | 'yc-scraper-tool'; export interface CredentialConfig { label: string; description: string; placeholder: string; namePlaceholder: string; credentialConfigurations: Record<string, unknown>; }
58
58
  export declare const CREDENTIAL_TYPE_CONFIG: Record<CredentialType, CredentialConfig>; export declare function generateCredentialsSummary(): string; export declare const CREDENTIAL_ENV_MAP: Record<CredentialType, string>; export declare const SYSTEM_CREDENTIALS: Set<CredentialType>; export declare const OPTIONAL_CREDENTIALS: Set<CredentialType>; export type OAuthProvider = 'google' | 'followupboss' | 'notion' | 'jira' | 'slack' | 'airtable'; export interface ScopeDescription { scope: string; description: string; defaultEnabled: boolean; }
59
59
  export interface OAuthCredentialConfig { displayName: string; defaultScopes: string[]; adminScopes?: string[]; description: string; scopeDescriptions?: ScopeDescription[]; }
60
60
  export interface OAuthProviderConfig { name: OAuthProvider; displayName: string; credentialTypes: Partial<Record<CredentialType, OAuthCredentialConfig>>; authorizationParams?: Record<string, string>; }
61
61
  export declare const OAUTH_PROVIDERS: Record<OAuthProvider, OAuthProviderConfig>; export declare function getOAuthProvider(credentialType: CredentialType): OAuthProvider | null; export declare function isOAuthCredential(credentialType: CredentialType): boolean; export declare function getScopeDescriptions(credentialType: CredentialType): ScopeDescription[]; export declare function getDefaultScopes(credentialType: CredentialType): string[]; export declare function getAdminScopes(credentialType: CredentialType): string[]; export type BrowserSessionProvider = 'browserbase'; export interface BrowserSessionCredentialConfig { displayName: string; description: string; targetUrl: string; cookieDomain: string; }
62
62
  export interface BrowserSessionProviderConfig { name: BrowserSessionProvider; displayName: string; credentialTypes: Partial<Record<CredentialType, BrowserSessionCredentialConfig>>; }
63
- export declare const BROWSER_SESSION_PROVIDERS: Record<BrowserSessionProvider, BrowserSessionProviderConfig>; export declare function getBrowserSessionProvider(credentialType: CredentialType): BrowserSessionProvider | null; export declare function isBrowserSessionCredential(credentialType: CredentialType): boolean; export type CredentialOptions = Partial<Record<CredentialType, string>>; export type BubbleCredentialOption = CredentialType[]; export declare const BUBBLE_CREDENTIAL_OPTIONS: Record<BubbleName, BubbleCredentialOption>; export declare const createCredentialSchema: z.ZodObject<{ credentialType: z.ZodNativeEnum<typeof CredentialType>; value: z.ZodString; name: z.ZodOptional<z.ZodString>; skipValidation: z.ZodOptional<z.ZodBoolean>; credentialConfigurations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; metadata: z.ZodOptional<z.ZodObject<{ tables: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>; tableNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; databaseName: z.ZodOptional<z.ZodString>; databaseType: z.ZodOptional<z.ZodEnum<["postgresql", "mysql", "sqlite", "mssql", "oracle"]>>; rules: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; text: z.ZodString; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }>, "many">>; notes: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }>>; }, "strip", z.ZodTypeAny, { value: string; credentialType: CredentialType; name?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | undefined; skipValidation?: boolean | undefined; credentialConfigurations?: Record<string, unknown> | undefined; }, { value: string; credentialType: CredentialType; name?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | undefined; skipValidation?: boolean | undefined; credentialConfigurations?: Record<string, unknown> | undefined; }>; export declare const updateCredentialSchema: z.ZodObject<{ value: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; skipValidation: z.ZodOptional<z.ZodBoolean>; credentialConfigurations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; metadata: z.ZodOptional<z.ZodObject<{ tables: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>; tableNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; databaseName: z.ZodOptional<z.ZodString>; databaseType: z.ZodOptional<z.ZodEnum<["postgresql", "mysql", "sqlite", "mssql", "oracle"]>>; rules: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; text: z.ZodString; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }>, "many">>; notes: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }>>; }, "strip", z.ZodTypeAny, { name?: string | undefined; value?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | undefined; skipValidation?: boolean | undefined; credentialConfigurations?: Record<string, unknown> | undefined; }, { name?: string | undefined; value?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | undefined; skipValidation?: boolean | undefined; credentialConfigurations?: Record<string, unknown> | undefined; }>; export declare const credentialResponseSchema: z.ZodObject<{ id: z.ZodNumber; credentialType: z.ZodString; name: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ tables: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>; tableNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; databaseName: z.ZodOptional<z.ZodString>; databaseType: z.ZodOptional<z.ZodEnum<["postgresql", "mysql", "sqlite", "mssql", "oracle"]>>; rules: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; text: z.ZodString; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }>, "many">>; notes: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }>, z.ZodObject<{ cloudId: z.ZodString; siteUrl: z.ZodString; siteName: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }>, z.ZodObject<{ teamId: z.ZodString; teamName: z.ZodString; botUserId: z.ZodString; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; }, { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; }>, z.ZodObject<{ airtableUserId: z.ZodString; email: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; }, { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; }>, z.ZodObject<{ cloudId: z.ZodString; siteUrl: z.ZodString; siteName: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }>, z.ZodObject<{ stripeUserId: z.ZodString; stripePublishableKey: z.ZodString; livemode: z.ZodBoolean; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; }, { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; }>, z.ZodObject<{ isDefault: z.ZodOptional<z.ZodBoolean>; lastUsedAt: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; }, { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; }>]>>; createdAt: z.ZodString; isOauth: z.ZodOptional<z.ZodBoolean>; oauthProvider: z.ZodOptional<z.ZodString>; oauthExpiresAt: z.ZodOptional<z.ZodString>; oauthScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; oauthStatus: z.ZodOptional<z.ZodEnum<["active", "expired", "needs_refresh"]>>; isBrowserSession: z.ZodOptional<z.ZodBoolean>; browserbaseSessionData: z.ZodOptional<z.ZodObject<{ capturedAt: z.ZodString; cookieCount: z.ZodNumber; domain: z.ZodString; }, "strip", z.ZodTypeAny, { capturedAt: string; cookieCount: number; domain: string; }, { capturedAt: string; cookieCount: number; domain: string; }>>; masterCredentialId: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { id: number; createdAt: string; credentialType: string; name?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; } | { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; } | { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; } | { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; } | { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; } | { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; } | undefined; isOauth?: boolean | undefined; oauthProvider?: string | undefined; oauthExpiresAt?: string | undefined; oauthScopes?: string[] | undefined; oauthStatus?: "active" | "expired" | "needs_refresh" | undefined; isBrowserSession?: boolean | undefined; browserbaseSessionData?: { capturedAt: string; cookieCount: number; domain: string; } | undefined; masterCredentialId?: number | undefined; }, { id: number; createdAt: string; credentialType: string; name?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; } | { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; } | { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; } | { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; } | { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; } | { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; } | undefined; isOauth?: boolean | undefined; oauthProvider?: string | undefined; oauthExpiresAt?: string | undefined; oauthScopes?: string[] | undefined; oauthStatus?: "active" | "expired" | "needs_refresh" | undefined; isBrowserSession?: boolean | undefined; browserbaseSessionData?: { capturedAt: string; cookieCount: number; domain: string; } | undefined; masterCredentialId?: number | undefined; }>; export declare const createCredentialResponseSchema: z.ZodObject<{ id: z.ZodNumber; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; id: number; }, { message: string; id: number; }>; export declare const updateCredentialResponseSchema: z.ZodObject<{ id: z.ZodNumber; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; id: number; }, { message: string; id: number; }>; export declare const successMessageResponseSchema: z.ZodObject<{ message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; }, { message: string; }>; export declare const browserbaseSessionCreateRequestSchema: z.ZodObject<{ credentialType: z.ZodNativeEnum<typeof CredentialType>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { credentialType: CredentialType; name?: string | undefined; }, { credentialType: CredentialType; name?: string | undefined; }>; export declare const browserbaseSessionCreateResponseSchema: z.ZodObject<{ sessionId: z.ZodString; debugUrl: z.ZodString; contextId: z.ZodString; state: z.ZodString; }, "strip", z.ZodTypeAny, { sessionId: string; debugUrl: string; contextId: string; state: string; }, { sessionId: string; debugUrl: string; contextId: string; state: string; }>; export declare const browserbaseSessionCompleteRequestSchema: z.ZodObject<{ sessionId: z.ZodString; state: z.ZodString; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { sessionId: string; state: string; name?: string | undefined; }, { sessionId: string; state: string; name?: string | undefined; }>; export declare const browserbaseSessionCompleteResponseSchema: z.ZodObject<{ id: z.ZodNumber; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; id: number; }, { message: string; id: number; }>; export declare const browserbaseSessionReopenRequestSchema: z.ZodObject<{ credentialId: z.ZodNumber; }, "strip", z.ZodTypeAny, { credentialId: number; }, { credentialId: number; }>; export declare const browserbaseSessionReopenResponseSchema: z.ZodObject<{ sessionId: z.ZodString; debugUrl: z.ZodString; }, "strip", z.ZodTypeAny, { sessionId: string; debugUrl: string; }, { sessionId: string; debugUrl: string; }>; export type CreateCredentialRequest = z.infer<typeof createCredentialSchema>; export type UpdateCredentialRequest = z.infer<typeof updateCredentialSchema>; export type CredentialResponse = z.infer<typeof credentialResponseSchema>; export type CreateCredentialResponse = z.infer<typeof createCredentialResponseSchema>; export type UpdateCredentialResponse = z.infer<typeof updateCredentialResponseSchema>; export type BrowserbaseSessionCreateRequest = z.infer<typeof browserbaseSessionCreateRequestSchema>; export type BrowserbaseSessionCreateResponse = z.infer<typeof browserbaseSessionCreateResponseSchema>; export type BrowserbaseSessionCompleteRequest = z.infer<typeof browserbaseSessionCompleteRequestSchema>; export type BrowserbaseSessionCompleteResponse = z.infer<typeof browserbaseSessionCompleteResponseSchema>; export type BrowserbaseSessionReopenRequest = z.infer<typeof browserbaseSessionReopenRequestSchema>; export type BrowserbaseSessionReopenResponse = z.infer<typeof browserbaseSessionReopenResponseSchema>; 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", 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", 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", 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" }
63
+ export declare const BROWSER_SESSION_PROVIDERS: Record<BrowserSessionProvider, BrowserSessionProviderConfig>; export declare function getBrowserSessionProvider(credentialType: CredentialType): BrowserSessionProvider | null; export declare function isBrowserSessionCredential(credentialType: CredentialType): boolean; export type CredentialOptions = Partial<Record<CredentialType, string>>; export type BubbleCredentialOption = CredentialType[]; export declare const BUBBLE_CREDENTIAL_OPTIONS: Record<BubbleName, BubbleCredentialOption>; export declare const createCredentialSchema: z.ZodObject<{ credentialType: z.ZodNativeEnum<typeof CredentialType>; value: z.ZodString; name: z.ZodOptional<z.ZodString>; skipValidation: z.ZodOptional<z.ZodBoolean>; credentialConfigurations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; metadata: z.ZodOptional<z.ZodObject<{ tables: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>; tableNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; databaseName: z.ZodOptional<z.ZodString>; databaseType: z.ZodOptional<z.ZodEnum<["postgresql", "mysql", "sqlite", "mssql", "oracle"]>>; rules: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; text: z.ZodString; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }>, "many">>; notes: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }>>; }, "strip", z.ZodTypeAny, { value: string; credentialType: CredentialType; name?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | undefined; skipValidation?: boolean | undefined; credentialConfigurations?: Record<string, unknown> | undefined; }, { value: string; credentialType: CredentialType; name?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | undefined; skipValidation?: boolean | undefined; credentialConfigurations?: Record<string, unknown> | undefined; }>; export declare const updateCredentialSchema: z.ZodObject<{ value: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; skipValidation: z.ZodOptional<z.ZodBoolean>; credentialConfigurations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; metadata: z.ZodOptional<z.ZodObject<{ tables: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>; tableNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; databaseName: z.ZodOptional<z.ZodString>; databaseType: z.ZodOptional<z.ZodEnum<["postgresql", "mysql", "sqlite", "mssql", "oracle"]>>; rules: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; text: z.ZodString; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }>, "many">>; notes: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }>>; }, "strip", z.ZodTypeAny, { name?: string | undefined; value?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | undefined; skipValidation?: boolean | undefined; credentialConfigurations?: Record<string, unknown> | undefined; }, { name?: string | undefined; value?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | undefined; skipValidation?: boolean | undefined; credentialConfigurations?: Record<string, unknown> | undefined; }>; export declare const credentialResponseSchema: z.ZodObject<{ id: z.ZodNumber; credentialType: z.ZodString; name: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ tables: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>; tableNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; databaseName: z.ZodOptional<z.ZodString>; databaseType: z.ZodOptional<z.ZodEnum<["postgresql", "mysql", "sqlite", "mssql", "oracle"]>>; rules: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; text: z.ZodString; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }, { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }>, "many">>; notes: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }, { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; }>, z.ZodObject<{ cloudId: z.ZodString; siteUrl: z.ZodString; siteName: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }>, z.ZodObject<{ teamId: z.ZodString; teamName: z.ZodString; botUserId: z.ZodString; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; }, { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; }>, z.ZodObject<{ airtableUserId: z.ZodString; email: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; }, { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; }>, z.ZodObject<{ email: z.ZodString; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { email: string; displayName?: string | undefined; }, { email: string; displayName?: string | undefined; }>, z.ZodObject<{ cloudId: z.ZodString; siteUrl: z.ZodString; siteName: z.ZodOptional<z.ZodString>; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }, { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; }>, z.ZodObject<{ stripeUserId: z.ZodString; stripePublishableKey: z.ZodString; livemode: z.ZodBoolean; displayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; }, { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; }>, z.ZodObject<{ isDefault: z.ZodOptional<z.ZodBoolean>; lastUsedAt: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; }, { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; }>]>>; createdAt: z.ZodString; isOauth: z.ZodOptional<z.ZodBoolean>; oauthProvider: z.ZodOptional<z.ZodString>; oauthExpiresAt: z.ZodOptional<z.ZodString>; oauthScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; oauthStatus: z.ZodOptional<z.ZodEnum<["active", "expired", "needs_refresh"]>>; isBrowserSession: z.ZodOptional<z.ZodBoolean>; browserbaseSessionData: z.ZodOptional<z.ZodObject<{ capturedAt: z.ZodString; cookieCount: z.ZodNumber; domain: z.ZodString; }, "strip", z.ZodTypeAny, { capturedAt: string; cookieCount: number; domain: string; }, { capturedAt: string; cookieCount: number; domain: string; }>>; masterCredentialId: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { id: number; createdAt: string; credentialType: string; name?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; } | { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; } | { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; } | { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; } | { email: string; displayName?: string | undefined; } | { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; } | { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; } | undefined; isOauth?: boolean | undefined; oauthProvider?: string | undefined; oauthExpiresAt?: string | undefined; oauthScopes?: string[] | undefined; oauthStatus?: "active" | "expired" | "needs_refresh" | undefined; isBrowserSession?: boolean | undefined; browserbaseSessionData?: { capturedAt: string; cookieCount: number; domain: string; } | undefined; masterCredentialId?: number | undefined; }, { id: number; createdAt: string; credentialType: string; name?: string | undefined; metadata?: { tables: Record<string, Record<string, string>>; tableNotes?: Record<string, string> | undefined; databaseName?: string | undefined; databaseType?: "postgresql" | "mysql" | "sqlite" | "mssql" | "oracle" | undefined; rules?: { id: string; updatedAt: string; createdAt: string; text: string; enabled: boolean; }[] | undefined; notes?: string | undefined; tags?: string[] | undefined; } | { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; } | { stripeUserId: string; stripePublishableKey: string; livemode: boolean; displayName?: string | undefined; } | { teamId: string; teamName: string; botUserId: string; displayName?: string | undefined; } | { airtableUserId: string; email?: string | undefined; displayName?: string | undefined; } | { email: string; displayName?: string | undefined; } | { isDefault?: boolean | undefined; lastUsedAt?: string | undefined; } | { cloudId: string; siteUrl: string; siteName?: string | undefined; displayName?: string | undefined; } | undefined; isOauth?: boolean | undefined; oauthProvider?: string | undefined; oauthExpiresAt?: string | undefined; oauthScopes?: string[] | undefined; oauthStatus?: "active" | "expired" | "needs_refresh" | undefined; isBrowserSession?: boolean | undefined; browserbaseSessionData?: { capturedAt: string; cookieCount: number; domain: string; } | undefined; masterCredentialId?: number | undefined; }>; export declare const createCredentialResponseSchema: z.ZodObject<{ id: z.ZodNumber; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; id: number; }, { message: string; id: number; }>; export declare const updateCredentialResponseSchema: z.ZodObject<{ id: z.ZodNumber; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; id: number; }, { message: string; id: number; }>; export declare const successMessageResponseSchema: z.ZodObject<{ message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; }, { message: string; }>; export declare const browserbaseSessionCreateRequestSchema: z.ZodObject<{ credentialType: z.ZodNativeEnum<typeof CredentialType>; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { credentialType: CredentialType; name?: string | undefined; }, { credentialType: CredentialType; name?: string | undefined; }>; export declare const browserbaseSessionCreateResponseSchema: z.ZodObject<{ sessionId: z.ZodString; debugUrl: z.ZodString; contextId: z.ZodString; state: z.ZodString; }, "strip", z.ZodTypeAny, { sessionId: string; debugUrl: string; contextId: string; state: string; }, { sessionId: string; debugUrl: string; contextId: string; state: string; }>; export declare const browserbaseSessionCompleteRequestSchema: z.ZodObject<{ sessionId: z.ZodString; state: z.ZodString; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { sessionId: string; state: string; name?: string | undefined; }, { sessionId: string; state: string; name?: string | undefined; }>; export declare const browserbaseSessionCompleteResponseSchema: z.ZodObject<{ id: z.ZodNumber; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; id: number; }, { message: string; id: number; }>; export declare const browserbaseSessionReopenRequestSchema: z.ZodObject<{ credentialId: z.ZodNumber; }, "strip", z.ZodTypeAny, { credentialId: number; }, { credentialId: number; }>; export declare const browserbaseSessionReopenResponseSchema: z.ZodObject<{ sessionId: z.ZodString; debugUrl: z.ZodString; }, "strip", z.ZodTypeAny, { sessionId: string; debugUrl: string; }, { sessionId: string; debugUrl: string; }>; export type CreateCredentialRequest = z.infer<typeof createCredentialSchema>; export type UpdateCredentialRequest = z.infer<typeof updateCredentialSchema>; export type CredentialResponse = z.infer<typeof credentialResponseSchema>; export type CreateCredentialResponse = z.infer<typeof createCredentialResponseSchema>; export type UpdateCredentialResponse = z.infer<typeof updateCredentialResponseSchema>; export type BrowserbaseSessionCreateRequest = z.infer<typeof browserbaseSessionCreateRequestSchema>; export type BrowserbaseSessionCreateResponse = z.infer<typeof browserbaseSessionCreateResponseSchema>; export type BrowserbaseSessionCompleteRequest = z.infer<typeof browserbaseSessionCompleteRequestSchema>; export type BrowserbaseSessionCompleteResponse = z.infer<typeof browserbaseSessionCompleteResponseSchema>; export type BrowserbaseSessionReopenRequest = z.infer<typeof browserbaseSessionReopenRequestSchema>; export type BrowserbaseSessionReopenResponse = z.infer<typeof browserbaseSessionReopenResponseSchema>; 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", 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", 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", 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" }
64
64
  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' | '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' | 'stripe' | 'confluence' | 'yc-scraper-tool'; export declare enum BubbleParameterType { STRING = "string", NUMBER = "number", BOOLEAN = "boolean", OBJECT = "object", ARRAY = "array", ENV = "env", VARIABLE = "variable", EXPRESSION = "expression", UNKNOWN = "unknown" }
65
65
  export declare const CREDENTIAL_CONFIGURATION_MAP: Record<CredentialType, Record<string, BubbleParameterType>>; export declare const BUBBLE_NAMES_WITH_CONTEXT_INJECTION: string[]; export declare const BubbleParameterTypeSchema: z.ZodNativeEnum<typeof BubbleParameterType>; export declare const BubbleParameterSchema: z.ZodObject<{ location: z.ZodOptional<z.ZodObject<{ startLine: z.ZodNumber; startCol: z.ZodNumber; endLine: z.ZodNumber; endCol: z.ZodNumber; }, "strip", z.ZodTypeAny, { startLine: number; startCol: number; endLine: number; endCol: number; }, { startLine: number; startCol: number; endLine: number; endCol: number; }>>; variableId: z.ZodOptional<z.ZodNumber>; name: z.ZodString; value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>; type: z.ZodNativeEnum<typeof BubbleParameterType>; source: z.ZodOptional<z.ZodEnum<["object-property", "first-arg", "spread"]>>; }, "strip", z.ZodTypeAny, { name: string; value: string | number | boolean | unknown[] | Record<string, unknown>; type: BubbleParameterType; location?: { startLine: number; startCol: number; endLine: number; endCol: number; } | undefined; variableId?: number | undefined; source?: "object-property" | "first-arg" | "spread" | undefined; }, { name: string; value: string | number | boolean | unknown[] | Record<string, unknown>; type: BubbleParameterType; location?: { startLine: number; startCol: number; endLine: number; endCol: number; } | undefined; variableId?: number | undefined; source?: "object-property" | "first-arg" | "spread" | undefined; }>; export type BubbleParameter = z.infer<typeof BubbleParameterSchema>; export interface ParsedBubble { variableName: string; bubbleName: BubbleName; className: string; parameters: BubbleParameter[]; hasAwait: boolean; hasActionCall: boolean; dependencies?: BubbleName[]; dependencyGraph?: DependencyGraphNode; }
66
66
  export interface DependencyGraphNode { name: BubbleName; variableName?: string; nodeType: BubbleNodeType; uniqueId?: string; variableId?: number; dependencies: DependencyGraphNode[]; functionCallChildren?: FunctionCallWorkflowNode[]; }
@@ -161,7 +161,7 @@ export interface TransformationFunctionWorkflowNode { type: 'transformation_func
161
161
  export type WorkflowNode = BubbleWorkflowNode | ControlFlowWorkflowNode | TryCatchWorkflowNode | CodeBlockWorkflowNode | VariableDeclarationBlockNode | ReturnWorkflowNode | FunctionCallWorkflowNode | ParallelExecutionWorkflowNode | TransformationFunctionWorkflowNode; export interface ParsedWorkflow { root: WorkflowNode[]; bubbles: Record<number, ParsedBubbleWithInfo>; }
162
162
  export declare const WorkflowNodeTypeSchema: z.ZodEnum<["bubble", "if", "for", "while", "try_catch", "variable_declaration", "return", "function_call", "code_block", "parallel_execution", "transformation_function"]>; export declare const LocationSchema: z.ZodObject<{ startLine: z.ZodNumber; startCol: z.ZodNumber; endLine: z.ZodNumber; endCol: z.ZodNumber; }, "strip", z.ZodTypeAny, { startLine: number; startCol: number; endLine: number; endCol: number; }, { startLine: number; startCol: number; endLine: number; endCol: number; }>; export declare const BubbleWorkflowNodeSchema: z.ZodType<BubbleWorkflowNode>; export declare const ControlFlowWorkflowNodeSchema: z.ZodType<ControlFlowWorkflowNode>; export declare const TryCatchWorkflowNodeSchema: z.ZodType<TryCatchWorkflowNode>; export declare const CodeBlockWorkflowNodeSchema: z.ZodType<CodeBlockWorkflowNode>; export declare const VariableDeclarationBlockNodeSchema: z.ZodType<VariableDeclarationBlockNode>; export declare const ReturnWorkflowNodeSchema: z.ZodType<ReturnWorkflowNode>; export declare const FunctionCallWorkflowNodeSchema: z.ZodType<FunctionCallWorkflowNode>; export declare const ParallelExecutionWorkflowNodeSchema: z.ZodType<ParallelExecutionWorkflowNode>; export declare const TransformationFunctionWorkflowNodeSchema: z.ZodType<TransformationFunctionWorkflowNode>; export declare const WorkflowNodeSchema: z.ZodType<WorkflowNode>; export declare const ParsedWorkflowSchema: z.ZodObject<{ root: z.ZodArray<z.ZodType<WorkflowNode, z.ZodTypeDef, WorkflowNode>, "many">; bubbles: z.ZodRecord<z.ZodNumber, z.ZodObject<{ variableName: z.ZodString; bubbleName: z.ZodType<BubbleName>; className: z.ZodString; parameters: z.ZodArray<z.ZodObject<{ location: z.ZodOptional<z.ZodObject<{ startLine: z.ZodNumber; startCol: z.ZodNumber; endLine: z.ZodNumber; endCol: z.ZodNumber; }, "strip", z.ZodTypeAny, { startLine: number; startCol: number; endLine: number; endCol: number; }, { startLine: number; startCol: number; endLine: number; endCol: number; }>>; variableId: z.ZodOptional<z.ZodNumber>; name: z.ZodString; value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>; type: z.ZodNativeEnum<typeof BubbleParameterType>; source: z.ZodOptional<z.ZodEnum<["object-property", "first-arg", "spread"]>>; }, "strip", z.ZodTypeAny, { name: string; value: string | number | boolean | unknown[] | Record<string, unknown>; type: BubbleParameterType; location?: { startLine: number; startCol: number; endLine: number; endCol: number; } | undefined; variableId?: number | undefined; source?: "object-property" | "first-arg" | "spread" | undefined; }, { name: string; value: string | number | boolean | unknown[] | Record<string, unknown>; type: BubbleParameterType; location?: { startLine: number; startCol: number; endLine: number; endCol: number; } | undefined; variableId?: number | undefined; source?: "object-property" | "first-arg" | "spread" | undefined; }>, "many">; hasAwait: z.ZodBoolean; hasActionCall: z.ZodBoolean; dependencies: z.ZodOptional<z.ZodArray<z.ZodType<BubbleName, z.ZodTypeDef, BubbleName>, "many">>; dependencyGraph: z.ZodOptional<z.ZodType<DependencyGraphNode, z.ZodTypeDef, DependencyGraphNode>>; variableId: z.ZodNumber; nodeType: z.ZodEnum<["service", "tool", "workflow", "unknown"]>; location: z.ZodObject<{ startLine: z.ZodNumber; startCol: z.ZodNumber; endLine: z.ZodNumber; endCol: z.ZodNumber; }, "strip", z.ZodTypeAny, { startLine: number; startCol: number; endLine: number; endCol: number; }, { startLine: number; startCol: number; endLine: number; endCol: number; }>; description: z.ZodOptional<z.ZodString>; invocationCallSiteKey: z.ZodOptional<z.ZodString>; clonedFromVariableId: z.ZodOptional<z.ZodNumber>; isInsideCustomTool: z.ZodOptional<z.ZodBoolean>; containingCustomToolId: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { location: { startLine: number; startCol: number; endLine: number; endCol: number; }; variableId: number; variableName: string; nodeType: "tool" | "unknown" | "service" | "workflow"; className: string; parameters: { name: string; value: string | number | boolean | unknown[] | Record<string, unknown>; type: BubbleParameterType; location?: { startLine: number; startCol: number; endLine: number; endCol: number; } | undefined; variableId?: number | undefined; source?: "object-property" | "first-arg" | "spread" | undefined; }[]; hasAwait: boolean; hasActionCall: boolean; bubbleName: BubbleName; description?: string | undefined; dependencies?: BubbleName[] | undefined; dependencyGraph?: DependencyGraphNode | undefined; invocationCallSiteKey?: string | undefined; clonedFromVariableId?: number | undefined; isInsideCustomTool?: boolean | undefined; containingCustomToolId?: string | undefined; }, { location: { startLine: number; startCol: number; endLine: number; endCol: number; }; variableId: number; variableName: string; nodeType: "tool" | "unknown" | "service" | "workflow"; className: string; parameters: { name: string; value: string | number | boolean | unknown[] | Record<string, unknown>; type: BubbleParameterType; location?: { startLine: number; startCol: number; endLine: number; endCol: number; } | undefined; variableId?: number | undefined; source?: "object-property" | "first-arg" | "spread" | undefined; }[]; hasAwait: boolean; hasActionCall: boolean; bubbleName: BubbleName; description?: string | undefined; dependencies?: BubbleName[] | undefined; dependencyGraph?: DependencyGraphNode | undefined; invocationCallSiteKey?: string | undefined; clonedFromVariableId?: number | undefined; isInsideCustomTool?: boolean | undefined; containingCustomToolId?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { root: WorkflowNode[]; bubbles: Record<number, { location: { startLine: number; startCol: number; endLine: number; endCol: number; }; variableId: number; variableName: string; nodeType: "tool" | "unknown" | "service" | "workflow"; className: string; parameters: { name: string; value: string | number | boolean | unknown[] | Record<string, unknown>; type: BubbleParameterType; location?: { startLine: number; startCol: number; endLine: number; endCol: number; } | undefined; variableId?: number | undefined; source?: "object-property" | "first-arg" | "spread" | undefined; }[]; hasAwait: boolean; hasActionCall: boolean; bubbleName: BubbleName; description?: string | undefined; dependencies?: BubbleName[] | undefined; dependencyGraph?: DependencyGraphNode | undefined; invocationCallSiteKey?: string | undefined; clonedFromVariableId?: number | undefined; isInsideCustomTool?: boolean | undefined; containingCustomToolId?: string | undefined; }>; }, { root: WorkflowNode[]; bubbles: Record<number, { location: { startLine: number; startCol: number; endLine: number; endCol: number; }; variableId: number; variableName: string; nodeType: "tool" | "unknown" | "service" | "workflow"; className: string; parameters: { name: string; value: string | number | boolean | unknown[] | Record<string, unknown>; type: BubbleParameterType; location?: { startLine: number; startCol: number; endLine: number; endCol: number; } | undefined; variableId?: number | undefined; source?: "object-property" | "first-arg" | "spread" | undefined; }[]; hasAwait: boolean; hasActionCall: boolean; bubbleName: BubbleName; description?: string | undefined; dependencies?: BubbleName[] | undefined; dependencyGraph?: DependencyGraphNode | undefined; invocationCallSiteKey?: string | undefined; clonedFromVariableId?: number | undefined; isInsideCustomTool?: boolean | undefined; containingCustomToolId?: string | undefined; }>; }>; export declare function containsFunctionLiteral(value: string): boolean; export declare function formatParameterValue(value: unknown, type: string): string; export declare function condenseToSingleLine(input: string): string; export declare function stripCommentsOutsideStrings(input: string): string; export interface BuildParameterObjectOptions { preserveFormatting?: boolean; }
163
163
  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", 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", 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", 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" }
164
- 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' | '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' | 'stripe' | 'confluence' | 'yc-scraper-tool'; export declare const CapabilityInputSchema: z.ZodObject<{ name: z.ZodString; type: z.ZodEnum<["string", "number", "boolean"]>; description: z.ZodString; required: z.ZodDefault<z.ZodBoolean>; default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>; }, "strip", z.ZodTypeAny, { name: string; type: "string" | "number" | "boolean"; description: string; required: boolean; default?: string | number | boolean | undefined; }, { name: string; type: "string" | "number" | "boolean"; description: string; default?: string | number | boolean | undefined; required?: boolean | 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>; }, "strip", z.ZodTypeAny, { name: string; description: string; parameterSchema: Record<string, unknown>; }, { name: string; description: string; parameterSchema: Record<string, unknown>; }>; export type CapabilityToolDef = z.infer<typeof CapabilityToolDefSchema>; export declare const CapabilityMetadataSchema: z.ZodObject<{ id: z.ZodString; 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">; inputs: z.ZodArray<z.ZodObject<{ name: z.ZodString; type: z.ZodEnum<["string", "number", "boolean"]>; description: z.ZodString; required: z.ZodDefault<z.ZodBoolean>; default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>; }, "strip", z.ZodTypeAny, { name: string; type: "string" | "number" | "boolean"; description: string; required: boolean; default?: string | number | boolean | undefined; }, { name: string; type: "string" | "number" | "boolean"; description: string; default?: string | number | boolean | undefined; required?: boolean | undefined; }>, "many">; tools: z.ZodArray<z.ZodObject<{ name: z.ZodString; description: z.ZodString; parameterSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, "strip", z.ZodTypeAny, { name: string; description: string; parameterSchema: Record<string, unknown>; }, { name: string; description: string; parameterSchema: Record<string, unknown>; }>, "many">; systemPromptAddition: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; description: string; tools: { name: string; description: string; parameterSchema: Record<string, unknown>; }[]; id: string; requiredCredentials: CredentialType[]; version: string; inputs: { name: string; type: "string" | "number" | "boolean"; description: string; required: boolean; default?: string | number | boolean | undefined; }[]; icon?: string | undefined; category?: string | undefined; systemPromptAddition?: string | undefined; }, { name: string; description: string; tools: { name: string; description: string; parameterSchema: Record<string, unknown>; }[]; id: string; requiredCredentials: CredentialType[]; inputs: { name: string; type: "string" | "number" | "boolean"; description: string; default?: string | number | boolean | undefined; required?: boolean | undefined; }[]; icon?: string | undefined; category?: string | undefined; version?: string | undefined; systemPromptAddition?: string | undefined; }>; export type CapabilityMetadata = z.infer<typeof CapabilityMetadataSchema>; export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
164
+ 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' | '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' | 'stripe' | 'confluence' | 'yc-scraper-tool'; export declare const CapabilityInputSchema: z.ZodObject<{ name: z.ZodString; type: z.ZodEnum<["string", "number", "boolean", "string[]"]>; 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; }, { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; default?: string | number | boolean | string[] | undefined; required?: boolean | 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">>; }, "strip", z.ZodTypeAny, { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; }, { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; }>; export type CapabilityToolDef = z.infer<typeof CapabilityToolDefSchema>; export declare const CapabilityMetadataSchema: z.ZodObject<{ id: z.ZodString; 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">; inputs: z.ZodArray<z.ZodObject<{ name: z.ZodString; type: z.ZodEnum<["string", "number", "boolean", "string[]"]>; 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; }, { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; default?: string | number | boolean | string[] | undefined; required?: boolean | 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">>; }, "strip", z.ZodTypeAny, { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; }, { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; }>, "many">; systemPromptAddition: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; description: string; tools: { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; }[]; id: string; requiredCredentials: CredentialType[]; version: string; inputs: { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; required: boolean; default?: string | number | boolean | string[] | undefined; }[]; icon?: string | undefined; category?: string | undefined; systemPromptAddition?: string | undefined; }, { name: string; description: string; tools: { name: string; description: string; parameterSchema: Record<string, unknown>; internalBubbles?: BubbleName[] | undefined; }[]; id: string; requiredCredentials: CredentialType[]; inputs: { name: string; type: "string" | "number" | "boolean" | "string[]"; description: string; default?: string | number | boolean | string[] | undefined; required?: boolean | undefined; }[]; icon?: string | undefined; category?: string | undefined; version?: string | undefined; systemPromptAddition?: string | undefined; }>; export type CapabilityMetadata = z.infer<typeof CapabilityMetadataSchema>; export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
165
165
  export declare class BubbleValidationError extends BubbleError { readonly validationErrors?: string[]; constructor(message: string, options?: { variableId?: number; bubbleName?: string; validationErrors?: string[]; cause?: Error; }); }
166
166
  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; }); }
167
167
  export declare enum LogLevel { TRACE = 0, DEBUG = 1, INFO = 2, WARN = 3, ERROR = 4, FATAL = 5 }
@@ -195,7 +195,7 @@ export interface IToolBubble<TResult extends BubbleOperationResult = BubbleOpera
195
195
  export interface IUIBubble extends IBubble { readonly type: 'ui'; template: string; }
196
196
  export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
197
197
  export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; [key: string]: unknown; }
198
- 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", "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[]; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; }>; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; type AIAgentParams = z.input<typeof AIAgentParamsSchema>;;; & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; 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 afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
198
+ 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", "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[]; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; }>; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; 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; 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; type AIAgentParams = z.input<typeof AIAgentParamsSchema>;;; & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; 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; 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; 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 afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; 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; }
199
199
  export {}; export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
200
200
  export declare class BubbleValidationError extends BubbleError { readonly validationErrors?: string[]; constructor(message: string, options?: { variableId?: number; bubbleName?: string; validationErrors?: string[]; cause?: Error; }); }
201
201
  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; }); }
@@ -212,9 +212,9 @@ export interface IToolBubble<TResult extends BubbleOperationResult = BubbleOpera
212
212
  export interface IUIBubble extends IBubble { readonly type: 'ui'; template: string; }
213
213
  export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
214
214
  export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; [key: string]: unknown; }
215
- export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export interface CapabilityRuntimeContext { credentials: Partial<Record<CredentialType, string>>; inputs: Record<string, string | number | boolean>; bubbleContext?: BubbleContext; }
216
- export type CapabilityToolFunc = (params: Record<string, unknown>) => Promise<unknown>; export type CapabilityToolFactory = (context: CapabilityRuntimeContext) => Record<string, CapabilityToolFunc>; export type CapabilitySystemPromptFactory = (context: CapabilityRuntimeContext) => string; export interface CapabilityDefinition { metadata: CapabilityMetadata; createTools: CapabilityToolFactory; createSystemPrompt?: CapabilitySystemPromptFactory; hooks?: { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; }; }
217
- export interface DefineCapabilityOptions { id: string; name: string; description: string; icon?: string; category?: string; version?: string; requiredCredentials: CredentialType[]; inputs: CapabilityInput[]; tools: Array<{ name: string; description: string; schema: z.ZodObject<z.ZodRawShape>; func: (ctx: CapabilityRuntimeContext) => CapabilityToolFunc; }>; systemPrompt?: string | CapabilitySystemPromptFactory; hooks?: CapabilityDefinition['hooks']; }
215
+ export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export interface CapabilityRuntimeContext { credentials: Partial<Record<CredentialType, string>>; inputs: Record<string, string | number | boolean | string[]>; bubbleContext?: BubbleContext; }
216
+ export type CapabilityToolFunc = (params: Record<string, unknown>) => Promise<unknown>; export type CapabilityToolFactory = (context: CapabilityRuntimeContext) => Record<string, CapabilityToolFunc>; export type CapabilitySystemPromptFactory = (context: CapabilityRuntimeContext) => string | Promise<string>; export interface CapabilityDefinition { metadata: CapabilityMetadata; createTools: CapabilityToolFactory; createSystemPrompt?: CapabilitySystemPromptFactory; hooks?: { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; }; }
217
+ export interface DefineCapabilityOptions { id: string; name: string; description: string; icon?: string; category?: string; version?: string; requiredCredentials: CredentialType[]; inputs: CapabilityInput[]; tools: Array<{ name: string; description: string; schema: z.ZodObject<z.ZodRawShape>; internalBubbles?: BubbleName[]; func: (ctx: CapabilityRuntimeContext) => CapabilityToolFunc; }>; systemPrompt?: string | CapabilitySystemPromptFactory; hooks?: CapabilityDefinition['hooks']; }
218
218
  export declare function defineCapability(options: DefineCapabilityOptions): CapabilityDefinition; 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>; }
219
219
  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; }
220
220
  export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
@@ -233,7 +233,7 @@ export interface IToolBubble<TResult extends BubbleOperationResult = BubbleOpera
233
233
  export interface IUIBubble extends IBubble { readonly type: 'ui'; template: string; }
234
234
  export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
235
235
  export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; [key: string]: unknown; }
236
- 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", "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[]; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; }>; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; type AIAgentParams = z.input<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; 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 afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
236
+ 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", "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[]; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; }>; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; 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; 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; type AIAgentParams = z.input<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; 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; 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; 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 afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; 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; }
237
237
  export {}; export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
238
238
  export declare class BubbleValidationError extends BubbleError { readonly validationErrors?: string[]; constructor(message: string, options?: { variableId?: number; bubbleName?: string; validationErrors?: string[]; cause?: Error; }); }
239
239
  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; }); }
@@ -250,9 +250,9 @@ export interface IToolBubble<TResult extends BubbleOperationResult = BubbleOpera
250
250
  export interface IUIBubble extends IBubble { readonly type: 'ui'; template: string; }
251
251
  export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
252
252
  export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; [key: string]: unknown; }
253
- export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export interface CapabilityRuntimeContext { credentials: Partial<Record<CredentialType, string>>; inputs: Record<string, string | number | boolean>; bubbleContext?: BubbleContext; }
254
- export type CapabilityToolFunc = (params: Record<string, unknown>) => Promise<unknown>; export type CapabilityToolFactory = (context: CapabilityRuntimeContext) => Record<string, CapabilityToolFunc>; export type CapabilitySystemPromptFactory = (context: CapabilityRuntimeContext) => string; export interface CapabilityDefinition { metadata: CapabilityMetadata; createTools: CapabilityToolFactory; createSystemPrompt?: CapabilitySystemPromptFactory; hooks?: { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; }; }
255
- export interface DefineCapabilityOptions { id: string; name: string; description: string; icon?: string; category?: string; version?: string; requiredCredentials: CredentialType[]; inputs: CapabilityInput[]; tools: Array<{ name: string; description: string; schema: z.ZodObject<z.ZodRawShape>; func: (ctx: CapabilityRuntimeContext) => CapabilityToolFunc; }>; systemPrompt?: string | CapabilitySystemPromptFactory; hooks?: CapabilityDefinition['hooks']; }
253
+ export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; export interface CapabilityRuntimeContext { credentials: Partial<Record<CredentialType, string>>; inputs: Record<string, string | number | boolean | string[]>; bubbleContext?: BubbleContext; }
254
+ export type CapabilityToolFunc = (params: Record<string, unknown>) => Promise<unknown>; export type CapabilityToolFactory = (context: CapabilityRuntimeContext) => Record<string, CapabilityToolFunc>; export type CapabilitySystemPromptFactory = (context: CapabilityRuntimeContext) => string | Promise<string>; export interface CapabilityDefinition { metadata: CapabilityMetadata; createTools: CapabilityToolFactory; createSystemPrompt?: CapabilitySystemPromptFactory; hooks?: { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; }; }
255
+ export interface DefineCapabilityOptions { id: string; name: string; description: string; icon?: string; category?: string; version?: string; requiredCredentials: CredentialType[]; inputs: CapabilityInput[]; tools: Array<{ name: string; description: string; schema: z.ZodObject<z.ZodRawShape>; internalBubbles?: BubbleName[]; func: (ctx: CapabilityRuntimeContext) => CapabilityToolFunc; }>; systemPrompt?: string | CapabilitySystemPromptFactory; hooks?: CapabilityDefinition['hooks']; }
256
256
  export declare function defineCapability(options: DefineCapabilityOptions): CapabilityDefinition; export declare function registerCapability(cap: CapabilityDefinition): void; export declare function getCapability(id: string): CapabilityDefinition | undefined; export declare function getAllCapabilities(): CapabilityDefinition[]; export declare function getAllCapabilityMetadata(): CapabilityMetadata[]; export declare function getCapabilityMetadataById(id: string): CapabilityMetadata | undefined; export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
257
257
  export declare class BubbleValidationError extends BubbleError { readonly validationErrors?: string[]; constructor(message: string, options?: { variableId?: number; bubbleName?: string; validationErrors?: string[]; cause?: Error; }); }
258
258
  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; }); }
@@ -327,7 +327,7 @@ export interface IToolBubble<TResult extends BubbleOperationResult = BubbleOpera
327
327
  export interface IUIBubble extends IBubble { readonly type: 'ui'; template: string; }
328
328
  export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
329
329
  export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; [key: string]: unknown; }
330
- 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", "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[]; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; }>; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; type AIAgentParams = z.input<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>>; credentials: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>>; }, "strip", z.ZodTypeAny, { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }, { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }>, "many">>>; expectedOutputSchema: z.ZodOptional<z.ZodUnion<[z.ZodType<z.ZodTypeAny, z.ZodTypeDef, z.ZodTypeAny>, z.ZodString]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; capabilities?: { id: string; inputs: Record<string, string | number | boolean>; credentials?: Partial<Record<CredentialType, string>> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | undefined; }, { message: string; name?: string | undefined; credentials?: Partial<Record<CredentialType, 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; 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 afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; protected getCredentialType(): CredentialType; private getCredentialTypeForModel; protected chooseCredential(): string | undefined; private isDeepResearchModel; private executeDeepResearchViaOpenRouter; private initializeModel; private initializeTools; private jsonSchemaToZod; private executeToolsWithHooks; private createAgentGraph; private executeAgent; }
330
+ 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", "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[]; }; export type ToolHookAfter = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; shouldStop?: boolean; }>; export type ToolHookBefore = (context: ToolHookContext) => Promise<{ messages: BaseMessage[]; toolInput: Record<string, any>; }>; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; 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; 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }>; type AIAgentParams = z.input<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; type AIAgentParamsParsed = z.output<typeof AIAgentParamsSchema> & { beforeToolCall?: ToolHookBefore; afterToolCall?: ToolHookAfter; afterLLMCall?: AfterLLMCallHook; streamingCallback?: StreamingCallback; }; 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"; mimeType: string; data: 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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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", "anthropic/claude-sonnet-4-5", "anthropic/claude-opus-4-5", "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-opus-4.5", "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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", "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" | "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" | "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: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }, { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; 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]>>; }, "strip", z.ZodTypeAny, { message: 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; }; streaming: boolean; tools: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; }[]; images: ({ type: "base64"; mimeType: string; data: string; description?: string | undefined; } | { type: "url"; url: string; description?: string | undefined; })[]; systemPrompt: string; maxIterations: number; 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: Record<string, unknown> | z.ZodTypeAny; 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; 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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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" | "anthropic/claude-sonnet-4-5" | "anthropic/claude-opus-4-5" | "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-opus-4.5" | "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; streaming?: boolean | undefined; tools?: { name: "get-bubble-details-tool" | "get-trigger-detail-tool" | "list-bubbles-tool" | "sql-query-tool" | "chart-js-tool" | "web-search-tool" | "web-scrape-tool" | "web-crawl-tool" | "web-extract-tool" | "research-agent-tool" | "reddit-scrape-tool" | "bubbleflow-validation-tool" | "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; 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; customTools?: { description: string; name: string; schema: Record<string, unknown> | z.ZodTypeAny; func: (args_0: Record<string, unknown>, ...args: unknown[]) => Promise<unknown>; }[] | undefined; maxIterations?: number | undefined; capabilities?: { id: string; credentials?: Partial<Record<CredentialType, string>> | undefined; inputs?: Record<string, string | number | boolean | string[]> | undefined; }[] | undefined; expectedOutputSchema?: string | z.ZodTypeAny | 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, { error: string; success: boolean; response: string; toolCalls: { tool: string; input?: unknown; output?: unknown; }[]; iterations: number; reasoning?: string | null | undefined; totalCost?: number | undefined; }, { error: string; success: boolean; 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 afterLLMCallHook; private streamingCallback; private shouldStopAfterTools; private shouldContinueToAgent; constructor(params?: AIAgentParams, context?: BubbleContext, instanceId?: string); testCredential(): Promise<boolean>; private buildModelConfig; private executeWithModel; private beforeAction; protected performAction(context?: BubbleContext): Promise<AIAgentResult>; 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; }
331
331
  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>; }
332
332
  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; }
333
333
  export declare class BubbleError extends Error { readonly variableId?: number; readonly bubbleName?: string; constructor(message: string, options?: { variableId?: number; bubbleName?: string; cause?: Error; }); }
@@ -627,7 +627,7 @@ export interface IToolBubble<TResult extends BubbleOperationResult = BubbleOpera
627
627
  export interface IUIBubble extends IBubble { readonly type: 'ui'; template: string; }
628
628
  export interface IInfraBubble extends IBubble { readonly type: 'infra'; provider: 'aws' | 'gcp' | 'supabase'; resourceType: string; }
629
629
  export type BubbleFlowOperationResult = unknown; export interface BubbleContext { logger?: BubbleLogger; variableId?: number; invocationCallSiteKey?: string; dependencyGraph?: DependencyGraphNode; currentUniqueId?: string; __uniqueIdCounters__?: Record<string, number>; [key: string]: unknown; }
630
- export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; declare const TikTokToolParamsSchema: z.ZodObject<{ operation: z.ZodEnum<["scrapeProfile", "scrapeHashtag", "scrapeVideo"]>; profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; hashtags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; videoUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>; shouldDownloadVideos: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; credentials?: Partial<Record<CredentialType, string>> | undefined; limit?: number | undefined; hashtags?: string[] | undefined; profiles?: string[] | undefined; shouldDownloadVideos?: boolean | undefined; videoUrls?: string[] | undefined; }, { operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; credentials?: Partial<Record<CredentialType, string>> | undefined; limit?: number | undefined; hashtags?: string[] | undefined; profiles?: string[] | undefined; shouldDownloadVideos?: boolean | undefined; videoUrls?: string[] | undefined; }>; declare const TikTokToolResultSchema: z.ZodObject<{ operation: z.ZodEnum<["scrapeProfile", "scrapeHashtag", "scrapeVideo"]>; videos: z.ZodArray<z.ZodObject<{ id: z.ZodNullable<z.ZodString>; text: z.ZodNullable<z.ZodString>; createTime: z.ZodNullable<z.ZodNumber>; createTimeISO: z.ZodNullable<z.ZodString>; author: z.ZodNullable<z.ZodObject<{ id: z.ZodNullable<z.ZodString>; uniqueId: z.ZodNullable<z.ZodString>; nickname: z.ZodNullable<z.ZodString>; avatarThumb: z.ZodNullable<z.ZodString>; signature: z.ZodNullable<z.ZodString>; verified: z.ZodNullable<z.ZodBoolean>; followerCount: z.ZodNullable<z.ZodNumber>; followingCount: z.ZodNullable<z.ZodNumber>; videoCount: z.ZodNullable<z.ZodNumber>; heartCount: z.ZodNullable<z.ZodNumber>; }, "strip", z.ZodTypeAny, { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; }, { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; }>>; stats: z.ZodNullable<z.ZodObject<{ diggCount: z.ZodNullable<z.ZodNumber>; shareCount: z.ZodNullable<z.ZodNumber>; commentCount: z.ZodNullable<z.ZodNumber>; playCount: z.ZodNullable<z.ZodNumber>; collectCount: z.ZodNullable<z.ZodNumber>; }, "strip", z.ZodTypeAny, { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; }, { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; }>>; videoUrl: z.ZodNullable<z.ZodString>; webVideoUrl: z.ZodNullable<z.ZodString>; covers: z.ZodNullable<z.ZodArray<z.ZodString, "many">>; hashtags: z.ZodNullable<z.ZodArray<z.ZodObject<{ name: z.ZodNullable<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string | null; }, { name: string | null; }>, "many">>; }, "strip", z.ZodTypeAny, { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }, { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }>, "many">; totalVideos: z.ZodNumber; success: z.ZodBoolean; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; videos: { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }[]; totalVideos: number; }, { error: string; success: boolean; operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; videos: { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }[]; totalVideos: number; }>; type TikTokToolParams = z.output<typeof TikTokToolParamsSchema>; type TikTokToolResult = z.output<typeof TikTokToolResultSchema>; type TikTokToolParamsInput = z.input<typeof TikTokToolParamsSchema>;; export declare class TikTokTool extends ToolBubble<TikTokToolParams, TikTokToolResult> { static readonly bubbleName: BubbleName; static readonly schema: z.ZodObject<{ operation: z.ZodEnum<["scrapeProfile", "scrapeHashtag", "scrapeVideo"]>; profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; hashtags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; videoUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>; shouldDownloadVideos: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; credentials?: Partial<Record<CredentialType, string>> | undefined; limit?: number | undefined; hashtags?: string[] | undefined; profiles?: string[] | undefined; shouldDownloadVideos?: boolean | undefined; videoUrls?: string[] | undefined; }, { operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; credentials?: Partial<Record<CredentialType, string>> | undefined; limit?: number | undefined; hashtags?: string[] | undefined; profiles?: string[] | undefined; shouldDownloadVideos?: boolean | undefined; videoUrls?: string[] | undefined; }>; static readonly resultSchema: z.ZodObject<{ operation: z.ZodEnum<["scrapeProfile", "scrapeHashtag", "scrapeVideo"]>; videos: z.ZodArray<z.ZodObject<{ id: z.ZodNullable<z.ZodString>; text: z.ZodNullable<z.ZodString>; createTime: z.ZodNullable<z.ZodNumber>; createTimeISO: z.ZodNullable<z.ZodString>; author: z.ZodNullable<z.ZodObject<{ id: z.ZodNullable<z.ZodString>; uniqueId: z.ZodNullable<z.ZodString>; nickname: z.ZodNullable<z.ZodString>; avatarThumb: z.ZodNullable<z.ZodString>; signature: z.ZodNullable<z.ZodString>; verified: z.ZodNullable<z.ZodBoolean>; followerCount: z.ZodNullable<z.ZodNumber>; followingCount: z.ZodNullable<z.ZodNumber>; videoCount: z.ZodNullable<z.ZodNumber>; heartCount: z.ZodNullable<z.ZodNumber>; }, "strip", z.ZodTypeAny, { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; }, { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; }>>; stats: z.ZodNullable<z.ZodObject<{ diggCount: z.ZodNullable<z.ZodNumber>; shareCount: z.ZodNullable<z.ZodNumber>; commentCount: z.ZodNullable<z.ZodNumber>; playCount: z.ZodNullable<z.ZodNumber>; collectCount: z.ZodNullable<z.ZodNumber>; }, "strip", z.ZodTypeAny, { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; }, { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; }>>; videoUrl: z.ZodNullable<z.ZodString>; webVideoUrl: z.ZodNullable<z.ZodString>; covers: z.ZodNullable<z.ZodArray<z.ZodString, "many">>; hashtags: z.ZodNullable<z.ZodArray<z.ZodObject<{ name: z.ZodNullable<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string | null; }, { name: string | null; }>, "many">>; }, "strip", z.ZodTypeAny, { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }, { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }>, "many">; totalVideos: z.ZodNumber; success: z.ZodBoolean; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; videos: { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }[]; totalVideos: number; }, { error: string; success: boolean; operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; videos: { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; verified: boolean | null; signature: string | null; uniqueId: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }[]; totalVideos: number; }>; static readonly shortDescription = "Scrape TikTok profiles, videos, and hashtags."; static readonly longDescription = "\n Universal TikTok scraping tool.\n \n Operations:\n - scrapeProfile: Get videos from user profiles\n - scrapeHashtag: Get videos by hashtag\n - scrapeVideo: Get details for specific videos\n \n Uses Apify's clockworks/tiktok-scraper.\n "; static readonly alias = "tiktok"; static readonly type = "tool"; constructor(params?: TikTokToolParamsInput, context?: BubbleContext); performAction(): Promise<TikTokToolResult>; private createErrorResult; private runScraper; private transformVideos; }
630
+ export type ServiceBubbleParams<T = unknown> = T & { credentials?: CredentialOptions; retries?: number; }; declare const TikTokToolParamsSchema: z.ZodObject<{ operation: z.ZodEnum<["scrapeProfile", "scrapeHashtag", "scrapeVideo"]>; profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; hashtags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; videoUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>; shouldDownloadVideos: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; credentials?: Partial<Record<CredentialType, string>> | undefined; limit?: number | undefined; hashtags?: string[] | undefined; profiles?: string[] | undefined; shouldDownloadVideos?: boolean | undefined; videoUrls?: string[] | undefined; }, { operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; credentials?: Partial<Record<CredentialType, string>> | undefined; limit?: number | undefined; hashtags?: string[] | undefined; profiles?: string[] | undefined; shouldDownloadVideos?: boolean | undefined; videoUrls?: string[] | undefined; }>; declare const TikTokToolResultSchema: z.ZodObject<{ operation: z.ZodEnum<["scrapeProfile", "scrapeHashtag", "scrapeVideo"]>; videos: z.ZodArray<z.ZodObject<{ id: z.ZodNullable<z.ZodString>; text: z.ZodNullable<z.ZodString>; createTime: z.ZodNullable<z.ZodNumber>; createTimeISO: z.ZodNullable<z.ZodString>; author: z.ZodNullable<z.ZodObject<{ id: z.ZodNullable<z.ZodString>; uniqueId: z.ZodNullable<z.ZodString>; nickname: z.ZodNullable<z.ZodString>; avatarThumb: z.ZodNullable<z.ZodString>; signature: z.ZodNullable<z.ZodString>; verified: z.ZodNullable<z.ZodBoolean>; followerCount: z.ZodNullable<z.ZodNumber>; followingCount: z.ZodNullable<z.ZodNumber>; videoCount: z.ZodNullable<z.ZodNumber>; heartCount: z.ZodNullable<z.ZodNumber>; }, "strip", z.ZodTypeAny, { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; }, { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; }>>; stats: z.ZodNullable<z.ZodObject<{ diggCount: z.ZodNullable<z.ZodNumber>; shareCount: z.ZodNullable<z.ZodNumber>; commentCount: z.ZodNullable<z.ZodNumber>; playCount: z.ZodNullable<z.ZodNumber>; collectCount: z.ZodNullable<z.ZodNumber>; }, "strip", z.ZodTypeAny, { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; }, { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; }>>; videoUrl: z.ZodNullable<z.ZodString>; webVideoUrl: z.ZodNullable<z.ZodString>; covers: z.ZodNullable<z.ZodArray<z.ZodString, "many">>; hashtags: z.ZodNullable<z.ZodArray<z.ZodObject<{ name: z.ZodNullable<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string | null; }, { name: string | null; }>, "many">>; }, "strip", z.ZodTypeAny, { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }, { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }>, "many">; totalVideos: z.ZodNumber; success: z.ZodBoolean; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; videos: { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }[]; totalVideos: number; }, { error: string; success: boolean; operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; videos: { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }[]; totalVideos: number; }>; type TikTokToolParams = z.output<typeof TikTokToolParamsSchema>; type TikTokToolResult = z.output<typeof TikTokToolResultSchema>; type TikTokToolParamsInput = z.input<typeof TikTokToolParamsSchema>;; export declare class TikTokTool extends ToolBubble<TikTokToolParams, TikTokToolResult> { static readonly bubbleName: BubbleName; static readonly schema: z.ZodObject<{ operation: z.ZodEnum<["scrapeProfile", "scrapeHashtag", "scrapeVideo"]>; profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; hashtags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; videoUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>; shouldDownloadVideos: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; credentials?: Partial<Record<CredentialType, string>> | undefined; limit?: number | undefined; hashtags?: string[] | undefined; profiles?: string[] | undefined; shouldDownloadVideos?: boolean | undefined; videoUrls?: string[] | undefined; }, { operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; credentials?: Partial<Record<CredentialType, string>> | undefined; limit?: number | undefined; hashtags?: string[] | undefined; profiles?: string[] | undefined; shouldDownloadVideos?: boolean | undefined; videoUrls?: string[] | undefined; }>; static readonly resultSchema: z.ZodObject<{ operation: z.ZodEnum<["scrapeProfile", "scrapeHashtag", "scrapeVideo"]>; videos: z.ZodArray<z.ZodObject<{ id: z.ZodNullable<z.ZodString>; text: z.ZodNullable<z.ZodString>; createTime: z.ZodNullable<z.ZodNumber>; createTimeISO: z.ZodNullable<z.ZodString>; author: z.ZodNullable<z.ZodObject<{ id: z.ZodNullable<z.ZodString>; uniqueId: z.ZodNullable<z.ZodString>; nickname: z.ZodNullable<z.ZodString>; avatarThumb: z.ZodNullable<z.ZodString>; signature: z.ZodNullable<z.ZodString>; verified: z.ZodNullable<z.ZodBoolean>; followerCount: z.ZodNullable<z.ZodNumber>; followingCount: z.ZodNullable<z.ZodNumber>; videoCount: z.ZodNullable<z.ZodNumber>; heartCount: z.ZodNullable<z.ZodNumber>; }, "strip", z.ZodTypeAny, { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; }, { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; }>>; stats: z.ZodNullable<z.ZodObject<{ diggCount: z.ZodNullable<z.ZodNumber>; shareCount: z.ZodNullable<z.ZodNumber>; commentCount: z.ZodNullable<z.ZodNumber>; playCount: z.ZodNullable<z.ZodNumber>; collectCount: z.ZodNullable<z.ZodNumber>; }, "strip", z.ZodTypeAny, { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; }, { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; }>>; videoUrl: z.ZodNullable<z.ZodString>; webVideoUrl: z.ZodNullable<z.ZodString>; covers: z.ZodNullable<z.ZodArray<z.ZodString, "many">>; hashtags: z.ZodNullable<z.ZodArray<z.ZodObject<{ name: z.ZodNullable<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string | null; }, { name: string | null; }>, "many">>; }, "strip", z.ZodTypeAny, { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }, { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }>, "many">; totalVideos: z.ZodNumber; success: z.ZodBoolean; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; videos: { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }[]; totalVideos: number; }, { error: string; success: boolean; operation: "scrapeProfile" | "scrapeHashtag" | "scrapeVideo"; videos: { stats: { collectCount: number | null; commentCount: number | null; diggCount: number | null; playCount: number | null; shareCount: number | null; } | null; text: string | null; id: string | null; hashtags: { name: string | null; }[] | null; videoUrl: string | null; author: { id: string | null; uniqueId: string | null; verified: boolean | null; signature: string | null; nickname: string | null; avatarThumb: string | null; followerCount: number | null; followingCount: number | null; videoCount: number | null; heartCount: number | null; } | null; createTime: number | null; createTimeISO: string | null; webVideoUrl: string | null; covers: string[] | null; }[]; totalVideos: number; }>; static readonly shortDescription = "Scrape TikTok profiles, videos, and hashtags."; static readonly longDescription = "\n Universal TikTok scraping tool.\n \n Operations:\n - scrapeProfile: Get videos from user profiles\n - scrapeHashtag: Get videos by hashtag\n - scrapeVideo: Get details for specific videos\n \n Uses Apify's clockworks/tiktok-scraper.\n "; static readonly alias = "tiktok"; static readonly type = "tool"; constructor(params?: TikTokToolParamsInput, context?: BubbleContext); performAction(): Promise<TikTokToolResult>; private createErrorResult; private runScraper; private transformVideos; }
631
631
  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>; }
632
632
  export interface LangGraphTool { name: string; description: string; schema: z.ZodSchema; func<TResult extends BubbleOperationResult = BubbleOperationResult>(params: unknown): Promise<BubbleResult<TResult>>; }
633
633
  export declare abstract class ToolBubble<TParams extends ServiceBubbleParams = ServiceBubbleParams, TResult extends BubbleOperationResult = BubbleOperationResult> extends BaseBubble<TParams, TResult> implements IToolBubble<TResult> { readonly type: "tool"; constructor(params: unknown, context?: BubbleContext, instanceId?: string); static toolAgent(credentials?: Partial<Record<CredentialType, string>>, config?: Record<string, unknown>, context?: BubbleContext): LangGraphTool; }