import { z } from 'zod'; import { ToolBubble } from '../../types/tool-bubble-class.js'; import type { BubbleContext } from '../../types/bubble.js'; import { CredentialType } from '@bubblelab/shared-schemas'; declare const SQLQueryToolParamsSchema: z.ZodObject<{ query: z.ZodString; reasoning: z.ZodString; credentials: z.ZodOptional, z.ZodString>>; config: z.ZodOptional>; }, "strip", z.ZodTypeAny, { reasoning: string; query: string; credentials?: Partial> | undefined; config?: Record | undefined; }, { reasoning: string; query: string; credentials?: Partial> | undefined; config?: Record | undefined; }>; type SQLQueryToolParamsInput = z.input; type SQLQueryToolParams = z.output; type SQLQueryToolResult = z.output; declare const SQLQueryToolResultSchema: z.ZodObject<{ rows: z.ZodOptional, "many">>; rowCount: z.ZodNumber; executionTime: z.ZodNumber; fields: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; dataTypeID?: number | undefined; }, { name: string; dataTypeID?: number | undefined; }>, "many">>; success: z.ZodBoolean; error: z.ZodString; }, "strip", z.ZodTypeAny, { executionTime: number; error: string; success: boolean; rowCount: number; rows?: Record[] | undefined; fields?: { name: string; dataTypeID?: number | undefined; }[] | undefined; }, { executionTime: number; error: string; success: boolean; rowCount: number; rows?: Record[] | undefined; fields?: { name: string; dataTypeID?: number | undefined; }[] | undefined; }>; /** * SQLQueryTool - Execute SQL queries against PostgreSQL databases * * This tool bubble provides a safe, read-only interface for AI agents to query * PostgreSQL databases. It's designed for data analysis, exploration, and * business intelligence tasks. */ export declare class SQLQueryTool extends ToolBubble { static readonly type: "tool"; static readonly bubbleName = "sql-query-tool"; static readonly schema: z.ZodObject<{ query: z.ZodString; reasoning: z.ZodString; credentials: z.ZodOptional, z.ZodString>>; config: z.ZodOptional>; }, "strip", z.ZodTypeAny, { reasoning: string; query: string; credentials?: Partial> | undefined; config?: Record | undefined; }, { reasoning: string; query: string; credentials?: Partial> | undefined; config?: Record | undefined; }>; static readonly resultSchema: z.ZodObject<{ rows: z.ZodOptional, "many">>; rowCount: z.ZodNumber; executionTime: z.ZodNumber; fields: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; dataTypeID?: number | undefined; }, { name: string; dataTypeID?: number | undefined; }>, "many">>; success: z.ZodBoolean; error: z.ZodString; }, "strip", z.ZodTypeAny, { executionTime: number; error: string; success: boolean; rowCount: number; rows?: Record[] | undefined; fields?: { name: string; dataTypeID?: number | undefined; }[] | undefined; }, { executionTime: number; error: string; success: boolean; rowCount: number; rows?: Record[] | undefined; fields?: { name: string; dataTypeID?: number | undefined; }[] | undefined; }>; static readonly shortDescription = "Execute read-only SQL queries against PostgreSQL databases for data analysis"; static readonly longDescription = "\n A tool bubble that provides safe, read-only SQL query execution against PostgreSQL databases.\n \n Features:\n - Execute SELECT, WITH, EXPLAIN, ANALYZE, SHOW, and DESCRIBE queries\n - Automatic query timeout and row limit enforcement (30s timeout, 1000 rows max)\n - Clean JSON formatting of results for AI consumption\n - Detailed execution metadata including timing and row counts\n \n Security:\n - Read-only operations enforced\n - Query timeout protection (30 seconds)\n - Row limit protection (1000 rows max)\n \n Use cases:\n - AI agents performing iterative database exploration\n - Data analysis and business intelligence queries\n - Schema discovery and table introspection\n - Performance analysis with EXPLAIN queries\n - Automated reporting and data extraction\n "; static readonly alias = "sql"; constructor(params: SQLQueryToolParamsInput, context?: BubbleContext); performAction(context?: BubbleContext): Promise; } export {}; //# sourceMappingURL=sql-query-tool.d.ts.map