@ragable/sdk 0.6.21 → 0.6.23

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
@@ -234,6 +234,249 @@ declare class ShiftClient {
234
234
  }>;
235
235
  }
236
236
 
237
+ /**
238
+ * First SSE frame for website project agents (`POST …/agents/:name/chat/stream`).
239
+ */
240
+ interface AgentStreamAgentInfoEvent {
241
+ type: "agent:info";
242
+ name: string;
243
+ agent_name: string;
244
+ }
245
+ /** Payload on the terminal `done` event (matches backend {@link AgentChatResult} + usage fields). */
246
+ interface AgentChatStreamDonePayload {
247
+ response: string;
248
+ traces: unknown[];
249
+ totalDurationMs: number;
250
+ httpResponse?: unknown;
251
+ inputTokens?: number;
252
+ outputTokens?: number;
253
+ cachedPromptTokens?: number;
254
+ cacheCreationInputTokens?: number;
255
+ completionProviders?: string[];
256
+ creditsCharged?: number;
257
+ agentSteps?: number;
258
+ finishReason?: string | null;
259
+ stopReason?: string | null;
260
+ turnMessages?: unknown;
261
+ promptTokensEstimated?: number;
262
+ contextWindow?: number;
263
+ }
264
+ /**
265
+ * Resolved outcome after the stream finishes. `assistantText` is the concatenation of
266
+ * all `token` deltas; `response` is the server’s final string from `done` (authoritative).
267
+ */
268
+ interface AgentChatStreamResult extends AgentChatStreamDonePayload {
269
+ assistantText: string;
270
+ reasoningText: string;
271
+ }
272
+ interface AgentChatStreamHandlers {
273
+ /** Every parsed SSE object (including `ping`, `node:*`, etc.). */
274
+ onEvent?: (event: AgentStreamEvent) => void;
275
+ onAgentInfo?: (info: AgentStreamAgentInfoEvent) => void;
276
+ onToken?: (token: string, ctx: {
277
+ nodeId: string;
278
+ }) => void;
279
+ onReasoningToken?: (token: string, ctx: {
280
+ nodeId: string;
281
+ }) => void;
282
+ onToolCall?: (ctx: {
283
+ nodeId: string;
284
+ toolName: string;
285
+ args: unknown;
286
+ }) => void;
287
+ onToolArgsUpdate?: (ctx: {
288
+ nodeId: string;
289
+ args: Record<string, unknown>;
290
+ }) => void;
291
+ onToolResult?: (ctx: {
292
+ nodeId: string;
293
+ toolName: string;
294
+ durationMs: number;
295
+ result?: string;
296
+ }) => void;
297
+ onNodeStart?: (ctx: {
298
+ nodeId: string;
299
+ nodeType: string;
300
+ label: string;
301
+ }) => void;
302
+ onNodeComplete?: (ctx: {
303
+ nodeId: string;
304
+ output: unknown;
305
+ durationMs: number;
306
+ }) => void;
307
+ onNodeError?: (ctx: {
308
+ nodeId: string;
309
+ error: string;
310
+ }) => void;
311
+ /** Backend heartbeat — safe to ignore in UI. */
312
+ onPing?: () => void;
313
+ /** Fired when the server emits `done` (before {@link onComplete}). */
314
+ onDone?: (payload: AgentChatStreamDonePayload) => void;
315
+ /**
316
+ * Always called on successful completion (after `done`). Not called if the stream
317
+ * errors or ends without `done`.
318
+ */
319
+ onComplete?: (result: AgentChatStreamResult) => void;
320
+ onError?: (error: unknown) => void;
321
+ }
322
+ interface RunAgentChatStreamOptions {
323
+ /**
324
+ * Abort while consuming events (in addition to any `signal` on the HTTP request).
325
+ * Stops reading and throws {@link RagableAbortError}.
326
+ */
327
+ signal?: AbortSignal;
328
+ }
329
+ /** Narrow `done` events from a loose {@link AgentStreamEvent}. */
330
+ declare function parseAgentStreamDone(e: AgentStreamEvent): AgentChatStreamDonePayload | null;
331
+ /** @public Parse the initial `agent:info` SSE frame (website project agents). */
332
+ declare function parseAgentStreamAgentInfo(e: AgentStreamEvent): AgentStreamAgentInfoEvent | null;
333
+ /**
334
+ * Consume a Ragable agent SSE stream with callbacks and return the final result.
335
+ *
336
+ * For the same segment model as dashboard `AgentChat` (`streamingSegments` /
337
+ * `streamingContent`), use {@link runAgentChatStreamForUi} or
338
+ * `client.agents.runChatUiByName` instead.
339
+ *
340
+ * Typical low-level chat (string accumulation only):
341
+ *
342
+ * ```ts
343
+ * const result = await client.agents.runChatStreamByName("support", {
344
+ * message: input,
345
+ * history,
346
+ * signal: ac.signal,
347
+ * }, {
348
+ * onToken: (t) => setReply((s) => s + t),
349
+ * });
350
+ * ```
351
+ *
352
+ * Lower-level (same client, manual iterator):
353
+ *
354
+ * ```ts
355
+ * const result = await runAgentChatStream(
356
+ * client.agents.chatStreamByName("support", { message, signal }),
357
+ * { onToken: (t) => append(t) },
358
+ * { signal },
359
+ * );
360
+ * ```
361
+ */
362
+ declare function runAgentChatStream(source: AsyncIterable<AgentStreamEvent>, handlers?: AgentChatStreamHandlers, options?: RunAgentChatStreamOptions): Promise<AgentChatStreamResult>;
363
+ /**
364
+ * Like {@link runAgentChatStream} but resolves with `null` if the stream ends without `done`
365
+ * instead of throwing. Errors other than incomplete stream are still thrown.
366
+ */
367
+ declare function runAgentChatStreamLenient(source: AsyncIterable<AgentStreamEvent>, handlers?: AgentChatStreamHandlers, options?: RunAgentChatStreamOptions): Promise<AgentChatStreamResult | null>;
368
+ /** True when {@link runAgentChatStream} stopped because no `done` event arrived. */
369
+ declare function isIncompleteAgentStreamError(e: unknown): boolean;
370
+
371
+ /**
372
+ * UI-oriented agent streaming — folds wire events into the same segment model as
373
+ * `app/web/src/components/AgentChat.tsx` (`StreamSegment`), matching the reducers in
374
+ * `useEngineIDEAgent` / `useIDEAgent` (tool gating, coalesced text/reasoning, etc.).
375
+ */
376
+
377
+ /**
378
+ * Chat UI segments — structural parity with `StreamSegment` in dashboard `AgentChat`.
379
+ */
380
+ type AgentChatUiSegment = {
381
+ type: "text";
382
+ content: string;
383
+ } | {
384
+ type: "reasoning";
385
+ content: string;
386
+ } | {
387
+ type: "tool";
388
+ id: string;
389
+ toolName: string;
390
+ status: "started" | "completed";
391
+ durationMs?: number;
392
+ args?: Record<string, unknown>;
393
+ result?: string;
394
+ } | {
395
+ type: "context_summarized";
396
+ step: number;
397
+ mode?: "llm" | "heuristic" | "llm+heuristic" | "aggressive";
398
+ reason?: "soft_limit" | "forced";
399
+ tokensRemovedEstimate?: number;
400
+ estimatedTokensAfter?: number;
401
+ } | {
402
+ type: "llm_step";
403
+ step: number;
404
+ inputTokens: number;
405
+ outputTokens: number;
406
+ cachedPromptTokens?: number;
407
+ cacheCreationInputTokens?: number;
408
+ creditsEstimated: number;
409
+ apiCostUsd?: number;
410
+ provider?: string;
411
+ } | {
412
+ type: "stop_reason";
413
+ content: string;
414
+ finishReason: string;
415
+ };
416
+ /** Assistant row to append to chat history (add your own `id`). */
417
+ interface AgentChatUiAssistantMessage {
418
+ role: "ai";
419
+ content: string;
420
+ segments?: AgentChatUiSegment[];
421
+ usage?: {
422
+ inputTokens: number;
423
+ outputTokens: number;
424
+ creditsCharged: number;
425
+ cachedPromptTokens?: number;
426
+ cacheCreationInputTokens?: number;
427
+ };
428
+ durationMs?: number;
429
+ finishReason?: string | null;
430
+ completionProviders?: string[];
431
+ agentSteps?: number;
432
+ }
433
+ interface AgentChatUiStreamResult {
434
+ /** Segments immediately before `done` (no trailing `stop_reason`). */
435
+ segmentsMidTurn: AgentChatUiSegment[];
436
+ /** Final segments including optional `stop_reason` from `done`. */
437
+ segments: AgentChatUiSegment[];
438
+ /** Persisted assistant message — matches dashboard `ChatMessageData` for `ai` (except `id`). */
439
+ message: AgentChatUiAssistantMessage;
440
+ done: AgentChatStreamDonePayload;
441
+ }
442
+ interface AgentChatStreamUiHandlers {
443
+ /**
444
+ * Live segment list — pass to `AgentChat` as `streamingSegments` (or your own renderer).
445
+ */
446
+ onSegments?: (segments: AgentChatUiSegment[]) => void;
447
+ /**
448
+ * Plain assistant text — mirrors dashboard `streamingContent` (text channel only).
449
+ */
450
+ onStreamingText?: (text: string) => void;
451
+ onAgentInfo?: (info: AgentStreamAgentInfoEvent) => void;
452
+ onEvent?: (event: AgentStreamEvent) => void;
453
+ onDone?: (payload: AgentChatStreamDonePayload) => void;
454
+ onComplete?: (result: AgentChatUiStreamResult) => void;
455
+ onError?: (error: unknown) => void;
456
+ }
457
+ /** Concatenate `text` segments (ignores reasoning/tools). */
458
+ declare function collectAssistantTextFromUiSegments(segments: AgentChatUiSegment[]): string;
459
+ /**
460
+ * Pure fold: one SSE event → next segment list. Matches `useEngineIDEAgent` / `useIDEAgent`
461
+ * behavior for token gating while a tool is in the `started` state.
462
+ */
463
+ declare function foldAgentStreamIntoUiSegments(prev: AgentChatUiSegment[], event: AgentStreamEvent): AgentChatUiSegment[];
464
+ /**
465
+ * Merge live segments with the terminal `done` payload (optional `stop_reason` segment),
466
+ * and build the persisted assistant message — same shape as dashboard `ChatMessageData` for `ai`.
467
+ */
468
+ declare function finalizeAgentChatUiTurn(segments: AgentChatUiSegment[], done: AgentChatStreamDonePayload): {
469
+ segments: AgentChatUiSegment[];
470
+ message: AgentChatUiAssistantMessage;
471
+ };
472
+ /**
473
+ * Consume a stream and drive dashboard-style UI state: {@link AgentChatStreamUiHandlers.onSegments}
474
+ * / {@link AgentChatStreamUiHandlers.onStreamingText} mirror `AgentChat`’s `streamingSegments` /
475
+ * `streamingContent`; the returned {@link AgentChatUiStreamResult.message} is ready to append
476
+ * to history like `useEngineIDEAgent` does on `done`.
477
+ */
478
+ declare function runAgentChatStreamForUi(source: AsyncIterable<AgentStreamEvent>, handlers?: AgentChatStreamUiHandlers, options?: RunAgentChatStreamOptions): Promise<AgentChatUiStreamResult>;
479
+
237
480
  interface AgentSummary {
238
481
  id: string;
239
482
  name: string;
@@ -249,6 +492,8 @@ interface AgentChatMessage {
249
492
  interface AgentChatParams {
250
493
  message: string;
251
494
  history?: AgentChatMessage[];
495
+ /** Passed to `fetch` — aborts the HTTP request and SSE body. */
496
+ signal?: AbortSignal;
252
497
  }
253
498
  /** Mirrors backend ExecutionResult JSON shape (traces are opaque in the SDK). */
254
499
  interface AgentChatResult {
@@ -275,6 +520,16 @@ declare class AgentsClient {
275
520
  * Stream agent execution as SSE (`data: {json}` lines). Yields parsed JSON objects.
276
521
  */
277
522
  chatStream(agentId: string, params: AgentChatParams): AsyncGenerator<AgentStreamEvent, void, undefined>;
523
+ /**
524
+ * Stream an agent turn with callbacks; returns the final `done` payload plus streamed text.
525
+ * Prefer this over manual iteration when building chat UIs against the server API key client.
526
+ */
527
+ runChatStream(agentId: string, params: AgentChatParams, handlers?: AgentChatStreamHandlers): Promise<AgentChatStreamResult>;
528
+ /**
529
+ * Stream with dashboard-style `AgentChat` ergonomics: {@link AgentChatStreamUiHandlers.onSegments}
530
+ * / `onStreamingText` for live UI; returns a persisted-shaped assistant message on `done`.
531
+ */
532
+ runChatUi(agentId: string, params: AgentChatParams, handlers?: AgentChatStreamUiHandlers): Promise<AgentChatUiStreamResult>;
278
533
  }
279
534
 
280
535
  /** @deprecated Kept for backward compat with `database.query()`. Not used by PostgREST path. */
@@ -856,6 +1111,7 @@ type BrowserDataAuthMode = "user" | "publicAnon" | "admin";
856
1111
  declare function effectiveDataAuth(options: RagableBrowserClientOptions): BrowserDataAuthMode;
857
1112
  interface RagableBrowserClientOptions {
858
1113
  organizationId: string;
1114
+ websiteId?: string;
859
1115
  authGroupId?: string;
860
1116
  databaseInstanceId?: string;
861
1117
  /** When omitted, inferred from static keys — see {@link effectiveDataAuth}. */
@@ -1109,6 +1365,11 @@ declare class BrowserCollectionApi<Row extends Record<string, unknown> = Record<
1109
1365
  } & Partial<WhereInput<RowD<Row>>>;
1110
1366
  }) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>> | null>>;
1111
1367
  insert: (data: BrowserCollectionInsertData<Row, Insert>) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>>>>;
1368
+ /**
1369
+ * Insert multiple rows in one request (server multi-value `INSERT`, single transaction).
1370
+ * Empty **`items`** resolves to an empty array. Max batch size is enforced on the server (500).
1371
+ */
1372
+ insertMany: (items: BrowserCollectionInsertData<Row, Insert>[]) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>>[]>>;
1112
1373
  /**
1113
1374
  * Update rows matching `where` (JSON fields, plus envelope `id` / `createdAt` / `updatedAt`).
1114
1375
  */
@@ -1133,6 +1394,18 @@ declare class BrowserCollectionApi<Row extends Record<string, unknown> = Record<
1133
1394
  deleted: number;
1134
1395
  records: BrowserCollectionRecord<RowD<Row>>[];
1135
1396
  }>>;
