@dudousxd/nestjs-agent-react 0.33.0 → 0.34.1

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.
Files changed (40) hide show
  1. package/README.md +7 -0
  2. package/dist/{client-B6EE8-AC.d.cts → client-BdHUuqy-.d.cts} +8 -8
  3. package/dist/{client-B6EE8-AC.d.ts → client-BdHUuqy-.d.ts} +8 -8
  4. package/dist/{generative-ui-DOe2RsoO.d.cts → generative-ui-CyHY8Lh1.d.cts} +6 -101
  5. package/dist/{generative-ui-DOe2RsoO.d.ts → generative-ui-DdUZPCXX.d.ts} +6 -101
  6. package/dist/genui-json-render.d.cts +2 -1
  7. package/dist/genui-json-render.d.ts +2 -1
  8. package/dist/genui-server-playwright.cjs +199 -0
  9. package/dist/genui-server-playwright.cjs.map +1 -0
  10. package/dist/genui-server-playwright.d.cts +18 -0
  11. package/dist/genui-server-playwright.d.ts +18 -0
  12. package/dist/genui-server-playwright.js +162 -0
  13. package/dist/genui-server-playwright.js.map +1 -0
  14. package/dist/genui-server.cjs +188 -0
  15. package/dist/genui-server.cjs.map +1 -0
  16. package/dist/genui-server.d.cts +36 -0
  17. package/dist/genui-server.d.ts +36 -0
  18. package/dist/genui-server.js +163 -0
  19. package/dist/genui-server.js.map +1 -0
  20. package/dist/genui.cjs +76 -0
  21. package/dist/genui.cjs.map +1 -1
  22. package/dist/genui.d.cts +5 -2
  23. package/dist/genui.d.ts +5 -2
  24. package/dist/genui.js +77 -0
  25. package/dist/genui.js.map +1 -1
  26. package/dist/index.cjs +2 -0
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +14 -7
  29. package/dist/index.d.ts +14 -7
  30. package/dist/index.js +1 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/media.cjs.map +1 -1
  33. package/dist/media.d.cts +1 -1
  34. package/dist/media.d.ts +1 -1
  35. package/dist/media.js.map +1 -1
  36. package/dist/react-registry-Di4IVrw-.d.cts +25 -0
  37. package/dist/react-registry-z9GFbTm9.d.ts +25 -0
  38. package/dist/types-DZtFsWec.d.cts +99 -0
  39. package/dist/types-DZtFsWec.d.ts +99 -0
  40. package/package.json +35 -5
package/dist/index.d.cts CHANGED
@@ -1,15 +1,16 @@
1
1
  import * as ai from 'ai';
2
2
  import { ChatTransport, UIMessage, UIMessageChunk, DataUIPart, UIDataTypes } from 'ai';
3
- import { A as AgentRequestError, a as AgentBackend, U as UploadAttachmentOptions, C as ChatStreamRequest, b as ChatStreamResponse, H as HttpErrorListener, c as AttachmentUploadStrategy } from './client-B6EE8-AC.cjs';
4
- export { d as AgentBackendUnsupportedError, e as AgentClient, f as AgentClientOptions, g as AgentConnection, h as AgentHttpError, i as CancelResult, M as MessageFeedbackInput, Q as QueuedMessageUpdate, j as QueuedSendResult, R as ResumeStreamRequest, T as ThreadPatch, r as requireBackendMethod } from './client-B6EE8-AC.cjs';
5
- import { MessageAttachment, AgentClientConfig, AgentCatalogEntry, PersonaCatalogEntry, ModelCatalogEntry, ModelCatalogView, ModelCatalogLock, QuotaReport, QuotaWindow, QuotaBlock, QuotaWarning, MessageFeedback, MessageFeedbackValue, ThreadSummary, StoredMessage, QueuePause, ToolCatalogEntry, ActionProposal } from '@dudousxd/nestjs-agent-core';
3
+ import { A as AgentRequestError, a as AgentBackend, U as UploadAttachmentOptions, C as ChatStreamRequest, b as ChatStreamResponse, H as HttpErrorListener, c as AttachmentUploadStrategy } from './client-BdHUuqy-.cjs';
4
+ export { d as AgentBackendUnsupportedError, e as AgentClient, f as AgentClientOptions, g as AgentConnection, h as AgentHttpError, i as CancelResult, M as MessageFeedbackInput, Q as QueuedMessageUpdate, j as QueuedSendResult, R as ResumeStreamRequest, T as ThreadPatch, r as requireBackendMethod } from './client-BdHUuqy-.cjs';
5
+ import { MessageAttachment, AgentClientConfig, AgentCatalogEntry, PersonaCatalogEntry, ModelCatalogEntry, ModelCatalogView, ModelCatalogLock, QuotaReport, QuotaWindow, QuotaBlock, QuotaWarning, MessageFeedback, MessageFeedbackValue, ThreadSummary, StoredMessage, QueuePause, ToolCatalogEntry, ActionProposalView } from '@dudousxd/nestjs-agent-core';
6
6
  export { ALL_AGENTS, ChatQueueState, ElicitationInput, ElicitationInputType, QueuePause, QueuePauseReason, QueuedMessageView, validateElicitationAnswer as validateAnswer, validateElicitationValue as validateAnswerValue } from '@dudousxd/nestjs-agent-core';
