@ragable/sdk 0.6.14 → 0.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -927,6 +927,48 @@ interface BrowserSqlQueryResult<Row extends Record<string, unknown> = Record<str
927
927
  truncated: boolean;
928
928
  rows: Row[];
929
929
  }
930
+ interface BrowserCollectionRecord<Row extends Record<string, unknown> = Record<string, unknown>> {
931
+ id: string;
932
+ data: Row;
933
+ createdAt: string;
934
+ updatedAt: string;
935
+ }
936
+ interface BrowserCollectionDefinition {
937
+ id: string;
938
+ name: string;
939
+ schema: Record<string, unknown> | null;
940
+ createdAt: string;
941
+ updatedAt: string;
942
+ }
943
+ interface BrowserCollectionFindParams {
944
+ where?: Record<string, unknown>;
945
+ filters?: Array<{
946
+ field: string;
947
+ op?: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains";
948
+ value: unknown;
949
+ }>;
950
+ limit?: number;
951
+ offset?: number;
952
+ orderBy?: string;
953
+ orderDirection?: "asc" | "desc";
954
+ }
955
+ declare class BrowserCollectionApi<Row extends Record<string, unknown> = Record<string, unknown>> {
956
+ private readonly database;
957
+ private readonly name;
958
+ private readonly databaseInstanceId?;
959
+ constructor(database: RagableBrowserDatabaseClient<any>, name: string, databaseInstanceId?: string | undefined);
960
+ find: (whereOrParams?: Record<string, unknown> | BrowserCollectionFindParams) => Promise<PostgrestResult<BrowserCollectionRecord<Row>[]>>;
961
+ insert: (data: Row) => Promise<PostgrestResult<BrowserCollectionRecord<Row>>>;
962
+ update: (where: Record<string, unknown>, patch: Partial<Row>, options?: {
963
+ limit?: number;
964
+ }) => Promise<PostgrestResult<BrowserCollectionRecord<Row>[]>>;
965
+ delete: (where: Record<string, unknown>, options?: {
966
+ limit?: number;
967
+ }) => Promise<PostgrestResult<{
968
+ deleted: number;
969
+ records: BrowserCollectionRecord<Row>[];
970
+ }>>;
971
+ }
930
972
  declare class RagableBrowserDatabaseClient<Database extends RagableDatabase = DefaultRagableDatabase> {
931
973
  private readonly options;
932
974
  private readonly ragableAuth;
@@ -941,32 +983,96 @@ declare class RagableBrowserDatabaseClient<Database extends RagableDatabase = De
941
983
  */
942
984
  from: <TableName extends RagableTableNames<Database>>(table: TableName, databaseInstanceId?: string) => PostgrestTableApi<Database, TableName>;
943
985
  private toUrl;
986
+ collection: <Row extends Record<string, unknown> = Record<string, unknown>>(name: string, databaseInstanceId?: string) => BrowserCollectionApi<Row>;
987
+ defineCollection: (name: string, schema?: Record<string, unknown>, databaseInstanceId?: string) => Promise<PostgrestResult<BrowserCollectionDefinition>>;
988
+ listCollections: (databaseInstanceId?: string) => Promise<PostgrestResult<BrowserCollectionDefinition[]>>;
989
+ _requestCollection<T>(method: "GET" | "POST" | "PATCH" | "DELETE", path: string, body?: unknown, databaseInstanceId?: string): Promise<T>;
944
990
  query: <Row extends Record<string, unknown> = Record<string, unknown>>(params: BrowserSqlQueryParams) => Promise<PostgrestResult<BrowserSqlQueryResult<Row>>>;
945
991
  private baseHeaders;
946
992
  /**
947
993
  * Postgres `LISTEN` / `NOTIFY` realtime via server-proxied SSE.
948
994
  * Channels must be lowercase identifiers: `[a-z_][a-z0-9_]*` (max 63 chars).
949
995
  */
996
+ /**
997
+ * Postgres `LISTEN` / `NOTIFY` realtime via server-proxied SSE.
998
+ *
999
+ * Returns a `BrowserRealtimeSubscription` with:
1000
+ * - `unsubscribe()` — permanently close the subscription (stops reconnects).
1001
+ * - `status` — current connection state: `"connecting"` | `"connected"` | `"reconnecting"` | `"disconnected"`.
1002
+ *
1003
+ * The subscription automatically reconnects with exponential backoff when the
1004
+ * stream drops. Server heartbeats (every 15 s) are monitored — if none arrive
1005
+ * within `heartbeatTimeoutMs` (default 45 s), the connection is treated as dead
1006
+ * and a reconnect is triggered. Auth errors (401/403/404) are non-retryable.
1007
+ *
1008
+ * Channel names must be lowercase identifiers: `[a-z_][a-z0-9_]*` (max 63 chars).
1009
+ */
950
1010
  realtime: {
951
- subscribe: (params: BrowserRealtimeSubscribeParams) => Promise<{
952
- unsubscribe: () => void;
953
- }>;
1011
+ subscribe: (params: BrowserRealtimeSubscribeParams) => Promise<BrowserRealtimeSubscription>;
954
1012
  };
955
1013
  }
