@ragable/sdk 0.7.7 → 0.7.9
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 +277 -2
- package/dist/index.d.ts +277 -2
- package/dist/index.js +471 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +465 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1062,6 +1062,8 @@ declare function mapAgentEvent(event: AgentStreamLikeEvent): StreamPart | null;
|
|
|
1062
1062
|
* against the website's organization.
|
|
1063
1063
|
*/
|
|
1064
1064
|
|
|
1065
|
+
/** JSON Schema for a structured response. Plain object — no Zod dep. */
|
|
1066
|
+
type JsonSchema = Record<string, unknown>;
|
|
1065
1067
|
interface StreamTextParams {
|
|
1066
1068
|
model: string;
|
|
1067
1069
|
messages: Message[];
|
|
@@ -1100,15 +1102,87 @@ interface GenerateTextResult {
|
|
|
1100
1102
|
finishReason: FinishReason;
|
|
1101
1103
|
toolCalls: ToolCallRecord[];
|
|
1102
1104
|
}
|
|
1105
|
+
interface StreamObjectParams {
|
|
1106
|
+
model: string;
|
|
1107
|
+
/**
|
|
1108
|
+
* JSON Schema describing the expected output. Constrains the model via the
|
|
1109
|
+
* Fireworks `response_format: { type: "json_object", schema }` mode.
|
|
1110
|
+
*/
|
|
1111
|
+
schema: JsonSchema;
|
|
1112
|
+
/** Optional name for the schema (passed through to providers that support it). */
|
|
1113
|
+
schemaName?: string;
|
|
1114
|
+
/** Optional natural-language description of the schema. */
|
|
1115
|
+
schemaDescription?: string;
|
|
1116
|
+
messages: Message[];
|
|
1117
|
+
system?: string;
|
|
1118
|
+
temperature?: number;
|
|
1119
|
+
maxTokens?: number;
|
|
1120
|
+
topP?: number;
|
|
1121
|
+
signal?: AbortSignal;
|
|
1122
|
+
}
|
|
1123
|
+
interface StreamObjectResult<T = unknown> {
|
|
1124
|
+
/** Raw text deltas — the JSON string as it streams in. */
|
|
1125
|
+
textStream: AsyncIterable<string>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Async iterable of best-effort parsed partial objects. Emits whenever the
|
|
1128
|
+
* accumulated JSON parses cleanly under the partial-JSON repair rules.
|
|
1129
|
+
* Subsequent values are *replacements*, not patches — each is a snapshot.
|
|
1130
|
+
*/
|
|
1131
|
+
partialObjectStream: AsyncIterable<T>;
|
|
1132
|
+
/** Resolves to the final parsed object once the stream ends. Rejects if the final JSON is invalid. */
|
|
1133
|
+
object: Promise<T>;
|
|
1134
|
+
/** Resolves to the raw JSON string the model produced. */
|
|
1135
|
+
text: Promise<string>;
|
|
1136
|
+
usage: Promise<TokenUsage>;
|
|
1137
|
+
finishReason: Promise<FinishReason>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Resolves to tool calls the model made during this turn.
|
|
1140
|
+
* Empty for `client.ai.streamObject` (no tools exposed on raw inference);
|
|
1141
|
+
* populated for `client.agents.runObject` when the agent has tools.
|
|
1142
|
+
*/
|
|
1143
|
+
toolCalls: Promise<ToolCallRecord[]>;
|
|
1144
|
+
}
|
|
1145
|
+
interface GenerateObjectResult<T = unknown> {
|
|
1146
|
+
object: T;
|
|
1147
|
+
usage: TokenUsage;
|
|
1148
|
+
finishReason: FinishReason;
|
|
1149
|
+
toolCalls: ToolCallRecord[];
|
|
1150
|
+
}
|
|
1103
1151
|
/**
|
|
1104
1152
|
* Build the JSON body for the inference proxy. Public so tests can assert it.
|
|
1153
|
+
* Accepts an optional `responseFormat` so the same builder serves both
|
|
1154
|
+
* `streamText` and `streamObject`.
|
|
1155
|
+
*/
|
|
1156
|
+
declare function buildInferenceRequestBody(params: StreamTextParams, responseFormat?: Record<string, unknown>): Record<string, unknown>;
|
|
1157
|
+
/**
|
|
1158
|
+
* Build the `response_format` payload for a JSON-Schema-constrained call.
|
|
1159
|
+
* Emits Fireworks' canonical shape (also accepted by OpenAI):
|
|
1160
|
+
*
|
|
1161
|
+
* { type: "json_schema",
|
|
1162
|
+
* json_schema: { name, schema, description?, strict? } }
|
|
1163
|
+
*
|
|
1164
|
+
* @see https://docs.fireworks.ai/structured-responses/structured-response-formatting
|
|
1105
1165
|
*/
|
|
1106
|
-
declare function
|
|
1166
|
+
declare function buildResponseFormat(params: {
|
|
1167
|
+
schema: JsonSchema;
|
|
1168
|
+
name?: string;
|
|
1169
|
+
description?: string;
|
|
1170
|
+
/** Default `true` — providers ignore unknown fields safely. */
|
|
1171
|
+
strict?: boolean;
|
|
1172
|
+
}): Record<string, unknown>;
|
|
1107
1173
|
/**
|
|
1108
1174
|
* Build a `StreamTextResult` from a pre-existing async iterable of StreamParts.
|
|
1109
1175
|
* Used by `client.agents.run()` to share the same DX as `client.ai.streamText`.
|
|
1110
1176
|
*/
|
|
1111
1177
|
declare function createStreamResultFromParts(source: AsyncIterable<StreamPart>): StreamTextResult;
|
|
1178
|
+
interface InferenceRequestContext {
|
|
1179
|
+
/** Resolved URL of the inference endpoint. */
|
|
1180
|
+
url: string;
|
|
1181
|
+
/** Pre-built request headers (`Content-Type` already set). */
|
|
1182
|
+
headers: Headers;
|
|
1183
|
+
/** Bound fetch (already wraps user `fetch` option). */
|
|
1184
|
+
fetch: typeof fetch;
|
|
1185
|
+
}
|
|
1112
1186
|
interface AiClientOptions {
|
|
1113
1187
|
organizationId: string;
|
|
1114
1188
|
websiteId?: string;
|
|
@@ -1125,7 +1199,52 @@ declare class RagableBrowserAiClient {
|
|
|
1125
1199
|
private buildContext;
|
|
1126
1200
|
streamText(params: StreamTextParams): StreamTextResult;
|
|
1127
1201
|
generateText(params: StreamTextParams): Promise<GenerateTextResult>;
|
|
1202
|
+
/**
|
|
1203
|
+
* Stream a JSON-Schema-constrained response. Matches Vercel AI SDK's
|
|
1204
|
+
* `streamObject` shape — returns a synchronous result with `partialObjectStream`
|
|
1205
|
+
* (best-effort incremental parses) and `object` (the final parsed JSON).
|
|
1206
|
+
*
|
|
1207
|
+
* ```ts
|
|
1208
|
+
* const { partialObjectStream, object } = client.ai.streamObject({
|
|
1209
|
+
* model: "accounts/fireworks/models/kimi-k2p5",
|
|
1210
|
+
* schema: {
|
|
1211
|
+
* type: "object",
|
|
1212
|
+
* properties: {
|
|
1213
|
+
* title: { type: "string" },
|
|
1214
|
+
* tags: { type: "array", items: { type: "string" } },
|
|
1215
|
+
* },
|
|
1216
|
+
* required: ["title", "tags"],
|
|
1217
|
+
* },
|
|
1218
|
+
* messages: [{ role: "user", content: "Give me a blog post idea about AI." }],
|
|
1219
|
+
* });
|
|
1220
|
+
* for await (const partial of partialObjectStream) renderPreview(partial);
|
|
1221
|
+
* const final = await object;
|
|
1222
|
+
* ```
|
|
1223
|
+
*/
|
|
1224
|
+
streamObject<T = unknown>(params: StreamObjectParams): StreamObjectResult<T>;
|
|
1225
|
+
/**
|
|
1226
|
+
* Non-streaming variant of {@link streamObject}. Resolves once the model
|
|
1227
|
+
* finishes; rejects if the final text isn't valid JSON for the schema.
|
|
1228
|
+
*/
|
|
1229
|
+
generateObject<T = unknown>(params: StreamObjectParams): Promise<GenerateObjectResult<T>>;
|
|
1128
1230
|
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Open a JSON-mode inference stream against the proxy and return a
|
|
1233
|
+
* `StreamObjectResult`. Exposed for advanced callers; most code should use
|
|
1234
|
+
* `RagableBrowserAiClient.streamObject`.
|
|
1235
|
+
*/
|
|
1236
|
+
declare function streamObjectFromContext<T = unknown>(ctx: InferenceRequestContext, params: StreamObjectParams): StreamObjectResult<T>;
|
|
1237
|
+
/**
|
|
1238
|
+
* Wrap a `StreamTextResult` (text-only stream) into a `StreamObjectResult`
|
|
1239
|
+
* by parsing the accumulated text as JSON. The text path stays the source of
|
|
1240
|
+
* truth for `text`/`usage`/`finishReason`/`toolCalls`; this helper only adds
|
|
1241
|
+
* `partialObjectStream` and `object` on top.
|
|
1242
|
+
*
|
|
1243
|
+
* Public so `client.agents.runObject` can reuse the parsing logic — agents
|
|
1244
|
+
* stream text through their own SSE protocol, but the structured-output
|
|
1245
|
+
* conversion is identical.
|
|
1246
|
+
*/
|
|
1247
|
+
declare function wrapStreamTextAsObject<T = unknown>(inner: StreamTextResult): StreamObjectResult<T>;
|
|
1129
1248
|
|
|
1130
1249
|
/** Canonical browser/server API base (`…/api`, no trailing slash). */
|
|
1131
1250
|
declare function normalizeBrowserApiBase(): string;
|
|
@@ -1675,6 +1794,99 @@ declare class RagableBrowserStorageClient {
|
|
|
1675
1794
|
constructor(options: RagableBrowserClientOptions, fetchImpl: typeof fetch);
|
|
1676
1795
|
from(bucketId: string): BrowserStorageBucketClient;
|
|
1677
1796
|
}
|
|
1797
|
+
interface MailSendParams {
|
|
1798
|
+
to: string[];
|
|
1799
|
+
cc?: string[];
|
|
1800
|
+
bcc?: string[];
|
|
1801
|
+
subject: string;
|
|
1802
|
+
/** Plain-text body. At least one of `bodyText` / `bodyHtml` is required. */
|
|
1803
|
+
bodyText?: string;
|
|
1804
|
+
/** HTML body. If both are set, sent as multipart/alternative. */
|
|
1805
|
+
bodyHtml?: string;
|
|
1806
|
+
/** RFC 822 Message-ID of the message you're replying to (enables threading). */
|
|
1807
|
+
inReplyToMessageId?: string;
|
|
1808
|
+
/** Existing References header value, chained with In-Reply-To. */
|
|
1809
|
+
referencesHeader?: string;
|
|
1810
|
+
}
|
|
1811
|
+
interface MailSendResult {
|
|
1812
|
+
sentMailMessageId: string;
|
|
1813
|
+
gmailMessageId: string;
|
|
1814
|
+
gmailThreadId: string;
|
|
1815
|
+
fromAddress: string;
|
|
1816
|
+
}
|
|
1817
|
+
interface MailSearchParams {
|
|
1818
|
+
/** Gmail search syntax, e.g. `from:alice is:unread newer_than:7d`. */
|
|
1819
|
+
query?: string;
|
|
1820
|
+
/** 1–50; default 20. */
|
|
1821
|
+
maxResults?: number;
|
|
1822
|
+
pageToken?: string;
|
|
1823
|
+
labelIds?: string[];
|
|
1824
|
+
}
|
|
1825
|
+
interface MailMessagePreview {
|
|
1826
|
+
id: string;
|
|
1827
|
+
threadId: string;
|
|
1828
|
+
snippet: string;
|
|
1829
|
+
labelIds: string[];
|
|
1830
|
+
}
|
|
1831
|
+
interface MailMessageDetail {
|
|
1832
|
+
id: string;
|
|
1833
|
+
threadId: string;
|
|
1834
|
+
receivedAt: number;
|
|
1835
|
+
fromAddress: string;
|
|
1836
|
+
fromName: string | null;
|
|
1837
|
+
to: string[];
|
|
1838
|
+
cc: string[];
|
|
1839
|
+
subject: string;
|
|
1840
|
+
snippet: string;
|
|
1841
|
+
bodyText: string | null;
|
|
1842
|
+
bodyHtml: string | null;
|
|
1843
|
+
messageIdHeader: string | null;
|
|
1844
|
+
referencesHeader: string | null;
|
|
1845
|
+
labelIds: string[];
|
|
1846
|
+
}
|
|
1847
|
+
/**
|
|
1848
|
+
* Send and read email through the Gmail account linked to this Ragable
|
|
1849
|
+
* website (via the IDE Infrastructure → Integrations tab).
|
|
1850
|
+
*
|
|
1851
|
+
* All requests require a Bearer token — either an end-user JWT from this
|
|
1852
|
+
* website's auth group (call `client.auth.signIn(...)` first) or the
|
|
1853
|
+
* data-admin key (server-side use).
|
|
1854
|
+
*
|
|
1855
|
+
* The website MUST have:
|
|
1856
|
+
* 1. A Gmail account linked under Integrations
|
|
1857
|
+
* 2. An auth group linked under Auth
|
|
1858
|
+
*
|
|
1859
|
+
* Otherwise calls return a 412 with a clear error message.
|
|
1860
|
+
*/
|
|
1861
|
+
declare class RagableBrowserMailClient {
|
|
1862
|
+
private readonly options;
|
|
1863
|
+
private readonly auth;
|
|
1864
|
+
private readonly fetchImpl;
|
|
1865
|
+
constructor(options: RagableBrowserClientOptions, auth: RagableAuth | null);
|
|
1866
|
+
private requireWebsiteId;
|
|
1867
|
+
private pathTo;
|
|
1868
|
+
/**
|
|
1869
|
+
* Get the Bearer token used to authenticate the call:
|
|
1870
|
+
* 1. End-user access token (preferred when an auth group is configured
|
|
1871
|
+
* and the user has signed in)
|
|
1872
|
+
* 2. `dataStaticKey` from createBrowserClient options
|
|
1873
|
+
* 3. Caller-supplied `getAccessToken()`
|
|
1874
|
+
*
|
|
1875
|
+
* If none is available, throws — server-side use should pass the
|
|
1876
|
+
* data-admin key as `dataStaticKey`.
|
|
1877
|
+
*/
|
|
1878
|
+
private getBearerToken;
|
|
1879
|
+
private request;
|
|
1880
|
+
/** Send an email from this website's linked Gmail account. */
|
|
1881
|
+
send(params: MailSendParams): Promise<MailSendResult>;
|
|
1882
|
+
/** Search messages with Gmail query syntax. */
|
|
1883
|
+
search(params?: MailSearchParams): Promise<{
|
|
1884
|
+
messages: MailMessagePreview[];
|
|
1885
|
+
nextPageToken: string | null;
|
|
1886
|
+
}>;
|
|
1887
|
+
/** Fetch a single message in full (headers + decoded text/html body). */
|
|
1888
|
+
getMessage(messageId: string): Promise<MailMessageDetail>;
|
|
1889
|
+
}
|
|
1678
1890
|
interface AgentConversationMessage {
|
|
1679
1891
|
role: "user" | "assistant";
|
|
1680
1892
|
content: string;
|
|
@@ -1720,6 +1932,52 @@ declare class RagableBrowserAgentsClient {
|
|
|
1720
1932
|
messages: Message[];
|
|
1721
1933
|
signal?: AbortSignal;
|
|
1722
1934
|
}): StreamTextResult;
|
|
1935
|
+
/**
|
|
1936
|
+
* Same agent, same tools/instructions/RAG — but constrain the final output
|
|
1937
|
+
* to a JSON Schema. Matches `client.ai.streamObject` exactly so callers can
|
|
1938
|
+
* swap between raw inference and an agent without changing call shape.
|
|
1939
|
+
*
|
|
1940
|
+
* Tool calling and structured output are **compatible**: the model may call
|
|
1941
|
+
* the agent's tools as usual; the final assistant message is the schema-
|
|
1942
|
+
* conformant JSON. The agent's `agents/<name>.json` is unchanged — whether
|
|
1943
|
+
* the run is conversational or structured is decided by the call site.
|
|
1944
|
+
*
|
|
1945
|
+
* ```ts
|
|
1946
|
+
* const { partialObjectStream, object } = client.agents.runObject<Plan>(
|
|
1947
|
+
* "planner",
|
|
1948
|
+
* {
|
|
1949
|
+
* messages: [{ role: "user", content: "Plan a 3-day trip to Kyoto." }],
|
|
1950
|
+
* schema: {
|
|
1951
|
+
* type: "object",
|
|
1952
|
+
* properties: {
|
|
1953
|
+
* days: {
|
|
1954
|
+
* type: "array",
|
|
1955
|
+
* items: { type: "object", properties: { date: { type: "string" }, activities: { type: "array", items: { type: "string" } } } },
|
|
1956
|
+
* },
|
|
1957
|
+
* },
|
|
1958
|
+
* required: ["days"],
|
|
1959
|
+
* },
|
|
1960
|
+
* },
|
|
1961
|
+
* );
|
|
1962
|
+
* for await (const p of partialObjectStream) renderPreview(p);
|
|
1963
|
+
* console.log(await object);
|
|
1964
|
+
* ```
|
|
1965
|
+
*/
|
|
1966
|
+
runObject<T = unknown>(agentName: string, params: {
|
|
1967
|
+
messages: Message[];
|
|
1968
|
+
schema: JsonSchema;
|
|
1969
|
+
schemaName?: string;
|
|
1970
|
+
schemaDescription?: string;
|
|
1971
|
+
signal?: AbortSignal;
|
|
1972
|
+
}): StreamObjectResult<T>;
|
|
1973
|
+
/** Non-streaming variant of {@link runObject}. */
|
|
1974
|
+
generateObject<T = unknown>(agentName: string, params: {
|
|
1975
|
+
messages: Message[];
|
|
1976
|
+
schema: JsonSchema;
|
|
1977
|
+
schemaName?: string;
|
|
1978
|
+
schemaDescription?: string;
|
|
1979
|
+
signal?: AbortSignal;
|
|
1980
|
+
}): Promise<GenerateObjectResult<T>>;
|
|
1723
1981
|
private runStreamParts;
|
|
1724
1982
|
/**
|
|
1725
1983
|
* @deprecated Use {@link run} for new code. This method is kept for
|
|
@@ -1768,6 +2026,7 @@ declare class RagableBrowser<Database extends RagableDatabase = DefaultRagableDa
|
|
|
1768
2026
|
readonly database: RagableBrowserDatabaseClient<Database>;
|
|
1769
2027
|
readonly db: RagableBrowserDatabaseClient<Database>;
|
|
1770
2028
|
readonly storage: RagableBrowserStorageClient;
|
|
2029
|
+
readonly mail: RagableBrowserMailClient;
|
|
1771
2030
|
readonly transport: Transport;
|
|
1772
2031
|
private readonly _ragableAuth;
|
|
1773
2032
|
constructor(options: RagableBrowserClientOptions);
|
|
@@ -1790,6 +2049,22 @@ declare function parseSseDataLine(line: string): SseJsonEvent | null;
|
|
|
1790
2049
|
*/
|
|
1791
2050
|
declare function readSseStream(body: ReadableStream<Uint8Array>): AsyncGenerator<SseJsonEvent, void, undefined>;
|
|
1792
2051
|
|
|
2052
|
+
/**
|
|
2053
|
+
* Best-effort parser for incomplete JSON streamed token-by-token from an LLM.
|
|
2054
|
+
*
|
|
2055
|
+
* Used by `streamObject` to emit partial objects as the model writes them.
|
|
2056
|
+
* Strategy:
|
|
2057
|
+
* 1. Try `JSON.parse(text)` — if it works, the JSON is already complete.
|
|
2058
|
+
* 2. Otherwise scan the text and close any open `{`, `[`, or string literal
|
|
2059
|
+
* so the result is parseable.
|
|
2060
|
+
* 3. If a trailing comma is the problem, strip it and retry.
|
|
2061
|
+
*
|
|
2062
|
+
* Returns `undefined` when no parseable prefix can be recovered.
|
|
2063
|
+
*
|
|
2064
|
+
* Designed to be allocation-light and dep-free.
|
|
2065
|
+
*/
|
|
2066
|
+
declare function tryParsePartialJson(text: string): unknown | undefined;
|
|
2067
|
+
|
|
1793
2068
|
declare function createClient<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends object = DefaultAuthUser>(options: RagableBrowserClientOptions): RagableBrowser<Database, AuthUser>;
|
|
1794
2069
|
|
|
1795
|
-
export { type AgentChatMessage, type AgentChatParams, 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, 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, BrowserStorageBucketClient, type BrowserStorageBulkDeleteResult, type BrowserStorageDownloadResult, type BrowserStorageItem, type BrowserStorageListResult, type BrowserStorageSignedUrlResult, type BrowserStorageUploadResult, type CollectionReturnMode, type CollectionRowData, type CollectionRowWithMeta, type CollectionWhere, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultAuthUser, type DefaultRagableDatabase, type FinishReason, type GenerateTextResult, type HttpMethod, type Json, LocalStorageAdapter, MemoryStorageAdapter, type Message, type PostgRESTFetch, type PostgRESTFetchParams, PostgrestDeleteReturningBuilder, PostgrestDeleteRootBuilder, PostgrestInsertReturningBuilder, PostgrestInsertRootBuilder, PostgrestInsertSdkErrorReturning, PostgrestInsertSdkErrorRoot, type PostgrestResult, PostgrestSelectBuilder, PostgrestTableApi, PostgrestUpdateReturningBuilder, PostgrestUpdateRootBuilder, type PostgrestUpsertOptions, PostgrestUpsertReturningBuilder, PostgrestUpsertRootBuilder, RagableAbortError, RagableAuth, type RagableAuthConfig, RagableBrowser, RagableBrowserAgentsClient, RagableBrowserAiClient, RagableBrowserAuthClient, type RagableBrowserClientOptions, RagableBrowserDatabaseClient, RagableBrowserStorageClient, type RagableDatabase, RagableError, RagableNetworkError, type RagableResult, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetryOptions, type RunAgentChatStreamOptions, type RunQuery, type SessionStorage, SessionStorageAdapter, type SseJsonEvent, type StreamPart, type StreamTextParams, type StreamTextResult, type SupabaseCompatSession, type TableInsertRow, type TableRow, type TableUpdatePatch, type Tables, type TablesInsert, type TablesUpdate, type TokenUsage, type ToolCallRecord, Transport, type TransportOptions, type TransportRequest, type WhereInput, type WhereOperatorObject, asPostgrestResponse, assertPostgrestSuccess, bindFetch, buildInferenceRequestBody, collectAssistantTextFromUiSegments, collectionRecordToRowWithMeta, collectionRecordsToRowWithMeta, createBrowserClient, createClient, createRagableBrowserClient, createStreamResultFromParts, detectStorage, effectiveDataAuth, extractErrorMessage, finalizeAgentChatUiTurn, foldAgentStreamIntoUiSegments, formatPostgrestError, formatSdkError, generateIdempotencyKey, isIncompleteAgentStreamError, mapAgentEvent, mapFireworksChunk, normalizeBrowserApiBase, parseAgentStreamAgentInfo, parseAgentStreamDone, parseSseDataLine, parseTransportResponse, readSseStream, runAgentChatStream, runAgentChatStreamForUi, runAgentChatStreamLenient, toRagableResult, unwrapPostgrest };
|
|
2070
|
+
export { type AgentChatMessage, type AgentChatParams, 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, 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, BrowserStorageBucketClient, type BrowserStorageBulkDeleteResult, type BrowserStorageDownloadResult, type BrowserStorageItem, type BrowserStorageListResult, type BrowserStorageSignedUrlResult, type BrowserStorageUploadResult, type CollectionReturnMode, type CollectionRowData, type CollectionRowWithMeta, type CollectionWhere, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultAuthUser, type DefaultRagableDatabase, type FinishReason, type GenerateObjectResult, type GenerateTextResult, type HttpMethod, type Json, type JsonSchema, LocalStorageAdapter, type MailMessageDetail, type MailMessagePreview, type MailSearchParams, type MailSendParams, type MailSendResult, MemoryStorageAdapter, type Message, type PostgRESTFetch, type PostgRESTFetchParams, PostgrestDeleteReturningBuilder, PostgrestDeleteRootBuilder, PostgrestInsertReturningBuilder, PostgrestInsertRootBuilder, PostgrestInsertSdkErrorReturning, PostgrestInsertSdkErrorRoot, type PostgrestResult, PostgrestSelectBuilder, PostgrestTableApi, PostgrestUpdateReturningBuilder, PostgrestUpdateRootBuilder, type PostgrestUpsertOptions, PostgrestUpsertReturningBuilder, PostgrestUpsertRootBuilder, RagableAbortError, RagableAuth, type RagableAuthConfig, RagableBrowser, RagableBrowserAgentsClient, RagableBrowserAiClient, RagableBrowserAuthClient, type RagableBrowserClientOptions, RagableBrowserDatabaseClient, RagableBrowserMailClient, RagableBrowserStorageClient, type RagableDatabase, RagableError, RagableNetworkError, type RagableResult, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetryOptions, type RunAgentChatStreamOptions, type RunQuery, type SessionStorage, SessionStorageAdapter, type SseJsonEvent, type StreamObjectParams, type StreamObjectResult, type StreamPart, type StreamTextParams, type StreamTextResult, type SupabaseCompatSession, type TableInsertRow, type TableRow, type TableUpdatePatch, type Tables, type TablesInsert, type TablesUpdate, type TokenUsage, type ToolCallRecord, Transport, type TransportOptions, type TransportRequest, type WhereInput, type WhereOperatorObject, asPostgrestResponse, assertPostgrestSuccess, bindFetch, buildInferenceRequestBody, buildResponseFormat, collectAssistantTextFromUiSegments, collectionRecordToRowWithMeta, collectionRecordsToRowWithMeta, createBrowserClient, createClient, createRagableBrowserClient, createStreamResultFromParts, detectStorage, effectiveDataAuth, extractErrorMessage, finalizeAgentChatUiTurn, foldAgentStreamIntoUiSegments, formatPostgrestError, formatSdkError, generateIdempotencyKey, isIncompleteAgentStreamError, mapAgentEvent, mapFireworksChunk, normalizeBrowserApiBase, parseAgentStreamAgentInfo, parseAgentStreamDone, parseSseDataLine, parseTransportResponse, readSseStream, runAgentChatStream, runAgentChatStreamForUi, runAgentChatStreamLenient, streamObjectFromContext, toRagableResult, tryParsePartialJson, unwrapPostgrest, wrapStreamTextAsObject };
|