@assistant-ui/core 0.3.20 → 0.3.21
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 +42 -34
- package/dist/adapters/attachment.d.ts.map +1 -1
- package/dist/adapters/attachment.js +51 -21
- package/dist/adapters/attachment.js.map +1 -1
- package/dist/adapters/directive-formatter.d.ts +1 -3
- package/dist/adapters/directive-formatter.d.ts.map +1 -1
- package/dist/adapters/feedback.d.ts +6 -7
- package/dist/adapters/feedback.d.ts.map +1 -1
- package/dist/adapters/index.d.ts +14 -9
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +1 -1
- package/dist/adapters/speech.d.ts +57 -58
- package/dist/adapters/speech.d.ts.map +1 -1
- package/dist/adapters/speech.js +16 -2
- package/dist/adapters/speech.js.map +1 -1
- package/dist/adapters/suggestion.d.ts +14 -16
- package/dist/adapters/suggestion.d.ts.map +1 -1
- package/dist/adapters/thread-history.d.ts +54 -51
- package/dist/adapters/thread-history.d.ts.map +1 -1
- package/dist/adapters/trigger.d.ts +7 -9
- package/dist/adapters/trigger.d.ts.map +1 -1
- package/dist/adapters/voice.d.ts +46 -40
- package/dist/adapters/voice.d.ts.map +1 -1
- package/dist/adapters/voice.js +17 -3
- package/dist/adapters/voice.js.map +1 -1
- package/dist/index.d.ts +70 -56
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/internal/duplicate-detection.d.ts +0 -2
- package/dist/internal/duplicate-detection.d.ts.map +1 -1
- package/dist/internal.d.ts +27 -58
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +8 -6
- package/dist/model-context/frame/host.d.ts +19 -21
- package/dist/model-context/frame/host.d.ts.map +1 -1
- package/dist/model-context/frame/host.js +3 -1
- package/dist/model-context/frame/host.js.map +1 -1
- package/dist/model-context/frame/provider.d.ts +27 -28
- package/dist/model-context/frame/provider.d.ts.map +1 -1
- package/dist/model-context/frame/provider.js +6 -0
- package/dist/model-context/frame/provider.js.map +1 -1
- package/dist/model-context/frame/types.d.ts +19 -21
- package/dist/model-context/frame/types.d.ts.map +1 -1
- package/dist/model-context/frame/validate.d.ts +3 -0
- package/dist/model-context/frame/validate.d.ts.map +1 -0
- package/dist/model-context/frame/validate.js +26 -0
- package/dist/model-context/frame/validate.js.map +1 -0
- package/dist/model-context/interactable-composer-metadata.d.ts +42 -29
- package/dist/model-context/interactable-composer-metadata.d.ts.map +1 -1
- package/dist/model-context/interactable-composer-metadata.js +30 -6
- package/dist/model-context/interactable-composer-metadata.js.map +1 -1
- package/dist/model-context/registry-handles.d.ts +6 -8
- package/dist/model-context/registry-handles.d.ts.map +1 -1
- package/dist/model-context/registry.d.ts +14 -16
- package/dist/model-context/registry.d.ts.map +1 -1
- package/dist/model-context/tool-call-text.d.ts +13 -14
- package/dist/model-context/tool-call-text.d.ts.map +1 -1
- package/dist/model-context/tool.d.ts +10 -11
- package/dist/model-context/tool.d.ts.map +1 -1
- package/dist/model-context/types.d.ts +32 -34
- package/dist/model-context/types.d.ts.map +1 -1
- package/dist/react/AssistantProvider.d.ts +6 -8
- package/dist/react/AssistantProvider.d.ts.map +1 -1
- package/dist/react/AssistantRuntimeProvider.d.ts +23 -25
- package/dist/react/AssistantRuntimeProvider.d.ts.map +1 -1
- package/dist/react/RuntimeAdapter.d.ts +2 -5
- package/dist/react/RuntimeAdapter.d.ts.map +1 -1
- package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts +24 -18
- package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts.map +1 -1
- package/dist/react/adapters/LocalStorageThreadListAdapter.js +58 -25
- package/dist/react/adapters/LocalStorageThreadListAdapter.js.map +1 -1
- package/dist/react/adapters/TitleGenerationAdapter.d.ts +2 -4
- package/dist/react/adapters/TitleGenerationAdapter.d.ts.map +1 -1
- package/dist/react/client/AdaptedRemoteThread.d.ts +5 -7
- package/dist/react/client/AdaptedRemoteThread.d.ts.map +1 -1
- package/dist/react/client/DataRenderers.d.ts +1 -3
- package/dist/react/client/DataRenderers.d.ts.map +1 -1
- package/dist/react/client/InMemoryThreadList.d.ts +6 -8
- package/dist/react/client/InMemoryThreadList.d.ts.map +1 -1
- package/dist/react/client/Interactables.d.ts +2 -4
- package/dist/react/client/Interactables.d.ts.map +1 -1
- package/dist/react/client/Interactables.js +306 -101
- package/dist/react/client/Interactables.js.map +1 -1
- package/dist/react/client/RemoteThreadList.d.ts +32 -34
- package/dist/react/client/RemoteThreadList.d.ts.map +1 -1
- package/dist/react/client/RemoteThreadList.js +2 -1
- package/dist/react/client/RemoteThreadList.js.map +1 -1
- package/dist/react/client/Tools.d.ts +9 -11
- package/dist/react/client/Tools.d.ts.map +1 -1
- package/dist/react/client/Tools.js +4 -8
- package/dist/react/client/Tools.js.map +1 -1
- package/dist/react/client/interactable-model-context.d.ts +9 -10
- package/dist/react/client/interactable-model-context.d.ts.map +1 -1
- package/dist/react/client/interactable-model-context.js +32 -22
- package/dist/react/client/interactable-model-context.js.map +1 -1
- package/dist/react/index.d.ts +160 -122
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +5 -5
- package/dist/react/interactables-legacy/Interactables.d.ts +1 -3
- package/dist/react/interactables-legacy/Interactables.d.ts.map +1 -1
- package/dist/react/interactables-legacy/Interactables.js +15 -8
- package/dist/react/interactables-legacy/Interactables.js.map +1 -1
- package/dist/react/interactables-legacy/interactable-model-context.d.ts +6 -8
- package/dist/react/interactables-legacy/interactable-model-context.d.ts.map +1 -1
- package/dist/react/interactables-legacy/interactable-model-context.js +13 -14
- package/dist/react/interactables-legacy/interactable-model-context.js.map +1 -1
- package/dist/react/interactables-legacy/scopes.d.ts +33 -36
- package/dist/react/interactables-legacy/scopes.d.ts.map +1 -1
- package/dist/react/interactables-legacy/useAssistantInteractable.d.ts +6 -8
- package/dist/react/interactables-legacy/useAssistantInteractable.d.ts.map +1 -1
- package/dist/react/interactables-legacy/useInteractableState.d.ts +6 -7
- package/dist/react/interactables-legacy/useInteractableState.d.ts.map +1 -1
- package/dist/react/interactables-shared/useInteractablePersistenceQueue.d.ts +23 -13
- package/dist/react/interactables-shared/useInteractablePersistenceQueue.d.ts.map +1 -1
- package/dist/react/interactables-shared/useInteractablePersistenceQueue.js +54 -25
- package/dist/react/interactables-shared/useInteractablePersistenceQueue.js.map +1 -1
- package/dist/react/model-context/define-mcp-toolkit.d.ts +11 -13
- package/dist/react/model-context/define-mcp-toolkit.d.ts.map +1 -1
- package/dist/react/model-context/define-toolkit.d.ts +12 -4
- package/dist/react/model-context/define-toolkit.d.ts.map +1 -1
- package/dist/react/model-context/external-tool.d.ts +0 -2
- package/dist/react/model-context/external-tool.d.ts.map +1 -1
- package/dist/react/model-context/human-tool.d.ts +0 -2
- package/dist/react/model-context/human-tool.d.ts.map +1 -1
- package/dist/react/model-context/interactableTool.d.ts +23 -25
- package/dist/react/model-context/interactableTool.d.ts.map +1 -1
- package/dist/react/model-context/makeAssistantDataUI.d.ts +4 -6
- package/dist/react/model-context/makeAssistantDataUI.d.ts.map +1 -1
- package/dist/react/model-context/makeAssistantTool.d.ts +4 -6
- package/dist/react/model-context/makeAssistantTool.d.ts.map +1 -1
- package/dist/react/model-context/makeAssistantToolUI.d.ts +4 -6
- package/dist/react/model-context/makeAssistantToolUI.d.ts.map +1 -1
- package/dist/react/model-context/provider-tool.d.ts +3 -4
- package/dist/react/model-context/provider-tool.d.ts.map +1 -1
- package/dist/react/model-context/stub-tool.d.ts +0 -2
- package/dist/react/model-context/stub-tool.d.ts.map +1 -1
- package/dist/react/model-context/toolbox.d.ts +37 -24
- package/dist/react/model-context/toolbox.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantContext.d.ts +2 -5
- package/dist/react/model-context/useAssistantContext.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantDataUI.d.ts +5 -7
- package/dist/react/model-context/useAssistantDataUI.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantInstructions.d.ts +2 -5
- package/dist/react/model-context/useAssistantInstructions.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantTool.d.ts +8 -11
- package/dist/react/model-context/useAssistantTool.d.ts.map +1 -1
- package/dist/react/model-context/useAssistantToolUI.d.ts +11 -13
- package/dist/react/model-context/useAssistantToolUI.d.ts.map +1 -1
- package/dist/react/model-context/useAuiToolOverrides.d.ts +2 -3
- package/dist/react/model-context/useAuiToolOverrides.d.ts.map +1 -1
- package/dist/react/model-context/useInlineRender.d.ts +2 -4
- package/dist/react/model-context/useInlineRender.d.ts.map +1 -1
- package/dist/react/model-context/useInteractable.d.ts +37 -36
- package/dist/react/model-context/useInteractable.d.ts.map +1 -1
- package/dist/react/model-context/useInteractableState.d.ts +10 -8
- package/dist/react/model-context/useInteractableState.d.ts.map +1 -1
- package/dist/react/model-context/useInteractableVersions.d.ts +3 -5
- package/dist/react/model-context/useInteractableVersions.d.ts.map +1 -1
- package/dist/react/model-context/useToolArgsStatus.d.ts +5 -6
- package/dist/react/model-context/useToolArgsStatus.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarCopy.d.ts +6 -8
- package/dist/react/primitive-hooks/useActionBarCopy.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarEdit.d.ts +2 -4
- package/dist/react/primitive-hooks/useActionBarEdit.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarFeedback.d.ts +4 -6
- package/dist/react/primitive-hooks/useActionBarFeedback.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarReload.d.ts +2 -4
- package/dist/react/primitive-hooks/useActionBarReload.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarSpeak.d.ts +2 -4
- package/dist/react/primitive-hooks/useActionBarSpeak.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts +2 -4
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useBranchPickerNext.d.ts +2 -4
- package/dist/react/primitive-hooks/useBranchPickerNext.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts +2 -4
- package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerAddAttachment.d.ts +3 -5
- package/dist/react/primitive-hooks/useComposerAddAttachment.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerCancel.d.ts +2 -4
- package/dist/react/primitive-hooks/useComposerCancel.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerDictate.d.ts +2 -4
- package/dist/react/primitive-hooks/useComposerDictate.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useComposerSend.d.ts +3 -5
- package/dist/react/primitive-hooks/useComposerSend.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useEditComposerCancel.d.ts +1 -3
- package/dist/react/primitive-hooks/useEditComposerCancel.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useEditComposerSend.d.ts +2 -4
- package/dist/react/primitive-hooks/useEditComposerSend.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useMessageBranching.d.ts +4 -6
- package/dist/react/primitive-hooks/useMessageBranching.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useMessageError.d.ts +0 -2
- package/dist/react/primitive-hooks/useMessageError.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useMessageReload.d.ts +2 -4
- package/dist/react/primitive-hooks/useMessageReload.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts +6 -8
- package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useSuggestionTrigger.js +4 -4
- package/dist/react/primitive-hooks/useSuggestionTrigger.js.map +1 -1
- package/dist/react/primitive-hooks/useThreadIsEmpty.d.ts +0 -2
- package/dist/react/primitive-hooks/useThreadIsEmpty.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadIsRunning.d.ts +0 -2
- package/dist/react/primitive-hooks/useThreadIsRunning.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts +1 -3
- package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts +1 -3
- package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts +1 -3
- package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts +1 -3
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListLoadMore.d.ts +2 -4
- package/dist/react/primitive-hooks/useThreadListLoadMore.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadListNew.d.ts +1 -3
- package/dist/react/primitive-hooks/useThreadListNew.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadMessageIds.d.ts +0 -2
- package/dist/react/primitive-hooks/useThreadMessageIds.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useThreadMessages.d.ts +1 -3
- package/dist/react/primitive-hooks/useThreadMessages.d.ts.map +1 -1
- package/dist/react/primitive-hooks/useVoice.d.ts +5 -7
- package/dist/react/primitive-hooks/useVoice.d.ts.map +1 -1
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts +25 -26
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts.map +1 -1
- package/dist/react/primitives/composer/ComposerAttachments.d.ts +22 -23
- package/dist/react/primitives/composer/ComposerAttachments.d.ts.map +1 -1
- package/dist/react/primitives/composer/ComposerIf.d.ts +10 -9
- package/dist/react/primitives/composer/ComposerIf.d.ts.map +1 -1
- package/dist/react/primitives/composer/ComposerQueue.d.ts +11 -14
- package/dist/react/primitives/composer/ComposerQueue.d.ts.map +1 -1
- package/dist/react/primitives/generativeUI/GenerativeUI.d.ts +26 -28
- package/dist/react/primitives/generativeUI/GenerativeUI.d.ts.map +1 -1
- package/dist/react/primitives/generativeUI/GenerativeUI.js +16 -6
- package/dist/react/primitives/generativeUI/GenerativeUI.js.map +1 -1
- package/dist/react/primitives/message/MessageAttachments.d.ts +26 -23
- package/dist/react/primitives/message/MessageAttachments.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageAttachments.js +14 -15
- package/dist/react/primitives/message/MessageAttachments.js.map +1 -1
- package/dist/react/primitives/message/MessageGroupedParts.d.ts +120 -117
- package/dist/react/primitives/message/MessageGroupedParts.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageGroupedParts.js +3 -3
- package/dist/react/primitives/message/MessageGroupedParts.js.map +1 -1
- package/dist/react/primitives/message/MessageParts.d.ts +199 -185
- package/dist/react/primitives/message/MessageParts.d.ts.map +1 -1
- package/dist/react/primitives/message/MessageParts.js +124 -82
- package/dist/react/primitives/message/MessageParts.js.map +1 -1
- package/dist/react/primitives/message/MessageQuote.d.ts +6 -8
- package/dist/react/primitives/message/MessageQuote.d.ts.map +1 -1
- package/dist/react/primitives/messagePart/MessagePartInProgress.d.ts +2 -4
- package/dist/react/primitives/messagePart/MessagePartInProgress.d.ts.map +1 -1
- package/dist/react/primitives/part/PartMessages.d.ts +13 -15
- package/dist/react/primitives/part/PartMessages.d.ts.map +1 -1
- package/dist/react/primitives/thread/ThreadMessages.d.ts +54 -56
- package/dist/react/primitives/thread/ThreadMessages.d.ts.map +1 -1
- package/dist/react/primitives/thread/ThreadSuggestions.d.ts +20 -21
- package/dist/react/primitives/thread/ThreadSuggestions.d.ts.map +1 -1
- package/dist/react/primitives/thread/ThreadSuggestions.js +24 -5
- package/dist/react/primitives/thread/ThreadSuggestions.js.map +1 -1
- package/dist/react/primitives/threadList/ThreadListItems.d.ts +22 -23
- package/dist/react/primitives/threadList/ThreadListItems.d.ts.map +1 -1
- package/dist/react/primitives/threadListItem/ThreadListItemTitle.d.ts +4 -6
- package/dist/react/primitives/threadListItem/ThreadListItemTitle.d.ts.map +1 -1
- package/dist/react/providers/AttachmentByIndexProvider.d.ts +3 -5
- package/dist/react/providers/AttachmentByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/ChainOfThoughtByIndicesProvider.d.ts +3 -5
- package/dist/react/providers/ChainOfThoughtByIndicesProvider.d.ts.map +1 -1
- package/dist/react/providers/ChainOfThoughtPartByIndexProvider.d.ts +2 -4
- package/dist/react/providers/ChainOfThoughtPartByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/MessageByIdProvider.d.ts +2 -4
- package/dist/react/providers/MessageByIdProvider.d.ts.map +1 -1
- package/dist/react/providers/MessageByIndexProvider.d.ts +2 -4
- package/dist/react/providers/MessageByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/PartByIndexProvider.d.ts +2 -4
- package/dist/react/providers/PartByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/QueueItemByIndexProvider.d.ts +2 -4
- package/dist/react/providers/QueueItemByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/ReadonlyThreadProvider.d.ts +5 -7
- package/dist/react/providers/ReadonlyThreadProvider.d.ts.map +1 -1
- package/dist/react/providers/ReadonlyThreadProvider.js.map +1 -1
- package/dist/react/providers/SuggestionByIndexProvider.d.ts +2 -4
- package/dist/react/providers/SuggestionByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/TextMessagePartProvider.d.ts +3 -5
- package/dist/react/providers/TextMessagePartProvider.d.ts.map +1 -1
- package/dist/react/providers/TextMessagePartProvider.js +5 -1
- package/dist/react/providers/TextMessagePartProvider.js.map +1 -1
- package/dist/react/providers/ThreadListItemByIndexProvider.d.ts +3 -5
- package/dist/react/providers/ThreadListItemByIndexProvider.d.ts.map +1 -1
- package/dist/react/providers/ThreadListItemRuntimeProvider.d.ts +3 -6
- package/dist/react/providers/ThreadListItemRuntimeProvider.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts +209 -219
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js +53 -39
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts +185 -196
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js +13 -4
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
- package/dist/react/runtimes/RemoteThreadResource.d.ts +14 -19
- package/dist/react/runtimes/RemoteThreadResource.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadResource.js +3 -1
- package/dist/react/runtimes/RemoteThreadResource.js.map +1 -1
- package/dist/react/runtimes/RuntimeAdapterProvider.d.ts +8 -9
- package/dist/react/runtimes/RuntimeAdapterProvider.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/commandQueue.d.ts +9 -11
- package/dist/react/runtimes/assistant-transport/commandQueue.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/replayBoundaryStream.d.ts +4 -5
- package/dist/react/runtimes/assistant-transport/replayBoundaryStream.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/replayBoundaryStream.js +9 -2
- package/dist/react/runtimes/assistant-transport/replayBoundaryStream.js.map +1 -1
- package/dist/react/runtimes/assistant-transport/runManager.d.ts +7 -9
- package/dist/react/runtimes/assistant-transport/runManager.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/runManager.js +4 -1
- package/dist/react/runtimes/assistant-transport/runManager.js.map +1 -1
- package/dist/react/runtimes/assistant-transport/types.d.ts +106 -100
- package/dist/react/runtimes/assistant-transport/types.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.d.ts +3 -5
- package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.js +17 -6
- package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.js.map +1 -1
- package/dist/react/runtimes/assistant-transport/useConvertedState.d.ts +2 -4
- package/dist/react/runtimes/assistant-transport/useConvertedState.d.ts.map +1 -1
- package/dist/react/runtimes/assistant-transport/useLatestRef.d.ts +1 -3
- package/dist/react/runtimes/assistant-transport/useLatestRef.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts +5 -7
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js +410 -213
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
- package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts +14 -16
- package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.js +8 -4
- package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.js.map +1 -1
- package/dist/react/runtimes/cloud/auiV0.d.ts +136 -123
- package/dist/react/runtimes/cloud/auiV0.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/auiV0.js +60 -9
- package/dist/react/runtimes/cloud/auiV0.js.map +1 -1
- package/dist/react/runtimes/cloud/createCloudThreadListAdapter.d.ts +9 -10
- package/dist/react/runtimes/cloud/createCloudThreadListAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/createCloudThreadListAdapterCreateFallback.d.ts +4 -5
- package/dist/react/runtimes/cloud/createCloudThreadListAdapterCreateFallback.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/sdkIdentity.d.ts +1 -3
- 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 +2 -4
- package/dist/react/runtimes/cloud/useCloudThreadListAdapter.d.ts.map +1 -1
- package/dist/react/runtimes/cloud/useCloudThreadListRuntime.d.ts +8 -9
- package/dist/react/runtimes/cloud/useCloudThreadListRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/createMessageConverter.d.ts +14 -17
- package/dist/react/runtimes/createMessageConverter.d.ts.map +1 -1
- package/dist/react/runtimes/createMessageConverter.js.map +1 -1
- package/dist/react/runtimes/createRuntimeExtras.d.ts +11 -13
- package/dist/react/runtimes/createRuntimeExtras.d.ts.map +1 -1
- package/dist/react/runtimes/external-message-converter.d.ts +14 -18
- package/dist/react/runtimes/external-message-converter.d.ts.map +1 -1
- package/dist/react/runtimes/external-store-history-copy.d.ts +25 -0
- package/dist/react/runtimes/external-store-history-copy.d.ts.map +1 -0
- package/dist/react/runtimes/external-store-history-copy.js +148 -0
- package/dist/react/runtimes/external-store-history-copy.js.map +1 -0
- package/dist/react/runtimes/useExternalStoreRuntime.d.ts +2 -4
- package/dist/react/runtimes/useExternalStoreRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/useExternalStoreRuntime.js +72 -35
- package/dist/react/runtimes/useExternalStoreRuntime.js.map +1 -1
- package/dist/react/runtimes/useExternalStoreSharedOptions.d.ts +1 -3
- package/dist/react/runtimes/useExternalStoreSharedOptions.d.ts.map +1 -1
- package/dist/react/runtimes/useLocalRuntime.d.ts +26 -37
- package/dist/react/runtimes/useLocalRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/useLocalRuntime.js +142 -34
- package/dist/react/runtimes/useLocalRuntime.js.map +1 -1
- package/dist/react/runtimes/useRemoteThreadListRuntime.d.ts +2 -4
- package/dist/react/runtimes/useRemoteThreadListRuntime.d.ts.map +1 -1
- package/dist/react/runtimes/useRuntimeAdapters.d.ts +1 -3
- package/dist/react/runtimes/useRuntimeAdapters.d.ts.map +1 -1
- package/dist/react/runtimes/useStreamingTiming.d.ts +3 -5
- package/dist/react/runtimes/useStreamingTiming.d.ts.map +1 -1
- package/dist/react/types/MessagePartComponentTypes.d.ts +46 -43
- package/dist/react/types/MessagePartComponentTypes.d.ts.map +1 -1
- package/dist/react/types/scopes/dataRenderers.d.ts +8 -11
- package/dist/react/types/scopes/dataRenderers.d.ts.map +1 -1
- package/dist/react/types/scopes/interactables.d.ts +50 -49
- package/dist/react/types/scopes/interactables.d.ts.map +1 -1
- package/dist/react/types/scopes/tools.d.ts +17 -19
- package/dist/react/types/scopes/tools.d.ts.map +1 -1
- package/dist/react/types/store-augmentation.d.ts +10 -11
- package/dist/react/types/store-augmentation.d.ts.map +1 -1
- package/dist/react/utils/getMessageQuote.d.ts +5 -6
- package/dist/react/utils/getMessageQuote.d.ts.map +1 -1
- package/dist/react/utils/groupParts.d.ts +28 -29
- package/dist/react/utils/groupParts.d.ts.map +1 -1
- package/dist/react/utils/useJSONEqual.d.ts +1 -3
- package/dist/react/utils/useJSONEqual.d.ts.map +1 -1
- package/dist/react/utils/useJSONSchemaDependency.d.ts +2 -4
- package/dist/react/utils/useJSONSchemaDependency.d.ts.map +1 -1
- package/dist/runtime/api/assistant-runtime.d.ts +26 -28
- package/dist/runtime/api/assistant-runtime.d.ts.map +1 -1
- package/dist/runtime/api/attachment-runtime.d.ts +46 -43
- package/dist/runtime/api/attachment-runtime.d.ts.map +1 -1
- package/dist/runtime/api/attachment-runtime.js.map +1 -1
- package/dist/runtime/api/bindings.d.ts +31 -30
- package/dist/runtime/api/bindings.d.ts.map +1 -1
- package/dist/runtime/api/composer-runtime.d.ts +207 -193
- package/dist/runtime/api/composer-runtime.d.ts.map +1 -1
- package/dist/runtime/api/composer-runtime.js +4 -0
- package/dist/runtime/api/composer-runtime.js.map +1 -1
- package/dist/runtime/api/message-part-runtime.d.ts +28 -26
- package/dist/runtime/api/message-part-runtime.d.ts.map +1 -1
- package/dist/runtime/api/message-part-runtime.js +22 -0
- package/dist/runtime/api/message-part-runtime.js.map +1 -1
- package/dist/runtime/api/message-runtime.d.ts +87 -84
- package/dist/runtime/api/message-runtime.d.ts.map +1 -1
- package/dist/runtime/api/message-runtime.js +1 -1
- package/dist/runtime/api/message-runtime.js.map +1 -1
- package/dist/runtime/api/paths.d.ts +48 -50
- package/dist/runtime/api/paths.d.ts.map +1 -1
- package/dist/runtime/api/thread-list-item-runtime.d.ts +64 -66
- package/dist/runtime/api/thread-list-item-runtime.d.ts.map +1 -1
- package/dist/runtime/api/thread-list-item-runtime.js.map +1 -1
- package/dist/runtime/api/thread-list-runtime.d.ts +73 -76
- package/dist/runtime/api/thread-list-runtime.d.ts.map +1 -1
- package/dist/runtime/api/thread-list-runtime.js.map +1 -1
- package/dist/runtime/api/thread-runtime.d.ts +299 -300
- package/dist/runtime/api/thread-runtime.d.ts.map +1 -1
- package/dist/runtime/api/thread-runtime.js +2 -1
- package/dist/runtime/api/thread-runtime.js.map +1 -1
- package/dist/runtime/base/base-assistant-runtime-core.d.ts +8 -10
- package/dist/runtime/base/base-assistant-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-composer-runtime-core.d.ts +149 -99
- package/dist/runtime/base/base-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-composer-runtime-core.js +400 -122
- package/dist/runtime/base/base-composer-runtime-core.js.map +1 -1
- package/dist/runtime/base/base-thread-runtime-core.d.ts +120 -108
- package/dist/runtime/base/base-thread-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/base-thread-runtime-core.js +109 -41
- package/dist/runtime/base/base-thread-runtime-core.js.map +1 -1
- package/dist/runtime/base/default-edit-composer-runtime-core.d.ts +29 -29
- package/dist/runtime/base/default-edit-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/default-edit-composer-runtime-core.js +10 -1
- package/dist/runtime/base/default-edit-composer-runtime-core.js.map +1 -1
- package/dist/runtime/base/default-thread-composer-runtime-core.d.ts +27 -29
- package/dist/runtime/base/default-thread-composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/base/default-thread-composer-runtime-core.js +21 -6
- package/dist/runtime/base/default-thread-composer-runtime-core.js.map +1 -1
- package/dist/runtime/branch/external-thread-branch-adapter.d.ts +14 -16
- package/dist/runtime/branch/external-thread-branch-adapter.d.ts.map +1 -1
- package/dist/runtime/interfaces/assistant-runtime-core.d.ts +7 -9
- package/dist/runtime/interfaces/assistant-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/composer-runtime-core.d.ts +88 -72
- package/dist/runtime/interfaces/composer-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/thread-list-runtime-core.d.ts +63 -65
- package/dist/runtime/interfaces/thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtime/interfaces/thread-runtime-core.d.ts +210 -197
- package/dist/runtime/interfaces/thread-runtime-core.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +25 -20
- package/dist/runtime/internal.d.ts.map +1 -0
- package/dist/runtime/queue/external-thread-queue-adapter.d.ts +35 -37
- package/dist/runtime/queue/external-thread-queue-adapter.d.ts.map +1 -1
- package/dist/runtime/queue/message-queue.d.ts +29 -31
- package/dist/runtime/queue/message-queue.d.ts.map +1 -1
- package/dist/runtime/queue/message-queue.js +1 -1
- package/dist/runtime/queue/queue-item.d.ts +5 -7
- package/dist/runtime/queue/queue-item.d.ts.map +1 -1
- package/dist/runtime/utils/abortable-thread-load.d.ts +7 -8
- package/dist/runtime/utils/abortable-thread-load.d.ts.map +1 -1
- package/dist/runtime/utils/attachment-add-operations.d.ts +13 -11
- package/dist/runtime/utils/attachment-add-operations.d.ts.map +1 -1
- package/dist/runtime/utils/attachment-add-operations.js +24 -2
- package/dist/runtime/utils/attachment-add-operations.js.map +1 -1
- package/dist/runtime/utils/attachment-send-operations.d.ts +12 -0
- package/dist/runtime/utils/attachment-send-operations.d.ts.map +1 -0
- package/dist/runtime/utils/attachment-send-operations.js +34 -0
- package/dist/runtime/utils/attachment-send-operations.js.map +1 -0
- package/dist/runtime/utils/auto-status.d.ts +4 -5
- package/dist/runtime/utils/auto-status.d.ts.map +1 -1
- package/dist/runtime/utils/auto-status.js +3 -5
- package/dist/runtime/utils/auto-status.js.map +1 -1
- package/dist/runtime/utils/chat-model-adapter.d.ts +26 -27
- package/dist/runtime/utils/chat-model-adapter.d.ts.map +1 -1
- package/dist/runtime/utils/external-message-conversion.d.ts +32 -32
- package/dist/runtime/utils/external-message-conversion.d.ts.map +1 -1
- package/dist/runtime/utils/external-message-conversion.js +3 -3
- package/dist/runtime/utils/external-message-conversion.js.map +1 -1
- package/dist/runtime/utils/external-store-message.d.ts +2 -4
- package/dist/runtime/utils/external-store-message.d.ts.map +1 -1
- package/dist/runtime/utils/message-repository-session.d.ts +21 -23
- package/dist/runtime/utils/message-repository-session.d.ts.map +1 -1
- package/dist/runtime/utils/message-repository.d.ts +50 -51
- package/dist/runtime/utils/message-repository.d.ts.map +1 -1
- package/dist/runtime/utils/message-repository.js +8 -7
- package/dist/runtime/utils/message-repository.js.map +1 -1
- package/dist/runtime/utils/pending-tool-calls.d.ts +10 -11
- package/dist/runtime/utils/pending-tool-calls.d.ts.map +1 -1
- package/dist/runtime/utils/resolveToolApprovalResponse.d.ts +6 -8
- package/dist/runtime/utils/resolveToolApprovalResponse.d.ts.map +1 -1
- package/dist/runtime/utils/runtime-extras-brand.d.ts +4 -6
- package/dist/runtime/utils/runtime-extras-brand.d.ts.map +1 -1
- package/dist/runtime/utils/stored-message-parts.d.ts +5 -5
- package/dist/runtime/utils/stored-message-parts.d.ts.map +1 -1
- package/dist/runtime/utils/stored-message-parts.js +22 -2
- package/dist/runtime/utils/stored-message-parts.js.map +1 -1
- package/dist/runtime/utils/streaming-timing.d.ts +19 -21
- package/dist/runtime/utils/streaming-timing.d.ts.map +1 -1
- package/dist/runtime/utils/thread-message-like.d.ts +36 -32
- package/dist/runtime/utils/thread-message-like.d.ts.map +1 -1
- package/dist/runtime/utils/thread-message-like.js +16 -6
- package/dist/runtime/utils/thread-message-like.js.map +1 -1
- package/dist/runtime/utils/thread-runtime-lifecycle.d.ts +4 -5
- package/dist/runtime/utils/thread-runtime-lifecycle.d.ts.map +1 -1
- package/dist/runtime/utils/thread-runtime-lifecycle.js +31 -4
- package/dist/runtime/utils/thread-runtime-lifecycle.js.map +1 -1
- package/dist/runtime/utils/tool-call-tree.d.ts +6 -8
- package/dist/runtime/utils/tool-call-tree.d.ts.map +1 -1
- package/dist/runtime/utils/tool-interactions.d.ts +10 -0
- package/dist/runtime/utils/tool-interactions.d.ts.map +1 -0
- package/dist/runtime/utils/tool-interactions.js +92 -0
- package/dist/runtime/utils/tool-interactions.js.map +1 -0
- package/dist/runtimes/assistant-transport/utils.d.ts +0 -2
- package/dist/runtimes/assistant-transport/utils.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-adapter.d.ts +215 -198
- package/dist/runtimes/external-store/external-store-adapter.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-runtime-core.d.ts +5 -6
- package/dist/runtimes/external-store/external-store-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-runtime-core.js +4 -1
- package/dist/runtimes/external-store/external-store-runtime-core.js.map +1 -1
- package/dist/runtimes/external-store/external-store-shared-options.d.ts +1 -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 +38 -40
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.js +2 -2
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.js.map +1 -1
- package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts +117 -124
- 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 +44 -14
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js.map +1 -1
- package/dist/runtimes/external-store/thread-message-converter.d.ts +3 -5
- package/dist/runtimes/external-store/thread-message-converter.d.ts.map +1 -1
- package/dist/runtimes/inert/InertThreadRuntimeCore.d.ts +94 -95
- package/dist/runtimes/inert/InertThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/inert/InertThreadRuntimeCore.js +3 -0
- package/dist/runtimes/inert/InertThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/internal.d.ts +20 -16
- package/dist/runtimes/internal.d.ts.map +1 -0
- package/dist/runtimes/local/local-runtime-core.d.ts +6 -8
- package/dist/runtimes/local/local-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/local/local-runtime-options.d.ts +40 -42
- package/dist/runtimes/local/local-runtime-options.d.ts.map +1 -1
- package/dist/runtimes/local/local-thread-list-runtime-core.d.ts +40 -42
- package/dist/runtimes/local/local-thread-list-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/local/local-thread-runtime-core.d.ts +93 -97
- package/dist/runtimes/local/local-thread-runtime-core.d.ts.map +1 -1
- package/dist/runtimes/local/local-thread-runtime-core.js +178 -31
- package/dist/runtimes/local/local-thread-runtime-core.js.map +1 -1
- package/dist/runtimes/local/should-continue.d.ts +1 -3
- package/dist/runtimes/local/should-continue.d.ts.map +1 -1
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts +76 -53
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.js +28 -1
- package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts +11 -13
- package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/adapter-changed.d.ts +2 -4
- 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 -3
- package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/optimistic-state.d.ts +33 -29
- package/dist/runtimes/remote-thread-list/optimistic-state.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/optimistic-state.js +8 -3
- package/dist/runtimes/remote-thread-list/optimistic-state.js.map +1 -1
- package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts +44 -46
- package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/remote-thread-state.js +1 -1
- package/dist/runtimes/remote-thread-list/title-generation.d.ts +25 -26
- package/dist/runtimes/remote-thread-list/title-generation.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/title.d.ts +3 -5
- package/dist/runtimes/remote-thread-list/title.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/types.d.ts +111 -112
- package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -1
- package/dist/runtimes/tool-invocations/ToolInvocationTracker.d.ts +144 -145
- package/dist/runtimes/tool-invocations/ToolInvocationTracker.d.ts.map +1 -1
- package/dist/runtimes/tool-invocations/ToolInvocationTracker.js +22 -7
- package/dist/runtimes/tool-invocations/ToolInvocationTracker.js.map +1 -1
- package/dist/store/clients/chain-of-thought-client.d.ts +7 -9
- package/dist/store/clients/chain-of-thought-client.d.ts.map +1 -1
- package/dist/store/clients/external-thread.d.ts +53 -54
- package/dist/store/clients/external-thread.d.ts.map +1 -1
- package/dist/store/clients/external-thread.js +1256 -731
- package/dist/store/clients/external-thread.js.map +1 -1
- package/dist/store/clients/model-context-client.d.ts +1 -3
- package/dist/store/clients/model-context-client.d.ts.map +1 -1
- package/dist/store/clients/no-op-composer-client.d.ts +2 -4
- package/dist/store/clients/no-op-composer-client.d.ts.map +1 -1
- package/dist/store/clients/no-op-composer-client.js +3 -1
- package/dist/store/clients/no-op-composer-client.js.map +1 -1
- package/dist/store/clients/runtime-adapter.d.ts +1 -3
- package/dist/store/clients/runtime-adapter.d.ts.map +1 -1
- package/dist/store/clients/single-thread-list.d.ts +3 -4
- package/dist/store/clients/single-thread-list.d.ts.map +1 -1
- package/dist/store/clients/submission-message.d.ts +8 -0
- package/dist/store/clients/submission-message.d.ts.map +1 -0
- package/dist/store/clients/submission-message.js +22 -0
- package/dist/store/clients/submission-message.js.map +1 -0
- package/dist/store/clients/suggestions.d.ts +5 -7
- package/dist/store/clients/suggestions.d.ts.map +1 -1
- package/dist/store/clients/thread-message-client.d.ts +10 -9
- package/dist/store/clients/thread-message-client.d.ts.map +1 -1
- package/dist/store/clients/thread-message-client.js +81 -82
- package/dist/store/clients/thread-message-client.js.map +1 -1
- package/dist/store/clients/thread-selection-events.d.ts +0 -2
- package/dist/store/clients/thread-selection-events.d.ts.map +1 -1
- package/dist/store/clients/thread-tasks.d.ts +4 -6
- package/dist/store/clients/thread-tasks.d.ts.map +1 -1
- package/dist/store/env.d.ts +0 -2
- package/dist/store/env.d.ts.map +1 -1
- package/dist/store/index.d.ts +33 -36
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +5 -5
- package/dist/store/internal.d.ts +12 -12
- package/dist/store/internal.d.ts.map +1 -0
- package/dist/store/internal.js +2 -2
- package/dist/store/primitive-predicates.d.ts +3 -4
- package/dist/store/primitive-predicates.d.ts.map +1 -1
- package/dist/store/primitive-predicates.js +9 -4
- package/dist/store/primitive-predicates.js.map +1 -1
- package/dist/store/runtime-clients/attachment-runtime-client.d.ts +3 -5
- package/dist/store/runtime-clients/attachment-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/composer-runtime-client.d.ts +10 -12
- package/dist/store/runtime-clients/composer-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/composer-runtime-client.js +65 -62
- package/dist/store/runtime-clients/composer-runtime-client.js.map +1 -1
- package/dist/store/runtime-clients/handle-runtime-action.d.ts +0 -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 +0 -2
- package/dist/store/runtime-clients/handle-thread-list-action.d.ts.map +1 -1
- package/dist/store/runtime-clients/liveRef.d.ts +1 -3
- package/dist/store/runtime-clients/liveRef.d.ts.map +1 -1
- package/dist/store/runtime-clients/message-part-runtime-client.d.ts +3 -5
- package/dist/store/runtime-clients/message-part-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/message-part-runtime-client.js +26 -16
- package/dist/store/runtime-clients/message-part-runtime-client.js.map +1 -1
- package/dist/store/runtime-clients/message-runtime-client.d.ts +9 -9
- package/dist/store/runtime-clients/message-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/message-runtime-client.js +121 -113
- package/dist/store/runtime-clients/message-runtime-client.js.map +1 -1
- package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts +4 -6
- 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 +5 -7
- package/dist/store/runtime-clients/thread-list-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-runtime-client.d.ts +3 -5
- package/dist/store/runtime-clients/thread-runtime-client.d.ts.map +1 -1
- package/dist/store/runtime-clients/thread-runtime-client.js +221 -158
- package/dist/store/runtime-clients/thread-runtime-client.js.map +1 -1
- package/dist/store/runtime-clients/useSubscribable.d.ts +2 -4
- package/dist/store/runtime-clients/useSubscribable.d.ts.map +1 -1
- package/dist/store/scope-registration.d.ts +28 -29
- package/dist/store/scope-registration.d.ts.map +1 -1
- package/dist/store/scopes/attachment.d.ts +15 -17
- package/dist/store/scopes/attachment.d.ts.map +1 -1
- package/dist/store/scopes/chain-of-thought.d.ts +28 -29
- package/dist/store/scopes/chain-of-thought.d.ts.map +1 -1
- package/dist/store/scopes/composer.d.ts +141 -128
- package/dist/store/scopes/composer.d.ts.map +1 -1
- package/dist/store/scopes/message.d.ts +114 -107
- package/dist/store/scopes/message.d.ts.map +1 -1
- package/dist/store/scopes/model-context.d.ts +7 -9
- package/dist/store/scopes/model-context.d.ts.map +1 -1
- package/dist/store/scopes/part.d.ts +49 -45
- package/dist/store/scopes/part.d.ts.map +1 -1
- package/dist/store/scopes/queue-item.d.ts +18 -20
- package/dist/store/scopes/queue-item.d.ts.map +1 -1
- package/dist/store/scopes/suggestion.d.ts +10 -12
- package/dist/store/scopes/suggestion.d.ts.map +1 -1
- package/dist/store/scopes/suggestions.d.ts +13 -15
- package/dist/store/scopes/suggestions.d.ts.map +1 -1
- package/dist/store/scopes/task.d.ts +23 -25
- package/dist/store/scopes/task.d.ts.map +1 -1
- package/dist/store/scopes/thread-list-item.d.ts +63 -65
- package/dist/store/scopes/thread-list-item.d.ts.map +1 -1
- package/dist/store/scopes/thread.d.ts +192 -194
- package/dist/store/scopes/thread.d.ts.map +1 -1
- package/dist/store/scopes/threads.d.ts +45 -47
- package/dist/store/scopes/threads.d.ts.map +1 -1
- package/dist/subscribable/subscribable.d.ts +58 -53
- package/dist/subscribable/subscribable.d.ts.map +1 -1
- package/dist/subscribable/subscribable.js +35 -7
- package/dist/subscribable/subscribable.js.map +1 -1
- package/dist/types/attachment.d.ts +26 -27
- package/dist/types/attachment.d.ts.map +1 -1
- package/dist/types/augmentations.d.ts +4 -4
- package/dist/types/augmentations.d.ts.map +1 -1
- package/dist/types/directive.d.ts +11 -13
- package/dist/types/directive.d.ts.map +1 -1
- package/dist/types/error.d.ts +7 -8
- package/dist/types/error.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/message.d.ts +322 -284
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js.map +1 -1
- package/dist/types/quote.d.ts +2 -4
- package/dist/types/quote.d.ts.map +1 -1
- package/dist/types/trigger.d.ts +8 -10
- package/dist/types/trigger.d.ts.map +1 -1
- package/dist/types/unsubscribe.d.ts +0 -2
- package/dist/types/unsubscribe.d.ts.map +1 -1
- package/dist/utils/abortable-iterable.d.ts +0 -2
- package/dist/utils/abortable-iterable.d.ts.map +1 -1
- package/dist/utils/composite-context-provider.d.ts +8 -11
- package/dist/utils/composite-context-provider.d.ts.map +1 -1
- package/dist/utils/data-url.d.ts +10 -12
- package/dist/utils/data-url.d.ts.map +1 -1
- package/dist/utils/getGroupStatus.d.ts +17 -18
- package/dist/utils/getGroupStatus.d.ts.map +1 -1
- package/dist/utils/id.d.ts +0 -2
- package/dist/utils/id.d.ts.map +1 -1
- package/dist/utils/image-media-type.d.ts +0 -2
- package/dist/utils/image-media-type.d.ts.map +1 -1
- package/dist/utils/invoke-user-callback.d.ts +0 -2
- package/dist/utils/invoke-user-callback.d.ts.map +1 -1
- package/dist/utils/json/is-json-equal.d.ts +0 -2
- package/dist/utils/json/is-json-equal.d.ts.map +1 -1
- package/dist/utils/json/is-json.d.ts +1 -3
- package/dist/utils/json/is-json.d.ts.map +1 -1
- package/dist/utils/json/stable-stringify-tool-args.d.ts +1 -3
- package/dist/utils/json/stable-stringify-tool-args.d.ts.map +1 -1
- package/dist/utils/normalizePartStatus.d.ts +2 -3
- package/dist/utils/normalizePartStatus.d.ts.map +1 -1
- package/dist/utils/normalizePartStatus.js +3 -2
- package/dist/utils/normalizePartStatus.js.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 +0 -2
- package/dist/utils/record.d.ts.map +1 -1
- package/dist/utils/silent-runtime-action.d.ts +0 -2
- package/dist/utils/silent-runtime-action.d.ts.map +1 -1
- package/dist/utils/text.d.ts +1 -3
- package/dist/utils/text.d.ts.map +1 -1
- package/dist/utils/wire-media.d.ts +0 -2
- package/dist/utils/wire-media.d.ts.map +1 -1
- package/package.json +11 -10
- package/src/adapters/attachment.test.ts +98 -1
- package/src/adapters/attachment.ts +70 -20
- package/src/adapters/speech.test.ts +94 -0
- package/src/adapters/speech.ts +16 -2
- package/src/adapters/thread-history.ts +16 -5
- package/src/adapters/voice.test.ts +169 -0
- package/src/adapters/voice.ts +25 -4
- package/src/index.ts +14 -2
- package/src/internal.ts +7 -0
- package/src/model-context/frame/host.test.ts +51 -1
- package/src/model-context/frame/host.ts +3 -1
- package/src/model-context/frame/provider.test.ts +61 -0
- package/src/model-context/frame/provider.ts +8 -1
- package/src/model-context/frame/validate.ts +57 -0
- package/src/model-context/interactable-composer-metadata.test.ts +82 -0
- package/src/model-context/interactable-composer-metadata.ts +45 -2
- package/src/react/adapters/LocalStorageThreadListAdapter.test.ts +594 -0
- package/src/react/adapters/LocalStorageThreadListAdapter.tsx +98 -35
- package/src/react/client/Interactables.test.ts +853 -1
- package/src/react/client/Interactables.ts +325 -45
- package/src/react/client/RemoteThreadList.initialize-failure.test.ts +124 -0
- package/src/react/client/RemoteThreadList.ts +6 -0
- package/src/react/client/Tools.ts +2 -3
- package/src/react/client/interactable-model-context.test.ts +56 -13
- package/src/react/client/interactable-model-context.ts +48 -23
- package/src/react/index.ts +2 -2
- package/src/react/interactables-legacy/Interactables.test.ts +212 -1
- package/src/react/interactables-legacy/Interactables.ts +25 -14
- package/src/react/interactables-legacy/interactable-model-context.ts +26 -24
- package/src/react/interactables-shared/useInteractablePersistenceQueue.test.tsx +22 -2
- package/src/react/interactables-shared/useInteractablePersistenceQueue.ts +63 -11
- package/src/react/primitive-hooks/useSuggestionTrigger.test.ts +33 -0
- package/src/react/primitive-hooks/useSuggestionTrigger.ts +7 -4
- package/src/react/primitives/generativeUI/GenerativeUI.test.tsx +124 -8
- package/src/react/primitives/generativeUI/GenerativeUI.tsx +35 -15
- package/src/react/primitives/message/MessageAttachments.test.tsx +2 -6
- package/src/react/primitives/message/MessageAttachments.tsx +14 -8
- package/src/react/primitives/message/MessageGroupedParts.test.tsx +151 -7
- package/src/react/primitives/message/MessageGroupedParts.tsx +19 -6
- package/src/react/primitives/message/MessageParts.test.tsx +84 -0
- package/src/react/primitives/message/MessageParts.tool-interaction.test.tsx +69 -0
- package/src/react/primitives/message/MessageParts.tsx +29 -8
- package/src/react/primitives/thread/ThreadSuggestions.test.tsx +97 -0
- package/src/react/primitives/thread/ThreadSuggestions.tsx +29 -6
- package/src/react/providers/ReadonlyThreadProvider.tsx +2 -2
- package/src/react/providers/TextMessagePartProvider.tsx +3 -0
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.running.test.tsx +93 -0
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.test.tsx +160 -3
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.title.test.tsx +38 -0
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.tsx +73 -53
- package/src/react/runtimes/RemoteThreadListThreadListRuntimeCore.tsx +19 -3
- package/src/react/runtimes/RemoteThreadResource.ts +5 -2
- package/src/react/runtimes/assistant-transport/replayBoundaryStream.test.ts +3 -1
- package/src/react/runtimes/assistant-transport/replayBoundaryStream.ts +10 -2
- package/src/react/runtimes/assistant-transport/runManager.ts +3 -0
- package/src/react/runtimes/assistant-transport/transport-parentid.test.tsx +57 -0
- package/src/react/runtimes/assistant-transport/transport-thread-id.test.tsx +571 -0
- package/src/react/runtimes/assistant-transport/types.ts +9 -1
- package/src/react/runtimes/assistant-transport/useAssistantTransport.spec.md +10 -0
- package/src/react/runtimes/assistant-transport/useAssistantTransportRuntime.test.tsx +42 -0
- package/src/react/runtimes/assistant-transport/useAssistantTransportRuntime.ts +33 -9
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.copy.integration.test.tsx +289 -0
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.copy.test.tsx +471 -0
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.engagement.test.tsx +330 -0
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.test.ts +78 -2
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.test.tsx +361 -2
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.ts +571 -216
- package/src/react/runtimes/cloud/CloudFileAttachmentAdapter.test.ts +25 -0
- package/src/react/runtimes/cloud/CloudFileAttachmentAdapter.ts +7 -3
- package/src/react/runtimes/cloud/auiV0.ts +158 -9
- package/src/react/runtimes/cloud/auiV0DecodeSafely.test.ts +352 -1
- package/src/react/runtimes/createMessageConverter.ts +9 -3
- package/src/react/runtimes/external-store-history-copy.ts +223 -0
- package/src/react/runtimes/useExternalStoreRuntime.history-copy.test.tsx +483 -0
- package/src/react/runtimes/useExternalStoreRuntime.lifecycle.test.tsx +76 -1
- package/src/react/runtimes/useExternalStoreRuntime.ts +25 -5
- package/src/react/runtimes/useLocalRuntime.test.tsx +145 -1
- package/src/react/runtimes/useLocalRuntime.ts +8 -5
- package/src/react/types/MessagePartComponentTypes.ts +10 -0
- package/src/react/types/scopes/interactables.ts +3 -0
- package/src/runtime/api/attachment-runtime.ts +10 -5
- package/src/runtime/api/bindings.ts +6 -1
- package/src/runtime/api/composer-runtime.ts +29 -6
- package/src/runtime/api/message-part-runtime.test.ts +215 -0
- package/src/runtime/api/message-part-runtime.ts +40 -0
- package/src/runtime/api/message-runtime.test.ts +112 -2
- package/src/runtime/api/message-runtime.ts +10 -5
- package/src/runtime/api/thread-list-item-runtime.ts +5 -5
- package/src/runtime/api/thread-list-runtime.ts +3 -3
- package/src/runtime/api/thread-runtime.test.ts +59 -0
- package/src/runtime/api/thread-runtime.ts +21 -11
- package/src/runtime/base/base-composer-runtime-core.ts +548 -153
- package/src/runtime/base/base-thread-runtime-core.test.ts +744 -9
- package/src/runtime/base/base-thread-runtime-core.ts +154 -27
- package/src/runtime/base/default-edit-composer-runtime-core.ts +13 -1
- package/src/runtime/base/default-thread-composer-runtime-core.ts +29 -10
- package/src/runtime/interfaces/composer-runtime-core.ts +19 -0
- package/src/runtime/interfaces/thread-runtime-core.ts +22 -1
- package/src/runtime/utils/attachment-add-operations.ts +45 -2
- package/src/runtime/utils/attachment-send-operations.ts +54 -0
- package/src/runtime/utils/auto-status.test.ts +54 -0
- package/src/runtime/utils/auto-status.ts +3 -10
- package/src/runtime/utils/external-message-conversion.test.ts +48 -0
- package/src/runtime/utils/external-message-conversion.ts +3 -4
- package/src/runtime/utils/message-repository.test.ts +69 -1
- package/src/runtime/utils/message-repository.ts +14 -7
- package/src/runtime/utils/stored-message-parts.ts +43 -1
- package/src/runtime/utils/thread-message-like.test.ts +58 -0
- package/src/runtime/utils/thread-message-like.ts +72 -46
- package/src/runtime/utils/thread-runtime-lifecycle.test.ts +67 -0
- package/src/runtime/utils/thread-runtime-lifecycle.ts +42 -8
- package/src/runtime/utils/tool-interactions.test.ts +193 -0
- package/src/runtime/utils/tool-interactions.ts +147 -0
- package/src/runtimes/external-store/external-store-adapter.ts +22 -1
- package/src/runtimes/external-store/external-store-runtime-core.ts +10 -2
- package/src/runtimes/external-store/external-store-thread-list-runtime-core.ts +2 -2
- package/src/runtimes/external-store/external-store-thread-runtime-core.test.ts +49 -0
- package/src/runtimes/external-store/external-store-thread-runtime-core.ts +76 -29
- package/src/runtimes/inert/InertThreadRuntimeCore.test.ts +127 -56
- package/src/runtimes/inert/InertThreadRuntimeCore.ts +10 -1
- package/src/runtimes/local/local-thread-runtime-core.edit-cancellation.test.ts +70 -0
- package/src/runtimes/local/local-thread-runtime-core.test.ts +1649 -108
- package/src/runtimes/local/local-thread-runtime-core.ts +301 -47
- package/src/runtimes/readonly/ReadonlyThreadRuntimeCore.ts +53 -1
- package/src/runtimes/remote-thread-list/optimistic-state.ts +8 -3
- package/src/runtimes/tool-invocations/EDGE_CASES.md +19 -4
- package/src/runtimes/tool-invocations/ToolInvocationTracker.test.ts +392 -39
- package/src/runtimes/tool-invocations/ToolInvocationTracker.ts +31 -8
- package/src/store/clients/external-thread.test.ts +145 -0
- package/src/store/clients/external-thread.ts +635 -131
- package/src/store/clients/model-context-client.test.ts +8 -8
- package/src/store/clients/no-op-composer-client.ts +2 -0
- package/src/store/clients/submission-message.ts +27 -0
- package/src/store/clients/thread-message-client.test.ts +39 -0
- package/src/store/clients/thread-message-client.ts +13 -6
- package/src/store/index.ts +2 -2
- package/src/store/internal.ts +1 -0
- package/src/store/primitive-predicates.test.ts +103 -0
- package/src/store/primitive-predicates.ts +15 -3
- package/src/store/runtime-clients/composer-runtime-client.ts +4 -3
- package/src/store/runtime-clients/message-part-runtime-client.test.ts +42 -0
- package/src/store/runtime-clients/message-part-runtime-client.ts +4 -0
- package/src/store/runtime-clients/message-runtime-client.ts +5 -0
- package/src/store/runtime-clients/thread-runtime-client.test.tsx +138 -5
- package/src/store/runtime-clients/thread-runtime-client.ts +46 -9
- package/src/store/scopes/composer.ts +22 -4
- package/src/store/scopes/message.ts +8 -0
- package/src/store/scopes/part.ts +8 -0
- package/src/subscribable/subscribable.test.ts +198 -1
- package/src/subscribable/subscribable.ts +49 -7
- package/src/tests/RemoteThreadListThreadListRuntimeCore-errors.test.ts +95 -1
- package/src/tests/auiV0Encode.test.ts +408 -1
- package/src/tests/base-composer-runtime-core-send.test.ts +722 -29
- package/src/tests/base-composer-runtime-core.test.ts +196 -0
- package/src/tests/composer-can-send.test.ts +98 -1
- package/src/tests/composer-submission.test.tsx +796 -0
- package/src/tests/default-edit-composer-runtime-core.test.ts +102 -2
- package/src/tests/external-store-thread-list-runtime-core.test.ts +111 -0
- package/src/tests/external-store-thread-runtime-core-adapter.test.ts +581 -1
- package/src/tests/external-store-thread-runtime-core.test.ts +186 -0
- package/src/tests/external-thread-attachments.test.tsx +741 -3
- package/src/tests/external-thread-isLast.test.tsx +69 -0
- package/src/tests/get-thread-state-isRunning.test.ts +2 -2
- package/src/tests/remote-thread-list-adapter-switch.test.ts +45 -1
- package/src/types/message.ts +49 -2
- package/src/utils/normalizePartStatus.ts +14 -1
- package/dist/tests/remote-thread-list-test-helpers.d.ts +0 -15
- package/dist/tests/remote-thread-list-test-helpers.d.ts.map +0 -1
- package/dist/tests/remote-thread-list-test-helpers.js +0 -59
- package/dist/tests/remote-thread-list-test-helpers.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
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;WAC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;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
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,wBAAqB;AAEvD,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,CAAC;AAErD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CA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U,GAAG,UAAU,CAAC;YACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;SAC3B,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;QAC5C,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;QAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;QAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC1C,CAAC;IACF,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,CAAC,mBAAmB,GAAG,iBAAiB,GAAG,sBAAsB,CAAC,CAAC;AAErE,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;AAEhD,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG;IACtD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B,CAAC"}
|
|
@@ -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","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"}
|
|
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","Unstable_ToolInteraction","occurredAt","payload","Unstable_ToolInteractionLog","entries","omitted","Unstable_ToolInteractionInput","ToolCallMessagePart","toolCallId","toolName","args","TArgs","result","TResult","isError","isPreliminary","argsText","artifact","timing","mcp","modelContent","interrupt","prompt","dismissible","isAutomatic","options","resolution","messages","ThreadMessage","unstable_interactions","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 | number\n | readonly GenerativeUINode[]\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 child nodes — strings and numbers render as text; nested arrays and 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\n/** One thing a user did in a tool call's rendered UI, stored with the call. */\nexport type Unstable_ToolInteraction =\n | {\n /** A generative UI action the user fired, with the user's input under `$input`. */\n readonly type: \"action\";\n /** When the user acted, in epoch milliseconds. */\n readonly occurredAt: number;\n readonly payload: ReadonlyJSONObject;\n }\n | {\n /** The answer the user gave to the tool's request for human input. */\n readonly type: \"human-response\";\n /** When the user answered, in epoch milliseconds. */\n readonly occurredAt: number;\n readonly payload: ReadonlyJSONValue;\n };\n\n/**\n * The interactions recorded on a tool call, oldest first. `omitted` counts\n * earlier entries dropped to keep the log within its size limit.\n */\nexport type Unstable_ToolInteractionLog = {\n readonly entries: readonly Unstable_ToolInteraction[];\n readonly omitted?: number;\n};\n\n/** An interaction to record; the runtime validates the payload and stamps the time. */\nexport type Unstable_ToolInteractionInput = {\n readonly type: Unstable_ToolInteraction[\"type\"];\n readonly payload: unknown;\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. Final once it has completed; an interim value while `isPreliminary` is set. */\n readonly result?: TResult | undefined;\n /** Whether the result represents a tool execution error. */\n readonly isError?: boolean | undefined;\n /** Whether `result` is an interim value from a tool that is still running, so the call is not settled yet. */\n readonly isPreliminary?: 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 /**\n * Whether the request accepts a dismissal: `approved: false` with no\n * answer. A decision is always refusable; a question is only when its host\n * records a dismissal, so a renderer offers one only when this is set.\n */\n readonly dismissible?: 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 * What the user did in this call's rendered UI, recorded so a stored\n * conversation shows the answer beside the question.\n */\n readonly unstable_interactions?: Unstable_ToolInteractionLog;\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":";AAwJA,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","
|
|
1
|
+
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../src/types/quote.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC"}
|
package/dist/types/trigger.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { ReadonlyJSONObject } from "assistant-stream/utils";
|
|
2
|
-
//#region src/types/trigger.d.ts
|
|
1
|
+
import type { ReadonlyJSONObject } from "assistant-stream/utils";
|
|
3
2
|
/** A selectable item displayed inside a trigger popover (e.g. mention, slash command). */
|
|
4
3
|
export type Unstable_TriggerItem = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly type: string;
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly description?: string | undefined;
|
|
8
|
+
readonly metadata?: ReadonlyJSONObject | undefined;
|
|
10
9
|
};
|
|
11
10
|
/** A grouping of trigger items shown in a trigger popover. */
|
|
12
11
|
export type Unstable_TriggerCategory = {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly label: string;
|
|
15
14
|
};
|
|
16
|
-
//#endregion
|
|
17
15
|
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.d.ts","
|
|
1
|
+
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../src/types/trigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,0FAA0F;AAC1F,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;CACpD,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unsubscribe.d.ts","
|
|
1
|
+
{"version":3,"file":"unsubscribe.d.ts","sourceRoot":"","sources":["../../src/types/unsubscribe.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utils/abortable-iterable.d.ts
|
|
2
1
|
export declare const openAbortableIterable: <T>(source: AsyncIterable<T> | Promise<AsyncIterable<T>>, signal: AbortSignal) => Promise<AsyncIterable<T> | undefined>;
|
|
3
2
|
/**
|
|
4
3
|
* Presents a stream as exhausted once the signal aborts, so a consumer stops
|
|
@@ -14,5 +13,4 @@ export declare const openAbortableIterable: <T>(source: AsyncIterable<T> | Promi
|
|
|
14
13
|
* that is already parked would not settle that either.
|
|
15
14
|
*/
|
|
16
15
|
export declare const abortableIterable: <T>(source: AsyncIterable<T>, signal: AbortSignal) => AsyncIterable<T>;
|
|
17
|
-
//#endregion
|
|
18
16
|
//# sourceMappingURL=abortable-iterable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abortable-iterable.d.ts","
|
|
1
|
+
{"version":3,"file":"abortable-iterable.d.ts","sourceRoot":"","sources":["../../src/utils/abortable-iterable.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,GAAU,CAAC,EAC3C,QAAQ,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EACpD,QAAQ,WAAW,KAClB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAoBtC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,EACjC,QAAQ,aAAa,CAAC,CAAC,CAAC,EACxB,QAAQ,WAAW,KAClB,aAAa,CAAC,CAAC,CA4DhB,CAAC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index.js";
|
|
3
|
-
//#region src/utils/composite-context-provider.d.ts
|
|
1
|
+
import { type ModelContextProvider } from "../model-context/types.js";
|
|
4
2
|
export declare class CompositeContextProvider implements ModelContextProvider {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
private _providers;
|
|
4
|
+
private _providerUnsubscribes;
|
|
5
|
+
getModelContext(): import("../index.js").ModelContext;
|
|
6
|
+
registerModelContextProvider(provider: ModelContextProvider): () => void;
|
|
7
|
+
private _subscribers;
|
|
8
|
+
notifySubscribers(): void;
|
|
9
|
+
subscribe(callback: () => void): () => void;
|
|
12
10
|
}
|
|
13
|
-
//#endregion
|
|
14
11
|
//# sourceMappingURL=composite-context-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composite-context-provider.d.ts","
|
|
1
|
+
{"version":3,"file":"composite-context-provider.d.ts","sourceRoot":"","sources":["../../src/utils/composite-context-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EAE1B,kCAA+B;AAIhC,qBAAa,wBAAyB,YAAW,oBAAoB;IACnE,OAAO,CAAC,UAAU,CAA2C;IAC7D,OAAO,CAAC,qBAAqB,CAA8C;IAE3E,eAAe;IAIf,4BAA4B,CAAC,QAAQ,EAAE,oBAAoB;IAiD3D,OAAO,CAAC,YAAY,CAAyB;IAE7C,iBAAiB;IAIjB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI;CAM/B"}
|
package/dist/utils/data-url.d.ts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
//#region src/utils/data-url.d.ts
|
|
2
1
|
export declare const httpUrlPattern: RegExp;
|
|
3
2
|
export type FilePartSource = {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
kind: "url";
|
|
4
|
+
url: string;
|
|
6
5
|
} | {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
kind: "data";
|
|
7
|
+
data: string;
|
|
8
|
+
mimeType: string;
|
|
10
9
|
};
|
|
11
10
|
export declare function parseDataUrl(value: string): {
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
mimeType: string;
|
|
12
|
+
data: string;
|
|
14
13
|
} | null;
|
|
15
14
|
export declare const resolveFilePartSource: (part: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
data: string;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
sourceType?: string | undefined;
|
|
19
18
|
}) => FilePartSource;
|
|
20
19
|
/**
|
|
21
20
|
* Whether a payload is something `new URL()` accepts. Adapters that place a
|
|
@@ -30,5 +29,4 @@ export declare function isParsableUrl(value: string): boolean;
|
|
|
30
29
|
* bytes; this reads the declaration alone.
|
|
31
30
|
*/
|
|
32
31
|
export declare function dataUrlMediaType(value: string): string | undefined;
|
|
33
|
-
//#endregion
|
|
34
32
|
//# sourceMappingURL=data-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-url.d.ts","
|
|
1
|
+
{"version":3,"file":"data-url.d.ts","sourceRoot":"","sources":["../../src/utils/data-url.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAkB,CAAC;AAE9C,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,GACZ;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI3C;AAED,eAAO,MAAM,qBAAqB,GAAI,MAAM;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,KAAG,cAWH,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOpD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElE"}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { MessagePartStatus, ToolCallMessagePartStatus } from "../types/message.js";
|
|
2
|
-
//#region src/utils/getGroupStatus.d.ts
|
|
1
|
+
import type { MessagePartStatus, ToolCallMessagePartStatus } from "../types/message.js";
|
|
3
2
|
type PartWithStatus = {
|
|
4
|
-
|
|
3
|
+
readonly status: MessagePartStatus | ToolCallMessagePartStatus;
|
|
5
4
|
};
|
|
6
5
|
export declare const getGroupStatus: (parts: readonly (PartWithStatus | undefined)[]) => MessagePartStatus | ToolCallMessagePartStatus;
|
|
7
6
|
export declare const getGroupSummary: (parts: readonly (PartWithStatus | undefined)[], indices: readonly number[]) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
status: MessagePartStatus | {
|
|
8
|
+
readonly type: "requires-action";
|
|
9
|
+
readonly reason: "tool-calls" | "interrupt";
|
|
10
|
+
} | {
|
|
11
|
+
readonly type: "incomplete";
|
|
12
|
+
readonly reason: "tool-calls";
|
|
13
|
+
readonly error?: import("assistant-stream/utils").ReadonlyJSONValue;
|
|
14
|
+
};
|
|
15
|
+
counts: {
|
|
16
|
+
running: number;
|
|
17
|
+
complete: number;
|
|
18
|
+
incomplete: number;
|
|
19
|
+
requiresAction: number;
|
|
20
|
+
};
|
|
22
21
|
};
|
|
23
|
-
|
|
22
|
+
export {};
|
|
24
23
|
//# sourceMappingURL=getGroupStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGroupStatus.d.ts","
|
|
1
|
+
{"version":3,"file":"getGroupStatus.d.ts","sourceRoot":"","sources":["../../src/utils/getGroupStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,yBAAyB,EAC1B,4BAAyB;AAG1B,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,yBAAyB,CAAC;CAChE,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,OAAO,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,KAC7C,iBAAiB,GAAG,yBAMtB,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,OAAO,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,EAC9C,SAAS,SAAS,MAAM,EAAE;;;;;;;;;;;;;;;CA+B3B,CAAC"}
|
package/dist/utils/id.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
//#region src/utils/id.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* @deprecated This API is experimental and may change without notice.
|
|
4
3
|
*/
|
|
5
4
|
export declare const generateId: (size?: number) => string;
|
|
6
5
|
export declare const generateErrorMessageId: () => string;
|
|
7
6
|
export declare const isErrorMessageId: (id: string) => boolean;
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=id.d.ts.map
|
package/dist/utils/id.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.d.ts","
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/utils/id.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,UAAU,2BAGtB,CAAC;AAGF,eAAO,MAAM,sBAAsB,cAAwC,CAAC;AAC5E,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,YAA+B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utils/image-media-type.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The image media type a base64 payload's leading bytes identify, or
|
|
4
3
|
* `undefined` when they match no known signature or the input is not base64.
|
|
@@ -8,5 +7,4 @@
|
|
|
8
7
|
* throws: the input is whatever a caller put on the part.
|
|
9
8
|
*/
|
|
10
9
|
export declare function detectImageMediaType(base64: string): string | undefined;
|
|
11
|
-
//#endregion
|
|
12
10
|
//# sourceMappingURL=image-media-type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-media-type.d.ts","
|
|
1
|
+
{"version":3,"file":"image-media-type.d.ts","sourceRoot":"","sources":["../../src/utils/image-media-type.ts"],"names":[],"mappings":"AAoGA;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASvE"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
//#region src/utils/invoke-user-callback.d.ts
|
|
2
1
|
export declare function invokeUserCallback<TArgs extends readonly unknown[]>(tag: string, name: string, callback: ((...args: TArgs) => unknown) | undefined, ...args: TArgs): void | Promise<void>;
|
|
3
|
-
//#endregion
|
|
4
2
|
//# sourceMappingURL=invoke-user-callback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke-user-callback.d.ts","
|
|
1
|
+
{"version":3,"file":"invoke-user-callback.d.ts","sourceRoot":"","sources":["../../src/utils/invoke-user-callback.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,KAAK,SAAS,SAAS,OAAO,EAAE,EACjE,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,SAAS,EACnD,GAAG,IAAI,EAAE,KAAK,GACb,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-json-equal.d.ts","
|
|
1
|
+
{"version":3,"file":"is-json-equal.d.ts","sourceRoot":"","sources":["../../../src/utils/json/is-json-equal.ts"],"names":[],"mappings":"AA4CA,eAAO,MAAM,gBAAgB,GAAI,GAAG,OAAO,EAAE,GAAG,OAAO,KAAG,OAGzD,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ReadonlyJSONArray, ReadonlyJSONObject, ReadonlyJSONValue } from "assistant-stream/utils";
|
|
2
|
-
//#region src/utils/json/is-json.d.ts
|
|
1
|
+
import type { ReadonlyJSONArray, ReadonlyJSONObject, ReadonlyJSONValue } from "assistant-stream/utils";
|
|
3
2
|
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
4
3
|
export declare function isJSONValue(value: unknown, currentDepth?: number): value is ReadonlyJSONValue;
|
|
5
4
|
export declare function isJSONArray(value: unknown): value is ReadonlyJSONArray;
|
|
6
5
|
export declare function isJSONObject(value: unknown): value is ReadonlyJSONObject;
|
|
7
|
-
//#endregion
|
|
8
6
|
//# sourceMappingURL=is-json.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-json.d.ts","
|
|
1
|
+
{"version":3,"file":"is-json.d.ts","sourceRoot":"","sources":["../../../src/utils/json/is-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,EACd,YAAY,GAAE,MAAU,GACvB,KAAK,IAAI,iBAAiB,CA+B5B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAEtE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAOxE"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ReadonlyJSONObject } from "assistant-stream/utils";
|
|
2
|
-
//#region src/utils/json/stable-stringify-tool-args.d.ts
|
|
1
|
+
import type { ReadonlyJSONObject } from "assistant-stream/utils";
|
|
3
2
|
export declare const trackToolArgsKeyOrder: (keyOrderCache: Map<string, Map<string, string[]>> | undefined, cacheKey: string, args: ReadonlyJSONObject) => void;
|
|
4
3
|
export declare const stableStringifyToolArgs: (keyOrderCache: Map<string, Map<string, string[]>> | undefined, cacheKey: string, args: ReadonlyJSONObject) => string;
|
|
5
|
-
//#endregion
|
|
6
4
|
//# sourceMappingURL=stable-stringify-tool-args.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stable-stringify-tool-args.d.ts","
|
|
1
|
+
{"version":3,"file":"stable-stringify-tool-args.d.ts","sourceRoot":"","sources":["../../../src/utils/json/stable-stringify-tool-args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAgDjE,eAAO,MAAM,qBAAqB,GAChC,eAAe,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,EAC7D,UAAU,MAAM,EAChB,MAAM,kBAAkB,SAIzB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,EAC7D,UAAU,MAAM,EAChB,MAAM,kBAAkB,KACvB,MAQF,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { MessagePartStatus, ThreadAssistantMessagePart, ThreadMessage, ThreadUserMessagePart, ToolCallMessagePartStatus } from "../types/message.js";
|
|
2
|
-
//#region src/utils/normalizePartStatus.d.ts
|
|
1
|
+
import type { MessagePartStatus, ThreadAssistantMessagePart, ThreadMessage, ThreadUserMessagePart, ToolCallMessagePart, ToolCallMessagePartStatus } from "../types/message.js";
|
|
3
2
|
export declare const COMPLETE_STATUS: MessagePartStatus;
|
|
4
3
|
export declare const RUNNING_STATUS: MessagePartStatus;
|
|
5
4
|
export declare const normalizePartStatus: (part: ThreadUserMessagePart | ThreadAssistantMessagePart) => MessagePartStatus | undefined;
|
|
5
|
+
export declare const hasPendingToolAction: (part: Pick<ToolCallMessagePart, "approval" | "interrupt">) => boolean;
|
|
6
6
|
export declare const toMessagePartStatus: (message: ThreadMessage, partIndex: number, part: ThreadUserMessagePart | ThreadAssistantMessagePart) => ToolCallMessagePartStatus;
|
|
7
|
-
//#endregion
|
|
8
7
|
//# sourceMappingURL=normalizePartStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePartStatus.d.ts","
|
|
1
|
+
{"version":3,"file":"normalizePartStatus.d.ts","sourceRoot":"","sources":["../../src/utils/normalizePartStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAEjB,0BAA0B,EAC1B,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EAC1B,4BAAyB;AAE1B,eAAO,MAAM,eAAe,EAAE,iBAE5B,CAAC;AACH,eAAO,MAAM,cAAc,EAAE,iBAE3B,CAAC;AAkBH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,qBAAqB,GAAG,0BAA0B,KACvD,iBAAiB,GAAG,SAsBtB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,MAAM,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,WAAW,CAAC,KACxD,OAIwC,CAAC;AAE5C,eAAO,MAAM,mBAAmB,GAC9B,SAAS,aAAa,EACtB,WAAW,MAAM,EACjB,MAAM,qBAAqB,GAAG,0BAA0B,KACvD,yBAuBF,CAAC"}
|
|
@@ -33,10 +33,11 @@ const normalizePartStatus = (part) => {
|
|
|
33
33
|
const { reason } = status;
|
|
34
34
|
return INCOMPLETE_STATUSES[reason === "cancelled" || reason === "length" || reason === "content-filter" || reason === "other" || reason === "error" ? reason : "other"];
|
|
35
35
|
};
|
|
36
|
+
const hasPendingToolAction = (part) => part.interrupt != null || part.approval != null && part.approval.approved === void 0 && part.approval.resolution === void 0;
|
|
36
37
|
const toMessagePartStatus = (message, partIndex, part) => {
|
|
37
38
|
if (message.role !== "assistant") return COMPLETE_STATUS;
|
|
38
39
|
if (part.type === "tool-call") {
|
|
39
|
-
if (part.result === void 0) return message.status;
|
|
40
|
+
if (part.result === void 0 || part.isPreliminary || hasPendingToolAction(part)) return message.status;
|
|
40
41
|
else return COMPLETE_STATUS;
|
|
41
42
|
}
|
|
42
43
|
if (message.status.type === "running") {
|
|
@@ -48,6 +49,6 @@ const toMessagePartStatus = (message, partIndex, part) => {
|
|
|
48
49
|
return isLastPart ? message.status : COMPLETE_STATUS;
|
|
49
50
|
};
|
|
50
51
|
//#endregion
|
|
51
|
-
export { COMPLETE_STATUS, RUNNING_STATUS, normalizePartStatus, toMessagePartStatus };
|
|
52
|
+
export { COMPLETE_STATUS, RUNNING_STATUS, hasPendingToolAction, normalizePartStatus, toMessagePartStatus };
|
|
52
53
|
|
|
53
54
|
//# sourceMappingURL=normalizePartStatus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePartStatus.js","names":["MessagePartStatus","MessagePartStreamStatus","ThreadAssistantMessagePart","ThreadMessage","ThreadUserMessagePart","ToolCallMessagePartStatus","COMPLETE_STATUS","Object","freeze","type","RUNNING_STATUS","IncompleteMessagePartStatus","Extract","INCOMPLETE_STATUSES","Readonly","Record","cancelled","reason","length","other","error","normalizePartStatus","part","status","undefined","normalizedReason","toMessagePartStatus","message","partIndex","role","result","isLastPart","Math","max","content"],"sources":["../../src/utils/normalizePartStatus.ts"],"sourcesContent":["import type {\n MessagePartStatus,\n MessagePartStreamStatus,\n ThreadAssistantMessagePart,\n ThreadMessage,\n ThreadUserMessagePart,\n ToolCallMessagePartStatus,\n} from \"../types/message\";\n\nexport const COMPLETE_STATUS: MessagePartStatus = Object.freeze({\n type: \"complete\",\n});\nexport const RUNNING_STATUS: MessagePartStatus = Object.freeze({\n type: \"running\",\n});\ntype IncompleteMessagePartStatus = Extract<\n MessagePartStreamStatus,\n { readonly type: \"incomplete\" }\n>;\nconst INCOMPLETE_STATUSES: Readonly<\n Record<IncompleteMessagePartStatus[\"reason\"], IncompleteMessagePartStatus>\n> = Object.freeze({\n cancelled: Object.freeze({ type: \"incomplete\", reason: \"cancelled\" }),\n length: Object.freeze({ type: \"incomplete\", reason: \"length\" }),\n \"content-filter\": Object.freeze({\n type: \"incomplete\",\n reason: \"content-filter\",\n }),\n other: Object.freeze({ type: \"incomplete\", reason: \"other\" }),\n error: Object.freeze({ type: \"incomplete\", reason: \"error\" }),\n});\n\nexport const normalizePartStatus = (\n part: ThreadUserMessagePart | ThreadAssistantMessagePart,\n): MessagePartStatus | undefined => {\n const status = (part as { readonly status?: unknown }).status;\n if (!status || typeof status !== \"object\") return undefined;\n\n const { type } = status as { readonly type?: unknown };\n if (type === \"running\") return RUNNING_STATUS;\n if (type === \"complete\") return COMPLETE_STATUS;\n if (type !== \"incomplete\") return undefined;\n\n const { reason } = status as {\n readonly reason?: unknown;\n };\n const normalizedReason: IncompleteMessagePartStatus[\"reason\"] =\n reason === \"cancelled\" ||\n reason === \"length\" ||\n reason === \"content-filter\" ||\n reason === \"other\" ||\n reason === \"error\"\n ? reason\n : \"other\";\n\n return INCOMPLETE_STATUSES[normalizedReason];\n};\n\nexport const toMessagePartStatus = (\n message: ThreadMessage,\n partIndex: number,\n part: ThreadUserMessagePart | ThreadAssistantMessagePart,\n): ToolCallMessagePartStatus => {\n if (message.role !== \"assistant\") return COMPLETE_STATUS;\n\n if (part.type === \"tool-call\") {\n if (part.result === undefined) {\n return message.status;\n } else {\n return COMPLETE_STATUS;\n }\n }\n\n if (message.status.type === \"running\") {\n const status = normalizePartStatus(part);\n if (status) return status;\n }\n\n const isLastPart = partIndex === Math.max(0, message.content.length - 1);\n if (message.status.type === \"requires-action\") return COMPLETE_STATUS;\n return isLastPart ? (message.status as MessagePartStatus) : COMPLETE_STATUS;\n};\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"normalizePartStatus.js","names":["MessagePartStatus","MessagePartStreamStatus","ThreadAssistantMessagePart","ThreadMessage","ThreadUserMessagePart","ToolCallMessagePart","ToolCallMessagePartStatus","COMPLETE_STATUS","Object","freeze","type","RUNNING_STATUS","IncompleteMessagePartStatus","Extract","INCOMPLETE_STATUSES","Readonly","Record","cancelled","reason","length","other","error","normalizePartStatus","part","status","undefined","normalizedReason","hasPendingToolAction","Pick","interrupt","approval","approved","resolution","toMessagePartStatus","message","partIndex","role","result","isPreliminary","isLastPart","Math","max","content"],"sources":["../../src/utils/normalizePartStatus.ts"],"sourcesContent":["import type {\n MessagePartStatus,\n MessagePartStreamStatus,\n ThreadAssistantMessagePart,\n ThreadMessage,\n ThreadUserMessagePart,\n ToolCallMessagePart,\n ToolCallMessagePartStatus,\n} from \"../types/message\";\n\nexport const COMPLETE_STATUS: MessagePartStatus = Object.freeze({\n type: \"complete\",\n});\nexport const RUNNING_STATUS: MessagePartStatus = Object.freeze({\n type: \"running\",\n});\ntype IncompleteMessagePartStatus = Extract<\n MessagePartStreamStatus,\n { readonly type: \"incomplete\" }\n>;\nconst INCOMPLETE_STATUSES: Readonly<\n Record<IncompleteMessagePartStatus[\"reason\"], IncompleteMessagePartStatus>\n> = Object.freeze({\n cancelled: Object.freeze({ type: \"incomplete\", reason: \"cancelled\" }),\n length: Object.freeze({ type: \"incomplete\", reason: \"length\" }),\n \"content-filter\": Object.freeze({\n type: \"incomplete\",\n reason: \"content-filter\",\n }),\n other: Object.freeze({ type: \"incomplete\", reason: \"other\" }),\n error: Object.freeze({ type: \"incomplete\", reason: \"error\" }),\n});\n\nexport const normalizePartStatus = (\n part: ThreadUserMessagePart | ThreadAssistantMessagePart,\n): MessagePartStatus | undefined => {\n const status = (part as { readonly status?: unknown }).status;\n if (!status || typeof status !== \"object\") return undefined;\n\n const { type } = status as { readonly type?: unknown };\n if (type === \"running\") return RUNNING_STATUS;\n if (type === \"complete\") return COMPLETE_STATUS;\n if (type !== \"incomplete\") return undefined;\n\n const { reason } = status as {\n readonly reason?: unknown;\n };\n const normalizedReason: IncompleteMessagePartStatus[\"reason\"] =\n reason === \"cancelled\" ||\n reason === \"length\" ||\n reason === \"content-filter\" ||\n reason === \"other\" ||\n reason === \"error\"\n ? reason\n : \"other\";\n\n return INCOMPLETE_STATUSES[normalizedReason];\n};\n\nexport const hasPendingToolAction = (\n part: Pick<ToolCallMessagePart, \"approval\" | \"interrupt\">,\n): boolean =>\n part.interrupt != null ||\n (part.approval != null &&\n part.approval.approved === undefined &&\n part.approval.resolution === undefined);\n\nexport const toMessagePartStatus = (\n message: ThreadMessage,\n partIndex: number,\n part: ThreadUserMessagePart | ThreadAssistantMessagePart,\n): ToolCallMessagePartStatus => {\n if (message.role !== \"assistant\") return COMPLETE_STATUS;\n\n if (part.type === \"tool-call\") {\n if (\n part.result === undefined ||\n part.isPreliminary ||\n hasPendingToolAction(part)\n ) {\n return message.status;\n } else {\n return COMPLETE_STATUS;\n }\n }\n\n if (message.status.type === \"running\") {\n const status = normalizePartStatus(part);\n if (status) return status;\n }\n\n const isLastPart = partIndex === Math.max(0, message.content.length - 1);\n if (message.status.type === \"requires-action\") return COMPLETE_STATUS;\n return isLastPart ? (message.status as MessagePartStatus) : COMPLETE_STATUS;\n};\n"],"mappings":";AAUA,MAAaO,kBAAqCC,OAAOC,OAAO,EAC9DC,MAAM,WACR,CAAC;AACD,MAAaC,iBAAoCH,OAAOC,OAAO,EAC7DC,MAAM,UACR,CAAC;AAKD,MAAMI,sBAEFN,OAAOC,OAAO;CAChBQ,WAAWT,OAAOC,OAAO;EAAEC,MAAM;EAAcQ,QAAQ;CAAY,CAAC;CACpEC,QAAQX,OAAOC,OAAO;EAAEC,MAAM;EAAcQ,QAAQ;CAAS,CAAC;CAC9D,kBAAkBV,OAAOC,OAAO;EAC9BC,MAAM;EACNQ,QAAQ;CACV,CAAC;CACDE,OAAOZ,OAAOC,OAAO;EAAEC,MAAM;EAAcQ,QAAQ;CAAQ,CAAC;CAC5DG,OAAOb,OAAOC,OAAO;EAAEC,MAAM;EAAcQ,QAAQ;CAAQ,CAAC;AAC9D,CAAC;AAED,MAAaI,uBACXC,SACkC;CAClC,MAAMC,SAAUD,KAAuCC;CACvD,IAAI,CAACA,UAAU,OAAOA,WAAW,UAAU,OAAOC,KAAAA;CAElD,MAAM,EAAEf,SAASc;CACjB,IAAId,SAAS,WAAW,OAAOC;CAC/B,IAAID,SAAS,YAAY,OAAOH;CAChC,IAAIG,SAAS,cAAc,OAAOe,KAAAA;CAElC,MAAM,EAAEP,WAAWM;CAYnB,OAAOV,oBARLI,WAAW,eACXA,WAAW,YACXA,WAAW,oBACXA,WAAW,WACXA,WAAW,UACPA,SACA;AAGR;AAEA,MAAaS,wBACXJ,SAEAA,KAAKM,aAAa,QACjBN,KAAKO,YAAY,QAChBP,KAAKO,SAASC,aAAaN,KAAAA,KAC3BF,KAAKO,SAASE,eAAeP,KAAAA;AAEjC,MAAaQ,uBACXC,SACAC,WACAZ,SAC8B;CAC9B,IAAIW,QAAQE,SAAS,aAAa,OAAO7B;CAEzC,IAAIgB,KAAKb,SAAS,aAAa;EAC7B,IACEa,KAAKc,WAAWZ,KAAAA,KAChBF,KAAKe,iBACLX,qBAAqBJ,IAAI,GAEzB,OAAOW,QAAQV;OAEf,OAAOjB;CAEX;CAEA,IAAI2B,QAAQV,OAAOd,SAAS,WAAW;EACrC,MAAMc,SAASF,oBAAoBC,IAAI;EACvC,IAAIC,QAAQ,OAAOA;CACrB;CAEA,MAAMe,aAAaJ,cAAcK,KAAKC,IAAI,GAAGP,QAAQQ,QAAQvB,SAAS,CAAC;CACvE,IAAIe,QAAQV,OAAOd,SAAS,mBAAmB,OAAOH;CACtD,OAAOgC,aAAcL,QAAQV,SAA+BjB;AAC9D"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
//#region src/utils/notify-event-listeners.d.ts
|
|
2
1
|
type EventListener<T> = (payload: T) => unknown;
|
|
3
2
|
export declare const notifyEventListeners: <T>(listeners: Iterable<EventListener<T>>, payloadOrFactory: T | (() => T), errorContext: string) => void;
|
|
4
|
-
|
|
3
|
+
export {};
|
|
5
4
|
//# sourceMappingURL=notify-event-listeners.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify-event-listeners.d.ts","
|
|
1
|
+
{"version":3,"file":"notify-event-listeners.d.ts","sourceRoot":"","sources":["../../src/utils/notify-event-listeners.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC;AAGhD,eAAO,MAAM,oBAAoB,GAAI,CAAC,EACpC,WAAW,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EACrC,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAC/B,cAAc,MAAM,SA4BrB,CAAC"}
|
package/dist/utils/record.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utils/record.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Builds a dictionary with no prototype from the own entries of its arguments.
|
|
4
3
|
* Bracket assignment on a plain object routes a `__proto__` key through the
|
|
@@ -6,5 +5,4 @@
|
|
|
6
5
|
* assigned into by a key the app does not control is built this way.
|
|
7
6
|
*/
|
|
8
7
|
export declare const nullProtoRecord: <T>(base?: Readonly<Record<string, T>>, ...rest: readonly (Readonly<Record<string, NoInfer<T>>> | undefined)[]) => Record<string, T>;
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=record.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record.d.ts","
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/utils/record.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,EAC/B,OAAO,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAClC,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,KACrE,MAAM,CAAC,MAAM,EAAE,CAAC,CACqD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"silent-runtime-action.d.ts","
|
|
1
|
+
{"version":3,"file":"silent-runtime-action.d.ts","sourceRoot":"","sources":["../../src/utils/silent-runtime-action.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,eAEjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,OACwB,CAAC"}
|
package/dist/utils/text.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { AppendMessage, ThreadMessage } from "../types/message.js";
|
|
2
|
-
//#region src/utils/text.d.ts
|
|
1
|
+
import type { AppendMessage, ThreadMessage } from "../types/message.js";
|
|
3
2
|
export declare const getThreadMessageText: (message: ThreadMessage | AppendMessage) => string;
|
|
4
|
-
//#endregion
|
|
5
3
|
//# sourceMappingURL=text.d.ts.map
|
package/dist/utils/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,4BAAyB;AAGrE,eAAO,MAAM,oBAAoB,GAC/B,SAAS,aAAa,GAAG,aAAa,WAOvC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utils/wire-media.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The media type to declare for an `ImageMessagePart`, which carries none of
|
|
4
3
|
* its own: an attachment's content type, then the payload's data URL
|
|
@@ -30,5 +29,4 @@ export declare function resolveFileMediaType(data: string, mimeType?: string | u
|
|
|
30
29
|
* the bytes it carries anyway.
|
|
31
30
|
*/
|
|
32
31
|
export declare function toMediaWireUrl(payload: string, mediaType: string): string;
|
|
33
|
-
//#endregion
|
|
34
32
|
//# sourceMappingURL=wire-media.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire-media.d.ts","
|
|
1
|
+
{"version":3,"file":"wire-media.d.ts","sourceRoot":"","sources":["../../src/utils/wire-media.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAC/B,MAAM,CAqBR;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,CAER;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CASzE"}
|