@dudousxd/nestjs-agent-react 0.26.0 → 0.27.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 CHANGED
@@ -37,7 +37,8 @@ handlers passed. On top of the AI SDK chat it returns:
37
37
  | On `chat` | What it is |
38
38
  |---|---|
39
39
  | `transcript` | `useChatTranscript` already bound to the chat — approve/reject/answer/skip, stop, fork, regenerate, the tool catalog, and timestamps/usage read from message metadata. Override any of it with `useAgentChat({ transcript: { … } })`. |
40
- | `composer` | `{ text, setText, files, canSend, blockedBy, submit() }` — `files` is `useAttachments` on the chat's backend; `submit()` sends the draft with the ready files attached and clears both; `blockedBy` is `'empty' \| 'busy' \| 'uploading' \| 'quota'`. |
40
+ | `composer` | `{ text, setText, files, canSend, blockedBy, submit() }` — `files` is `useAttachments` on the chat's backend; `submit()` sends the draft with the ready files attached and clears both — while a turn runs it QUEUES it (see *Typing ahead*); `blockedBy` is `'empty' \| 'busy' \| 'uploading' \| 'quota'` (`'busy'` only with `whileRunning: 'block'`). |
41
+ | `queue` | `{ items, paused, isSupported, add(text, { attachments?, mode? }), remove(id), edit(id, text), move(id, index), clear(), resume(), error }` — messages sent mid-turn, waiting server-side for the running turn to settle. |
41
42
  | `models` | `{ list, providers, selected, pinned, locked, select(id), pinToThread(id) }` — loaded the first time `list` is read. |
42
43
  | `quota` / `blocked` | `useQuota`'s state, and the window blocking sends (the `blocked` option overrides it). |
43
44
  | `approve` / `reject` / `answer` / `skip` | `({ toolCallId, … })` — the same object shape the transcript's handlers take. |
@@ -580,6 +581,42 @@ const readCookie = (name: string) =>
580
581
  </AgentProvider>;