1014
+ /**
1015
+ * A single NOTIFY message received from a Postgres channel.
1016
+ *
1017
+ * - `channel` — the lowercase channel name that fired.
1018
+ * - `payload` — the text payload (may be null if NOTIFY was sent without one).
1019
+ * - `processId` — the PID of the Postgres backend that called NOTIFY.
1020
+ */
956
1021
  interface BrowserRealtimeNotification {
957
1022
  channel: string;
958
1023
  payload: string | null;
959
1024
  processId: number;
960
1025
  }
1026
+ /**
1027
+ * Connection status of a realtime subscription.
1028
+ *
1029
+ * - `"connecting"` — establishing or re-establishing the SSE stream.
1030
+ * - `"connected"` — stream is open, heartbeats are arriving, NOTIFY events are flowing.
1031
+ * - `"reconnecting"` — the stream dropped and the SDK is waiting before the next retry.
1032
+ * - `"disconnected"` — permanently stopped (via `unsubscribe()`, `signal` abort, or max retries exceeded).
1033
+ */
1034
+ type BrowserRealtimeStatus = "connecting" | "connected" | "reconnecting" | "disconnected";
961
1035
  interface BrowserRealtimeSubscribeParams {
962
1036
  databaseInstanceId?: string;
963
1037
  /** Channel names (normalized to lowercase on the server). */
964
1038
  channels: string[];
965
- /** When aborted, the subscription stops (in addition to `unsubscribe()`). */
1039
+ /** When aborted, the subscription stops permanently (equivalent to calling `unsubscribe()`). */
966
1040
  signal?: AbortSignal;
1041
+ /** Called each time a Postgres NOTIFY message arrives. */
967
1042
  onNotify?: (msg: BrowserRealtimeNotification) => void;
1043
+ /** Called once per connection attempt when the server confirms LISTEN is active. */
968
1044
  onReady?: (channels: string[]) => void;
1045
+ /** Called when the stream encounters a non-retryable error or the server sends an error event. */
969
1046
  onError?: (message: string) => void;
1047
+ /** Called whenever the connection status changes (connecting → connected → reconnecting → …). */
1048
+ onStatusChange?: (status: BrowserRealtimeStatus) => void;
1049
+ /** Called when the stream drops and the SDK will attempt to reconnect. `attempt` is 1-indexed. */
1050
+ onDisconnect?: (info: {
1051
+ attempt: number;
1052
+ retryInMs: number;
1053
+ }) => void;
1054
+ /** Called when a reconnect attempt succeeds (stream is open again). */
1055
+ onReconnect?: (info: {
1056
+ attempt: number;
1057
+ }) => void;
1058
+ /** Maximum number of reconnect attempts before giving up. Set `0` to disable reconnect. Default: **Infinity** (never stops). */
1059
+ maxReconnectAttempts?: number;
1060
+ /** Base delay for exponential backoff (ms). Default: **1000**. */
1061
+ reconnectBaseDelayMs?: number;
1062
+ /** Maximum delay between reconnect attempts (ms). Default: **30000**. */
1063
+ reconnectMaxDelayMs?: number;
1064
+ /** How long to wait without a heartbeat before considering the connection dead (ms). Default: **45000** (3× the server's 15 s heartbeat interval). */
1065
+ heartbeatTimeoutMs?: number;
1066
+ }
1067
+ /**
1068
+ * Handle returned by `database.realtime.subscribe()`.
1069
+ *
1070
+ * - Call `unsubscribe()` to permanently close the subscription (no more reconnects).
1071
+ * - Read `status` to check the current connection state at any time.
1072
+ */
1073
+ interface BrowserRealtimeSubscription {
1074
+ unsubscribe: () => void;
1075
+ readonly status: BrowserRealtimeStatus;
970
1076
  }
