@assistant-ui/core 0.3.19 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/attachment.d.ts +9 -10
- package/dist/adapters/attachment.d.ts.map +1 -1
- package/dist/adapters/attachment.js +2 -1
- package/dist/adapters/attachment.js.map +1 -1
- package/dist/adapters/directive-formatter.d.ts +1 -2
- package/dist/adapters/directive-formatter.d.ts.map +1 -1
- package/dist/adapters/feedback.d.ts +2 -2
- package/dist/adapters/feedback.d.ts.map +1 -1
- package/dist/adapters/speech.d.ts +6 -7
- package/dist/adapters/speech.d.ts.map +1 -1
- package/dist/adapters/suggestion.d.ts +5 -6
- package/dist/adapters/suggestion.d.ts.map +1 -1
- package/dist/adapters/thread-history.d.ts +6 -7
- package/dist/adapters/thread-history.d.ts.map +1 -1
- package/dist/adapters/trigger.d.ts +1 -2
- package/dist/adapters/trigger.d.ts.map +1 -1
- package/dist/adapters/voice.d.ts +5 -6
- package/dist/adapters/voice.d.ts.map +1 -1
- package/dist/internal/duplicate-detection.d.ts +1 -2
- package/dist/internal/duplicate-detection.d.ts.map +1 -1
- package/dist/model-context/frame/host.d.ts +1 -2
- package/dist/model-context/frame/host.d.ts.map +1 -1
- package/dist/model-context/frame/provider.d.ts +1 -2
- package/dist/model-context/frame/provider.d.ts.map +1 -1
- package/dist/model-context/frame/types.d.ts +5 -6
- package/dist/model-context/frame/types.d.ts.map +1 -1
- package/dist/model-context/interactable-composer-metadata.d.ts +9 -10
- package/dist/model-context/interactable-composer-metadata.d.ts.map +1 -1
- package/dist/model-context/registry-handles.d.ts +3 -4
- package/dist/model-context/registry-handles.d.ts.map +1 -1
- package/dist/model-context/registry.d.ts +1 -2
- package/dist/model-context/registry.d.ts.map +1 -1
- package/dist/model-context/tool-call-text.d.ts +2 -3
- package/dist/model-context/tool-call-text.d.ts.map +1 -1
- package/dist/model-context/tool.d.ts +2 -3
- package/dist/model-context/tool.d.ts.map +1 -1
- package/dist/model-context/types.d.ts +8 -9
- package/dist/model-context/types.d.ts.map +1 -1
- package/dist/react/AssistantProvider.d.ts +3 -4
- package/dist/react/AssistantProvider.d.ts.map +1 -1
- package/dist/react/AssistantRuntimeProvider.d.ts +1 -2
- package/dist/react/AssistantRuntimeProvider.d.ts.map +1 -1
- package/dist/react/RuntimeAdapter.d.ts +2 -3
- package/dist/react/RuntimeAdapter.d.ts.map +1 -1
- package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts +4 -5
- package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts.map +1 -1
- package/dist/react/adapters/LocalStorageThreadListAdapter.js +20 -34
- package/dist/react/adapters/LocalStorageThreadListAdapter.js.map +1 -1
- package/dist/react/adapters/TitleGenerationAdapter.d.ts +2 -3
- package/dist/react/adapters/TitleGenerationAdapter.d.ts.map +1 -1
- package/dist/react/client/AdaptedRemoteThread.d.ts +1 -2
- package/dist/react/client/AdaptedRemoteThread.d.ts.map +1 -1
- package/dist/react/client/DataRenderers.d.ts +1 -2
- package/dist/react/client/DataRenderers.d.ts.map +1 -1
- package/dist/react/client/InMemoryThreadList.d.ts +3 -4
- package/dist/react/client/InMemoryThreadList.d.ts.map +1 -1
- package/dist/react/client/Interactables.d.ts +1 -2
- package/dist/react/client/Interactables.d.ts.map +1 -1
- package/dist/react/client/RemoteThreadList.d.ts +2 -3
- package/dist/react/client/RemoteThreadList.d.ts.map +1 -1
- package/dist/react/client/Tools.d.ts +2 -2
- package/dist/react/client/Tools.d.ts.map +1 -1
- package/dist/react/client/interactable-model-context.d.ts +2 -3
- package/dist/react/client/interactable-model-context.d.ts.map +1 -1
- package/dist/react/interactables-legacy/Interactables.d.ts +1 -2
- package/dist/react/interactables-legacy/Interactables.d.ts.map +1 -1
- package/dist/react/interactables-legacy/interactable-model-context.d.ts +2 -3
- package/dist/react/interactables-legacy/interactable-model-context.d.ts.map +1 -1
- package/dist/react/interactables-legacy/scopes.d.ts +9 -10
- package/dist/react/interactables-legacy/scopes.d.ts.map +1 -1
- package/dist/react/interactables-legacy/useAssistantInteractable.d.ts +2 -3
- package/dist/react/interactables-legacy/useAssistantInteractable.d.ts.map +1 -1
- package/dist/react/interactables-legacy/useInteractableState.d.ts +1 -2
- package/dist/react/interactables-legacy/useInteractableState.d.ts.map +1 -1
- package/dist/react/interactables-shared/useInteractablePersistenceQueue.d.ts +1 -2
- package/dist/react/interactables-shared/useInteractablePersistenceQueue.d.ts.map +1 -1
- package/dist/react/model-context/define-mcp-toolkit.d.ts +4 -5
- package/dist/react/model-context/define-mcp-toolkit.d.ts.map +1 -1
- package/dist/react/model-context/define-toolkit.d.ts +2 -3
- package/dist/react/model-context/define-toolkit.d.ts.map +1 -1
- package/dist/react/model-context/external-tool.d.ts +1 -2
- package/dist/react/model-context/external-tool.d.ts.map +1 -1
- package/dist/react/model-context/human-tool.d.ts +3 -4
- package/dist/react/model-context/human-tool.d.ts.map +1 -1
- package/dist/react/model-context/interactableTool.d.ts +3 -4
- package/dist/react/model-context/interactableTool.d.ts.map +1 -1
- package/dist/react/model-context/makeAssistantDataUI.d.ts +2 -3
- package/dist/react/model-context/makeAssistantDataUI.d.ts.map +1 -1
- package/dist/react/model-context/makeAssistantTool.d.ts +2 -3
- package/dist/react/model-context/makeAssistantTool.d.ts.map +1 -1
- package/dist/react/model-context/makeAssistantToolUI.d.ts +2 -3
- package/dist/react/model-context/makeAssistantToolUI.d.ts.map +1 -1
- package/dist/react/model-context/provider-tool.d.ts +2 -3
- package/dist/react/model-context/provider-tool.d.ts.map +1 -1
- package/dist/react/model-context/stub-tool.d.ts +1 -2
- package/dist/react/model-context/stub-tool.d.ts.map +1 -1
- package/dist/react/model-context/toolbox.d.ts +9 -10
- package/dist/react/model-context/toolbox.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantContext.d.ts +2 -2
- package/dist/react/model-context/useAssistantContext.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantDataUI.d.ts +2 -3
- package/dist/react/model-context/useAssistantDataUI.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantInstructions.d.ts +2 -2
- package/dist/react/model-context/useAssistantInstructions.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantTool.d.ts +2 -3
- package/dist/react/model-context/useAssistantTool.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantToolUI.d.ts +2 -3
- package/dist/react/model-context/useAssistantToolUI.d.ts.map +1 -1
- package/dist/react/model-context/useAuiToolOverrides.d.ts +1 -2
- package/dist/react/model-context/useAuiToolOverrides.d.ts.map +1 -1
- package/dist/react/model-context/useInlineRender.d.ts +1 -2
- package/dist/react/model-context/useInlineRender.d.ts.map +1 -1
- package/dist/react/model-context/useInteractable.d.ts +4 -5
- package/dist/react/model-context/useInteractable.d.ts.map +1 -1
- package/dist/react/model-context/useInteractableState.d.ts +1 -2
- package/dist/react/model-context/useInteractableState.d.ts.map +1 -1
- package/dist/react/model-context/useInteractableVersions.d.ts +1 -2
- package/dist/react/model-context/useInteractableVersions.d.ts.map +1 -1
- package/dist/react/model-context/useToolArgsStatus.d.ts +2 -3
- package/dist/react/model-context/useToolArgsStatus.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarCopy.d.ts +2 -3
- package/dist/react/primitive-hooks/useActionBarCopy.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarEdit.d.ts +1 -2
- package/dist/react/primitive-hooks/useActionBarEdit.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarFeedback.d.ts +2 -3
- package/dist/react/primitive-hooks/useActionBarFeedback.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarReload.d.ts +1 -2
- package/dist/react/primitive-hooks/useActionBarReload.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarSpeak.d.ts +1 -2
- package/dist/react/primitive-hooks/useActionBarSpeak.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts +1 -2
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useBranchPickerNext.d.ts +1 -2
- package/dist/react/primitive-hooks/useBranchPickerNext.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts +1 -2
- package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerAddAttachment.d.ts +1 -2
- package/dist/react/primitive-hooks/useComposerAddAttachment.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerCancel.d.ts +1 -2
- package/dist/react/primitive-hooks/useComposerCancel.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerDictate.d.ts +1 -2
- package/dist/react/primitive-hooks/useComposerDictate.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerSend.d.ts +1 -2
- package/dist/react/primitive-hooks/useComposerSend.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useEditComposerCancel.d.ts +1 -2
- package/dist/react/primitive-hooks/useEditComposerCancel.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useEditComposerSend.d.ts +1 -2
- package/dist/react/primitive-hooks/useEditComposerSend.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useMessageBranching.d.ts +1 -2
- package/dist/react/primitive-hooks/useMessageBranching.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useMessageError.d.ts +1 -2
- package/dist/react/primitive-hooks/useMessageError.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useMessageReload.d.ts +1 -2
- package/dist/react/primitive-hooks/useMessageReload.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts +2 -3
- package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadIsEmpty.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadIsEmpty.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadIsRunning.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadIsRunning.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListLoadMore.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadListLoadMore.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListNew.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadListNew.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadMessageIds.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadMessageIds.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadMessages.d.ts +1 -2
- package/dist/react/primitive-hooks/useThreadMessages.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useVoice.d.ts +3 -4
- package/dist/react/primitive-hooks/useVoice.d.ts.map +1 -1
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts +2 -3
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts.map +1 -1
- package/dist/react/primitives/composer/ComposerAttachments.d.ts +4 -5
- package/dist/react/primitives/composer/ComposerAttachments.d.ts.map +1 -1
- package/dist/react/primitives/composer/ComposerIf.d.ts +4 -5
- package/dist/react/primitives/composer/ComposerIf.d.ts.map +1 -1
- package/dist/react/primitives/composer/ComposerQueue.d.ts +2 -3
- package/dist/react/primitives/composer/ComposerQueue.d.ts.map +1 -1
- package/dist/react/primitives/generativeUI/GenerativeUI.d.ts +4 -5
- package/dist/react/primitives/generativeUI/GenerativeUI.d.ts.map +1 -1
- package/dist/react/primitives/generativeUI/GenerativeUI.js +27 -28
- package/dist/react/primitives/generativeUI/GenerativeUI.js.map +1 -1
- package/dist/react/primitives/message/MessageAttachments.d.ts +4 -5
- package/dist/react/primitives/message/MessageAttachments.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageGroupedParts.d.ts +2 -3
- package/dist/react/primitives/message/MessageGroupedParts.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageParts.d.ts +10 -10
- package/dist/react/primitives/message/MessageParts.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageQuote.d.ts +2 -3
- package/dist/react/primitives/message/MessageQuote.d.ts.map +1 -1
- package/dist/react/primitives/messagePart/MessagePartInProgress.d.ts +2 -3
- package/dist/react/primitives/messagePart/MessagePartInProgress.d.ts.map +1 -1
- package/dist/react/primitives/part/PartMessages.d.ts +3 -4
- package/dist/react/primitives/part/PartMessages.d.ts.map +1 -1
- package/dist/react/primitives/thread/ThreadMessages.d.ts +7 -8
- package/dist/react/primitives/thread/ThreadMessages.d.ts.map +1 -1
- package/dist/react/primitives/thread/ThreadSuggestions.d.ts +5 -6
- package/dist/react/primitives/thread/ThreadSuggestions.d.ts.map +1 -1
- package/dist/react/primitives/threadList/ThreadListItems.d.ts +4 -5
- package/dist/react/primitives/threadList/ThreadListItems.d.ts.map +1 -1
- package/dist/react/primitives/threadListItem/ThreadListItemTitle.d.ts +2 -3
- package/dist/react/primitives/threadListItem/ThreadListItemTitle.d.ts.map +1 -1
- package/dist/react/providers/AttachmentByIndexProvider.d.ts +2 -3
- package/dist/react/providers/AttachmentByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/ChainOfThoughtByIndicesProvider.d.ts +1 -2
- package/dist/react/providers/ChainOfThoughtByIndicesProvider.d.ts.map +1 -1
- package/dist/react/providers/ChainOfThoughtPartByIndexProvider.d.ts +1 -2
- package/dist/react/providers/ChainOfThoughtPartByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/MessageByIdProvider.d.ts +1 -2
- package/dist/react/providers/MessageByIdProvider.d.ts.map +1 -1
- package/dist/react/providers/MessageByIndexProvider.d.ts +1 -2
- package/dist/react/providers/MessageByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/PartByIndexProvider.d.ts +1 -2
- package/dist/react/providers/PartByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/QueueItemByIndexProvider.d.ts +2 -3
- package/dist/react/providers/QueueItemByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/ReadonlyThreadProvider.d.ts +2 -3
- package/dist/react/providers/ReadonlyThreadProvider.d.ts.map +1 -1
- package/dist/react/providers/SuggestionByIndexProvider.d.ts +2 -3
- package/dist/react/providers/SuggestionByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/TextMessagePartProvider.d.ts +1 -2
- package/dist/react/providers/TextMessagePartProvider.d.ts.map +1 -1
- package/dist/react/providers/ThreadListItemByIndexProvider.d.ts +1 -2
- package/dist/react/providers/ThreadListItemByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/ThreadListItemRuntimeProvider.d.ts +1 -2
- package/dist/react/providers/ThreadListItemRuntimeProvider.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts +3 -2
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js +17 -7
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts +1 -2
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadResource.d.ts +4 -5
- package/dist/react/runtimes/RemoteThreadResource.d.ts.map +1 -1
- package/dist/react/runtimes/RuntimeAdapterProvider.d.ts +3 -3
- package/dist/react/runtimes/RuntimeAdapterProvider.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/commandQueue.d.ts +2 -3
- package/dist/react/runtimes/assistant-transport/commandQueue.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/replayBoundaryStream.d.ts +3 -4
- package/dist/react/runtimes/assistant-transport/replayBoundaryStream.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/runManager.d.ts +2 -3
- package/dist/react/runtimes/assistant-transport/runManager.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/types.d.ts +17 -18
- package/dist/react/runtimes/assistant-transport/types.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.d.ts +4 -5
- package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/useConvertedState.d.ts +1 -2
- package/dist/react/runtimes/assistant-transport/useConvertedState.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/useLatestRef.d.ts +1 -2
- package/dist/react/runtimes/assistant-transport/useLatestRef.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts +2 -3
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js +17 -4
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
- package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts +1 -2
- package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/auiV0.d.ts +11 -3
- package/dist/react/runtimes/cloud/auiV0.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/auiV0.js +63 -2
- package/dist/react/runtimes/cloud/auiV0.js.map +1 -1
- package/dist/react/runtimes/cloud/createCloudThreadListAdapter.d.ts +4 -5
- package/dist/react/runtimes/cloud/createCloudThreadListAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/createCloudThreadListAdapterCreateFallback.d.ts +1 -2
- package/dist/react/runtimes/cloud/createCloudThreadListAdapterCreateFallback.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/sdkIdentity.d.ts +1 -2
- package/dist/react/runtimes/cloud/sdkIdentity.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/sdkIdentity.js +1 -1
- package/dist/react/runtimes/cloud/useCloudThreadListAdapter.d.ts +1 -2
- package/dist/react/runtimes/cloud/useCloudThreadListAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/useCloudThreadListRuntime.d.ts +1 -2
- package/dist/react/runtimes/cloud/useCloudThreadListRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/createMessageConverter.d.ts +1 -2
- package/dist/react/runtimes/createMessageConverter.d.ts.map +1 -1
- package/dist/react/runtimes/createRuntimeExtras.d.ts +3 -4
- package/dist/react/runtimes/createRuntimeExtras.d.ts.map +1 -1
- package/dist/react/runtimes/external-message-converter.d.ts +6 -6
- package/dist/react/runtimes/external-message-converter.d.ts.map +1 -1
- package/dist/react/runtimes/useExternalStoreRuntime.d.ts +1 -2
- package/dist/react/runtimes/useExternalStoreRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/useExternalStoreSharedOptions.d.ts +1 -2
- package/dist/react/runtimes/useExternalStoreSharedOptions.d.ts.map +1 -1
- package/dist/react/runtimes/useLocalRuntime.d.ts +3 -4
- package/dist/react/runtimes/useLocalRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/useRemoteThreadListRuntime.d.ts +1 -2
- package/dist/react/runtimes/useRemoteThreadListRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/useRemoteThreadListRuntime.js +2 -2
- package/dist/react/runtimes/useRemoteThreadListRuntime.js.map +1 -1
- package/dist/react/runtimes/useRuntimeAdapters.d.ts +4 -4
- package/dist/react/runtimes/useRuntimeAdapters.d.ts.map +1 -1
- package/dist/react/runtimes/useStreamingTiming.d.ts +2 -2
- package/dist/react/runtimes/useStreamingTiming.d.ts.map +1 -1
- package/dist/react/types/MessagePartComponentTypes.d.ts +26 -27
- package/dist/react/types/MessagePartComponentTypes.d.ts.map +1 -1
- package/dist/react/types/scopes/dataRenderers.d.ts +3 -4
- package/dist/react/types/scopes/dataRenderers.d.ts.map +1 -1
- package/dist/react/types/scopes/interactables.d.ts +10 -11
- package/dist/react/types/scopes/interactables.d.ts.map +1 -1
- package/dist/react/types/scopes/tools.d.ts +4 -5
- package/dist/react/types/scopes/tools.d.ts.map +1 -1
- package/dist/react/utils/getMessageQuote.d.ts +1 -2
- package/dist/react/utils/getMessageQuote.d.ts.map +1 -1
- package/dist/react/utils/groupParts.d.ts +7 -8
- package/dist/react/utils/groupParts.d.ts.map +1 -1
- package/dist/react/utils/useJSONEqual.d.ts +2 -3
- package/dist/react/utils/useJSONEqual.d.ts.map +1 -1
- package/dist/react/utils/useJSONSchemaDependency.d.ts +1 -2
- package/dist/react/utils/useJSONSchemaDependency.d.ts.map +1 -1
- package/dist/runtime/api/assistant-runtime.d.ts +2 -3
- package/dist/runtime/api/assistant-runtime.d.ts.map +1 -1
- package/dist/runtime/api/attachment-runtime.d.ts +6 -7
- package/dist/runtime/api/attachment-runtime.d.ts.map +1 -1
- package/dist/runtime/api/bindings.d.ts +5 -6
- package/dist/runtime/api/bindings.d.ts.map +1 -1
- package/dist/runtime/api/composer-runtime.d.ts +10 -10
- package/dist/runtime/api/composer-runtime.d.ts.map +1 -1
- package/dist/runtime/api/message-part-runtime.d.ts +3 -4
- package/dist/runtime/api/message-part-runtime.d.ts.map +1 -1
- package/dist/runtime/api/message-part-runtime.js +3 -2
- package/dist/runtime/api/message-part-runtime.js.map +1 -1
- package/dist/runtime/api/message-runtime.d.ts +8 -6
- package/dist/runtime/api/message-runtime.d.ts.map +1 -1
- package/dist/runtime/api/message-runtime.js +3 -2
- package/dist/runtime/api/message-runtime.js.map +1 -1
- package/dist/runtime/api/paths.d.ts +6 -7
- package/dist/runtime/api/paths.d.ts.map +1 -1
- package/dist/runtime/api/thread-list-item-runtime.d.ts +8 -8
- package/dist/runtime/api/thread-list-item-runtime.d.ts.map +1 -1
- package/dist/runtime/api/thread-list-runtime.d.ts +4 -5
- package/dist/runtime/api/thread-list-runtime.d.ts.map +1 -1
- package/dist/runtime/api/thread-runtime.d.ts +10 -11
- package/dist/runtime/api/thread-runtime.d.ts.map +1 -1
- package/dist/runtime/base/base-assistant-runtime-core.d.ts +1 -2
- package/dist/runtime/base/base-assistant-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-composer-runtime-core.d.ts +1 -2
- package/dist/runtime/base/base-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-thread-runtime-core.d.ts +8 -3
- package/dist/runtime/base/base-thread-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-thread-runtime-core.js +71 -27
- package/dist/runtime/base/base-thread-runtime-core.js.map +1 -1
- package/dist/runtime/base/default-edit-composer-runtime-core.d.ts +1 -2
- package/dist/runtime/base/default-edit-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/default-edit-composer-runtime-core.js +12 -2
- package/dist/runtime/base/default-edit-composer-runtime-core.js.map +1 -1
- package/dist/runtime/base/default-thread-composer-runtime-core.d.ts +1 -2
- package/dist/runtime/base/default-thread-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/default-thread-composer-runtime-core.js +7 -1
- package/dist/runtime/base/default-thread-composer-runtime-core.js.map +1 -1
- package/dist/runtime/branch/external-thread-branch-adapter.d.ts +1 -2
- package/dist/runtime/branch/external-thread-branch-adapter.d.ts.map +1 -1
- package/dist/runtime/interfaces/assistant-runtime-core.d.ts +1 -2
- package/dist/runtime/interfaces/assistant-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/composer-runtime-core.d.ts +10 -11
- package/dist/runtime/interfaces/composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/thread-list-runtime-core.d.ts +4 -5
- package/dist/runtime/interfaces/thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/thread-runtime-core.d.ts +17 -16
- package/dist/runtime/interfaces/thread-runtime-core.d.ts.map +1 -1
- package/dist/runtime/queue/external-thread-queue-adapter.d.ts +2 -3
- package/dist/runtime/queue/external-thread-queue-adapter.d.ts.map +1 -1
- package/dist/runtime/queue/message-queue.d.ts +5 -4
- package/dist/runtime/queue/message-queue.d.ts.map +1 -1
- package/dist/runtime/queue/message-queue.js +9 -1
- package/dist/runtime/queue/message-queue.js.map +1 -1
- package/dist/runtime/queue/queue-item.d.ts +2 -3
- package/dist/runtime/queue/queue-item.d.ts.map +1 -1
- package/dist/runtime/utils/abortable-thread-load.d.ts +2 -3
- package/dist/runtime/utils/abortable-thread-load.d.ts.map +1 -1
- package/dist/runtime/utils/attachment-add-operations.d.ts +3 -4
- package/dist/runtime/utils/attachment-add-operations.d.ts.map +1 -1
- package/dist/runtime/utils/auto-status.d.ts +7 -8
- package/dist/runtime/utils/auto-status.d.ts.map +1 -1
- package/dist/runtime/utils/chat-model-adapter.d.ts +5 -6
- package/dist/runtime/utils/chat-model-adapter.d.ts.map +1 -1
- package/dist/runtime/utils/external-message-conversion.d.ts +15 -16
- package/dist/runtime/utils/external-message-conversion.d.ts.map +1 -1
- package/dist/runtime/utils/external-message-conversion.js +3 -2
- package/dist/runtime/utils/external-message-conversion.js.map +1 -1
- package/dist/runtime/utils/external-store-message.d.ts +4 -5
- package/dist/runtime/utils/external-store-message.d.ts.map +1 -1
- package/dist/runtime/utils/message-repository-session.d.ts +3 -4
- package/dist/runtime/utils/message-repository-session.d.ts.map +1 -1
- package/dist/runtime/utils/message-repository.d.ts +4 -5
- package/dist/runtime/utils/message-repository.d.ts.map +1 -1
- package/dist/runtime/utils/pending-tool-calls.d.ts +2 -3
- package/dist/runtime/utils/pending-tool-calls.d.ts.map +1 -1
- package/dist/runtime/utils/resolveToolApprovalResponse.d.ts +1 -2
- package/dist/runtime/utils/resolveToolApprovalResponse.d.ts.map +1 -1
- package/dist/runtime/utils/runtime-extras-brand.d.ts +2 -3
- package/dist/runtime/utils/runtime-extras-brand.d.ts.map +1 -1
- package/dist/runtime/utils/stored-message-parts.d.ts +21 -0
- package/dist/runtime/utils/stored-message-parts.d.ts.map +1 -0
- package/dist/runtime/utils/stored-message-parts.js +83 -0
- package/dist/runtime/utils/stored-message-parts.js.map +1 -0
- package/dist/runtime/utils/streaming-timing.d.ts +4 -5
- package/dist/runtime/utils/streaming-timing.d.ts.map +1 -1
- package/dist/runtime/utils/thread-message-like.d.ts +5 -5
- package/dist/runtime/utils/thread-message-like.d.ts.map +1 -1
- package/dist/runtime/utils/thread-message-like.js.map +1 -1
- package/dist/runtime/utils/thread-runtime-lifecycle.d.ts +3 -4
- package/dist/runtime/utils/thread-runtime-lifecycle.d.ts.map +1 -1
- package/dist/runtime/utils/tool-call-tree.d.ts +4 -5
- package/dist/runtime/utils/tool-call-tree.d.ts.map +1 -1
- package/dist/runtimes/assistant-transport/utils.d.ts +1 -2
- package/dist/runtimes/assistant-transport/utils.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-adapter.d.ts +9 -6
- package/dist/runtimes/external-store/external-store-adapter.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-runtime-core.d.ts +1 -2
- package/dist/runtimes/external-store/external-store-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-shared-options.d.ts +2 -3
- package/dist/runtimes/external-store/external-store-shared-options.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts +2 -3
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts +4 -3
- package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js +29 -6
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js.map +1 -1
- package/dist/runtimes/external-store/thread-message-converter.d.ts +2 -3
- package/dist/runtimes/external-store/thread-message-converter.d.ts.map +1 -1
- package/dist/runtimes/inert/InertThreadRuntimeCore.d.ts +2 -3
- package/dist/runtimes/inert/InertThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/local/local-runtime-core.d.ts +1 -2
- package/dist/runtimes/local/local-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/local/local-runtime-options.d.ts +1 -2
- package/dist/runtimes/local/local-runtime-options.d.ts.map +1 -1
- package/dist/runtimes/local/local-thread-list-runtime-core.d.ts +2 -3
- package/dist/runtimes/local/local-thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/local/local-thread-runtime-core.d.ts +9 -4
- package/dist/runtimes/local/local-thread-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/local/local-thread-runtime-core.js +53 -9
- package/dist/runtimes/local/local-thread-runtime-core.js.map +1 -1
- package/dist/runtimes/local/should-continue.d.ts +1 -2
- package/dist/runtimes/local/should-continue.d.ts.map +1 -1
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts +1 -2
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts +1 -2
- package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/adapter-changed.d.ts +1 -2
- package/dist/runtimes/remote-thread-list/adapter-changed.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts +1 -2
- package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/optimistic-state.d.ts +1 -2
- package/dist/runtimes/remote-thread-list/optimistic-state.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts +16 -17
- package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/title-generation.d.ts +7 -8
- package/dist/runtimes/remote-thread-list/title-generation.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/title.d.ts +2 -3
- package/dist/runtimes/remote-thread-list/title.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/types.d.ts +8 -9
- package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -1
- package/dist/runtimes/tool-invocations/ToolInvocationTracker.d.ts +4 -5
- package/dist/runtimes/tool-invocations/ToolInvocationTracker.d.ts.map +1 -1
- package/dist/store/clients/chain-of-thought-client.d.ts +1 -2
- package/dist/store/clients/chain-of-thought-client.d.ts.map +1 -1
- package/dist/store/clients/external-thread.d.ts +3 -4
- package/dist/store/clients/external-thread.d.ts.map +1 -1
- package/dist/store/clients/external-thread.js +15 -11
- package/dist/store/clients/external-thread.js.map +1 -1
- package/dist/store/clients/model-context-client.d.ts +1 -2
- package/dist/store/clients/model-context-client.d.ts.map +1 -1
- package/dist/store/clients/no-op-composer-client.d.ts +1 -2
- package/dist/store/clients/no-op-composer-client.d.ts.map +1 -1
- package/dist/store/clients/runtime-adapter.d.ts +1 -2
- package/dist/store/clients/runtime-adapter.d.ts.map +1 -1
- package/dist/store/clients/single-thread-list.d.ts +1 -2
- package/dist/store/clients/single-thread-list.d.ts.map +1 -1
- package/dist/store/clients/suggestions.d.ts +3 -4
- package/dist/store/clients/suggestions.d.ts.map +1 -1
- package/dist/store/clients/thread-message-client.d.ts +2 -3
- package/dist/store/clients/thread-message-client.d.ts.map +1 -1
- package/dist/store/clients/thread-selection-events.d.ts +1 -2
- package/dist/store/clients/thread-selection-events.d.ts.map +1 -1
- package/dist/store/clients/thread-tasks.d.ts +3 -4
- package/dist/store/clients/thread-tasks.d.ts.map +1 -1
- package/dist/store/env.d.ts +1 -2
- package/dist/store/env.d.ts.map +1 -1
- package/dist/store/primitive-predicates.d.ts +11 -12
- package/dist/store/primitive-predicates.d.ts.map +1 -1
- package/dist/store/primitive-predicates.js +2 -2
- package/dist/store/primitive-predicates.js.map +1 -1
- package/dist/store/runtime-clients/attachment-runtime-client.d.ts +1 -2
- package/dist/store/runtime-clients/attachment-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/composer-runtime-client.d.ts +1 -2
- package/dist/store/runtime-clients/composer-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/handle-runtime-action.d.ts +1 -2
- package/dist/store/runtime-clients/handle-runtime-action.d.ts.map +1 -1
- package/dist/store/runtime-clients/handle-thread-list-action.d.ts +1 -2
- package/dist/store/runtime-clients/handle-thread-list-action.d.ts.map +1 -1
- package/dist/store/runtime-clients/liveRef.d.ts +1 -2
- package/dist/store/runtime-clients/liveRef.d.ts.map +1 -1
- package/dist/store/runtime-clients/message-part-runtime-client.d.ts +1 -2
- package/dist/store/runtime-clients/message-part-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/message-runtime-client.d.ts +1 -2
- package/dist/store/runtime-clients/message-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts +1 -2
- package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-list-runtime-client.d.ts +1 -2
- package/dist/store/runtime-clients/thread-list-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-runtime-client.d.ts +1 -2
- package/dist/store/runtime-clients/thread-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/useSubscribable.d.ts +1 -2
- package/dist/store/runtime-clients/useSubscribable.d.ts.map +1 -1
- package/dist/store/scopes/attachment.d.ts +4 -5
- package/dist/store/scopes/attachment.d.ts.map +1 -1
- package/dist/store/scopes/chain-of-thought.d.ts +5 -6
- package/dist/store/scopes/chain-of-thought.d.ts.map +1 -1
- package/dist/store/scopes/composer.d.ts +6 -7
- package/dist/store/scopes/composer.d.ts.map +1 -1
- package/dist/store/scopes/message.d.ts +6 -6
- package/dist/store/scopes/message.d.ts.map +1 -1
- package/dist/store/scopes/model-context.d.ts +3 -4
- package/dist/store/scopes/model-context.d.ts.map +1 -1
- package/dist/store/scopes/part.d.ts +4 -5
- package/dist/store/scopes/part.d.ts.map +1 -1
- package/dist/store/scopes/queue-item.d.ts +4 -4
- package/dist/store/scopes/queue-item.d.ts.map +1 -1
- package/dist/store/scopes/suggestion.d.ts +4 -5
- package/dist/store/scopes/suggestion.d.ts.map +1 -1
- package/dist/store/scopes/suggestions.d.ts +5 -6
- package/dist/store/scopes/suggestions.d.ts.map +1 -1
- package/dist/store/scopes/task.d.ts +4 -5
- package/dist/store/scopes/task.d.ts.map +1 -1
- package/dist/store/scopes/thread-list-item.d.ts +5 -6
- package/dist/store/scopes/thread-list-item.d.ts.map +1 -1
- package/dist/store/scopes/thread.d.ts +5 -6
- package/dist/store/scopes/thread.d.ts.map +1 -1
- package/dist/store/scopes/threads.d.ts +4 -5
- package/dist/store/scopes/threads.d.ts.map +1 -1
- package/dist/subscribable/subscribable.d.ts +15 -16
- package/dist/subscribable/subscribable.d.ts.map +1 -1
- package/dist/tests/remote-thread-list-test-helpers.d.ts +5 -6
- package/dist/tests/remote-thread-list-test-helpers.d.ts.map +1 -1
- package/dist/types/attachment.d.ts +9 -10
- package/dist/types/attachment.d.ts.map +1 -1
- package/dist/types/augmentations.d.ts +3 -4
- package/dist/types/augmentations.d.ts.map +1 -1
- package/dist/types/directive.d.ts +2 -3
- package/dist/types/directive.d.ts.map +1 -1
- package/dist/types/error.d.ts +8 -9
- package/dist/types/error.d.ts.map +1 -1
- package/dist/types/message.d.ts +48 -46
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js.map +1 -1
- package/dist/types/quote.d.ts +1 -2
- package/dist/types/quote.d.ts.map +1 -1
- package/dist/types/trigger.d.ts +2 -3
- package/dist/types/trigger.d.ts.map +1 -1
- package/dist/types/unsubscribe.d.ts +1 -2
- package/dist/types/unsubscribe.d.ts.map +1 -1
- package/dist/utils/abortable-iterable.d.ts +2 -3
- package/dist/utils/abortable-iterable.d.ts.map +1 -1
- package/dist/utils/composite-context-provider.d.ts +1 -2
- package/dist/utils/composite-context-provider.d.ts.map +1 -1
- package/dist/utils/data-url.d.ts +6 -7
- package/dist/utils/data-url.d.ts.map +1 -1
- package/dist/utils/getGroupStatus.d.ts +2 -3
- package/dist/utils/getGroupStatus.d.ts.map +1 -1
- package/dist/utils/id.d.ts +3 -4
- package/dist/utils/id.d.ts.map +1 -1
- package/dist/utils/image-media-type.d.ts +1 -2
- package/dist/utils/image-media-type.d.ts.map +1 -1
- package/dist/utils/invoke-user-callback.d.ts +1 -2
- package/dist/utils/invoke-user-callback.d.ts.map +1 -1
- package/dist/utils/json/is-json-equal.d.ts +1 -2
- package/dist/utils/json/is-json-equal.d.ts.map +1 -1
- package/dist/utils/json/is-json.d.ts +4 -5
- package/dist/utils/json/is-json.d.ts.map +1 -1
- package/dist/utils/json/stable-stringify-tool-args.d.ts +2 -3
- package/dist/utils/json/stable-stringify-tool-args.d.ts.map +1 -1
- package/dist/utils/normalizePartStatus.d.ts +4 -5
- package/dist/utils/normalizePartStatus.d.ts.map +1 -1
- package/dist/utils/notify-event-listeners.d.ts +1 -2
- package/dist/utils/notify-event-listeners.d.ts.map +1 -1
- package/dist/utils/record.d.ts +1 -2
- package/dist/utils/record.d.ts.map +1 -1
- package/dist/utils/silent-runtime-action.d.ts +2 -3
- package/dist/utils/silent-runtime-action.d.ts.map +1 -1
- package/dist/utils/text.d.ts +1 -2
- package/dist/utils/text.d.ts.map +1 -1
- package/dist/utils/wire-media.d.ts +3 -4
- package/dist/utils/wire-media.d.ts.map +1 -1
- package/package.json +14 -13
- package/src/adapters/attachment.ts +8 -1
- package/src/adapters/feedback.ts +1 -0
- package/src/model-context/frame/provider.test.ts +45 -20
- package/src/react/RuntimeAdapter.test.ts +4 -1
- package/src/react/adapters/LocalStorageThreadListAdapter.test.ts +117 -0
- package/src/react/adapters/LocalStorageThreadListAdapter.tsx +27 -74
- package/src/react/client/Interactables.test.ts +12 -7
- package/src/react/client/RemoteThreadList.concurrent.test.tsx +9 -3
- package/src/react/client/RemoteThreadList.test.ts +5 -6
- package/src/react/interactables-legacy/Interactables.test.ts +9 -3
- package/src/react/interactables-legacy/useAssistantInteractable.test.tsx +40 -22
- package/src/react/model-context/useInteractable.test.tsx +56 -29
- package/src/react/primitive-hooks/useActionBarCopy.test.ts +5 -5
- package/src/react/primitives/generativeUI/GenerativeUI.test.tsx +54 -0
- package/src/react/primitives/generativeUI/GenerativeUI.tsx +13 -18
- package/src/react/primitives/message/MessageGroupedParts.test.tsx +4 -1
- package/src/react/primitives/thread/ThreadMessages.test.tsx +25 -7
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.layout.test.tsx +62 -0
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.retry.test.tsx +2 -2
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.test.tsx +23 -20
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.title.test.tsx +24 -17
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.tsx +39 -24
- package/src/react/runtimes/assistant-transport/transport-scheduling.test.ts +73 -46
- package/src/react/runtimes/assistant-transport/useAssistantTransportRuntime.test.tsx +66 -1
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.test.tsx +102 -0
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.ts +24 -11
- package/src/react/runtimes/cloud/CloudFileAttachmentAdapter.test.ts +8 -4
- package/src/react/runtimes/cloud/auiV0.ts +121 -1
- package/src/react/runtimes/cloud/auiV0DecodeSafely.test.ts +522 -0
- package/src/react/runtimes/external-message-converter.test.ts +7 -3
- package/src/react/runtimes/remote-thread-hook-on-tap.test.ts +2 -1
- package/src/react/runtimes/useExternalStoreRuntime.lifecycle.test.tsx +8 -2
- package/src/react/runtimes/useExternalStoreRuntime.suggestions.test.tsx +6 -2
- package/src/react/runtimes/useRemoteThreadListRuntime.concurrent.test.tsx +84 -4
- package/src/react/runtimes/useRemoteThreadListRuntime.ts +5 -1
- package/src/runtime/api/message-part-runtime.ts +4 -1
- package/src/runtime/api/message-runtime.ts +15 -2
- package/src/runtime/base/base-thread-runtime-core.test.ts +761 -18
- package/src/runtime/base/base-thread-runtime-core.ts +89 -26
- package/src/runtime/base/default-edit-composer-runtime-core.ts +12 -2
- package/src/runtime/base/default-thread-composer-runtime-core.ts +12 -1
- package/src/runtime/interfaces/thread-runtime-core.ts +2 -0
- package/src/runtime/queue/message-queue.ts +11 -1
- package/src/runtime/utils/external-message-conversion.test.ts +43 -0
- package/src/runtime/utils/external-message-conversion.ts +6 -2
- package/src/runtime/utils/stored-message-parts.ts +174 -0
- package/src/runtime/utils/thread-message-like.ts +7 -2
- package/src/runtimes/external-store/external-store-adapter.ts +4 -0
- package/src/runtimes/external-store/external-store-thread-runtime-core.ts +44 -9
- package/src/runtimes/local/local-thread-runtime-core.test.ts +168 -12
- package/src/runtimes/local/local-thread-runtime-core.ts +80 -9
- package/src/store/clients/external-thread.ts +34 -13
- package/src/store/primitive-predicates.test.ts +16 -0
- package/src/store/primitive-predicates.ts +4 -1
- package/src/store/runtime-clients/thread-runtime-client.test.tsx +110 -0
- package/src/store/scopes/message.ts +4 -1
- package/src/subscribable/subscribable.test.ts +7 -2
- package/src/tests/attachment-adapters.test.ts +16 -1
- package/src/tests/auiV0Encode.test.ts +4 -0
- package/src/tests/base-composer-runtime-core-addAttachment.test.ts +6 -6
- package/src/tests/base-composer-runtime-core.test.ts +16 -5
- package/src/tests/composer-can-cancel.test.ts +35 -6
- package/src/tests/composer-can-send.test.ts +22 -0
- package/src/tests/default-edit-composer-runtime-core.test.ts +47 -0
- package/src/tests/external-store-thread-runtime-core-adapter.test.ts +229 -27
- package/src/tests/external-store-thread-runtime-core.test.ts +31 -0
- package/src/tests/external-thread-attachments.test.tsx +22 -23
- package/src/tests/external-thread-feedback.test.tsx +20 -7
- package/src/tests/external-thread-parity.test.tsx +1 -1
- package/src/tests/message-queue.test.ts +45 -10
- package/src/tests/thread-switch-events.test.tsx +11 -7
- package/src/tests/useRemoteThreadListRuntime-controlled.test.tsx +2 -1
- package/src/types/message.test.ts +19 -0
- package/src/types/message.ts +16 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Unstable_TriggerItem } from "./trigger.js";
|
|
2
2
|
//#region src/types/directive.d.ts
|
|
3
3
|
/** Parsed segment from directive text: either literal text or a resolved directive. */
|
|
4
|
-
type Unstable_DirectiveSegment = {
|
|
4
|
+
export type Unstable_DirectiveSegment = {
|
|
5
5
|
readonly kind: "text";
|
|
6
6
|
readonly text: string;
|
|
7
7
|
} | {
|
|
@@ -11,12 +11,11 @@ type Unstable_DirectiveSegment = {
|
|
|
11
11
|
readonly id: string;
|
|
12
12
|
};
|
|
13
13
|
/** Configurable formatter for directive serialization and parsing. */
|
|
14
|
-
type Unstable_DirectiveFormatter = {
|
|
14
|
+
export type Unstable_DirectiveFormatter = {
|
|
15
15
|
/** Serialize a trigger item to directive text. */
|
|
16
16
|
serialize(item: Unstable_TriggerItem): string;
|
|
17
17
|
/** Parse text into alternating text and directive segments. */
|
|
18
18
|
parse(text: string): readonly Unstable_DirectiveSegment[];
|
|
19
19
|
};
|
|
20
20
|
//#endregion
|
|
21
|
-
export { Unstable_DirectiveFormatter, Unstable_DirectiveSegment };
|
|
22
21
|
//# sourceMappingURL=directive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive.d.ts","names":[],"sources":["../../src/types/directive.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"directive.d.ts","names":[],"sources":["../../src/types/directive.ts"],"mappings":";;;YAGY;WACG;WAAuB;;WAEvB;WACA;WACA;WACA;;;YAIH;;EAEV,UAAU,MAAM;;EAEhB,MAAM,wBAAwB"}
|
package/dist/types/error.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
//#region src/types/error.d.ts
|
|
2
|
-
type ErrorSeverity = "critical" | "warning" | "info";
|
|
3
|
-
type ErrorDisplay = "inline" | "toast" | "silent" | "dev-only";
|
|
4
|
-
type AssistantErrorCode = "unknown" | "network" | "provider" | (string & {});
|
|
5
|
-
type AssistantError = {
|
|
2
|
+
export type ErrorSeverity = "critical" | "warning" | "info";
|
|
3
|
+
export type ErrorDisplay = "inline" | "toast" | "silent" | "dev-only";
|
|
4
|
+
export type AssistantErrorCode = "unknown" | "network" | "provider" | (string & {});
|
|
5
|
+
export type AssistantError = {
|
|
6
6
|
readonly code: AssistantErrorCode;
|
|
7
7
|
readonly message: string;
|
|
8
8
|
readonly severity?: ErrorSeverity;
|
|
9
9
|
readonly display?: ErrorDisplay;
|
|
10
10
|
};
|
|
11
|
-
declare const isAssistantError: (value: unknown) => value is AssistantError;
|
|
11
|
+
export declare const isAssistantError: (value: unknown) => value is AssistantError;
|
|
12
12
|
declare const MESSAGE_NOT_SENT: unique symbol;
|
|
13
13
|
/**
|
|
14
14
|
* Rejection reason for a send that never reached the backend, so nothing ran
|
|
@@ -18,12 +18,11 @@ declare const MESSAGE_NOT_SENT: unique symbol;
|
|
|
18
18
|
* since. An edit composer closes at dispatch, so a rejected edit is not
|
|
19
19
|
* restored.
|
|
20
20
|
*/
|
|
21
|
-
declare class MessageNotSentError extends Error {
|
|
21
|
+
export declare class MessageNotSentError extends Error {
|
|
22
22
|
readonly [MESSAGE_NOT_SENT] = true;
|
|
23
23
|
constructor(message?: string);
|
|
24
24
|
}
|
|
25
|
-
declare const isMessageNotSentError: (error: unknown) => error is MessageNotSentError;
|
|
26
|
-
declare const toAssistantError: (error: unknown) => AssistantError;
|
|
25
|
+
export declare const isMessageNotSentError: (error: unknown) => error is MessageNotSentError;
|
|
26
|
+
export declare const toAssistantError: (error: unknown) => AssistantError;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { AssistantError, AssistantErrorCode, ErrorDisplay, ErrorSeverity, MessageNotSentError, isAssistantError, isMessageNotSentError, toAssistantError };
|
|
29
28
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","names":[],"sources":["../../src/types/error.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"error.d.ts","names":[],"sources":["../../src/types/error.ts"],"mappings":";YAAY;YAEA;YAEA;YAMA;WACD,MAAM;WACN;WACA,WAAW;WACX,UAAU;;qBAYR,mBAAoB,mBAAiB,SAAS;cA4BrD;;;;;;;;;qBAUO,4BAA4B;YAC7B;EAEE,YAAA;;qBAMD,wBACX,mBACC,SAAS;qBAGC,mBAAoB,mBAAiB"}
|
package/dist/types/message.d.ts
CHANGED
|
@@ -2,17 +2,17 @@ import { CompleteAttachment } from "./attachment.js";
|
|
|
2
2
|
import { ToolCallTiming, ToolModelContentPart } from "assistant-stream";
|
|
3
3
|
import { ReadonlyJSONObject, ReadonlyJSONValue } from "assistant-stream/utils";
|
|
4
4
|
//#region src/types/message.d.ts
|
|
5
|
-
type PartProviderMetadata = {
|
|
5
|
+
export type PartProviderMetadata = {
|
|
6
6
|
readonly [providerName: string]: ReadonlyJSONObject;
|
|
7
7
|
};
|
|
8
|
-
type TextMessagePart = {
|
|
8
|
+
export type TextMessagePart = {
|
|
9
9
|
readonly type: "text";
|
|
10
10
|
readonly text: string;
|
|
11
11
|
readonly status?: MessagePartStreamStatus;
|
|
12
12
|
readonly providerMetadata?: PartProviderMetadata;
|
|
13
13
|
readonly parentId?: string;
|
|
14
14
|
};
|
|
15
|
-
type ReasoningMessagePart = {
|
|
15
|
+
export type ReasoningMessagePart = {
|
|
16
16
|
readonly type: "reasoning";
|
|
17
17
|
readonly text: string;
|
|
18
18
|
readonly status?: MessagePartStreamStatus;
|
|
@@ -20,8 +20,8 @@ type ReasoningMessagePart = {
|
|
|
20
20
|
readonly providerMetadata?: PartProviderMetadata;
|
|
21
21
|
readonly parentId?: string;
|
|
22
22
|
};
|
|
23
|
-
type SourceProviderMetadata = PartProviderMetadata;
|
|
24
|
-
type SourceMessagePart = {
|
|
23
|
+
export type SourceProviderMetadata = PartProviderMetadata;
|
|
24
|
+
export type SourceMessagePart = {
|
|
25
25
|
readonly type: "source";
|
|
26
26
|
readonly sourceType: "url";
|
|
27
27
|
readonly id: string;
|
|
@@ -40,13 +40,13 @@ type SourceMessagePart = {
|
|
|
40
40
|
readonly providerMetadata?: SourceProviderMetadata;
|
|
41
41
|
readonly parentId?: string;
|
|
42
42
|
};
|
|
43
|
-
type ImageMessagePart = {
|
|
43
|
+
export type ImageMessagePart = {
|
|
44
44
|
readonly type: "image";
|
|
45
45
|
readonly image: string;
|
|
46
46
|
readonly filename?: string;
|
|
47
47
|
readonly providerMetadata?: PartProviderMetadata;
|
|
48
48
|
};
|
|
49
|
-
type FileMessagePart = {
|
|
49
|
+
export type FileMessagePart = {
|
|
50
50
|
readonly type: "file";
|
|
51
51
|
readonly filename?: string;
|
|
52
52
|
readonly data: string;
|
|
@@ -65,14 +65,14 @@ type FileMessagePart = {
|
|
|
65
65
|
* section of the message primitive docs. Honored everywhere it is accepted; it
|
|
66
66
|
* will not gain fields.
|
|
67
67
|
*/
|
|
68
|
-
type Unstable_AudioMessagePart = {
|
|
68
|
+
export type Unstable_AudioMessagePart = {
|
|
69
69
|
readonly type: "audio";
|
|
70
70
|
readonly audio: {
|
|
71
71
|
readonly data: string;
|
|
72
72
|
readonly format: "mp3" | "wav";
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
type DataMessagePart<T = any> = {
|
|
75
|
+
export type DataMessagePart<T = any> = {
|
|
76
76
|
readonly type: "data";
|
|
77
77
|
readonly name: string;
|
|
78
78
|
readonly data: T;
|
|
@@ -86,7 +86,7 @@ type DataMessagePart<T = any> = {
|
|
|
86
86
|
* rejected with a typed error — the allowlist is the security boundary in the
|
|
87
87
|
* default same-realm rendering path.
|
|
88
88
|
*/
|
|
89
|
-
type GenerativeUINode = string | {
|
|
89
|
+
export type GenerativeUINode = string | {
|
|
90
90
|
/** Allowlisted component name (resolved against the consumer registry). */
|
|
91
91
|
readonly component: string;
|
|
92
92
|
/** Props passed to the resolved component (must be JSON-serializable). */
|
|
@@ -99,7 +99,7 @@ type GenerativeUINode = string | {
|
|
|
99
99
|
/**
|
|
100
100
|
* The root spec for a generative UI tree.
|
|
101
101
|
*/
|
|
102
|
-
type GenerativeUISpec = {
|
|
102
|
+
export type GenerativeUISpec = {
|
|
103
103
|
/** Root node(s) to render. */
|
|
104
104
|
readonly root: GenerativeUINode | readonly GenerativeUINode[];
|
|
105
105
|
};
|
|
@@ -111,7 +111,7 @@ type GenerativeUISpec = {
|
|
|
111
111
|
* — any unknown name throws a typed error rather than rendering. Stream-
|
|
112
112
|
* friendly: a partially-streamed spec renders progressively.
|
|
113
113
|
*/
|
|
114
|
-
type GenerativeUIMessagePart = {
|
|
114
|
+
export type GenerativeUIMessagePart = {
|
|
115
115
|
readonly type: "generative-ui";
|
|
116
116
|
/** The JSON spec describing the UI tree. */
|
|
117
117
|
readonly spec: GenerativeUISpec;
|
|
@@ -119,20 +119,20 @@ type GenerativeUIMessagePart = {
|
|
|
119
119
|
readonly id?: string;
|
|
120
120
|
readonly parentId?: string;
|
|
121
121
|
};
|
|
122
|
-
type McpAppMetadata = {
|
|
122
|
+
export type McpAppMetadata = {
|
|
123
123
|
readonly resourceUri: string;
|
|
124
124
|
readonly mimeType?: string;
|
|
125
125
|
readonly visibility?: readonly ("model" | "app")[];
|
|
126
126
|
/** Routable server identity emitted by the agent stack when multiple MCP servers back one agent; for @ag-ui/mcp-apps-middleware this is the configured serverId, falling back to its serverHash. */
|
|
127
127
|
readonly serverId?: string;
|
|
128
128
|
};
|
|
129
|
-
declare const MCP_APP_URI_SCHEME = "ui://";
|
|
130
|
-
declare const isMcpAppUri: (uri: string | undefined) => boolean;
|
|
131
|
-
type ToolCallMessagePartMcpMetadata = {
|
|
129
|
+
export declare const MCP_APP_URI_SCHEME = "ui://";
|
|
130
|
+
export declare const isMcpAppUri: (uri: string | undefined) => boolean;
|
|
131
|
+
export type ToolCallMessagePartMcpMetadata = {
|
|
132
132
|
readonly app?: McpAppMetadata;
|
|
133
133
|
};
|
|
134
|
-
type ToolApprovalOptionKind = "allow-once" | "allow-always" | "reject-once" | "reject-always";
|
|
135
|
-
type ToolApprovalOption = {
|
|
134
|
+
export type ToolApprovalOptionKind = "allow-once" | "allow-always" | "reject-once" | "reject-always";
|
|
135
|
+
export type ToolApprovalOption = {
|
|
136
136
|
/** Opaque, host-defined identifier. Scope semantics (session vs project vs global) belong to the option supplier. */
|
|
137
137
|
readonly id: string;
|
|
138
138
|
/**
|
|
@@ -163,17 +163,17 @@ type ToolApprovalOption = {
|
|
|
163
163
|
* Unlike {@link ToolApprovalOptionKind} the set is closed, because a renderer
|
|
164
164
|
* that cannot cover every mode exhaustively is back to guessing the affordance.
|
|
165
165
|
*/
|
|
166
|
-
type ToolApprovalDisplay = "decision" | "select" | "text";
|
|
166
|
+
export type ToolApprovalDisplay = "decision" | "select" | "text";
|
|
167
167
|
/**
|
|
168
168
|
* Whether the request asks for a free-form answer, on its own or alongside its
|
|
169
169
|
* options. Renderers read this to decide whether to offer a text affordance,
|
|
170
170
|
* and the runtime reads it to reject a `text` response the host cannot record.
|
|
171
171
|
*/
|
|
172
|
-
declare const toolApprovalAcceptsText: (approval: {
|
|
172
|
+
export declare const toolApprovalAcceptsText: (approval: {
|
|
173
173
|
readonly display?: ToolApprovalDisplay;
|
|
174
174
|
readonly allowFreeform?: boolean;
|
|
175
175
|
}) => boolean;
|
|
176
|
-
type ToolApprovalResponse = {
|
|
176
|
+
export type ToolApprovalResponse = {
|
|
177
177
|
readonly approved: boolean;
|
|
178
178
|
readonly text?: string;
|
|
179
179
|
readonly reason?: string;
|
|
@@ -191,7 +191,7 @@ type ToolApprovalResponse = {
|
|
|
191
191
|
readonly text: string;
|
|
192
192
|
readonly reason?: string;
|
|
193
193
|
};
|
|
194
|
-
type ToolCallMessagePart<TArgs = ReadonlyJSONObject, TResult = unknown> = {
|
|
194
|
+
export type ToolCallMessagePart<TArgs = ReadonlyJSONObject, TResult = unknown> = {
|
|
195
195
|
/** Identifies this part as a tool call. */
|
|
196
196
|
readonly type: "tool-call";
|
|
197
197
|
/** Stable identifier for this invocation of the tool. */
|
|
@@ -258,9 +258,9 @@ type ToolCallMessagePart<TArgs = ReadonlyJSONObject, TResult = unknown> = {
|
|
|
258
258
|
*/
|
|
259
259
|
readonly messages?: readonly ThreadMessage[];
|
|
260
260
|
};
|
|
261
|
-
type ThreadUserMessagePart = TextMessagePart | ImageMessagePart | FileMessagePart | DataMessagePart | Unstable_AudioMessagePart;
|
|
262
|
-
type ThreadAssistantMessagePart = TextMessagePart | ReasoningMessagePart | ToolCallMessagePart | SourceMessagePart | FileMessagePart | ImageMessagePart | DataMessagePart | GenerativeUIMessagePart;
|
|
263
|
-
type MessagePartStatus = {
|
|
261
|
+
export type ThreadUserMessagePart = TextMessagePart | ImageMessagePart | FileMessagePart | DataMessagePart | Unstable_AudioMessagePart;
|
|
262
|
+
export type ThreadAssistantMessagePart = TextMessagePart | ReasoningMessagePart | ToolCallMessagePart | SourceMessagePart | FileMessagePart | ImageMessagePart | DataMessagePart | GenerativeUIMessagePart;
|
|
263
|
+
export type MessagePartStatus = {
|
|
264
264
|
readonly type: "running";
|
|
265
265
|
} | {
|
|
266
266
|
readonly type: "complete";
|
|
@@ -269,7 +269,7 @@ type MessagePartStatus = {
|
|
|
269
269
|
readonly reason: "cancelled" | "length" | "content-filter" | "other" | "error";
|
|
270
270
|
readonly error?: unknown;
|
|
271
271
|
};
|
|
272
|
-
type MessagePartStreamStatus = {
|
|
272
|
+
export type MessagePartStreamStatus = {
|
|
273
273
|
readonly type: "running";
|
|
274
274
|
} | {
|
|
275
275
|
readonly type: "complete";
|
|
@@ -277,7 +277,7 @@ type MessagePartStreamStatus = {
|
|
|
277
277
|
readonly type: "incomplete";
|
|
278
278
|
readonly reason: "cancelled" | "length" | "content-filter" | "other" | "error";
|
|
279
279
|
};
|
|
280
|
-
type ToolCallMessagePartStatus = {
|
|
280
|
+
export type ToolCallMessagePartStatus = {
|
|
281
281
|
/** The tool call is waiting for UI or human input before continuing. */
|
|
282
282
|
readonly type: "requires-action";
|
|
283
283
|
/** Reason the tool call requires action. */
|
|
@@ -287,7 +287,7 @@ type ToolCallMessagePartStatus = {
|
|
|
287
287
|
readonly reason: "tool-calls";
|
|
288
288
|
readonly error?: ReadonlyJSONValue;
|
|
289
289
|
} | MessagePartStatus;
|
|
290
|
-
type MessageStatus = {
|
|
290
|
+
export type MessageStatus = {
|
|
291
291
|
readonly type: "running";
|
|
292
292
|
} | {
|
|
293
293
|
readonly type: "requires-action";
|
|
@@ -300,7 +300,7 @@ type MessageStatus = {
|
|
|
300
300
|
readonly reason: "cancelled" | "tool-calls" | "length" | "content-filter" | "other" | "error";
|
|
301
301
|
readonly error?: ReadonlyJSONValue;
|
|
302
302
|
};
|
|
303
|
-
type MessageTiming = {
|
|
303
|
+
export type MessageTiming = {
|
|
304
304
|
readonly streamStartTime: number;
|
|
305
305
|
readonly firstTokenTime?: number;
|
|
306
306
|
readonly totalStreamTime?: number;
|
|
@@ -309,8 +309,8 @@ type MessageTiming = {
|
|
|
309
309
|
readonly totalChunks: number;
|
|
310
310
|
readonly toolCallCount: number;
|
|
311
311
|
};
|
|
312
|
-
type MessageModality = "voice";
|
|
313
|
-
type ThreadStep = {
|
|
312
|
+
export type MessageModality = "voice";
|
|
313
|
+
export type ThreadStep = {
|
|
314
314
|
readonly messageId?: string;
|
|
315
315
|
readonly usage?: {
|
|
316
316
|
readonly inputTokens: number;
|
|
@@ -321,7 +321,7 @@ type MessageCommonProps = {
|
|
|
321
321
|
readonly id: string;
|
|
322
322
|
readonly createdAt: Date;
|
|
323
323
|
};
|
|
324
|
-
type ThreadSystemMessage = MessageCommonProps & {
|
|
324
|
+
export type ThreadSystemMessage = MessageCommonProps & {
|
|
325
325
|
readonly role: "system";
|
|
326
326
|
readonly content: readonly [TextMessagePart];
|
|
327
327
|
readonly metadata: {
|
|
@@ -335,7 +335,7 @@ type ThreadSystemMessage = MessageCommonProps & {
|
|
|
335
335
|
readonly custom: Record<string, unknown>;
|
|
336
336
|
};
|
|
337
337
|
};
|
|
338
|
-
type ThreadUserMessage = MessageCommonProps & {
|
|
338
|
+
export type ThreadUserMessage = MessageCommonProps & {
|
|
339
339
|
readonly role: "user";
|
|
340
340
|
readonly content: readonly ThreadUserMessagePart[];
|
|
341
341
|
readonly attachments: readonly CompleteAttachment[];
|
|
@@ -352,7 +352,7 @@ type ThreadUserMessage = MessageCommonProps & {
|
|
|
352
352
|
readonly custom: Record<string, unknown>;
|
|
353
353
|
};
|
|
354
354
|
};
|
|
355
|
-
type ThreadAssistantMessage = MessageCommonProps & {
|
|
355
|
+
export type ThreadAssistantMessage = MessageCommonProps & {
|
|
356
356
|
readonly role: "assistant";
|
|
357
357
|
readonly content: readonly ThreadAssistantMessagePart[];
|
|
358
358
|
readonly status: MessageStatus;
|
|
@@ -363,6 +363,7 @@ type ThreadAssistantMessage = MessageCommonProps & {
|
|
|
363
363
|
readonly steps: readonly ThreadStep[];
|
|
364
364
|
readonly submittedFeedback?: {
|
|
365
365
|
readonly type: "positive" | "negative";
|
|
366
|
+
readonly comment?: string;
|
|
366
367
|
};
|
|
367
368
|
readonly timing?: MessageTiming;
|
|
368
369
|
/**
|
|
@@ -378,26 +379,27 @@ type ThreadAssistantMessage = MessageCommonProps & {
|
|
|
378
379
|
type BaseThreadMessage = {
|
|
379
380
|
readonly status?: ThreadAssistantMessage["status"];
|
|
380
381
|
readonly metadata: {
|
|
381
|
-
readonly unstable_state?: ReadonlyJSONValue;
|
|
382
|
-
readonly unstable_annotations?: readonly ReadonlyJSONValue[];
|
|
383
|
-
readonly unstable_data?: readonly ReadonlyJSONValue[];
|
|
384
|
-
readonly steps?: readonly ThreadStep[];
|
|
382
|
+
readonly unstable_state?: ReadonlyJSONValue | undefined;
|
|
383
|
+
readonly unstable_annotations?: readonly ReadonlyJSONValue[] | undefined;
|
|
384
|
+
readonly unstable_data?: readonly ReadonlyJSONValue[] | undefined;
|
|
385
|
+
readonly steps?: readonly ThreadStep[] | undefined;
|
|
385
386
|
readonly submittedFeedback?: {
|
|
386
387
|
readonly type: "positive" | "negative";
|
|
387
|
-
|
|
388
|
-
|
|
388
|
+
readonly comment?: string;
|
|
389
|
+
} | undefined;
|
|
390
|
+
readonly timing?: MessageTiming | undefined;
|
|
389
391
|
readonly isOptimistic?: boolean;
|
|
390
|
-
readonly modality?: MessageModality;
|
|
392
|
+
readonly modality?: MessageModality | undefined;
|
|
391
393
|
readonly custom: Record<string, unknown>;
|
|
392
394
|
};
|
|
393
395
|
readonly attachments?: ThreadUserMessage["attachments"];
|
|
394
396
|
};
|
|
395
|
-
type ThreadMessage = BaseThreadMessage & (ThreadSystemMessage | ThreadUserMessage | ThreadAssistantMessage);
|
|
396
|
-
type MessageRole = ThreadMessage["role"];
|
|
397
|
-
type RunConfig = {
|
|
397
|
+
export type ThreadMessage = BaseThreadMessage & (ThreadSystemMessage | ThreadUserMessage | ThreadAssistantMessage);
|
|
398
|
+
export type MessageRole = ThreadMessage["role"];
|
|
399
|
+
export type RunConfig = {
|
|
398
400
|
readonly custom?: Record<string, unknown>;
|
|
399
401
|
};
|
|
400
|
-
type AppendMessage = Omit<ThreadMessage, "id"> & {
|
|
402
|
+
export type AppendMessage = Omit<ThreadMessage, "id"> & {
|
|
401
403
|
parentId: string | null;
|
|
402
404
|
/** The ID of the message that was edited or undefined. */
|
|
403
405
|
sourceId: string | null;
|
|
@@ -407,5 +409,5 @@ type AppendMessage = Omit<ThreadMessage, "id"> & {
|
|
|
407
409
|
steer?: boolean | undefined;
|
|
408
410
|
};
|
|
409
411
|
//#endregion
|
|
410
|
-
export {
|
|
412
|
+
export type { ToolCallTiming, ToolModelContentPart };
|
|
411
413
|
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","names":[],"sources":["../../src/types/message.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"message.d.ts","names":[],"sources":["../../src/types/message.ts"],"mappings":";;;;YASY;YACA,uBAAuB;;YAGvB;WACD;WACA;WACA,SAAS;WACT,mBAAmB;WACnB;;YAGC;WACD;WACA;WACA,SAAS;WACT;WACA,mBAAmB;WACnB;;YAGC,yBAAyB;YAEzB;WAEG;WACA;WACA;WACA;WACA;WACA,mBAAmB;WACnB;;WAGA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mBAAmB;WACnB;;YAGH;WACD;WACA;WACA;WACA,mBAAmB;;YAGlB;WACD;WACA;WACA;WACA;;WAEA;WACA,mBAAmB;WACnB;;;;;;;;;;;YAYC;WACD;WACA;aACE;aACA;;;YAID,gBAAgB;WACjB;WACA;WACA,MAAM;;;;;;;;;;;YAYL;;WAIG;;WAEA,QAAQ;;WAER,oBAAoB;;WAEpB;;;;;YAMH;;WAED,MAAM,4BAA4B;;;;;;;;;;YAWjC;WACD;;WAEA,MAAM;;WAEN;WACA;;YAGC;WACD;WACA;WACA;;WAEA;;qBAGE;qBAEA,cAAe;YAGhB;WACD,MAAM;;YAGL;YAMA;;WAED;;;;;;;WAOA,MAAM;;WAEN;WACA;;WAEA;;WAEA;IAAsB;IAAgB;;;;;;;;;;;;;YAarC;;;;;;qBAOC,0BAA2B;WAC7B,UAAU;WACV;;YAGC;WAEG;WACA;WACA;;WAGA;WACA;WACA;;WAGA;WACA;WACA;WACA;;;WAIA;WACA;;YAGH,oBACV,QAAQ,oBACR;;WAGS;;WAEA;;WAEA;;;;;;WAMA,MAAM;;WAEN,SAAS;;WAET;;WAEA;;WAEA;;WAEA,SAAS;;WAET,MAAM;;WAEN,mBAAmB;;WAEnB,wBAAwB;;WAExB;IAAc;IAAe;;;WAE7B;aACE;;;;;;aAMA;;aAEA,UAAU;;aAEV;aACA;aACA;aACA;;aAEA,mBAAmB;;aAEnB;;aAEA;;aAEA;;;WAGF;;;;;WAKA,oBAAoB;;YAGnB,wBACR,kBACA,mBACA,kBACA,kBACA;YAEQ,6BACR,kBACA,uBACA,sBACA,oBACA,kBACA,mBACA,kBACA;YAEQ;WAEG;;WAGA;;WAGA;WACA;WAMA;;YAGH;WAEG;;WAGA;;WAGA;WACA;;YAQH;;WAGG;;WAEA;;WAGA;WACA;WACA,QAAQ;IAEnB;YAEQ;WAEG;;WAGA;WACA;;WAGA;WACA;;WAGA;WACA;WAOA,QAAQ;;YAGX;WACD;WACA;WACA;WACA;WACA;WACA;WACA;;YAGC;YAEA;WACD;WACA;aAEM;aACA;;;KAKZ;WACM;WACA,WAAW;;YAGV,sBAAsB;WACvB;WACA,mBAAmB;WACnB;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA,QAAQ;;;YAIT,oBAAoB;WACrB;WACA,kBAAkB;WAClB,sBAAsB;WACtB;aACE;aACA;aACA;aACA;aACA;aACA;aACA;;aAEA,WAAW;aACX,QAAQ;;;YAIT,yBAAyB;WAC1B;WACA,kBAAkB;WAClB,QAAQ;WACR;aACE,gBAAgB;aAChB,+BAA+B;aAC/B,wBAAwB;aACxB,gBAAgB;aAChB;eACE;eACA;;aAEF,SAAS;;;;;aAKT;;aAEA,WAAW;aACX,QAAQ;;;KAIhB;WACM,SAAS;WACT;aACE,iBAAiB;aACjB,gCAAgC;aAChC,yBAAyB;aACzB,iBAAiB;aACjB;eAEM;eACA;;aAGN,SAAS;aACT;aACA,WAAW;aACX,QAAQ;;WAEV,cAAc;;YAGb,gBAAgB,qBACzB,sBAAsB,oBAAoB;YAEjC,cAAc;YAEd;WACD,SAAS;;YAGR,gBAAgB,KAAK;EAC/B;;EAGA;EACA,WAAW;EACX;;EAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","names":["ReadonlyJSONObject","ReadonlyJSONValue","ToolCallTiming","ToolModelContentPart","CompleteAttachment","PartProviderMetadata","providerName","TextMessagePart","type","text","status","MessagePartStreamStatus","providerMetadata","parentId","ReasoningMessagePart","unstable_summary","SourceProviderMetadata","SourceMessagePart","sourceType","id","url","title","mediaType","filename","ImageMessagePart","image","FileMessagePart","data","mimeType","Unstable_AudioMessagePart","audio","format","DataMessagePart","name","T","GenerativeUINode","component","props","Record","children","key","GenerativeUISpec","root","GenerativeUIMessagePart","spec","McpAppMetadata","resourceUri","visibility","serverId","MCP_APP_URI_SCHEME","isMcpAppUri","uri","startsWith","ToolCallMessagePartMcpMetadata","app","ToolApprovalOptionKind","ToolApprovalOption","kind","label","description","grants","confirm","ToolApprovalDisplay","toolApprovalAcceptsText","approval","display","allowFreeform","ToolApprovalResponse","approved","reason","optionId","ToolCallMessagePart","toolCallId","toolName","args","TArgs","result","TResult","isError","argsText","artifact","timing","mcp","modelContent","interrupt","payload","prompt","isAutomatic","options","resolution","messages","ThreadMessage","ThreadUserMessagePart","ThreadAssistantMessagePart","MessagePartStatus","error","ToolCallMessagePartStatus","MessageStatus","MessageTiming","streamStartTime","firstTokenTime","totalStreamTime","tokenCount","tokensPerSecond","totalChunks","toolCallCount","MessageModality","ThreadStep","messageId","usage","inputTokens","outputTokens","MessageCommonProps","createdAt","Date","ThreadSystemMessage","role","content","metadata","unstable_state","unstable_annotations","unstable_data","steps","submittedFeedback","modality","custom","ThreadUserMessage","attachments","isOptimistic","ThreadAssistantMessage","BaseThreadMessage","MessageRole","RunConfig","AppendMessage","Omit","sourceId","runConfig","startRun","steer"],"sources":["../../src/types/message.ts"],"sourcesContent":["import type {\n ReadonlyJSONObject,\n ReadonlyJSONValue,\n} from \"assistant-stream/utils\";\nimport type { ToolCallTiming, ToolModelContentPart } from \"assistant-stream\";\nimport type { CompleteAttachment } from \"./attachment\";\n\nexport type { ToolCallTiming, ToolModelContentPart };\n\nexport type PartProviderMetadata = {\n readonly [providerName: string]: ReadonlyJSONObject;\n};\n\nexport type TextMessagePart = {\n readonly type: \"text\";\n readonly text: string;\n readonly status?: MessagePartStreamStatus;\n readonly providerMetadata?: PartProviderMetadata;\n readonly parentId?: string;\n};\n\nexport type ReasoningMessagePart = {\n readonly type: \"reasoning\";\n readonly text: string;\n readonly status?: MessagePartStreamStatus;\n readonly unstable_summary?: string;\n readonly providerMetadata?: PartProviderMetadata;\n readonly parentId?: string;\n};\n\nexport type SourceProviderMetadata = PartProviderMetadata;\n\nexport type SourceMessagePart =\n | {\n readonly type: \"source\";\n readonly sourceType: \"url\";\n readonly id: string;\n readonly url: string;\n readonly title?: string;\n readonly providerMetadata?: SourceProviderMetadata;\n readonly parentId?: string;\n }\n | {\n readonly type: \"source\";\n readonly sourceType: \"document\";\n readonly id: string;\n readonly url?: undefined;\n readonly title: string;\n readonly mediaType: string;\n readonly filename?: string;\n readonly providerMetadata?: SourceProviderMetadata;\n readonly parentId?: string;\n };\n\nexport type ImageMessagePart = {\n readonly type: \"image\";\n readonly image: string;\n readonly filename?: string;\n readonly providerMetadata?: PartProviderMetadata;\n};\n\nexport type FileMessagePart = {\n readonly type: \"file\";\n readonly filename?: string;\n readonly data: string;\n readonly mimeType: string;\n /** How `data` goes on the wire: a url or id reference; omitted = inferred (http(s) → url, else base64). \"url\" is honored by the LangChain-family, A2A, AG-UI, and Google ADK runtimes; \"id\" by the LangChain family only. */\n readonly sourceType?: \"url\" | \"id\";\n readonly providerMetadata?: PartProviderMetadata;\n readonly parentId?: string;\n};\n\n/**\n * @deprecated Use {@link FileMessagePart} with an `audio/*` mime type. `file`\n * is the carrier for every non-image binary modality: it is a member of both\n * the user and assistant unions, carries a filename, and can declare how its\n * payload goes on the wire, none of which this shape can express. The payload\n * form a `file` part needs is still adapter specific; see the Part Types\n * section of the message primitive docs. Honored everywhere it is accepted; it\n * will not gain fields.\n */\nexport type Unstable_AudioMessagePart = {\n readonly type: \"audio\";\n readonly audio: {\n readonly data: string;\n readonly format: \"mp3\" | \"wav\";\n };\n};\n\nexport type DataMessagePart<T = any> = {\n readonly type: \"data\";\n readonly name: string;\n readonly data: T;\n};\n\n/**\n * A JSON spec describing a tree of UI components to render.\n *\n * The agent emits a {@link GenerativeUIMessagePart} containing this spec, and\n * the consumer-provided component allowlist is used to resolve `component`\n * names. Any component referenced that is not present in the allowlist is\n * rejected with a typed error — the allowlist is the security boundary in the\n * default same-realm rendering path.\n */\nexport type GenerativeUINode =\n | string\n | {\n /** Allowlisted component name (resolved against the consumer registry). */\n readonly component: string;\n /** Props passed to the resolved component (must be JSON-serializable). */\n readonly props?: Record<string, unknown>;\n /** Optional children — strings render as text, objects recurse. */\n readonly children?: readonly GenerativeUINode[];\n /** Optional stable key for React reconciliation. */\n readonly key?: string;\n };\n\n/**\n * The root spec for a generative UI tree.\n */\nexport type GenerativeUISpec = {\n /** Root node(s) to render. */\n readonly root: GenerativeUINode | readonly GenerativeUINode[];\n};\n\n/**\n * A message part that carries a JSON spec describing UI to render.\n *\n * Render with `<MessagePrimitive.GenerativeUI components={...} />`. The\n * primitive resolves component names against the consumer-provided allowlist\n * — any unknown name throws a typed error rather than rendering. Stream-\n * friendly: a partially-streamed spec renders progressively.\n */\nexport type GenerativeUIMessagePart = {\n readonly type: \"generative-ui\";\n /** The JSON spec describing the UI tree. */\n readonly spec: GenerativeUISpec;\n /** Optional id (useful for replays / stable keys). */\n readonly id?: string;\n readonly parentId?: string;\n};\n\nexport type McpAppMetadata = {\n readonly resourceUri: string;\n readonly mimeType?: string;\n readonly visibility?: readonly (\"model\" | \"app\")[];\n /** Routable server identity emitted by the agent stack when multiple MCP servers back one agent; for @ag-ui/mcp-apps-middleware this is the configured serverId, falling back to its serverHash. */\n readonly serverId?: string;\n};\n\nexport const MCP_APP_URI_SCHEME = \"ui://\";\n\nexport const isMcpAppUri = (uri: string | undefined): boolean =>\n !!uri?.startsWith(MCP_APP_URI_SCHEME);\n\nexport type ToolCallMessagePartMcpMetadata = {\n readonly app?: McpAppMetadata;\n};\n\nexport type ToolApprovalOptionKind =\n | \"allow-once\"\n | \"allow-always\"\n | \"reject-once\"\n | \"reject-always\";\n\nexport type ToolApprovalOption = {\n /** Opaque, host-defined identifier. Scope semantics (session vs project vs global) belong to the option supplier. */\n readonly id: string;\n /**\n * Decision class. Drives approved-resolution and default rendering.\n * Open union: `_`-prefixed custom kinds are never auto-resolved; they must\n * be answered with an explicit `approved` value (optionally alongside the\n * `optionId`), which is what the default kit sends when one is chosen.\n */\n readonly kind: ToolApprovalOptionKind | (string & {});\n /** Human label. Renderers supply defaults per kind when omitted. */\n readonly label?: string;\n readonly description?: string;\n /** Patterns or rules this option would persist, shown before the user commits. Supplied by the host; never derived by the library. */\n readonly grants?: readonly string[];\n /** Opt-in confirmation step before this option resolves. */\n readonly confirm?: boolean | { title?: string; description?: string };\n};\n\n/**\n * How an approval request should be presented, and which answers it accepts.\n * Absent: `\"decision\"`.\n *\n * The approval seam carries a host-owned request addressed by its own id and\n * resolved once; a request wanting an answer these modes cannot express stays\n * on the `interrupt` seam, which hands the tool an arbitrary payload instead.\n * Unlike {@link ToolApprovalOptionKind} the set is closed, because a renderer\n * that cannot cover every mode exhaustively is back to guessing the affordance.\n */\nexport type ToolApprovalDisplay = \"decision\" | \"select\" | \"text\";\n\n/**\n * Whether the request asks for a free-form answer, on its own or alongside its\n * options. Renderers read this to decide whether to offer a text affordance,\n * and the runtime reads it to reject a `text` response the host cannot record.\n */\nexport const toolApprovalAcceptsText = (approval: {\n readonly display?: ToolApprovalDisplay;\n readonly allowFreeform?: boolean;\n}): boolean => approval.display === \"text\" || approval.allowFreeform === true;\n\nexport type ToolApprovalResponse =\n | {\n readonly approved: boolean;\n readonly text?: string;\n readonly reason?: string;\n }\n | {\n readonly optionId: string;\n readonly text?: string;\n readonly reason?: string;\n }\n | {\n readonly approved: boolean;\n readonly optionId: string;\n readonly text?: string;\n readonly reason?: string;\n }\n | {\n /** Answer to a request that asks a question rather than for a decision. */\n readonly text: string;\n readonly reason?: string;\n };\n\nexport type ToolCallMessagePart<\n TArgs = ReadonlyJSONObject,\n TResult = unknown,\n> = {\n /** Identifies this part as a tool call. */\n readonly type: \"tool-call\";\n /** Stable identifier for this invocation of the tool. */\n readonly toolCallId: string;\n /** Name of the tool requested by the model. */\n readonly toolName: string;\n /**\n * Arguments supplied by the model. During streaming this is a partial parse:\n * fields may be missing or incomplete. From a tool-call renderer, use\n * `useToolArgsStatus` to detect which fields are still arriving.\n */\n readonly args: TArgs;\n /** Result returned by the tool, if it has completed. */\n readonly result?: TResult | undefined;\n /** Whether the result represents a tool execution error. */\n readonly isError?: boolean | undefined;\n /** Raw JSON argument text streamed by the model. */\n readonly argsText: string;\n /** UI-only artifact associated with the tool result. */\n readonly artifact?: unknown;\n /** Wall-clock timing for this call, when the runtime or host tracks it. */\n readonly timing?: ToolCallTiming;\n /** MCP app metadata associated with this tool call, when present. */\n readonly mcp?: ToolCallMessagePartMcpMetadata;\n /** Provider metadata associated with this tool call, when present. */\n readonly providerMetadata?: PartProviderMetadata;\n /** Content returned to the model for this tool result. */\n readonly modelContent?: readonly ToolModelContentPart[] | undefined;\n /** Human-input request that must be resolved before the run can continue. */\n readonly interrupt?: { type: \"human\"; payload: unknown };\n /** Server-side approval gate. `respondToApproval` may only be called while `approved` is undefined and no `resolution` is recorded. */\n readonly approval?: {\n readonly id: string;\n /**\n * The question put to the user. A request that asks for something other\n * than permission carries it here, so a renderer can show the question\n * rather than inferring a decision from the tool name.\n */\n readonly prompt?: string;\n /** How the request should be presented. Absent: a plain decision. */\n readonly display?: ToolApprovalDisplay;\n /** Whether a free-form answer is accepted alongside the options. */\n readonly allowFreeform?: boolean;\n readonly approved?: boolean;\n readonly reason?: string;\n readonly isAutomatic?: boolean;\n /** Available decisions for this call. Absent: a plain allow / deny pair. */\n readonly options?: readonly ToolApprovalOption[];\n /** The option chosen at resolution, when options were present. */\n readonly optionId?: string;\n /** The free-form answer recorded at resolution, when one was given. */\n readonly text?: string;\n /** Terminal non-decision state: the request was cancelled or expired without a user decision. Set by the host. */\n readonly resolution?: \"cancelled\" | \"expired\";\n };\n /** Parent message-part ID when this part belongs to a nested structure. */\n readonly parentId?: string;\n /**\n * Nested thread messages produced by this tool call, for example a sub-agent\n * conversation.\n */\n readonly messages?: readonly ThreadMessage[];\n};\n\nexport type ThreadUserMessagePart =\n | TextMessagePart\n | ImageMessagePart\n | FileMessagePart\n | DataMessagePart\n | Unstable_AudioMessagePart;\n\nexport type ThreadAssistantMessagePart =\n | TextMessagePart\n | ReasoningMessagePart\n | ToolCallMessagePart\n | SourceMessagePart\n | FileMessagePart\n | ImageMessagePart\n | DataMessagePart\n | GenerativeUIMessagePart;\n\nexport type MessagePartStatus =\n | {\n readonly type: \"running\";\n }\n | {\n readonly type: \"complete\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason:\n | \"cancelled\"\n | \"length\"\n | \"content-filter\"\n | \"other\"\n | \"error\";\n readonly error?: unknown;\n };\n\nexport type MessagePartStreamStatus =\n | {\n readonly type: \"running\";\n }\n | {\n readonly type: \"complete\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason:\n | \"cancelled\"\n | \"length\"\n | \"content-filter\"\n | \"other\"\n | \"error\";\n };\n\nexport type ToolCallMessagePartStatus =\n | {\n /** The tool call is waiting for UI or human input before continuing. */\n readonly type: \"requires-action\";\n /** Reason the tool call requires action. */\n readonly reason: \"tool-calls\" | \"interrupt\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason: \"tool-calls\";\n readonly error?: ReadonlyJSONValue;\n }\n | MessagePartStatus;\n\nexport type MessageStatus =\n | {\n readonly type: \"running\";\n }\n | {\n readonly type: \"requires-action\";\n readonly reason: \"tool-calls\" | \"interrupt\";\n }\n | {\n readonly type: \"complete\";\n readonly reason: \"stop\" | \"unknown\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason:\n | \"cancelled\"\n | \"tool-calls\"\n | \"length\"\n | \"content-filter\"\n | \"other\"\n | \"error\";\n readonly error?: ReadonlyJSONValue;\n };\n\nexport type MessageTiming = {\n readonly streamStartTime: number;\n readonly firstTokenTime?: number;\n readonly totalStreamTime?: number;\n readonly tokenCount?: number;\n readonly tokensPerSecond?: number;\n readonly totalChunks: number;\n readonly toolCallCount: number;\n};\n\nexport type MessageModality = \"voice\";\n\nexport type ThreadStep = {\n readonly messageId?: string;\n readonly usage?:\n | {\n readonly inputTokens: number;\n readonly outputTokens: number;\n }\n | undefined;\n};\n\ntype MessageCommonProps = {\n readonly id: string;\n readonly createdAt: Date;\n};\n\nexport type ThreadSystemMessage = MessageCommonProps & {\n readonly role: \"system\";\n readonly content: readonly [TextMessagePart];\n readonly metadata: {\n readonly unstable_state?: undefined;\n readonly unstable_annotations?: undefined;\n readonly unstable_data?: undefined;\n readonly steps?: undefined;\n readonly submittedFeedback?: undefined;\n readonly timing?: undefined;\n readonly modality?: undefined;\n readonly custom: Record<string, unknown>;\n };\n};\n\nexport type ThreadUserMessage = MessageCommonProps & {\n readonly role: \"user\";\n readonly content: readonly ThreadUserMessagePart[];\n readonly attachments: readonly CompleteAttachment[];\n readonly metadata: {\n readonly unstable_state?: undefined;\n readonly unstable_annotations?: undefined;\n readonly unstable_data?: undefined;\n readonly steps?: undefined;\n readonly submittedFeedback?: undefined;\n readonly timing?: undefined;\n readonly isOptimistic?: boolean;\n /** Set when the message was produced by a voice session rather than typed. */\n readonly modality?: MessageModality;\n readonly custom: Record<string, unknown>;\n };\n};\n\nexport type ThreadAssistantMessage = MessageCommonProps & {\n readonly role: \"assistant\";\n readonly content: readonly ThreadAssistantMessagePart[];\n readonly status: MessageStatus;\n readonly metadata: {\n readonly unstable_state: ReadonlyJSONValue;\n readonly unstable_annotations: readonly ReadonlyJSONValue[];\n readonly unstable_data: readonly ReadonlyJSONValue[];\n readonly steps: readonly ThreadStep[];\n readonly submittedFeedback?: { readonly type: \"positive\" | \"negative\" };\n readonly timing?: MessageTiming;\n /**\n * Marks a client-side optimistic placeholder. Such messages are evicted\n * once off the head branch and are never persisted.\n */\n readonly isOptimistic?: boolean;\n /** Set when the message was produced by a voice session rather than typed. */\n readonly modality?: MessageModality;\n readonly custom: Record<string, unknown>;\n };\n};\n\ntype BaseThreadMessage = {\n readonly status?: ThreadAssistantMessage[\"status\"];\n readonly metadata: {\n readonly unstable_state?: ReadonlyJSONValue;\n readonly unstable_annotations?: readonly ReadonlyJSONValue[];\n readonly unstable_data?: readonly ReadonlyJSONValue[];\n readonly steps?: readonly ThreadStep[];\n readonly submittedFeedback?: { readonly type: \"positive\" | \"negative\" };\n readonly timing?: MessageTiming;\n readonly isOptimistic?: boolean;\n readonly modality?: MessageModality;\n readonly custom: Record<string, unknown>;\n };\n readonly attachments?: ThreadUserMessage[\"attachments\"];\n};\n\nexport type ThreadMessage = BaseThreadMessage &\n (ThreadSystemMessage | ThreadUserMessage | ThreadAssistantMessage);\n\nexport type MessageRole = ThreadMessage[\"role\"];\n\nexport type RunConfig = {\n readonly custom?: Record<string, unknown>;\n};\n\nexport type AppendMessage = Omit<ThreadMessage, \"id\"> & {\n parentId: string | null;\n\n /** The ID of the message that was edited or undefined. */\n sourceId: string | null;\n runConfig: RunConfig | undefined;\n startRun?: boolean | undefined;\n /** Process this message next; only meaningful for queue-capable runtimes. */\n steer?: boolean | undefined;\n};\n"],"mappings":";AAsJA,MAAaiD,qBAAqB;AAElC,MAAaC,eAAeC,QAC1B,CAAC,CAACA,KAAKC,WAAWH,kBAAkB;;;;;;AAgDtC,MAAac,2BAA2BC,aAGzBA,SAASC,YAAY,UAAUD,SAASE,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"message.js","names":["ReadonlyJSONObject","ReadonlyJSONValue","ToolCallTiming","ToolModelContentPart","CompleteAttachment","PartProviderMetadata","providerName","TextMessagePart","type","text","status","MessagePartStreamStatus","providerMetadata","parentId","ReasoningMessagePart","unstable_summary","SourceProviderMetadata","SourceMessagePart","sourceType","id","url","title","mediaType","filename","ImageMessagePart","image","FileMessagePart","data","mimeType","Unstable_AudioMessagePart","audio","format","DataMessagePart","name","T","GenerativeUINode","component","props","Record","children","key","GenerativeUISpec","root","GenerativeUIMessagePart","spec","McpAppMetadata","resourceUri","visibility","serverId","MCP_APP_URI_SCHEME","isMcpAppUri","uri","startsWith","ToolCallMessagePartMcpMetadata","app","ToolApprovalOptionKind","ToolApprovalOption","kind","label","description","grants","confirm","ToolApprovalDisplay","toolApprovalAcceptsText","approval","display","allowFreeform","ToolApprovalResponse","approved","reason","optionId","ToolCallMessagePart","toolCallId","toolName","args","TArgs","result","TResult","isError","argsText","artifact","timing","mcp","modelContent","interrupt","payload","prompt","isAutomatic","options","resolution","messages","ThreadMessage","ThreadUserMessagePart","ThreadAssistantMessagePart","MessagePartStatus","error","ToolCallMessagePartStatus","MessageStatus","MessageTiming","streamStartTime","firstTokenTime","totalStreamTime","tokenCount","tokensPerSecond","totalChunks","toolCallCount","MessageModality","ThreadStep","messageId","usage","inputTokens","outputTokens","MessageCommonProps","createdAt","Date","ThreadSystemMessage","role","content","metadata","unstable_state","unstable_annotations","unstable_data","steps","submittedFeedback","modality","custom","ThreadUserMessage","attachments","isOptimistic","ThreadAssistantMessage","comment","BaseThreadMessage","MessageRole","RunConfig","AppendMessage","Omit","sourceId","runConfig","startRun","steer"],"sources":["../../src/types/message.ts"],"sourcesContent":["import type {\n ReadonlyJSONObject,\n ReadonlyJSONValue,\n} from \"assistant-stream/utils\";\nimport type { ToolCallTiming, ToolModelContentPart } from \"assistant-stream\";\nimport type { CompleteAttachment } from \"./attachment\";\n\nexport type { ToolCallTiming, ToolModelContentPart };\n\nexport type PartProviderMetadata = {\n readonly [providerName: string]: ReadonlyJSONObject;\n};\n\nexport type TextMessagePart = {\n readonly type: \"text\";\n readonly text: string;\n readonly status?: MessagePartStreamStatus;\n readonly providerMetadata?: PartProviderMetadata;\n readonly parentId?: string;\n};\n\nexport type ReasoningMessagePart = {\n readonly type: \"reasoning\";\n readonly text: string;\n readonly status?: MessagePartStreamStatus;\n readonly unstable_summary?: string;\n readonly providerMetadata?: PartProviderMetadata;\n readonly parentId?: string;\n};\n\nexport type SourceProviderMetadata = PartProviderMetadata;\n\nexport type SourceMessagePart =\n | {\n readonly type: \"source\";\n readonly sourceType: \"url\";\n readonly id: string;\n readonly url: string;\n readonly title?: string;\n readonly providerMetadata?: SourceProviderMetadata;\n readonly parentId?: string;\n }\n | {\n readonly type: \"source\";\n readonly sourceType: \"document\";\n readonly id: string;\n readonly url?: undefined;\n readonly title: string;\n readonly mediaType: string;\n readonly filename?: string;\n readonly providerMetadata?: SourceProviderMetadata;\n readonly parentId?: string;\n };\n\nexport type ImageMessagePart = {\n readonly type: \"image\";\n readonly image: string;\n readonly filename?: string;\n readonly providerMetadata?: PartProviderMetadata;\n};\n\nexport type FileMessagePart = {\n readonly type: \"file\";\n readonly filename?: string;\n readonly data: string;\n readonly mimeType: string;\n /** How `data` goes on the wire: a url or id reference; omitted = inferred (http(s) → url, else base64). \"url\" is honored by the LangChain-family, A2A, AG-UI, and Google ADK runtimes; \"id\" by the LangChain family only. */\n readonly sourceType?: \"url\" | \"id\";\n readonly providerMetadata?: PartProviderMetadata;\n readonly parentId?: string;\n};\n\n/**\n * @deprecated Use {@link FileMessagePart} with an `audio/*` mime type. `file`\n * is the carrier for every non-image binary modality: it is a member of both\n * the user and assistant unions, carries a filename, and can declare how its\n * payload goes on the wire, none of which this shape can express. The payload\n * form a `file` part needs is still adapter specific; see the Part Types\n * section of the message primitive docs. Honored everywhere it is accepted; it\n * will not gain fields.\n */\nexport type Unstable_AudioMessagePart = {\n readonly type: \"audio\";\n readonly audio: {\n readonly data: string;\n readonly format: \"mp3\" | \"wav\";\n };\n};\n\nexport type DataMessagePart<T = any> = {\n readonly type: \"data\";\n readonly name: string;\n readonly data: T;\n};\n\n/**\n * A JSON spec describing a tree of UI components to render.\n *\n * The agent emits a {@link GenerativeUIMessagePart} containing this spec, and\n * the consumer-provided component allowlist is used to resolve `component`\n * names. Any component referenced that is not present in the allowlist is\n * rejected with a typed error — the allowlist is the security boundary in the\n * default same-realm rendering path.\n */\nexport type GenerativeUINode =\n | string\n | {\n /** Allowlisted component name (resolved against the consumer registry). */\n readonly component: string;\n /** Props passed to the resolved component (must be JSON-serializable). */\n readonly props?: Record<string, unknown>;\n /** Optional children — strings render as text, objects recurse. */\n readonly children?: readonly GenerativeUINode[];\n /** Optional stable key for React reconciliation. */\n readonly key?: string;\n };\n\n/**\n * The root spec for a generative UI tree.\n */\nexport type GenerativeUISpec = {\n /** Root node(s) to render. */\n readonly root: GenerativeUINode | readonly GenerativeUINode[];\n};\n\n/**\n * A message part that carries a JSON spec describing UI to render.\n *\n * Render with `<MessagePrimitive.GenerativeUI components={...} />`. The\n * primitive resolves component names against the consumer-provided allowlist\n * — any unknown name throws a typed error rather than rendering. Stream-\n * friendly: a partially-streamed spec renders progressively.\n */\nexport type GenerativeUIMessagePart = {\n readonly type: \"generative-ui\";\n /** The JSON spec describing the UI tree. */\n readonly spec: GenerativeUISpec;\n /** Optional id (useful for replays / stable keys). */\n readonly id?: string;\n readonly parentId?: string;\n};\n\nexport type McpAppMetadata = {\n readonly resourceUri: string;\n readonly mimeType?: string;\n readonly visibility?: readonly (\"model\" | \"app\")[];\n /** Routable server identity emitted by the agent stack when multiple MCP servers back one agent; for @ag-ui/mcp-apps-middleware this is the configured serverId, falling back to its serverHash. */\n readonly serverId?: string;\n};\n\nexport const MCP_APP_URI_SCHEME = \"ui://\";\n\nexport const isMcpAppUri = (uri: string | undefined): boolean =>\n !!uri?.startsWith(MCP_APP_URI_SCHEME);\n\nexport type ToolCallMessagePartMcpMetadata = {\n readonly app?: McpAppMetadata;\n};\n\nexport type ToolApprovalOptionKind =\n | \"allow-once\"\n | \"allow-always\"\n | \"reject-once\"\n | \"reject-always\";\n\nexport type ToolApprovalOption = {\n /** Opaque, host-defined identifier. Scope semantics (session vs project vs global) belong to the option supplier. */\n readonly id: string;\n /**\n * Decision class. Drives approved-resolution and default rendering.\n * Open union: `_`-prefixed custom kinds are never auto-resolved; they must\n * be answered with an explicit `approved` value (optionally alongside the\n * `optionId`), which is what the default kit sends when one is chosen.\n */\n readonly kind: ToolApprovalOptionKind | (string & {});\n /** Human label. Renderers supply defaults per kind when omitted. */\n readonly label?: string;\n readonly description?: string;\n /** Patterns or rules this option would persist, shown before the user commits. Supplied by the host; never derived by the library. */\n readonly grants?: readonly string[];\n /** Opt-in confirmation step before this option resolves. */\n readonly confirm?: boolean | { title?: string; description?: string };\n};\n\n/**\n * How an approval request should be presented, and which answers it accepts.\n * Absent: `\"decision\"`.\n *\n * The approval seam carries a host-owned request addressed by its own id and\n * resolved once; a request wanting an answer these modes cannot express stays\n * on the `interrupt` seam, which hands the tool an arbitrary payload instead.\n * Unlike {@link ToolApprovalOptionKind} the set is closed, because a renderer\n * that cannot cover every mode exhaustively is back to guessing the affordance.\n */\nexport type ToolApprovalDisplay = \"decision\" | \"select\" | \"text\";\n\n/**\n * Whether the request asks for a free-form answer, on its own or alongside its\n * options. Renderers read this to decide whether to offer a text affordance,\n * and the runtime reads it to reject a `text` response the host cannot record.\n */\nexport const toolApprovalAcceptsText = (approval: {\n readonly display?: ToolApprovalDisplay;\n readonly allowFreeform?: boolean;\n}): boolean => approval.display === \"text\" || approval.allowFreeform === true;\n\nexport type ToolApprovalResponse =\n | {\n readonly approved: boolean;\n readonly text?: string;\n readonly reason?: string;\n }\n | {\n readonly optionId: string;\n readonly text?: string;\n readonly reason?: string;\n }\n | {\n readonly approved: boolean;\n readonly optionId: string;\n readonly text?: string;\n readonly reason?: string;\n }\n | {\n /** Answer to a request that asks a question rather than for a decision. */\n readonly text: string;\n readonly reason?: string;\n };\n\nexport type ToolCallMessagePart<\n TArgs = ReadonlyJSONObject,\n TResult = unknown,\n> = {\n /** Identifies this part as a tool call. */\n readonly type: \"tool-call\";\n /** Stable identifier for this invocation of the tool. */\n readonly toolCallId: string;\n /** Name of the tool requested by the model. */\n readonly toolName: string;\n /**\n * Arguments supplied by the model. During streaming this is a partial parse:\n * fields may be missing or incomplete. From a tool-call renderer, use\n * `useToolArgsStatus` to detect which fields are still arriving.\n */\n readonly args: TArgs;\n /** Result returned by the tool, if it has completed. */\n readonly result?: TResult | undefined;\n /** Whether the result represents a tool execution error. */\n readonly isError?: boolean | undefined;\n /** Raw JSON argument text streamed by the model. */\n readonly argsText: string;\n /** UI-only artifact associated with the tool result. */\n readonly artifact?: unknown;\n /** Wall-clock timing for this call, when the runtime or host tracks it. */\n readonly timing?: ToolCallTiming;\n /** MCP app metadata associated with this tool call, when present. */\n readonly mcp?: ToolCallMessagePartMcpMetadata;\n /** Provider metadata associated with this tool call, when present. */\n readonly providerMetadata?: PartProviderMetadata;\n /** Content returned to the model for this tool result. */\n readonly modelContent?: readonly ToolModelContentPart[] | undefined;\n /** Human-input request that must be resolved before the run can continue. */\n readonly interrupt?: { type: \"human\"; payload: unknown };\n /** Server-side approval gate. `respondToApproval` may only be called while `approved` is undefined and no `resolution` is recorded. */\n readonly approval?: {\n readonly id: string;\n /**\n * The question put to the user. A request that asks for something other\n * than permission carries it here, so a renderer can show the question\n * rather than inferring a decision from the tool name.\n */\n readonly prompt?: string;\n /** How the request should be presented. Absent: a plain decision. */\n readonly display?: ToolApprovalDisplay;\n /** Whether a free-form answer is accepted alongside the options. */\n readonly allowFreeform?: boolean;\n readonly approved?: boolean;\n readonly reason?: string;\n readonly isAutomatic?: boolean;\n /** Available decisions for this call. Absent: a plain allow / deny pair. */\n readonly options?: readonly ToolApprovalOption[];\n /** The option chosen at resolution, when options were present. */\n readonly optionId?: string;\n /** The free-form answer recorded at resolution, when one was given. */\n readonly text?: string;\n /** Terminal non-decision state: the request was cancelled or expired without a user decision. Set by the host. */\n readonly resolution?: \"cancelled\" | \"expired\";\n };\n /** Parent message-part ID when this part belongs to a nested structure. */\n readonly parentId?: string;\n /**\n * Nested thread messages produced by this tool call, for example a sub-agent\n * conversation.\n */\n readonly messages?: readonly ThreadMessage[];\n};\n\nexport type ThreadUserMessagePart =\n | TextMessagePart\n | ImageMessagePart\n | FileMessagePart\n | DataMessagePart\n | Unstable_AudioMessagePart;\n\nexport type ThreadAssistantMessagePart =\n | TextMessagePart\n | ReasoningMessagePart\n | ToolCallMessagePart\n | SourceMessagePart\n | FileMessagePart\n | ImageMessagePart\n | DataMessagePart\n | GenerativeUIMessagePart;\n\nexport type MessagePartStatus =\n | {\n readonly type: \"running\";\n }\n | {\n readonly type: \"complete\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason:\n | \"cancelled\"\n | \"length\"\n | \"content-filter\"\n | \"other\"\n | \"error\";\n readonly error?: unknown;\n };\n\nexport type MessagePartStreamStatus =\n | {\n readonly type: \"running\";\n }\n | {\n readonly type: \"complete\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason:\n | \"cancelled\"\n | \"length\"\n | \"content-filter\"\n | \"other\"\n | \"error\";\n };\n\nexport type ToolCallMessagePartStatus =\n | {\n /** The tool call is waiting for UI or human input before continuing. */\n readonly type: \"requires-action\";\n /** Reason the tool call requires action. */\n readonly reason: \"tool-calls\" | \"interrupt\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason: \"tool-calls\";\n readonly error?: ReadonlyJSONValue;\n }\n | MessagePartStatus;\n\nexport type MessageStatus =\n | {\n readonly type: \"running\";\n }\n | {\n readonly type: \"requires-action\";\n readonly reason: \"tool-calls\" | \"interrupt\";\n }\n | {\n readonly type: \"complete\";\n readonly reason: \"stop\" | \"unknown\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason:\n | \"cancelled\"\n | \"tool-calls\"\n | \"length\"\n | \"content-filter\"\n | \"other\"\n | \"error\";\n readonly error?: ReadonlyJSONValue;\n };\n\nexport type MessageTiming = {\n readonly streamStartTime: number;\n readonly firstTokenTime?: number;\n readonly totalStreamTime?: number;\n readonly tokenCount?: number;\n readonly tokensPerSecond?: number;\n readonly totalChunks: number;\n readonly toolCallCount: number;\n};\n\nexport type MessageModality = \"voice\";\n\nexport type ThreadStep = {\n readonly messageId?: string;\n readonly usage?:\n | {\n readonly inputTokens: number;\n readonly outputTokens: number;\n }\n | undefined;\n};\n\ntype MessageCommonProps = {\n readonly id: string;\n readonly createdAt: Date;\n};\n\nexport type ThreadSystemMessage = MessageCommonProps & {\n readonly role: \"system\";\n readonly content: readonly [TextMessagePart];\n readonly metadata: {\n readonly unstable_state?: undefined;\n readonly unstable_annotations?: undefined;\n readonly unstable_data?: undefined;\n readonly steps?: undefined;\n readonly submittedFeedback?: undefined;\n readonly timing?: undefined;\n readonly modality?: undefined;\n readonly custom: Record<string, unknown>;\n };\n};\n\nexport type ThreadUserMessage = MessageCommonProps & {\n readonly role: \"user\";\n readonly content: readonly ThreadUserMessagePart[];\n readonly attachments: readonly CompleteAttachment[];\n readonly metadata: {\n readonly unstable_state?: undefined;\n readonly unstable_annotations?: undefined;\n readonly unstable_data?: undefined;\n readonly steps?: undefined;\n readonly submittedFeedback?: undefined;\n readonly timing?: undefined;\n readonly isOptimistic?: boolean;\n /** Set when the message was produced by a voice session rather than typed. */\n readonly modality?: MessageModality;\n readonly custom: Record<string, unknown>;\n };\n};\n\nexport type ThreadAssistantMessage = MessageCommonProps & {\n readonly role: \"assistant\";\n readonly content: readonly ThreadAssistantMessagePart[];\n readonly status: MessageStatus;\n readonly metadata: {\n readonly unstable_state: ReadonlyJSONValue;\n readonly unstable_annotations: readonly ReadonlyJSONValue[];\n readonly unstable_data: readonly ReadonlyJSONValue[];\n readonly steps: readonly ThreadStep[];\n readonly submittedFeedback?: {\n readonly type: \"positive\" | \"negative\";\n readonly comment?: string;\n };\n readonly timing?: MessageTiming;\n /**\n * Marks a client-side optimistic placeholder. Such messages are evicted\n * once off the head branch and are never persisted.\n */\n readonly isOptimistic?: boolean;\n /** Set when the message was produced by a voice session rather than typed. */\n readonly modality?: MessageModality;\n readonly custom: Record<string, unknown>;\n };\n};\n\ntype BaseThreadMessage = {\n readonly status?: ThreadAssistantMessage[\"status\"];\n readonly metadata: {\n readonly unstable_state?: ReadonlyJSONValue | undefined;\n readonly unstable_annotations?: readonly ReadonlyJSONValue[] | undefined;\n readonly unstable_data?: readonly ReadonlyJSONValue[] | undefined;\n readonly steps?: readonly ThreadStep[] | undefined;\n readonly submittedFeedback?:\n | {\n readonly type: \"positive\" | \"negative\";\n readonly comment?: string;\n }\n | undefined;\n readonly timing?: MessageTiming | undefined;\n readonly isOptimistic?: boolean;\n readonly modality?: MessageModality | undefined;\n readonly custom: Record<string, unknown>;\n };\n readonly attachments?: ThreadUserMessage[\"attachments\"];\n};\n\nexport type ThreadMessage = BaseThreadMessage &\n (ThreadSystemMessage | ThreadUserMessage | ThreadAssistantMessage);\n\nexport type MessageRole = ThreadMessage[\"role\"];\n\nexport type RunConfig = {\n readonly custom?: Record<string, unknown>;\n};\n\nexport type AppendMessage = Omit<ThreadMessage, \"id\"> & {\n parentId: string | null;\n\n /** The ID of the message that was edited or undefined. */\n sourceId: string | null;\n runConfig: RunConfig | undefined;\n startRun?: boolean | undefined;\n /** Process this message next; only meaningful for queue-capable runtimes. */\n steer?: boolean | undefined;\n};\n"],"mappings":";AAsJA,MAAaiD,qBAAqB;AAElC,MAAaC,eAAeC,QAC1B,CAAC,CAACA,KAAKC,WAAWH,kBAAkB;;;;;;AAgDtC,MAAac,2BAA2BC,aAGzBA,SAASC,YAAY,UAAUD,SAASE,kBAAkB"}
|
package/dist/types/quote.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.d.ts","names":[],"sources":["../../src/types/quote.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"quote.d.ts","names":[],"sources":["../../src/types/quote.ts"],"mappings":";YAAY;WACD;WACA"}
|
package/dist/types/trigger.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReadonlyJSONObject } from "assistant-stream/utils";
|
|
2
2
|
//#region src/types/trigger.d.ts
|
|
3
3
|
/** A selectable item displayed inside a trigger popover (e.g. mention, slash command). */
|
|
4
|
-
type Unstable_TriggerItem = {
|
|
4
|
+
export type Unstable_TriggerItem = {
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly type: string;
|
|
7
7
|
readonly label: string;
|
|
@@ -9,10 +9,9 @@ type Unstable_TriggerItem = {
|
|
|
9
9
|
readonly metadata?: ReadonlyJSONObject | undefined;
|
|
10
10
|
};
|
|
11
11
|
/** A grouping of trigger items shown in a trigger popover. */
|
|
12
|
-
type Unstable_TriggerCategory = {
|
|
12
|
+
export type Unstable_TriggerCategory = {
|
|
13
13
|
readonly id: string;
|
|
14
14
|
readonly label: string;
|
|
15
15
|
};
|
|
16
16
|
//#endregion
|
|
17
|
-
export { Unstable_TriggerCategory, Unstable_TriggerItem };
|
|
18
17
|
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.d.ts","names":[],"sources":["../../src/types/trigger.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"trigger.d.ts","names":[],"sources":["../../src/types/trigger.ts"],"mappings":";;;YAGY;WACD;WACA;WACA;WACA;WACA,WAAW;;;YAIV;WACD;WACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unsubscribe.d.ts","names":[],"sources":["../../src/types/unsubscribe.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"unsubscribe.d.ts","names":[],"sources":["../../src/types/unsubscribe.ts"],"mappings":";YAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/utils/abortable-iterable.d.ts
|
|
2
|
-
declare const openAbortableIterable: <T>(source: AsyncIterable<T> | Promise<AsyncIterable<T>>, signal: AbortSignal) => Promise<AsyncIterable<T> | undefined>;
|
|
2
|
+
export declare const openAbortableIterable: <T>(source: AsyncIterable<T> | Promise<AsyncIterable<T>>, signal: AbortSignal) => Promise<AsyncIterable<T> | undefined>;
|
|
3
3
|
/**
|
|
4
4
|
* Presents a stream as exhausted once the signal aborts, so a consumer stops
|
|
5
5
|
* waiting on it.
|
|
@@ -13,7 +13,6 @@ declare const openAbortableIterable: <T>(source: AsyncIterable<T> | Promise<Asyn
|
|
|
13
13
|
* The source is finalized on the way out, but never awaited, since a stream
|
|
14
14
|
* that is already parked would not settle that either.
|
|
15
15
|
*/
|
|
16
|
-
declare const abortableIterable: <T>(source: AsyncIterable<T>, signal: AbortSignal) => AsyncIterable<T>;
|
|
16
|
+
export declare const abortableIterable: <T>(source: AsyncIterable<T>, signal: AbortSignal) => AsyncIterable<T>;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { abortableIterable, openAbortableIterable };
|
|
19
18
|
//# sourceMappingURL=abortable-iterable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abortable-iterable.d.ts","names":[],"sources":["../../src/utils/abortable-iterable.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"abortable-iterable.d.ts","names":[],"sources":["../../src/utils/abortable-iterable.ts"],"mappings":";qBAEa,wBAA+B,GAC1C,QAAQ,cAAc,KAAK,QAAQ,cAAc,KACjD,QAAQ,gBACP,QAAQ,cAAc;;;;;;;;;;;;;;qBAmCZ,oBAAqB,GAChC,QAAQ,cAAc,IACtB,QAAQ,gBACP,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelContext, ModelContextProvider } from "../model-context/types.js";
|
|
2
2
|
import "../index.js";
|
|
3
3
|
//#region src/utils/composite-context-provider.d.ts
|
|
4
|
-
declare class CompositeContextProvider implements ModelContextProvider {
|
|
4
|
+
export declare class CompositeContextProvider implements ModelContextProvider {
|
|
5
5
|
private _providers;
|
|
6
6
|
private _providerUnsubscribes;
|
|
7
7
|
getModelContext(): ModelContext;
|
|
@@ -11,5 +11,4 @@ declare class CompositeContextProvider implements ModelContextProvider {
|
|
|
11
11
|
subscribe(callback: () => void): () => void;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
export { CompositeContextProvider };
|
|
15
14
|
//# sourceMappingURL=composite-context-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composite-context-provider.d.ts","names":[],"sources":["../../src/utils/composite-context-provider.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"composite-context-provider.d.ts","names":[],"sources":["../../src/utils/composite-context-provider.ts"],"mappings":";;;qBAOa,oCAAoC;UACvC;UACA;EAER,mBAJW;EAQX,6BAA6B,UAAU;UAiD/B;EAER;EAIA,UAAU"}
|
package/dist/utils/data-url.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/utils/data-url.d.ts
|
|
2
|
-
declare const httpUrlPattern: RegExp;
|
|
3
|
-
type FilePartSource = {
|
|
2
|
+
export declare const httpUrlPattern: RegExp;
|
|
3
|
+
export type FilePartSource = {
|
|
4
4
|
kind: "url";
|
|
5
5
|
url: string;
|
|
6
6
|
} | {
|
|
@@ -8,11 +8,11 @@ type FilePartSource = {
|
|
|
8
8
|
data: string;
|
|
9
9
|
mimeType: string;
|
|
10
10
|
};
|
|
11
|
-
declare function parseDataUrl(value: string): {
|
|
11
|
+
export declare function parseDataUrl(value: string): {
|
|
12
12
|
mimeType: string;
|
|
13
13
|
data: string;
|
|
14
14
|
} | null;
|
|
15
|
-
declare const resolveFilePartSource: (part: {
|
|
15
|
+
export declare const resolveFilePartSource: (part: {
|
|
16
16
|
data: string;
|
|
17
17
|
mimeType: string;
|
|
18
18
|
sourceType?: string | undefined;
|
|
@@ -23,13 +23,12 @@ declare const resolveFilePartSource: (part: {
|
|
|
23
23
|
* whether it has to be wrapped in a data URL envelope first; base64 cannot
|
|
24
24
|
* contain a colon, so a real payload is never misread as a url.
|
|
25
25
|
*/
|
|
26
|
-
declare function isParsableUrl(value: string): boolean;
|
|
26
|
+
export declare function isParsableUrl(value: string): boolean;
|
|
27
27
|
/**
|
|
28
28
|
* The media type a data URL declares, whether or not its payload is base64.
|
|
29
29
|
* `parseDataUrl` only matches base64 payloads because it also returns the
|
|
30
30
|
* bytes; this reads the declaration alone.
|
|
31
31
|
*/
|
|
32
|
-
declare function dataUrlMediaType(value: string): string | undefined;
|
|
32
|
+
export declare function dataUrlMediaType(value: string): string | undefined;
|
|
33
33
|
//#endregion
|
|
34
|
-
export { FilePartSource, dataUrlMediaType, httpUrlPattern, isParsableUrl, parseDataUrl, resolveFilePartSource };
|
|
35
34
|
//# sourceMappingURL=data-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-url.d.ts","names":[],"sources":["../../src/utils/data-url.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"data-url.d.ts","names":[],"sources":["../../src/utils/data-url.ts"],"mappings":";qBAAa,gBAAc;YAEf;EACN;EAAa;;EACb;EAAc;EAAc;;wBAElB,aACd;EACG;EAAkB;;qBAMV,wBAAyB;EACpC;EACA;EACA;MACE;;;;;;;wBAmBY,cAAc;;;;;;wBAcd,iBAAiB"}
|
|
@@ -3,8 +3,8 @@ import { MessagePartStatus, ToolCallMessagePartStatus } from "../types/message.j
|
|
|
3
3
|
type PartWithStatus = {
|
|
4
4
|
readonly status: MessagePartStatus | ToolCallMessagePartStatus;
|
|
5
5
|
};
|
|
6
|
-
declare const getGroupStatus: (parts: readonly (PartWithStatus | undefined)[]) => MessagePartStatus | ToolCallMessagePartStatus;
|
|
7
|
-
declare const getGroupSummary: (parts: readonly (PartWithStatus | undefined)[], indices: readonly number[]) => {
|
|
6
|
+
export declare const getGroupStatus: (parts: readonly (PartWithStatus | undefined)[]) => MessagePartStatus | ToolCallMessagePartStatus;
|
|
7
|
+
export declare const getGroupSummary: (parts: readonly (PartWithStatus | undefined)[], indices: readonly number[]) => {
|
|
8
8
|
status: MessagePartStatus | {
|
|
9
9
|
readonly type: "requires-action";
|
|
10
10
|
readonly reason: "tool-calls" | "interrupt";
|
|
@@ -21,5 +21,4 @@ declare const getGroupSummary: (parts: readonly (PartWithStatus | undefined)[],
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
24
|
-
export { getGroupStatus, getGroupSummary };
|
|
25
24
|
//# sourceMappingURL=getGroupStatus.d.ts.map
|