@agent-native/toolkit 0.0.0-beta-20260819143124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +151 -0
- package/agent-native.eject.json +588 -0
- package/dist/app-shell/header-actions.d.ts +18 -0
- package/dist/app-shell/header-actions.d.ts.map +1 -0
- package/dist/app-shell/header-actions.js +52 -0
- package/dist/app-shell/header-actions.js.map +1 -0
- package/dist/app-shell/index.d.ts +3 -0
- package/dist/app-shell/index.d.ts.map +1 -0
- package/dist/app-shell/index.js +3 -0
- package/dist/app-shell/index.js.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.d.ts +14 -0
- package/dist/app-shell/sidebar-footer-actions.d.ts.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.js +10 -0
- package/dist/app-shell/sidebar-footer-actions.js.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.spec.d.ts +2 -0
- package/dist/app-shell/sidebar-footer-actions.spec.d.ts.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.spec.js +43 -0
- package/dist/app-shell/sidebar-footer-actions.spec.js.map +1 -0
- package/dist/canvas-annotations/CanvasCommentPins.d.ts +68 -0
- package/dist/canvas-annotations/CanvasCommentPins.d.ts.map +1 -0
- package/dist/canvas-annotations/CanvasCommentPins.js +513 -0
- package/dist/canvas-annotations/CanvasCommentPins.js.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.d.ts +108 -0
- package/dist/canvas-annotations/DrawOverlay.d.ts.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.js +746 -0
- package/dist/canvas-annotations/DrawOverlay.js.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.spec.d.ts +2 -0
- package/dist/canvas-annotations/DrawOverlay.spec.d.ts.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.spec.js +111 -0
- package/dist/canvas-annotations/DrawOverlay.spec.js.map +1 -0
- package/dist/canvas-annotations/index.d.ts +4 -0
- package/dist/canvas-annotations/index.d.ts.map +1 -0
- package/dist/canvas-annotations/index.js +3 -0
- package/dist/canvas-annotations/index.js.map +1 -0
- package/dist/canvas-annotations/types.d.ts +8 -0
- package/dist/canvas-annotations/types.d.ts.map +1 -0
- package/dist/canvas-annotations/types.js +2 -0
- package/dist/canvas-annotations/types.js.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.d.ts +334 -0
- package/dist/canvas-interactions/canvas-interactions.d.ts.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.js +486 -0
- package/dist/canvas-interactions/canvas-interactions.js.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.spec.d.ts +2 -0
- package/dist/canvas-interactions/canvas-interactions.spec.d.ts.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.spec.js +593 -0
- package/dist/canvas-interactions/canvas-interactions.spec.js.map +1 -0
- package/dist/canvas-interactions/index.d.ts +2 -0
- package/dist/canvas-interactions/index.d.ts.map +1 -0
- package/dist/canvas-interactions/index.js +2 -0
- package/dist/canvas-interactions/index.js.map +1 -0
- package/dist/chat-history/ChatHistoryList.d.ts +103 -0
- package/dist/chat-history/ChatHistoryList.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryList.js +102 -0
- package/dist/chat-history/ChatHistoryList.js.map +1 -0
- package/dist/chat-history/ChatHistoryList.spec.d.ts +2 -0
- package/dist/chat-history/ChatHistoryList.spec.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryList.spec.js +293 -0
- package/dist/chat-history/ChatHistoryList.spec.js.map +1 -0
- package/dist/chat-history/ChatHistoryRail.d.ts +33 -0
- package/dist/chat-history/ChatHistoryRail.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryRail.js +35 -0
- package/dist/chat-history/ChatHistoryRail.js.map +1 -0
- package/dist/chat-history/ChatHistoryRail.spec.d.ts +2 -0
- package/dist/chat-history/ChatHistoryRail.spec.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryRail.spec.js +157 -0
- package/dist/chat-history/ChatHistoryRail.spec.js.map +1 -0
- package/dist/chat-history/index.d.ts +4 -0
- package/dist/chat-history/index.d.ts.map +1 -0
- package/dist/chat-history/index.js +4 -0
- package/dist/chat-history/index.js.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.d.ts +26 -0
- package/dist/chat-history/useChatHistoryRailController.d.ts.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.js +36 -0
- package/dist/chat-history/useChatHistoryRailController.js.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.spec.d.ts +2 -0
- package/dist/chat-history/useChatHistoryRailController.spec.d.ts.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.spec.js +101 -0
- package/dist/chat-history/useChatHistoryRailController.spec.js.map +1 -0
- package/dist/chat-history.css +469 -0
- package/dist/collab-ui/AgentPresenceChip.d.ts +12 -0
- package/dist/collab-ui/AgentPresenceChip.d.ts.map +1 -0
- package/dist/collab-ui/AgentPresenceChip.js +42 -0
- package/dist/collab-ui/AgentPresenceChip.js.map +1 -0
- package/dist/collab-ui/LiveCursorOverlay.d.ts +46 -0
- package/dist/collab-ui/LiveCursorOverlay.d.ts.map +1 -0
- package/dist/collab-ui/LiveCursorOverlay.js +125 -0
- package/dist/collab-ui/LiveCursorOverlay.js.map +1 -0
- package/dist/collab-ui/PresenceBar.d.ts +30 -0
- package/dist/collab-ui/PresenceBar.d.ts.map +1 -0
- package/dist/collab-ui/PresenceBar.js +172 -0
- package/dist/collab-ui/PresenceBar.js.map +1 -0
- package/dist/collab-ui/PresenceBar.spec.d.ts +2 -0
- package/dist/collab-ui/PresenceBar.spec.d.ts.map +1 -0
- package/dist/collab-ui/PresenceBar.spec.js +30 -0
- package/dist/collab-ui/PresenceBar.spec.js.map +1 -0
- package/dist/collab-ui/RecentEditHighlights.d.ts +46 -0
- package/dist/collab-ui/RecentEditHighlights.d.ts.map +1 -0
- package/dist/collab-ui/RecentEditHighlights.js +154 -0
- package/dist/collab-ui/RecentEditHighlights.js.map +1 -0
- package/dist/collab-ui/RemoteSelectionRings.d.ts +53 -0
- package/dist/collab-ui/RemoteSelectionRings.d.ts.map +1 -0
- package/dist/collab-ui/RemoteSelectionRings.js +130 -0
- package/dist/collab-ui/RemoteSelectionRings.js.map +1 -0
- package/dist/collab-ui/agent-identity.d.ts +9 -0
- package/dist/collab-ui/agent-identity.d.ts.map +1 -0
- package/dist/collab-ui/agent-identity.js +9 -0
- package/dist/collab-ui/agent-identity.js.map +1 -0
- package/dist/collab-ui/index.d.ts +9 -0
- package/dist/collab-ui/index.d.ts.map +1 -0
- package/dist/collab-ui/index.js +9 -0
- package/dist/collab-ui/index.js.map +1 -0
- package/dist/collab-ui/lead-client.d.ts +3 -0
- package/dist/collab-ui/lead-client.d.ts.map +1 -0
- package/dist/collab-ui/lead-client.js +29 -0
- package/dist/collab-ui/lead-client.js.map +1 -0
- package/dist/collab-ui/types.d.ts +48 -0
- package/dist/collab-ui/types.d.ts.map +1 -0
- package/dist/collab-ui/types.js +52 -0
- package/dist/collab-ui/types.js.map +1 -0
- package/dist/collab-ui/types.spec.d.ts +2 -0
- package/dist/collab-ui/types.spec.d.ts.map +1 -0
- package/dist/collab-ui/types.spec.js +15 -0
- package/dist/collab-ui/types.spec.js.map +1 -0
- package/dist/composer/AgentComposerFrame.d.ts +19 -0
- package/dist/composer/AgentComposerFrame.d.ts.map +1 -0
- package/dist/composer/AgentComposerFrame.js +17 -0
- package/dist/composer/AgentComposerFrame.js.map +1 -0
- package/dist/composer/ComposerPlusMenu.d.ts +30 -0
- package/dist/composer/ComposerPlusMenu.d.ts.map +1 -0
- package/dist/composer/ComposerPlusMenu.js +635 -0
- package/dist/composer/ComposerPlusMenu.js.map +1 -0
- package/dist/composer/ComposerPlusMenu.spec.d.ts +2 -0
- package/dist/composer/ComposerPlusMenu.spec.d.ts.map +1 -0
- package/dist/composer/ComposerPlusMenu.spec.js +12 -0
- package/dist/composer/ComposerPlusMenu.spec.js.map +1 -0
- package/dist/composer/MentionPopover.d.ts +29 -0
- package/dist/composer/MentionPopover.d.ts.map +1 -0
- package/dist/composer/MentionPopover.js +221 -0
- package/dist/composer/MentionPopover.js.map +1 -0
- package/dist/composer/PastedTextChip.d.ts +9 -0
- package/dist/composer/PastedTextChip.d.ts.map +1 -0
- package/dist/composer/PastedTextChip.js +71 -0
- package/dist/composer/PastedTextChip.js.map +1 -0
- package/dist/composer/PastedTextChip.spec.d.ts +2 -0
- package/dist/composer/PastedTextChip.spec.d.ts.map +1 -0
- package/dist/composer/PastedTextChip.spec.js +42 -0
- package/dist/composer/PastedTextChip.spec.js.map +1 -0
- package/dist/composer/PromptComposer.d.ts +151 -0
- package/dist/composer/PromptComposer.d.ts.map +1 -0
- package/dist/composer/PromptComposer.js +322 -0
- package/dist/composer/PromptComposer.js.map +1 -0
- package/dist/composer/PromptComposer.spec.d.ts +2 -0
- package/dist/composer/PromptComposer.spec.d.ts.map +1 -0
- package/dist/composer/PromptComposer.spec.js +87 -0
- package/dist/composer/PromptComposer.spec.js.map +1 -0
- package/dist/composer/RealtimeVoiceMode.d.ts +108 -0
- package/dist/composer/RealtimeVoiceMode.d.ts.map +1 -0
- package/dist/composer/RealtimeVoiceMode.js +312 -0
- package/dist/composer/RealtimeVoiceMode.js.map +1 -0
- package/dist/composer/RealtimeVoiceMode.spec.d.ts +2 -0
- package/dist/composer/RealtimeVoiceMode.spec.d.ts.map +1 -0
- package/dist/composer/RealtimeVoiceMode.spec.js +540 -0
- package/dist/composer/RealtimeVoiceMode.spec.js.map +1 -0
- package/dist/composer/TiptapComposer.d.ts +288 -0
- package/dist/composer/TiptapComposer.d.ts.map +1 -0
- package/dist/composer/TiptapComposer.js +2233 -0
- package/dist/composer/TiptapComposer.js.map +1 -0
- package/dist/composer/TiptapComposer.spec.d.ts +2 -0
- package/dist/composer/TiptapComposer.spec.d.ts.map +1 -0
- package/dist/composer/TiptapComposer.spec.js +415 -0
- package/dist/composer/TiptapComposer.spec.js.map +1 -0
- package/dist/composer/VoiceButton.d.ts +27 -0
- package/dist/composer/VoiceButton.d.ts.map +1 -0
- package/dist/composer/VoiceButton.js +151 -0
- package/dist/composer/VoiceButton.js.map +1 -0
- package/dist/composer/VoiceButton.spec.d.ts +2 -0
- package/dist/composer/VoiceButton.spec.d.ts.map +1 -0
- package/dist/composer/VoiceButton.spec.js +27 -0
- package/dist/composer/VoiceButton.spec.js.map +1 -0
- package/dist/composer/asset-picker-url.d.ts +16 -0
- package/dist/composer/asset-picker-url.d.ts.map +1 -0
- package/dist/composer/asset-picker-url.js +64 -0
- package/dist/composer/asset-picker-url.js.map +1 -0
- package/dist/composer/asset-picker-url.spec.d.ts +2 -0
- package/dist/composer/asset-picker-url.spec.d.ts.map +1 -0
- package/dist/composer/asset-picker-url.spec.js +23 -0
- package/dist/composer/asset-picker-url.spec.js.map +1 -0
- package/dist/composer/attachment-accept.d.ts +9 -0
- package/dist/composer/attachment-accept.d.ts.map +1 -0
- package/dist/composer/attachment-accept.js +69 -0
- package/dist/composer/attachment-accept.js.map +1 -0
- package/dist/composer/attachment-accept.spec.d.ts +2 -0
- package/dist/composer/attachment-accept.spec.d.ts.map +1 -0
- package/dist/composer/attachment-accept.spec.js +24 -0
- package/dist/composer/attachment-accept.spec.js.map +1 -0
- package/dist/composer/draft-key.d.ts +2 -0
- package/dist/composer/draft-key.d.ts.map +1 -0
- package/dist/composer/draft-key.js +8 -0
- package/dist/composer/draft-key.js.map +1 -0
- package/dist/composer/draft-key.spec.d.ts +2 -0
- package/dist/composer/draft-key.spec.d.ts.map +1 -0
- package/dist/composer/draft-key.spec.js +13 -0
- package/dist/composer/draft-key.spec.js.map +1 -0
- package/dist/composer/extensions/FileReference.d.ts +3 -0
- package/dist/composer/extensions/FileReference.d.ts.map +1 -0
- package/dist/composer/extensions/FileReference.js +36 -0
- package/dist/composer/extensions/FileReference.js.map +1 -0
- package/dist/composer/extensions/MentionReference.d.ts +3 -0
- package/dist/composer/extensions/MentionReference.d.ts.map +1 -0
- package/dist/composer/extensions/MentionReference.js +66 -0
- package/dist/composer/extensions/MentionReference.js.map +1 -0
- package/dist/composer/extensions/SkillReference.d.ts +3 -0
- package/dist/composer/extensions/SkillReference.d.ts.map +1 -0
- package/dist/composer/extensions/SkillReference.js +40 -0
- package/dist/composer/extensions/SkillReference.js.map +1 -0
- package/dist/composer/index.d.ts +16 -0
- package/dist/composer/index.d.ts.map +1 -0
- package/dist/composer/index.js +14 -0
- package/dist/composer/index.js.map +1 -0
- package/dist/composer/model-selection.d.ts +12 -0
- package/dist/composer/model-selection.d.ts.map +1 -0
- package/dist/composer/model-selection.js +31 -0
- package/dist/composer/model-selection.js.map +1 -0
- package/dist/composer/model-selection.spec.d.ts +2 -0
- package/dist/composer/model-selection.spec.d.ts.map +1 -0
- package/dist/composer/model-selection.spec.js +38 -0
- package/dist/composer/model-selection.spec.js.map +1 -0
- package/dist/composer/pasted-text.d.ts +31 -0
- package/dist/composer/pasted-text.d.ts.map +1 -0
- package/dist/composer/pasted-text.js +130 -0
- package/dist/composer/pasted-text.js.map +1 -0
- package/dist/composer/pasted-text.spec.d.ts +2 -0
- package/dist/composer/pasted-text.spec.d.ts.map +1 -0
- package/dist/composer/pasted-text.spec.js +107 -0
- package/dist/composer/pasted-text.spec.js.map +1 -0
- package/dist/composer/prompt-attachments.d.ts +18 -0
- package/dist/composer/prompt-attachments.d.ts.map +1 -0
- package/dist/composer/prompt-attachments.js +65 -0
- package/dist/composer/prompt-attachments.js.map +1 -0
- package/dist/composer/prompt-attachments.spec.d.ts +2 -0
- package/dist/composer/prompt-attachments.spec.d.ts.map +1 -0
- package/dist/composer/prompt-attachments.spec.js +63 -0
- package/dist/composer/prompt-attachments.spec.js.map +1 -0
- package/dist/composer/realtime-voice-audio-level.d.ts +14 -0
- package/dist/composer/realtime-voice-audio-level.d.ts.map +1 -0
- package/dist/composer/realtime-voice-audio-level.js +48 -0
- package/dist/composer/realtime-voice-audio-level.js.map +1 -0
- package/dist/composer/realtime-voice-audio-level.spec.d.ts +2 -0
- package/dist/composer/realtime-voice-audio-level.spec.d.ts.map +1 -0
- package/dist/composer/realtime-voice-audio-level.spec.js +32 -0
- package/dist/composer/realtime-voice-audio-level.spec.js.map +1 -0
- package/dist/composer/realtime-voice-transcript.d.ts +26 -0
- package/dist/composer/realtime-voice-transcript.d.ts.map +1 -0
- package/dist/composer/realtime-voice-transcript.js +103 -0
- package/dist/composer/realtime-voice-transcript.js.map +1 -0
- package/dist/composer/realtime-voice-transcript.spec.d.ts +2 -0
- package/dist/composer/realtime-voice-transcript.spec.d.ts.map +1 -0
- package/dist/composer/realtime-voice-transcript.spec.js +76 -0
- package/dist/composer/realtime-voice-transcript.spec.js.map +1 -0
- package/dist/composer/runtime-adapters.d.ts +169 -0
- package/dist/composer/runtime-adapters.d.ts.map +1 -0
- package/dist/composer/runtime-adapters.js +141 -0
- package/dist/composer/runtime-adapters.js.map +1 -0
- package/dist/composer/runtime-adapters.spec.d.ts +2 -0
- package/dist/composer/runtime-adapters.spec.d.ts.map +1 -0
- package/dist/composer/runtime-adapters.spec.js +69 -0
- package/dist/composer/runtime-adapters.spec.js.map +1 -0
- package/dist/composer/types.d.ts +60 -0
- package/dist/composer/types.d.ts.map +1 -0
- package/dist/composer/types.js +2 -0
- package/dist/composer/types.js.map +1 -0
- package/dist/composer/use-file-search.d.ts +6 -0
- package/dist/composer/use-file-search.d.ts.map +1 -0
- package/dist/composer/use-file-search.js +53 -0
- package/dist/composer/use-file-search.js.map +1 -0
- package/dist/composer/use-mention-search.d.ts +6 -0
- package/dist/composer/use-mention-search.d.ts.map +1 -0
- package/dist/composer/use-mention-search.js +75 -0
- package/dist/composer/use-mention-search.js.map +1 -0
- package/dist/composer/use-skills.d.ts +7 -0
- package/dist/composer/use-skills.d.ts.map +1 -0
- package/dist/composer/use-skills.js +40 -0
- package/dist/composer/use-skills.js.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.d.ts +189 -0
- package/dist/composer/useRealtimeVoiceMode.d.ts.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.js +1899 -0
- package/dist/composer/useRealtimeVoiceMode.js.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.spec.d.ts +2 -0
- package/dist/composer/useRealtimeVoiceMode.spec.d.ts.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.spec.js +716 -0
- package/dist/composer/useRealtimeVoiceMode.spec.js.map +1 -0
- package/dist/composer/useVoiceDictation.browser.spec.d.ts +2 -0
- package/dist/composer/useVoiceDictation.browser.spec.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.browser.spec.js +220 -0
- package/dist/composer/useVoiceDictation.browser.spec.js.map +1 -0
- package/dist/composer/useVoiceDictation.d.ts +58 -0
- package/dist/composer/useVoiceDictation.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.js +1058 -0
- package/dist/composer/useVoiceDictation.js.map +1 -0
- package/dist/composer/useVoiceDictation.spec.d.ts +2 -0
- package/dist/composer/useVoiceDictation.spec.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.spec.js +32 -0
- package/dist/composer/useVoiceDictation.spec.js.map +1 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.d.ts +7 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.d.ts.map +1 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.js +84 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.js.map +1 -0
- package/dist/conformance/conformance.spec.d.ts +2 -0
- package/dist/conformance/conformance.spec.d.ts.map +1 -0
- package/dist/conformance/conformance.spec.js +87 -0
- package/dist/conformance/conformance.spec.js.map +1 -0
- package/dist/conformance/index.d.ts +4 -0
- package/dist/conformance/index.d.ts.map +1 -0
- package/dist/conformance/index.js +4 -0
- package/dist/conformance/index.js.map +1 -0
- package/dist/conformance/runner.d.ts +12 -0
- package/dist/conformance/runner.d.ts.map +1 -0
- package/dist/conformance/runner.js +515 -0
- package/dist/conformance/runner.js.map +1 -0
- package/dist/conformance/types.d.ts +26 -0
- package/dist/conformance/types.d.ts.map +1 -0
- package/dist/conformance/types.js +13 -0
- package/dist/conformance/types.js.map +1 -0
- package/dist/conformance/version.d.ts +6 -0
- package/dist/conformance/version.d.ts.map +1 -0
- package/dist/conformance/version.js +14 -0
- package/dist/conformance/version.js.map +1 -0
- package/dist/context-ui/ContextMeter.d.ts +11 -0
- package/dist/context-ui/ContextMeter.d.ts.map +1 -0
- package/dist/context-ui/ContextMeter.js +40 -0
- package/dist/context-ui/ContextMeter.js.map +1 -0
- package/dist/context-ui/ContextMeter.spec.d.ts +2 -0
- package/dist/context-ui/ContextMeter.spec.d.ts.map +1 -0
- package/dist/context-ui/ContextMeter.spec.js +52 -0
- package/dist/context-ui/ContextMeter.spec.js.map +1 -0
- package/dist/context-ui/ContextSegmentRow.d.ts +16 -0
- package/dist/context-ui/ContextSegmentRow.d.ts.map +1 -0
- package/dist/context-ui/ContextSegmentRow.js +92 -0
- package/dist/context-ui/ContextSegmentRow.js.map +1 -0
- package/dist/context-ui/ContextTreemap.d.ts +8 -0
- package/dist/context-ui/ContextTreemap.d.ts.map +1 -0
- package/dist/context-ui/ContextTreemap.js +58 -0
- package/dist/context-ui/ContextTreemap.js.map +1 -0
- package/dist/context-ui/ContextXRayPanel.d.ts +14 -0
- package/dist/context-ui/ContextXRayPanel.d.ts.map +1 -0
- package/dist/context-ui/ContextXRayPanel.js +209 -0
- package/dist/context-ui/ContextXRayPanel.js.map +1 -0
- package/dist/context-ui/format.d.ts +6 -0
- package/dist/context-ui/format.d.ts.map +1 -0
- package/dist/context-ui/format.js +58 -0
- package/dist/context-ui/format.js.map +1 -0
- package/dist/context-ui/index.d.ts +7 -0
- package/dist/context-ui/index.d.ts.map +1 -0
- package/dist/context-ui/index.js +6 -0
- package/dist/context-ui/index.js.map +1 -0
- package/dist/context-ui/types.d.ts +41 -0
- package/dist/context-ui/types.d.ts.map +1 -0
- package/dist/context-ui/types.js +8 -0
- package/dist/context-ui/types.js.map +1 -0
- package/dist/dashboard/DataTable.d.ts +20 -0
- package/dist/dashboard/DataTable.d.ts.map +1 -0
- package/dist/dashboard/DataTable.js +87 -0
- package/dist/dashboard/DataTable.js.map +1 -0
- package/dist/dashboard/DateRangePicker.d.ts +15 -0
- package/dist/dashboard/DateRangePicker.d.ts.map +1 -0
- package/dist/dashboard/DateRangePicker.js +15 -0
- package/dist/dashboard/DateRangePicker.js.map +1 -0
- package/dist/dashboard/GenericChartPanel.d.ts +57 -0
- package/dist/dashboard/GenericChartPanel.d.ts.map +1 -0
- package/dist/dashboard/GenericChartPanel.js +119 -0
- package/dist/dashboard/GenericChartPanel.js.map +1 -0
- package/dist/dashboard/GenericChartPanel.spec.d.ts +2 -0
- package/dist/dashboard/GenericChartPanel.spec.d.ts.map +1 -0
- package/dist/dashboard/GenericChartPanel.spec.js +41 -0
- package/dist/dashboard/GenericChartPanel.spec.js.map +1 -0
- package/dist/dashboard/MetricCard.d.ts +14 -0
- package/dist/dashboard/MetricCard.d.ts.map +1 -0
- package/dist/dashboard/MetricCard.js +10 -0
- package/dist/dashboard/MetricCard.js.map +1 -0
- package/dist/dashboard/StatsCard.d.ts +16 -0
- package/dist/dashboard/StatsCard.d.ts.map +1 -0
- package/dist/dashboard/StatsCard.js +8 -0
- package/dist/dashboard/StatsCard.js.map +1 -0
- package/dist/dashboard/dashboard-layout.d.ts +49 -0
- package/dist/dashboard/dashboard-layout.d.ts.map +1 -0
- package/dist/dashboard/dashboard-layout.js +231 -0
- package/dist/dashboard/dashboard-layout.js.map +1 -0
- package/dist/dashboard/dashboard-layout.spec.d.ts +2 -0
- package/dist/dashboard/dashboard-layout.spec.d.ts.map +1 -0
- package/dist/dashboard/dashboard-layout.spec.js +52 -0
- package/dist/dashboard/dashboard-layout.spec.js.map +1 -0
- package/dist/dashboard/index.d.ts +7 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +7 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/data-grid/DataGrid.d.ts +92 -0
- package/dist/data-grid/DataGrid.d.ts.map +1 -0
- package/dist/data-grid/DataGrid.js +315 -0
- package/dist/data-grid/DataGrid.js.map +1 -0
- package/dist/data-grid/DataGrid.spec.d.ts +2 -0
- package/dist/data-grid/DataGrid.spec.d.ts.map +1 -0
- package/dist/data-grid/DataGrid.spec.js +134 -0
- package/dist/data-grid/DataGrid.spec.js.map +1 -0
- package/dist/data-grid/index.d.ts +2 -0
- package/dist/data-grid/index.d.ts.map +1 -0
- package/dist/data-grid/index.js +2 -0
- package/dist/data-grid/index.js.map +1 -0
- package/dist/design-system/components.d.ts +58 -0
- package/dist/design-system/components.d.ts.map +1 -0
- package/dist/design-system/components.js +88 -0
- package/dist/design-system/components.js.map +1 -0
- package/dist/design-system/context.d.ts +11 -0
- package/dist/design-system/context.d.ts.map +1 -0
- package/dist/design-system/context.js +17 -0
- package/dist/design-system/context.js.map +1 -0
- package/dist/design-system/default-adapter.d.ts +3 -0
- package/dist/design-system/default-adapter.d.ts.map +1 -0
- package/dist/design-system/default-adapter.js +172 -0
- package/dist/design-system/default-adapter.js.map +1 -0
- package/dist/design-system/default-adapter.spec.d.ts +2 -0
- package/dist/design-system/default-adapter.spec.d.ts.map +1 -0
- package/dist/design-system/default-adapter.spec.js +108 -0
- package/dist/design-system/default-adapter.spec.js.map +1 -0
- package/dist/design-system/definition.d.ts +9 -0
- package/dist/design-system/definition.d.ts.map +1 -0
- package/dist/design-system/definition.js +4 -0
- package/dist/design-system/definition.js.map +1 -0
- package/dist/design-system/design-system.spec.d.ts +2 -0
- package/dist/design-system/design-system.spec.d.ts.map +1 -0
- package/dist/design-system/design-system.spec.js +208 -0
- package/dist/design-system/design-system.spec.js.map +1 -0
- package/dist/design-system/error-boundary.d.ts +18 -0
- package/dist/design-system/error-boundary.d.ts.map +1 -0
- package/dist/design-system/error-boundary.js +16 -0
- package/dist/design-system/error-boundary.js.map +1 -0
- package/dist/design-system/index.d.ts +8 -0
- package/dist/design-system/index.d.ts.map +1 -0
- package/dist/design-system/index.js +8 -0
- package/dist/design-system/index.js.map +1 -0
- package/dist/design-system/theme.d.ts +30 -0
- package/dist/design-system/theme.d.ts.map +1 -0
- package/dist/design-system/theme.js +95 -0
- package/dist/design-system/theme.js.map +1 -0
- package/dist/design-system/theme.spec.d.ts +2 -0
- package/dist/design-system/theme.spec.d.ts.map +1 -0
- package/dist/design-system/theme.spec.js +43 -0
- package/dist/design-system/theme.spec.js.map +1 -0
- package/dist/design-system/types.d.ts +292 -0
- package/dist/design-system/types.d.ts.map +1 -0
- package/dist/design-system/types.js +2 -0
- package/dist/design-system/types.js.map +1 -0
- package/dist/design-tweaks/index.d.ts +2 -0
- package/dist/design-tweaks/index.d.ts.map +1 -0
- package/dist/design-tweaks/index.js +2 -0
- package/dist/design-tweaks/index.js.map +1 -0
- package/dist/design-tweaks/scrub-input-utils.d.ts +61 -0
- package/dist/design-tweaks/scrub-input-utils.d.ts.map +1 -0
- package/dist/design-tweaks/scrub-input-utils.js +235 -0
- package/dist/design-tweaks/scrub-input-utils.js.map +1 -0
- package/dist/design-tweaks/scrub-input.d.ts +70 -0
- package/dist/design-tweaks/scrub-input.d.ts.map +1 -0
- package/dist/design-tweaks/scrub-input.js +319 -0
- package/dist/design-tweaks/scrub-input.js.map +1 -0
- package/dist/design-tweaks/visual-style-controls.d.ts +90 -0
- package/dist/design-tweaks/visual-style-controls.d.ts.map +1 -0
- package/dist/design-tweaks/visual-style-controls.js +423 -0
- package/dist/design-tweaks/visual-style-controls.js.map +1 -0
- package/dist/design-tweaks/visual-style-controls.spec.d.ts +2 -0
- package/dist/design-tweaks/visual-style-controls.spec.d.ts.map +1 -0
- package/dist/design-tweaks/visual-style-controls.spec.js +84 -0
- package/dist/design-tweaks/visual-style-controls.spec.js.map +1 -0
- package/dist/editor/BubbleToolbar.d.ts +37 -0
- package/dist/editor/BubbleToolbar.d.ts.map +1 -0
- package/dist/editor/BubbleToolbar.js +171 -0
- package/dist/editor/BubbleToolbar.js.map +1 -0
- package/dist/editor/CodeBlockNode.d.ts +49 -0
- package/dist/editor/CodeBlockNode.d.ts.map +1 -0
- package/dist/editor/CodeBlockNode.js +127 -0
- package/dist/editor/CodeBlockNode.js.map +1 -0
- package/dist/editor/DragHandle.d.ts +103 -0
- package/dist/editor/DragHandle.d.ts.map +1 -0
- package/dist/editor/DragHandle.js +1101 -0
- package/dist/editor/DragHandle.js.map +1 -0
- package/dist/editor/DragHandle.spec.d.ts +2 -0
- package/dist/editor/DragHandle.spec.d.ts.map +1 -0
- package/dist/editor/DragHandle.spec.js +495 -0
- package/dist/editor/DragHandle.spec.js.map +1 -0
- package/dist/editor/ImageExtension.d.ts +63 -0
- package/dist/editor/ImageExtension.d.ts.map +1 -0
- package/dist/editor/ImageExtension.js +243 -0
- package/dist/editor/ImageExtension.js.map +1 -0
- package/dist/editor/ImageExtension.roundtrip.spec.d.ts +2 -0
- package/dist/editor/ImageExtension.roundtrip.spec.d.ts.map +1 -0
- package/dist/editor/ImageExtension.roundtrip.spec.js +103 -0
- package/dist/editor/ImageExtension.roundtrip.spec.js.map +1 -0
- package/dist/editor/RegistryBlockContext.d.ts +68 -0
- package/dist/editor/RegistryBlockContext.d.ts.map +1 -0
- package/dist/editor/RegistryBlockContext.js +10 -0
- package/dist/editor/RegistryBlockContext.js.map +1 -0
- package/dist/editor/RegistryBlockNode.d.ts +66 -0
- package/dist/editor/RegistryBlockNode.d.ts.map +1 -0
- package/dist/editor/RegistryBlockNode.js +406 -0
- package/dist/editor/RegistryBlockNode.js.map +1 -0
- package/dist/editor/RegistryBlockNode.spec.d.ts +2 -0
- package/dist/editor/RegistryBlockNode.spec.d.ts.map +1 -0
- package/dist/editor/RegistryBlockNode.spec.js +215 -0
- package/dist/editor/RegistryBlockNode.spec.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.d.ts +2 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.js +65 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.d.ts +52 -0
- package/dist/editor/RichMarkdownEditor.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.js +38 -0
- package/dist/editor/RichMarkdownEditor.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.d.ts +2 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.js +186 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.js.map +1 -0
- package/dist/editor/RunId.d.ts +28 -0
- package/dist/editor/RunId.d.ts.map +1 -0
- package/dist/editor/RunId.js +60 -0
- package/dist/editor/RunId.js.map +1 -0
- package/dist/editor/SharedRichEditor.d.ts +112 -0
- package/dist/editor/SharedRichEditor.d.ts.map +1 -0
- package/dist/editor/SharedRichEditor.js +159 -0
- package/dist/editor/SharedRichEditor.js.map +1 -0
- package/dist/editor/SharedRichEditor.spec.d.ts +2 -0
- package/dist/editor/SharedRichEditor.spec.d.ts.map +1 -0
- package/dist/editor/SharedRichEditor.spec.js +63 -0
- package/dist/editor/SharedRichEditor.spec.js.map +1 -0
- package/dist/editor/SlashCommandMenu.d.ts +59 -0
- package/dist/editor/SlashCommandMenu.d.ts.map +1 -0
- package/dist/editor/SlashCommandMenu.js +279 -0
- package/dist/editor/SlashCommandMenu.js.map +1 -0
- package/dist/editor/SlashCommandMenu.spec.d.ts +2 -0
- package/dist/editor/SlashCommandMenu.spec.d.ts.map +1 -0
- package/dist/editor/SlashCommandMenu.spec.js +67 -0
- package/dist/editor/SlashCommandMenu.spec.js.map +1 -0
- package/dist/editor/disableHistory.spec.d.ts +2 -0
- package/dist/editor/disableHistory.spec.d.ts.map +1 -0
- package/dist/editor/disableHistory.spec.js +73 -0
- package/dist/editor/disableHistory.spec.js.map +1 -0
- package/dist/editor/extensions.d.ts +178 -0
- package/dist/editor/extensions.d.ts.map +1 -0
- package/dist/editor/extensions.js +264 -0
- package/dist/editor/extensions.js.map +1 -0
- package/dist/editor/gfmDoc.d.ts +24 -0
- package/dist/editor/gfmDoc.d.ts.map +1 -0
- package/dist/editor/gfmDoc.js +83 -0
- package/dist/editor/gfmDoc.js.map +1 -0
- package/dist/editor/gfmDoc.spec.d.ts +2 -0
- package/dist/editor/gfmDoc.spec.d.ts.map +1 -0
- package/dist/editor/gfmDoc.spec.js +194 -0
- package/dist/editor/gfmDoc.spec.js.map +1 -0
- package/dist/editor/index.d.ts +16 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +15 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/registrySlashCommands.d.ts +68 -0
- package/dist/editor/registrySlashCommands.d.ts.map +1 -0
- package/dist/editor/registrySlashCommands.js +51 -0
- package/dist/editor/registrySlashCommands.js.map +1 -0
- package/dist/editor/structuralReorderUndo.spec.d.ts +2 -0
- package/dist/editor/structuralReorderUndo.spec.d.ts.map +1 -0
- package/dist/editor/structuralReorderUndo.spec.js +120 -0
- package/dist/editor/structuralReorderUndo.spec.js.map +1 -0
- package/dist/editor/surgical-apply.d.ts +66 -0
- package/dist/editor/surgical-apply.d.ts.map +1 -0
- package/dist/editor/surgical-apply.js +147 -0
- package/dist/editor/surgical-apply.js.map +1 -0
- package/dist/editor/surgical-apply.spec.d.ts +2 -0
- package/dist/editor/surgical-apply.spec.d.ts.map +1 -0
- package/dist/editor/surgical-apply.spec.js +257 -0
- package/dist/editor/surgical-apply.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.d.ts +2 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.js +641 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.d.ts +117 -0
- package/dist/editor/useCollabReconcile.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.d.ts +2 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.js +248 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.js +521 -0
- package/dist/editor/useCollabReconcile.js.map +1 -0
- package/dist/editor.css +587 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +127 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/onboarding/index.d.ts +2 -0
- package/dist/onboarding/index.d.ts.map +1 -0
- package/dist/onboarding/index.js +2 -0
- package/dist/onboarding/index.js.map +1 -0
- package/dist/provider.d.ts +15 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +60 -0
- package/dist/provider.js.map +1 -0
- package/dist/sharing/SharePrimitives.d.ts +42 -0
- package/dist/sharing/SharePrimitives.d.ts.map +1 -0
- package/dist/sharing/SharePrimitives.js +53 -0
- package/dist/sharing/SharePrimitives.js.map +1 -0
- package/dist/sharing/VisibilityBadge.d.ts +11 -0
- package/dist/sharing/VisibilityBadge.d.ts.map +1 -0
- package/dist/sharing/VisibilityBadge.js +19 -0
- package/dist/sharing/VisibilityBadge.js.map +1 -0
- package/dist/sharing/VisibilityBadge.spec.d.ts +2 -0
- package/dist/sharing/VisibilityBadge.spec.d.ts.map +1 -0
- package/dist/sharing/VisibilityBadge.spec.js +60 -0
- package/dist/sharing/VisibilityBadge.spec.js.map +1 -0
- package/dist/sharing/index.d.ts +3 -0
- package/dist/sharing/index.d.ts.map +1 -0
- package/dist/sharing/index.js +3 -0
- package/dist/sharing/index.js.map +1 -0
- package/dist/styles.css +232 -0
- package/dist/ui/accordion.d.ts +8 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +14 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +21 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert-dialog.js +27 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +9 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +23 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.d.ts +4 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.js +4 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/avatar.d.ts +7 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/avatar.js +12 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +21 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.d.ts +20 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb.js +24 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.d.ts +18 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +67 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/calendar.d.ts +9 -0
- package/dist/ui/calendar.d.ts.map +1 -0
- package/dist/ui/calendar.js +74 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +17 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.d.ts +19 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/carousel.js +99 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/chart.d.ts +80 -0
- package/dist/ui/chart.d.ts.map +1 -0
- package/dist/ui/chart.js +131 -0
- package/dist/ui/chart.js.map +1 -0
- package/dist/ui/checkbox.d.ts +5 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +9 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/collapsible.d.ts +6 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/collapsible.js +6 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/command.d.ts +85 -0
- package/dist/ui/command.d.ts.map +1 -0
- package/dist/ui/command.js +29 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/command.spec.d.ts +2 -0
- package/dist/ui/command.spec.d.ts.map +1 -0
- package/dist/ui/command.spec.js +29 -0
- package/dist/ui/command.spec.js.map +1 -0
- package/dist/ui/context-menu.d.ts +28 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +34 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/date-picker.d.ts +10 -0
- package/dist/ui/date-picker.d.ts.map +1 -0
- package/dist/ui/date-picker.js +20 -0
- package/dist/ui/date-picker.js.map +1 -0
- package/dist/ui/dialog.d.ts +32 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +26 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dialog.spec.d.ts +2 -0
- package/dist/ui/dialog.spec.d.ts.map +1 -0
- package/dist/ui/dialog.spec.js +21 -0
- package/dist/ui/dialog.spec.js.map +1 -0
- package/dist/ui/drawer.d.ts +35 -0
- package/dist/ui/drawer.d.ts.map +1 -0
- package/dist/ui/drawer.js +25 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +32 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +42 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/form.d.ts +26 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +63 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/hover-card.js +10 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/index.d.ts +53 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +53 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input-otp.d.ts +35 -0
- package/dist/ui/input-otp.d.ts.map +1 -0
- package/dist/ui/input-otp.js +19 -0
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.d.ts +4 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +9 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +6 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +10 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/logo.d.ts +7 -0
- package/dist/ui/logo.d.ts.map +1 -0
- package/dist/ui/logo.js +10 -0
- package/dist/ui/logo.js.map +1 -0
- package/dist/ui/menubar.d.ts +29 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/menubar.js +36 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/navigation-menu.d.ts +13 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/navigation-menu.js +25 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/pagination.d.ts +29 -0
- package/dist/ui/pagination.d.ts.map +1 -0
- package/dist/ui/pagination.js +24 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.d.ts +11 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +16 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.d.ts +5 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +8 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.d.ts +6 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.js +15 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/resizable.d.ts +8 -0
- package/dist/ui/resizable.d.ts.map +1 -0
- package/dist/ui/resizable.js +9 -0
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/scroll-area.d.ts +6 -0
- package/dist/ui/scroll-area.d.ts.map +1 -0
- package/dist/ui/scroll-area.js +12 -0
- package/dist/ui/scroll-area.js.map +1 -0
- package/dist/ui/select.d.ts +16 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +27 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +5 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +8 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.d.ts +29 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sheet.js +37 -0
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.d.ts +71 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/sidebar.js +230 -0
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +7 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.d.ts +5 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/slider.js +8 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/sonner.d.ts +5 -0
- package/dist/ui/sonner.d.ts.map +1 -0
- package/dist/ui/sonner.js +25 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/spinner.d.ts +3 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/spinner.js +7 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +8 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +11 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +21 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +8 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +13 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.d.ts +6 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +9 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toast.d.ts +16 -0
- package/dist/ui/toast.d.ts.map +1 -0
- package/dist/ui/toast.js +34 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.d.ts +2 -0
- package/dist/ui/toaster.d.ts.map +1 -0
- package/dist/ui/toaster.js +10 -0
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +13 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle-group.js +21 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +13 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/dist/ui/toggle.js +26 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.d.ts +11 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +18 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/use-toast.d.ts +3 -0
- package/dist/ui/use-toast.d.ts.map +1 -0
- package/dist/ui/use-toast.js +3 -0
- package/dist/ui/use-toast.js.map +1 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +7 -0
- package/dist/utils.js.map +1 -0
- package/migration-manifest.json +4 -0
- package/package.json +369 -0
- package/src/app-shell/header-actions.tsx +84 -0
- package/src/app-shell/index.ts +2 -0
- package/src/app-shell/sidebar-footer-actions.spec.tsx +81 -0
- package/src/app-shell/sidebar-footer-actions.tsx +45 -0
- package/src/canvas-annotations/CanvasCommentPins.tsx +861 -0
- package/src/canvas-annotations/DrawOverlay.spec.tsx +145 -0
- package/src/canvas-annotations/DrawOverlay.tsx +1233 -0
- package/src/canvas-annotations/index.ts +15 -0
- package/src/canvas-annotations/types.ts +14 -0
- package/src/canvas-interactions/canvas-interactions.spec.ts +765 -0
- package/src/canvas-interactions/canvas-interactions.ts +965 -0
- package/src/canvas-interactions/index.ts +67 -0
- package/src/chat-history/ChatHistoryList.spec.tsx +485 -0
- package/src/chat-history/ChatHistoryList.tsx +481 -0
- package/src/chat-history/ChatHistoryRail.spec.tsx +312 -0
- package/src/chat-history/ChatHistoryRail.tsx +150 -0
- package/src/chat-history/index.ts +21 -0
- package/src/chat-history/useChatHistoryRailController.spec.tsx +131 -0
- package/src/chat-history/useChatHistoryRailController.ts +76 -0
- package/src/chat-history.css +469 -0
- package/src/collab-ui/AgentPresenceChip.tsx +69 -0
- package/src/collab-ui/LiveCursorOverlay.tsx +241 -0
- package/src/collab-ui/PresenceBar.spec.tsx +44 -0
- package/src/collab-ui/PresenceBar.tsx +373 -0
- package/src/collab-ui/RecentEditHighlights.tsx +239 -0
- package/src/collab-ui/RemoteSelectionRings.tsx +227 -0
- package/src/collab-ui/agent-identity.ts +16 -0
- package/src/collab-ui/index.ts +39 -0
- package/src/collab-ui/lead-client.ts +32 -0
- package/src/collab-ui/types.spec.ts +18 -0
- package/src/collab-ui/types.ts +96 -0
- package/src/composer/AgentComposerFrame.tsx +62 -0
- package/src/composer/ComposerPlusMenu.spec.ts +14 -0
- package/src/composer/ComposerPlusMenu.tsx +1266 -0
- package/src/composer/MentionPopover.tsx +483 -0
- package/src/composer/PastedTextChip.spec.tsx +58 -0
- package/src/composer/PastedTextChip.tsx +178 -0
- package/src/composer/PromptComposer.spec.ts +110 -0
- package/src/composer/PromptComposer.tsx +796 -0
- package/src/composer/RealtimeVoiceMode.spec.tsx +998 -0
- package/src/composer/RealtimeVoiceMode.tsx +1019 -0
- package/src/composer/TiptapComposer.spec.ts +592 -0
- package/src/composer/TiptapComposer.tsx +3746 -0
- package/src/composer/VoiceButton.spec.ts +49 -0
- package/src/composer/VoiceButton.tsx +329 -0
- package/src/composer/asset-picker-url.spec.ts +56 -0
- package/src/composer/asset-picker-url.ts +80 -0
- package/src/composer/attachment-accept.spec.ts +32 -0
- package/src/composer/attachment-accept.ts +75 -0
- package/src/composer/draft-key.spec.ts +19 -0
- package/src/composer/draft-key.ts +7 -0
- package/src/composer/extensions/FileReference.tsx +55 -0
- package/src/composer/extensions/MentionReference.tsx +93 -0
- package/src/composer/extensions/SkillReference.tsx +56 -0
- package/src/composer/index.ts +86 -0
- package/src/composer/model-selection.spec.ts +45 -0
- package/src/composer/model-selection.ts +51 -0
- package/src/composer/pasted-text.spec.ts +162 -0
- package/src/composer/pasted-text.ts +160 -0
- package/src/composer/prompt-attachments.spec.ts +80 -0
- package/src/composer/prompt-attachments.ts +93 -0
- package/src/composer/realtime-voice-audio-level.spec.ts +47 -0
- package/src/composer/realtime-voice-audio-level.ts +65 -0
- package/src/composer/realtime-voice-transcript.spec.ts +95 -0
- package/src/composer/realtime-voice-transcript.ts +134 -0
- package/src/composer/runtime-adapters.spec.tsx +102 -0
- package/src/composer/runtime-adapters.tsx +364 -0
- package/src/composer/types.ts +66 -0
- package/src/composer/use-file-search.ts +64 -0
- package/src/composer/use-mention-search.ts +90 -0
- package/src/composer/use-skills.ts +45 -0
- package/src/composer/useRealtimeVoiceMode.spec.ts +952 -0
- package/src/composer/useRealtimeVoiceMode.tsx +2388 -0
- package/src/composer/useVoiceDictation.browser.spec.tsx +265 -0
- package/src/composer/useVoiceDictation.spec.ts +45 -0
- package/src/composer/useVoiceDictation.ts +1256 -0
- package/src/conformance/__fixtures__/css-in-js-adapter.tsx +401 -0
- package/src/conformance/conformance.spec.tsx +143 -0
- package/src/conformance/index.ts +3 -0
- package/src/conformance/runner.tsx +862 -0
- package/src/conformance/types.ts +45 -0
- package/src/conformance/version.ts +22 -0
- package/src/context-ui/ContextMeter.spec.tsx +73 -0
- package/src/context-ui/ContextMeter.tsx +131 -0
- package/src/context-ui/ContextSegmentRow.tsx +273 -0
- package/src/context-ui/ContextTreemap.tsx +131 -0
- package/src/context-ui/ContextXRayPanel.tsx +491 -0
- package/src/context-ui/format.ts +42 -0
- package/src/context-ui/index.ts +15 -0
- package/src/context-ui/types.ts +57 -0
- package/src/dashboard/DataTable.tsx +273 -0
- package/src/dashboard/DateRangePicker.tsx +57 -0
- package/src/dashboard/GenericChartPanel.spec.tsx +53 -0
- package/src/dashboard/GenericChartPanel.tsx +461 -0
- package/src/dashboard/MetricCard.tsx +54 -0
- package/src/dashboard/StatsCard.tsx +49 -0
- package/src/dashboard/dashboard-layout.spec.ts +79 -0
- package/src/dashboard/dashboard-layout.ts +329 -0
- package/src/dashboard/index.ts +6 -0
- package/src/data-grid/DataGrid.spec.tsx +243 -0
- package/src/data-grid/DataGrid.tsx +754 -0
- package/src/data-grid/index.ts +15 -0
- package/src/design-system/components.tsx +196 -0
- package/src/design-system/context.tsx +31 -0
- package/src/design-system/default-adapter.spec.tsx +158 -0
- package/src/design-system/default-adapter.tsx +923 -0
- package/src/design-system/definition.ts +14 -0
- package/src/design-system/design-system.spec.tsx +356 -0
- package/src/design-system/error-boundary.tsx +37 -0
- package/src/design-system/index.ts +7 -0
- package/src/design-system/theme.spec.ts +61 -0
- package/src/design-system/theme.ts +145 -0
- package/src/design-system/types.ts +367 -0
- package/src/design-tweaks/index.ts +1 -0
- package/src/design-tweaks/scrub-input-utils.ts +311 -0
- package/src/design-tweaks/scrub-input.tsx +525 -0
- package/src/design-tweaks/visual-style-controls.spec.tsx +172 -0
- package/src/design-tweaks/visual-style-controls.tsx +1043 -0
- package/src/editor/BubbleToolbar.tsx +253 -0
- package/src/editor/CodeBlockNode.tsx +254 -0
- package/src/editor/DragHandle.spec.ts +694 -0
- package/src/editor/DragHandle.ts +1491 -0
- package/src/editor/ImageExtension.roundtrip.spec.ts +117 -0
- package/src/editor/ImageExtension.ts +306 -0
- package/src/editor/RegistryBlockContext.tsx +107 -0
- package/src/editor/RegistryBlockNode.spec.ts +279 -0
- package/src/editor/RegistryBlockNode.tsx +652 -0
- package/src/editor/RichMarkdownEditor.collab.spec.ts +79 -0
- package/src/editor/RichMarkdownEditor.roundtrip.spec.ts +226 -0
- package/src/editor/RichMarkdownEditor.tsx +81 -0
- package/src/editor/RunId.ts +61 -0
- package/src/editor/SharedRichEditor.spec.tsx +82 -0
- package/src/editor/SharedRichEditor.tsx +353 -0
- package/src/editor/SlashCommandMenu.spec.ts +90 -0
- package/src/editor/SlashCommandMenu.tsx +396 -0
- package/src/editor/disableHistory.spec.ts +85 -0
- package/src/editor/extensions.ts +454 -0
- package/src/editor/gfmDoc.spec.ts +230 -0
- package/src/editor/gfmDoc.ts +92 -0
- package/src/editor/index.ts +96 -0
- package/src/editor/registrySlashCommands.ts +131 -0
- package/src/editor/structuralReorderUndo.spec.ts +144 -0
- package/src/editor/surgical-apply.spec.ts +279 -0
- package/src/editor/surgical-apply.ts +192 -0
- package/src/editor/useCollabReconcile.concurrent.spec.ts +781 -0
- package/src/editor/useCollabReconcile.idempotent.spec.ts +324 -0
- package/src/editor/useCollabReconcile.ts +684 -0
- package/src/editor.css +587 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-mobile.tsx +21 -0
- package/src/hooks/use-toast.ts +188 -0
- package/src/index.ts +10 -0
- package/src/onboarding/index.ts +1 -0
- package/src/provider.tsx +148 -0
- package/src/sharing/SharePrimitives.tsx +224 -0
- package/src/sharing/VisibilityBadge.spec.ts +96 -0
- package/src/sharing/VisibilityBadge.tsx +37 -0
- package/src/sharing/index.ts +16 -0
- package/src/styles.css +232 -0
- package/src/ui/accordion.tsx +56 -0
- package/src/ui/alert-dialog.tsx +141 -0
- package/src/ui/alert.tsx +59 -0
- package/src/ui/aspect-ratio.tsx +5 -0
- package/src/ui/avatar.tsx +48 -0
- package/src/ui/badge.tsx +37 -0
- package/src/ui/breadcrumb.tsx +115 -0
- package/src/ui/button.tsx +167 -0
- package/src/ui/calendar.tsx +214 -0
- package/src/ui/card.tsx +86 -0
- package/src/ui/carousel.tsx +260 -0
- package/src/ui/chart.tsx +375 -0
- package/src/ui/checkbox.tsx +28 -0
- package/src/ui/collapsible.tsx +9 -0
- package/src/ui/command.spec.tsx +51 -0
- package/src/ui/command.tsx +174 -0
- package/src/ui/context-menu.tsx +202 -0
- package/src/ui/date-picker.tsx +67 -0
- package/src/ui/dialog.spec.tsx +43 -0
- package/src/ui/dialog.tsx +171 -0
- package/src/ui/drawer.tsx +126 -0
- package/src/ui/dropdown-menu.tsx +222 -0
- package/src/ui/form.tsx +177 -0
- package/src/ui/hover-card.tsx +27 -0
- package/src/ui/index.ts +52 -0
- package/src/ui/input-otp.tsx +69 -0
- package/src/ui/input.tsx +22 -0
- package/src/ui/label.tsx +24 -0
- package/src/ui/logo.tsx +36 -0
- package/src/ui/menubar.tsx +235 -0
- package/src/ui/navigation-menu.tsx +128 -0
- package/src/ui/pagination.tsx +121 -0
- package/src/ui/popover.tsx +58 -0
- package/src/ui/progress.tsx +27 -0
- package/src/ui/radio-group.tsx +42 -0
- package/src/ui/resizable.tsx +43 -0
- package/src/ui/scroll-area.tsx +46 -0
- package/src/ui/select.tsx +162 -0
- package/src/ui/separator.tsx +29 -0
- package/src/ui/sheet.tsx +160 -0
- package/src/ui/sidebar.tsx +776 -0
- package/src/ui/skeleton.tsx +18 -0
- package/src/ui/slider.tsx +26 -0
- package/src/ui/sonner.tsx +58 -0
- package/src/ui/spinner.tsx +17 -0
- package/src/ui/switch.tsx +27 -0
- package/src/ui/table.tsx +110 -0
- package/src/ui/tabs.tsx +53 -0
- package/src/ui/textarea.tsx +23 -0
- package/src/ui/toast.tsx +127 -0
- package/src/ui/toaster.tsx +33 -0
- package/src/ui/toggle-group.tsx +59 -0
- package/src/ui/toggle.tsx +43 -0
- package/src/ui/tooltip.tsx +57 -0
- package/src/ui/use-toast.ts +3 -0
- package/src/utils.ts +8 -0
|
@@ -0,0 +1,952 @@
|
|
|
1
|
+
// @vitest-environment happy-dom
|
|
2
|
+
|
|
3
|
+
import { act, createElement } from "react";
|
|
4
|
+
import { createRoot } from "react-dom/client";
|
|
5
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
|
|
7
|
+
import { ComposerRuntimeAdaptersProvider } from "./runtime-adapters.js";
|
|
8
|
+
import {
|
|
9
|
+
createRealtimeVoiceGreetingEvent,
|
|
10
|
+
createRealtimeVoiceGreetingStarter,
|
|
11
|
+
createRealtimeVoicePreferenceUpdate,
|
|
12
|
+
createRealtimeVoiceResponseCoordinator,
|
|
13
|
+
createRealtimeVoiceSession,
|
|
14
|
+
createRealtimeVoiceSessionWithCapability,
|
|
15
|
+
createRealtimeVoiceTranscriptSequencer,
|
|
16
|
+
createRealtimeVoiceConnectionTimeout,
|
|
17
|
+
createRealtimeVoiceConnectionGate,
|
|
18
|
+
createRealtimeVoiceAudioConstraints,
|
|
19
|
+
createRealtimeVoiceToolManifestCoordinator,
|
|
20
|
+
executeRealtimeVoiceTool,
|
|
21
|
+
extractCompletedRealtimeVoiceTranscript,
|
|
22
|
+
extractRealtimeVoiceFunctionCalls,
|
|
23
|
+
extractRealtimeVoiceSessionTools,
|
|
24
|
+
isRealtimeVoiceAbortError,
|
|
25
|
+
isRealtimeVoiceSetupRequiredError,
|
|
26
|
+
listenForRealtimeVoicePageHide,
|
|
27
|
+
mergeRealtimeVoiceToolManifest,
|
|
28
|
+
normalizeRealtimeVoicePreferences,
|
|
29
|
+
REALTIME_VOICE_AUDIO_CONSTRAINTS,
|
|
30
|
+
replaceRealtimeVoiceMicrophone,
|
|
31
|
+
realtimeVoiceReasoningEffort,
|
|
32
|
+
resolveRealtimeVoiceLanguage,
|
|
33
|
+
shouldRestoreRealtimeVoiceTranscriptThread,
|
|
34
|
+
useRealtimeVoiceModeCopy,
|
|
35
|
+
} from "./useRealtimeVoiceMode.js";
|
|
36
|
+
import type { RealtimeVoiceFunctionTool } from "./useRealtimeVoiceMode.js";
|
|
37
|
+
|
|
38
|
+
afterEach(() => {
|
|
39
|
+
vi.useRealTimers();
|
|
40
|
+
vi.unstubAllGlobals();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
function realtimeTool(name: string): RealtimeVoiceFunctionTool {
|
|
44
|
+
return {
|
|
45
|
+
type: "function",
|
|
46
|
+
name,
|
|
47
|
+
description: `Call ${name}`,
|
|
48
|
+
parameters: { type: "object", properties: {} },
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
describe("Realtime voice localization", () => {
|
|
53
|
+
it("uses app overrides from the modern agentChat namespace", () => {
|
|
54
|
+
const container = document.createElement("div");
|
|
55
|
+
const root = createRoot(container);
|
|
56
|
+
let entryButtonLabel = "";
|
|
57
|
+
|
|
58
|
+
function Consumer() {
|
|
59
|
+
entryButtonLabel = useRealtimeVoiceModeCopy().entryButtonLabel;
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
act(() => {
|
|
64
|
+
root.render(
|
|
65
|
+
createElement(ComposerRuntimeAdaptersProvider, {
|
|
66
|
+
adapters: {
|
|
67
|
+
translate: (key, options) =>
|
|
68
|
+
key === "agentChat.voiceMode.entryButtonLabel"
|
|
69
|
+
? "Modern voice override"
|
|
70
|
+
: String(options?.defaultValue ?? key),
|
|
71
|
+
},
|
|
72
|
+
children: createElement(Consumer),
|
|
73
|
+
}),
|
|
74
|
+
);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
expect(entryButtonLabel).toBe("Modern voice override");
|
|
78
|
+
act(() => root.unmount());
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe("Realtime voice client transport", () => {
|
|
83
|
+
it("normalizes persisted preferences and resolves Auto from the browser language", () => {
|
|
84
|
+
expect(
|
|
85
|
+
normalizeRealtimeVoicePreferences({
|
|
86
|
+
language: "en",
|
|
87
|
+
intelligence: "deep",
|
|
88
|
+
voice: "cedar",
|
|
89
|
+
}),
|
|
90
|
+
).toEqual({ language: "en", intelligence: "deep", voice: "cedar" });
|
|
91
|
+
expect(
|
|
92
|
+
normalizeRealtimeVoicePreferences({
|
|
93
|
+
language: "xx",
|
|
94
|
+
intelligence: "maximum",
|
|
95
|
+
voice: "unknown",
|
|
96
|
+
}),
|
|
97
|
+
).toEqual({ language: "auto", intelligence: "instant", voice: "marin" });
|
|
98
|
+
expect(resolveRealtimeVoiceLanguage("auto", ["en-US", "fr"])).toBe("en");
|
|
99
|
+
expect(resolveRealtimeVoiceLanguage("auto", ["nl-NL"])).toBe("en");
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("maps inline intelligence and language controls to a safe session update", () => {
|
|
103
|
+
expect(realtimeVoiceReasoningEffort("instant")).toBe("minimal");
|
|
104
|
+
expect(realtimeVoiceReasoningEffort("balanced")).toBe("low");
|
|
105
|
+
expect(realtimeVoiceReasoningEffort("deep")).toBe("medium");
|
|
106
|
+
expect(
|
|
107
|
+
createRealtimeVoicePreferenceUpdate(
|
|
108
|
+
{ language: "auto", intelligence: "balanced", voice: "cedar" },
|
|
109
|
+
{ browserLanguages: ["en-US"], includeVoice: true },
|
|
110
|
+
),
|
|
111
|
+
).toEqual({
|
|
112
|
+
type: "session.update",
|
|
113
|
+
session: {
|
|
114
|
+
type: "realtime",
|
|
115
|
+
reasoning: { effort: "low" },
|
|
116
|
+
audio: {
|
|
117
|
+
input: {
|
|
118
|
+
transcription: {
|
|
119
|
+
model: "gpt-4o-mini-transcribe",
|
|
120
|
+
language: "en",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
output: { voice: "cedar" },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it("prefers the browser and OS default microphone without requiring it", () => {
|
|
130
|
+
expect(REALTIME_VOICE_AUDIO_CONSTRAINTS).toEqual(
|
|
131
|
+
expect.objectContaining({
|
|
132
|
+
deviceId: { ideal: "default" },
|
|
133
|
+
echoCancellation: true,
|
|
134
|
+
noiseSuppression: true,
|
|
135
|
+
autoGainControl: true,
|
|
136
|
+
}),
|
|
137
|
+
);
|
|
138
|
+
expect(createRealtimeVoiceAudioConstraints("studio", true)).toEqual(
|
|
139
|
+
expect.objectContaining({ deviceId: { exact: "studio" } }),
|
|
140
|
+
);
|
|
141
|
+
expect(createRealtimeVoiceAudioConstraints("studio")).toEqual(
|
|
142
|
+
expect.objectContaining({ deviceId: { ideal: "studio" } }),
|
|
143
|
+
);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it("replaces the live microphone before stopping the previous track", async () => {
|
|
147
|
+
const events: string[] = [];
|
|
148
|
+
const oldTrack = {
|
|
149
|
+
kind: "audio",
|
|
150
|
+
onended: vi.fn(),
|
|
151
|
+
stop: vi.fn(() => events.push("old-stopped")),
|
|
152
|
+
};
|
|
153
|
+
const replacementTrack = { kind: "audio", stop: vi.fn() };
|
|
154
|
+
const replacementStream = {
|
|
155
|
+
getAudioTracks: () => [replacementTrack],
|
|
156
|
+
getTracks: () => [replacementTrack],
|
|
157
|
+
};
|
|
158
|
+
const sender = {
|
|
159
|
+
track: oldTrack,
|
|
160
|
+
replaceTrack: vi.fn(async () => {
|
|
161
|
+
events.push("replaced");
|
|
162
|
+
}),
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
await expect(
|
|
166
|
+
replaceRealtimeVoiceMicrophone({
|
|
167
|
+
mediaDevices: {
|
|
168
|
+
getUserMedia: vi.fn(async () => replacementStream),
|
|
169
|
+
} as unknown as Pick<MediaDevices, "getUserMedia">,
|
|
170
|
+
peer: {
|
|
171
|
+
getSenders: () => [sender],
|
|
172
|
+
} as unknown as Pick<RTCPeerConnection, "getSenders">,
|
|
173
|
+
currentStream: {
|
|
174
|
+
getTracks: () => [oldTrack],
|
|
175
|
+
} as unknown as MediaStream,
|
|
176
|
+
deviceId: "studio",
|
|
177
|
+
}),
|
|
178
|
+
).resolves.toBe(replacementStream);
|
|
179
|
+
|
|
180
|
+
expect(events).toEqual(["replaced", "old-stopped"]);
|
|
181
|
+
expect(oldTrack.onended).toBeNull();
|
|
182
|
+
expect(replacementTrack.stop).not.toHaveBeenCalled();
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it("keeps the current microphone when replacing its track fails", async () => {
|
|
186
|
+
const oldTrack = { kind: "audio", stop: vi.fn() };
|
|
187
|
+
const replacementTrack = { kind: "audio", stop: vi.fn() };
|
|
188
|
+
const replacementStream = {
|
|
189
|
+
getAudioTracks: () => [replacementTrack],
|
|
190
|
+
getTracks: () => [replacementTrack],
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
await expect(
|
|
194
|
+
replaceRealtimeVoiceMicrophone({
|
|
195
|
+
mediaDevices: {
|
|
196
|
+
getUserMedia: vi.fn(async () => replacementStream),
|
|
197
|
+
} as unknown as Pick<MediaDevices, "getUserMedia">,
|
|
198
|
+
peer: {
|
|
199
|
+
getSenders: () => [
|
|
200
|
+
{
|
|
201
|
+
track: oldTrack,
|
|
202
|
+
replaceTrack: vi.fn(async () => {
|
|
203
|
+
throw new Error("replace failed");
|
|
204
|
+
}),
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
} as unknown as Pick<RTCPeerConnection, "getSenders">,
|
|
208
|
+
currentStream: {
|
|
209
|
+
getTracks: () => [oldTrack],
|
|
210
|
+
} as unknown as MediaStream,
|
|
211
|
+
deviceId: "studio",
|
|
212
|
+
}),
|
|
213
|
+
).rejects.toThrow("replace failed");
|
|
214
|
+
|
|
215
|
+
expect(oldTrack.stop).not.toHaveBeenCalled();
|
|
216
|
+
expect(replacementTrack.stop).toHaveBeenCalledOnce();
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
it("times out a connection attempt and supports idempotent cancellation", () => {
|
|
220
|
+
vi.useFakeTimers();
|
|
221
|
+
const onTimeout = vi.fn();
|
|
222
|
+
const cancelFirst = createRealtimeVoiceConnectionTimeout(onTimeout, 1_000);
|
|
223
|
+
|
|
224
|
+
cancelFirst();
|
|
225
|
+
cancelFirst();
|
|
226
|
+
vi.advanceTimersByTime(1_000);
|
|
227
|
+
expect(onTimeout).not.toHaveBeenCalled();
|
|
228
|
+
|
|
229
|
+
const cancelSecond = createRealtimeVoiceConnectionTimeout(onTimeout, 1_000);
|
|
230
|
+
|
|
231
|
+
vi.advanceTimersByTime(999);
|
|
232
|
+
expect(onTimeout).not.toHaveBeenCalled();
|
|
233
|
+
vi.advanceTimersByTime(1);
|
|
234
|
+
expect(onTimeout).toHaveBeenCalledOnce();
|
|
235
|
+
|
|
236
|
+
cancelSecond();
|
|
237
|
+
vi.useRealTimers();
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
it("keeps the handshake deadline armed until session.created", () => {
|
|
241
|
+
vi.useFakeTimers();
|
|
242
|
+
const onTimeout = vi.fn();
|
|
243
|
+
const transportOnly = createRealtimeVoiceConnectionGate(onTimeout, 1_000);
|
|
244
|
+
|
|
245
|
+
transportOnly.markTransportReady();
|
|
246
|
+
vi.advanceTimersByTime(1_000);
|
|
247
|
+
expect(onTimeout).toHaveBeenCalledOnce();
|
|
248
|
+
|
|
249
|
+
const liveSession = createRealtimeVoiceConnectionGate(onTimeout, 1_000);
|
|
250
|
+
liveSession.markTransportReady();
|
|
251
|
+
liveSession.markSessionCreated();
|
|
252
|
+
vi.advanceTimersByTime(1_000);
|
|
253
|
+
expect(onTimeout).toHaveBeenCalledOnce();
|
|
254
|
+
vi.useRealTimers();
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
it("recognizes abort-like DOM errors without relying on Error identity", () => {
|
|
258
|
+
expect(
|
|
259
|
+
isRealtimeVoiceAbortError(
|
|
260
|
+
new DOMException("The operation was aborted", "AbortError"),
|
|
261
|
+
),
|
|
262
|
+
).toBe(true);
|
|
263
|
+
expect(isRealtimeVoiceAbortError({ name: "AbortError" })).toBe(true);
|
|
264
|
+
expect(isRealtimeVoiceAbortError(new Error("signal was aborted"))).toBe(
|
|
265
|
+
false,
|
|
266
|
+
);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
it("cleans up realtime transport when the page is hidden", () => {
|
|
270
|
+
const cleanup = vi.fn();
|
|
271
|
+
const stopListening = listenForRealtimeVoicePageHide(cleanup);
|
|
272
|
+
|
|
273
|
+
window.dispatchEvent(new Event("pagehide"));
|
|
274
|
+
expect(cleanup).toHaveBeenCalledOnce();
|
|
275
|
+
|
|
276
|
+
stopListening();
|
|
277
|
+
window.dispatchEvent(new Event("pagehide"));
|
|
278
|
+
expect(cleanup).toHaveBeenCalledOnce();
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
it("creates a same-origin SDP session without exposing a provider key", async () => {
|
|
282
|
+
const fetchMock = vi.fn(
|
|
283
|
+
async () =>
|
|
284
|
+
new Response("answer-sdp", {
|
|
285
|
+
status: 200,
|
|
286
|
+
headers: {
|
|
287
|
+
"Content-Type": "application/sdp",
|
|
288
|
+
"X-Agent-Native-Realtime-Capability": "capability-1",
|
|
289
|
+
},
|
|
290
|
+
}),
|
|
291
|
+
);
|
|
292
|
+
vi.stubGlobal("fetch", fetchMock);
|
|
293
|
+
|
|
294
|
+
await expect(
|
|
295
|
+
createRealtimeVoiceSession("offer-sdp", {
|
|
296
|
+
browserTabId: "tab-1",
|
|
297
|
+
preferences: {
|
|
298
|
+
language: "auto",
|
|
299
|
+
intelligence: "instant",
|
|
300
|
+
voice: "marin",
|
|
301
|
+
},
|
|
302
|
+
browserLanguages: ["en-US"],
|
|
303
|
+
}),
|
|
304
|
+
).resolves.toBe("answer-sdp");
|
|
305
|
+
await expect(
|
|
306
|
+
createRealtimeVoiceSessionWithCapability("offer-sdp"),
|
|
307
|
+
).resolves.toEqual({
|
|
308
|
+
sdp: "answer-sdp",
|
|
309
|
+
capability: "capability-1",
|
|
310
|
+
});
|
|
311
|
+
expect(fetchMock).toHaveBeenCalledWith(
|
|
312
|
+
"/_agent-native/realtime-voice/session",
|
|
313
|
+
expect.objectContaining({
|
|
314
|
+
method: "POST",
|
|
315
|
+
body: "offer-sdp",
|
|
316
|
+
headers: {
|
|
317
|
+
"Content-Type": "application/sdp",
|
|
318
|
+
"X-Agent-Native-Browser-Tab": "tab-1",
|
|
319
|
+
"X-Agent-Native-Realtime-Language": "en",
|
|
320
|
+
"X-Agent-Native-Realtime-Intelligence": "instant",
|
|
321
|
+
"X-Agent-Native-Realtime-Voice": "marin",
|
|
322
|
+
},
|
|
323
|
+
}),
|
|
324
|
+
);
|
|
325
|
+
expect(JSON.stringify(fetchMock.mock.calls)).not.toContain(
|
|
326
|
+
"OPENAI_API_KEY",
|
|
327
|
+
);
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
it("sends function calls to the authenticated Agent Native tool bridge", async () => {
|
|
331
|
+
const fetchMock = vi.fn(async () =>
|
|
332
|
+
Response.json({
|
|
333
|
+
callId: "call-1",
|
|
334
|
+
status: "completed",
|
|
335
|
+
output: '{"ok":true}',
|
|
336
|
+
}),
|
|
337
|
+
);
|
|
338
|
+
vi.stubGlobal("fetch", fetchMock);
|
|
339
|
+
|
|
340
|
+
await expect(
|
|
341
|
+
executeRealtimeVoiceTool({
|
|
342
|
+
name: "navigate",
|
|
343
|
+
args: { path: "/inbox" },
|
|
344
|
+
callId: "call-1",
|
|
345
|
+
sessionId: "session-1",
|
|
346
|
+
browserTabId: "tab-1",
|
|
347
|
+
capability: "capability-1",
|
|
348
|
+
}),
|
|
349
|
+
).resolves.toEqual({
|
|
350
|
+
callId: "call-1",
|
|
351
|
+
status: "completed",
|
|
352
|
+
output: '{"ok":true}',
|
|
353
|
+
});
|
|
354
|
+
expect(fetchMock).toHaveBeenCalledWith(
|
|
355
|
+
"/_agent-native/realtime-voice/tool",
|
|
356
|
+
expect.objectContaining({
|
|
357
|
+
method: "POST",
|
|
358
|
+
headers: expect.objectContaining({
|
|
359
|
+
"X-Agent-Native-Browser-Tab": "tab-1",
|
|
360
|
+
"X-Agent-Native-Realtime-Capability": "capability-1",
|
|
361
|
+
}),
|
|
362
|
+
body: JSON.stringify({
|
|
363
|
+
name: "navigate",
|
|
364
|
+
args: { path: "/inbox" },
|
|
365
|
+
callId: "call-1",
|
|
366
|
+
sessionId: "session-1",
|
|
367
|
+
browserTabId: "tab-1",
|
|
368
|
+
}),
|
|
369
|
+
}),
|
|
370
|
+
);
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
describe("Realtime voice dynamic tool manifests", () => {
|
|
375
|
+
it("reads full tool manifests from session lifecycle events", () => {
|
|
376
|
+
const tools = [realtimeTool("navigate"), realtimeTool("tool-search")];
|
|
377
|
+
expect(
|
|
378
|
+
extractRealtimeVoiceSessionTools({
|
|
379
|
+
type: "session.created",
|
|
380
|
+
session: { id: "session-1", tools },
|
|
381
|
+
}),
|
|
382
|
+
).toEqual(tools);
|
|
383
|
+
expect(
|
|
384
|
+
extractRealtimeVoiceSessionTools({
|
|
385
|
+
type: "session.updated",
|
|
386
|
+
session: { tools },
|
|
387
|
+
}),
|
|
388
|
+
).toEqual(tools);
|
|
389
|
+
expect(
|
|
390
|
+
extractRealtimeVoiceSessionTools({
|
|
391
|
+
type: "response.done",
|
|
392
|
+
response: {},
|
|
393
|
+
}),
|
|
394
|
+
).toBeNull();
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
it("keeps pinned tools and newest discoveries when the manifest is full", () => {
|
|
398
|
+
const pinned = [
|
|
399
|
+
"navigate",
|
|
400
|
+
"set-url-path",
|
|
401
|
+
"set-search-params",
|
|
402
|
+
"view-screen",
|
|
403
|
+
"tool-search",
|
|
404
|
+
].map(realtimeTool);
|
|
405
|
+
const current = [
|
|
406
|
+
...pinned,
|
|
407
|
+
...Array.from({ length: 27 }, (_, index) => realtimeTool(`old-${index}`)),
|
|
408
|
+
];
|
|
409
|
+
|
|
410
|
+
const merged = mergeRealtimeVoiceToolManifest(current, [
|
|
411
|
+
realtimeTool("open-dashboard"),
|
|
412
|
+
realtimeTool("list-dashboards"),
|
|
413
|
+
]);
|
|
414
|
+
const names = merged.map((tool) => tool.name);
|
|
415
|
+
|
|
416
|
+
expect(merged).toHaveLength(32);
|
|
417
|
+
expect(names.slice(0, 5)).toEqual(pinned.map((tool) => tool.name));
|
|
418
|
+
expect(names).toContain("open-dashboard");
|
|
419
|
+
expect(names).toContain("list-dashboards");
|
|
420
|
+
expect(names).not.toContain("old-26");
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
it("packs dynamic schemas within the realtime session byte budget", () => {
|
|
424
|
+
const largeTool = (name: string): RealtimeVoiceFunctionTool => ({
|
|
425
|
+
...realtimeTool(name),
|
|
426
|
+
description: "x".repeat(25_000),
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
const merged = mergeRealtimeVoiceToolManifest(
|
|
430
|
+
[],
|
|
431
|
+
[largeTool("large-1"), largeTool("large-2"), largeTool("large-3")],
|
|
432
|
+
);
|
|
433
|
+
|
|
434
|
+
expect(merged.map((tool) => tool.name)).toEqual(["large-1", "large-2"]);
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
it("waits for session.updated before exposing discovered tools to the model", () => {
|
|
438
|
+
const sent: Record<string, unknown>[] = [];
|
|
439
|
+
const coordinator = createRealtimeVoiceToolManifestCoordinator((event) =>
|
|
440
|
+
sent.push(event),
|
|
441
|
+
);
|
|
442
|
+
coordinator.setSessionTools([
|
|
443
|
+
realtimeTool("navigate"),
|
|
444
|
+
realtimeTool("tool-search"),
|
|
445
|
+
]);
|
|
446
|
+
coordinator.enqueue({
|
|
447
|
+
callId: "call-search",
|
|
448
|
+
status: "completed",
|
|
449
|
+
output: '{"matches":["open-dashboard"]}',
|
|
450
|
+
expandedTools: [realtimeTool("open-dashboard")],
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
expect(sent.map((event) => event.type)).toEqual(["session.update"]);
|
|
454
|
+
expect(sent[0]?.event_id).toBe("realtime_tool_manifest_1");
|
|
455
|
+
const updateTools = (
|
|
456
|
+
sent[0]?.session as { tools: RealtimeVoiceFunctionTool[] }
|
|
457
|
+
).tools;
|
|
458
|
+
coordinator.setSessionTools([realtimeTool("navigate")]);
|
|
459
|
+
expect(sent.map((event) => event.type)).toEqual(["session.update"]);
|
|
460
|
+
|
|
461
|
+
coordinator.setSessionTools(updateTools);
|
|
462
|
+
expect(sent.map((event) => event.type)).toEqual([
|
|
463
|
+
"session.update",
|
|
464
|
+
"conversation.item.create",
|
|
465
|
+
"response.create",
|
|
466
|
+
]);
|
|
467
|
+
const output = JSON.parse(
|
|
468
|
+
String(
|
|
469
|
+
(sent[1]?.item as { output?: unknown } | undefined)?.output ?? "{}",
|
|
470
|
+
),
|
|
471
|
+
) as Record<string, unknown>;
|
|
472
|
+
expect(output.output).toBe('{"matches":["open-dashboard"]}');
|
|
473
|
+
expect(output).not.toHaveProperty("expandedTools");
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
it("handles a rejected manifest update without failing the voice session", () => {
|
|
477
|
+
const sent: Record<string, unknown>[] = [];
|
|
478
|
+
const coordinator = createRealtimeVoiceToolManifestCoordinator((event) =>
|
|
479
|
+
sent.push(event),
|
|
480
|
+
);
|
|
481
|
+
coordinator.setSessionTools([realtimeTool("tool-search")]);
|
|
482
|
+
coordinator.enqueue({
|
|
483
|
+
callId: "call-search",
|
|
484
|
+
status: "completed",
|
|
485
|
+
output: "Found open-dashboard",
|
|
486
|
+
expandedTools: [realtimeTool("open-dashboard")],
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
expect(
|
|
490
|
+
coordinator.handleError(
|
|
491
|
+
"realtime_tool_manifest_1",
|
|
492
|
+
"Invalid session tools",
|
|
493
|
+
),
|
|
494
|
+
).toBe(true);
|
|
495
|
+
expect(sent.map((event) => event.type)).toEqual([
|
|
496
|
+
"session.update",
|
|
497
|
+
"conversation.item.create",
|
|
498
|
+
"response.create",
|
|
499
|
+
]);
|
|
500
|
+
const failure = JSON.parse(
|
|
501
|
+
String((sent[1]?.item as { output: string }).output),
|
|
502
|
+
) as Record<string, unknown>;
|
|
503
|
+
expect(failure.status).toBe("failed");
|
|
504
|
+
expect(failure.output).toContain("Invalid session tools");
|
|
505
|
+
expect(failure.output).toContain("Found open-dashboard");
|
|
506
|
+
expect(coordinator.handleError("some_other_event", "unrelated")).toBe(
|
|
507
|
+
false,
|
|
508
|
+
);
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
it("serializes updates and falls back after a missing confirmation", () => {
|
|
512
|
+
vi.useFakeTimers();
|
|
513
|
+
const sent: Record<string, unknown>[] = [];
|
|
514
|
+
const coordinator = createRealtimeVoiceToolManifestCoordinator(
|
|
515
|
+
(event) => sent.push(event),
|
|
516
|
+
1_000,
|
|
517
|
+
);
|
|
518
|
+
coordinator.setSessionTools([realtimeTool("tool-search")]);
|
|
519
|
+
coordinator.enqueue({
|
|
520
|
+
callId: "call-1",
|
|
521
|
+
status: "completed",
|
|
522
|
+
output: "first",
|
|
523
|
+
expandedTools: [realtimeTool("first-tool")],
|
|
524
|
+
});
|
|
525
|
+
coordinator.enqueue({
|
|
526
|
+
callId: "call-2",
|
|
527
|
+
status: "completed",
|
|
528
|
+
output: "second",
|
|
529
|
+
expandedTools: [realtimeTool("second-tool")],
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
expect(sent.map((event) => event.type)).toEqual(["session.update"]);
|
|
533
|
+
vi.advanceTimersByTime(1_000);
|
|
534
|
+
expect(sent.map((event) => event.type)).toEqual([
|
|
535
|
+
"session.update",
|
|
536
|
+
"conversation.item.create",
|
|
537
|
+
"response.create",
|
|
538
|
+
"session.update",
|
|
539
|
+
]);
|
|
540
|
+
expect(
|
|
541
|
+
JSON.parse(String((sent[1]?.item as { output: string }).output)).status,
|
|
542
|
+
).toBe("failed");
|
|
543
|
+
vi.advanceTimersByTime(1_000);
|
|
544
|
+
expect(sent.map((event) => event.type)).toEqual([
|
|
545
|
+
"session.update",
|
|
546
|
+
"conversation.item.create",
|
|
547
|
+
"response.create",
|
|
548
|
+
"session.update",
|
|
549
|
+
"conversation.item.create",
|
|
550
|
+
"response.create",
|
|
551
|
+
]);
|
|
552
|
+
expect(
|
|
553
|
+
JSON.parse(String((sent[4]?.item as { output: string }).output)).status,
|
|
554
|
+
).toBe("failed");
|
|
555
|
+
});
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
describe("extractRealtimeVoiceFunctionCalls", () => {
|
|
559
|
+
it("returns a function call as soon as its final arguments arrive", () => {
|
|
560
|
+
expect(
|
|
561
|
+
extractRealtimeVoiceFunctionCalls({
|
|
562
|
+
type: "response.function_call_arguments.done",
|
|
563
|
+
name: "navigate",
|
|
564
|
+
call_id: "call-1",
|
|
565
|
+
arguments: '{"path":"/inbox"}',
|
|
566
|
+
}),
|
|
567
|
+
).toEqual([
|
|
568
|
+
{
|
|
569
|
+
name: "navigate",
|
|
570
|
+
callId: "call-1",
|
|
571
|
+
argumentsText: '{"path":"/inbox"}',
|
|
572
|
+
},
|
|
573
|
+
]);
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
it("falls back to completed function items on response.done", () => {
|
|
577
|
+
expect(
|
|
578
|
+
extractRealtimeVoiceFunctionCalls({
|
|
579
|
+
type: "response.done",
|
|
580
|
+
response: {
|
|
581
|
+
status: "completed",
|
|
582
|
+
output: [
|
|
583
|
+
{ type: "message", role: "assistant" },
|
|
584
|
+
{
|
|
585
|
+
type: "function_call",
|
|
586
|
+
name: "view-screen",
|
|
587
|
+
call_id: "call-2",
|
|
588
|
+
arguments: "{}",
|
|
589
|
+
},
|
|
590
|
+
],
|
|
591
|
+
},
|
|
592
|
+
}),
|
|
593
|
+
).toEqual([
|
|
594
|
+
{
|
|
595
|
+
name: "view-screen",
|
|
596
|
+
callId: "call-2",
|
|
597
|
+
argumentsText: "{}",
|
|
598
|
+
},
|
|
599
|
+
]);
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
it("accepts a completed function output item as a provider fallback", () => {
|
|
603
|
+
expect(
|
|
604
|
+
extractRealtimeVoiceFunctionCalls({
|
|
605
|
+
type: "response.output_item.done",
|
|
606
|
+
item: {
|
|
607
|
+
type: "function_call",
|
|
608
|
+
name: "navigate",
|
|
609
|
+
call_id: "call-output-item",
|
|
610
|
+
arguments: '{"path":"/todos"}',
|
|
611
|
+
},
|
|
612
|
+
}),
|
|
613
|
+
).toEqual([
|
|
614
|
+
{
|
|
615
|
+
name: "navigate",
|
|
616
|
+
callId: "call-output-item",
|
|
617
|
+
argumentsText: '{"path":"/todos"}',
|
|
618
|
+
},
|
|
619
|
+
]);
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
it("ignores function items from failed or cancelled responses", () => {
|
|
623
|
+
const output = [
|
|
624
|
+
{
|
|
625
|
+
type: "function_call",
|
|
626
|
+
name: "navigate",
|
|
627
|
+
call_id: "call-3",
|
|
628
|
+
arguments: "{}",
|
|
629
|
+
},
|
|
630
|
+
];
|
|
631
|
+
expect(
|
|
632
|
+
extractRealtimeVoiceFunctionCalls({
|
|
633
|
+
type: "response.done",
|
|
634
|
+
response: { status: "failed", output },
|
|
635
|
+
}),
|
|
636
|
+
).toEqual([]);
|
|
637
|
+
expect(
|
|
638
|
+
extractRealtimeVoiceFunctionCalls({
|
|
639
|
+
type: "response.done",
|
|
640
|
+
response: { status: "cancelled", output },
|
|
641
|
+
}),
|
|
642
|
+
).toEqual([]);
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
describe("extractCompletedRealtimeVoiceTranscript", () => {
|
|
647
|
+
it("accepts completed user and assistant transcripts with stable provider ids", () => {
|
|
648
|
+
expect(
|
|
649
|
+
extractCompletedRealtimeVoiceTranscript({
|
|
650
|
+
type: "conversation.item.input_audio_transcription.completed",
|
|
651
|
+
transcript: " Find the latest report. ",
|
|
652
|
+
item_id: "item-1",
|
|
653
|
+
}),
|
|
654
|
+
).toEqual({
|
|
655
|
+
role: "user",
|
|
656
|
+
text: "Find the latest report.",
|
|
657
|
+
providerId: "item-1",
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
expect(
|
|
661
|
+
extractCompletedRealtimeVoiceTranscript({
|
|
662
|
+
type: "response.output_audio_transcript.done",
|
|
663
|
+
transcript: "I found it.",
|
|
664
|
+
response_id: "response-1",
|
|
665
|
+
}),
|
|
666
|
+
).toEqual({
|
|
667
|
+
role: "assistant",
|
|
668
|
+
text: "I found it.",
|
|
669
|
+
providerId: "response-1",
|
|
670
|
+
});
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
it("ignores transcript deltas, unrelated events, and empty completed text", () => {
|
|
674
|
+
expect(
|
|
675
|
+
extractCompletedRealtimeVoiceTranscript({
|
|
676
|
+
type: "response.output_audio_transcript.delta",
|
|
677
|
+
transcript: "partial",
|
|
678
|
+
}),
|
|
679
|
+
).toBeNull();
|
|
680
|
+
expect(
|
|
681
|
+
extractCompletedRealtimeVoiceTranscript({
|
|
682
|
+
type: "response.output_audio_transcript.done",
|
|
683
|
+
transcript: " ",
|
|
684
|
+
}),
|
|
685
|
+
).toBeNull();
|
|
686
|
+
});
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
describe("Realtime voice startup and transcript ordering", () => {
|
|
690
|
+
it("requests one brief uncapped greeting when the live session starts", () => {
|
|
691
|
+
expect(createRealtimeVoiceGreetingEvent()).toEqual({
|
|
692
|
+
type: "response.create",
|
|
693
|
+
response: {
|
|
694
|
+
output_modalities: ["audio"],
|
|
695
|
+
instructions:
|
|
696
|
+
'Say exactly: "How can I help you?" Do not add anything else.',
|
|
697
|
+
},
|
|
698
|
+
});
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
it("starts the greeting exactly once across duplicate session lifecycle events", () => {
|
|
702
|
+
const send = vi.fn();
|
|
703
|
+
const greeting = createRealtimeVoiceGreetingStarter(send);
|
|
704
|
+
|
|
705
|
+
expect(greeting.start()).toBe(true);
|
|
706
|
+
expect(greeting.start()).toBe(false);
|
|
707
|
+
expect(send).toHaveBeenCalledOnce();
|
|
708
|
+
|
|
709
|
+
greeting.reset();
|
|
710
|
+
expect(greeting.start()).toBe(true);
|
|
711
|
+
expect(send).toHaveBeenCalledTimes(2);
|
|
712
|
+
});
|
|
713
|
+
|
|
714
|
+
it("queues response requests behind the active response and retries a rejected request", () => {
|
|
715
|
+
const sent: Record<string, unknown>[] = [];
|
|
716
|
+
const coordinator = createRealtimeVoiceResponseCoordinator((event) =>
|
|
717
|
+
sent.push(event),
|
|
718
|
+
);
|
|
719
|
+
|
|
720
|
+
coordinator.request();
|
|
721
|
+
coordinator.handleEvent({
|
|
722
|
+
type: "response.created",
|
|
723
|
+
response: { id: "resp-active" },
|
|
724
|
+
});
|
|
725
|
+
coordinator.request();
|
|
726
|
+
expect(sent).toHaveLength(1);
|
|
727
|
+
|
|
728
|
+
expect(
|
|
729
|
+
coordinator.handleError(
|
|
730
|
+
"Conversation already has an active response in progress: resp-active",
|
|
731
|
+
),
|
|
732
|
+
).toBe(true);
|
|
733
|
+
coordinator.handleEvent({
|
|
734
|
+
type: "response.done",
|
|
735
|
+
response: { id: "resp-active", status: "completed" },
|
|
736
|
+
});
|
|
737
|
+
|
|
738
|
+
expect(sent).toHaveLength(2);
|
|
739
|
+
expect(sent[1]).toEqual({ type: "response.create" });
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
it("drops queued work after a failed response so the next turn can start", () => {
|
|
743
|
+
const sent: Record<string, unknown>[] = [];
|
|
744
|
+
const coordinator = createRealtimeVoiceResponseCoordinator((event) =>
|
|
745
|
+
sent.push(event),
|
|
746
|
+
);
|
|
747
|
+
|
|
748
|
+
coordinator.request();
|
|
749
|
+
coordinator.handleEvent({ type: "response.created" });
|
|
750
|
+
coordinator.request();
|
|
751
|
+
coordinator.handleEvent({
|
|
752
|
+
type: "response.done",
|
|
753
|
+
response: { status: "failed" },
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
expect(sent).toHaveLength(1);
|
|
757
|
+
coordinator.request();
|
|
758
|
+
expect(sent).toHaveLength(2);
|
|
759
|
+
});
|
|
760
|
+
|
|
761
|
+
it("ignores unrelated realtime errors", () => {
|
|
762
|
+
const coordinator = createRealtimeVoiceResponseCoordinator(vi.fn());
|
|
763
|
+
|
|
764
|
+
expect(coordinator.handleError("The microphone was disconnected.")).toBe(
|
|
765
|
+
false,
|
|
766
|
+
);
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
it("publishes in conversation order when user ASR finishes after the assistant", () => {
|
|
770
|
+
const published: Array<{ role: string; text: string }> = [];
|
|
771
|
+
const sequencer = createRealtimeVoiceTranscriptSequencer((transcript) => {
|
|
772
|
+
published.push(transcript);
|
|
773
|
+
});
|
|
774
|
+
|
|
775
|
+
sequencer.handle({
|
|
776
|
+
type: "conversation.item.added",
|
|
777
|
+
item: { id: "user-1", type: "message", role: "user" },
|
|
778
|
+
});
|
|
779
|
+
sequencer.handle({
|
|
780
|
+
type: "conversation.item.added",
|
|
781
|
+
item: { id: "assistant-1", type: "message", role: "assistant" },
|
|
782
|
+
});
|
|
783
|
+
sequencer.handle({
|
|
784
|
+
type: "response.output_audio_transcript.done",
|
|
785
|
+
item_id: "assistant-1",
|
|
786
|
+
response_id: "response-1",
|
|
787
|
+
transcript: "I can help with that.",
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
expect(published).toEqual([]);
|
|
791
|
+
|
|
792
|
+
sequencer.handle({
|
|
793
|
+
type: "conversation.item.input_audio_transcription.completed",
|
|
794
|
+
item_id: "user-1",
|
|
795
|
+
transcript: "Can you help me?",
|
|
796
|
+
});
|
|
797
|
+
|
|
798
|
+
expect(published).toEqual([
|
|
799
|
+
expect.objectContaining({ role: "user", text: "Can you help me?" }),
|
|
800
|
+
expect.objectContaining({
|
|
801
|
+
role: "assistant",
|
|
802
|
+
text: "I can help with that.",
|
|
803
|
+
}),
|
|
804
|
+
]);
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
it("does not deadlock later turns when input transcription fails", () => {
|
|
808
|
+
const published: Array<{ role: string; text: string }> = [];
|
|
809
|
+
const sequencer = createRealtimeVoiceTranscriptSequencer((transcript) => {
|
|
810
|
+
published.push(transcript);
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
sequencer.handle({
|
|
814
|
+
type: "conversation.item.created",
|
|
815
|
+
item: { id: "user-1", type: "message", role: "user" },
|
|
816
|
+
});
|
|
817
|
+
sequencer.handle({
|
|
818
|
+
type: "conversation.item.created",
|
|
819
|
+
item: { id: "assistant-1", type: "message", role: "assistant" },
|
|
820
|
+
});
|
|
821
|
+
sequencer.handle({
|
|
822
|
+
type: "response.output_audio_transcript.done",
|
|
823
|
+
item_id: "assistant-1",
|
|
824
|
+
transcript: "Still here.",
|
|
825
|
+
});
|
|
826
|
+
sequencer.handle({
|
|
827
|
+
type: "conversation.item.input_audio_transcription.failed",
|
|
828
|
+
item_id: "user-1",
|
|
829
|
+
});
|
|
830
|
+
|
|
831
|
+
expect(published).toEqual([
|
|
832
|
+
expect.objectContaining({ role: "assistant", text: "Still here." }),
|
|
833
|
+
]);
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
it("matches legacy completions without item_id to a reserved role slot", () => {
|
|
837
|
+
const published: Array<{ role: string; text: string }> = [];
|
|
838
|
+
const sequencer = createRealtimeVoiceTranscriptSequencer((transcript) => {
|
|
839
|
+
published.push(transcript);
|
|
840
|
+
});
|
|
841
|
+
|
|
842
|
+
sequencer.handle({
|
|
843
|
+
type: "conversation.item.added",
|
|
844
|
+
item: { id: "user-1", type: "message", role: "user" },
|
|
845
|
+
});
|
|
846
|
+
sequencer.handle({
|
|
847
|
+
type: "conversation.item.added",
|
|
848
|
+
item: { id: "assistant-1", type: "message", role: "assistant" },
|
|
849
|
+
});
|
|
850
|
+
sequencer.handle({
|
|
851
|
+
type: "response.output_audio_transcript.done",
|
|
852
|
+
response_id: "response-1",
|
|
853
|
+
transcript: "First answer.",
|
|
854
|
+
});
|
|
855
|
+
sequencer.handle({
|
|
856
|
+
type: "conversation.item.input_audio_transcription.completed",
|
|
857
|
+
item_id: "user-1",
|
|
858
|
+
transcript: "First question.",
|
|
859
|
+
});
|
|
860
|
+
sequencer.handle({
|
|
861
|
+
type: "conversation.item.added",
|
|
862
|
+
item: { id: "assistant-2", type: "message", role: "assistant" },
|
|
863
|
+
});
|
|
864
|
+
sequencer.handle({
|
|
865
|
+
type: "response.output_audio_transcript.done",
|
|
866
|
+
item_id: "assistant-2",
|
|
867
|
+
transcript: "Second answer.",
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
expect(published.map(({ text }) => text)).toEqual([
|
|
871
|
+
"First question.",
|
|
872
|
+
"First answer.",
|
|
873
|
+
"Second answer.",
|
|
874
|
+
]);
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
it("ignores duplicate completion events and releases interrupted output", () => {
|
|
878
|
+
const published: Array<{ role: string; text: string }> = [];
|
|
879
|
+
const sequencer = createRealtimeVoiceTranscriptSequencer((transcript) => {
|
|
880
|
+
published.push(transcript);
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
sequencer.handle({
|
|
884
|
+
type: "conversation.item.added",
|
|
885
|
+
item: { id: "assistant-1", type: "message", role: "assistant" },
|
|
886
|
+
});
|
|
887
|
+
const completed = {
|
|
888
|
+
type: "response.output_audio_transcript.done",
|
|
889
|
+
item_id: "assistant-1",
|
|
890
|
+
transcript: "Only once.",
|
|
891
|
+
};
|
|
892
|
+
sequencer.handle(completed);
|
|
893
|
+
sequencer.handle(completed);
|
|
894
|
+
sequencer.handle({
|
|
895
|
+
type: "conversation.item.added",
|
|
896
|
+
item: { id: "assistant-interrupted", type: "message", role: "assistant" },
|
|
897
|
+
});
|
|
898
|
+
sequencer.handle({
|
|
899
|
+
type: "response.done",
|
|
900
|
+
response: {
|
|
901
|
+
status: "cancelled",
|
|
902
|
+
output: [{ id: "assistant-interrupted", type: "message" }],
|
|
903
|
+
},
|
|
904
|
+
});
|
|
905
|
+
sequencer.handle({
|
|
906
|
+
type: "conversation.item.added",
|
|
907
|
+
item: { id: "assistant-2", type: "message", role: "assistant" },
|
|
908
|
+
});
|
|
909
|
+
sequencer.handle({
|
|
910
|
+
type: "response.output_audio_transcript.done",
|
|
911
|
+
item_id: "assistant-2",
|
|
912
|
+
transcript: "After interruption.",
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
expect(published.map(({ text }) => text)).toEqual([
|
|
916
|
+
"Only once.",
|
|
917
|
+
"After interruption.",
|
|
918
|
+
]);
|
|
919
|
+
});
|
|
920
|
+
});
|
|
921
|
+
|
|
922
|
+
describe("shouldRestoreRealtimeVoiceTranscriptThread", () => {
|
|
923
|
+
it("restores the captured transcript when it remains active or chat has no active thread", () => {
|
|
924
|
+
expect(
|
|
925
|
+
shouldRestoreRealtimeVoiceTranscriptThread(
|
|
926
|
+
"voice-thread",
|
|
927
|
+
"voice-thread",
|
|
928
|
+
),
|
|
929
|
+
).toBe(true);
|
|
930
|
+
expect(
|
|
931
|
+
shouldRestoreRealtimeVoiceTranscriptThread("voice-thread", undefined),
|
|
932
|
+
).toBe(true);
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
it("does not restore over a thread selected while voice mode was active", () => {
|
|
936
|
+
expect(
|
|
937
|
+
shouldRestoreRealtimeVoiceTranscriptThread(
|
|
938
|
+
"voice-thread",
|
|
939
|
+
"other-thread",
|
|
940
|
+
),
|
|
941
|
+
).toBe(false);
|
|
942
|
+
expect(
|
|
943
|
+
shouldRestoreRealtimeVoiceTranscriptThread(undefined, "other-thread"),
|
|
944
|
+
).toBe(false);
|
|
945
|
+
});
|
|
946
|
+
|
|
947
|
+
it("recognizes the authoritative missing-provider response", () => {
|
|
948
|
+
expect(isRealtimeVoiceSetupRequiredError({ status: 409 })).toBe(true);
|
|
949
|
+
expect(isRealtimeVoiceSetupRequiredError({ status: 400 })).toBe(false);
|
|
950
|
+
expect(isRealtimeVoiceSetupRequiredError(new Error("offline"))).toBe(false);
|
|
951
|
+
});
|
|
952
|
+
});
|