971
1077
  declare class RagableBrowserAgentsClient {
972
1078
  private readonly options;
@@ -983,6 +1089,7 @@ declare class RagableBrowser<Database extends RagableDatabase = DefaultRagableDa
983
1089
  readonly agents: RagableBrowserAgentsClient;
984
1090
  readonly auth: RagableBrowserAuthClient<AuthUser>;
985
1091
  readonly database: RagableBrowserDatabaseClient<Database>;
1092
+ readonly db: RagableBrowserDatabaseClient<Database>;
986
1093
  readonly transport: Transport;
987
1094
  private readonly _ragableAuth;
988
1095
  constructor(options: RagableBrowserClientOptions);
@@ -1068,4 +1175,4 @@ declare function createClient(options: RagableClientOptions): Ragable;
1068
1175
  declare function createClient<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends Record<string, unknown> = Record<string, unknown>>(options: RagableBrowserClientOptions): RagableBrowser<Database, AuthUser>;
1069
1176
  declare function createRagableServerClient(options: RagableClientOptions): Ragable;
1070
1177
 
1071
- export { type AgentChatMessage, type AgentChatParams, type AgentChatResult, type AgentPublicChatParams, type AgentStreamEvent, type AgentSummary, AgentsClient, AuthBroadcastChannel, type AuthBroadcastMessage, type AuthChangeEvent, type AuthOptions, type AuthSession, type BrowserAuthSession, type BrowserAuthTokens, type BrowserDataAuthMode, type BrowserRealtimeNotification, type BrowserRealtimeSubscribeParams, type BrowserSqlExecParams, type BrowserSqlExecResult, type BrowserSqlQueryParams, type BrowserSqlQueryResult, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultRagableDatabase, type FormatContextOptions, type HttpMethod, type Json, LocalStorageAdapter, MemoryStorageAdapter, type PostgRESTFetch, type PostgRESTFetchParams, PostgrestDeleteReturningBuilder, PostgrestDeleteRootBuilder, PostgrestInsertReturningBuilder, PostgrestInsertRootBuilder, PostgrestInsertSdkErrorReturning, PostgrestInsertSdkErrorRoot, type PostgrestResult, PostgrestSelectBuilder, PostgrestTableApi, PostgrestUpdateReturningBuilder, PostgrestUpdateRootBuilder, type PostgrestUpsertOptions, PostgrestUpsertReturningBuilder, PostgrestUpsertRootBuilder, type RagClientForPipeline, type RagPipeline, type RagPipelineOptions, Ragable, RagableAbortError, RagableAuth, type RagableAuthConfig, RagableBrowser, RagableBrowserAgentsClient, RagableBrowserAuthClient, type RagableBrowserClientOptions, RagableBrowserDatabaseClient, type RagableClientOptions, type RagableDatabase, RagableError, RagableNetworkError, RagableRequestClient, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetrieveParams, type RetryOptions, type RunQuery, type SessionStorage, SessionStorageAdapter, type ShiftAddDocumentParams, ShiftClient, type ShiftCreateIndexParams, type ShiftEntry, type ShiftIndex, type ShiftIngestResponse, type ShiftListEntriesParams, type ShiftListEntriesResponse, type ShiftSearchParams, type ShiftSearchResult, type ShiftUpdateIndexParams, type ShiftUploadFileParams, type ShiftUploadableFile, type SseJsonEvent, type SupabaseCompatSession, type TableInsertRow, type TableRow, type TableUpdatePatch, type Tables, type TablesInsert, type TablesUpdate, Transport, type TransportOptions, type TransportRequest, asPostgrestResponse, bindFetch, createBrowserClient, createClient, createRagPipeline, createRagableBrowserClient, createRagableServerClient, detectStorage, effectiveDataAuth, extractErrorMessage, formatPostgrestError, formatRetrievalContext, formatSdkError, generateIdempotencyKey, normalizeBrowserApiBase, parseSseDataLine, parseTransportResponse, readSseStream };
1178
+ export { type AgentChatMessage, type AgentChatParams, type AgentChatResult, type AgentPublicChatParams, type AgentStreamEvent, type AgentSummary, AgentsClient, AuthBroadcastChannel, type AuthBroadcastMessage, type AuthChangeEvent, type AuthOptions, type AuthSession, type BrowserAuthSession, type BrowserAuthTokens, type BrowserDataAuthMode, type BrowserRealtimeNotification, type BrowserRealtimeStatus, type BrowserRealtimeSubscribeParams, type BrowserRealtimeSubscription, type BrowserSqlExecParams, type BrowserSqlExecResult, type BrowserSqlQueryParams, type BrowserSqlQueryResult, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultRagableDatabase, type FormatContextOptions, type HttpMethod, type Json, LocalStorageAdapter, MemoryStorageAdapter, type PostgRESTFetch, type PostgRESTFetchParams, PostgrestDeleteReturningBuilder, PostgrestDeleteRootBuilder, PostgrestInsertReturningBuilder, PostgrestInsertRootBuilder, PostgrestInsertSdkErrorReturning, PostgrestInsertSdkErrorRoot, type PostgrestResult, PostgrestSelectBuilder, PostgrestTableApi, PostgrestUpdateReturningBuilder, PostgrestUpdateRootBuilder, type PostgrestUpsertOptions, PostgrestUpsertReturningBuilder, PostgrestUpsertRootBuilder, type RagClientForPipeline, type RagPipeline, type RagPipelineOptions, Ragable, RagableAbortError, RagableAuth, type RagableAuthConfig, RagableBrowser, RagableBrowserAgentsClient, RagableBrowserAuthClient, type RagableBrowserClientOptions, RagableBrowserDatabaseClient, type RagableClientOptions, type RagableDatabase, RagableError, RagableNetworkError, RagableRequestClient, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetrieveParams, type RetryOptions, type RunQuery, type SessionStorage, SessionStorageAdapter, type ShiftAddDocumentParams, ShiftClient, type ShiftCreateIndexParams, type ShiftEntry, type ShiftIndex, type ShiftIngestResponse, type ShiftListEntriesParams, type ShiftListEntriesResponse, type ShiftSearchParams, type ShiftSearchResult, type ShiftUpdateIndexParams, type ShiftUploadFileParams, type ShiftUploadableFile, type SseJsonEvent, type SupabaseCompatSession, type TableInsertRow, type TableRow, type TableUpdatePatch, type Tables, type TablesInsert, type TablesUpdate, Transport, type TransportOptions, type TransportRequest, asPostgrestResponse, bindFetch, createBrowserClient, createClient, createRagPipeline, createRagableBrowserClient, createRagableServerClient, detectStorage, effectiveDataAuth, extractErrorMessage, formatPostgrestError, formatRetrievalContext, formatSdkError, generateIdempotencyKey, normalizeBrowserApiBase, parseSseDataLine, parseTransportResponse, readSseStream };
package/dist/index.d.ts CHANGED
@@ -927,6 +927,48 @@ interface BrowserSqlQueryResult<Row extends Record<string, unknown> = Record<str
927
927
  truncated: boolean;
928
928
  rows: Row[];
929
929
  }
