import { type AnyColumn } from "fumadb/schema";
import type { FumaRow } from "./fuma-runtime";
type UserColumns = Record<string, AnyColumn>;
export declare const textColumn: (name: string) => import("fumadb/schema").Column<"string", string, string>;
export declare const nullableTextColumn: (name: string) => import("fumadb/schema").Column<"string", string | null, string | null>;
export declare const boolColumn: (name: string, defaultValue: boolean) => import("fumadb/schema").Column<"bool", boolean | null, boolean>;
export declare const bigintColumn: (name: string) => import("fumadb/schema").Column<"bigint", bigint, bigint>;
export declare const nullableBigintColumn: (name: string) => import("fumadb/schema").Column<"bigint", bigint | null, bigint | null>;
export declare const jsonColumn: (name: string) => import("fumadb/schema").Column<"json", unknown, unknown>;
export declare const nullableJsonColumn: (name: string) => import("fumadb/schema").Column<"json", unknown, unknown>;
export declare const dateColumn: (name: string) => import("fumadb/schema").Column<"timestamp", Date, Date>;
export declare const scopedExecutorTable: <const TColumns extends UserColumns>(name: string, columns: TColumns) => import("fumadb/schema").Table<TColumns & {
    row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
    id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
}, {}>;
export declare const credentialBindingKinds: readonly ["text", "secret", "connection"];
export declare const coreTables: {
    readonly source: import("fumadb/schema").Table<{
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly kind: import("fumadb/schema").Column<"string", string, string>;
        readonly name: import("fumadb/schema").Column<"string", string, string>;
        readonly url: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly can_remove: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
        readonly can_refresh: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
        readonly can_edit: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly tool: import("fumadb/schema").Table<{
        readonly source_id: import("fumadb/schema").Column<"string", string, string>;
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly name: import("fumadb/schema").Column<"string", string, string>;
        readonly description: import("fumadb/schema").Column<"string", string, string>;
        readonly input_schema: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly output_schema: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly definition: import("fumadb/schema").Table<{
        readonly source_id: import("fumadb/schema").Column<"string", string, string>;
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly name: import("fumadb/schema").Column<"string", string, string>;
        readonly schema: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly secret: import("fumadb/schema").Table<{
        readonly name: import("fumadb/schema").Column<"string", string, string>;
        readonly provider: import("fumadb/schema").Column<"string", string, string>;
        readonly owned_by_connection_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly connection: import("fumadb/schema").Table<{
        readonly provider: import("fumadb/schema").Column<"string", string, string>;
        readonly identity_label: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly access_token_secret_id: import("fumadb/schema").Column<"string", string, string>;
        readonly refresh_token_secret_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly expires_at: import("fumadb/schema").Column<"bigint", bigint | null, bigint | null>;
        readonly scope: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly provider_state: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly oauth2_session: import("fumadb/schema").Table<{
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly strategy: import("fumadb/schema").Column<"string", string, string>;
        readonly connection_id: import("fumadb/schema").Column<"string", string, string>;
        readonly token_scope: import("fumadb/schema").Column<"string", string, string>;
        readonly redirect_url: import("fumadb/schema").Column<"string", string, string>;
        readonly payload: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly expires_at: import("fumadb/schema").Column<"bigint", bigint, bigint>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly credential_binding: import("fumadb/schema").Table<{
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly source_id: import("fumadb/schema").Column<"string", string, string>;
        readonly source_scope_id: import("fumadb/schema").Column<"string", string, string>;
        readonly slot_key: import("fumadb/schema").Column<"string", string, string>;
        readonly kind: import("fumadb/schema").Column<"string", string, string>;
        readonly text_value: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly secret_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly secret_scope_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly connection_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly plugin_storage: import("fumadb/schema").Table<{
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly collection: import("fumadb/schema").Column<"string", string, string>;
        readonly key: import("fumadb/schema").Column<"string", string, string>;
        readonly data: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly tool_policy: import("fumadb/schema").Table<{
        readonly pattern: import("fumadb/schema").Column<"string", string, string>;
        readonly action: import("fumadb/schema").Column<"string", string, string>;
        readonly position: import("fumadb/schema").Column<"string", string, string>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly blob: import("fumadb/schema").Table<{
        readonly namespace: import("fumadb/schema").Column<"string", string, string>;
        readonly key: import("fumadb/schema").Column<"string", string, string>;
        readonly value: import("fumadb/schema").Column<"string", string, string>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
};
export declare const coreSchema: {
    readonly source: import("fumadb/schema").Table<{
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly kind: import("fumadb/schema").Column<"string", string, string>;
        readonly name: import("fumadb/schema").Column<"string", string, string>;
        readonly url: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly can_remove: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
        readonly can_refresh: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
        readonly can_edit: import("fumadb/schema").Column<"bool", boolean | null, boolean>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly tool: import("fumadb/schema").Table<{
        readonly source_id: import("fumadb/schema").Column<"string", string, string>;
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly name: import("fumadb/schema").Column<"string", string, string>;
        readonly description: import("fumadb/schema").Column<"string", string, string>;
        readonly input_schema: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly output_schema: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly definition: import("fumadb/schema").Table<{
        readonly source_id: import("fumadb/schema").Column<"string", string, string>;
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly name: import("fumadb/schema").Column<"string", string, string>;
        readonly schema: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly secret: import("fumadb/schema").Table<{
        readonly name: import("fumadb/schema").Column<"string", string, string>;
        readonly provider: import("fumadb/schema").Column<"string", string, string>;
        readonly owned_by_connection_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly connection: import("fumadb/schema").Table<{
        readonly provider: import("fumadb/schema").Column<"string", string, string>;
        readonly identity_label: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly access_token_secret_id: import("fumadb/schema").Column<"string", string, string>;
        readonly refresh_token_secret_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly expires_at: import("fumadb/schema").Column<"bigint", bigint | null, bigint | null>;
        readonly scope: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly provider_state: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly oauth2_session: import("fumadb/schema").Table<{
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly strategy: import("fumadb/schema").Column<"string", string, string>;
        readonly connection_id: import("fumadb/schema").Column<"string", string, string>;
        readonly token_scope: import("fumadb/schema").Column<"string", string, string>;
        readonly redirect_url: import("fumadb/schema").Column<"string", string, string>;
        readonly payload: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly expires_at: import("fumadb/schema").Column<"bigint", bigint, bigint>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly credential_binding: import("fumadb/schema").Table<{
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly source_id: import("fumadb/schema").Column<"string", string, string>;
        readonly source_scope_id: import("fumadb/schema").Column<"string", string, string>;
        readonly slot_key: import("fumadb/schema").Column<"string", string, string>;
        readonly kind: import("fumadb/schema").Column<"string", string, string>;
        readonly text_value: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly secret_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly secret_scope_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly connection_id: import("fumadb/schema").Column<"string", string | null, string | null>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly plugin_storage: import("fumadb/schema").Table<{
        readonly plugin_id: import("fumadb/schema").Column<"string", string, string>;
        readonly collection: import("fumadb/schema").Column<"string", string, string>;
        readonly key: import("fumadb/schema").Column<"string", string, string>;
        readonly data: import("fumadb/schema").Column<"json", unknown, unknown>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly tool_policy: import("fumadb/schema").Table<{
        readonly pattern: import("fumadb/schema").Column<"string", string, string>;
        readonly action: import("fumadb/schema").Column<"string", string, string>;
        readonly position: import("fumadb/schema").Column<"string", string, string>;
        readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
        readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
        scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
    readonly blob: import("fumadb/schema").Table<{
        readonly namespace: import("fumadb/schema").Column<"string", string, string>;
        readonly key: import("fumadb/schema").Column<"string", string, string>;
        readonly value: import("fumadb/schema").Column<"string", string, string>;
    } & {
        row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>;
        id: import("fumadb/schema").Column<"varchar(255)", string, string>;
    }, {}>;
};
export type CoreSchema = typeof coreTables;
export type SourceRow = FumaRow<CoreSchema["source"]>;
export type ToolRow = FumaRow<CoreSchema["tool"]>;
export type DefinitionRow = FumaRow<CoreSchema["definition"]>;
export type SecretRow = FumaRow<CoreSchema["secret"]>;
export type ConnectionRow = FumaRow<CoreSchema["connection"]>;
export type PluginStorageRow = FumaRow<CoreSchema["plugin_storage"]>;
type CredentialBindingRowBase = Omit<FumaRow<CoreSchema["credential_binding"]>, "kind" | "text_value" | "secret_id" | "secret_scope_id" | "connection_id">;
export type CredentialBindingRow = CredentialBindingRowBase & ({
    kind: "text";
    text_value: string;
} | {
    kind: "secret";
    secret_id: string;
    secret_scope_id?: string | null;
} | {
    kind: "connection";
    connection_id: string;
}) & Record<string, unknown>;
export type ToolPolicyRow = FumaRow<CoreSchema["tool_policy"]>;
export type ToolPolicyAction = "approve" | "require_approval" | "block";
export declare const TOOL_POLICY_ACTIONS: readonly ["approve", "require_approval", "block"];
export declare const isToolPolicyAction: (value: unknown) => value is ToolPolicyAction;
export interface ToolAnnotations {
    readonly requiresApproval?: boolean;
    readonly approvalDescription?: string;
    readonly mayElicit?: boolean;
}
export interface SourceInputTool {
    readonly name: string;
    readonly description: string;
    readonly inputSchema?: unknown;
    readonly outputSchema?: unknown;
}
export interface SourceInput {
    readonly id: string;
    readonly scope: string;
    readonly kind: string;
    readonly name: string;
    readonly url?: string;
    readonly canRemove?: boolean;
    readonly canRefresh?: boolean;
    readonly canEdit?: boolean;
    readonly tools: readonly SourceInputTool[];
}
export interface DefinitionsInput {
    readonly sourceId: string;
    readonly scope: string;
    readonly definitions: Record<string, unknown>;
}
export {};
//# sourceMappingURL=core-schema.d.ts.map