7
7
  import * as React from 'react';
8
8
  import React__default, { ReactNode, Context } from 'react';
9
9
  import { UiCapabilities } from '@dudousxd/nestjs-agent-core/genui';
10
10
  export { UiCapabilities } from '@dudousxd/nestjs-agent-core/genui';
11
- import { o as GenuiProviderValue, T as TranscriptUiBlock, A as ApproveOptions, t as ApprovalTarget, v as TranscriptBlock, U as UsageSummary, w as TimestampInfo, C as ChatStatus, x as TranscriptFile, M as MessageUsageInfo, y as ToolCatalog, z as AnyToolUIPart } from './generative-ui-DOe2RsoO.cjs';
12
- export { B as ApprovalBlockOptions, D as BuildBlocksOptions, E as CoercibleQuestion, F as DescribeToolCallOptions, H as ElicitationBlockOptions, I as GroupToolActivityOptions, J as RawAnswer, K as ResolvedReading, L as ResolvedResultView, N as RetrievedPassage, S as SettleAction, O as ToolActivityGroup, P as ToolCallDescription, Q as ToolCallState, V as ToolCallStatus, W as TranscriptApproval, X as TranscriptApprovalStatus, Y as TranscriptElicitationBlock, Z as TranscriptElicitationOutcome, _ as TranscriptFilesBlock, $ as TranscriptQuestion, a0 as TranscriptQuestionOption, a1 as TranscriptReasoningBlock, a2 as TranscriptSettleState, a3 as TranscriptSource, a4 as TranscriptSourcesBlock, a5 as TranscriptTextBlock, a6 as TranscriptToolBlock, a7 as TranscriptToolCall, a8 as buildTranscriptBlocks, a9 as coerceAnswer, aa as correctedCallIds, ab as describeTimestamp, ac as describeToolCall, ad as describeUsage, ae as extractMessageText, af as fillTemplate, ag as formatRelativeTime, ah as groupToolActivity, ai as inferResultView, aj as isActionCall, ak as phraseFor, al as proposalNeedsPolling, am as readPath, an as reconcileProposalMessages, ao as resolveResultView, ap as toolCallState, aq as toolCatalogFrom } from './generative-ui-DOe2RsoO.cjs';
11
+ import { g as GenuiProviderValue, T as TranscriptUiBlock, A as ApproveOptions, j as ApprovalTarget, k as TranscriptBlock, U as UsageSummary, l as TimestampInfo, C as ChatStatus, m as TranscriptFile, M as MessageUsageInfo, n as ToolCatalog, o as AnyToolUIPart } from './generative-ui-CyHY8Lh1.cjs';
12
+ export { p as ApprovalBlockOptions, B as BuildBlocksOptions, q as CoercibleQuestion, D as DescribeToolCallOptions, E as ElicitationBlockOptions, r as GroupToolActivityOptions, R as RawAnswer, s as ResolvedReading, t as ResolvedResultView, v as RetrievedPassage, S as SettleAction, w as ToolActivityGroup, x as ToolCallDescription, y as ToolCallState, z as ToolCallStatus, F as TranscriptApproval, H as TranscriptApprovalStatus, I as TranscriptElicitationBlock, J as TranscriptElicitationOutcome, K as TranscriptFilesBlock, L as TranscriptQuestion, N as TranscriptQuestionOption, O as TranscriptReasoningBlock, P as TranscriptSettleState, Q as TranscriptSource, V as TranscriptSourcesBlock, W as TranscriptTextBlock, X as TranscriptToolBlock, Y as TranscriptToolCall, Z as buildTranscriptBlocks, _ as coerceAnswer, $ as correctedCallIds, a0 as describeTimestamp, a1 as describeToolCall, a2 as describeUsage, a3 as extractMessageText, a4 as fillTemplate, a5 as formatRelativeTime, a6 as groupToolActivity, a7 as inferResultView, a8 as isActionCall, a9 as phraseFor, aa as proposalNeedsPolling, ab as readPath, ac as reconcileProposalMessages, ad as resolveResultView, ae as toolCallState, af as toolCatalogFrom } from './generative-ui-CyHY8Lh1.cjs';
13
+ import './types-DZtFsWec.cjs';
13
14
 