930
+ interface BrowserCollectionRecord<Row extends Record<string, unknown> = Record<string, unknown>> {
931
+ id: string;
932
+ data: Row;
933
+ createdAt: string;
934
+ updatedAt: string;
935
+ }
936
+ interface BrowserCollectionDefinition {
937
+ id: string;
938
+ name: string;
939
+ schema: Record<string, unknown> | null;
940
+ createdAt: string;
941
+ updatedAt: string;
942
+ }
943
+ interface BrowserCollectionFindParams {
944
+ where?: Record<string, unknown>;
945
+ filters?: Array<{
946
+ field: string;
947
+ op?: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains";
948
+ value: unknown;
949
+ }>;
950
+ limit?: number;
951
+ offset?: number;
952
+ orderBy?: string;
953
+ orderDirection?: "asc" | "desc";
954
+ }
955
+ declare class BrowserCollectionApi<Row extends Record<string, unknown> = Record<string, unknown>> {
956
+ private readonly database;
957
+ private readonly name;
958
+ private readonly databaseInstanceId?;
959
+ constructor(database: RagableBrowserDatabaseClient<any>, name: string, databaseInstanceId?: string | undefined);
960
+ find: (whereOrParams?: Record<string, unknown> | BrowserCollectionFindParams) => Promise<PostgrestResult<BrowserCollectionRecord<Row>[]>>;
961
+ insert: (data: Row) => Promise<PostgrestResult<BrowserCollectionRecord<Row>>>;
962
+ update: (where: Record<string, unknown>, patch: Partial<Row>, options?: {
963
+ limit?: number;
964
+ }) => Promise<PostgrestResult<BrowserCollectionRecord<Row>[]>>;
965
+ delete: (where: Record<string, unknown>, options?: {
966
+ limit?: number;
967
+ }) => Promise<PostgrestResult<{
968
+ deleted: number;
969
+ records: BrowserCollectionRecord<Row>[];
970
+ }>>;
971
+ }
930
972
  declare class RagableBrowserDatabaseClient<Database extends RagableDatabase = DefaultRagableDatabase> {
931
973
  private readonly options;
932
974
  private readonly ragableAuth;
@@ -941,32 +983,96 @@ declare class RagableBrowserDatabaseClient<Database extends RagableDatabase = De
941
983
  */
942
984
  from: <TableName extends RagableTableNames<Database>>(table: TableName, databaseInstanceId?: string) => PostgrestTableApi<Database, TableName>;
943
985
  private toUrl;
986
+ collection: <Row extends Record<string, unknown> = Record<string, unknown>>(name: string, databaseInstanceId?: string) => BrowserCollectionApi<Row>;
987
+ defineCollection: (name: string, schema?: Record<string, unknown>, databaseInstanceId?: string) => Promise<PostgrestResult<BrowserCollectionDefinition>>;
988
+ listCollections: (databaseInstanceId?: string) => Promise<PostgrestResult<BrowserCollectionDefinition[]>>;
989
+ _requestCollection<T>(method: "GET" | "POST" | "PATCH" | "DELETE", path: string, body?: unknown, databaseInstanceId?: string): Promise<T>;
944
990
  query: <Row extends Record<string, unknown> = Record<string, unknown>>(params: BrowserSqlQueryParams) => Promise<PostgrestResult<BrowserSqlQueryResult<Row>>>;
945
991
  private baseHeaders;
946
992
  /**
947
993
  * Postgres `LISTEN` / `NOTIFY` realtime via server-proxied SSE.
948
994
  * Channels must be lowercase identifiers: `[a-z_][a-z0-9_]*` (max 63 chars).
949
995
  */
996
+ /**
997
+ * Postgres `LISTEN` / `NOTIFY` realtime via server-proxied SSE.
998
+ *
999
+ * Returns a `BrowserRealtimeSubscription` with:
1000
+ * - `unsubscribe()` — permanently close the subscription (stops reconnects).
1001
+ * - `status` — current connection state: `"connecting"` | `"connected"` | `"reconnecting"` | `"disconnected"`.
1002
+ *
1003
+ * The subscription automatically reconnects with exponential backoff when the
1004
+ * stream drops. Server heartbeats (every 15 s) are monitored — if none arrive
1005
+ * within `heartbeatTimeoutMs` (default 45 s), the connection is treated as dead
1006
+ * and a reconnect is triggered. Auth errors (401/403/404) are non-retryable.
1007
+ *
1008
+ * Channel names must be lowercase identifiers: `[a-z_][a-z0-9_]*` (max 63 chars).
1009
+ */
950
1010
  realtime: {
951
- subscribe: (params: BrowserRealtimeSubscribeParams) => Promise<{
952
- unsubscribe: () => void;
953
- }>;
1011
+ subscribe: (params: BrowserRealtimeSubscribeParams) => Promise<BrowserRealtimeSubscription>;
954
1012
  };
955
1013
  }
