@athenaintel/react 0.41.3 → 0.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -9
- package/dist/agent-runtime/src/asset-attachment.d.ts +98 -0
- package/dist/agent-runtime/src/athena-asset-drag.d.ts +32 -0
- package/dist/agent-runtime/src/auth-denial.d.ts +29 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.cjs +41 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.d.ts +38 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.js +41 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-signals.cjs +63 -0
- package/dist/agent-runtime/src/chat-outbox-signals.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-signals.d.ts +12 -0
- package/dist/agent-runtime/src/chat-outbox-signals.js +63 -0
- package/dist/agent-runtime/src/chat-outbox-signals.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-store.cjs +509 -0
- package/dist/agent-runtime/src/chat-outbox-store.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-store.d.ts +203 -0
- package/dist/agent-runtime/src/chat-outbox-store.js +509 -0
- package/dist/agent-runtime/src/chat-outbox-store.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-thread.cjs +136 -0
- package/dist/agent-runtime/src/chat-outbox-thread.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-thread.d.ts +118 -0
- package/dist/agent-runtime/src/chat-outbox-thread.js +136 -0
- package/dist/agent-runtime/src/chat-outbox-thread.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox.cjs +696 -0
- package/dist/agent-runtime/src/chat-outbox.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox.d.ts +285 -0
- package/dist/agent-runtime/src/chat-outbox.js +696 -0
- package/dist/agent-runtime/src/chat-outbox.js.map +1 -0
- package/dist/agent-runtime/src/chat-socket-reachability.d.ts +45 -0
- package/dist/agent-runtime/src/client-tool-bridge.d.ts +152 -0
- package/dist/agent-runtime/src/client-tools.d.ts +133 -0
- package/dist/agent-runtime/src/composer-markdown.cjs +10 -0
- package/dist/agent-runtime/src/composer-markdown.cjs.map +1 -1
- package/dist/agent-runtime/src/composer-markdown.d.ts +108 -0
- package/dist/agent-runtime/src/composer-markdown.js +10 -0
- package/dist/agent-runtime/src/composer-markdown.js.map +1 -1
- package/dist/agent-runtime/src/config-mutations.d.ts +51 -0
- package/dist/agent-runtime/src/conversation-index.d.ts +110 -0
- package/dist/agent-runtime/src/conversation-list.d.ts +343 -0
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs +3 -2
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.d.ts +166 -0
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js +3 -2
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
- package/dist/agent-runtime/src/desktop-handoff.d.ts +139 -0
- package/dist/agent-runtime/src/durable-thread-snapshot-cache.d.ts +60 -0
- package/dist/agent-runtime/src/edit-command.d.ts +156 -0
- package/dist/agent-runtime/src/errors.d.ts +174 -0
- package/dist/agent-runtime/src/execute-output.d.ts +31 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs +16 -2
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +202 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.js +16 -2
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
- package/dist/agent-runtime/src/github-wake-event.d.ts +77 -0
- package/dist/agent-runtime/src/index.d.ts +74 -0
- package/dist/agent-runtime/src/interrupts.cjs +17 -0
- package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
- package/dist/agent-runtime/src/interrupts.d.ts +348 -0
- package/dist/agent-runtime/src/interrupts.js +17 -0
- package/dist/agent-runtime/src/interrupts.js.map +1 -1
- package/dist/agent-runtime/src/lane-follow.d.ts +121 -0
- package/dist/agent-runtime/src/lane-history.cjs +209 -0
- package/dist/agent-runtime/src/lane-history.cjs.map +1 -0
- package/dist/agent-runtime/src/lane-history.d.ts +175 -0
- package/dist/agent-runtime/src/lane-history.js +209 -0
- package/dist/agent-runtime/src/lane-history.js.map +1 -0
- package/dist/agent-runtime/src/lane-images.d.ts +184 -0
- package/dist/agent-runtime/src/message-author.d.ts +43 -0
- package/dist/agent-runtime/src/message-text.cjs +15 -0
- package/dist/agent-runtime/src/message-text.cjs.map +1 -0
- package/dist/agent-runtime/src/message-text.d.ts +47 -0
- package/dist/agent-runtime/src/message-text.js +15 -0
- package/dist/agent-runtime/src/message-text.js.map +1 -0
- package/dist/agent-runtime/src/message-window.cjs +15 -1
- package/dist/agent-runtime/src/message-window.cjs.map +1 -1
- package/dist/agent-runtime/src/message-window.d.ts +159 -0
- package/dist/agent-runtime/src/message-window.js +16 -2
- package/dist/agent-runtime/src/message-window.js.map +1 -1
- package/dist/agent-runtime/src/messages.cjs +88 -4
- package/dist/agent-runtime/src/messages.cjs.map +1 -1
- package/dist/agent-runtime/src/messages.d.ts +603 -0
- package/dist/agent-runtime/src/messages.js +88 -4
- package/dist/agent-runtime/src/messages.js.map +1 -1
- package/dist/agent-runtime/src/model-context.d.ts +22 -0
- package/dist/agent-runtime/src/offline-status.d.ts +157 -0
- package/dist/agent-runtime/src/optimistic-content.d.ts +21 -0
- package/dist/agent-runtime/src/protocol.cjs +12 -4
- package/dist/agent-runtime/src/protocol.cjs.map +1 -1
- package/dist/agent-runtime/src/protocol.d.ts +119 -0
- package/dist/agent-runtime/src/protocol.js +13 -5
- package/dist/agent-runtime/src/protocol.js.map +1 -1
- package/dist/agent-runtime/src/ptc-subcalls.d.ts +51 -0
- package/dist/agent-runtime/src/queue.d.ts +138 -0
- package/dist/agent-runtime/src/quota-safe-local-storage-session.d.ts +154 -0
- package/dist/agent-runtime/src/running-tool-placeholder.cjs +11 -0
- package/dist/agent-runtime/src/running-tool-placeholder.cjs.map +1 -0
- package/dist/agent-runtime/src/running-tool-placeholder.d.ts +25 -0
- package/dist/agent-runtime/src/running-tool-placeholder.js +11 -0
- package/dist/agent-runtime/src/running-tool-placeholder.js.map +1 -0
- package/dist/agent-runtime/src/runtime-messages.d.ts +104 -0
- package/dist/agent-runtime/src/screen-point.d.ts +151 -0
- package/dist/agent-runtime/src/sealed-idb.cjs +112 -0
- package/dist/agent-runtime/src/sealed-idb.cjs.map +1 -0
- package/dist/agent-runtime/src/sealed-idb.d.ts +106 -0
- package/dist/agent-runtime/src/sealed-idb.js +112 -0
- package/dist/agent-runtime/src/sealed-idb.js.map +1 -0
- package/dist/agent-runtime/src/send-recovery.d.ts +40 -0
- package/dist/agent-runtime/src/statewire-attach-observer.d.ts +194 -0
- package/dist/agent-runtime/src/statewire-diagnostics.d.ts +74 -0
- package/dist/agent-runtime/src/statewire-state.d.ts +29 -0
- package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -1
- package/dist/agent-runtime/src/statewire-suspended.d.ts +27 -0
- package/dist/agent-runtime/src/statewire-suspended.js.map +1 -1
- package/dist/agent-runtime/src/statewire-transport.d.ts +40 -0
- package/dist/agent-runtime/src/streaming-markdown.d.ts +46 -0
- package/dist/agent-runtime/src/subagent-transcripts.cjs +209 -0
- package/dist/agent-runtime/src/subagent-transcripts.cjs.map +1 -0
- package/dist/agent-runtime/src/subagent-transcripts.d.ts +71 -0
- package/dist/agent-runtime/src/subagent-transcripts.js +209 -0
- package/dist/agent-runtime/src/subagent-transcripts.js.map +1 -0
- package/dist/agent-runtime/src/subagents.cjs +253 -0
- package/dist/agent-runtime/src/subagents.cjs.map +1 -0
- package/dist/agent-runtime/src/subagents.d.ts +311 -0
- package/dist/agent-runtime/src/subagents.js +253 -0
- package/dist/agent-runtime/src/subagents.js.map +1 -0
- package/dist/agent-runtime/src/subscription-wake-event.d.ts +111 -0
- package/dist/agent-runtime/src/thread-extras.d.ts +43 -0
- package/dist/agent-runtime/src/thread-handoff.d.ts +364 -0
- package/dist/agent-runtime/src/thread-prewarm-controller.d.ts +76 -0
- package/dist/agent-runtime/src/thread-prewarm.d.ts +118 -0
- package/dist/agent-runtime/src/thread-snapshot-cache.d.ts +99 -0
- package/dist/agent-runtime/src/thread-snapshot-mirror.cjs +46 -117
- package/dist/agent-runtime/src/thread-snapshot-mirror.cjs.map +1 -1
- package/dist/agent-runtime/src/thread-snapshot-mirror.d.ts +101 -0
- package/dist/agent-runtime/src/thread-snapshot-mirror.js +17 -88
- package/dist/agent-runtime/src/thread-snapshot-mirror.js.map +1 -1
- package/dist/agent-runtime/src/thread-status.d.ts +53 -0
- package/dist/agent-runtime/src/tool-metadata.d.ts +146 -0
- package/dist/agent-runtime/src/tool-names.cjs +67 -0
- package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-names.d.ts +60 -0
- package/dist/agent-runtime/src/tool-names.js +68 -1
- package/dist/agent-runtime/src/tool-names.js.map +1 -1
- package/dist/agent-runtime/src/tool-outputs.d.ts +35 -0
- package/dist/agent-runtime/src/tool-result.cjs +1 -0
- package/dist/agent-runtime/src/tool-result.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-result.d.ts +126 -0
- package/dist/agent-runtime/src/tool-result.js +1 -0
- package/dist/agent-runtime/src/tool-result.js.map +1 -1
- package/dist/agent-runtime/src/types.d.ts +159 -0
- package/dist/agent-runtime/src/use-conversation-list.d.ts +76 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +136 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +64 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +136 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-config.d.ts +169 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs +13 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.d.ts +22 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.js +13 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +20 -2
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +168 -0
- package/dist/agent-runtime/src/use-deep-agent-runtime.js +20 -2
- package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs +12 -4
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.d.ts +320 -0
- package/dist/agent-runtime/src/use-deep-agent-thread.js +12 -4
- package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs +999 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +409 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.js +999 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-window-sync.d.ts +102 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.d.ts +2 -0
- package/dist/agent-runtime/src/use-thread-handoff-flow.d.ts +84 -0
- package/dist/agent-runtime/src/voice-presentation.d.ts +80 -0
- package/dist/agent-runtime/src/voice-turn-grouping.d.ts +28 -0
- package/dist/agent-runtime/src/voice-wire-types.d.ts +15 -0
- package/dist/agent-runtime/src/withdrawn-turns.d.ts +97 -0
- package/dist/chat/AthenaChat.cjs +72 -5
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.js +73 -6
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireApprovalCard.d.ts +1 -1
- package/dist/chat/StatewireClientToolBridge.d.ts +1 -1
- package/dist/chat/StatewireQueuedMessages.cjs +11 -4
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.d.ts +1 -1
- package/dist/chat/StatewireQueuedMessages.js +11 -4
- package/dist/chat/StatewireQueuedMessages.js.map +1 -1
- package/dist/chat/chat-outbox-rows.cjs +223 -0
- package/dist/chat/chat-outbox-rows.cjs.map +1 -0
- package/dist/chat/chat-outbox-rows.d.ts +29 -0
- package/dist/chat/chat-outbox-rows.js +223 -0
- package/dist/chat/chat-outbox-rows.js.map +1 -0
- package/dist/chat/statewire-approval.d.ts +1 -1
- package/dist/chat/statewire-client-tools.d.ts +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +3 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +7 -1
- package/dist/chat/super-grouping/SuperGroupingCard.js +3 -1
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +7 -2
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.d.ts +2 -2
- package/dist/chat/super-grouping/SuperGroupingTranscript.js +7 -2
- package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.cjs +15 -8
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.d.ts +18 -8
- package/dist/chat/super-grouping/activity-timeline.js +15 -8
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
- package/dist/chat/use-statewire-approval-request.cjs +36 -0
- package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
- package/dist/chat/use-statewire-approval-request.d.ts +49 -1
- package/dist/chat/use-statewire-approval-request.js +39 -3
- package/dist/chat/use-statewire-approval-request.js.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.cjs +102 -3
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +32 -1
- package/dist/chat-ui/composer/tiptap-composer.js +103 -4
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/header/conversation-history-panel.d.ts +1 -1
- package/dist/chat-ui/index.d.ts +1 -1
- package/dist/chat-ui/messages/message-components.cjs +15 -0
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.js +15 -0
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/messages/runtime-message.d.ts +1 -1
- package/dist/chat-ui/messages/statewire-continue-run.d.ts +1 -1
- package/dist/chat-ui/messages/user-edit-composer.cjs +15 -2
- package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
- package/dist/chat-ui/messages/user-edit-composer.d.ts +4 -2
- package/dist/chat-ui/messages/user-edit-composer.js +15 -2
- package/dist/chat-ui/messages/user-edit-composer.js.map +1 -1
- package/dist/chat-ui/messages/wake-marker.d.ts +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.cjs +1 -0
- package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.d.ts +3 -0
- package/dist/chat-ui/rich-text/chat-text-schema.js +1 -0
- package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
- package/dist/chat-ui/statewire.cjs +1 -0
- package/dist/chat-ui/statewire.cjs.map +1 -1
- package/dist/chat-ui/statewire.d.ts +2 -2
- package/dist/chat-ui/statewire.js +2 -1
- package/dist/chat-ui/thread/statewire-history-edge.d.ts +1 -1
- package/dist/composer/AttachmentContext.cjs +8 -4
- package/dist/composer/AttachmentContext.cjs.map +1 -1
- package/dist/composer/AttachmentContext.d.ts +7 -0
- package/dist/composer/AttachmentContext.js +8 -4
- package/dist/composer/AttachmentContext.js.map +1 -1
- package/dist/composer/build-composed-message.cjs +34 -0
- package/dist/composer/build-composed-message.cjs.map +1 -1
- package/dist/composer/build-composed-message.d.ts +20 -0
- package/dist/composer/build-composed-message.js +35 -1
- package/dist/composer/build-composed-message.js.map +1 -1
- package/dist/composer/composer-handoff.cjs +39 -2
- package/dist/composer/composer-handoff.cjs.map +1 -1
- package/dist/composer/composer-handoff.d.ts +28 -3
- package/dist/composer/composer-handoff.js +39 -2
- package/dist/composer/composer-handoff.js.map +1 -1
- package/dist/composer/useAttachFiles.cjs +15 -2
- package/dist/composer/useAttachFiles.cjs.map +1 -1
- package/dist/composer/useAttachFiles.d.ts +11 -0
- package/dist/composer/useAttachFiles.js +15 -2
- package/dist/composer/useAttachFiles.js.map +1 -1
- package/dist/composer/useSendMessage.cjs.map +1 -1
- package/dist/composer/useSendMessage.d.ts +4 -3
- package/dist/composer/useSendMessage.js.map +1 -1
- package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +3 -1
- package/dist/diagnostics/athena-diagnostics.js.map +1 -1
- package/dist/index.cjs +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +13 -6
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/offline/chat-outbox.cjs +57 -0
- package/dist/offline/chat-outbox.cjs.map +1 -0
- package/dist/offline/chat-outbox.d.ts +80 -0
- package/dist/offline/chat-outbox.js +57 -0
- package/dist/offline/chat-outbox.js.map +1 -0
- package/dist/offline/offline-history.d.ts +1 -1
- package/dist/provider/AthenaProvider.cjs +162 -8
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +15 -1
- package/dist/provider/AthenaProvider.js +163 -9
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/provider/statewire-window-context.d.ts +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/references/src/anchors/file-line-range.d.ts +58 -0
- package/dist/references/src/anchors/format.d.ts +21 -0
- package/dist/references/src/anchors/message-anchors.d.ts +71 -0
- package/dist/references/src/anchors/parse.d.ts +8 -0
- package/dist/references/src/anchors/registry-contract.d.ts +24 -0
- package/dist/references/src/anchors/registry.d.ts +19 -0
- package/dist/references/src/anchors/schemas.d.ts +194 -0
- package/dist/references/src/anchors/serialize.d.ts +8 -0
- package/dist/references/src/anchors/time.d.ts +78 -0
- package/dist/references/src/anchors/types.d.ts +474 -0
- package/dist/references/src/asset-bounds.d.ts +27 -0
- package/dist/references/src/asset-links.d.ts +23 -0
- package/dist/references/src/asset-reference.d.ts +16 -0
- package/dist/references/src/formats/format-catalog.d.ts +79 -0
- package/dist/references/src/formats/markdown/parse-reference-markdown.d.ts +28 -0
- package/dist/references/src/formats/markdown/reference-display-name.d.ts +6 -0
- package/dist/references/src/formats/object/asset-object.d.ts +9 -0
- package/dist/references/src/formats/object/callable-object.d.ts +6 -0
- package/dist/references/src/formats/object/decode-reference-object-payload.d.ts +3 -0
- package/dist/references/src/formats/object/external-url-object.d.ts +9 -0
- package/dist/references/src/formats/object/group-object.d.ts +9 -0
- package/dist/references/src/formats/object/navigation-object.d.ts +9 -0
- package/dist/references/src/formats/object/parse-reference-object.d.ts +11 -0
- package/dist/references/src/formats/object/person-object.d.ts +9 -0
- package/dist/references/src/formats/uri/asset-mention-uri.d.ts +9 -0
- package/dist/references/src/formats/uri/asset-spaces-url.d.ts +9 -0
- package/dist/references/src/formats/uri/callable-mention-uris.d.ts +9 -0
- package/dist/references/src/formats/uri/detect-uri-wire.d.ts +9 -0
- package/dist/references/src/formats/uri/group-mention-uri.d.ts +12 -0
- package/dist/references/src/formats/uri/navigation-spaces-url.d.ts +14 -0
- package/dist/references/src/formats/uri/parse-reference-uri.d.ts +20 -0
- package/dist/references/src/formats/uri/person-mention-uri.d.ts +9 -0
- package/dist/references/src/formats/uri/template-placeholder.d.ts +12 -0
- package/dist/references/src/index.d.ts +47 -0
- package/dist/references/src/legacy/index.d.ts +14 -0
- package/dist/references/src/legacy/pre-reference-asset-url.d.ts +57 -0
- package/dist/references/src/legacy/pre-reference-citation-bridge.d.ts +22 -0
- package/dist/references/src/legacy/pre-reference-citation.d.ts +138 -0
- package/dist/references/src/legacy/pre-reference-external-url.d.ts +31 -0
- package/dist/references/src/legacy/pre-reference-format.d.ts +8 -0
- package/dist/references/src/legacy/pre-reference-mention.d.ts +27 -0
- package/dist/references/src/legacy/pre-reference-object.d.ts +8 -0
- package/dist/references/src/legacy/pre-reference-uri.d.ts +12 -0
- package/dist/references/src/legacy.d.ts +2 -0
- package/dist/references/src/mention-href-patterns.d.ts +19 -0
- package/dist/references/src/mention-node/index.d.ts +5 -0
- package/dist/references/src/mention-node/mention-node.d.ts +31 -0
- package/dist/references/src/mention-node/resolve-node-attrs.d.ts +27 -0
- package/dist/references/src/parse-reference.d.ts +23 -0
- package/dist/references/src/schemas.d.ts +463 -0
- package/dist/references/src/serialize-reference.d.ts +50 -0
- package/dist/references/src/sheet-name.d.ts +10 -0
- package/dist/references/src/tool-option-schemas.d.ts +597 -0
- package/dist/references/src/types.d.ts +125 -0
- package/dist/references/src/version-ref.d.ts +30 -0
- package/dist/runtime/statewire-lifecycle.d.ts +1 -1
- package/dist/runtime/statewire-model-lane.d.ts +1 -1
- package/dist/runtime/statewire-server-lane-context.d.ts +1 -1
- package/dist/runtime/statewire-session-key.cjs +7 -0
- package/dist/runtime/statewire-session-key.cjs.map +1 -1
- package/dist/runtime/statewire-session-key.d.ts +16 -0
- package/dist/runtime/statewire-session-key.js +8 -1
- package/dist/runtime/statewire-session-key.js.map +1 -1
- package/dist/runtime/statewire-session-lane.cjs +48 -0
- package/dist/runtime/statewire-session-lane.cjs.map +1 -0
- package/dist/runtime/statewire-session-lane.d.ts +29 -0
- package/dist/runtime/statewire-session-lane.js +48 -0
- package/dist/runtime/statewire-session-lane.js.map +1 -0
- package/dist/runtime/statewire-thread-config-lane.d.ts +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.cjs +16 -5
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +15 -1
- package/dist/runtime/useAthenaStatewireRuntime.js +17 -6
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/threads/api.d.ts +1 -1
- package/dist/threads/conversation-list-fetcher.d.ts +1 -1
- package/dist/threads/index-triggered-refresh.cjs +164 -0
- package/dist/threads/index-triggered-refresh.cjs.map +1 -0
- package/dist/threads/index-triggered-refresh.d.ts +70 -0
- package/dist/threads/index-triggered-refresh.js +164 -0
- package/dist/threads/index-triggered-refresh.js.map +1 -0
- package/dist/threads/offline-session-list.d.ts +1 -1
- package/dist/threads/pull-request-display.d.ts +1 -1
- package/dist/threads/session-list-model.d.ts +1 -1
- package/dist/threads/session-list-tab-share.cjs +150 -0
- package/dist/threads/session-list-tab-share.cjs.map +1 -0
- package/dist/threads/session-list-tab-share.d.ts +73 -0
- package/dist/threads/session-list-tab-share.js +150 -0
- package/dist/threads/session-list-tab-share.js.map +1 -0
- package/dist/threads/session-row-parts.d.ts +1 -1
- package/dist/threads/sessions-query.d.ts +1 -1
- package/dist/threads/statewire-thread-list.cjs +42 -16
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.d.ts +11 -2
- package/dist/threads/statewire-thread-list.js +43 -17
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/threads/thread-prefetcher.d.ts +1 -1
- package/dist/threads/use-athena-session-attention.d.ts +1 -1
- package/dist/threads/use-athena-sessions.cjs +32 -22
- package/dist/threads/use-athena-sessions.cjs.map +1 -1
- package/dist/threads/use-athena-sessions.js +33 -23
- package/dist/threads/use-athena-sessions.js.map +1 -1
- package/dist/threads/use-rest-conversation-history.d.ts +1 -1
- package/dist/threads/use-statewire-conversation-history.d.ts +5 -5
- package/dist/tiptap-markdown-table/src/markdown-table-serializer.d.ts +56 -0
- package/dist/tools/NestedPtcMessages.cjs +14 -9
- package/dist/tools/NestedPtcMessages.cjs.map +1 -1
- package/dist/tools/NestedPtcMessages.d.ts +9 -0
- package/dist/tools/NestedPtcMessages.js +6 -1
- package/dist/tools/NestedPtcMessages.js.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/primitives.d.ts +1 -1
- package/dist/tools/subagent-task-tool-ui.cjs +494 -0
- package/dist/tools/subagent-task-tool-ui.cjs.map +1 -0
- package/dist/tools/subagent-task-tool-ui.d.ts +109 -0
- package/dist/tools/subagent-task-tool-ui.js +494 -0
- package/dist/tools/subagent-task-tool-ui.js.map +1 -0
- package/dist/tools/tool-fallback.d.ts +1 -1
- package/dist/tools/tool-icons.d.ts +1 -1
- package/dist/tools/tool-summary.d.ts +1 -1
- package/dist/tools/tool-uis.cjs +4 -0
- package/dist/tools/tool-uis.cjs.map +1 -1
- package/dist/tools/tool-uis.js +4 -0
- package/dist/tools/tool-uis.js.map +1 -1
- package/dist/voice/chat.cjs +6 -0
- package/dist/voice/chat.cjs.map +1 -0
- package/dist/voice/chat.d.ts +2 -0
- package/dist/voice/chat.js +6 -0
- package/dist/voice/chat.js.map +1 -0
- package/dist/voice/livekit-join.cjs +119 -0
- package/dist/voice/livekit-join.cjs.map +1 -0
- package/dist/voice/livekit-join.d.ts +8 -0
- package/dist/voice/livekit-join.js +119 -0
- package/dist/voice/livekit-join.js.map +1 -0
- package/dist/voice/livekit.cjs +32 -0
- package/dist/voice/livekit.cjs.map +1 -0
- package/dist/voice/livekit.d.ts +80 -0
- package/dist/voice/livekit.js +32 -0
- package/dist/voice/livekit.js.map +1 -0
- package/package.json +20 -10
|
@@ -2,6 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { AuiProvider, AuiConfig, useAui } from "@assistant-ui/react";
|
|
3
3
|
import { useMemo, useRef, useEffect, useContext, useState, useCallback, useReducer, useLayoutEffect } from "react";
|
|
4
4
|
import { useKeptSnapshotsGate, AthenaOfflineSnapshotsContext } from "../offline/offline-history.js";
|
|
5
|
+
import { chatOutboxStoreFor } from "../offline/chat-outbox.js";
|
|
5
6
|
import { getAthenaEnvironmentUrls, deriveAthenaAppUrl, assertHostMintedStatewireMount, resolveStatewireSyncUrl } from "../lib/athena-urls.js";
|
|
6
7
|
import { getAthenaApiBaseUrl } from "../collab/mint.js";
|
|
7
8
|
import { useParentBridge } from "../runtime/auth.js";
|
|
@@ -10,12 +11,15 @@ import { AthenaCredentialSourceContext } from "../auth/AthenaCredentialSourceCon
|
|
|
10
11
|
import { createAthenaCredentialSource } from "../auth/credential-source.js";
|
|
11
12
|
import { useRestartAfterAuthRefusal } from "../runtime/auth-refusal-restart.js";
|
|
12
13
|
import { useStatewireClientTools, useAthenaStatewireRuntime } from "../runtime/useAthenaStatewireRuntime.js";
|
|
14
|
+
import { statewireSessionPrincipal } from "../runtime/statewire-session-key.js";
|
|
15
|
+
import { createStatewireSessionLaneGate, StatewireSessionLaneContext } from "../runtime/statewire-session-lane.js";
|
|
13
16
|
import { isStatewireChannelLive, statewireLifecycleReducer, initialStatewireLifecycle, athenaStatewireErrorNotice } from "../runtime/statewire-lifecycle.js";
|
|
17
|
+
import { sendWithCredentialRenewal } from "../runtime/credential-renewal.js";
|
|
14
18
|
import { resolveAgentProp } from "../runtime/statewire-run-config.js";
|
|
15
19
|
import { providerThreadConfig } from "../runtime/statewire-thread-config-lane.js";
|
|
16
20
|
import { mintThreadId } from "../threads/mint-thread-id.js";
|
|
17
21
|
import { AthenaStatewireLifecycleContext } from "./statewire-lifecycle-context.js";
|
|
18
|
-
import { createComposerHandoffStore, clearComposerHandoff, ComposerHandoffContext, useComposerHandoffStore, useComposerReady, drainComposerHandoff } from "../composer/composer-handoff.js";
|
|
22
|
+
import { createComposerHandoffStore, clearComposerHandoff, ComposerHandoffContext, useComposerHandoffStore, useComposerReady, drainComposerHandoff, rememberRestoredAttachments } from "../composer/composer-handoff.js";
|
|
19
23
|
import { createStatewireHistoryStore, StatewireHistoryContext } from "./statewire-history-context.js";
|
|
20
24
|
import { StatewireToolOutputsContext } from "./statewire-window-context.js";
|
|
21
25
|
import { StatewireClientToolBridge } from "../chat/StatewireClientToolBridge.js";
|
|
@@ -38,9 +42,12 @@ import { PostHogProvider } from "./PostHogProvider.js";
|
|
|
38
42
|
import { createThreadSnapshotMirror } from "../agent-runtime/src/thread-snapshot-mirror.js";
|
|
39
43
|
import { createDurableThreadSnapshotCache } from "../agent-runtime/src/durable-thread-snapshot-cache.js";
|
|
40
44
|
import { createDeepAgentThreadSnapshotCache } from "../agent-runtime/src/thread-snapshot-cache.js";
|
|
45
|
+
import { createChatOutboxAttachmentCheck, chatOutboxAttachmentPath } from "../agent-runtime/src/chat-outbox-attachments.js";
|
|
41
46
|
import { createDeepAgentToolOutputStore } from "../agent-runtime/src/tool-outputs.js";
|
|
42
47
|
import { DeepAgentConnectionContext } from "../agent-runtime/src/thread-status.js";
|
|
48
|
+
import { DeepAgentChatOutboxContext, useDeepAgentChatOutbox } from "../agent-runtime/src/use-deep-agent-chat-outbox.js";
|
|
43
49
|
import { readServerConfig } from "../agent-runtime/src/use-deep-agent-config.js";
|
|
50
|
+
import { browserOnlineSignal, allChatOutboxSignals, documentVisibleSignal } from "../agent-runtime/src/chat-outbox-signals.js";
|
|
44
51
|
const resolveTokenOverride = ({
|
|
45
52
|
config,
|
|
46
53
|
token
|
|
@@ -102,6 +109,7 @@ function ComposerHandoffDrain() {
|
|
|
102
109
|
return null;
|
|
103
110
|
}
|
|
104
111
|
const EMPTY_MODES = [];
|
|
112
|
+
const CHAT_OUTBOX_ATTACHMENT_READ_TIMEOUT_MS = 1e4;
|
|
105
113
|
function withEntry(record, key, value) {
|
|
106
114
|
if (value === null) {
|
|
107
115
|
if (!(key in record)) return record;
|
|
@@ -136,8 +144,12 @@ function AthenaStatewireRuntimeMount({
|
|
|
136
144
|
appId,
|
|
137
145
|
extraRunConfig,
|
|
138
146
|
snapshotCache,
|
|
139
|
-
toolOutputs
|
|
147
|
+
toolOutputs,
|
|
148
|
+
chatOutbox = null,
|
|
149
|
+
sessionLane,
|
|
150
|
+
subagentLaneHistory
|
|
140
151
|
}) {
|
|
152
|
+
const outboxRef = useRef(null);
|
|
141
153
|
const [lifecycle, dispatchLifecycle] = useReducer(
|
|
142
154
|
statewireLifecycleReducer,
|
|
143
155
|
initialStatewireLifecycle
|
|
@@ -166,6 +178,7 @@ function AthenaStatewireRuntimeMount({
|
|
|
166
178
|
extraRunConfig,
|
|
167
179
|
snapshotCache,
|
|
168
180
|
toolOutputs,
|
|
181
|
+
subagentLaneHistory,
|
|
169
182
|
// The runtime already records every transport error on the diagnostics
|
|
170
183
|
// bus (with the channel-teardown split), so this layer only maps it to
|
|
171
184
|
// the banner notice.
|
|
@@ -179,6 +192,10 @@ function AthenaStatewireRuntimeMount({
|
|
|
179
192
|
onRawConnectionChange: (connection) => {
|
|
180
193
|
dispatchLifecycle({ type: "raw-connection", reconnect: connection.reconnect });
|
|
181
194
|
},
|
|
195
|
+
onCommandChange: (update) => {
|
|
196
|
+
var _a;
|
|
197
|
+
return (_a = outboxRef.current) == null ? void 0 : _a.observeCommand(update);
|
|
198
|
+
},
|
|
182
199
|
// The lane as the host holds it: anything that decides from the lane waits
|
|
183
200
|
// for this, never the placeholder or remembered snapshot rendered before.
|
|
184
201
|
onServerState: (state) => {
|
|
@@ -186,6 +203,64 @@ function AthenaStatewireRuntimeMount({
|
|
|
186
203
|
setServerLane((previous) => nextServerLane({ previous, config }));
|
|
187
204
|
}
|
|
188
205
|
});
|
|
206
|
+
const lanePending = statewireSessionPrincipal(useContext(AthenaAuthContext)) === null;
|
|
207
|
+
useEffect(() => {
|
|
208
|
+
sessionLane.setPending(lanePending);
|
|
209
|
+
}, [sessionLane, lanePending]);
|
|
210
|
+
const connectionRef = useRef(lifecycle.connection);
|
|
211
|
+
connectionRef.current = lifecycle.connection;
|
|
212
|
+
const [connectionListeners] = useState(() => /* @__PURE__ */ new Set());
|
|
213
|
+
useEffect(() => {
|
|
214
|
+
for (const listener of connectionListeners) listener();
|
|
215
|
+
}, [lifecycle.connection, connectionListeners]);
|
|
216
|
+
const [channelReachability] = useState(() => ({
|
|
217
|
+
get: () => {
|
|
218
|
+
var _a;
|
|
219
|
+
return ((_a = connectionRef.current) == null ? void 0 : _a.status) !== "retrying";
|
|
220
|
+
},
|
|
221
|
+
subscribe: (listener) => {
|
|
222
|
+
connectionListeners.add(listener);
|
|
223
|
+
return () => {
|
|
224
|
+
connectionListeners.delete(listener);
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}));
|
|
228
|
+
const [browserOnline] = useState(browserOnlineSignal);
|
|
229
|
+
const hostReachability = chatOutbox == null ? void 0 : chatOutbox.reachability;
|
|
230
|
+
const reachability = useMemo(
|
|
231
|
+
() => allChatOutboxSignals(hostReachability ?? browserOnline, channelReachability),
|
|
232
|
+
[hostReachability, browserOnline, channelReachability]
|
|
233
|
+
);
|
|
234
|
+
const [defaultForeground] = useState(documentVisibleSignal);
|
|
235
|
+
const composerHandoff = useComposerHandoffStore();
|
|
236
|
+
const outbox = useDeepAgentChatOutbox({
|
|
237
|
+
client,
|
|
238
|
+
threadId,
|
|
239
|
+
isNewChat,
|
|
240
|
+
store: (chatOutbox == null ? void 0 : chatOutbox.store) ?? null,
|
|
241
|
+
reachability,
|
|
242
|
+
foreground: (chatOutbox == null ? void 0 : chatOutbox.foreground) ?? defaultForeground,
|
|
243
|
+
// Cancel and Edit give the draft back, after anything typed since. Its attachments come back
|
|
244
|
+
// as mentions in it, remembered so a message held again from it is asked about again.
|
|
245
|
+
restore: (entry) => {
|
|
246
|
+
const draft = entry.composerMarkdown ?? entry.text;
|
|
247
|
+
const current = client.composer.getState().text ?? "";
|
|
248
|
+
client.composer.setText(current.trim() ? `${current}
|
|
249
|
+
|
|
250
|
+
${draft}` : draft);
|
|
251
|
+
if (composerHandoff && entry.attachments) {
|
|
252
|
+
rememberRestoredAttachments({
|
|
253
|
+
store: composerHandoff,
|
|
254
|
+
threadId,
|
|
255
|
+
attachments: entry.attachments
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
...(chatOutbox == null ? void 0 : chatOutbox.openThread) && { openThread: chatOutbox.openThread },
|
|
260
|
+
...(chatOutbox == null ? void 0 : chatOutbox.checkAttachments) && { checkAttachments: chatOutbox.checkAttachments },
|
|
261
|
+
enabled: chatOutbox !== null
|
|
262
|
+
});
|
|
263
|
+
outboxRef.current = outbox;
|
|
189
264
|
useRestartAfterAuthRefusal({
|
|
190
265
|
connection: lifecycle.connection,
|
|
191
266
|
reconnect: lifecycle.reconnect
|
|
@@ -219,9 +294,10 @@ function AthenaStatewireRuntimeMount({
|
|
|
219
294
|
client,
|
|
220
295
|
lifecycle: lifecycleValue,
|
|
221
296
|
serverLane,
|
|
222
|
-
threadConfig
|
|
297
|
+
threadConfig,
|
|
298
|
+
outbox
|
|
223
299
|
}),
|
|
224
|
-
[threadId, isNewChat, client, lifecycleValue, serverLane, threadConfig]
|
|
300
|
+
[threadId, isNewChat, client, lifecycleValue, serverLane, threadConfig, outbox]
|
|
225
301
|
);
|
|
226
302
|
useLayoutEffect(() => {
|
|
227
303
|
onPublish(snapshot);
|
|
@@ -321,7 +397,7 @@ function AthenaStatewireStandalone({
|
|
|
321
397
|
published.threadId
|
|
322
398
|
),
|
|
323
399
|
/* @__PURE__ */ jsx(ComposerHandoffDrain, {}),
|
|
324
|
-
/* @__PURE__ */ jsx(AthenaChatModeSelectionContext.Provider, { value: chatModeSelection, children })
|
|
400
|
+
/* @__PURE__ */ jsx(DeepAgentChatOutboxContext.Provider, { value: published.outbox, children: /* @__PURE__ */ jsx(AthenaChatModeSelectionContext.Provider, { value: chatModeSelection, children }) })
|
|
325
401
|
] }) }) }) }) }) }) }) }) });
|
|
326
402
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
327
403
|
/* @__PURE__ */ jsx(
|
|
@@ -390,15 +466,25 @@ function AthenaStatewireWithThreadList({
|
|
|
390
466
|
}
|
|
391
467
|
function AthenaStatewireActiveThreadHost({
|
|
392
468
|
children,
|
|
469
|
+
chatOutbox,
|
|
393
470
|
...standaloneProps
|
|
394
471
|
}) {
|
|
395
472
|
const list = useAthenaStatewireThreadList();
|
|
473
|
+
const selectThread = list == null ? void 0 : list.selectThread;
|
|
474
|
+
const outboxHost = useMemo(
|
|
475
|
+
() => chatOutbox && !chatOutbox.openThread && selectThread ? {
|
|
476
|
+
...chatOutbox,
|
|
477
|
+
openThread: ({ threadId, newChat }) => selectThread(threadId, { isNew: newChat })
|
|
478
|
+
} : chatOutbox,
|
|
479
|
+
[chatOutbox, selectThread]
|
|
480
|
+
);
|
|
396
481
|
if (!list) return null;
|
|
397
482
|
return /* @__PURE__ */ jsxs(
|
|
398
483
|
AthenaStatewireStandalone,
|
|
399
484
|
{
|
|
400
485
|
threadId: list.activeThreadId,
|
|
401
486
|
threadList: { isNewChat: list.isNewChat },
|
|
487
|
+
chatOutbox: outboxHost,
|
|
402
488
|
...standaloneProps,
|
|
403
489
|
children: [
|
|
404
490
|
/* @__PURE__ */ jsx(StatewireThreadTitlePoller, {}),
|
|
@@ -452,7 +538,9 @@ function AthenaProvider({
|
|
|
452
538
|
debug,
|
|
453
539
|
onDiagnostic,
|
|
454
540
|
onError,
|
|
455
|
-
offlineHistory
|
|
541
|
+
offlineHistory,
|
|
542
|
+
chatOutbox,
|
|
543
|
+
subagentLaneHistory = false
|
|
456
544
|
}) {
|
|
457
545
|
var _a;
|
|
458
546
|
const agentAssetId = resolveAgentProp({ agent });
|
|
@@ -549,6 +637,50 @@ function AthenaProvider({
|
|
|
549
637
|
const [snapshotCache] = useState(
|
|
550
638
|
() => durableSnapshotCache ?? createDeepAgentThreadSnapshotCache()
|
|
551
639
|
);
|
|
640
|
+
const chatOutboxRef = useRef(chatOutbox);
|
|
641
|
+
chatOutboxRef.current = chatOutbox;
|
|
642
|
+
const chatOutboxOwnerId = (chatOutbox == null ? void 0 : chatOutbox.ownerId) ?? null;
|
|
643
|
+
const chatOutboxStore = useMemo(() => {
|
|
644
|
+
const host = chatOutboxRef.current;
|
|
645
|
+
return host && host.ownerId === chatOutboxOwnerId ? chatOutboxStoreFor(host) : null;
|
|
646
|
+
}, [chatOutboxOwnerId]);
|
|
647
|
+
useEffect(() => {
|
|
648
|
+
if (chatOutbox) chatOutboxStoreFor(chatOutbox);
|
|
649
|
+
}, [chatOutbox]);
|
|
650
|
+
const chatOutboxReachability = chatOutbox == null ? void 0 : chatOutbox.reachability;
|
|
651
|
+
const chatOutboxForeground = chatOutbox == null ? void 0 : chatOutbox.foreground;
|
|
652
|
+
const chatOutboxOpenThread = chatOutbox == null ? void 0 : chatOutbox.openThread;
|
|
653
|
+
const outboxCheckAuthRef = useRef({});
|
|
654
|
+
const outboxCheckBackendRef = useRef("");
|
|
655
|
+
const [checkChatOutboxAttachments] = useState(
|
|
656
|
+
() => createChatOutboxAttachmentCheck({
|
|
657
|
+
readAsset: (assetId) => sendWithCredentialRenewal(
|
|
658
|
+
outboxCheckAuthRef.current,
|
|
659
|
+
(headers) => fetch(`${outboxCheckBackendRef.current}${chatOutboxAttachmentPath(assetId)}`, {
|
|
660
|
+
method: "GET",
|
|
661
|
+
headers,
|
|
662
|
+
signal: AbortSignal.timeout(CHAT_OUTBOX_ATTACHMENT_READ_TIMEOUT_MS)
|
|
663
|
+
})
|
|
664
|
+
)
|
|
665
|
+
})
|
|
666
|
+
);
|
|
667
|
+
const chatOutboxHost = useMemo(
|
|
668
|
+
() => chatOutboxOwnerId === null ? null : {
|
|
669
|
+
store: chatOutboxStore,
|
|
670
|
+
...chatOutboxReachability && { reachability: chatOutboxReachability },
|
|
671
|
+
...chatOutboxForeground && { foreground: chatOutboxForeground },
|
|
672
|
+
...chatOutboxOpenThread && { openThread: chatOutboxOpenThread },
|
|
673
|
+
checkAttachments: checkChatOutboxAttachments
|
|
674
|
+
},
|
|
675
|
+
[
|
|
676
|
+
chatOutboxOwnerId,
|
|
677
|
+
chatOutboxStore,
|
|
678
|
+
chatOutboxReachability,
|
|
679
|
+
chatOutboxForeground,
|
|
680
|
+
chatOutboxOpenThread,
|
|
681
|
+
checkChatOutboxAttachments
|
|
682
|
+
]
|
|
683
|
+
);
|
|
552
684
|
const offlineOwnerId = (offlineHistory == null ? void 0 : offlineHistory.ownerId) ?? null;
|
|
553
685
|
const awaitingKeptSnapshots = useKeptSnapshotsGate({
|
|
554
686
|
cache: durableSnapshotCache,
|
|
@@ -573,8 +705,21 @@ function AthenaProvider({
|
|
|
573
705
|
useEffect(() => {
|
|
574
706
|
snapshotCache.clear();
|
|
575
707
|
toolOutputs.clear();
|
|
576
|
-
|
|
577
|
-
|
|
708
|
+
}, [snapshotCache, toolOutputs, principal, configuredApiKey]);
|
|
709
|
+
const sessionPrincipal = statewireSessionPrincipal(authContext);
|
|
710
|
+
const [sessionLane] = useState(
|
|
711
|
+
() => createStatewireSessionLaneGate({ pending: sessionPrincipal === null })
|
|
712
|
+
);
|
|
713
|
+
const handoffIdentityRef = useRef(null);
|
|
714
|
+
useEffect(() => {
|
|
715
|
+
if (sessionPrincipal === null) return;
|
|
716
|
+
const identity = JSON.stringify([sessionPrincipal, configuredApiKey ?? null]);
|
|
717
|
+
const previous = handoffIdentityRef.current;
|
|
718
|
+
handoffIdentityRef.current = identity;
|
|
719
|
+
if (previous !== null && previous !== identity) {
|
|
720
|
+
clearComposerHandoff({ store: composerHandoff, reason: "the signed-in identity changed" });
|
|
721
|
+
}
|
|
722
|
+
}, [composerHandoff, sessionPrincipal, configuredApiKey]);
|
|
578
723
|
useEffect(
|
|
579
724
|
() => () => clearComposerHandoff({ store: composerHandoff, reason: "the chat provider unmounted" }),
|
|
580
725
|
[composerHandoff]
|
|
@@ -598,6 +743,12 @@ function AthenaProvider({
|
|
|
598
743
|
const effectiveBackendUrl = getAthenaApiBaseUrl(
|
|
599
744
|
configuredBackendUrl ?? bridge.backendBaseUrl ?? environmentUrls.backendUrl
|
|
600
745
|
);
|
|
746
|
+
outboxCheckBackendRef.current = effectiveBackendUrl;
|
|
747
|
+
outboxCheckAuthRef.current = {
|
|
748
|
+
apiKey: configuredApiKey,
|
|
749
|
+
token: effectiveToken,
|
|
750
|
+
getToken: credentialGetToken
|
|
751
|
+
};
|
|
601
752
|
const hostStatewireSyncUrl = configuredStatewireSyncUrl ?? bridge.statewireSyncUrl ?? void 0;
|
|
602
753
|
const effectiveAppUrl = configuredAppUrl ?? bridge.appUrl ?? deriveAthenaAppUrl({ apiUrl: effectiveApiUrl, backendUrl: effectiveBackendUrl }) ?? environmentUrls.appUrl;
|
|
603
754
|
if (!bridge.ready) {
|
|
@@ -638,6 +789,9 @@ function AthenaProvider({
|
|
|
638
789
|
snapshotCache,
|
|
639
790
|
toolOutputs,
|
|
640
791
|
historyStore,
|
|
792
|
+
chatOutbox: chatOutboxHost,
|
|
793
|
+
sessionLane,
|
|
794
|
+
subagentLaneHistory,
|
|
641
795
|
linkClicks,
|
|
642
796
|
citationLinks
|
|
643
797
|
};
|
|
@@ -670,7 +824,7 @@ function AthenaProvider({
|
|
|
670
824
|
{
|
|
671
825
|
className: themeStyleVars ? "athena-sdk athena-themed" : "athena-sdk",
|
|
672
826
|
style: themeStyleVars,
|
|
673
|
-
children: /* @__PURE__ */ jsx(PostHogProvider, { config: posthogConfig, children: /* @__PURE__ */ jsx(ComposerHandoffContext.Provider, { value: composerHandoff, children: /* @__PURE__ */ jsx(AthenaThemeStyleContext.Provider, { value: themeStyleVars, children: /* @__PURE__ */ jsx(AthenaCredentialSourceContext.Provider, { value: credentials, children: /* @__PURE__ */ jsx(AthenaAgentSelectionContext.Provider, { value: agentSelection, children: /* @__PURE__ */ jsx(AthenaOfflineSnapshotsContext.Provider, { value: offlineSnapshots, children: awaitingKeptSnapshots ? null : inner }) }) }) }) }) })
|
|
827
|
+
children: /* @__PURE__ */ jsx(PostHogProvider, { config: posthogConfig, children: /* @__PURE__ */ jsx(ComposerHandoffContext.Provider, { value: composerHandoff, children: /* @__PURE__ */ jsx(StatewireSessionLaneContext.Provider, { value: sessionLane, children: /* @__PURE__ */ jsx(AthenaThemeStyleContext.Provider, { value: themeStyleVars, children: /* @__PURE__ */ jsx(AthenaCredentialSourceContext.Provider, { value: credentials, children: /* @__PURE__ */ jsx(AthenaAgentSelectionContext.Provider, { value: agentSelection, children: /* @__PURE__ */ jsx(AthenaOfflineSnapshotsContext.Provider, { value: offlineSnapshots, children: awaitingKeptSnapshots ? null : inner }) }) }) }) }) }) })
|
|
674
828
|
}
|
|
675
829
|
);
|
|
676
830
|
}
|