@dudousxd/nestjs-agent-react 0.20.0 → 0.21.0
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/README.md +60 -37
- package/dist/{client-0Wd-WPsu.d.cts → client-ePlgRwP-.d.cts} +35 -18
- package/dist/{client-0Wd-WPsu.d.ts → client-ePlgRwP-.d.ts} +35 -18
- package/dist/{model-gHqjNjLJ.d.cts → generative-ui-9AJNVKBZ.d.cts} +165 -1
- package/dist/{model-gHqjNjLJ.d.ts → generative-ui-9AJNVKBZ.d.ts} +165 -1
- package/dist/genui-json-render.d.cts +1 -2
- package/dist/genui-json-render.d.ts +1 -2
- package/dist/genui.d.cts +2 -3
- package/dist/genui.d.ts +2 -3
- package/dist/index.cjs +918 -358
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +91 -60
- package/dist/index.d.ts +91 -60
- package/dist/index.js +878 -320
- package/dist/index.js.map +1 -1
- package/dist/media.cjs +13 -16
- package/dist/media.cjs.map +1 -1
- package/dist/media.d.cts +6 -23
- package/dist/media.d.ts +6 -23
- package/dist/media.js +12 -14
- package/dist/media.js.map +1 -1
- package/package.json +1 -1
- package/dist/generative-ui-BhXFni8j.d.ts +0 -167
- package/dist/generative-ui-C53b3FoA.d.cts +0 -167
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
2
|
import { ChatTransport, UIMessage, UIMessageChunk, DataUIPart, UIDataTypes } from 'ai';
|
|
3
|
-
import { A as AgentBackend, U as UploadAttachmentOptions, a as
|
|
4
|
-
export {
|
|
3
|
+
import { A as AgentBackend, U as UploadAttachmentOptions, a as AttachmentUploadStrategy, Q as QuotaToday } from './client-ePlgRwP-.cjs';
|
|
4
|
+
export { b as AgentBackendUnsupportedError, c as AgentClient, d as AgentClientOptions, e as AgentConnection, f as AgentHttpError, C as CancelResult, g as ChatStreamRequest, h as ChatStreamResponse, M as MessageFeedbackInput, R as ResumeStreamRequest, T as ThreadPatch, r as requireBackendMethod } from './client-ePlgRwP-.cjs';
|
|
5
5
|
import * as _dudousxd_nestjs_agent_core from '@dudousxd/nestjs-agent-core';
|
|
6
6
|
import { MessageAttachment, AgentCatalogEntry, ModelCatalogEntry, ModelCatalogView, QuotaReport, QuotaWindow, QuotaBlock, MessageFeedback, MessageFeedbackValue, ThreadSummary, StoredMessage, ToolCatalogEntry, ThreadDetail } from '@dudousxd/nestjs-agent-core';
|
|
7
7
|
export { ElicitationInput, ElicitationInputType, validateElicitationAnswer as validateAnswer, validateElicitationValue as validateAnswerValue } from '@dudousxd/nestjs-agent-core';
|
|
8
|
+
import * as React from 'react';
|
|
8
9
|
import React__default, { ReactNode, Context } from 'react';
|
|
9
|
-
import { T as TranscriptUiBlock,
|
|
10
|
-
export {
|
|
10
|
+
import { o as GenuiProviderValue, T as TranscriptUiBlock, t as TranscriptBlock, U as UsageSummary, v as TimestampInfo, C as ChatStatus, M as MessageUsageInfo, w as ToolCatalog, A as ApproveOptions, x as AnyToolUIPart, y as TranscriptFile } from './generative-ui-9AJNVKBZ.cjs';
|
|
11
|
+
export { z as ApprovalBlockOptions, B as BuildBlocksOptions, D as CoercibleQuestion, E as DescribeToolCallOptions, F as ElicitationBlockOptions, H as GroupToolActivityOptions, I as RawAnswer, J as ResolvedReading, K as ResolvedResultView, L as RetrievedPassage, S as SettleAction, N as ToolActivityGroup, O as ToolCallDescription, P as ToolCallState, Q as ToolCallStatus, V as TranscriptApproval, W as TranscriptApprovalStatus, X as TranscriptElicitationBlock, Y as TranscriptElicitationOutcome, Z as TranscriptFilesBlock, _ as TranscriptQuestion, $ as TranscriptQuestionOption, a0 as TranscriptReasoningBlock, a1 as TranscriptSettleState, a2 as TranscriptSource, a3 as TranscriptSourcesBlock, a4 as TranscriptTextBlock, a5 as TranscriptToolBlock, a6 as TranscriptToolCall, a7 as buildTranscriptBlocks, a8 as coerceAnswer, a9 as correctedCallIds, aa as describeTimestamp, ab as describeToolCall, ac as describeUsage, ad as extractMessageText, ae as fillTemplate, af as formatRelativeTime, ag as groupToolActivity, ah as inferResultView, ai as isActionCall, aj as phraseFor, ak as readPath, al as resolveResultView, am as toolCallState, an as toolCatalogFrom } from './generative-ui-9AJNVKBZ.cjs';
|
|
11
12
|
|
|
12
13
|
/** Identity surfaced by the backend's `meta` SSE frame / response headers. */
|
|
13
14
|
interface AgentStreamMeta {
|
|
@@ -56,12 +57,10 @@ interface AgentChatTransportOptions {
|
|
|
56
57
|
reconnect?: ReconnectOptions | false;
|
|
57
58
|
/** Fires as a stream drops, reconnects, or gives up. */
|
|
58
59
|
onConnectionChange?: (state: StreamConnectionState) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Origin + base path the agent endpoints hang off, e.g.
|
|
61
|
-
* `https://api.example.com`. Endpoints are appended as
|
|
62
|
-
* `${baseUrl}/agent/chat` etc. Defaults to `''` (same origin).
|
|
63
|
-
*/
|
|
60
|
+
/** The server's origin, e.g. `https://api.example.com`. Defaults to `''` (same origin). */
|
|
64
61
|
baseUrl?: string;
|
|
62
|
+
/** The agent's route prefix (`AgentModule`'s `path`, global prefix included). Default `'agent'`. */
|
|
63
|
+
path?: string;
|
|
65
64
|
/** Static headers merged into every request (e.g. a tenant ref). */
|
|
66
65
|
headers?: Record<string, string>;
|
|
67
66
|
/**
|
|
@@ -232,7 +231,7 @@ interface UseAttachmentsOptions {
|
|
|
232
231
|
* answered; honour `signal` so `remove` can cancel; call `onProgress(0..1)` if you can.
|
|
233
232
|
*/
|
|
234
233
|
upload?: (file: File, options: UploadAttachmentOptions) => Promise<MessageAttachment>;
|
|
235
|
-
/** Used for the default `upload`.
|
|
234
|
+
/** Used for the default `upload`. Default: the enclosing `<AgentProvider>`'s. */
|
|
236
235
|
backend?: AgentBackend;
|
|
237
236
|
/** `<input accept>` grammar: `'image/*,.pdf'` or `['image/*', 'application/pdf']`. */
|
|
238
237
|
accept?: string | readonly string[];
|
|
@@ -303,11 +302,65 @@ interface ClipboardLikeEvent {
|
|
|
303
302
|
* files.clear();
|
|
304
303
|
* ```
|
|
305
304
|
*/
|
|
306
|
-
declare function useAttachments(options
|
|
305
|
+
declare function useAttachments(options?: UseAttachmentsOptions): AttachmentsState;
|
|
306
|
+
|
|
307
|
+
interface AgentProviderProps {
|
|
308
|
+
/**
|
|
309
|
+
* A backend of your own — see {@link AgentBackend}. Omitted → an {@link AgentClient} over this
|
|
310
|
+
* library's REST routes, built from the connection props below (which are ignored when a backend
|
|
311
|
+
* is given). Must be stable across renders.
|
|
312
|
+
*/
|
|
313
|
+
backend?: AgentBackend;
|
|
314
|
+
/** The server's origin, e.g. `https://api.example.com`. Default `''` (same origin). */
|
|
315
|
+
baseUrl?: string;
|
|
316
|
+
/** `AgentModule`'s `path`, global prefix included (`'api/agent'`). Default `'agent'`. */
|
|
317
|
+
path?: string;
|
|
318
|
+
/** Static headers on every request. */
|
|
319
|
+
headers?: Record<string, string>;
|
|
320
|
+
/**
|
|
321
|
+
* Read at every request — a short-lived bearer token, or a CSRF header read from a cookie
|
|
322
|
+
* (`{ 'X-XSRF-TOKEN': readCookie('XSRF-TOKEN') }`).
|
|
323
|
+
*/
|
|
324
|
+
getHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
325
|
+
/** `'include'` when the API is on another origin and authenticates by cookie. */
|
|
326
|
+
credentials?: RequestCredentials;
|
|
327
|
+
/** Injectable for tests / non-browser runtimes. */
|
|
328
|
+
fetch?: typeof fetch;
|
|
329
|
+
/** Attachment uploads of the built-in client. */
|
|
330
|
+
attachments?: {
|
|
331
|
+
/** e.g. `mediaAttachments()` from `@dudousxd/nestjs-agent-react/media`. */
|
|
332
|
+
upload?: AttachmentUploadStrategy;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Set generative UI up here — the same settings `<GenuiProvider>` takes (registry, catalog,
|
|
336
|
+
* resolver, fallback, …). Every message then draws pushed components with them.
|
|
337
|
+
*/
|
|
338
|
+
genui?: GenuiProviderValue;
|
|
339
|
+
children?: ReactNode;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* The agent connection, once, at the app root. Every hook below it — `useAgentChat`, `useThreads`,
|
|
343
|
+
* `useModels`, `useAgents`, `useQuota`, `useToolCatalog`, `useMessageFeedback`, `useAttachments` —
|
|
344
|
+
* talks to it unless handed a `backend` of its own.
|
|
345
|
+
*
|
|
346
|
+
* ```tsx
|
|
347
|
+
* <AgentProvider baseUrl="https://api.example.com" credentials="include">
|
|
348
|
+
* <App />
|
|
349
|
+
* </AgentProvider>
|
|
350
|
+
* ```
|
|
351
|
+
*
|
|
352
|
+
* Without a provider every hook shares one same-origin client on `/agent`.
|
|
353
|
+
*/
|
|
354
|
+
declare function AgentProvider({ backend, baseUrl, path, headers, getHeaders, credentials, fetch, attachments, genui, children, }: AgentProviderProps): React.JSX.Element;
|
|
355
|
+
/**
|
|
356
|
+
* The backend a hook talks to: `own` when given, else the enclosing {@link AgentProvider}'s, else a
|
|
357
|
+
* shared same-origin client on `/agent`. For your own hooks over the same connection.
|
|
358
|
+
*/
|
|
359
|
+
declare function useAgentBackend<B extends AgentBackend = AgentBackend>(own?: B): B;
|
|
307
360
|
|
|
308
361
|
interface UseAgentsOptions {
|
|
309
|
-
/**
|
|
310
|
-
backend
|
|
362
|
+
/** Default: the enclosing `<AgentProvider>`'s. Must implement `listAgents`. */
|
|
363
|
+
backend?: AgentBackend;
|
|
311
364
|
/** `false` holds the request. Default `true`. */
|
|
312
365
|
enabled?: boolean;
|
|
313
366
|
}
|
|
@@ -324,11 +377,11 @@ interface AgentsState {
|
|
|
324
377
|
* The registered agents (`GET <base>/agents`) — the data behind an agent picker. Send the pick as
|
|
325
378
|
* `useAgentChat({ agent })`, or pin it on a thread with `PATCH <base>/threads/:id { defaultAgent }`.
|
|
326
379
|
*/
|
|
327
|
-
declare function useAgents(options
|
|
380
|
+
declare function useAgents(options?: UseAgentsOptions): AgentsState;
|
|
328
381
|
|
|
329
382
|
interface UseModelsOptions {
|
|
330
|
-
/**
|
|
331
|
-
backend
|
|
383
|
+
/** Default: the enclosing `<AgentProvider>`'s. Must implement `listModels`. */
|
|
384
|
+
backend?: AgentBackend;
|
|
332
385
|
/** The agent to list models for; omitted → the default agent. */
|
|
333
386
|
agent?: string;
|
|
334
387
|
/** `false` holds the request. Default `true`. */
|
|
@@ -358,11 +411,11 @@ interface ModelsState {
|
|
|
358
411
|
* as `useAgentChat({ model })`, `sendMessage(msg, { body: { model } })`, or pin it on the thread
|
|
359
412
|
* with `chat.setThreadModel(id)`.
|
|
360
413
|
*/
|
|
361
|
-
declare function useModels(options
|
|
414
|
+
declare function useModels(options?: UseModelsOptions): ModelsState;
|
|
362
415
|
|
|
363
416
|
interface UseQuotaOptions {
|
|
364
|
-
/**
|
|
365
|
-
backend
|
|
417
|
+
/** Default: the enclosing `<AgentProvider>`'s. Must implement `getQuota`. */
|
|
418
|
+
backend?: AgentBackend;
|
|
366
419
|
/** `false` holds the request. Default `true`. */
|
|
367
420
|
enabled?: boolean;
|
|
368
421
|
/** Re-read every `pollMs` ms as well. Default: only on mount, after runs, and on `refresh`. */
|
|
@@ -386,11 +439,11 @@ interface QuotaState {
|
|
|
386
439
|
* one — if any — blocks sends. Re-read after every run a chat on the same backend settles, so a
|
|
387
440
|
* meter moves with the conversation. Headless: draw the meter yourself.
|
|
388
441
|
*/
|
|
389
|
-
declare function useQuota(options
|
|
442
|
+
declare function useQuota(options?: UseQuotaOptions): QuotaState;
|
|
390
443
|
|
|
391
444
|
interface UseMessageFeedbackOptions {
|
|
392
|
-
/**
|
|
393
|
-
backend
|
|
445
|
+
/** Default: the enclosing `<AgentProvider>`'s. Must implement `setMessageFeedback`. */
|
|
446
|
+
backend?: AgentBackend;
|
|
394
447
|
/**
|
|
395
448
|
* The thread the messages belong to — `useAgentChat(...).getThreadId`, or an id. Needed to rate a
|
|
396
449
|
* message streamed in this session: its id is the client's own, so the persisted row it became is
|
|
@@ -415,7 +468,7 @@ interface MessageFeedbackState {
|
|
|
415
468
|
* Headless: it holds the state and the calls, the host draws the buttons. A rating shows at once
|
|
416
469
|
* and rolls back if the server refuses it.
|
|
417
470
|
*/
|
|
418
|
-
declare function useMessageFeedback(options
|
|
471
|
+
declare function useMessageFeedback(options?: UseMessageFeedbackOptions): MessageFeedbackState;
|
|
419
472
|
|
|
420
473
|
/**
|
|
421
474
|
* What changed about a backend's thread list. `changed` → refetch (a thread was created, or a run
|
|
@@ -439,11 +492,11 @@ declare function onThreadsEvent(backend: AgentBackend, listener: Listener): () =
|
|
|
439
492
|
|
|
440
493
|
interface UseThreadsOptions {
|
|
441
494
|
/**
|
|
442
|
-
* The backend to list
|
|
495
|
+
* The backend to list. Default: the enclosing `<AgentProvider>`'s. Must be STABLE across renders:
|
|
443
496
|
* the list refreshes itself when a chat on the SAME backend creates a thread, settles a run or
|
|
444
497
|
* streams a title.
|
|
445
498
|
*/
|
|
446
|
-
backend
|
|
499
|
+
backend?: AgentBackend;
|
|
447
500
|
/** `false` holds the first request (e.g. until the user is signed in). Default `true`. */
|
|
448
501
|
enabled?: boolean;
|
|
449
502
|
}
|
|
@@ -464,7 +517,7 @@ interface ThreadsState {
|
|
|
464
517
|
* backend reports thread creation and settled runs (refetch) and streamed titles (patched in
|
|
465
518
|
* place). Headless — it renders nothing.
|
|
466
519
|
*/
|
|
467
|
-
declare function useThreads(options
|
|
520
|
+
declare function useThreads(options?: UseThreadsOptions): ThreadsState;
|
|
468
521
|
|
|
469
522
|
/**
|
|
470
523
|
* A sub-agent the conversation started and did not wait for. The chat is free while it works, so a
|
|
@@ -1025,8 +1078,8 @@ interface SkillSuggestionData {
|
|
|
1025
1078
|
shadows?: string[];
|
|
1026
1079
|
}
|
|
1027
1080
|
interface SkillsSourceOptions {
|
|
1028
|
-
/** Any backend with `listSkills` — `useAgentChat(
|
|
1029
|
-
|
|
1081
|
+
/** Any backend with `listSkills` — `useAgentBackend()`, or `useAgentChat().backend`. */
|
|
1082
|
+
backend: Pick<AgentBackend, 'listSkills'>;
|
|
1030
1083
|
/**
|
|
1031
1084
|
* Read at query time, not captured once: a threadless chat learns its id only when the backend
|
|
1032
1085
|
* creates one on the first send, and a skill may be scoped to a conversation.
|
|
@@ -1122,13 +1175,12 @@ declare function useComposerAutocomplete(options: UseComposerAutocompleteOptions
|
|
|
1122
1175
|
|
|
1123
1176
|
/** What the catalog needs of a backend. */
|
|
1124
1177
|
type ToolsBackend = Pick<AgentBackend, 'listTools'>;
|
|
1125
|
-
|
|
1126
1178
|
interface UseToolCatalogOptions {
|
|
1127
1179
|
/**
|
|
1128
|
-
* The
|
|
1129
|
-
*
|
|
1180
|
+
* The backend to ask. Default: the enclosing `<AgentProvider>`'s. Must be STABLE across renders
|
|
1181
|
+
* (the shared copy is keyed by it): a backend constructed inline refetches every render.
|
|
1130
1182
|
*/
|
|
1131
|
-
|
|
1183
|
+
backend?: ToolsBackend;
|
|
1132
1184
|
/** The agent whose tools to list. Omitted → the server's default agent. */
|
|
1133
1185
|
agent?: string;
|
|
1134
1186
|
/** `false` holds the request (e.g. until the user is signed in). Default `true`. */
|
|
@@ -1149,7 +1201,7 @@ interface ToolCatalogState {
|
|
|
1149
1201
|
* `phraseFor`, `describeToolCall` and `groupToolActivity` — or pass `catalog` to
|
|
1150
1202
|
* `useChatTranscript({ toolCatalog })` and read the phrases off the transcript's calls.
|
|
1151
1203
|
*/
|
|
1152
|
-
declare function useToolCatalog(options
|
|
1204
|
+
declare function useToolCatalog(options?: UseToolCatalogOptions): ToolCatalogState;
|
|
1153
1205
|
|
|
1154
1206
|
interface ApprovalCountdown {
|
|
1155
1207
|
/** Milliseconds until the request lapses, floored at 0; `null` when it never does. */
|
|
@@ -1272,11 +1324,10 @@ interface AgentMessageMetadata extends Partial<StoredTurnMetadata> {
|
|
|
1272
1324
|
*/
|
|
1273
1325
|
declare function storedThreadToUiMessages(messages: StoredMessage[]): UIMessage[];
|
|
1274
1326
|
|
|
1275
|
-
interface UseAgentChatOptions<B extends AgentBackend =
|
|
1327
|
+
interface UseAgentChatOptions<B extends AgentBackend = AgentBackend> {
|
|
1276
1328
|
/**
|
|
1277
|
-
* What the chat talks to — see {@link AgentBackend}. Omitted →
|
|
1278
|
-
*
|
|
1279
|
-
* (which are ignored when a backend is given). Must be stable across renders.
|
|
1329
|
+
* What the chat talks to — see {@link AgentBackend}. Omitted → the enclosing `<AgentProvider>`'s,
|
|
1330
|
+
* else a same-origin client on `/agent`. Must be stable across renders.
|
|
1280
1331
|
*/
|
|
1281
1332
|
backend?: B;
|
|
1282
1333
|
/**
|
|
@@ -1285,24 +1336,6 @@ interface UseAgentChatOptions<B extends AgentBackend = AgentClient> {
|
|
|
1285
1336
|
* it off.
|
|
1286
1337
|
*/
|
|
1287
1338
|
reconnect?: ReconnectOptions | false;
|
|
1288
|
-
/** Origin + base path, e.g. `https://api.example.com`. Defaults to `''`. */
|
|
1289
|
-
baseUrl?: string;
|
|
1290
|
-
/** Static headers merged into every request. */
|
|
1291
|
-
headers?: Record<string, string>;
|
|
1292
|
-
/** Resolved per request — for short-lived bearer tokens. */
|
|
1293
|
-
getHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
1294
|
-
/** Forwarded to fetch so cookie auth/impersonation works. */
|
|
1295
|
-
credentials?: RequestCredentials;
|
|
1296
|
-
/** Injectable for tests / non-browser runtimes. */
|
|
1297
|
-
fetch?: typeof fetch;
|
|
1298
|
-
/**
|
|
1299
|
-
* How the built-in client uploads attachments (ignored when a backend is given) — e.g.
|
|
1300
|
-
* `mediaAttachments()` from `@dudousxd/nestjs-agent-react/media`. Pass `chat.backend` to
|
|
1301
|
-
* `useAttachments` and every composer uses it.
|
|
1302
|
-
*/
|
|
1303
|
-
attachments?: AttachmentUploadStrategy;
|
|
1304
|
-
/** Reuse an existing client instead of constructing one. Prefer {@link backend}. */
|
|
1305
|
-
client?: B;
|
|
1306
1339
|
/** Named agent to run each turn. */
|
|
1307
1340
|
agent?: string;
|
|
1308
1341
|
/**
|
|
@@ -1422,7 +1455,7 @@ interface AddToolResultArgs {
|
|
|
1422
1455
|
* fork, quota, cancel, and HITL approve/reject — all driven through
|
|
1423
1456
|
* `AgentClient`. Mirrors flip's `useAdminChat`, generalized.
|
|
1424
1457
|
*/
|
|
1425
|
-
declare function useAgentChat<B extends AgentBackend =
|
|
1458
|
+
declare function useAgentChat<B extends AgentBackend = AgentBackend>(options?: UseAgentChatOptions<B>): {
|
|
1426
1459
|
status: ChatStatus;
|
|
1427
1460
|
/** Where the live stream stands — see {@link StreamConnectionState}. */
|
|
1428
1461
|
connection: StreamConnectionState;
|
|
@@ -1457,10 +1490,8 @@ declare function useAgentChat<B extends AgentBackend = AgentClient>(options: Use
|
|
|
1457
1490
|
*/
|
|
1458
1491
|
getThreadId: () => string | undefined;
|
|
1459
1492
|
setThreadModel: (model: string | null) => Promise<void>;
|
|
1460
|
-
/** The backend this chat talks to —
|
|
1493
|
+
/** The backend this chat talks to — the same one every other hook under the provider uses. */
|
|
1461
1494
|
backend: B;
|
|
1462
|
-
/** Same object as {@link backend}; kept for callers that read it under its old name. */
|
|
1463
|
-
client: B;
|
|
1464
1495
|
threads: ThreadSummary[];
|
|
1465
1496
|
loadThreads: () => Promise<ThreadSummary[]>;
|
|
1466
1497
|
loadThread: (id: string) => Promise<ThreadDetail>;
|
|
@@ -1507,4 +1538,4 @@ declare class QuotaBlockedError extends Error {
|
|
|
1507
1538
|
constructor(block: QuotaBlock);
|
|
1508
1539
|
}
|
|
1509
1540
|
|
|
1510
|
-
export { AgentBackend, AgentChatTransport, type AgentChatTransportOptions,
|
|
1541
|
+
export { AgentBackend, AgentChatTransport, type AgentChatTransportOptions, type AgentMessageMetadata, AgentProvider, type AgentProviderProps, type AgentStreamMeta, type AgentsState, type AggregatedTurnUsage, type AmbientRenderUi, AmbientRenderUiContext, AnyToolUIPart, type ApprovalCountdown, ApproveOptions, type AttachmentRejection, AttachmentUploadStrategy, type AttachmentsState, type AutocompleteInputProps, type AutocompleteItem, type AutocompleteListboxProps, type AutocompleteOptionProps, type AutocompleteSource, type BackgroundRun, type ChatBackground, ChatInput, type ChatInputProps, ChatStatus, type ChatTranscript, type ClipboardLikeEvent, type CompletionEdit, type ComposerAutocomplete, DEFAULT_SPEECH_LANG, type DragLikeEvent, type MessageFeedbackState, type MessageFile, type MessageFileKind, MessageItem, type MessageItemClassNames, type MessageItemProps, MessageItemView, type MessageItemViewProps, MessageList, type MessageListClassNames, type MessageListProps, MessageUsageInfo, type ModelOption, type ModelsState, QuotaBlockedError, type QuotaState, QuotaToday, type ReconnectOptions, type RenderFilesFn, type RenderReasoningFn, type RenderTextFn, type RenderToolGroupFn, type RenderToolPartFn, type RenderUiFn, SPEECH_LANGUAGES, type SkillSuggestionData, type SkillsSourceOptions, type SpeechLanguage, type SpeechRecognitionHook, type StagedAttachment, type StagedAttachmentStatus, type StickToBottom, type StickToBottomOptions, type StoredTurnMetadata, type StreamConnectionState, type ThreadsEvent, type ThreadsState, TimestampInfo, ToolCatalog, type ToolCatalogState, type TranscriptActionState, TranscriptBlock, type TranscriptCopyState, type TranscriptEditState, TranscriptFile, type TranscriptItem, type TranscriptItemOptions, type TranscriptStopState, TranscriptUiBlock, type TranscriptWindow, type TriggerMatch, type TriggerPosition, UploadAttachmentOptions, UsageSummary, type UseAgentChatOptions, type UseAgentsOptions, type UseApprovalCountdownOptions, type UseAttachmentsOptions, type UseChatTranscriptOptions, type UseComposerAutocompleteOptions, type UseElapsedOptions, type UseMessageFeedbackOptions, type UseModelsOptions, type UseQuotaOptions, type UseSpeechRecognitionOptions, type UseThreadsOptions, type UseToolCatalogOptions, type UseTranscriptItemOptions, acceptsFile, applyCompletion, approvalCountdown, backgroundRunsFromThread, createSkillsSource, dragHasFiles, fileKind, filesFromClipboard, filterAutocompleteItems, findActiveTrigger, formatElapsed, loadStoredSpeechLang, messageFiles, notifyThreads, onThreadsEvent, persistSpeechLang, readReasoningMs, storedMessageToUiMessage, storedThreadToUiMessages, useAgentBackend, useAgentChat, useAgents, useAmbientRenderUi, useApprovalCountdown, useAttachments, useChatTranscript, useComposerAutocomplete, useElapsed, useMessageFeedback, useModels, useQuota, useSpeechRecognition, useStickToBottom, useThreads, useToolCatalog, useTranscriptItem };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
2
|
import { ChatTransport, UIMessage, UIMessageChunk, DataUIPart, UIDataTypes } from 'ai';
|
|
3
|
-
import { A as AgentBackend, U as UploadAttachmentOptions, a as
|
|
4
|
-
export {
|
|
3
|
+
import { A as AgentBackend, U as UploadAttachmentOptions, a as AttachmentUploadStrategy, Q as QuotaToday } from './client-ePlgRwP-.js';
|
|
4
|
+
export { b as AgentBackendUnsupportedError, c as AgentClient, d as AgentClientOptions, e as AgentConnection, f as AgentHttpError, C as CancelResult, g as ChatStreamRequest, h as ChatStreamResponse, M as MessageFeedbackInput, R as ResumeStreamRequest, T as ThreadPatch, r as requireBackendMethod } from './client-ePlgRwP-.js';
|
|
5
5
|
import * as _dudousxd_nestjs_agent_core from '@dudousxd/nestjs-agent-core';
|
|
6
6
|
import { MessageAttachment, AgentCatalogEntry, ModelCatalogEntry, ModelCatalogView, QuotaReport, QuotaWindow, QuotaBlock, MessageFeedback, MessageFeedbackValue, ThreadSummary, StoredMessage, ToolCatalogEntry, ThreadDetail } from '@dudousxd/nestjs-agent-core';
|
|
7
7
|
export { ElicitationInput, ElicitationInputType, validateElicitationAnswer as validateAnswer, validateElicitationValue as validateAnswerValue } from '@dudousxd/nestjs-agent-core';
|
|
8
|
+
import * as React from 'react';
|
|
8
9
|
import React__default, { ReactNode, Context } from 'react';
|
|
9
|
-
import { T as TranscriptUiBlock,
|
|
10
|
-
export {
|
|
10
|
+
import { o as GenuiProviderValue, T as TranscriptUiBlock, t as TranscriptBlock, U as UsageSummary, v as TimestampInfo, C as ChatStatus, M as MessageUsageInfo, w as ToolCatalog, A as ApproveOptions, x as AnyToolUIPart, y as TranscriptFile } from './generative-ui-9AJNVKBZ.js';
|
|
11
|
+
export { z as ApprovalBlockOptions, B as BuildBlocksOptions, D as CoercibleQuestion, E as DescribeToolCallOptions, F as ElicitationBlockOptions, H as GroupToolActivityOptions, I as RawAnswer, J as ResolvedReading, K as ResolvedResultView, L as RetrievedPassage, S as SettleAction, N as ToolActivityGroup, O as ToolCallDescription, P as ToolCallState, Q as ToolCallStatus, V as TranscriptApproval, W as TranscriptApprovalStatus, X as TranscriptElicitationBlock, Y as TranscriptElicitationOutcome, Z as TranscriptFilesBlock, _ as TranscriptQuestion, $ as TranscriptQuestionOption, a0 as TranscriptReasoningBlock, a1 as TranscriptSettleState, a2 as TranscriptSource, a3 as TranscriptSourcesBlock, a4 as TranscriptTextBlock, a5 as TranscriptToolBlock, a6 as TranscriptToolCall, a7 as buildTranscriptBlocks, a8 as coerceAnswer, a9 as correctedCallIds, aa as describeTimestamp, ab as describeToolCall, ac as describeUsage, ad as extractMessageText, ae as fillTemplate, af as formatRelativeTime, ag as groupToolActivity, ah as inferResultView, ai as isActionCall, aj as phraseFor, ak as readPath, al as resolveResultView, am as toolCallState, an as toolCatalogFrom } from './generative-ui-9AJNVKBZ.js';
|
|
11
12
|
|
|
12
13
|
/** Identity surfaced by the backend's `meta` SSE frame / response headers. */
|
|
13
14
|
interface AgentStreamMeta {
|
|
@@ -56,12 +57,10 @@ interface AgentChatTransportOptions {
|
|
|
56
57
|
reconnect?: ReconnectOptions | false;
|
|
57
58
|
/** Fires as a stream drops, reconnects, or gives up. */
|
|
58
59
|
onConnectionChange?: (state: StreamConnectionState) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Origin + base path the agent endpoints hang off, e.g.
|
|
61
|
-
* `https://api.example.com`. Endpoints are appended as
|
|
62
|
-
* `${baseUrl}/agent/chat` etc. Defaults to `''` (same origin).
|
|
63
|
-
*/
|
|
60
|
+
/** The server's origin, e.g. `https://api.example.com`. Defaults to `''` (same origin). */
|
|
64
61
|
baseUrl?: string;
|
|
62
|
+
/** The agent's route prefix (`AgentModule`'s `path`, global prefix included). Default `'agent'`. */
|
|
63
|
+
path?: string;
|
|
65
64
|
/** Static headers merged into every request (e.g. a tenant ref). */
|
|
66
65
|
headers?: Record<string, string>;
|
|
67
66
|
/**
|
|
@@ -232,7 +231,7 @@ interface UseAttachmentsOptions {
|
|
|
232
231
|
* answered; honour `signal` so `remove` can cancel; call `onProgress(0..1)` if you can.
|
|
233
232
|
*/
|
|
234
233
|
upload?: (file: File, options: UploadAttachmentOptions) => Promise<MessageAttachment>;
|
|
235
|
-
/** Used for the default `upload`.
|
|
234
|
+
/** Used for the default `upload`. Default: the enclosing `<AgentProvider>`'s. */
|
|
236
235
|
backend?: AgentBackend;
|
|
237
236
|
/** `<input accept>` grammar: `'image/*,.pdf'` or `['image/*', 'application/pdf']`. */
|
|
238
237
|
accept?: string | readonly string[];
|
|
@@ -303,11 +302,65 @@ interface ClipboardLikeEvent {
|
|
|
303
302
|
* files.clear();
|
|
304
303
|
* ```
|
|
305
304
|
*/
|
|
306
|
-
declare function useAttachments(options
|
|
305
|
+
declare function useAttachments(options?: UseAttachmentsOptions): AttachmentsState;
|
|
306
|
+
|
|
307
|
+
interface AgentProviderProps {
|
|
308
|
+
/**
|
|
309
|
+
* A backend of your own — see {@link AgentBackend}. Omitted → an {@link AgentClient} over this
|
|
310
|
+
* library's REST routes, built from the connection props below (which are ignored when a backend
|
|
311
|
+
* is given). Must be stable across renders.
|
|
312
|
+
*/
|
|
313
|
+
backend?: AgentBackend;
|
|
314
|
+
/** The server's origin, e.g. `https://api.example.com`. Default `''` (same origin). */
|
|
315
|
+
baseUrl?: string;
|
|
316
|
+
/** `AgentModule`'s `path`, global prefix included (`'api/agent'`). Default `'agent'`. */
|
|
317
|
+
path?: string;
|
|
318
|
+
/** Static headers on every request. */
|
|
319
|
+
headers?: Record<string, string>;
|
|
320
|
+
/**
|
|
321
|
+
* Read at every request — a short-lived bearer token, or a CSRF header read from a cookie
|
|
322
|
+
* (`{ 'X-XSRF-TOKEN': readCookie('XSRF-TOKEN') }`).
|
|
323
|
+
*/
|
|
324
|
+
getHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
325
|
+
/** `'include'` when the API is on another origin and authenticates by cookie. */
|
|
326
|
+
credentials?: RequestCredentials;
|
|
327
|
+
/** Injectable for tests / non-browser runtimes. */
|
|
328
|
+
fetch?: typeof fetch;
|
|
329
|
+
/** Attachment uploads of the built-in client. */
|
|
330
|
+
attachments?: {
|
|
331
|
+
/** e.g. `mediaAttachments()` from `@dudousxd/nestjs-agent-react/media`. */
|
|
332
|
+
upload?: AttachmentUploadStrategy;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Set generative UI up here — the same settings `<GenuiProvider>` takes (registry, catalog,
|
|
336
|
+
* resolver, fallback, …). Every message then draws pushed components with them.
|
|
337
|
+
*/
|
|
338
|
+
genui?: GenuiProviderValue;
|
|
339
|
+
children?: ReactNode;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* The agent connection, once, at the app root. Every hook below it — `useAgentChat`, `useThreads`,
|
|
343
|
+
* `useModels`, `useAgents`, `useQuota`, `useToolCatalog`, `useMessageFeedback`, `useAttachments` —
|
|
344
|
+
* talks to it unless handed a `backend` of its own.
|
|
345
|
+
*
|
|
346
|
+
* ```tsx
|
|
347
|
+
* <AgentProvider baseUrl="https://api.example.com" credentials="include">
|
|
348
|
+
* <App />
|
|
349
|
+
* </AgentProvider>
|
|
350
|
+
* ```
|
|
351
|
+
*
|
|
352
|
+
* Without a provider every hook shares one same-origin client on `/agent`.
|
|
353
|
+
*/
|
|
354
|
+
declare function AgentProvider({ backend, baseUrl, path, headers, getHeaders, credentials, fetch, attachments, genui, children, }: AgentProviderProps): React.JSX.Element;
|
|
355
|
+
/**
|
|
356
|
+
* The backend a hook talks to: `own` when given, else the enclosing {@link AgentProvider}'s, else a
|
|
357
|
+
* shared same-origin client on `/agent`. For your own hooks over the same connection.
|
|
358
|
+
*/
|
|
359
|
+
declare function useAgentBackend<B extends AgentBackend = AgentBackend>(own?: B): B;
|
|
307
360
|
|
|
308
361
|
interface UseAgentsOptions {
|
|
309
|
-
/**
|
|
310
|
-
backend
|
|
362
|
+
/** Default: the enclosing `<AgentProvider>`'s. Must implement `listAgents`. */
|
|
363
|
+
backend?: AgentBackend;
|
|
311
364
|
/** `false` holds the request. Default `true`. */
|
|
312
365
|
enabled?: boolean;
|
|
313
366
|
}
|
|
@@ -324,11 +377,11 @@ interface AgentsState {
|
|
|
324
377
|
* The registered agents (`GET <base>/agents`) — the data behind an agent picker. Send the pick as
|
|
325
378
|
* `useAgentChat({ agent })`, or pin it on a thread with `PATCH <base>/threads/:id { defaultAgent }`.
|
|
326
379
|
*/
|
|
327
|
-
declare function useAgents(options
|
|
380
|
+
declare function useAgents(options?: UseAgentsOptions): AgentsState;
|
|
328
381
|
|
|
329
382
|
interface UseModelsOptions {
|
|
330
|
-
/**
|
|
331
|
-
backend
|
|
383
|
+
/** Default: the enclosing `<AgentProvider>`'s. Must implement `listModels`. */
|
|
384
|
+
backend?: AgentBackend;
|
|
332
385
|
/** The agent to list models for; omitted → the default agent. */
|
|
333
386
|
agent?: string;
|
|
334
387
|
/** `false` holds the request. Default `true`. */
|
|
@@ -358,11 +411,11 @@ interface ModelsState {
|
|
|
358
411
|
* as `useAgentChat({ model })`, `sendMessage(msg, { body: { model } })`, or pin it on the thread
|
|
359
412
|
* with `chat.setThreadModel(id)`.
|
|
360
413
|
*/
|
|
361
|
-
declare function useModels(options
|
|
414
|
+
declare function useModels(options?: UseModelsOptions): ModelsState;
|
|
362
415
|
|
|
363
416
|
interface UseQuotaOptions {
|
|
364
|
-
/**
|
|
365
|
-
backend
|
|
417
|
+
/** Default: the enclosing `<AgentProvider>`'s. Must implement `getQuota`. */
|
|
418
|
+
backend?: AgentBackend;
|
|
366
419
|
/** `false` holds the request. Default `true`. */
|
|
367
420
|
enabled?: boolean;
|
|
368
421
|
/** Re-read every `pollMs` ms as well. Default: only on mount, after runs, and on `refresh`. */
|
|
@@ -386,11 +439,11 @@ interface QuotaState {
|
|
|
386
439
|
* one — if any — blocks sends. Re-read after every run a chat on the same backend settles, so a
|
|
387
440
|
* meter moves with the conversation. Headless: draw the meter yourself.
|
|
388
441
|
*/
|
|
389
|
-
declare function useQuota(options
|
|
442
|
+
declare function useQuota(options?: UseQuotaOptions): QuotaState;
|
|
390
443
|
|
|
391
444
|
interface UseMessageFeedbackOptions {
|
|
392
|
-
/**
|
|
393
|
-
backend
|
|
445
|
+
/** Default: the enclosing `<AgentProvider>`'s. Must implement `setMessageFeedback`. */
|
|
446
|
+
backend?: AgentBackend;
|
|
394
447
|
/**
|
|
395
448
|
* The thread the messages belong to — `useAgentChat(...).getThreadId`, or an id. Needed to rate a
|
|
396
449
|
* message streamed in this session: its id is the client's own, so the persisted row it became is
|
|
@@ -415,7 +468,7 @@ interface MessageFeedbackState {
|
|
|
415
468
|
* Headless: it holds the state and the calls, the host draws the buttons. A rating shows at once
|
|
416
469
|
* and rolls back if the server refuses it.
|
|
417
470
|
*/
|
|
418
|
-
declare function useMessageFeedback(options
|
|
471
|
+
declare function useMessageFeedback(options?: UseMessageFeedbackOptions): MessageFeedbackState;
|
|
419
472
|
|
|
420
473
|
/**
|
|
421
474
|
* What changed about a backend's thread list. `changed` → refetch (a thread was created, or a run
|
|
@@ -439,11 +492,11 @@ declare function onThreadsEvent(backend: AgentBackend, listener: Listener): () =
|
|
|
439
492
|
|
|
440
493
|
interface UseThreadsOptions {
|
|
441
494
|
/**
|
|
442
|
-
* The backend to list
|
|
495
|
+
* The backend to list. Default: the enclosing `<AgentProvider>`'s. Must be STABLE across renders:
|
|
443
496
|
* the list refreshes itself when a chat on the SAME backend creates a thread, settles a run or
|
|
444
497
|
* streams a title.
|
|
445
498
|
*/
|
|
446
|
-
backend
|
|
499
|
+
backend?: AgentBackend;
|
|
447
500
|
/** `false` holds the first request (e.g. until the user is signed in). Default `true`. */
|
|
448
501
|
enabled?: boolean;
|
|
449
502
|
}
|
|
@@ -464,7 +517,7 @@ interface ThreadsState {
|
|
|
464
517
|
* backend reports thread creation and settled runs (refetch) and streamed titles (patched in
|
|
465
518
|
* place). Headless — it renders nothing.
|
|
466
519
|
*/
|
|
467
|
-
declare function useThreads(options
|
|
520
|
+
declare function useThreads(options?: UseThreadsOptions): ThreadsState;
|
|
468
521
|
|
|
469
522
|
/**
|
|
470
523
|
* A sub-agent the conversation started and did not wait for. The chat is free while it works, so a
|
|
@@ -1025,8 +1078,8 @@ interface SkillSuggestionData {
|
|
|
1025
1078
|
shadows?: string[];
|
|
1026
1079
|
}
|
|
1027
1080
|
interface SkillsSourceOptions {
|
|
1028
|
-
/** Any backend with `listSkills` — `useAgentChat(
|
|
1029
|
-
|
|
1081
|
+
/** Any backend with `listSkills` — `useAgentBackend()`, or `useAgentChat().backend`. */
|
|
1082
|
+
backend: Pick<AgentBackend, 'listSkills'>;
|
|
1030
1083
|
/**
|
|
1031
1084
|
* Read at query time, not captured once: a threadless chat learns its id only when the backend
|
|
1032
1085
|
* creates one on the first send, and a skill may be scoped to a conversation.
|
|
@@ -1122,13 +1175,12 @@ declare function useComposerAutocomplete(options: UseComposerAutocompleteOptions
|
|
|
1122
1175
|
|
|
1123
1176
|
/** What the catalog needs of a backend. */
|
|
1124
1177
|
type ToolsBackend = Pick<AgentBackend, 'listTools'>;
|
|
1125
|
-
|
|
1126
1178
|
interface UseToolCatalogOptions {
|
|
1127
1179
|
/**
|
|
1128
|
-
* The
|
|
1129
|
-
*
|
|
1180
|
+
* The backend to ask. Default: the enclosing `<AgentProvider>`'s. Must be STABLE across renders
|
|
1181
|
+
* (the shared copy is keyed by it): a backend constructed inline refetches every render.
|
|
1130
1182
|
*/
|
|
1131
|
-
|
|
1183
|
+
backend?: ToolsBackend;
|
|
1132
1184
|
/** The agent whose tools to list. Omitted → the server's default agent. */
|
|
1133
1185
|
agent?: string;
|
|
1134
1186
|
/** `false` holds the request (e.g. until the user is signed in). Default `true`. */
|
|
@@ -1149,7 +1201,7 @@ interface ToolCatalogState {
|
|
|
1149
1201
|
* `phraseFor`, `describeToolCall` and `groupToolActivity` — or pass `catalog` to
|
|
1150
1202
|
* `useChatTranscript({ toolCatalog })` and read the phrases off the transcript's calls.
|
|
1151
1203
|
*/
|
|
1152
|
-
declare function useToolCatalog(options
|
|
1204
|
+
declare function useToolCatalog(options?: UseToolCatalogOptions): ToolCatalogState;
|
|
1153
1205
|
|
|
1154
1206
|
interface ApprovalCountdown {
|
|
1155
1207
|
/** Milliseconds until the request lapses, floored at 0; `null` when it never does. */
|
|
@@ -1272,11 +1324,10 @@ interface AgentMessageMetadata extends Partial<StoredTurnMetadata> {
|
|
|
1272
1324
|
*/
|
|
1273
1325
|
declare function storedThreadToUiMessages(messages: StoredMessage[]): UIMessage[];
|
|
1274
1326
|
|
|
1275
|
-
interface UseAgentChatOptions<B extends AgentBackend =
|
|
1327
|
+
interface UseAgentChatOptions<B extends AgentBackend = AgentBackend> {
|
|
1276
1328
|
/**
|
|
1277
|
-
* What the chat talks to — see {@link AgentBackend}. Omitted →
|
|
1278
|
-
*
|
|
1279
|
-
* (which are ignored when a backend is given). Must be stable across renders.
|
|
1329
|
+
* What the chat talks to — see {@link AgentBackend}. Omitted → the enclosing `<AgentProvider>`'s,
|
|
1330
|
+
* else a same-origin client on `/agent`. Must be stable across renders.
|
|
1280
1331
|
*/
|
|
1281
1332
|
backend?: B;
|
|
1282
1333
|
/**
|
|
@@ -1285,24 +1336,6 @@ interface UseAgentChatOptions<B extends AgentBackend = AgentClient> {
|
|
|
1285
1336
|
* it off.
|
|
1286
1337
|
*/
|
|
1287
1338
|
reconnect?: ReconnectOptions | false;
|
|
1288
|
-
/** Origin + base path, e.g. `https://api.example.com`. Defaults to `''`. */
|
|
1289
|
-
baseUrl?: string;
|
|
1290
|
-
/** Static headers merged into every request. */
|
|
1291
|
-
headers?: Record<string, string>;
|
|
1292
|
-
/** Resolved per request — for short-lived bearer tokens. */
|
|
1293
|
-
getHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
1294
|
-
/** Forwarded to fetch so cookie auth/impersonation works. */
|
|
1295
|
-
credentials?: RequestCredentials;
|
|
1296
|
-
/** Injectable for tests / non-browser runtimes. */
|
|
1297
|
-
fetch?: typeof fetch;
|
|
1298
|
-
/**
|
|
1299
|
-
* How the built-in client uploads attachments (ignored when a backend is given) — e.g.
|
|
1300
|
-
* `mediaAttachments()` from `@dudousxd/nestjs-agent-react/media`. Pass `chat.backend` to
|
|
1301
|
-
* `useAttachments` and every composer uses it.
|
|
1302
|
-
*/
|
|
1303
|
-
attachments?: AttachmentUploadStrategy;
|
|
1304
|
-
/** Reuse an existing client instead of constructing one. Prefer {@link backend}. */
|
|
1305
|
-
client?: B;
|
|
1306
1339
|
/** Named agent to run each turn. */
|
|
1307
1340
|
agent?: string;
|
|
1308
1341
|
/**
|
|
@@ -1422,7 +1455,7 @@ interface AddToolResultArgs {
|
|
|
1422
1455
|
* fork, quota, cancel, and HITL approve/reject — all driven through
|
|
1423
1456
|
* `AgentClient`. Mirrors flip's `useAdminChat`, generalized.
|
|
1424
1457
|
*/
|
|
1425
|
-
declare function useAgentChat<B extends AgentBackend =
|
|
1458
|
+
declare function useAgentChat<B extends AgentBackend = AgentBackend>(options?: UseAgentChatOptions<B>): {
|
|
1426
1459
|
status: ChatStatus;
|
|
1427
1460
|
/** Where the live stream stands — see {@link StreamConnectionState}. */
|
|
1428
1461
|
connection: StreamConnectionState;
|
|
@@ -1457,10 +1490,8 @@ declare function useAgentChat<B extends AgentBackend = AgentClient>(options: Use
|
|
|
1457
1490
|
*/
|
|
1458
1491
|
getThreadId: () => string | undefined;
|
|
1459
1492
|
setThreadModel: (model: string | null) => Promise<void>;
|
|
1460
|
-
/** The backend this chat talks to —
|
|
1493
|
+
/** The backend this chat talks to — the same one every other hook under the provider uses. */
|
|
1461
1494
|
backend: B;
|
|
1462
|
-
/** Same object as {@link backend}; kept for callers that read it under its old name. */
|
|
1463
|
-
client: B;
|
|
1464
1495
|
threads: ThreadSummary[];
|
|
1465
1496
|
loadThreads: () => Promise<ThreadSummary[]>;
|
|
1466
1497
|
loadThread: (id: string) => Promise<ThreadDetail>;
|
|
@@ -1507,4 +1538,4 @@ declare class QuotaBlockedError extends Error {
|
|
|
1507
1538
|
constructor(block: QuotaBlock);
|
|
1508
1539
|
}
|
|
1509
1540
|
|
|
1510
|
-
export { AgentBackend, AgentChatTransport, type AgentChatTransportOptions,
|
|
1541
|
+
export { AgentBackend, AgentChatTransport, type AgentChatTransportOptions, type AgentMessageMetadata, AgentProvider, type AgentProviderProps, type AgentStreamMeta, type AgentsState, type AggregatedTurnUsage, type AmbientRenderUi, AmbientRenderUiContext, AnyToolUIPart, type ApprovalCountdown, ApproveOptions, type AttachmentRejection, AttachmentUploadStrategy, type AttachmentsState, type AutocompleteInputProps, type AutocompleteItem, type AutocompleteListboxProps, type AutocompleteOptionProps, type AutocompleteSource, type BackgroundRun, type ChatBackground, ChatInput, type ChatInputProps, ChatStatus, type ChatTranscript, type ClipboardLikeEvent, type CompletionEdit, type ComposerAutocomplete, DEFAULT_SPEECH_LANG, type DragLikeEvent, type MessageFeedbackState, type MessageFile, type MessageFileKind, MessageItem, type MessageItemClassNames, type MessageItemProps, MessageItemView, type MessageItemViewProps, MessageList, type MessageListClassNames, type MessageListProps, MessageUsageInfo, type ModelOption, type ModelsState, QuotaBlockedError, type QuotaState, QuotaToday, type ReconnectOptions, type RenderFilesFn, type RenderReasoningFn, type RenderTextFn, type RenderToolGroupFn, type RenderToolPartFn, type RenderUiFn, SPEECH_LANGUAGES, type SkillSuggestionData, type SkillsSourceOptions, type SpeechLanguage, type SpeechRecognitionHook, type StagedAttachment, type StagedAttachmentStatus, type StickToBottom, type StickToBottomOptions, type StoredTurnMetadata, type StreamConnectionState, type ThreadsEvent, type ThreadsState, TimestampInfo, ToolCatalog, type ToolCatalogState, type TranscriptActionState, TranscriptBlock, type TranscriptCopyState, type TranscriptEditState, TranscriptFile, type TranscriptItem, type TranscriptItemOptions, type TranscriptStopState, TranscriptUiBlock, type TranscriptWindow, type TriggerMatch, type TriggerPosition, UploadAttachmentOptions, UsageSummary, type UseAgentChatOptions, type UseAgentsOptions, type UseApprovalCountdownOptions, type UseAttachmentsOptions, type UseChatTranscriptOptions, type UseComposerAutocompleteOptions, type UseElapsedOptions, type UseMessageFeedbackOptions, type UseModelsOptions, type UseQuotaOptions, type UseSpeechRecognitionOptions, type UseThreadsOptions, type UseToolCatalogOptions, type UseTranscriptItemOptions, acceptsFile, applyCompletion, approvalCountdown, backgroundRunsFromThread, createSkillsSource, dragHasFiles, fileKind, filesFromClipboard, filterAutocompleteItems, findActiveTrigger, formatElapsed, loadStoredSpeechLang, messageFiles, notifyThreads, onThreadsEvent, persistSpeechLang, readReasoningMs, storedMessageToUiMessage, storedThreadToUiMessages, useAgentBackend, useAgentChat, useAgents, useAmbientRenderUi, useApprovalCountdown, useAttachments, useChatTranscript, useComposerAutocomplete, useElapsed, useMessageFeedback, useModels, useQuota, useSpeechRecognition, useStickToBottom, useThreads, useToolCatalog, useTranscriptItem };
|