14
15
  /**
15
16
  * The `code`s this library's own loop closes a failed run's stream with (`event: error`). A client
@@ -517,6 +518,12 @@ declare function AgentProvider({ backend, uiCapabilities, baseUrl, path, headers
517
518
  * shared same-origin client on `/agent`. For your own hooks over the same connection.
518
519
  */
519
520
  declare function useAgentBackend<B extends AgentBackend = AgentBackend>(own?: B): B;
521
+ /**
522
+ * The UI capabilities the nearest `<AgentProvider uiCapabilities>` declared, or `undefined` when it
523
+ * declared none. `useAgentChat` reads this unless given its own `uiCapabilities`; read it too when a
524
+ * hook of yours talks to the agent outside `useAgentChat`.
525
+ */
526
+ declare function useAgentUiCapabilities(): UiCapabilities | undefined;
520
527
 
521
528
  interface UseAgentConfigOptions {
522
529
  /** Default: the enclosing `<AgentProvider>`'s. Without `getConfig` the config stays `undefined`. */
@@ -2044,10 +2051,10 @@ declare class QuotaBlockedError extends Error {
2044
2051
  }
2045
2052
 
2046
2053
  interface ActionProposalsState {
2047
- items: ActionProposal[];
2054
+ items: ActionProposalView[];
2048
2055
  error: Error | null;
2049
2056
  refresh(): Promise<void>;
2050
2057
  }
2051
2058
  declare function useActionProposals(backend: AgentBackend, threadId: string | undefined, setMessages: (update: (current: UIMessage[]) => UIMessage[]) => void, refreshKey: string, pollMs?: number): ActionProposalsState;
2052
2059
 
2053
- export { AGENT_RUN_ERROR_CODES, type ActionProposalsState, type AgUiChatStreamOptions, type AgUiContentPart, AgentBackend, AgentChatTransport, type AgentChatTransportOptions, type AgentConfigState, type AgentMessageMetadata, AgentProvider, type AgentProviderProps, AgentRequestError, type AgentRunErrorCode, type AgentRunFailure, type AgentStreamMeta, type AgentsState, type AggregatedTurnUsage, type AmbientRenderUi, AmbientRenderUiContext, type AnswerInput, AnyToolUIPart, type ApprovalCountdown, ApprovalTarget, type ApproveInput, ApproveOptions, type AttachmentRejection, AttachmentUploadStrategy, type AttachmentsState, type AutocompleteInputProps, type AutocompleteItem, type AutocompleteListboxProps, type AutocompleteOptionProps, type AutocompleteSource, type BackgroundRun, type ChatBackground, ChatInput, type ChatInputProps, type ChatQueue, ChatStatus, ChatStreamRequest, ChatStreamResponse, type ChatTranscript, type ClipboardLikeEvent, type CompletionEdit, type ComposerAutocomplete, DEFAULT_SPEECH_LANG, type DragLikeEvent, type EditSubmitInput, HttpErrorListener, type MessageActionInput, type MessageFeedbackState, type MessageFile, type MessageFileKind, MessageItem, type MessageItemClassNames, type MessageItemProps, MessageItemView, type MessageItemViewProps, MessageList, type MessageListClassNames, type MessageListProps, MessageUsageInfo, type ModelOption, type ModelsState, type QueuedChatMessage, QuotaBlockedError, type QuotaState, RUN_NOT_ACTIVE_CODE, type ReconnectOptions, type RejectInput, type RenderFilesFn, type RenderReasoningFn, type RenderTextFn, type RenderToolGroupFn, type RenderToolPartFn, type RenderUiFn, SPEECH_LANGUAGES, type SendWhileRunning, type SkillSuggestionData, type SkillsSourceOptions, type SkipInput, 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 TranscriptQueuedFile, type TranscriptQueuedItem, type TranscriptStopState, TranscriptUiBlock, type TranscriptWindow, type TriggerMatch, type TriggerPosition, UploadAttachmentOptions, UsageSummary, type UseAgentChatOptions, type UseAgentConfigOptions, 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, type WhileRunning, acceptsFile, agUiChatStream, applyCompletion, approvalCountdown, attachmentFile, backgroundRunsFromThread, createSkillsSource, dragHasFiles, fileKind, filesFromClipboard, filterAutocompleteItems, findActiveTrigger, formatElapsed, isRunNotActiveError, loadStoredSpeechLang, messageFiles, notifyThreads, onThreadsEvent, persistSpeechLang, readReasoningMs, reframeAgUiStream, storedMessageToUiMessage, storedThreadToUiMessages, useActionProposals, useAgentBackend, useAgentChat, useAgentConfig, useAgents, useAmbientRenderUi, useApprovalCountdown, useAttachments, useChatTranscript, useComposerAutocomplete, useElapsed, useMessageFeedback, useModels, useQuota, useSpeechRecognition, useStickToBottom, useThreads, useToolCatalog, useTranscriptItem };
2060
+ export { AGENT_RUN_ERROR_CODES, type ActionProposalsState, type AgUiChatStreamOptions, type AgUiContentPart, AgentBackend, AgentChatTransport, type AgentChatTransportOptions, type AgentConfigState, type AgentMessageMetadata, AgentProvider, type AgentProviderProps, AgentRequestError, type AgentRunErrorCode, type AgentRunFailure, type AgentStreamMeta, type AgentsState, type AggregatedTurnUsage, type AmbientRenderUi, AmbientRenderUiContext, type AnswerInput, AnyToolUIPart, type ApprovalCountdown, ApprovalTarget, type ApproveInput, ApproveOptions, type AttachmentRejection, AttachmentUploadStrategy, type AttachmentsState, type AutocompleteInputProps, type AutocompleteItem, type AutocompleteListboxProps, type AutocompleteOptionProps, type AutocompleteSource, type BackgroundRun, type ChatBackground, ChatInput, type ChatInputProps, type ChatQueue, ChatStatus, ChatStreamRequest, ChatStreamResponse, type ChatTranscript, type ClipboardLikeEvent, type CompletionEdit, type ComposerAutocomplete, DEFAULT_SPEECH_LANG, type DragLikeEvent, type EditSubmitInput, HttpErrorListener, type MessageActionInput, type MessageFeedbackState, type MessageFile, type MessageFileKind, MessageItem, type MessageItemClassNames, type MessageItemProps, MessageItemView, type MessageItemViewProps, MessageList, type MessageListClassNames, type MessageListProps, MessageUsageInfo, type ModelOption, type ModelsState, type QueuedChatMessage, QuotaBlockedError, type QuotaState, RUN_NOT_ACTIVE_CODE, type ReconnectOptions, type RejectInput, type RenderFilesFn, type RenderReasoningFn, type RenderTextFn, type RenderToolGroupFn, type RenderToolPartFn, type RenderUiFn, SPEECH_LANGUAGES, type SendWhileRunning, type SkillSuggestionData, type SkillsSourceOptions, type SkipInput, 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 TranscriptQueuedFile, type TranscriptQueuedItem, type TranscriptStopState, TranscriptUiBlock, type TranscriptWindow, type TriggerMatch, type TriggerPosition, UploadAttachmentOptions, UsageSummary, type UseAgentChatOptions, type UseAgentConfigOptions, 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, type WhileRunning, acceptsFile, agUiChatStream, applyCompletion, approvalCountdown, attachmentFile, backgroundRunsFromThread, createSkillsSource, dragHasFiles, fileKind, filesFromClipboard, filterAutocompleteItems, findActiveTrigger, formatElapsed, isRunNotActiveError, loadStoredSpeechLang, messageFiles, notifyThreads, onThreadsEvent, persistSpeechLang, readReasoningMs, reframeAgUiStream, storedMessageToUiMessage, storedThreadToUiMessages, useActionProposals, useAgentBackend, useAgentChat, useAgentConfig, useAgentUiCapabilities, useAgents, useAmbientRenderUi, useApprovalCountdown, useAttachments, useChatTranscript, useComposerAutocomplete, useElapsed, useMessageFeedback, useModels, useQuota, useSpeechRecognition, useStickToBottom, useThreads, useToolCatalog, useTranscriptItem };
package/dist/index.d.ts CHANGED
@@ -1,15 +1,16 @@
1
1
  import * as ai from 'ai';
2
2
  import { ChatTransport, UIMessage, UIMessageChunk, DataUIPart, UIDataTypes } from 'ai';
3
- import { A as AgentRequestError, a as AgentBackend, U as UploadAttachmentOptions, C as ChatStreamRequest, b as ChatStreamResponse, H as HttpErrorListener, c as AttachmentUploadStrategy } from './client-B6EE8-AC.js';
4
- export { d as AgentBackendUnsupportedError, e as AgentClient, f as AgentClientOptions, g as AgentConnection, h as AgentHttpError, i as CancelResult, M as MessageFeedbackInput, Q as QueuedMessageUpdate, j as QueuedSendResult, R as ResumeStreamRequest, T as ThreadPatch, r as requireBackendMethod } from './client-B6EE8-AC.js';
5
- import { MessageAttachment, AgentClientConfig, AgentCatalogEntry, PersonaCatalogEntry, ModelCatalogEntry, ModelCatalogView, ModelCatalogLock, QuotaReport, QuotaWindow, QuotaBlock, QuotaWarning, MessageFeedback, MessageFeedbackValue, ThreadSummary, StoredMessage, QueuePause, ToolCatalogEntry, ActionProposal } from '@dudousxd/nestjs-agent-core';
3
+ import { A as AgentRequestError, a as AgentBackend, U as UploadAttachmentOptions, C as ChatStreamRequest, b as ChatStreamResponse, H as HttpErrorListener, c as AttachmentUploadStrategy } from './client-BdHUuqy-.js';
4
+ export { d as AgentBackendUnsupportedError, e as AgentClient, f as AgentClientOptions, g as AgentConnection, h as AgentHttpError, i as CancelResult, M as MessageFeedbackInput, Q as QueuedMessageUpdate, j as QueuedSendResult, R as ResumeStreamRequest, T as ThreadPatch, r as requireBackendMethod } from './client-BdHUuqy-.js';
5
+ import { MessageAttachment, AgentClientConfig, AgentCatalogEntry, PersonaCatalogEntry, ModelCatalogEntry, ModelCatalogView, ModelCatalogLock, QuotaReport, QuotaWindow, QuotaBlock, QuotaWarning, MessageFeedback, MessageFeedbackValue, ThreadSummary, StoredMessage, QueuePause, ToolCatalogEntry, ActionProposalView } from '@dudousxd/nestjs-agent-core';
6
6
  export { ALL_AGENTS, ChatQueueState, ElicitationInput, ElicitationInputType, QueuePause, QueuePauseReason, QueuedMessageView, validateElicitationAnswer as validateAnswer, validateElicitationValue as validateAnswerValue } from '@dudousxd/nestjs-agent-core';
7
7
  import * as React from 'react';
8
8
  import React__default, { ReactNode, Context } from 'react';
9
9
  import { UiCapabilities } from '@dudousxd/nestjs-agent-core/genui';
10
10
  export { UiCapabilities } from '@dudousxd/nestjs-agent-core/genui';
11
- import { o as GenuiProviderValue, T as TranscriptUiBlock, A as ApproveOptions, t as ApprovalTarget, v as TranscriptBlock, U as UsageSummary, w as TimestampInfo, C as ChatStatus, x as TranscriptFile, M as MessageUsageInfo, y as ToolCatalog, z as AnyToolUIPart } from './generative-ui-DOe2RsoO.js';
12
- export { B as ApprovalBlockOptions, D as BuildBlocksOptions, E as CoercibleQuestion, F as DescribeToolCallOptions, H as ElicitationBlockOptions, I as GroupToolActivityOptions, J as RawAnswer, K as ResolvedReading, L as ResolvedResultView, N as RetrievedPassage, S as SettleAction, O as ToolActivityGroup, P as ToolCallDescription, Q as ToolCallState, V as ToolCallStatus, W as TranscriptApproval, X as TranscriptApprovalStatus, Y as TranscriptElicitationBlock, Z as TranscriptElicitationOutcome, _ as TranscriptFilesBlock, $ as TranscriptQuestion, a0 as TranscriptQuestionOption, a1 as TranscriptReasoningBlock, a2 as TranscriptSettleState, a3 as TranscriptSource, a4 as TranscriptSourcesBlock, a5 as TranscriptTextBlock, a6 as TranscriptToolBlock, a7 as TranscriptToolCall, a8 as buildTranscriptBlocks, a9 as coerceAnswer, aa as correctedCallIds, ab as describeTimestamp, ac as describeToolCall, ad as describeUsage, ae as extractMessageText, af as fillTemplate, ag as formatRelativeTime, ah as groupToolActivity, ai as inferResultView, aj as isActionCall, ak as phraseFor, al as proposalNeedsPolling, am as readPath, an as reconcileProposalMessages, ao as resolveResultView, ap as toolCallState, aq as toolCatalogFrom } from './generative-ui-DOe2RsoO.js';
11
+ import { g as GenuiProviderValue, T as TranscriptUiBlock, A as ApproveOptions, j as ApprovalTarget, k as TranscriptBlock, U as UsageSummary, l as TimestampInfo, C as ChatStatus, m as TranscriptFile, M as MessageUsageInfo, n as ToolCatalog, o as AnyToolUIPart } from './generative-ui-DdUZPCXX.js';
12
+ export { p as ApprovalBlockOptions, B as BuildBlocksOptions, q as CoercibleQuestion, D as DescribeToolCallOptions, E as ElicitationBlockOptions, r as GroupToolActivityOptions, R as RawAnswer, s as ResolvedReading, t as ResolvedResultView, v as RetrievedPassage, S as SettleAction, w as ToolActivityGroup, x as ToolCallDescription, y as ToolCallState, z as ToolCallStatus, F as TranscriptApproval, H as TranscriptApprovalStatus, I as TranscriptElicitationBlock, J as TranscriptElicitationOutcome, K as TranscriptFilesBlock, L as TranscriptQuestion, N as TranscriptQuestionOption, O as TranscriptReasoningBlock, P as TranscriptSettleState, Q as TranscriptSource, V as TranscriptSourcesBlock, W as TranscriptTextBlock, X as TranscriptToolBlock, Y as TranscriptToolCall, Z as buildTranscriptBlocks, _ as coerceAnswer, $ as correctedCallIds, a0 as describeTimestamp, a1 as describeToolCall, a2 as describeUsage, a3 as extractMessageText, a4 as fillTemplate, a5 as formatRelativeTime, a6 as groupToolActivity, a7 as inferResultView, a8 as isActionCall, a9 as phraseFor, aa as proposalNeedsPolling, ab as readPath, ac as reconcileProposalMessages, ad as resolveResultView, ae as toolCallState, af as toolCatalogFrom } from './generative-ui-DdUZPCXX.js';
13
+ import './types-DZtFsWec.js';
13
14
 
14
15
  /**
15
16
  * The `code`s this library's own loop closes a failed run's stream with (`event: error`). A client
@@ -517,6 +518,12 @@ declare function AgentProvider({ backend, uiCapabilities, baseUrl, path, headers
517
518
  * shared same-origin client on `/agent`. For your own hooks over the same connection.
518
519
  */
519
520
  declare function useAgentBackend<B extends AgentBackend = AgentBackend>(own?: B): B;
521
+ /**
522
+ * The UI capabilities the nearest `<AgentProvider uiCapabilities>` declared, or `undefined` when it
523
+ * declared none. `useAgentChat` reads this unless given its own `uiCapabilities`; read it too when a
524
+ * hook of yours talks to the agent outside `useAgentChat`.
525
+ */
526
+ declare function useAgentUiCapabilities(): UiCapabilities | undefined;
520
527
 
521
528
  interface UseAgentConfigOptions {
522
529
  /** Default: the enclosing `<AgentProvider>`'s. Without `getConfig` the config stays `undefined`. */
@@ -2044,10 +2051,10 @@ declare class QuotaBlockedError extends Error {
2044
2051
  }
2045
2052
 
2046
2053
  interface ActionProposalsState {
2047
- items: ActionProposal[];
2054
+ items: ActionProposalView[];
2048
2055
  error: Error | null;
2049
2056
  refresh(): Promise<void>;
2050
2057
  }
2051
2058
  declare function useActionProposals(backend: AgentBackend, threadId: string | undefined, setMessages: (update: (current: UIMessage[]) => UIMessage[]) => void, refreshKey: string, pollMs?: number): ActionProposalsState;
2052
2059
 
2053
- export { AGENT_RUN_ERROR_CODES, type ActionProposalsState, type AgUiChatStreamOptions, type AgUiContentPart, AgentBackend, AgentChatTransport, type AgentChatTransportOptions, type AgentConfigState, type AgentMessageMetadata, AgentProvider, type AgentProviderProps, AgentRequestError, type AgentRunErrorCode, type AgentRunFailure, type AgentStreamMeta, type AgentsState, type AggregatedTurnUsage, type AmbientRenderUi, AmbientRenderUiContext, type AnswerInput, AnyToolUIPart, type ApprovalCountdown, ApprovalTarget, type ApproveInput, ApproveOptions, type AttachmentRejection, AttachmentUploadStrategy, type AttachmentsState, type AutocompleteInputProps, type AutocompleteItem, type AutocompleteListboxProps, type AutocompleteOptionProps, type AutocompleteSource, type BackgroundRun, type ChatBackground, ChatInput, type ChatInputProps, type ChatQueue, ChatStatus, ChatStreamRequest, ChatStreamResponse, type ChatTranscript, type ClipboardLikeEvent, type CompletionEdit, type ComposerAutocomplete, DEFAULT_SPEECH_LANG, type DragLikeEvent, type EditSubmitInput, HttpErrorListener, type MessageActionInput, type MessageFeedbackState, type MessageFile, type MessageFileKind, MessageItem, type MessageItemClassNames, type MessageItemProps, MessageItemView, type MessageItemViewProps, MessageList, type MessageListClassNames, type MessageListProps, MessageUsageInfo, type ModelOption, type ModelsState, type QueuedChatMessage, QuotaBlockedError, type QuotaState, RUN_NOT_ACTIVE_CODE, type ReconnectOptions, type RejectInput, type RenderFilesFn, type RenderReasoningFn, type RenderTextFn, type RenderToolGroupFn, type RenderToolPartFn, type RenderUiFn, SPEECH_LANGUAGES, type SendWhileRunning, type SkillSuggestionData, type SkillsSourceOptions, type SkipInput, 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 TranscriptQueuedFile, type TranscriptQueuedItem, type TranscriptStopState, TranscriptUiBlock, type TranscriptWindow, type TriggerMatch, type TriggerPosition, UploadAttachmentOptions, UsageSummary, type UseAgentChatOptions, type UseAgentConfigOptions, 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, type WhileRunning, acceptsFile, agUiChatStream, applyCompletion, approvalCountdown, attachmentFile, backgroundRunsFromThread, createSkillsSource, dragHasFiles, fileKind, filesFromClipboard, filterAutocompleteItems, findActiveTrigger, formatElapsed, isRunNotActiveError, loadStoredSpeechLang, messageFiles, notifyThreads, onThreadsEvent, persistSpeechLang, readReasoningMs, reframeAgUiStream, storedMessageToUiMessage, storedThreadToUiMessages, useActionProposals, useAgentBackend, useAgentChat, useAgentConfig, useAgents, useAmbientRenderUi, useApprovalCountdown, useAttachments, useChatTranscript, useComposerAutocomplete, useElapsed, useMessageFeedback, useModels, useQuota, useSpeechRecognition, useStickToBottom, useThreads, useToolCatalog, useTranscriptItem };
2060
+ export { AGENT_RUN_ERROR_CODES, type ActionProposalsState, type AgUiChatStreamOptions, type AgUiContentPart, AgentBackend, AgentChatTransport, type AgentChatTransportOptions, type AgentConfigState, type AgentMessageMetadata, AgentProvider, type AgentProviderProps, AgentRequestError, type AgentRunErrorCode, type AgentRunFailure, type AgentStreamMeta, type AgentsState, type AggregatedTurnUsage, type AmbientRenderUi, AmbientRenderUiContext, type AnswerInput, AnyToolUIPart, type ApprovalCountdown, ApprovalTarget, type ApproveInput, ApproveOptions, type AttachmentRejection, AttachmentUploadStrategy, type AttachmentsState, type AutocompleteInputProps, type AutocompleteItem, type AutocompleteListboxProps, type AutocompleteOptionProps, type AutocompleteSource, type BackgroundRun, type ChatBackground, ChatInput, type ChatInputProps, type ChatQueue, ChatStatus, ChatStreamRequest, ChatStreamResponse, type ChatTranscript, type ClipboardLikeEvent, type CompletionEdit, type ComposerAutocomplete, DEFAULT_SPEECH_LANG, type DragLikeEvent, type EditSubmitInput, HttpErrorListener, type MessageActionInput, type MessageFeedbackState, type MessageFile, type MessageFileKind, MessageItem, type MessageItemClassNames, type MessageItemProps, MessageItemView, type MessageItemViewProps, MessageList, type MessageListClassNames, type MessageListProps, MessageUsageInfo, type ModelOption, type ModelsState, type QueuedChatMessage, QuotaBlockedError, type QuotaState, RUN_NOT_ACTIVE_CODE, type ReconnectOptions, type RejectInput, type RenderFilesFn, type RenderReasoningFn, type RenderTextFn, type RenderToolGroupFn, type RenderToolPartFn, type RenderUiFn, SPEECH_LANGUAGES, type SendWhileRunning, type SkillSuggestionData, type SkillsSourceOptions, type SkipInput, 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 TranscriptQueuedFile, type TranscriptQueuedItem, type TranscriptStopState, TranscriptUiBlock, type TranscriptWindow, type TriggerMatch, type TriggerPosition, UploadAttachmentOptions, UsageSummary, type UseAgentChatOptions, type UseAgentConfigOptions, 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, type WhileRunning, acceptsFile, agUiChatStream, applyCompletion, approvalCountdown, attachmentFile, backgroundRunsFromThread, createSkillsSource, dragHasFiles, fileKind, filesFromClipboard, filterAutocompleteItems, findActiveTrigger, formatElapsed, isRunNotActiveError, loadStoredSpeechLang, messageFiles, notifyThreads, onThreadsEvent, persistSpeechLang, readReasoningMs, reframeAgUiStream, storedMessageToUiMessage, storedThreadToUiMessages, useActionProposals, useAgentBackend, useAgentChat, useAgentConfig, useAgentUiCapabilities, useAgents, useAmbientRenderUi, useApprovalCountdown, useAttachments, useChatTranscript, useComposerAutocomplete, useElapsed, useMessageFeedback, useModels, useQuota, useSpeechRecognition, useStickToBottom, useThreads, useToolCatalog, useTranscriptItem };
package/dist/index.js CHANGED
@@ -6611,6 +6611,7 @@ export {
6611
6611
  useAgentBackend,
6612
6612
  useAgentChat,
6613
6613
  useAgentConfig,
6614
+ useAgentUiCapabilities,
6614
6615
  useAgents,
6615
6616
  useAmbientRenderUi,
6616
6617
  useApprovalCountdown,