1014
+ /**
1015
+ * A single NOTIFY message received from a Postgres channel.
1016
+ *
1017
+ * - `channel` — the lowercase channel name that fired.
1018
+ * - `payload` — the text payload (may be null if NOTIFY was sent without one).
1019
+ * - `processId` — the PID of the Postgres backend that called NOTIFY.
1020
+ */
956
1021
  interface BrowserRealtimeNotification {
957
1022
  channel: string;
958
1023
  payload: string | null;
959
1024
  processId: number;
960
1025
  }
1026
+ /**
1027
+ * Connection status of a realtime subscription.
1028
+ *
1029
+ * - `"connecting"` — establishing or re-establishing the SSE stream.
1030
+ * - `"connected"` — stream is open, heartbeats are arriving, NOTIFY events are flowing.
1031
+ * - `"reconnecting"` — the stream dropped and the SDK is waiting before the next retry.
1032
+ * - `"disconnected"` — permanently stopped (via `unsubscribe()`, `signal` abort, or max retries exceeded).
1033
+ */
1034
+ type BrowserRealtimeStatus = "connecting" | "connected" | "reconnecting" | "disconnected";
961
1035
  interface BrowserRealtimeSubscribeParams {
962
1036
  databaseInstanceId?: string;
963
1037
  /** Channel names (normalized to lowercase on the server). */
964
1038
  channels: string[];
965
- /** When aborted, the subscription stops (in addition to `unsubscribe()`). */
1039
+ /** When aborted, the subscription stops permanently (equivalent to calling `unsubscribe()`). */
966
1040
  signal?: AbortSignal;
1041
+ /** Called each time a Postgres NOTIFY message arrives. */
967
1042
  onNotify?: (msg: BrowserRealtimeNotification) => void;
1043
+ /** Called once per connection attempt when the server confirms LISTEN is active. */
968
1044
  onReady?: (channels: string[]) => void;
1045
+ /** Called when the stream encounters a non-retryable error or the server sends an error event. */
969
1046
  onError?: (message: string) => void;
1047
+ /** Called whenever the connection status changes (connecting → connected → reconnecting → …). */
1048
+ onStatusChange?: (status: BrowserRealtimeStatus) => void;
1049
+ /** Called when the stream drops and the SDK will attempt to reconnect. `attempt` is 1-indexed. */
1050
+ onDisconnect?: (info: {
1051
+ attempt: number;
1052
+ retryInMs: number;
1053
+ }) => void;
1054
+ /** Called when a reconnect attempt succeeds (stream is open again). */
1055
+ onReconnect?: (info: {
1056
+ attempt: number;
1057
+ }) => void;
1058
+ /** Maximum number of reconnect attempts before giving up. Set `0` to disable reconnect. Default: **Infinity** (never stops). */
1059
+ maxReconnectAttempts?: number;
1060
+ /** Base delay for exponential backoff (ms). Default: **1000**. */
1061
+ reconnectBaseDelayMs?: number;
1062
+ /** Maximum delay between reconnect attempts (ms). Default: **30000**. */
1063
+ reconnectMaxDelayMs?: number;
1064
+ /** How long to wait without a heartbeat before considering the connection dead (ms). Default: **45000** (3× the server's 15 s heartbeat interval). */
1065
+ heartbeatTimeoutMs?: number;
1066
+ }
1067
+ /**
1068
+ * Handle returned by `database.realtime.subscribe()`.
1069
+ *
1070
+ * - Call `unsubscribe()` to permanently close the subscription (no more reconnects).
1071
+ * - Read `status` to check the current connection state at any time.
1072
+ */
1073
+ interface BrowserRealtimeSubscription {
1074
+ unsubscribe: () => void;
1075
+ readonly status: BrowserRealtimeStatus;
970
1076
  }