581
582
  ```
582
583
 
584
+ ### Typing ahead: the message queue
585
+
586
+ Send while a turn is still answering and the message waits in the thread's queue — server-side, so
587
+ it survives a reload or a closed tab — and runs the moment the turn settles. Nothing to wire:
588
+ `composer.submit()` and `sendMessage` queue on their own mid-turn, and the chat attaches to the
589
+ queued turn when it starts.
590
+
591
+ ```tsx
592
+ const chat = useAgentChat({ threadId });
593
+ // …render chat.transcript.items, then what is waiting:
594
+ {chat.transcript.queued.map((item) => (
595
+ <div key={item.id} data-state={item.state /* 'sending' | 'queued' | 'paused' */}>
596
+ {item.text}
597
+ {item.remove.available && <button onClick={item.remove.run}>Remove</button>}
598
+ </div>
599
+ ))}
600
+ {chat.queue.paused && (
601
+ <button onClick={() => chat.queue.resume()}>
602
+ Paused ({chat.queue.paused.reason}) — resume
603
+ </button>
604
+ )}
605
+ ```
606
+
607
+ - `useAgentChat({ whileRunning })`: `'queue'` (default), `'interrupt'` (cancel the running turn and
608
+ run this next), or `'block'` (refuse, `composer.blockedBy === 'busy'` — the old behaviour, also
609
+ what a backend without `enqueueMessage` gets).
610
+ - `chat.queue.edit(id, text)`, `move(id, index)`, `remove(id)`, `clear()` change what is waiting;
611
+ `add(text, { attachments, mode })` queues from your own code.
612
+ - The queue pauses behind a failed turn (`run_failed`), a Stop (`cancelled`) or an exhausted quota
613
+ (`quota_exceeded`); `chat.queue.paused` says which, `resume()` lifts it. A queue left waiting with
614
+ nothing running is started when the thread loads.
615
+ - A send that the server queued anyway (another tab was mid-turn) moves into `chat.queue` instead of
616
+ showing as a sent message.
617
+
618
+ The wire contract (for a backend of your own) is *Message queue* in docs/stream-protocol.md.
619
+
583
620
  ### Reconnecting a dropped stream
584
621
 
585
622
  A server that numbers its frames (SSE `id:`, as this library's does) can be resumed: when the
@@ -1,4 +1,4 @@
1
- import { ThreadSummary, ThreadDetail, MessageAttachment, ToolCatalogEntry, SkillCatalogEntry, QuotaReport, ModelCatalogView, AgentCatalogEntry, AgentClientConfig, MessageFeedbackValue, MessageFeedback } from '@dudousxd/nestjs-agent-core';
1
+ import { ChatQueueState, ThreadSummary, ThreadDetail, MessageAttachment, ToolCatalogEntry, SkillCatalogEntry, QuotaReport, ModelCatalogView, AgentCatalogEntry, AgentClientConfig, MessageFeedbackValue, MessageFeedback } from '@dudousxd/nestjs-agent-core';
2
2
 
3
3
  /**
4
4
  * What a server said when it refused a request, read once so every error class of this package
@@ -68,6 +68,39 @@ interface ChatStreamResponse {
68
68
  body: ReadableStream<Uint8Array>;
69
69
  runId?: string;
70
70
  threadId?: string;
71
+ /**
72
+ * The server queued the message instead of starting a turn (`202`): the thread already had one
73
+ * running — another tab, another device. `body` is then empty; the transport reports this as a
74
+ * transient `data-queue` part and `useAgentChat` moves the message into `chat.queue`.
75
+ */
76
+ queued?: QueuedSendResult;
77
+ }
78
+ /**
79
+ * `POST <base>/chat` answered `202`: the message waits in the thread's queue (see
80
+ * docs/stream-protocol.md, "Message queue").
81
+ */
82
+ interface QueuedSendResult {
83
+ queued: true;
84
+ threadId: string;
85
+ /** The queued message's id — also the id of the run it will start. */
86
+ messageId: string;
87
+ /** 0-based place in the queue when it was queued. */
88
+ position: number;
89
+ queue: ChatQueueState;
90
+ /** Set when it started straight away (the thread was idle after all): attach to this run. */
91
+ runId?: string;
92
+ /** The run an interrupt cancelled to make room for it. */
93
+ interrupting?: string;
94
+ }
95
+ /** What `PATCH <base>/queue/:messageId` takes. */
96
+ interface QueuedMessageUpdate {
97
+ message?: string;
98
+ /** `[{ mediaId }]` refs replacing the message's attachments; `null` drops them. */
99
+ attachments?: Array<{
100
+ mediaId: string;
101
+ }> | null;
102
+ /** Move it to this 0-based place in the queue. */
103
+ position?: number;
71
104
  }
72
105
  /** What `POST <base>/messages/:id/feedback` takes. `value: null` clears the rating. */
73
106
  interface MessageFeedbackInput {
@@ -123,6 +156,24 @@ interface AgentBackend {
123
156
  getThread(id: string): Promise<ThreadDetail>;
124
157
  updateThread(id: string, patch: ThreadPatch): Promise<unknown>;
125
158
  deleteThread(id: string): Promise<unknown>;
159
+ /**
160
+ * Queue a message on a thread (`POST <base>/chat` with `mode: 'queue'` or `'interrupt'`), which
161
+ * the server answers with `202` JSON rather than a stream. What `chat.queue` sends through; a
162
+ * backend without it keeps the composer blocked while a turn runs.
163
+ */
164
+ enqueueMessage?(request: ChatStreamRequest): Promise<QueuedSendResult>;
165
+ /** `GET <base>/threads/:id/queue`. */
166
+ getQueue?(threadId: string): Promise<ChatQueueState>;
167
+ /** `PATCH <base>/queue/:messageId` — edit and/or move a waiting message. */
168
+ updateQueuedMessage?(messageId: string, update: QueuedMessageUpdate): Promise<ChatQueueState>;
169
+ /** `DELETE <base>/queue/:messageId`. */
170
+ removeQueuedMessage?(messageId: string): Promise<ChatQueueState>;
171
+ /** `DELETE <base>/threads/:id/queue`. */
172
+ clearQueue?(threadId: string): Promise<ChatQueueState>;
173
+ /** `POST <base>/threads/:id/queue/resume` — `runId` when the head started. */
174
+ resumeQueue?(threadId: string): Promise<ChatQueueState & {
175
+ runId?: string;
176
+ }>;
126
177
  forkFromMessage?(threadId: string, messageId: string): Promise<ThreadSummary>;
127
178
  promoteThread?(id: string): Promise<unknown>;
128
179
  truncateFromMessage?(threadId: string, messageId: string): Promise<unknown>;
@@ -251,6 +302,23 @@ declare class AgentClient implements AgentBackend {
251
302
  constructor(options?: AgentClientOptions);
252
303
  /** `POST <path>/chat` → the turn's SSE stream. Throws {@link AgentHttpError} on a non-2xx. */
253
304
  openChatStream(request: ChatStreamRequest): Promise<ChatStreamResponse>;
305
+ /**
306
+ * `POST <path>/chat` for a message that should wait in the thread's queue — the body carries
307
+ * `mode: 'queue'` (or `'interrupt'`), which the server always answers with `202` JSON.
308
+ */
309
+ enqueueMessage(request: ChatStreamRequest): Promise<QueuedSendResult>;
310
+ /** `GET <path>/threads/:id/queue` — the thread's waiting messages, and whether it drains. */
311
+ getQueue(threadId: string): Promise<ChatQueueState>;
312
+ /** `PATCH <path>/queue/:messageId` — change a waiting message's text/attachments, or move it. */
313
+ updateQueuedMessage(messageId: string, update: QueuedMessageUpdate): Promise<ChatQueueState>;
314
+ /** `DELETE <path>/queue/:messageId`. */
315
+ removeQueuedMessage(messageId: string): Promise<ChatQueueState>;
316
+ /** `DELETE <path>/threads/:id/queue` — drop every waiting message. */
317
+ clearQueue(threadId: string): Promise<ChatQueueState>;
318
+ /** `POST <path>/threads/:id/queue/resume` — lift a pause; `runId` when the head started. */
319
+ resumeQueue(threadId: string): Promise<ChatQueueState & {
320
+ runId?: string;
321
+ }>;
254
322
  /**
255
323
  * `GET <path>/chat/:runId/stream[?after=<seq>]` → the run's SSE stream, or `null` when nothing is
256
324
  * streaming under that id (404).
@@ -350,4 +418,4 @@ declare class AgentClient implements AgentBackend {
350
418
  private handleResponse;
351
419
  }
352
420
 
353
- export { type AgentBackend as A, type CancelResult as C, type ErrorAnswer as E, type HttpErrorListener as H, type MessageFeedbackInput as M, type ResumeStreamRequest as R, type ThreadPatch as T, type UploadAttachmentOptions as U, type AttachmentUploadStrategy as a, AgentBackendUnsupportedError as b, AgentClient as c, type AgentClientOptions as d, type AgentConnection as e, AgentHttpError as f, type AgentRequestError as g, type ChatStreamRequest as h, type ChatStreamResponse as i, requireBackendMethod as r };
421
+ export { type AgentBackend as A, type CancelResult as C, type ErrorAnswer as E, type HttpErrorListener as H, type MessageFeedbackInput as M, type QueuedMessageUpdate as Q, type ResumeStreamRequest as R, type ThreadPatch as T, type UploadAttachmentOptions as U, type AttachmentUploadStrategy as a, AgentBackendUnsupportedError as b, AgentClient as c, type AgentClientOptions as d, type AgentConnection as e, AgentHttpError as f, type AgentRequestError as g, type ChatStreamRequest as h, type ChatStreamResponse as i, type QueuedSendResult as j, requireBackendMethod as r };
@@ -1,4 +1,4 @@
1
- import { ThreadSummary, ThreadDetail, MessageAttachment, ToolCatalogEntry, SkillCatalogEntry, QuotaReport, ModelCatalogView, AgentCatalogEntry, AgentClientConfig, MessageFeedbackValue, MessageFeedback } from '@dudousxd/nestjs-agent-core';
1
+ import { ChatQueueState, ThreadSummary, ThreadDetail, MessageAttachment, ToolCatalogEntry, SkillCatalogEntry, QuotaReport, ModelCatalogView, AgentCatalogEntry, AgentClientConfig, MessageFeedbackValue, MessageFeedback } from '@dudousxd/nestjs-agent-core';
2
2
 
3
3
  /**
4
4
  * What a server said when it refused a request, read once so every error class of this package
@@ -68,6 +68,39 @@ interface ChatStreamResponse {
68
68
  body: ReadableStream<Uint8Array>;
69
69
  runId?: string;
70
70
  threadId?: string;
71
+ /**
72
+ * The server queued the message instead of starting a turn (`202`): the thread already had one
73
+ * running — another tab, another device. `body` is then empty; the transport reports this as a
74
+ * transient `data-queue` part and `useAgentChat` moves the message into `chat.queue`.
75
+ */
76
+ queued?: QueuedSendResult;
77
+ }
78
+ /**
79
+ * `POST <base>/chat` answered `202`: the message waits in the thread's queue (see
80
+ * docs/stream-protocol.md, "Message queue").
81
+ */
82
+ interface QueuedSendResult {
83
+ queued: true;
84
+ threadId: string;
85
+ /** The queued message's id — also the id of the run it will start. */
86
+ messageId: string;
87
+ /** 0-based place in the queue when it was queued. */
88
+ position: number;
89
+ queue: ChatQueueState;
90
+ /** Set when it started straight away (the thread was idle after all): attach to this run. */
91
+ runId?: string;
92
+ /** The run an interrupt cancelled to make room for it. */
93
+ interrupting?: string;
94
+ }
95
+ /** What `PATCH <base>/queue/:messageId` takes. */
96
+ interface QueuedMessageUpdate {
97
+ message?: string;
98
+ /** `[{ mediaId }]` refs replacing the message's attachments; `null` drops them. */
99
+ attachments?: Array<{
100
+ mediaId: string;
101
+ }> | null;
102
+ /** Move it to this 0-based place in the queue. */
103
+ position?: number;
71
104
  }
72
105
  /** What `POST <base>/messages/:id/feedback` takes. `value: null` clears the rating. */
73
106
  interface MessageFeedbackInput {
@@ -123,6 +156,24 @@ interface AgentBackend {
123
156
  getThread(id: string): Promise<ThreadDetail>;
124
157
  updateThread(id: string, patch: ThreadPatch): Promise<unknown>;
125
158
  deleteThread(id: string): Promise<unknown>;
159
+ /**
160
+ * Queue a message on a thread (`POST <base>/chat` with `mode: 'queue'` or `'interrupt'`), which
161
+ * the server answers with `202` JSON rather than a stream. What `chat.queue` sends through; a
162
+ * backend without it keeps the composer blocked while a turn runs.
163
+ */
164
+ enqueueMessage?(request: ChatStreamRequest): Promise<QueuedSendResult>;
165
+ /** `GET <base>/threads/:id/queue`. */
166
+ getQueue?(threadId: string): Promise<ChatQueueState>;
167
+ /** `PATCH <base>/queue/:messageId` — edit and/or move a waiting message. */
168
+ updateQueuedMessage?(messageId: string, update: QueuedMessageUpdate): Promise<ChatQueueState>;
169
+ /** `DELETE <base>/queue/:messageId`. */
170
+ removeQueuedMessage?(messageId: string): Promise<ChatQueueState>;
171
+ /** `DELETE <base>/threads/:id/queue`. */
172
+ clearQueue?(threadId: string): Promise<ChatQueueState>;
173
+ /** `POST <base>/threads/:id/queue/resume` — `runId` when the head started. */
174
+ resumeQueue?(threadId: string): Promise<ChatQueueState & {
175
+ runId?: string;
176
+ }>;
126
177
  forkFromMessage?(threadId: string, messageId: string): Promise<ThreadSummary>;
127
178
  promoteThread?(id: string): Promise<unknown>;
128
179
  truncateFromMessage?(threadId: string, messageId: string): Promise<unknown>;
@@ -251,6 +302,23 @@ declare class AgentClient implements AgentBackend {
251
302
  constructor(options?: AgentClientOptions);
252
303
  /** `POST <path>/chat` → the turn's SSE stream. Throws {@link AgentHttpError} on a non-2xx. */
253
304
  openChatStream(request: ChatStreamRequest): Promise<ChatStreamResponse>;
305
+ /**
306
+ * `POST <path>/chat` for a message that should wait in the thread's queue — the body carries
307
+ * `mode: 'queue'` (or `'interrupt'`), which the server always answers with `202` JSON.
308
+ */
309
+ enqueueMessage(request: ChatStreamRequest): Promise<QueuedSendResult>;
310
+ /** `GET <path>/threads/:id/queue` — the thread's waiting messages, and whether it drains. */
311
+ getQueue(threadId: string): Promise<ChatQueueState>;
312
+ /** `PATCH <path>/queue/:messageId` — change a waiting message's text/attachments, or move it. */
313
+ updateQueuedMessage(messageId: string, update: QueuedMessageUpdate): Promise<ChatQueueState>;
314
+ /** `DELETE <path>/queue/:messageId`. */
315
+ removeQueuedMessage(messageId: string): Promise<ChatQueueState>;
316
+ /** `DELETE <path>/threads/:id/queue` — drop every waiting message. */
317
+ clearQueue(threadId: string): Promise<ChatQueueState>;
318
+ /** `POST <path>/threads/:id/queue/resume` — lift a pause; `runId` when the head started. */
319
+ resumeQueue(threadId: string): Promise<ChatQueueState & {
320
+ runId?: string;
321
+ }>;
254
322
  /**
255
323
  * `GET <path>/chat/:runId/stream[?after=<seq>]` → the run's SSE stream, or `null` when nothing is
256
324
  * streaming under that id (404).
@@ -350,4 +418,4 @@ declare class AgentClient implements AgentBackend {
350
418
  private handleResponse;
351
419
  }
352
420
 
353
- export { type AgentBackend as A, type CancelResult as C, type ErrorAnswer as E, type HttpErrorListener as H, type MessageFeedbackInput as M, type ResumeStreamRequest as R, type ThreadPatch as T, type UploadAttachmentOptions as U, type AttachmentUploadStrategy as a, AgentBackendUnsupportedError as b, AgentClient as c, type AgentClientOptions as d, type AgentConnection as e, AgentHttpError as f, type AgentRequestError as g, type ChatStreamRequest as h, type ChatStreamResponse as i, requireBackendMethod as r };
421
+ export { type AgentBackend as A, type CancelResult as C, type ErrorAnswer as E, type HttpErrorListener as H, type MessageFeedbackInput as M, type QueuedMessageUpdate as Q, type ResumeStreamRequest as R, type ThreadPatch as T, type UploadAttachmentOptions as U, type AttachmentUploadStrategy as a, AgentBackendUnsupportedError as b, AgentClient as c, type AgentClientOptions as d, type AgentConnection as e, AgentHttpError as f, type AgentRequestError as g, type ChatStreamRequest as h, type ChatStreamResponse as i, type QueuedSendResult as j, requireBackendMethod as r };
@@ -726,4 +726,4 @@ interface GenerativeUIProps extends Partial<GenerativeUIOptions> {
726
726
  */
727
727
  declare function GenerativeUI({ part, registry, catalog, resolveComponent, treeRenderer, fallback: ownFallback, loading: ownLoading, onError: ownOnError, }: GenerativeUIProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
728
728
 
729
- export { type TranscriptQuestionOption as $, type ApproveOptions as A, type BuildBlocksOptions as B, type ChatStatus as C, type CoercibleQuestion as D, type DescribeToolCallOptions as E, type ElicitationBlockOptions as F, type GenerativeUIItem as G, type GroupToolActivityOptions as H, type RawAnswer as I, type ResolvedReading as J, type ResolvedResultView as K, type RetrievedPassage as L, type MessageUsageInfo as M, type ToolActivityGroup as N, type ToolCallDescription as O, type ToolCallState as P, type ToolCallStatus as Q, type ResolveComponent as R, type SettleAction as S, type TranscriptUiBlock as T, type UsageSummary as U, type TranscriptApproval as V, type TranscriptApprovalStatus as W, type TranscriptElicitationBlock as X, type TranscriptElicitationOutcome as Y, type TranscriptFilesBlock as Z, type TranscriptQuestion as _, GENUI_TREE_COMPONENT as a, type TranscriptReasoningBlock as a0, type TranscriptSettleState as a1, type TranscriptSource as a2, type TranscriptSourcesBlock as a3, type TranscriptTextBlock as a4, type TranscriptToolBlock as a5, type TranscriptToolCall as a6, buildTranscriptBlocks as a7, coerceAnswer as a8, correctedCallIds as a9, describeTimestamp as aa, describeToolCall as ab, describeUsage as ac, extractMessageText as ad, fillTemplate as ae, formatRelativeTime as af, groupToolActivity as ag, inferResultView as ah, isActionCall as ai, phraseFor as aj, readPath as ak, resolveResultView as al, toolCallState as am, toolCatalogFrom as an, GenerativeUI as b, type GenerativeUIElement as c, type GenerativeUIFallback as d, type GenerativeUIOptions as e, type GenerativeUIProblem as f, type GenerativeUIProps as g, GenerativeUIScope as h, type GenerativeUIScopeProps as i, type GenerativeUIState as j, type GenuiCatalogLike as k, type GenuiIssueLike as l, GenuiProvider as m, type GenuiProviderProps as n, type GenuiProviderValue as o, type GenuiRegistry as p, type GenuiRenderer as q, GenuiTree as r, useGenuiProvider as s, type TranscriptBlock as t, useGenerativeUI as u, type TimestampInfo as v, type ToolCatalog as w, type AnyToolUIPart as x, type TranscriptFile as y, type ApprovalBlockOptions as z };
729
+ export { type TranscriptQuestionOption as $, type ApproveOptions as A, type BuildBlocksOptions as B, type ChatStatus as C, type CoercibleQuestion as D, type DescribeToolCallOptions as E, type ElicitationBlockOptions as F, type GenerativeUIItem as G, type GroupToolActivityOptions as H, type RawAnswer as I, type ResolvedReading as J, type ResolvedResultView as K, type RetrievedPassage as L, type MessageUsageInfo as M, type ToolActivityGroup as N, type ToolCallDescription as O, type ToolCallState as P, type ToolCallStatus as Q, type ResolveComponent as R, type SettleAction as S, type TranscriptUiBlock as T, type UsageSummary as U, type TranscriptApproval as V, type TranscriptApprovalStatus as W, type TranscriptElicitationBlock as X, type TranscriptElicitationOutcome as Y, type TranscriptFilesBlock as Z, type TranscriptQuestion as _, GENUI_TREE_COMPONENT as a, type TranscriptReasoningBlock as a0, type TranscriptSettleState as a1, type TranscriptSource as a2, type TranscriptSourcesBlock as a3, type TranscriptTextBlock as a4, type TranscriptToolBlock as a5, type TranscriptToolCall as a6, buildTranscriptBlocks as a7, coerceAnswer as a8, correctedCallIds as a9, describeTimestamp as aa, describeToolCall as ab, describeUsage as ac, extractMessageText as ad, fillTemplate as ae, formatRelativeTime as af, groupToolActivity as ag, inferResultView as ah, isActionCall as ai, phraseFor as aj, readPath as ak, resolveResultView as al, toolCallState as am, toolCatalogFrom as an, GenerativeUI as b, type GenerativeUIElement as c, type GenerativeUIFallback as d, type GenerativeUIOptions as e, type GenerativeUIProblem as f, type GenerativeUIProps as g, GenerativeUIScope as h, type GenerativeUIScopeProps as i, type GenerativeUIState as j, type GenuiCatalogLike as k, type GenuiIssueLike as l, GenuiProvider as m, type GenuiProviderProps as n, type GenuiProviderValue as o, type GenuiRegistry as p, type GenuiRenderer as q, GenuiTree as r, useGenuiProvider as s, type TranscriptBlock as t, useGenerativeUI as u, type TimestampInfo as v, type TranscriptFile as w, type ToolCatalog as x, type AnyToolUIPart as y, type ApprovalBlockOptions as z };
@@ -726,4 +726,4 @@ interface GenerativeUIProps extends Partial<GenerativeUIOptions> {
726
726
  */
727
727
  declare function GenerativeUI({ part, registry, catalog, resolveComponent, treeRenderer, fallback: ownFallback, loading: ownLoading, onError: ownOnError, }: GenerativeUIProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
728
728
 
729
- export { type TranscriptQuestionOption as $, type ApproveOptions as A, type BuildBlocksOptions as B, type ChatStatus as C, type CoercibleQuestion as D, type DescribeToolCallOptions as E, type ElicitationBlockOptions as F, type GenerativeUIItem as G, type GroupToolActivityOptions as H, type RawAnswer as I, type ResolvedReading as J, type ResolvedResultView as K, type RetrievedPassage as L, type MessageUsageInfo as M, type ToolActivityGroup as N, type ToolCallDescription as O, type ToolCallState as P, type ToolCallStatus as Q, type ResolveComponent as R, type SettleAction as S, type TranscriptUiBlock as T, type UsageSummary as U, type TranscriptApproval as V, type TranscriptApprovalStatus as W, type TranscriptElicitationBlock as X, type TranscriptElicitationOutcome as Y, type TranscriptFilesBlock as Z, type TranscriptQuestion as _, GENUI_TREE_COMPONENT as a, type TranscriptReasoningBlock as a0, type TranscriptSettleState as a1, type TranscriptSource as a2, type TranscriptSourcesBlock as a3, type TranscriptTextBlock as a4, type TranscriptToolBlock as a5, type TranscriptToolCall as a6, buildTranscriptBlocks as a7, coerceAnswer as a8, correctedCallIds as a9, describeTimestamp as aa, describeToolCall as ab, describeUsage as ac, extractMessageText as ad, fillTemplate as ae, formatRelativeTime as af, groupToolActivity as ag, inferResultView as ah, isActionCall as ai, phraseFor as aj, readPath as ak, resolveResultView as al, toolCallState as am, toolCatalogFrom as an, GenerativeUI as b, type GenerativeUIElement as c, type GenerativeUIFallback as d, type GenerativeUIOptions as e, type GenerativeUIProblem as f, type GenerativeUIProps as g, GenerativeUIScope as h, type GenerativeUIScopeProps as i, type GenerativeUIState as j, type GenuiCatalogLike as k, type GenuiIssueLike as l, GenuiProvider as m, type GenuiProviderProps as n, type GenuiProviderValue as o, type GenuiRegistry as p, type GenuiRenderer as q, GenuiTree as r, useGenuiProvider as s, type TranscriptBlock as t, useGenerativeUI as u, type TimestampInfo as v, type ToolCatalog as w, type AnyToolUIPart as x, type TranscriptFile as y, type ApprovalBlockOptions as z };
729
+ export { type TranscriptQuestionOption as $, type ApproveOptions as A, type BuildBlocksOptions as B, type ChatStatus as C, type CoercibleQuestion as D, type DescribeToolCallOptions as E, type ElicitationBlockOptions as F, type GenerativeUIItem as G, type GroupToolActivityOptions as H, type RawAnswer as I, type ResolvedReading as J, type ResolvedResultView as K, type RetrievedPassage as L, type MessageUsageInfo as M, type ToolActivityGroup as N, type ToolCallDescription as O, type ToolCallState as P, type ToolCallStatus as Q, type ResolveComponent as R, type SettleAction as S, type TranscriptUiBlock as T, type UsageSummary as U, type TranscriptApproval as V, type TranscriptApprovalStatus as W, type TranscriptElicitationBlock as X, type TranscriptElicitationOutcome as Y, type TranscriptFilesBlock as Z, type TranscriptQuestion as _, GENUI_TREE_COMPONENT as a, type TranscriptReasoningBlock as a0, type TranscriptSettleState as a1, type TranscriptSource as a2, type TranscriptSourcesBlock as a3, type TranscriptTextBlock as a4, type TranscriptToolBlock as a5, type TranscriptToolCall as a6, buildTranscriptBlocks as a7, coerceAnswer as a8, correctedCallIds as a9, describeTimestamp as aa, describeToolCall as ab, describeUsage as ac, extractMessageText as ad, fillTemplate as ae, formatRelativeTime as af, groupToolActivity as ag, inferResultView as ah, isActionCall as ai, phraseFor as aj, readPath as ak, resolveResultView as al, toolCallState as am, toolCatalogFrom as an, GenerativeUI as b, type GenerativeUIElement as c, type GenerativeUIFallback as d, type GenerativeUIOptions as e, type GenerativeUIProblem as f, type GenerativeUIProps as g, GenerativeUIScope as h, type GenerativeUIScopeProps as i, type GenerativeUIState as j, type GenuiCatalogLike as k, type GenuiIssueLike as l, GenuiProvider as m, type GenuiProviderProps as n, type GenuiProviderValue as o, type GenuiRegistry as p, type GenuiRenderer as q, GenuiTree as r, useGenuiProvider as s, type TranscriptBlock as t, useGenerativeUI as u, type TimestampInfo as v, type TranscriptFile as w, type ToolCatalog as x, type AnyToolUIPart as y, type ApprovalBlockOptions as z };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentRegistry } from '@json-render/react';
3
- import { n as GenuiProviderProps$1, c as GenerativeUIElement, q as GenuiRenderer, p as GenuiRegistry } from './generative-ui-BejHxxbR.cjs';
3
+ import { n as GenuiProviderProps$1, c as GenerativeUIElement, q as GenuiRenderer, p as GenuiRegistry } from './generative-ui-jT9TYfCi.cjs';
4
4
  import '@dudousxd/nestjs-agent-core';
5
5
  import 'ai';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentRegistry } from '@json-render/react';
3
- import { n as GenuiProviderProps$1, c as GenerativeUIElement, q as GenuiRenderer, p as GenuiRegistry } from './generative-ui-BejHxxbR.js';
3
+ import { n as GenuiProviderProps$1, c as GenerativeUIElement, q as GenuiRenderer, p as GenuiRegistry } from './generative-ui-jT9TYfCi.js';
4
4
  import '@dudousxd/nestjs-agent-core';
5
5
  import 'ai';
6
6
 
package/dist/genui.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { G as GenerativeUIItem } from './generative-ui-BejHxxbR.cjs';
2
- export { a as GENUI_TREE_COMPONENT, b as GenerativeUI, c as GenerativeUIElement, d as GenerativeUIFallback, e as GenerativeUIOptions, f as GenerativeUIProblem, g as GenerativeUIProps, h as GenerativeUIScope, i as GenerativeUIScopeProps, j as GenerativeUIState, k as GenuiCatalogLike, l as GenuiIssueLike, m as GenuiProvider, n as GenuiProviderProps, o as GenuiProviderValue, p as GenuiRegistry, q as GenuiRenderer, r as GenuiTree, R as ResolveComponent, u as useGenerativeUI, s as useGenuiProvider } from './generative-ui-BejHxxbR.cjs';
1
+ import { G as GenerativeUIItem } from './generative-ui-jT9TYfCi.cjs';
2
+ export { a as GENUI_TREE_COMPONENT, b as GenerativeUI, c as GenerativeUIElement, d as GenerativeUIFallback, e as GenerativeUIOptions, f as GenerativeUIProblem, g as GenerativeUIProps, h as GenerativeUIScope, i as GenerativeUIScopeProps, j as GenerativeUIState, k as GenuiCatalogLike, l as GenuiIssueLike, m as GenuiProvider, n as GenuiProviderProps, o as GenuiProviderValue, p as GenuiRegistry, q as GenuiRenderer, r as GenuiTree, R as ResolveComponent, u as useGenerativeUI, s as useGenuiProvider } from './generative-ui-jT9TYfCi.cjs';
3
3
  import 'react';
4
4
  import '@dudousxd/nestjs-agent-core';
5
5
  import 'ai';
package/dist/genui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { G as GenerativeUIItem } from './generative-ui-BejHxxbR.js';
2
- export { a as GENUI_TREE_COMPONENT, b as GenerativeUI, c as GenerativeUIElement, d as GenerativeUIFallback, e as GenerativeUIOptions, f as GenerativeUIProblem, g as GenerativeUIProps, h as GenerativeUIScope, i as GenerativeUIScopeProps, j as GenerativeUIState, k as GenuiCatalogLike, l as GenuiIssueLike, m as GenuiProvider, n as GenuiProviderProps, o as GenuiProviderValue, p as GenuiRegistry, q as GenuiRenderer, r as GenuiTree, R as ResolveComponent, u as useGenerativeUI, s as useGenuiProvider } from './generative-ui-BejHxxbR.js';
1
+ import { G as GenerativeUIItem } from './generative-ui-jT9TYfCi.js';
2
+ export { a as GENUI_TREE_COMPONENT, b as GenerativeUI, c as GenerativeUIElement, d as GenerativeUIFallback, e as GenerativeUIOptions, f as GenerativeUIProblem, g as GenerativeUIProps, h as GenerativeUIScope, i as GenerativeUIScopeProps, j as GenerativeUIState, k as GenuiCatalogLike, l as GenuiIssueLike, m as GenuiProvider, n as GenuiProviderProps, o as GenuiProviderValue, p as GenuiRegistry, q as GenuiRenderer, r as GenuiTree, R as ResolveComponent, u as useGenerativeUI, s as useGenuiProvider } from './generative-ui-jT9TYfCi.js';
3
3
  import 'react';
4
4
  import '@dudousxd/nestjs-agent-core';
5
5
  import 'ai';