1397
+ /**
1398
+ * Like {@link BrowserCollectionApi.delete} but the success payload includes **`meta.count`**
1399
+ * (number of deleted rows), matching {@link BrowserCollectionApi.updateMany}.
1400
+ */
1401
+ deleteMany: (where: WhereInput<RowD<Row>>, options?: {
1402
+ limit?: number;
1403
+ }) => Promise<PostgrestResult<{
1404
+ records: BrowserCollectionRecord<RowD<Row>>[];
1405
+ meta: {
1406
+ count: number;
1407
+ };
1408
+ }>>;
1136
1409
  }
1137
1410
  type BrowserCollections<Database extends RagableDatabase = DefaultRagableDatabase> = [keyof Database["public"]["Tables"]] extends [never] ? Record<string, BrowserCollectionApi<Record<string, unknown>>> : {
1138
1411
  readonly [Name in RagableTableNames<Database>]: BrowserCollectionApi<TableRow<Database, Name>, TableInsertRow<Database, Name>, TableUpdatePatch<Database, Name>>;
@@ -1247,12 +1520,64 @@ interface BrowserRealtimeSubscription {
1247
1520
  unsubscribe: () => void;
1248
1521
  readonly status: BrowserRealtimeStatus;
1249
1522
  }
1523
+ interface AgentConversationMessage {
1524
+ role: "user" | "assistant";
1525
+ content: string;
1526
+ file_urls?: string[];
1527
+ }
1528
+ interface AgentConversation {
1529
+ id: string;
1530
+ agent_name: string;
1531
+ agentName: string;
1532
+ title: string | null;
1533
+ metadata: unknown;
1534
+ messages: AgentConversationMessage[];
1535
+ createdAt: string;
1536
+ updatedAt: string;
1537
+ }
1538
+ interface AgentConversationSubscription {
1539
+ unsubscribe: () => void;
1540
+ }
1250
1541
  declare class RagableBrowserAgentsClient {
1251
1542
  private readonly options;
1252
1543
  private readonly fetchImpl;
1253
1544
  constructor(options: RagableBrowserClientOptions);
1254
1545
  private toUrl;
1546
+ private requireWebsiteId;
1547
+ private websiteAgentPath;
1548
+ private requestJson;
1549
+ /** @deprecated Prefer `chatStreamByName(agentName, params)` for project-local `/agents/*.json` agents. */
1255
1550
  chatStream(agentId: string, params: AgentPublicChatParams): AsyncGenerator<AgentStreamEvent, void, undefined>;
1551
+ chatStreamByName(agentName: string, params: AgentChatParams): AsyncGenerator<AgentStreamEvent, void, undefined>;
1552
+ /**
1553
+ * Stream a project agent (`/agents/*.json`) with callbacks; returns the final `done` payload
1554
+ * plus streamed assistant text. Prefer this over manual `for await` when building chat UIs.
1555
+ */
1556
+ runChatStreamByName(agentName: string, params: AgentChatParams, handlers?: AgentChatStreamHandlers): Promise<AgentChatStreamResult>;
1557
+ /**
1558
+ * Same as {@link runChatStreamByName} but folds events into `AgentChat`-style segments
1559
+ * (`onSegments` / `onStreamingText`) and returns a history-ready assistant message.
1560
+ */
1561
+ runChatUiByName(agentName: string, params: AgentChatParams, handlers?: AgentChatStreamUiHandlers): Promise<AgentChatUiStreamResult>;
1562
+ createConversation(params: {
1563
+ agent_name?: string;
1564
+ agentName?: string;
1565
+ title?: string | null;
1566
+ metadata?: unknown;
1567
+ }): Promise<AgentConversation>;
1568
+ listConversations(params?: {
1569
+ agent_name?: string;
1570
+ agentName?: string;
1571
+ }): Promise<AgentConversation[]>;
1572
+ getConversation(conversationId: string): Promise<AgentConversation>;
1573
+ updateConversation(conversationId: string, data: {
1574
+ title?: string | null;
1575
+ metadata?: unknown;
1576
+ }): Promise<AgentConversation>;
1577
+ addMessage(conversationOrId: AgentConversation | string, message: AgentConversationMessage): Promise<AgentConversation>;
1578
+ subscribeToConversation(conversationId: string, callback: (conversation: AgentConversation) => void, options?: {
1579
+ intervalMs?: number;
1580
+ }): AgentConversationSubscription;
1256
1581
  }
1257
1582
  interface AgentPublicChatParams extends AgentChatParams {
1258
1583
  triggerSubtype?: string;
@@ -1348,4 +1673,4 @@ declare function createClient(options: RagableClientOptions): Ragable;
1348
1673
  declare function createClient<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends object = DefaultAuthUser>(options: RagableBrowserClientOptions): RagableBrowser<Database, AuthUser>;
1349
1674
  declare function createRagableServerClient(options: RagableClientOptions): Ragable;
1350
1675
 
1351
- export { type AgentChatMessage, type AgentChatParams, type AgentChatResult, type AgentPublicChatParams, type AgentStreamEvent, type AgentSummary, AgentsClient, AuthBroadcastChannel, type AuthBroadcastMessage, type AuthChangeEvent, type AuthOptions, type AuthSession, type AuthSignUpCredentials, type AuthUpdateUserAttributes, type AuthUserMetadata, type BrowserAuthSession, type BrowserAuthTokens, BrowserCollectionApi, type BrowserCollectionDefinition, type BrowserCollectionFactory, type BrowserCollectionFindParams, type BrowserCollectionRecord, type BrowserCollections, type BrowserDataAuthMode, type BrowserRealtimeNotification, type BrowserRealtimeStatus, type BrowserRealtimeSubscribeParams, type BrowserRealtimeSubscription, type BrowserSqlExecParams, type BrowserSqlExecResult, type BrowserSqlQueryParams, type BrowserSqlQueryResult, type CollectionReturnMode, type CollectionRowData, type CollectionRowWithMeta, type CollectionWhere, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultAuthUser, 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, type RagableResult, 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, type WhereInput, type WhereOperatorObject, asPostgrestResponse, assertPostgrestSuccess, bindFetch, collectionRecordToRowWithMeta, collectionRecordsToRowWithMeta, createBrowserClient, createClient, createRagPipeline, createRagableBrowserClient, createRagableServerClient, detectStorage, effectiveDataAuth, extractErrorMessage, formatPostgrestError, formatRetrievalContext, formatSdkError, generateIdempotencyKey, normalizeBrowserApiBase, parseSseDataLine, parseTransportResponse, readSseStream, toRagableResult, unwrapPostgrest };
1676
+ export { type AgentChatMessage, type AgentChatParams, type AgentChatResult, type AgentChatStreamDonePayload, type AgentChatStreamHandlers, type AgentChatStreamResult, type AgentChatStreamUiHandlers, type AgentChatUiAssistantMessage, type AgentChatUiSegment, type AgentChatUiStreamResult, type AgentConversation, type AgentConversationMessage, type AgentConversationSubscription, type AgentPublicChatParams, type AgentStreamAgentInfoEvent, type AgentStreamEvent, type AgentSummary, AgentsClient, AuthBroadcastChannel, type AuthBroadcastMessage, type AuthChangeEvent, type AuthOptions, type AuthSession, type AuthSignUpCredentials, type AuthUpdateUserAttributes, type AuthUserMetadata, type BrowserAuthSession, type BrowserAuthTokens, BrowserCollectionApi, type BrowserCollectionDefinition, type BrowserCollectionFactory, type BrowserCollectionFindParams, type BrowserCollectionRecord, type BrowserCollections, type BrowserDataAuthMode, type BrowserRealtimeNotification, type BrowserRealtimeStatus, type BrowserRealtimeSubscribeParams, type BrowserRealtimeSubscription, type BrowserSqlExecParams, type BrowserSqlExecResult, type BrowserSqlQueryParams, type BrowserSqlQueryResult, type CollectionReturnMode, type CollectionRowData, type CollectionRowWithMeta, type CollectionWhere, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultAuthUser, 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, type RagableResult, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetrieveParams, type RetryOptions, type RunAgentChatStreamOptions, 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, type WhereInput, type WhereOperatorObject, asPostgrestResponse, assertPostgrestSuccess, bindFetch, collectAssistantTextFromUiSegments, collectionRecordToRowWithMeta, collectionRecordsToRowWithMeta, createBrowserClient, createClient, createRagPipeline, createRagableBrowserClient, createRagableServerClient, detectStorage, effectiveDataAuth, extractErrorMessage, finalizeAgentChatUiTurn, foldAgentStreamIntoUiSegments, formatPostgrestError, formatRetrievalContext, formatSdkError, generateIdempotencyKey, isIncompleteAgentStreamError, normalizeBrowserApiBase, parseAgentStreamAgentInfo, parseAgentStreamDone, parseSseDataLine, parseTransportResponse, readSseStream, runAgentChatStream, runAgentChatStreamForUi, runAgentChatStreamLenient, toRagableResult, unwrapPostgrest };