971
1077
  declare class RagableBrowserAgentsClient {
972
1078
  private readonly options;
@@ -983,6 +1089,7 @@ declare class RagableBrowser<Database extends RagableDatabase = DefaultRagableDa
983
1089
  readonly agents: RagableBrowserAgentsClient;
984
1090
  readonly auth: RagableBrowserAuthClient<AuthUser>;
985
1091
  readonly database: RagableBrowserDatabaseClient<Database>;
1092
+ readonly db: RagableBrowserDatabaseClient<Database>;
986
1093
  readonly transport: Transport;
987
1094
  private readonly _ragableAuth;
988
1095
  constructor(options: RagableBrowserClientOptions);
@@ -1068,4 +1175,4 @@ declare function createClient(options: RagableClientOptions): Ragable;
1068
1175
  declare function createClient<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends Record<string, unknown> = Record<string, unknown>>(options: RagableBrowserClientOptions): RagableBrowser<Database, AuthUser>;
1069
1176
  declare function createRagableServerClient(options: RagableClientOptions): Ragable;
1070
1177
 
1071
- export { type AgentChatMessage, type AgentChatParams, type AgentChatResult, type AgentPublicChatParams, type AgentStreamEvent, type AgentSummary, AgentsClient, AuthBroadcastChannel, type AuthBroadcastMessage, type AuthChangeEvent, type AuthOptions, type AuthSession, type BrowserAuthSession, type BrowserAuthTokens, type BrowserDataAuthMode, type BrowserRealtimeNotification, type BrowserRealtimeSubscribeParams, type BrowserSqlExecParams, type BrowserSqlExecResult, type BrowserSqlQueryParams, type BrowserSqlQueryResult, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultRagableDatabase, type FormatContextOptions, type HttpMethod, type Json, LocalStorageAdapter, MemoryStorageAdapter, type PostgRESTFetch, type PostgRESTFetchParams, PostgrestDeleteReturningBuilder, PostgrestDeleteRootBuilder, PostgrestInsertReturningBuilder, PostgrestInsertRootBuilder, PostgrestInsertSdkErrorReturning, PostgrestInsertSdkErrorRoot, type PostgrestResult, PostgrestSelectBuilder, PostgrestTableApi, PostgrestUpdateReturningBuilder, PostgrestUpdateRootBuilder, type PostgrestUpsertOptions, PostgrestUpsertReturningBuilder, PostgrestUpsertRootBuilder, type RagClientForPipeline, type RagPipeline, type RagPipelineOptions, Ragable, RagableAbortError, RagableAuth, type RagableAuthConfig, RagableBrowser, RagableBrowserAgentsClient, RagableBrowserAuthClient, type RagableBrowserClientOptions, RagableBrowserDatabaseClient, type RagableClientOptions, type RagableDatabase, RagableError, RagableNetworkError, RagableRequestClient, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetrieveParams, type RetryOptions, type RunQuery, type SessionStorage, SessionStorageAdapter, type ShiftAddDocumentParams, ShiftClient, type ShiftCreateIndexParams, type ShiftEntry, type ShiftIndex, type ShiftIngestResponse, type ShiftListEntriesParams, type ShiftListEntriesResponse, type ShiftSearchParams, type ShiftSearchResult, type ShiftUpdateIndexParams, type ShiftUploadFileParams, type ShiftUploadableFile, type SseJsonEvent, type SupabaseCompatSession, type TableInsertRow, type TableRow, type TableUpdatePatch, type Tables, type TablesInsert, type TablesUpdate, Transport, type TransportOptions, type TransportRequest, asPostgrestResponse, bindFetch, createBrowserClient, createClient, createRagPipeline, createRagableBrowserClient, createRagableServerClient, detectStorage, effectiveDataAuth, extractErrorMessage, formatPostgrestError, formatRetrievalContext, formatSdkError, generateIdempotencyKey, normalizeBrowserApiBase, parseSseDataLine, parseTransportResponse, readSseStream };
1178
+ export { type AgentChatMessage, type AgentChatParams, type AgentChatResult, type AgentPublicChatParams, type AgentStreamEvent, type AgentSummary, AgentsClient, AuthBroadcastChannel, type AuthBroadcastMessage, type AuthChangeEvent, type AuthOptions, type AuthSession, type BrowserAuthSession, type BrowserAuthTokens, type BrowserDataAuthMode, type BrowserRealtimeNotification, type BrowserRealtimeStatus, type BrowserRealtimeSubscribeParams, type BrowserRealtimeSubscription, type BrowserSqlExecParams, type BrowserSqlExecResult, type BrowserSqlQueryParams, type BrowserSqlQueryResult, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultRagableDatabase, type FormatContextOptions, type HttpMethod, type Json, LocalStorageAdapter, MemoryStorageAdapter, type PostgRESTFetch, type PostgRESTFetchParams, PostgrestDeleteReturningBuilder, PostgrestDeleteRootBuilder, PostgrestInsertReturningBuilder, PostgrestInsertRootBuilder, PostgrestInsertSdkErrorReturning, PostgrestInsertSdkErrorRoot, type PostgrestResult, PostgrestSelectBuilder, PostgrestTableApi, PostgrestUpdateReturningBuilder, PostgrestUpdateRootBuilder, type PostgrestUpsertOptions, PostgrestUpsertReturningBuilder, PostgrestUpsertRootBuilder, type RagClientForPipeline, type RagPipeline, type RagPipelineOptions, Ragable, RagableAbortError, RagableAuth, type RagableAuthConfig, RagableBrowser, RagableBrowserAgentsClient, RagableBrowserAuthClient, type RagableBrowserClientOptions, RagableBrowserDatabaseClient, type RagableClientOptions, type RagableDatabase, RagableError, RagableNetworkError, RagableRequestClient, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetrieveParams, type RetryOptions, type RunQuery, type SessionStorage, SessionStorageAdapter, type ShiftAddDocumentParams, ShiftClient, type ShiftCreateIndexParams, type ShiftEntry, type ShiftIndex, type ShiftIngestResponse, type ShiftListEntriesParams, type ShiftListEntriesResponse, type ShiftSearchParams, type ShiftSearchResult, type ShiftUpdateIndexParams, type ShiftUploadFileParams, type ShiftUploadableFile, type SseJsonEvent, type SupabaseCompatSession, type TableInsertRow, type TableRow, type TableUpdatePatch, type Tables, type TablesInsert, type TablesUpdate, Transport, type TransportOptions, type TransportRequest, asPostgrestResponse, bindFetch, createBrowserClient, createClient, createRagPipeline, createRagableBrowserClient, createRagableServerClient, detectStorage, effectiveDataAuth, extractErrorMessage, formatPostgrestError, formatRetrievalContext, formatSdkError, generateIdempotencyKey, normalizeBrowserApiBase, parseSseDataLine, parseTransportResponse, readSseStream };