@athenaintel/react 0.43.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -8
- package/dist/agent-runtime/src/answer-label.cjs +137 -0
- package/dist/agent-runtime/src/answer-label.cjs.map +1 -0
- package/dist/agent-runtime/src/answer-label.d.ts +104 -0
- package/dist/agent-runtime/src/answer-label.js +137 -0
- package/dist/agent-runtime/src/answer-label.js.map +1 -0
- package/dist/agent-runtime/src/answer-rows.cjs +180 -0
- package/dist/agent-runtime/src/answer-rows.cjs.map +1 -0
- package/dist/agent-runtime/src/answer-rows.d.ts +86 -0
- package/dist/agent-runtime/src/answer-rows.js +180 -0
- package/dist/agent-runtime/src/answer-rows.js.map +1 -0
- package/dist/agent-runtime/src/call-recap.cjs +319 -0
- package/dist/agent-runtime/src/call-recap.cjs.map +1 -0
- package/dist/agent-runtime/src/call-recap.d.ts +142 -0
- package/dist/agent-runtime/src/call-recap.js +319 -0
- package/dist/agent-runtime/src/call-recap.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-store.cjs +1 -0
- package/dist/agent-runtime/src/chat-outbox-store.cjs.map +1 -1
- package/dist/agent-runtime/src/chat-outbox-store.d.ts +7 -0
- package/dist/agent-runtime/src/chat-outbox-store.js +1 -0
- package/dist/agent-runtime/src/chat-outbox-store.js.map +1 -1
- package/dist/agent-runtime/src/chat-outbox.cjs +46 -5
- package/dist/agent-runtime/src/chat-outbox.cjs.map +1 -1
- package/dist/agent-runtime/src/chat-outbox.d.ts +29 -0
- package/dist/agent-runtime/src/chat-outbox.js +46 -5
- package/dist/agent-runtime/src/chat-outbox.js.map +1 -1
- package/dist/agent-runtime/src/client-tool-bridge.cjs +15 -15
- package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -1
- package/dist/agent-runtime/src/conversation-index.cjs +8 -8
- package/dist/agent-runtime/src/conversation-index.cjs.map +1 -1
- package/dist/agent-runtime/src/conversation-index.d.ts +7 -0
- package/dist/agent-runtime/src/conversation-index.js.map +1 -1
- package/dist/agent-runtime/src/conversation-list.cjs +2 -1
- package/dist/agent-runtime/src/conversation-list.cjs.map +1 -1
- package/dist/agent-runtime/src/conversation-list.d.ts +19 -3
- package/dist/agent-runtime/src/conversation-list.js +2 -1
- package/dist/agent-runtime/src/conversation-list.js.map +1 -1
- package/dist/agent-runtime/src/decision-checks.cjs +207 -0
- package/dist/agent-runtime/src/decision-checks.cjs.map +1 -0
- package/dist/agent-runtime/src/decision-checks.d.ts +142 -0
- package/dist/agent-runtime/src/decision-checks.js +207 -0
- package/dist/agent-runtime/src/decision-checks.js.map +1 -0
- package/dist/agent-runtime/src/desktop-handoff.d.ts +12 -0
- package/dist/agent-runtime/src/errors.cjs +18 -0
- package/dist/agent-runtime/src/errors.cjs.map +1 -1
- package/dist/agent-runtime/src/errors.d.ts +7 -0
- package/dist/agent-runtime/src/errors.js +18 -0
- package/dist/agent-runtime/src/errors.js.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs +12 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +6 -6
- package/dist/agent-runtime/src/generated/runconfig-contract.js +12 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
- package/dist/agent-runtime/src/handoff-arrival.cjs +60 -0
- package/dist/agent-runtime/src/handoff-arrival.cjs.map +1 -0
- package/dist/agent-runtime/src/handoff-arrival.d.ts +46 -0
- package/dist/agent-runtime/src/handoff-arrival.js +60 -0
- package/dist/agent-runtime/src/handoff-arrival.js.map +1 -0
- package/dist/agent-runtime/src/index.d.ts +16 -9
- package/dist/agent-runtime/src/interrupts.cjs +71 -19
- package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
- package/dist/agent-runtime/src/interrupts.d.ts +40 -3
- package/dist/agent-runtime/src/interrupts.js +56 -4
- package/dist/agent-runtime/src/interrupts.js.map +1 -1
- package/dist/agent-runtime/src/lane-history.cjs +8 -8
- package/dist/agent-runtime/src/lane-history.cjs.map +1 -1
- package/dist/agent-runtime/src/messages.cjs +43 -8
- package/dist/agent-runtime/src/messages.cjs.map +1 -1
- package/dist/agent-runtime/src/messages.d.ts +25 -3
- package/dist/agent-runtime/src/messages.js +43 -8
- package/dist/agent-runtime/src/messages.js.map +1 -1
- package/dist/agent-runtime/src/model-context.cjs +3 -2
- package/dist/agent-runtime/src/model-context.cjs.map +1 -1
- package/dist/agent-runtime/src/model-context.d.ts +6 -1
- package/dist/agent-runtime/src/model-context.js +3 -2
- package/dist/agent-runtime/src/model-context.js.map +1 -1
- package/dist/agent-runtime/src/offline-status.cjs +36 -0
- package/dist/agent-runtime/src/offline-status.cjs.map +1 -0
- package/dist/agent-runtime/src/offline-status.d.ts +118 -3
- package/dist/agent-runtime/src/offline-status.js +36 -0
- package/dist/agent-runtime/src/offline-status.js.map +1 -0
- package/dist/agent-runtime/src/queue.cjs +0 -9
- package/dist/agent-runtime/src/queue.cjs.map +1 -1
- package/dist/agent-runtime/src/queue.js +0 -9
- package/dist/agent-runtime/src/queue.js.map +1 -1
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +9 -9
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
- package/dist/agent-runtime/src/runtime-catalog.cjs +42 -0
- package/dist/agent-runtime/src/runtime-catalog.cjs.map +1 -0
- package/dist/agent-runtime/src/runtime-catalog.d.ts +35 -0
- package/dist/agent-runtime/src/runtime-catalog.js +42 -0
- package/dist/agent-runtime/src/runtime-catalog.js.map +1 -0
- package/dist/agent-runtime/src/runtime-messages.cjs.map +1 -1
- package/dist/agent-runtime/src/runtime-messages.d.ts +1 -1
- package/dist/agent-runtime/src/runtime-messages.js.map +1 -1
- package/dist/agent-runtime/src/runtime.d.ts +41 -0
- package/dist/agent-runtime/src/send-recovery.cjs +37 -3
- package/dist/agent-runtime/src/send-recovery.cjs.map +1 -1
- package/dist/agent-runtime/src/send-recovery.d.ts +19 -0
- package/dist/agent-runtime/src/send-recovery.js +37 -3
- package/dist/agent-runtime/src/send-recovery.js.map +1 -1
- package/dist/agent-runtime/src/statewire-suspended.cjs +3 -3
- package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -1
- package/dist/agent-runtime/src/subagents.cjs +32 -2
- package/dist/agent-runtime/src/subagents.cjs.map +1 -1
- package/dist/agent-runtime/src/subagents.d.ts +9 -0
- package/dist/agent-runtime/src/subagents.js +30 -0
- package/dist/agent-runtime/src/subagents.js.map +1 -1
- package/dist/agent-runtime/src/thread-driver.cjs +67 -0
- package/dist/agent-runtime/src/thread-driver.cjs.map +1 -0
- package/dist/agent-runtime/src/thread-driver.d.ts +49 -0
- package/dist/agent-runtime/src/thread-driver.js +67 -0
- package/dist/agent-runtime/src/thread-driver.js.map +1 -0
- package/dist/agent-runtime/src/thread-handoff-flow-machine.d.ts +172 -0
- package/dist/agent-runtime/src/thread-handoff-protocol.d.ts +868 -0
- package/dist/agent-runtime/src/thread-handoff-qr.d.ts +11 -0
- package/dist/agent-runtime/src/thread-handoff.d.ts +3 -364
- package/dist/agent-runtime/src/thread-status.cjs +3 -3
- package/dist/agent-runtime/src/thread-status.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.cjs +210 -25
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.d.ts +12 -0
- package/dist/agent-runtime/src/tool-metadata.js +210 -25
- package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
- package/dist/agent-runtime/src/tool-names.cjs +2 -0
- package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-names.d.ts +2 -0
- package/dist/agent-runtime/src/tool-names.js +2 -0
- package/dist/agent-runtime/src/tool-names.js.map +1 -1
- package/dist/agent-runtime/src/types.d.ts +10 -2
- package/dist/agent-runtime/src/use-conversation-list.cjs +14 -13
- package/dist/agent-runtime/src/use-conversation-list.cjs.map +1 -1
- package/dist/agent-runtime/src/use-conversation-list.d.ts +6 -0
- package/dist/agent-runtime/src/use-conversation-list.js +3 -2
- package/dist/agent-runtime/src/use-conversation-list.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +45 -20
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +10 -3
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +27 -2
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-config.cjs +14 -14
- package/dist/agent-runtime/src/use-deep-agent-config.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs +6 -6
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +40 -22
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +17 -0
- package/dist/agent-runtime/src/use-deep-agent-runtime.js +24 -6
- package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs +45 -45
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs +588 -130
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +162 -10
- package/dist/agent-runtime/src/use-deep-agent-voice.js +529 -71
- package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs +26 -26
- package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -1
- package/dist/agent-runtime/src/use-historical-edit-attachments.cjs +4 -4
- package/dist/agent-runtime/src/use-historical-edit-attachments.cjs.map +1 -1
- package/dist/agent-runtime/src/use-thread-handoff-flow.d.ts +34 -26
- package/dist/agent-runtime/src/voice-earcon.cjs +139 -0
- package/dist/agent-runtime/src/voice-earcon.cjs.map +1 -0
- package/dist/agent-runtime/src/voice-earcon.d.ts +38 -0
- package/dist/agent-runtime/src/voice-earcon.js +139 -0
- package/dist/agent-runtime/src/voice-earcon.js.map +1 -0
- package/dist/agent-runtime/src/voice-media.cjs +117 -0
- package/dist/agent-runtime/src/voice-media.cjs.map +1 -0
- package/dist/agent-runtime/src/voice-media.d.ts +63 -0
- package/dist/agent-runtime/src/voice-media.js +117 -0
- package/dist/agent-runtime/src/voice-media.js.map +1 -0
- package/dist/agent-runtime/src/voice-presentation.cjs +2 -0
- package/dist/agent-runtime/src/voice-presentation.cjs.map +1 -1
- package/dist/agent-runtime/src/voice-presentation.js +2 -0
- package/dist/agent-runtime/src/voice-presentation.js.map +1 -1
- package/dist/agent-runtime/src/voice-wire-types.d.ts +32 -0
- package/dist/assets/AssetPanel.cjs +11 -11
- package/dist/assets/AssetPanel.cjs.map +1 -1
- package/dist/assets/AthenaAssetEmbed.cjs +11 -9
- package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
- package/dist/assets/AthenaAssetEmbed.d.ts +18 -5
- package/dist/assets/AthenaAssetEmbed.js +4 -2
- package/dist/assets/AthenaAssetEmbed.js.map +1 -1
- package/dist/assets/AthenaLayout.cjs +16 -16
- package/dist/assets/AthenaLayout.cjs.map +1 -1
- package/dist/assets/use-asset-content.cjs +4 -4
- package/dist/assets/use-asset-content.cjs.map +1 -1
- package/dist/assets/use-asset-embed.cjs +14 -7
- package/dist/assets/use-asset-embed.cjs.map +1 -1
- package/dist/assets/use-asset-embed.d.ts +23 -6
- package/dist/assets/use-asset-embed.js +10 -3
- package/dist/assets/use-asset-embed.js.map +1 -1
- package/dist/auth/AthenaAuthContext.cjs +3 -3
- package/dist/auth/AthenaAuthContext.cjs.map +1 -1
- package/dist/auth/AthenaAuthProvider.cjs +8 -8
- package/dist/auth/AthenaAuthProvider.cjs.map +1 -1
- package/dist/auth/AthenaCredentialSourceContext.cjs +5 -5
- package/dist/auth/AthenaCredentialSourceContext.cjs.map +1 -1
- package/dist/auth/AthenaSSOProvider.cjs +14 -14
- package/dist/auth/AthenaSSOProvider.cjs.map +1 -1
- package/dist/auth/credential-source.cjs +26 -13
- package/dist/auth/credential-source.cjs.map +1 -1
- package/dist/auth/credential-source.d.ts +8 -0
- package/dist/auth/credential-source.js +26 -13
- package/dist/auth/credential-source.js.map +1 -1
- package/dist/catalog/agent-model-options.cjs +25 -17
- package/dist/catalog/agent-model-options.cjs.map +1 -1
- package/dist/catalog/agent-model-options.d.ts +38 -5
- package/dist/catalog/agent-model-options.js +25 -17
- package/dist/catalog/agent-model-options.js.map +1 -1
- package/dist/catalog/channel-refusal.cjs +36 -0
- package/dist/catalog/channel-refusal.cjs.map +1 -0
- package/dist/catalog/channel-refusal.d.ts +29 -0
- package/dist/catalog/channel-refusal.js +36 -0
- package/dist/catalog/channel-refusal.js.map +1 -0
- package/dist/catalog/chat-pickers.cjs +60 -24
- package/dist/catalog/chat-pickers.cjs.map +1 -1
- package/dist/catalog/chat-pickers.d.ts +12 -2
- package/dist/catalog/chat-pickers.js +56 -20
- package/dist/catalog/chat-pickers.js.map +1 -1
- package/dist/catalog/runtime-catalog.cjs +89 -23
- package/dist/catalog/runtime-catalog.cjs.map +1 -1
- package/dist/catalog/runtime-catalog.d.ts +8 -2
- package/dist/catalog/runtime-catalog.js +83 -17
- package/dist/catalog/runtime-catalog.js.map +1 -1
- package/dist/catalog/use-athena-chat-mode.cjs +12 -12
- package/dist/catalog/use-athena-chat-mode.cjs.map +1 -1
- package/dist/chat/AthenaChat.cjs +155 -67
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +42 -2
- package/dist/chat/AthenaChat.js +106 -18
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/AthenaChatErrorBoundary.cjs +3 -3
- package/dist/chat/AthenaChatErrorBoundary.cjs.map +1 -1
- package/dist/chat/DrivingOnChip.cjs +23 -0
- package/dist/chat/DrivingOnChip.cjs.map +1 -0
- package/dist/chat/DrivingOnChip.d.ts +17 -0
- package/dist/chat/DrivingOnChip.js +23 -0
- package/dist/chat/DrivingOnChip.js.map +1 -0
- package/dist/chat/StatewireApprovalCard.cjs +166 -37
- package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
- package/dist/chat/StatewireApprovalCard.d.ts +91 -2
- package/dist/chat/StatewireApprovalCard.js +156 -27
- package/dist/chat/StatewireApprovalCard.js.map +1 -1
- package/dist/chat/StatewireClientToolBridge.cjs +2 -2
- package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.cjs +81 -69
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.d.ts +25 -13
- package/dist/chat/StatewireQueuedMessages.js +73 -61
- package/dist/chat/StatewireQueuedMessages.js.map +1 -1
- package/dist/chat/WaitingOnYouBanner.cjs +9 -5
- package/dist/chat/WaitingOnYouBanner.cjs.map +1 -1
- package/dist/chat/WaitingOnYouBanner.js +7 -3
- package/dist/chat/WaitingOnYouBanner.js.map +1 -1
- package/dist/chat/athena-chat-welcome.cjs +2 -2
- package/dist/chat/athena-chat-welcome.cjs.map +1 -1
- package/dist/chat/athena-citation-links.cjs +5 -5
- package/dist/chat/athena-citation-links.cjs.map +1 -1
- package/dist/chat/athena-composer-controls.cjs +26 -16
- package/dist/chat/athena-composer-controls.cjs.map +1 -1
- package/dist/chat/athena-composer-controls.d.ts +6 -0
- package/dist/chat/athena-composer-controls.js +26 -16
- package/dist/chat/athena-composer-controls.js.map +1 -1
- package/dist/chat/athena-turn-end-status.cjs +42 -0
- package/dist/chat/athena-turn-end-status.cjs.map +1 -0
- package/dist/chat/athena-turn-end-status.d.ts +24 -0
- package/dist/chat/athena-turn-end-status.js +42 -0
- package/dist/chat/athena-turn-end-status.js.map +1 -0
- package/dist/chat/browser-decision-check.cjs +131 -0
- package/dist/chat/browser-decision-check.cjs.map +1 -0
- package/dist/chat/browser-decision-check.d.ts +61 -0
- package/dist/chat/browser-decision-check.js +131 -0
- package/dist/chat/browser-decision-check.js.map +1 -0
- package/dist/chat/chat-outbox-rows.cjs +3 -3
- package/dist/chat/chat-outbox-rows.cjs.map +1 -1
- package/dist/chat/chat-voice-controls.cjs +96 -29
- package/dist/chat/chat-voice-controls.cjs.map +1 -1
- package/dist/chat/chat-voice-controls.d.ts +42 -3
- package/dist/chat/chat-voice-controls.js +92 -25
- package/dist/chat/chat-voice-controls.js.map +1 -1
- package/dist/chat/composer-keyboard-hint.cjs +5 -5
- package/dist/chat/composer-keyboard-hint.cjs.map +1 -1
- package/dist/chat/device-operation.cjs +29 -0
- package/dist/chat/device-operation.cjs.map +1 -0
- package/dist/chat/device-operation.d.ts +34 -0
- package/dist/chat/device-operation.js +29 -0
- package/dist/chat/device-operation.js.map +1 -0
- package/dist/chat/super-grouping/CollapsibleGroup.cjs +14 -14
- package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -1
- package/dist/chat/super-grouping/GroupedMessageParts.cjs +4 -4
- package/dist/chat/super-grouping/GroupedMessageParts.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +52 -36
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +19 -4
- package/dist/chat/super-grouping/SuperGroupingCard.js +29 -13
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +32 -32
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.js +3 -3
- package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.cjs +73 -40
- package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.d.ts +10 -2
- package/dist/chat/super-grouping/ToolTimeline.js +69 -36
- package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.cjs +47 -12
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.d.ts +21 -0
- package/dist/chat/super-grouping/activity-timeline.js +47 -12
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
- package/dist/chat/super-grouping/grouping-function.cjs +4 -0
- package/dist/chat/super-grouping/grouping-function.cjs.map +1 -1
- package/dist/chat/super-grouping/grouping-function.d.ts +7 -0
- package/dist/chat/super-grouping/grouping-function.js +5 -1
- package/dist/chat/super-grouping/grouping-function.js.map +1 -1
- package/dist/chat/super-grouping/index.cjs +6 -0
- package/dist/chat/super-grouping/index.cjs.map +1 -1
- package/dist/chat/super-grouping/index.d.ts +5 -2
- package/dist/chat/super-grouping/index.js +7 -1
- package/dist/chat/super-grouping/index.js.map +1 -1
- package/dist/chat/super-grouping/tool-part-placement.cjs +17 -0
- package/dist/chat/super-grouping/tool-part-placement.cjs.map +1 -0
- package/dist/chat/super-grouping/tool-part-placement.d.ts +22 -0
- package/dist/chat/super-grouping/tool-part-placement.js +17 -0
- package/dist/chat/super-grouping/tool-part-placement.js.map +1 -0
- package/dist/chat/thread-scroll-to-bottom.cjs +2 -2
- package/dist/chat/thread-scroll-to-bottom.cjs.map +1 -1
- package/dist/chat/thread-scroll-to-bottom.d.ts +10 -7
- package/dist/chat/thread-scroll-to-bottom.js +2 -2
- package/dist/chat/thread-scroll-to-bottom.js.map +1 -1
- package/dist/chat/tooltip-icon-button.cjs +2 -2
- package/dist/chat/tooltip-icon-button.cjs.map +1 -1
- package/dist/chat/use-athena-voice-live.cjs +11 -0
- package/dist/chat/use-athena-voice-live.cjs.map +1 -0
- package/dist/chat/use-athena-voice-live.d.ts +11 -0
- package/dist/chat/use-athena-voice-live.js +11 -0
- package/dist/chat/use-athena-voice-live.js.map +1 -0
- package/dist/chat/use-statewire-approval-request.cjs +56 -24
- package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
- package/dist/chat/use-statewire-approval-request.d.ts +33 -4
- package/dist/chat/use-statewire-approval-request.js +41 -9
- package/dist/chat/use-statewire-approval-request.js.map +1 -1
- package/dist/chat-ui/auth/sign-in-card.cjs +2 -2
- package/dist/chat-ui/auth/sign-in-card.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.cjs +138 -107
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +20 -4
- package/dist/chat-ui/composer/tiptap-composer.js +85 -54
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/header/conversation-history-panel.cjs +49 -23
- package/dist/chat-ui/header/conversation-history-panel.cjs.map +1 -1
- package/dist/chat-ui/header/conversation-history-panel.d.ts +12 -1
- package/dist/chat-ui/header/conversation-history-panel.js +38 -12
- package/dist/chat-ui/header/conversation-history-panel.js.map +1 -1
- package/dist/chat-ui/index.cjs +21 -0
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +8 -1
- package/dist/chat-ui/index.js +21 -0
- package/dist/chat-ui/index.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +4 -4
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs +10 -9
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js +3 -2
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs +2 -2
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs +29 -6
- package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-list.d.ts +7 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-list.js +25 -2
- package/dist/chat-ui/mentions/suggestions/components/menu-list.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs +2 -2
- package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs +2 -2
- package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +3 -3
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs +56 -2
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.d.ts +12 -0
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.js +56 -2
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +24 -3
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +7 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +24 -3
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +35 -13
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +15 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +28 -6
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs +9 -6
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.d.ts +3 -0
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js +5 -2
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js.map +1 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs +45 -10
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +24 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.js +46 -11
- package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -1
- package/dist/chat-ui/mentions/use-member-avatar.cjs +4 -4
- package/dist/chat-ui/mentions/use-member-avatar.cjs.map +1 -1
- package/dist/chat-ui/mentions/use-mention-asset.cjs +3 -3
- package/dist/chat-ui/mentions/use-mention-asset.cjs.map +1 -1
- package/dist/chat-ui/messages/answer-label.cjs +42 -0
- package/dist/chat-ui/messages/answer-label.cjs.map +1 -0
- package/dist/chat-ui/messages/answer-label.d.ts +33 -0
- package/dist/chat-ui/messages/answer-label.js +42 -0
- package/dist/chat-ui/messages/answer-label.js.map +1 -0
- package/dist/chat-ui/messages/arrival-animation.cjs +13 -0
- package/dist/chat-ui/messages/arrival-animation.cjs.map +1 -0
- package/dist/chat-ui/messages/arrival-animation.d.ts +14 -0
- package/dist/chat-ui/messages/arrival-animation.js +13 -0
- package/dist/chat-ui/messages/arrival-animation.js.map +1 -0
- package/dist/chat-ui/messages/continue-pill.cjs +5 -5
- package/dist/chat-ui/messages/continue-pill.cjs.map +1 -1
- package/dist/chat-ui/messages/from-the-call-card.cjs +124 -0
- package/dist/chat-ui/messages/from-the-call-card.cjs.map +1 -0
- package/dist/chat-ui/messages/from-the-call-card.d.ts +17 -0
- package/dist/chat-ui/messages/from-the-call-card.js +124 -0
- package/dist/chat-ui/messages/from-the-call-card.js.map +1 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.cjs +44 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.cjs.map +1 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.d.ts +17 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.js +44 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.js.map +1 -0
- package/dist/chat-ui/messages/message-actions-config.cjs +3 -3
- package/dist/chat-ui/messages/message-actions-config.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.cjs +8 -4
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.js +5 -1
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/messages/message-images.cjs +66 -0
- package/dist/chat-ui/messages/message-images.cjs.map +1 -0
- package/dist/chat-ui/messages/message-images.d.ts +16 -0
- package/dist/chat-ui/messages/message-images.js +66 -0
- package/dist/chat-ui/messages/message-images.js.map +1 -0
- package/dist/chat-ui/messages/user-edit-composer.cjs +2 -2
- package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
- package/dist/chat-ui/messages/wake-marker.cjs +3 -3
- package/dist/chat-ui/messages/wake-marker.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-link.cjs +3 -2
- package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-link.d.ts +4 -0
- package/dist/chat-ui/rich-text/chat-link.js +4 -3
- package/dist/chat-ui/rich-text/chat-link.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-message-body.cjs +9 -8
- package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-message-body.d.ts +12 -0
- package/dist/chat-ui/rich-text/chat-message-body.js +2 -1
- package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-node-views.cjs +6 -6
- package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
- package/dist/chat-ui/rich-text/dom-output-spec.cjs +2 -2
- package/dist/chat-ui/rich-text/dom-output-spec.cjs.map +1 -1
- package/dist/chat-ui/statewire.cjs +3 -0
- package/dist/chat-ui/statewire.cjs.map +1 -1
- package/dist/chat-ui/statewire.d.ts +2 -1
- package/dist/chat-ui/statewire.js +3 -0
- package/dist/chat-ui/statewire.js.map +1 -1
- package/dist/chat-ui/thread/chat-thread-shell.cjs +45 -14
- package/dist/chat-ui/thread/chat-thread-shell.cjs.map +1 -1
- package/dist/chat-ui/thread/chat-thread-shell.d.ts +16 -2
- package/dist/chat-ui/thread/chat-thread-shell.js +37 -6
- package/dist/chat-ui/thread/chat-thread-shell.js.map +1 -1
- package/dist/chat-ui/thread/composer-send-or-stop.cjs +30 -20
- package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -1
- package/dist/chat-ui/thread/composer-send-or-stop.d.ts +8 -0
- package/dist/chat-ui/thread/composer-send-or-stop.js +29 -19
- package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.cjs +20 -21
- package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.js +3 -4
- package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
- package/dist/chat-ui/thread/thread-loading-overlay.cjs +5 -5
- package/dist/chat-ui/thread/thread-loading-overlay.cjs.map +1 -1
- package/dist/collab/client.cjs +52 -3
- package/dist/collab/client.cjs.map +1 -1
- package/dist/collab/client.d.ts +27 -0
- package/dist/collab/client.js +52 -3
- package/dist/collab/client.js.map +1 -1
- package/dist/collab/document-status.cjs +150 -0
- package/dist/collab/document-status.cjs.map +1 -0
- package/dist/collab/document-status.d.ts +68 -0
- package/dist/collab/document-status.js +150 -0
- package/dist/collab/document-status.js.map +1 -0
- package/dist/collab/index.cjs +7 -0
- package/dist/collab/index.cjs.map +1 -1
- package/dist/collab/index.d.ts +6 -1
- package/dist/collab/index.js +7 -0
- package/dist/collab/index.js.map +1 -1
- package/dist/collab/presence-react.cjs +11 -11
- package/dist/collab/presence-react.cjs.map +1 -1
- package/dist/collab/react.cjs +6 -6
- package/dist/collab/react.cjs.map +1 -1
- package/dist/composer/AttachmentContext.cjs +24 -11
- package/dist/composer/AttachmentContext.cjs.map +1 -1
- package/dist/composer/AttachmentContext.js +18 -5
- package/dist/composer/AttachmentContext.js.map +1 -1
- package/dist/composer/ComposerAttachmentPreview.cjs +78 -23
- package/dist/composer/ComposerAttachmentPreview.cjs.map +1 -1
- package/dist/composer/ComposerAttachmentPreview.d.ts +5 -3
- package/dist/composer/ComposerAttachmentPreview.js +79 -24
- package/dist/composer/ComposerAttachmentPreview.js.map +1 -1
- package/dist/composer/ComposerDropZone.cjs +7 -7
- package/dist/composer/ComposerDropZone.cjs.map +1 -1
- package/dist/composer/FileUploadButton.cjs +37 -22
- package/dist/composer/FileUploadButton.cjs.map +1 -1
- package/dist/composer/FileUploadButton.d.ts +6 -0
- package/dist/composer/FileUploadButton.js +34 -19
- package/dist/composer/FileUploadButton.js.map +1 -1
- package/dist/composer/QuoteContext.cjs +8 -8
- package/dist/composer/QuoteContext.cjs.map +1 -1
- package/dist/composer/composer-handoff.cjs +4 -4
- package/dist/composer/composer-handoff.cjs.map +1 -1
- package/dist/composer/index.d.ts +1 -1
- package/dist/composer/useAppendToComposer.cjs +4 -4
- package/dist/composer/useAppendToComposer.cjs.map +1 -1
- package/dist/composer/useAttachFiles.cjs +23 -6
- package/dist/composer/useAttachFiles.cjs.map +1 -1
- package/dist/composer/useAttachFiles.d.ts +15 -7
- package/dist/composer/useAttachFiles.js +22 -5
- package/dist/composer/useAttachFiles.js.map +1 -1
- package/dist/composer/useComposerAttachment.cjs +4 -4
- package/dist/composer/useComposerAttachment.cjs.map +1 -1
- package/dist/composer/useFileUpload.cjs +21 -16
- package/dist/composer/useFileUpload.cjs.map +1 -1
- package/dist/composer/useFileUpload.d.ts +12 -0
- package/dist/composer/useFileUpload.js +12 -7
- package/dist/composer/useFileUpload.js.map +1 -1
- package/dist/composer/useReadComposerDraft.cjs +27 -8
- package/dist/composer/useReadComposerDraft.cjs.map +1 -1
- package/dist/composer/useReadComposerDraft.d.ts +23 -1
- package/dist/composer/useReadComposerDraft.js +27 -8
- package/dist/composer/useReadComposerDraft.js.map +1 -1
- package/dist/composer/useSendMessage.cjs +4 -4
- package/dist/composer/useSendMessage.cjs.map +1 -1
- package/dist/diagnostics/useAthenaDiagnostics.cjs +4 -4
- package/dist/diagnostics/useAthenaDiagnostics.cjs.map +1 -1
- package/dist/dictation/audio-level-history.cjs +3 -3
- package/dist/dictation/audio-level-history.cjs.map +1 -1
- package/dist/dictation/dictation-controls.cjs +24 -20
- package/dist/dictation/dictation-controls.cjs.map +1 -1
- package/dist/dictation/dictation-controls.d.ts +6 -1
- package/dist/dictation/dictation-controls.js +24 -20
- package/dist/dictation/dictation-controls.js.map +1 -1
- package/dist/dictation/use-athena-dictation-engine.cjs +3 -3
- package/dist/dictation/use-athena-dictation-engine.cjs.map +1 -1
- package/dist/dictation/use-dictation.cjs +22 -22
- package/dist/dictation/use-dictation.cjs.map +1 -1
- package/dist/index.cjs +29 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +18 -4
- package/dist/index.js +30 -3
- package/dist/index.js.map +1 -1
- package/dist/keryx-http/src/receive-only-socket.cjs +40 -0
- package/dist/keryx-http/src/receive-only-socket.cjs.map +1 -0
- package/dist/keryx-http/src/receive-only-socket.d.ts +27 -0
- package/dist/keryx-http/src/receive-only-socket.js +40 -0
- package/dist/keryx-http/src/receive-only-socket.js.map +1 -0
- package/dist/keryx-http/src/unconfirmed-update-attributions.cjs +190 -0
- package/dist/keryx-http/src/unconfirmed-update-attributions.cjs.map +1 -0
- package/dist/keryx-http/src/unconfirmed-update-attributions.d.ts +132 -0
- package/dist/keryx-http/src/unconfirmed-update-attributions.js +190 -0
- package/dist/keryx-http/src/unconfirmed-update-attributions.js.map +1 -0
- package/dist/keryx-http/src/update-attributions.cjs +141 -0
- package/dist/keryx-http/src/update-attributions.cjs.map +1 -0
- package/dist/keryx-http/src/update-attributions.d.ts +107 -0
- package/dist/keryx-http/src/update-attributions.js +141 -0
- package/dist/keryx-http/src/update-attributions.js.map +1 -0
- package/dist/lib/owner-document.cjs +6 -6
- package/dist/lib/owner-document.cjs.map +1 -1
- package/dist/lib/use-athena-rest-query.cjs +4 -4
- package/dist/lib/use-athena-rest-query.cjs.map +1 -1
- package/dist/lib/use-document-active.cjs +4 -4
- package/dist/lib/use-document-active.cjs.map +1 -1
- package/dist/lib/use-prefers-reduced-motion.cjs +2 -2
- package/dist/lib/use-prefers-reduced-motion.cjs.map +1 -1
- package/dist/offline/offline-history.cjs +7 -7
- package/dist/offline/offline-history.cjs.map +1 -1
- package/dist/provider/AthenaContext.cjs +3 -3
- package/dist/provider/AthenaContext.cjs.map +1 -1
- package/dist/provider/AthenaProvider.cjs +120 -79
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +11 -1
- package/dist/provider/AthenaProvider.js +44 -3
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/provider/PostHogProvider.cjs +2 -2
- package/dist/provider/PostHogProvider.cjs.map +1 -1
- package/dist/provider/agent-selection-context.cjs +2 -2
- package/dist/provider/agent-selection-context.cjs.map +1 -1
- package/dist/provider/chat-mode-context.cjs +2 -2
- package/dist/provider/chat-mode-context.cjs.map +1 -1
- package/dist/provider/session-persistence-context.cjs +10 -0
- package/dist/provider/session-persistence-context.cjs.map +1 -0
- package/dist/provider/session-persistence-context.d.ts +15 -0
- package/dist/provider/session-persistence-context.js +10 -0
- package/dist/provider/session-persistence-context.js.map +1 -0
- package/dist/provider/statewire-history-context.cjs +4 -4
- package/dist/provider/statewire-history-context.cjs.map +1 -1
- package/dist/provider/statewire-lifecycle-context.cjs +3 -3
- package/dist/provider/statewire-lifecycle-context.cjs.map +1 -1
- package/dist/provider/statewire-window-context.cjs +3 -3
- package/dist/provider/statewire-window-context.cjs.map +1 -1
- package/dist/provider/theme-style-context.cjs +3 -3
- package/dist/provider/theme-style-context.cjs.map +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/runtime/StatewireThreadConfigLaneSync.cjs +10 -10
- package/dist/runtime/StatewireThreadConfigLaneSync.cjs.map +1 -1
- package/dist/runtime/auth-refusal-restart.cjs +7 -7
- package/dist/runtime/auth-refusal-restart.cjs.map +1 -1
- package/dist/runtime/auth.cjs +13 -13
- package/dist/runtime/auth.cjs.map +1 -1
- package/dist/runtime/statewire-lifecycle.cjs +1 -0
- package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
- package/dist/runtime/statewire-lifecycle.d.ts +3 -1
- package/dist/runtime/statewire-lifecycle.js +2 -1
- package/dist/runtime/statewire-lifecycle.js.map +1 -1
- package/dist/runtime/statewire-server-lane-context.cjs +2 -2
- package/dist/runtime/statewire-server-lane-context.cjs.map +1 -1
- package/dist/runtime/statewire-session-lane.cjs +4 -4
- package/dist/runtime/statewire-session-lane.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.cjs +10 -8
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +2 -0
- package/dist/runtime/useAthenaStatewireRuntime.js +2 -0
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/threads/Inbox.cjs +8 -8
- package/dist/threads/Inbox.cjs.map +1 -1
- package/dist/threads/SessionList.cjs +9 -9
- package/dist/threads/SessionList.cjs.map +1 -1
- package/dist/threads/SessionsPage.cjs +11 -11
- package/dist/threads/SessionsPage.cjs.map +1 -1
- package/dist/threads/api.cjs.map +1 -1
- package/dist/threads/api.d.ts +15 -0
- package/dist/threads/api.js.map +1 -1
- package/dist/threads/conversation-list-fetcher.cjs +13 -5
- package/dist/threads/conversation-list-fetcher.cjs.map +1 -1
- package/dist/threads/conversation-list-fetcher.d.ts +4 -1
- package/dist/threads/conversation-list-fetcher.js +13 -5
- package/dist/threads/conversation-list-fetcher.js.map +1 -1
- package/dist/threads/index-triggered-refresh.cjs +10 -10
- package/dist/threads/index-triggered-refresh.cjs.map +1 -1
- package/dist/threads/mark-viewed-thread-read.cjs +12 -12
- package/dist/threads/mark-viewed-thread-read.cjs.map +1 -1
- package/dist/threads/offline-session-list.cjs +3 -3
- package/dist/threads/offline-session-list.cjs.map +1 -1
- package/dist/threads/session-list-tab-share.cjs +5 -5
- package/dist/threads/session-list-tab-share.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.cjs +79 -57
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.d.ts +20 -8
- package/dist/threads/statewire-thread-list.js +28 -6
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/threads/thread-id-context.cjs +5 -5
- package/dist/threads/thread-id-context.cjs.map +1 -1
- package/dist/threads/use-athena-session-attention.cjs +2 -2
- package/dist/threads/use-athena-session-attention.cjs.map +1 -1
- package/dist/threads/use-athena-sessions.cjs +37 -15
- package/dist/threads/use-athena-sessions.cjs.map +1 -1
- package/dist/threads/use-athena-sessions.d.ts +10 -5
- package/dist/threads/use-athena-sessions.js +28 -6
- package/dist/threads/use-athena-sessions.js.map +1 -1
- package/dist/threads/use-athena-thread-model.cjs +3 -3
- package/dist/threads/use-athena-thread-model.cjs.map +1 -1
- package/dist/threads/use-rest-conversation-history.cjs +3 -3
- package/dist/threads/use-rest-conversation-history.cjs.map +1 -1
- package/dist/threads/use-rest-conversation-history.d.ts +1 -0
- package/dist/threads/use-statewire-conversation-history.cjs +8 -8
- package/dist/threads/use-statewire-conversation-history.cjs.map +1 -1
- package/dist/threads/use-thread-archive.cjs +9 -9
- package/dist/threads/use-thread-archive.cjs.map +1 -1
- package/dist/threads/use-thread-favorite.cjs +2 -2
- package/dist/threads/use-thread-favorite.cjs.map +1 -1
- package/dist/threads/use-thread-field-override.cjs +20 -20
- package/dist/threads/use-thread-field-override.cjs.map +1 -1
- package/dist/threads/use-thread-read-state.cjs +4 -4
- package/dist/threads/use-thread-read-state.cjs.map +1 -1
- package/dist/threads/use-thread-rename.cjs +2 -2
- package/dist/threads/use-thread-rename.cjs.map +1 -1
- package/dist/threads/useAthenaThreadManager.cjs +2 -2
- package/dist/threads/useAthenaThreadManager.cjs.map +1 -1
- package/dist/tools/NestedPtcMessages.cjs +6 -6
- package/dist/tools/NestedPtcMessages.cjs.map +1 -1
- package/dist/tools/append-document-tool-ui.cjs +7 -7
- package/dist/tools/append-document-tool-ui.cjs.map +1 -1
- package/dist/tools/file-tool-uis.cjs +2 -2
- package/dist/tools/file-tool-uis.cjs.map +1 -1
- package/dist/tools/misc-tool-uis.cjs +2 -2
- package/dist/tools/misc-tool-uis.cjs.map +1 -1
- package/dist/tools/primitives.cjs +6 -6
- package/dist/tools/primitives.cjs.map +1 -1
- package/dist/tools/read-asset-tool-ui.cjs +6 -6
- package/dist/tools/read-asset-tool-ui.cjs.map +1 -1
- package/dist/tools/subagent-task-tool-ui.cjs +21 -21
- package/dist/tools/subagent-task-tool-ui.cjs.map +1 -1
- package/dist/tools/test-recording-tool-uis.cjs +16 -16
- package/dist/tools/test-recording-tool-uis.cjs.map +1 -1
- package/dist/tools/todo-plan-store.cjs +4 -4
- package/dist/tools/todo-plan-store.cjs.map +1 -1
- package/dist/tools/tool-appearance.cjs +3 -3
- package/dist/tools/tool-appearance.cjs.map +1 -1
- package/dist/tools/tool-fallback.cjs +14 -14
- package/dist/tools/tool-fallback.cjs.map +1 -1
- package/dist/tools/tool-uis.cjs +74 -74
- package/dist/tools/tool-uis.cjs.map +1 -1
- package/dist/tools/use-elapsed-seconds.cjs +3 -3
- package/dist/tools/use-elapsed-seconds.cjs.map +1 -1
- package/dist/tools/write-todos-tool-ui.cjs +9 -9
- package/dist/tools/write-todos-tool-ui.cjs.map +1 -1
- package/dist/ui/image-viewer.cjs +382 -0
- package/dist/ui/image-viewer.cjs.map +1 -0
- package/dist/ui/image-viewer.d.ts +50 -0
- package/dist/ui/image-viewer.js +382 -0
- package/dist/ui/image-viewer.js.map +1 -0
- package/dist/voice/chat.cjs +6 -0
- package/dist/voice/chat.cjs.map +1 -1
- package/dist/voice/chat.d.ts +1 -1
- package/dist/voice/chat.js +8 -2
- package/dist/voice/livekit-join.cjs +52 -101
- package/dist/voice/livekit-join.cjs.map +1 -1
- package/dist/voice/livekit-join.d.ts +1 -6
- package/dist/voice/livekit-join.js +52 -101
- package/dist/voice/livekit-join.js.map +1 -1
- package/dist/voice/livekit.cjs.map +1 -1
- package/dist/voice/livekit.d.ts +11 -1
- package/dist/voice/livekit.js.map +1 -1
- package/dist/voice/use-athena-voice-session.cjs +34 -34
- package/dist/voice/use-athena-voice-session.cjs.map +1 -1
- package/dist/workbench/ComputerLiveDesktop.cjs +13 -13
- package/dist/workbench/ComputerLiveDesktop.cjs.map +1 -1
- package/dist/workbench/SessionWorkbench.cjs +22 -22
- package/dist/workbench/SessionWorkbench.cjs.map +1 -1
- package/dist/workbench/session-workbench-context.cjs +3 -3
- package/dist/workbench/session-workbench-context.cjs.map +1 -1
- package/dist/workbench/session-workbench-panes.cjs +8 -8
- package/dist/workbench/session-workbench-panes.cjs.map +1 -1
- package/dist/workbench/workbench-layout-context.cjs +3 -3
- package/dist/workbench/workbench-layout-context.cjs.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -261,11 +261,24 @@ What the statewire transport wires up in `AthenaChat`:
|
|
|
261
261
|
(or Continue for a generic pause) and resumes the run through the statewire
|
|
262
262
|
`run/input` command. Hosts that build their own thread UI should mount the
|
|
263
263
|
exported `StatewireApprovalCard` themselves — without it an approval-gated
|
|
264
|
-
run stays parked with no way to answer it.
|
|
264
|
+
run stays parked with no way to answer it. A lone call whose resolved
|
|
265
|
+
envelope carries a headline is titled by it, with its summary under it,
|
|
266
|
+
above the card's own details (`title` on the slot context). Its `renderDetails`,
|
|
265
267
|
`isHandledElsewhere`, and `readOnly` seams take host-specific review UIs,
|
|
266
268
|
requests another surface answers, and viewers without edit rights; the
|
|
267
269
|
headless `useStatewireApprovalRequest` behind it is exported for hosts with
|
|
268
|
-
their own decision UI.
|
|
270
|
+
their own decision UI. Its `confirmDecision` seam runs the host's passkey
|
|
271
|
+
decision check ("Confirm with your passkey") before an answer that lets
|
|
272
|
+
anything run. The token it resolves rides as `decisionCheck` on `run/input`
|
|
273
|
+
or `run/lane-input`. A reject never asks, and an answer with no token is
|
|
274
|
+
still sent while checks are report-only. A passkey belongs to the Athena web
|
|
275
|
+
app's host, so an app on another origin can't run that prompt itself:
|
|
276
|
+
`useAthenaBrowserDecisionConfirmer()` (inside `<AthenaProvider>`, passed to
|
|
277
|
+
`<AthenaChat confirmDecision={…}>`) asks agora for a check, opens the web
|
|
278
|
+
app's check page in a new tab, and collects the token once the person
|
|
279
|
+
confirmed there. Its `onPending` gets the code and link to show while the
|
|
280
|
+
tab is open; `useBrowserDecisionConfirmer` takes your own request and opener
|
|
281
|
+
when the provider's don't fit (an extension, an Office add-in).
|
|
269
282
|
- **Frontend tools:** tools in `frontendTools` with a local `execute` are
|
|
270
283
|
declared to the backend as `client_tools` and executed by the mounted
|
|
271
284
|
client-tool bridge, which resumes the run with each tool's result.
|
|
@@ -295,7 +308,14 @@ What the statewire transport wires up in `AthenaChat`:
|
|
|
295
308
|
slots for the host's text/tool renderers and controls (`renderHeaderActions`,
|
|
296
309
|
`renderRunningMeta`, `summaryDetails`, `waitingTools`, `waitingToolCallIds`,
|
|
297
310
|
`expansionKey`), so Olympus and the Chrome extension mount one card instead
|
|
298
|
-
of copies.
|
|
311
|
+
of copies. A host can take a call out of the card's details:
|
|
312
|
+
`isInlineTool(toolName, part)` keeps its tool UI on screen below the header
|
|
313
|
+
(the call itself comes second, so the choice can depend on what it did), and
|
|
314
|
+
`isStepRowTool(toolName)` draws it as its own step's row in the step list,
|
|
315
|
+
kept mounted while the turn is live or `mountDetails` is set. The tool UI
|
|
316
|
+
reads where it renders with `useToolPartPlacement()` (`'step'`, `'inline'`,
|
|
317
|
+
or `null`), so a call rendered in both places draws the part that belongs in
|
|
318
|
+
each.
|
|
299
319
|
- **In-repo hosts consume the package, not the source.** `@athenaintel/react`
|
|
300
320
|
is a workspace dependency of Olympus, the Chrome extension, and the Office
|
|
301
321
|
add-in, resolved through this package's `exports` to the built `dist/` (the
|
|
@@ -324,6 +344,15 @@ What the statewire transport wires up in `AthenaChat`:
|
|
|
324
344
|
`COLLAB_AGENT_CHANNEL_SESSION_MISMATCH` are exported for hosts with their
|
|
325
345
|
own thread UI. Custom hosts can read all of it via
|
|
326
346
|
`useAthenaStatewireLifecycle`.
|
|
347
|
+
- **Session persistence:** `useAthenaSessionPersistence()` exposes Core's paired
|
|
348
|
+
`{ threadId, sessionPersisted }` verdict from the same runtime snapshot as
|
|
349
|
+
the client. No verdict (or no provider) returns `null`; the flag itself is
|
|
350
|
+
`true`, `false`, or `null` when the state does not declare existence. Its
|
|
351
|
+
lifetime follows Core's thread, sync host and signed-in principal;
|
|
352
|
+
credential rotation preserves the verdict. A remembered snapshot may report
|
|
353
|
+
`true` before fresh server state arrives. This is an existence hint for the
|
|
354
|
+
session asset, not authorization, workspace identity, or command durability.
|
|
355
|
+
Actions must still pass their server permission checks.
|
|
327
356
|
- **Thread list:** `enableThreadList` provides the persisted Agora session
|
|
328
357
|
list; switching threads (or starting a new chat) re-attaches the statewire
|
|
329
358
|
session to the selected thread while the host's own `children` stay
|
|
@@ -338,6 +367,10 @@ What the statewire transport wires up in `AthenaChat`:
|
|
|
338
367
|
`useAthenaSessionAttention`, and `useRefreshThreadList` read that state
|
|
339
368
|
(and render nothing / return `null` without it). See
|
|
340
369
|
[Session list, attention and wake markers](#session-list-attention-and-wake-markers).
|
|
370
|
+
The list holds the sessions of the provider's `appId` (and
|
|
371
|
+
`threadListAdditionalAppIds`); with `threadListAgentHome` and a collab
|
|
372
|
+
`agent`, also the conversations with that agent on its other channels (see
|
|
373
|
+
[What's new in 0.50.0](#whats-new-in-0500)).
|
|
341
374
|
|
|
342
375
|
The `agent` prop only accepts `collab_agent:<asset_id>` refs (see below),
|
|
343
376
|
because the statewire host always runs the Athena deep agent. **Any other
|
|
@@ -497,11 +530,25 @@ index pushes.
|
|
|
497
530
|
Mounted by `AthenaChat` above the thread viewport: a persistent strip while
|
|
498
531
|
the active thread's attention is `needs_you` or the approval hook
|
|
499
532
|
(`useStatewireApprovalRequest`) reports a pending request. Its text is the
|
|
500
|
-
server's `nextAction`, else a summary of the pending request
|
|
533
|
+
server's `nextAction`, else a summary of the pending request (the approval
|
|
534
|
+
card's title when it has one); a click scrolls
|
|
501
535
|
to the approval card (or to the composer when there is none). It never
|
|
502
536
|
duplicates the card's Approve / Reject buttons. `WaitingOnYouBannerView` is
|
|
503
537
|
the pure presenter for hosts that resolve the inputs themselves.
|
|
504
538
|
|
|
539
|
+
### `DrivingOnChip`
|
|
540
|
+
|
|
541
|
+
"Driving on your phone": the person's newest message in this conversation came
|
|
542
|
+
from another of their Athena apps (the host's `state.driver`). A hint, never a
|
|
543
|
+
lock — sending here makes this app the driver and the chip goes away. It shows
|
|
544
|
+
nothing while this app drives, once the other app has been quiet for 15
|
|
545
|
+
minutes, during a live call (the call strip says where it is) and outside a
|
|
546
|
+
statewire thread. `AthenaChat` mounts it above the composer when you pass
|
|
547
|
+
`surface` (`"spaces"`, `"mobile"`, `"chrome"`, `"desktop"` or `"office"`, the
|
|
548
|
+
Athena app the chat runs in); a custom layout mounts `<DrivingOnChip here=… />`
|
|
549
|
+
itself. `useDrivingOn(here)` in `@athenaintel/agent-runtime/thread-driver` is the same read
|
|
550
|
+
without the chip.
|
|
551
|
+
|
|
505
552
|
### Wake markers
|
|
506
553
|
|
|
507
554
|
A user turn injected by a GitHub webhook wake carries a provenance envelope
|
|
@@ -631,7 +678,9 @@ Server-applied filters are still checked on rows a live push changed, so a
|
|
|
631
678
|
session you just read leaves "Unread" and a finished one leaves "Running".
|
|
632
679
|
`listThreads` takes the server filters as `filters` (`ThreadListFilterBody`),
|
|
633
680
|
and `app_ids` (`additionalListAppIds`) now reaches the server: the request
|
|
634
|
-
body used to drop it.
|
|
681
|
+
body used to drop it. With `threadListAgentHome`, `home_agent_id` rides beside
|
|
682
|
+
it, and the answer's `home_agent_applied` says whether the list holds the
|
|
683
|
+
agent's conversations (absent on an older server: it does not).
|
|
635
684
|
|
|
636
685
|
## Session workbench
|
|
637
686
|
|
|
@@ -754,6 +803,25 @@ or revoked voice access releases the microphone. Dictation and realtime voice
|
|
|
754
803
|
cannot capture together. Model, agent, mode and toolkit changes sync through the
|
|
755
804
|
same model context for the next delegated task.
|
|
756
805
|
|
|
806
|
+
A call live on another of the person's own devices (the Athena web app, the
|
|
807
|
+
phone app, Chrome, the desktop app) can move to this one: the button reads
|
|
808
|
+
**Move call here** and the voice line reads "Live call on your phone · Move
|
|
809
|
+
here". Only the microphone moves; the realtime model keeps the conversation
|
|
810
|
+
going. The device the call left releases its microphone without ending the call
|
|
811
|
+
and says "Call moved to your …" for a few seconds. A move that cannot complete
|
|
812
|
+
leaves the call where it was. `useAthenaChatVoice` exposes the same as
|
|
813
|
+
`liveElsewhere`, `transferHere()` and `movedTo` for a composer of your own,
|
|
814
|
+
with the shared wording (`describeVoiceLiveElsewhere`, `useVoiceMovedNotice`,
|
|
815
|
+
`VOICE_MOVE_CALL_HERE_LABEL`) in `@athenaintel/react/voice/chat`.
|
|
816
|
+
|
|
817
|
+
After a handover the person sent in voice mode, a host passes
|
|
818
|
+
`continueByVoice={{ onDone }}` and the composer offers **Continue by voice**:
|
|
819
|
+
one tap starts a call whose model opens by saying where the conversation
|
|
820
|
+
stands (`start({ opening: 'recap' })`). `onDone` runs on the tap, **Not now**,
|
|
821
|
+
or a typed send. A host's own "Continue on…" control offers to send the
|
|
822
|
+
conversation in voice mode only while `useChatVoiceEnabled({ enabled })` is
|
|
823
|
+
true: the same workspace gate the composer's voice control uses.
|
|
824
|
+
|
|
757
825
|
Use `<AthenaChat voice={false} />` to omit realtime voice in a host that cannot
|
|
758
826
|
support it, or `voice={{ model: 'gemini-3.8-live' }}` to request a host-offered
|
|
759
827
|
voice model. A custom `livekit` adapter and `onDiagnostic` observer are accepted
|
|
@@ -883,6 +951,86 @@ Both use the same bearer / API key as session creation. The full recipe
|
|
|
883
951
|
template skill `voice-session-guide.md`. `createAthenaVoiceSession` is also
|
|
884
952
|
exported if you hold the bridge state yourself.
|
|
885
953
|
|
|
954
|
+
## What's new in 0.50.0
|
|
955
|
+
|
|
956
|
+
**An agent's own app lists its conversations from every channel.** An app that runs as a collab agent (`agent="collab_agent:<asset_id>"`) can now list the conversations people have with that agent anywhere else, such as Slack, email or SMS, beside its own sessions. Pass `threadListAgentHome` with `enableThreadList`:
|
|
957
|
+
|
|
958
|
+
```tsx
|
|
959
|
+
<AthenaProvider enableThreadList appId={appId} agent="collab_agent:asset_…" threadListAgentHome>
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
Every thread-list read the provider makes (`SessionList` and its Pinned group, `SessionsPage`, `Inbox` and `useAthenaSessions`) then names the agent as `home_agent_id`, and once the agent has a home app set, Athena adds the conversations with it that the viewer can already open. Each such row shows where it started ("Slack", "Email", "SMS"), and one that starts while the app is open appears without a reload. Nothing else about the list changes: its search and filters still apply, and Athena checks access to the list exactly as before. Against an Athena that predates the setting, or for an agent without a home app, the list is the app's own sessions, as it was. New sessions are still tagged `appId`. In `@athenaintel/agent-runtime` 0.3.11, `ConversationListFilter` takes `homeAgentId`, the list page and `useConversationList` report `homeAgentApplied`, and a conversation-index entry carries the session's `collab_agent_id`.
|
|
963
|
+
|
|
964
|
+
## What's new in 0.49.0
|
|
965
|
+
|
|
966
|
+
**An approval card leads with what it asks.** When the one tool call an approval covers arrives with a headline from Athena (its `approval_context`), `StatewireApprovalCard`, and so `AthenaChat`, shows that headline in place of "`tool` requires approval before it runs", with the summary under it, and names the tool in the details instead, above the facts, warnings and arguments it already showed. The first such approval asks to use one of the person's own devices in a conversation: "Use Studio Mac in this conversation?". The waiting-on-you banner names the approval the same way. A batch keeps the generic heading, since one decision answers every call, and an approval without a headline looks exactly as it did. So does a card whose details come from your `renderDetails` (or an editor from your `renderEditor`): your review shows the envelope, so the header doesn't say the headline again. The title is display-only: Approve and Reject send what they always sent. Your `renderHeader`, `renderDetails` and `renderEditor` receive it as `title` (`{ headline, summary? }`) to lead with if you want it. For an approval UI of your own, `pendingApprovalTitle` from `@athenaintel/agent-runtime` (0.3.10) returns it, and `parsePendingApprovalContext` now keeps an envelope's `headline` and `summary`. Nothing to change in your app.
|
|
967
|
+
|
|
968
|
+
**Housekeeping written offline stays housekeeping.** A write your app makes inside `runWithDocUpdateAttributions` for a `connectGenericDoc` handle's document while the handle has no connection used to reach Athena inside the reconnect's sync, which carries no attributions, so it counted as the person's edit. The handle now keeps such writes until Athena acknowledges them, and when it reconnects sends each one ahead of that sync as its own marked update. Nothing to change in your app.
|
|
969
|
+
|
|
970
|
+
**A host can put a failed message's own context back before Retry.** `StatewireQueuedMessages` takes an optional `onBeforeRetry(messageId)`, called right before a failed message is sent again from its Retry button, so a host that keeps per-send context for each message (Athena's web app stages the agents a message named) restores it before the retry leaves. The hook may return a promise to hold the Retry while it can't do that yet (a send with another context is still on its way); the tray asks it again once the promise settles, unless the message was sent or discarded meanwhile, and sends the message regardless after ten holds. A held Retry is held once (clicking it again does nothing), and a function the hook returns is called if the message does not go after all, so the host lets go of what it put back. Nothing to change in your app.
|
|
971
|
+
|
|
972
|
+
## What's new in 0.48.0
|
|
973
|
+
|
|
974
|
+
**Scrolling back through a long session no longer flashes.** Opening a long session loads its newest messages, and scrolling to the top loads older pages. When a session's first loaded turn was one long run, each page of its earlier steps joined that same turn and gave it a new id. `ChatThreadShell` (and so `AthenaChat`) keyed rows by message id, so the turn remounted on every page: it replayed its entrance animation once per page, closed anything you had opened in it, and lost the browser's scroll anchor. A 74-minute run took 16 pages and flashed 16 times. Rows are now keyed by the row key the deep-agent conversion keeps for a turn that grows at its head (`deepAgentRowKey`), so the page lands in the mounted row. `AthenaChat`'s message rows also animate in only when they arrive live (the newest message, mounted while its run is running), never when a session opens or older history loads, and they respect reduced motion. The "Loading earlier messages" row is centred on the thread column. Nothing to change in your app.
|
|
975
|
+
|
|
976
|
+
**Attached pictures show as pictures and open full screen.** A picture you attach to a draft (paperclip, drop or paste) now shows as a thumbnail above the composer instead of a name pill; other files keep their pill. Clicking a thumbnail, or a picture in a sent message, opens a full-screen viewer, as Devin does: the page dims, the picture fits the window, and a toolbar pages through the set (← →), names the file, zooms (− / + / fit), downloads and closes (Esc, or a click on the backdrop). Pictures in a sent message now preview at most 20rem tall instead of at full height. The thumbnail is a local preview (`UploadedAsset.previewUrl`, a `blob:` URL the draft frees when it lets the attachment go). `ImageViewer` is exported for your own surfaces, as are `MessageImageGallery` and `MessageImagePart` (`@athenaintel/react/chat-ui`) for a custom user message:
|
|
977
|
+
|
|
978
|
+
```tsx
|
|
979
|
+
const [viewing, setViewing] = useState<number | null>(null);
|
|
980
|
+
<ImageViewer images={[{ src, name: 'chart.png' }]} index={viewing} onIndexChange={setViewing} />
|
|
981
|
+
```
|
|
982
|
+
|
|
983
|
+
**Each answer names the agent that answered and whom it worked for.** Once a conversation's answers come from more than one agent (your own assistant and a team agent, or two team agents a message named, answering in turn) or work for more than one person, `AthenaChat` shows a small muted line above every answer: "Finance · for you", "Athena · for Priya Shah". An answer that worked for someone other than the signed-in person is labelled even when one agent answered. A 1:1 chat with your own assistant looks as it did. The line reads the stamp Athena puts on each answer (`metadata.custom.answered_by`, identity v7 D13); an answer written before Athena stamped it shows nothing. chat-ui's `createAssistantMessage` bubble shows the same line under `ChatThreadShell`, whose new optional `viewerUserId` (the viewer's Athena user id, `user_…`) makes the viewer's own answers read "for you"; `AthenaChat` passes it for you. A custom `AssistantMessage` renders the line with `AnswerLabel` from `@athenaintel/react/chat-ui` (a host without `ChatThreadShell` mounts `AnswerLabelScope` around its messages). Nothing to change in your app.
|
|
984
|
+
|
|
985
|
+
**Each agent that answers a message gets its own row.** When a message names several agents, each answers in turn, and each answer is now its own assistant message, with its own label, action bar and status, instead of one row joining them. The agent still answering has its row from its first token (a "Thinking" row before it), so nothing jumps between rows while it streams. Your `AssistantMessage` renders once per answer; nothing to change in your app.
|
|
986
|
+
|
|
987
|
+
## What's new in 0.47.0
|
|
988
|
+
|
|
989
|
+
**A host that is also a device an agent operates stamps its approval answers.** Athena refuses a decision sent from a device while an agent is operating it: the answer may be the agent's, driving the device the person signed in on (identity v7, D11). Wrap your chat in `DeviceOperationProvider` with a `read` function that returns the device id while your app runs a tool call Athena's device tunnel sent it, and `undefined` otherwise. Every approval answer the chat sends (`run/input`, `run/lane-input`) then carries `deviceOperation`, read at the moment it is sent, and Athena refuses an approve that carries it with `device_operated`. A reject still goes through. A `read` that throws stamps `unreadable`, so an approve is refused rather than sent from a device that may be operated. Apps that aren't a device (a web app, an Office add-in) change nothing.
|
|
990
|
+
|
|
991
|
+
```tsx
|
|
992
|
+
<DeviceOperationProvider read={() => tunnel.operatingDeviceId()}>
|
|
993
|
+
<AthenaChat />
|
|
994
|
+
</DeviceOperationProvider>
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
## What's new in 0.46.1
|
|
998
|
+
|
|
999
|
+
**A moved call plays on the device that took it.** While a call moves, both of the person's devices are briefly in the call's room. The voice room join attached every remote audio track to the call's one `<audio>` element, so the other device's microphone took the agent's place there, and once that device left, the element was empty: the device that took the call heard nothing for the rest of the call. A device now plays the agent only, and never receives the person's other device's microphone. `createDeepAgentVoiceLiveKitAdapter` hosts get this without changes; a custom `roomFactory` keeps working, and `DeepAgentVoiceLiveKitRoom` now also describes the publication and participant `trackSubscribed` passes.
|
|
1000
|
+
|
|
1001
|
+
## What's new in 0.46.0
|
|
1002
|
+
|
|
1003
|
+
**Continue by voice after a handover.** When a conversation arrives in your app from another of the person's devices and they sent it in voice mode, pass `continueByVoice={{ onDone }}` to `AthenaChat`. The composer then shows one button above the editor, **Continue by voice**, while voice is enabled and idle. Tapping it starts a call whose model opens by saying where the conversation stands, then listens. `onDone` runs once the person answers the offer (the tap, **Not now**, or a typed or dictated send). Clear the offer then, and when the conversation changes. Nothing starts the microphone without the tap, and while the call is still live on the other device the composer offers **Move call here** instead. For a composer of your own, `useAthenaChatVoice().start({ opening: 'recap' })` starts the same call; the opening rides that start only, never an automatic reconnect. `VOICE_CONTINUE_BY_VOICE_LABEL` is the shared button label. An Athena that predates the opening ignores it and the call opens as before.
|
|
1004
|
+
|
|
1005
|
+
## What's new in 0.45.0
|
|
1006
|
+
|
|
1007
|
+
**Move a live call to this device.** When the conversation's voice call is live on another of the person's own devices and Athena can move it, `AthenaChat`'s voice button reads **Move call here** and the voice line above the composer reads "Live call on your phone · Move here" (browser, Chrome, desktop app or Office for the others). Either one takes the call over without restarting it: this device joins the call's room, Athena moves the microphone to it at a turn boundary, and the realtime model carries on. The device the call left lets go of its microphone without ending the call and shows "Call moved to your …" for a few seconds; it can take the call back the same way. A move that cannot complete (refused, the room could not be joined, the microphone was blocked) leaves the call on the other device and says so in the voice line (`failure.kind: 'transfer_failed'`). For a composer of your own, `useAthenaChatVoice` returns `liveElsewhere`, `transferHere()` and `movedTo`, and `@athenaintel/react/voice/chat` exports the shared wording (`describeVoiceLiveElsewhere`, `describeVoiceMovedTo`, `useVoiceMovedNotice`, `VOICE_MOVE_CALL_HERE_LABEL`, `VOICE_MOVE_HERE_ACTION`). Only the same person can take a call, which Athena checks; an Athena that cannot move calls never offers it, and nothing changes there. Nothing to change in your app.
|
|
1008
|
+
|
|
1009
|
+
## What's new in 0.44.3
|
|
1010
|
+
|
|
1011
|
+
**After the D12 refusal date, an agent's picker names the model a run takes.** From the date a deployment sets for it (`CHANNEL_REPLACEMENTS_REFUSED_FROM`; unset everywhere today), Athena no longer applies a channel's or mode's model: a run on that channel takes the agent's own model. `ChatModelPicker` and `useAthenaAgentModelOptions({ agent, channel })` used to keep showing the channel's model as the default. With a `channel`, they now read the date (`featureGateEnv.channelReplacementsRefusedFrom`) and, from it, name the agent's own model as the default (`defaultModel`, the `isDefault` option). A channel's model is offered only when the agent lists it, or the session pins it. An open picker turns at UTC midnight of the day. Before the date, and against an Athena that predates the field, nothing changes. Nothing to change in your app. See [Offering an agent's own models](#offering-an-agents-own-models).
|
|
1012
|
+
|
|
1013
|
+
## What's new in 0.44.0
|
|
1014
|
+
|
|
1015
|
+
**One Stop for everything.** While a voice session is connecting or live, the composer's Stop control stands in for Send whenever the draft is empty, even with no run in flight. One press ends the voice session and, when a run is live (work the voice model delegated, or a typed run), stops that run too. The voice status strip no longer has an end button of its own, so there is one way to stop. While you type during a call, Stop stays beside Send: it ends the call and leaves the draft in the composer, and Send still puts the words into the live voice conversation. Hosts that build their own composer pass `liveSession={voice}` to `ComposerSendOrStop` to get the same behaviour.
|
|
1016
|
+
|
|
1017
|
+
**Ending a voice session never shows "Message was not sent".** A `voice/*` command the host refuses (most often an end that arrives just after the session closed on its own) no longer raises the chat's error banner; the voice controller already handles those outcomes. Agora also now answers an end of an already-closed session as done instead of refusing it.
|
|
1018
|
+
|
|
1019
|
+
**`AthenaTurnEndStatus`, `useAthenaTurnEnded` and `useAthenaVoiceLive`.** A quiet line under the last reply ("Athena went to sleep" by default; pass your own words as children) that shows only once the reply is complete and no run *and no voice session* is live. A live voice session is a conversation still under way between runs, so it never reads as asleep. Mount it in an `AssistantActionBar` override instead of writing your own; `useAthenaTurnEnded()` gives the same verdict as a boolean, and `useAthenaVoiceLive()` says whether a voice session is live on the thread.
|
|
1020
|
+
|
|
1021
|
+
```tsx
|
|
1022
|
+
import { AthenaAssistantActionBar, AthenaChat, AthenaTurnEndStatus } from '@athenaintel/react';
|
|
1023
|
+
|
|
1024
|
+
const Footer = (props) => (
|
|
1025
|
+
<>
|
|
1026
|
+
<AthenaTurnEndStatus />
|
|
1027
|
+
<AthenaAssistantActionBar {...props} />
|
|
1028
|
+
</>
|
|
1029
|
+
);
|
|
1030
|
+
|
|
1031
|
+
<AthenaChat components={{ AssistantActionBar: Footer }} />;
|
|
1032
|
+
```
|
|
1033
|
+
|
|
886
1034
|
## What's new in 0.43.0
|
|
887
1035
|
|
|
888
1036
|
**Asset and citation chips look and read like Olympus's.** A chip is now Olympus's mention pill in your theme's colours (grey on the default theme, still legible on a dark one): the asset's icon, its name, then the cited place in brackets (`Q4 report [p.5]`). Like Olympus's chips, it looks the asset up and shows the asset's own title and its type's icon instead of the link's label and `type=`. The lookup is agora's `getAssetsByIds` with the chat's credentials, which returns only the assets the viewer may read. Chips that render together ask in one request. Each answer is cached for a minute per backend and per signed-in person or API key (TanStack Query, on the host's `QueryClient` when there is one); a credential that names neither shares nothing beyond its own chat. Until the answer arrives, and for an asset the viewer may not read, the chip keeps the link's label and `type=`. A chip asks only where the answer changes it: never for a repository file's catalog (the chip reads as the file either way) or for a session (agora would read its whole row, transcript ledgers included). A chip with no credential to send (no token, API key or session cookie) asks for nothing.
|
|
@@ -1582,6 +1730,15 @@ Pass them only when you deliberately want to override the agent — an explicit
|
|
|
1582
1730
|
`model` is honoured as a caller override, with the agent's model as the default
|
|
1583
1731
|
beneath it.
|
|
1584
1732
|
|
|
1733
|
+
Overrides apply only for a person who can **edit** the agent. Someone who can
|
|
1734
|
+
only view a published agent always runs its published version: the server
|
|
1735
|
+
ignores the `systemPrompt`, `tools` (with the backend-bound `frontendTools`;
|
|
1736
|
+
`frontendTools` with an `execute` still bind), `workbench` and `knowledgeBase`
|
|
1737
|
+
you pass for them, and their `model` applies only when the agent lets people pick it
|
|
1738
|
+
(one of its own models, or any model while **Allow any workspace model** is
|
|
1739
|
+
on). Settings that narrow the agent (excluded tools, a lower budget, read-only)
|
|
1740
|
+
still apply.
|
|
1741
|
+
|
|
1585
1742
|
### Offering an agent's own models
|
|
1586
1743
|
|
|
1587
1744
|
An agent's author lists the models it may run (the agent editor's Models
|
|
@@ -1614,7 +1771,8 @@ For an agent with the switch off:
|
|
|
1614
1771
|
automatic name shows the model's catalog name. A legacy agent with no list
|
|
1615
1772
|
offers its single model.
|
|
1616
1773
|
- The channel's model override is that channel's default, added when the list
|
|
1617
|
-
lacks it
|
|
1774
|
+
lacks it, until the deployment's refusal date (below). Picking the default
|
|
1775
|
+
hands you `null`: pass `model={undefined}` to
|
|
1618
1776
|
the provider, so the agent's (or the channel's) default runs and a session
|
|
1619
1777
|
that pinned another model is unpinned. Picking it while the session pins
|
|
1620
1778
|
nothing writes nothing. A choice of yours that names the default model is a
|
|
@@ -1628,6 +1786,18 @@ For an agent with the switch off:
|
|
|
1628
1786
|
- Until the agent has been read, the workspace menu shows but replaces nothing
|
|
1629
1787
|
on your behalf, since your model may be one only the agent offers.
|
|
1630
1788
|
|
|
1789
|
+
**A channel's model, after the deployment's refusal date.** An agent is its
|
|
1790
|
+
published version: a channel or mode may narrow it, and from a date each
|
|
1791
|
+
deployment sets (`CHANNEL_REPLACEMENTS_REFUSED_FROM`, UTC midnight; unset by
|
|
1792
|
+
default) Athena no longer applies a channel's model, so a run on the channel
|
|
1793
|
+
takes the agent's own. With a `channel`, the picker reads that date
|
|
1794
|
+
(`featureGateEnv.channelReplacementsRefusedFrom`, every minute while it shows)
|
|
1795
|
+
and from it names the agent's own model as the default on every channel, in
|
|
1796
|
+
both modes; a channel's model is then offered only when the agent lists it, or
|
|
1797
|
+
the session pins it. It turns at UTC midnight without a reload. Before the
|
|
1798
|
+
date, and against an Athena that predates it, nothing changes. The date is
|
|
1799
|
+
display only: Athena decides from its own setting at every run.
|
|
1800
|
+
|
|
1631
1801
|
`useAthenaAgentModelOptions({ agent, channel })` is the same data for a picker
|
|
1632
1802
|
of your own: `{ status, options: [{ model, label, isDefault, pinnedOutside }],
|
|
1633
1803
|
defaultModel, allowAnyModel }`. Offer only `options` when `allowAnyModel` is
|
|
@@ -1873,7 +2043,11 @@ host that opens a cited place in Athena on the web writes it into the Spaces lin
|
|
|
1873
2043
|
|
|
1874
2044
|
Use `AthenaAssetEmbed` to render a native Athena asset without chat, thread history, tabs, or the SDK split-pane layout. It defaults to the editable, full native asset experience (`readOnly={false}` and `displayMode="full"`). The embed token and the current user must still have edit permission; otherwise Athena renders the asset read-only.
|
|
1875
2045
|
|
|
1876
|
-
|
|
2046
|
+
Editing a Word document, an Athena document, a spreadsheet, a user interface or a deck through an embed needs a viewer who is signed in to Athena: give the provider the viewer's `token`, which the component hands the frame. A viewer it hands no token (a provider with only an `apiKey`, or none) is not signed in, and the embed is read-only for them, as a `readOnly` link is, whatever `readOnly={false}` asked for. Athena enforces this on its servers, for links minted before it too. Other asset types are unchanged.
|
|
2047
|
+
|
|
2048
|
+
With `displayMode="minimal"`, which runs on the link rather than an Athena sign-in, pass `allowQuickEdit` (and `readOnly={false}`) to let the viewer Quick Edit a spreadsheet, a Word document or a deck with ⌘J. Like editing, it is offered only to a signed-in viewer. Its runs are billed to the asset's workspace, with an hourly cap per link.
|
|
2049
|
+
|
|
2050
|
+
A minimal embed shows the asset's comment threads, read-only, only to a signed-in viewer with their own access to the asset (the bearer the component hands the frame, or an Athena session). Pass `allowComments` to show them to everyone holding the link, anonymous viewers included. No embed writes a comment. The request carries `allow_comments: true` only when you ask.
|
|
1877
2051
|
|
|
1878
2052
|
```tsx
|
|
1879
2053
|
import { useState } from 'react';
|
|
@@ -2067,6 +2241,47 @@ provider's credentials and re-mint before expiry on their own.
|
|
|
2067
2241
|
`isRetryableMintError`: network errors, timeouts, 408, 429, 5xx) leaves the
|
|
2068
2242
|
handle `disconnected` and is retried, immediately when the browser comes back
|
|
2069
2243
|
online; a refusal (401/403/404) still ends it with `status: 'error'`.
|
|
2244
|
+
- `readDocumentStatus({ grant })` lets a host that can read Keryx's document
|
|
2245
|
+
status with the room's grant (`GET /document-status/{org}/{doc_id}?yauth=&branch=`,
|
|
2246
|
+
which answers no cross-origin page, so it is read from a privileged side: a
|
|
2247
|
+
desktop app's main process, a phone app's native code) say whether Keryx takes
|
|
2248
|
+
the room's writes: `handle.writesRefused` is `true` while it says the room is
|
|
2249
|
+
quarantined, when its socket drops every edit unconfirmed. The handle asks on
|
|
2250
|
+
its first connection, on the connection after a 4401 re-check close, after an
|
|
2251
|
+
outage longer than `offlineGateAfterMs`, once edits wait unconfirmed for 15 s
|
|
2252
|
+
(`UNCONFIRMED_EDITS_STALL_MS`), and every five minutes (every minute while
|
|
2253
|
+
refused) while connected and shown; one read at a time, given up after
|
|
2254
|
+
`DOCUMENT_STATUS_READ_TIMEOUT_MS`, none on a read-only grant. Resolve `null`
|
|
2255
|
+
when you can't answer: it reads as "takes writes".
|
|
2256
|
+
|
|
2257
|
+
A write your app makes on its own, not for the person (an editor tidying what
|
|
2258
|
+
an older version stored, a value restored), can be sent as housekeeping: make
|
|
2259
|
+
it inside `runWithDocUpdateAttributions` for the handle's document.
|
|
2260
|
+
|
|
2261
|
+
```ts
|
|
2262
|
+
import {
|
|
2263
|
+
BACKGROUND_UPDATE_ATTRIBUTIONS,
|
|
2264
|
+
runWithDocUpdateAttributions,
|
|
2265
|
+
} from '@athenaintel/react/collab';
|
|
2266
|
+
|
|
2267
|
+
runWithDocUpdateAttributions({
|
|
2268
|
+
doc: handle.doc,
|
|
2269
|
+
attributions: BACKGROUND_UPDATE_ATTRIBUTIONS,
|
|
2270
|
+
run: () => handle.doc.get('meta').setAttr('normalized', true),
|
|
2271
|
+
});
|
|
2272
|
+
```
|
|
2273
|
+
|
|
2274
|
+
The handle's socket sends that write's update with `origin: background`, so
|
|
2275
|
+
Athena counts it as automatic work: it is not shown as the person's edit and
|
|
2276
|
+
does not notify subscriptions that follow people's edits. Only a synchronous
|
|
2277
|
+
write inside `run` is marked. One made while the handle has no connection is
|
|
2278
|
+
kept until Athena acknowledges it and sent marked the same way when the handle
|
|
2279
|
+
reconnects, ahead of the reconnect's sync. The handle keeps it in memory; a
|
|
2280
|
+
host whose local copy is Athena's (`@athenaintel/local-copy`, as in Athena's
|
|
2281
|
+
desktop and phone apps) also keeps it across restarts. Without one, a reload
|
|
2282
|
+
before the reconnect sends it with the person's unsynced edits, as theirs. On a
|
|
2283
|
+
read-only grant the handle's socket sends nothing that carries document content
|
|
2284
|
+
(presence still goes out); Athena would refuse it anyway.
|
|
2070
2285
|
|
|
2071
2286
|
### Workspace presence (admin only)
|
|
2072
2287
|
|
|
@@ -2267,7 +2482,10 @@ as it is, for a host that shows the chat again and wants typing to land in it (a
|
|
|
2267
2482
|
launcher window brought back by a shortcut). Asked before the editor has mounted,
|
|
2268
2483
|
it focuses the editor as it mounts. `useReadComposerDraft()` returns a function
|
|
2269
2484
|
that reads the draft's text when called, for a host that hands the chat to
|
|
2270
|
-
another window and carries the unsent text along.
|
|
2485
|
+
another window and carries the unsent text along. `useTryReadComposerDraft()`
|
|
2486
|
+
reads the same text but answers `null` when there is no composer to read, for a
|
|
2487
|
+
host that must tell a blank composer from one it could not read ("Continue on…"
|
|
2488
|
+
sends a blank one as an empty draft and an unread one as none).
|
|
2271
2489
|
|
|
2272
2490
|
Use `useSendMessage()` for workflow buttons, sidebar shortcuts, and other UI that lives outside `<AthenaChat>` but still needs to submit a prompt. Its promise settles once the send has been dispatched, including a send that waited for the connection.
|
|
2273
2491
|
|
|
@@ -2285,6 +2503,38 @@ function WorkflowButton() {
|
|
|
2285
2503
|
}
|
|
2286
2504
|
```
|
|
2287
2505
|
|
|
2506
|
+
## Controls that need a connection
|
|
2507
|
+
|
|
2508
|
+
A host that knows Athena can't be reached (from its own reachability: a health
|
|
2509
|
+
read, the OS's network events) can tell the composer, so the controls that need
|
|
2510
|
+
Athena show off with a reason instead of failing once used:
|
|
2511
|
+
|
|
2512
|
+
```tsx
|
|
2513
|
+
const NEEDS_CONNECTION =
|
|
2514
|
+
'Needs a connection. This needs Athena. It’s available again when you’re back online.';
|
|
2515
|
+
|
|
2516
|
+
<AthenaChat composer={{ needsConnectionReason: reachable ? null : NEEDS_CONNECTION }} />
|
|
2517
|
+
```
|
|
2518
|
+
|
|
2519
|
+
While it is set, the paperclip, the `@` button, the dictation mic and voice are
|
|
2520
|
+
disabled with the reason as their tooltip. They stay focusable, so the reason
|
|
2521
|
+
reads on focus as well as on hover, and pressing one starts nothing. Typing `@`
|
|
2522
|
+
still opens the mention menu, but it asks Athena nothing: what it can list
|
|
2523
|
+
without Athena (your tools, what it already loaded) shows, and a search or a
|
|
2524
|
+
category that would load from Athena says it needs a connection instead of
|
|
2525
|
+
spinning. A voice session already
|
|
2526
|
+
connecting or live keeps its Cancel and Mute. Typing goes on, and Send follows
|
|
2527
|
+
the chat outbox (`chatOutbox` on `AthenaProvider`): a host that has one holds
|
|
2528
|
+
what is sent until Athena is back. A file pasted or dropped meanwhile is refused
|
|
2529
|
+
by that outbox, as before. Cleared (`null`), each control works again at once.
|
|
2530
|
+
|
|
2531
|
+
The composer's pickers take the same reason: `ChatAgentPicker`,
|
|
2532
|
+
`ChatModelPicker` and `ChatModePicker` show `disabledReason` as their tooltip
|
|
2533
|
+
while `disabled`, where the pointer reaches it (a disabled button gets no
|
|
2534
|
+
pointer events). A menu that is open when its picker turns disabled closes and
|
|
2535
|
+
takes no choice, and it opens again only on the next press. `FileUploadButton`
|
|
2536
|
+
takes `disabledReason` too, for a composer of your own.
|
|
2537
|
+
|
|
2288
2538
|
## Debugging and Diagnostics
|
|
2289
2539
|
|
|
2290
2540
|
The SDK emits structured diagnostic events — auth handshake, thread list,
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const core = require("@assistant-ui/core");
|
|
4
|
+
const ATHENA_ANSWERED_BY_KEY = "answered_by";
|
|
5
|
+
const ATHENA_ASSISTANT_NAME = "Athena";
|
|
6
|
+
const ASSISTANT_AGENT_PREFIX = "assistant:";
|
|
7
|
+
const PERSON_PRINCIPAL_PREFIX = "user_";
|
|
8
|
+
const UNNAMED_AGENT_NAME = "Agent";
|
|
9
|
+
const LABEL_SEPARATOR = " · ";
|
|
10
|
+
const NO_ANSWERS = Object.freeze([]);
|
|
11
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12
|
+
const optionalId = (value) => typeof value === "string" && value.length > 0 ? value : null;
|
|
13
|
+
const optionalName = (value) => {
|
|
14
|
+
if (typeof value !== "string") return null;
|
|
15
|
+
const trimmed = value.trim();
|
|
16
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
17
|
+
};
|
|
18
|
+
function readAnsweredBy(value) {
|
|
19
|
+
if (!isRecord(value)) return null;
|
|
20
|
+
const agent = optionalId(value.agent);
|
|
21
|
+
if (agent === null) return null;
|
|
22
|
+
return {
|
|
23
|
+
agent,
|
|
24
|
+
agent_name: optionalName(value.agent_name),
|
|
25
|
+
for_id: optionalId(value.for_id),
|
|
26
|
+
for_name: optionalName(value.for_name)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const ANSWER_ROW_RUN_ID_PREFIX = "answered_by:";
|
|
30
|
+
function answerRowRunId(agent, forId) {
|
|
31
|
+
return `${ANSWER_ROW_RUN_ID_PREFIX}${agent}|${forId ?? ""}`;
|
|
32
|
+
}
|
|
33
|
+
function isSplitAnswerRow(message) {
|
|
34
|
+
var _a;
|
|
35
|
+
const runId = message.role === "assistant" ? (_a = message.metadata) == null ? void 0 : _a.runId : void 0;
|
|
36
|
+
return typeof runId === "string" && runId.startsWith(ANSWER_ROW_RUN_ID_PREFIX);
|
|
37
|
+
}
|
|
38
|
+
const isSameAnswerer = (a, b) => a.agent === b.agent && a.for_id === b.for_id;
|
|
39
|
+
const isPersonPrincipal = (id) => id !== null && id.startsWith(PERSON_PRINCIPAL_PREFIX);
|
|
40
|
+
function readLangChainAnswer(source) {
|
|
41
|
+
var _a;
|
|
42
|
+
if ((source == null ? void 0 : source.type) !== "ai") return null;
|
|
43
|
+
const bag = (_a = source.additional_kwargs) == null ? void 0 : _a.metadata;
|
|
44
|
+
return isRecord(bag) ? readAnsweredBy(bag[ATHENA_ANSWERED_BY_KEY]) : null;
|
|
45
|
+
}
|
|
46
|
+
function collectMessageAnswers(message) {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
if (message.role !== "assistant") return NO_ANSWERS;
|
|
49
|
+
const sources = core.getExternalStoreMessages(message);
|
|
50
|
+
if (sources.length === 0) {
|
|
51
|
+
const joined = readAnsweredBy((_b = (_a = message.metadata) == null ? void 0 : _a.custom) == null ? void 0 : _b[ATHENA_ANSWERED_BY_KEY]);
|
|
52
|
+
return joined === null ? NO_ANSWERS : [joined];
|
|
53
|
+
}
|
|
54
|
+
let answers = null;
|
|
55
|
+
for (const source of sources) {
|
|
56
|
+
const answer = readLangChainAnswer(source);
|
|
57
|
+
if (answer === null || (answers == null ? void 0 : answers.some((seen) => isSameAnswerer(seen, answer)))) continue;
|
|
58
|
+
answers ?? (answers = []);
|
|
59
|
+
answers.push(answer);
|
|
60
|
+
}
|
|
61
|
+
return answers ?? NO_ANSWERS;
|
|
62
|
+
}
|
|
63
|
+
const answersByMessage = /* @__PURE__ */ new WeakMap();
|
|
64
|
+
function readMessageAnswers(message) {
|
|
65
|
+
const cached = answersByMessage.get(message);
|
|
66
|
+
if (cached !== void 0) return cached;
|
|
67
|
+
const answers = collectMessageAnswers(message);
|
|
68
|
+
answersByMessage.set(message, answers);
|
|
69
|
+
return answers;
|
|
70
|
+
}
|
|
71
|
+
function threadShowsAnswerLabels(messages) {
|
|
72
|
+
let first = null;
|
|
73
|
+
for (const message of messages) {
|
|
74
|
+
if (isSplitAnswerRow(message)) return true;
|
|
75
|
+
for (const answer of readMessageAnswers(message)) {
|
|
76
|
+
if (first === null) {
|
|
77
|
+
first = answer;
|
|
78
|
+
} else if (!isSameAnswerer(first, answer)) {
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
function showsAnswerLabel({
|
|
86
|
+
answers,
|
|
87
|
+
threadShowsLabels,
|
|
88
|
+
viewerId
|
|
89
|
+
}) {
|
|
90
|
+
if (answers.length === 0) return false;
|
|
91
|
+
if (threadShowsLabels) return true;
|
|
92
|
+
return viewerId !== null && answers.some((answer) => isPersonPrincipal(answer.for_id) && answer.for_id !== viewerId);
|
|
93
|
+
}
|
|
94
|
+
function answererName(answer) {
|
|
95
|
+
if (answer.agent_name !== null) return answer.agent_name;
|
|
96
|
+
return answer.agent.startsWith(ASSISTANT_AGENT_PREFIX) ? ATHENA_ASSISTANT_NAME : UNNAMED_AGENT_NAME;
|
|
97
|
+
}
|
|
98
|
+
function forWhomName(answer, viewerId) {
|
|
99
|
+
if (answer.for_id !== null && answer.for_id === viewerId) return "you";
|
|
100
|
+
if (answer.for_name !== null && isPersonPrincipal(answer.for_id)) return answer.for_name;
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
function joinNames(names) {
|
|
104
|
+
if (names.length <= 1) return names[0] ?? "";
|
|
105
|
+
return `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}`;
|
|
106
|
+
}
|
|
107
|
+
function answerLabelText({
|
|
108
|
+
answers,
|
|
109
|
+
viewerId
|
|
110
|
+
}) {
|
|
111
|
+
if (answers.length === 0) return null;
|
|
112
|
+
const groups = [];
|
|
113
|
+
for (const answer of answers) {
|
|
114
|
+
const name = answererName(answer);
|
|
115
|
+
const forWhom = forWhomName(answer, viewerId);
|
|
116
|
+
const group = groups.find((candidate) => candidate.forId === answer.for_id);
|
|
117
|
+
if (group === void 0) {
|
|
118
|
+
groups.push({ forId: answer.for_id, names: [name], forWhom });
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
if (!group.names.includes(name)) group.names.push(name);
|
|
122
|
+
group.forWhom ?? (group.forWhom = forWhom);
|
|
123
|
+
}
|
|
124
|
+
return groups.map(
|
|
125
|
+
({ names, forWhom }) => forWhom === null ? joinNames(names) : `${joinNames(names)}${LABEL_SEPARATOR}for ${forWhom}`
|
|
126
|
+
).join(", ");
|
|
127
|
+
}
|
|
128
|
+
exports.ATHENA_ANSWERED_BY_KEY = ATHENA_ANSWERED_BY_KEY;
|
|
129
|
+
exports.ATHENA_ASSISTANT_NAME = ATHENA_ASSISTANT_NAME;
|
|
130
|
+
exports.answerLabelText = answerLabelText;
|
|
131
|
+
exports.answerRowRunId = answerRowRunId;
|
|
132
|
+
exports.readAnsweredBy = readAnsweredBy;
|
|
133
|
+
exports.readLangChainAnswer = readLangChainAnswer;
|
|
134
|
+
exports.readMessageAnswers = readMessageAnswers;
|
|
135
|
+
exports.showsAnswerLabel = showsAnswerLabel;
|
|
136
|
+
exports.threadShowsAnswerLabels = threadShowsAnswerLabels;
|
|
137
|
+
//# sourceMappingURL=answer-label.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answer-label.cjs","sources":["../../../../agent-runtime/src/answer-label.ts"],"sourcesContent":["import { getExternalStoreMessages, type ThreadMessage } from '@assistant-ui/core';\nimport type { LangChainMessage } from '@assistant-ui/react-langgraph';\n\n/**\n * `metadata.custom` key naming the agent that answered an AI message and whom\n * its run worked for (identity v7 D13: \"each answer is labelled with its\n * agent, 'for <author>'\").\n *\n * The backend stamps it on every answer a deep-agent run's model produces\n * (`agora/.../conversation_agents/answer_label.py`), under the\n * `additional_kwargs.metadata` bag the converter exposes as\n * `message.metadata.custom`, and mirrors it onto the live wire once the\n * model's turn lands. Only the server writes it. Answers written before the\n * stamp existed carry none, and get no label.\n */\nexport const ATHENA_ANSWERED_BY_KEY = 'answered_by';\n\n/** The agent that answered and whom its run worked for, as the backend stamps them. */\nexport interface DeepAgentAnsweredBy {\n /** `collab_agent:<asset id>` for a team agent, `assistant:<principal id>` for someone's own assistant. */\n agent: string;\n /** The collab agent's name when it answered; `null` for an assistant, which clients name. */\n agent_name: string | null;\n /** Whom the run worked for: a person (`user_…`), an agent's or automation's own run, or nobody (`null`). */\n for_id: string | null;\n /** That person's display name when it answered, else `null`. */\n for_name: string | null;\n}\n\n/** What a label calls someone's own assistant: the managed default agent's product name. */\nexport const ATHENA_ASSISTANT_NAME = 'Athena';\n\nconst ASSISTANT_AGENT_PREFIX = 'assistant:';\nconst PERSON_PRINCIPAL_PREFIX = 'user_';\nconst UNNAMED_AGENT_NAME = 'Agent';\nconst LABEL_SEPARATOR = ' · ';\nconst NO_ANSWERS: readonly DeepAgentAnsweredBy[] = Object.freeze([]);\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst optionalId = (value: unknown): string | null =>\n typeof value === 'string' && value.length > 0 ? value : null;\n\nconst optionalName = (value: unknown): string | null => {\n if (typeof value !== 'string') return null;\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : null;\n};\n\n/**\n * Parse an `answered_by` stamp off a wire value.\n *\n * A stamp without a string `agent` is no stamp at all; absent or malformed\n * optional fields read as `null`, so a partly malformed stamp still names its\n * agent and never names a person it can't.\n */\nexport function readAnsweredBy(value: unknown): DeepAgentAnsweredBy | null {\n if (!isRecord(value)) return null;\n const agent = optionalId(value.agent);\n if (agent === null) return null;\n return {\n agent,\n agent_name: optionalName(value.agent_name),\n for_id: optionalId(value.for_id),\n for_name: optionalName(value.for_name),\n };\n}\n\n/**\n * The run id an answer's row carries when the deep-agent conversion split a\n * turn several answerers wrote into one row per answerer (`answer-rows.ts`):\n * one per agent and principal.\n */\nconst ANSWER_ROW_RUN_ID_PREFIX = 'answered_by:';\n\n/** The row run id of an answer by `agent` for `forId` (see `withAnswerRows`). */\nexport function answerRowRunId(agent: string, forId: string | null): string {\n return `${ANSWER_ROW_RUN_ID_PREFIX}${agent}|${forId ?? ''}`;\n}\n\n/**\n * Whether a converted row is one of a turn the conversion split by answerer.\n * Reads `metadata` optionally, as `collectMessageAnswers` does: a message\n * another runtime (or a test) builds may carry none.\n */\nfunction isSplitAnswerRow(message: ThreadMessage): boolean {\n const runId = message.role === 'assistant' ? message.metadata?.runId : undefined;\n return typeof runId === 'string' && runId.startsWith(ANSWER_ROW_RUN_ID_PREFIX);\n}\n\nconst isSameAnswerer = (a: DeepAgentAnsweredBy, b: DeepAgentAnsweredBy): boolean =>\n a.agent === b.agent && a.for_id === b.for_id;\n\nconst isPersonPrincipal = (id: string | null): id is string =>\n id !== null && id.startsWith(PERSON_PRINCIPAL_PREFIX);\n\n/** The `answered_by` stamp an AI message as the wire carries it holds; `null` for any other message. */\nexport function readLangChainAnswer(\n source: LangChainMessage | undefined\n): DeepAgentAnsweredBy | null {\n if (source?.type !== 'ai') return null;\n const bag = source.additional_kwargs?.metadata;\n return isRecord(bag) ? readAnsweredBy(bag[ATHENA_ANSWERED_BY_KEY]) : null;\n}\n\nfunction collectMessageAnswers(message: ThreadMessage): readonly DeepAgentAnsweredBy[] {\n if (message.role !== 'assistant') return NO_ANSWERS;\n const sources = getExternalStoreMessages<LangChainMessage>(message);\n if (sources.length === 0) {\n const joined = readAnsweredBy(message.metadata?.custom?.[ATHENA_ANSWERED_BY_KEY]);\n return joined === null ? NO_ANSWERS : [joined];\n }\n let answers: DeepAgentAnsweredBy[] | null = null;\n for (const source of sources) {\n const answer = readLangChainAnswer(source);\n if (answer === null || answers?.some((seen) => isSameAnswerer(seen, answer))) continue;\n answers ??= [];\n answers.push(answer);\n }\n return answers ?? NO_ANSWERS;\n}\n\nconst answersByMessage = new WeakMap<ThreadMessage, readonly DeepAgentAnsweredBy[]>();\n\n/**\n * The answers one thread message holds: each agent that answered in it and\n * whom it worked for, in the order they answered, one entry per agent and\n * principal.\n *\n * Read off the message's bound source messages, not its joined\n * `metadata.custom`: assistant-ui joins consecutive AI messages into one\n * turn, and its joined metadata keeps only the last stamp. The deep-agent\n * conversion gives each agent that answers one message in turn (D13 several\n * agents, one message) a row of its own (`answer-rows.ts`), so a row\n * normally holds one answer; a conversion without that split (another\n * pipeline, a stamp that never landed) still names every agent of the row.\n * A message with no bound sources (another runtime) falls back to the joined\n * value. Cached per message object: a settled message keeps its object\n * across a streamed token, so a thread-wide scan per token reads only the\n * message that changed.\n */\nexport function readMessageAnswers(message: ThreadMessage): readonly DeepAgentAnsweredBy[] {\n const cached = answersByMessage.get(message);\n if (cached !== undefined) return cached;\n const answers = collectMessageAnswers(message);\n answersByMessage.set(message, answers);\n return answers;\n}\n\n/**\n * The thread-wide half of the label decision: whether the transcript's\n * answers name two or more agents, or two or more principals they worked\n * for. Then every answer is labelled; a 1:1 chat with one agent working for\n * one person looks as it did before labels. Unstamped answers count for\n * nothing.\n *\n * It decides over the messages the client holds (on a windowed wire, the\n * pages loaded so far), as the human-author avatars do: a page of older\n * history that brings another agent or person turns the labels on. Each\n * label still names its own answer's stamp, so loading history never changes\n * what an answer is attributed to, only whether the line shows.\n *\n * A turn the conversion split into one row per answerer turns the labels on\n * too, before the next agent's stamp lands: while several agents answer one\n * message, the host's record already says a second agent is answering, so\n * the first agent's answer is labelled from the moment the second one's row\n * appears.\n */\nexport function threadShowsAnswerLabels(messages: readonly ThreadMessage[]): boolean {\n let first: DeepAgentAnsweredBy | null = null;\n for (const message of messages) {\n if (isSplitAnswerRow(message)) return true;\n for (const answer of readMessageAnswers(message)) {\n if (first === null) {\n first = answer;\n } else if (!isSameAnswerer(first, answer)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Whether a message's answers are labelled: always once the thread's answers\n * name several agents or principals (`threadShowsLabels`), and otherwise when\n * one of them worked for a person other than the viewer. Without a known\n * viewer that last rule is off, so a 1:1 chat never flashes labels while the\n * viewer loads.\n */\nexport function showsAnswerLabel({\n answers,\n threadShowsLabels,\n viewerId,\n}: {\n answers: readonly DeepAgentAnsweredBy[];\n threadShowsLabels: boolean;\n viewerId: string | null;\n}): boolean {\n if (answers.length === 0) return false;\n if (threadShowsLabels) return true;\n return (\n viewerId !== null &&\n answers.some((answer) => isPersonPrincipal(answer.for_id) && answer.for_id !== viewerId)\n );\n}\n\nfunction answererName(answer: DeepAgentAnsweredBy): string {\n if (answer.agent_name !== null) return answer.agent_name;\n return answer.agent.startsWith(ASSISTANT_AGENT_PREFIX)\n ? ATHENA_ASSISTANT_NAME\n : UNNAMED_AGENT_NAME;\n}\n\nfunction forWhomName(answer: DeepAgentAnsweredBy, viewerId: string | null): string | null {\n if (answer.for_id !== null && answer.for_id === viewerId) return 'you';\n if (answer.for_name !== null && isPersonPrincipal(answer.for_id)) return answer.for_name;\n return null;\n}\n\nfunction joinNames(names: readonly string[]): string {\n if (names.length <= 1) return names[0] ?? '';\n return `${names.slice(0, -1).join(', ')} and ${names[names.length - 1]}`;\n}\n\n/**\n * The label's words: who answered, then whom for. \"Finance · for you\",\n * \"Athena · for Priya Shah\", \"Finance\" (a run that worked for nobody, or for\n * an agent's own run). The agent is the collab agent's name, else\n * {@link ATHENA_ASSISTANT_NAME} for someone's own assistant, else \"Agent\".\n * Several agents answering for the same principal read \"Finance and Legal ·\n * for you\"; answers for different principals are listed apart, even when the\n * people share a name (\"Finance · for Alex, Legal · for Alex\"). `null` when\n * the message holds no answers.\n */\nexport function answerLabelText({\n answers,\n viewerId,\n}: {\n answers: readonly DeepAgentAnsweredBy[];\n viewerId: string | null;\n}): string | null {\n if (answers.length === 0) return null;\n // One group per principal (nobody is one too), never per displayed name: two\n // people who share a name stay two recipients.\n const groups: { forId: string | null; names: string[]; forWhom: string | null }[] = [];\n for (const answer of answers) {\n const name = answererName(answer);\n const forWhom = forWhomName(answer, viewerId);\n const group = groups.find((candidate) => candidate.forId === answer.for_id);\n if (group === undefined) {\n groups.push({ forId: answer.for_id, names: [name], forWhom });\n continue;\n }\n if (!group.names.includes(name)) group.names.push(name);\n // A recipient one answer left unnamed takes the name a later answer for\n // the same principal carries. The first name found wins: answers stamped\n // under two names for one id (a rename between runs) read as the first.\n group.forWhom ??= forWhom;\n }\n return groups\n .map(({ names, forWhom }) =>\n forWhom === null ? joinNames(names) : `${joinNames(names)}${LABEL_SEPARATOR}for ${forWhom}`\n )\n .join(', ');\n}\n"],"names":["getExternalStoreMessages"],"mappings":";;;AAeO,MAAM,yBAAyB;AAe/B,MAAM,wBAAwB;AAErC,MAAM,yBAAyB;AAC/B,MAAM,0BAA0B;AAChC,MAAM,qBAAqB;AAC3B,MAAM,kBAAkB;AACxB,MAAM,aAA6C,OAAO,OAAO,EAAE;AAEnE,MAAM,WAAW,CAAC,UAChB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAErE,MAAM,aAAa,CAAC,UAClB,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,QAAQ;AAE1D,MAAM,eAAe,CAAC,UAAkC;AACtD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,QAAM,UAAU,MAAM,KAAA;AACtB,SAAO,QAAQ,SAAS,IAAI,UAAU;AACxC;AASO,SAAS,eAAe,OAA4C;AACzE,MAAI,CAAC,SAAS,KAAK,EAAG,QAAO;AAC7B,QAAM,QAAQ,WAAW,MAAM,KAAK;AACpC,MAAI,UAAU,KAAM,QAAO;AAC3B,SAAO;AAAA,IACL;AAAA,IACA,YAAY,aAAa,MAAM,UAAU;AAAA,IACzC,QAAQ,WAAW,MAAM,MAAM;AAAA,IAC/B,UAAU,aAAa,MAAM,QAAQ;AAAA,EAAA;AAEzC;AAOA,MAAM,2BAA2B;AAG1B,SAAS,eAAe,OAAe,OAA8B;AAC1E,SAAO,GAAG,wBAAwB,GAAG,KAAK,IAAI,SAAS,EAAE;AAC3D;AAOA,SAAS,iBAAiB,SAAiC;;AACzD,QAAM,QAAQ,QAAQ,SAAS,eAAc,aAAQ,aAAR,mBAAkB,QAAQ;AACvE,SAAO,OAAO,UAAU,YAAY,MAAM,WAAW,wBAAwB;AAC/E;AAEA,MAAM,iBAAiB,CAAC,GAAwB,MAC9C,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE;AAExC,MAAM,oBAAoB,CAAC,OACzB,OAAO,QAAQ,GAAG,WAAW,uBAAuB;AAG/C,SAAS,oBACd,QAC4B;;AAC5B,OAAI,iCAAQ,UAAS,KAAM,QAAO;AAClC,QAAM,OAAM,YAAO,sBAAP,mBAA0B;AACtC,SAAO,SAAS,GAAG,IAAI,eAAe,IAAI,sBAAsB,CAAC,IAAI;AACvE;AAEA,SAAS,sBAAsB,SAAwD;;AACrF,MAAI,QAAQ,SAAS,YAAa,QAAO;AACzC,QAAM,UAAUA,KAAAA,yBAA2C,OAAO;AAClE,MAAI,QAAQ,WAAW,GAAG;AACxB,UAAM,SAAS,gBAAe,mBAAQ,aAAR,mBAAkB,WAAlB,mBAA2B,uBAAuB;AAChF,WAAO,WAAW,OAAO,aAAa,CAAC,MAAM;AAAA,EAC/C;AACA,MAAI,UAAwC;AAC5C,aAAW,UAAU,SAAS;AAC5B,UAAM,SAAS,oBAAoB,MAAM;AACzC,QAAI,WAAW,SAAQ,mCAAS,KAAK,CAAC,SAAS,eAAe,MAAM,MAAM,IAAI;AAC9E,0BAAY,CAAA;AACZ,YAAQ,KAAK,MAAM;AAAA,EACrB;AACA,SAAO,WAAW;AACpB;AAEA,MAAM,uCAAuB,QAAA;AAmBtB,SAAS,mBAAmB,SAAwD;AACzF,QAAM,SAAS,iBAAiB,IAAI,OAAO;AAC3C,MAAI,WAAW,OAAW,QAAO;AACjC,QAAM,UAAU,sBAAsB,OAAO;AAC7C,mBAAiB,IAAI,SAAS,OAAO;AACrC,SAAO;AACT;AAqBO,SAAS,wBAAwB,UAA6C;AACnF,MAAI,QAAoC;AACxC,aAAW,WAAW,UAAU;AAC9B,QAAI,iBAAiB,OAAO,EAAG,QAAO;AACtC,eAAW,UAAU,mBAAmB,OAAO,GAAG;AAChD,UAAI,UAAU,MAAM;AAClB,gBAAQ;AAAA,MACV,WAAW,CAAC,eAAe,OAAO,MAAM,GAAG;AACzC,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AASO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AACF,GAIY;AACV,MAAI,QAAQ,WAAW,EAAG,QAAO;AACjC,MAAI,kBAAmB,QAAO;AAC9B,SACE,aAAa,QACb,QAAQ,KAAK,CAAC,WAAW,kBAAkB,OAAO,MAAM,KAAK,OAAO,WAAW,QAAQ;AAE3F;AAEA,SAAS,aAAa,QAAqC;AACzD,MAAI,OAAO,eAAe,KAAM,QAAO,OAAO;AAC9C,SAAO,OAAO,MAAM,WAAW,sBAAsB,IACjD,wBACA;AACN;AAEA,SAAS,YAAY,QAA6B,UAAwC;AACxF,MAAI,OAAO,WAAW,QAAQ,OAAO,WAAW,SAAU,QAAO;AACjE,MAAI,OAAO,aAAa,QAAQ,kBAAkB,OAAO,MAAM,UAAU,OAAO;AAChF,SAAO;AACT;AAEA,SAAS,UAAU,OAAkC;AACnD,MAAI,MAAM,UAAU,EAAG,QAAO,MAAM,CAAC,KAAK;AAC1C,SAAO,GAAG,MAAM,MAAM,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,QAAQ,MAAM,MAAM,SAAS,CAAC,CAAC;AACxE;AAYO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AACF,GAGkB;AAChB,MAAI,QAAQ,WAAW,EAAG,QAAO;AAGjC,QAAM,SAA8E,CAAA;AACpF,aAAW,UAAU,SAAS;AAC5B,UAAM,OAAO,aAAa,MAAM;AAChC,UAAM,UAAU,YAAY,QAAQ,QAAQ;AAC5C,UAAM,QAAQ,OAAO,KAAK,CAAC,cAAc,UAAU,UAAU,OAAO,MAAM;AAC1E,QAAI,UAAU,QAAW;AACvB,aAAO,KAAK,EAAE,OAAO,OAAO,QAAQ,OAAO,CAAC,IAAI,GAAG,SAAS;AAC5D;AAAA,IACF;AACA,QAAI,CAAC,MAAM,MAAM,SAAS,IAAI,EAAG,OAAM,MAAM,KAAK,IAAI;AAItD,UAAM,YAAN,MAAM,UAAY;AAAA,EACpB;AACA,SAAO,OACJ;AAAA,IAAI,CAAC,EAAE,OAAO,QAAA,MACb,YAAY,OAAO,UAAU,KAAK,IAAI,GAAG,UAAU,KAAK,CAAC,GAAG,eAAe,OAAO,OAAO;AAAA,EAAA,EAE1F,KAAK,IAAI;AACd;;;;;;;;;;"}
|