@athenaintel/react 0.28.1 → 0.30.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 +418 -10
- package/dist/agent-runtime/src/asset-attachment.cjs.map +1 -0
- package/dist/agent-runtime/src/asset-attachment.js.map +1 -0
- package/dist/agent-runtime/src/auth-denial.cjs.map +1 -0
- package/dist/agent-runtime/src/auth-denial.js.map +1 -0
- package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -0
- package/dist/agent-runtime/src/client-tool-bridge.js.map +1 -0
- package/dist/agent-runtime/src/client-tools.cjs.map +1 -0
- package/dist/agent-runtime/src/client-tools.js.map +1 -0
- package/dist/agent-runtime/src/composer-markdown.cjs +124 -0
- package/dist/agent-runtime/src/composer-markdown.cjs.map +1 -0
- package/dist/agent-runtime/src/composer-markdown.js +124 -0
- package/dist/agent-runtime/src/composer-markdown.js.map +1 -0
- package/dist/agent-runtime/src/conversation-index.cjs.map +1 -0
- package/dist/agent-runtime/src/conversation-index.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/conversation-list.cjs +36 -0
- package/dist/agent-runtime/src/conversation-list.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/conversation-list.js +36 -0
- package/dist/agent-runtime/src/conversation-list.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/deep-agent-transport-recipe.cjs +5 -3
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/deep-agent-transport-recipe.js +6 -4
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -0
- package/dist/agent-runtime/src/edit-command.cjs.map +1 -0
- package/dist/agent-runtime/src/edit-command.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/errors.cjs +23 -0
- package/dist/agent-runtime/src/errors.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/errors.js +23 -0
- package/dist/agent-runtime/src/errors.js.map +1 -0
- package/dist/agent-runtime/src/execute-output.cjs +41 -0
- package/dist/agent-runtime/src/execute-output.cjs.map +1 -0
- package/dist/agent-runtime/src/execute-output.js +41 -0
- package/dist/agent-runtime/src/execute-output.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/generated/runconfig-contract.cjs +10 -2
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/generated/runconfig-contract.js +10 -2
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -0
- package/dist/agent-runtime/src/github-wake-event.cjs.map +1 -0
- package/dist/agent-runtime/src/github-wake-event.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/interrupts.cjs +24 -1
- package/dist/agent-runtime/src/interrupts.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/interrupts.js +24 -1
- package/dist/agent-runtime/src/interrupts.js.map +1 -0
- package/dist/agent-runtime/src/message-author.cjs.map +1 -0
- package/dist/agent-runtime/src/message-author.js.map +1 -0
- package/dist/agent-runtime/src/message-window.cjs.map +1 -0
- package/dist/agent-runtime/src/message-window.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/messages.cjs +8 -4
- package/dist/agent-runtime/src/messages.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/messages.js +6 -2
- package/dist/agent-runtime/src/messages.js.map +1 -0
- package/dist/agent-runtime/src/model-context.cjs.map +1 -0
- package/dist/agent-runtime/src/model-context.js.map +1 -0
- package/dist/agent-runtime/src/optimistic-content.cjs.map +1 -0
- package/dist/agent-runtime/src/optimistic-content.js.map +1 -0
- package/dist/agent-runtime/src/protocol.cjs.map +1 -0
- package/dist/agent-runtime/src/protocol.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/queue.cjs +23 -2
- package/dist/agent-runtime/src/queue.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/queue.js +23 -2
- package/dist/agent-runtime/src/queue.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/quota-safe-local-storage-session.cjs +23 -13
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/quota-safe-local-storage-session.js +24 -14
- package/dist/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -0
- package/dist/agent-runtime/src/runtime-messages.cjs.map +1 -0
- package/dist/agent-runtime/src/runtime-messages.js.map +1 -0
- package/dist/agent-runtime/src/screen-point.cjs.map +1 -0
- package/dist/agent-runtime/src/screen-point.js.map +1 -0
- package/dist/agent-runtime/src/send-recovery.cjs.map +1 -0
- package/dist/agent-runtime/src/send-recovery.js.map +1 -0
- package/dist/agent-runtime/src/statewire-attach-observer.cjs.map +1 -0
- package/dist/agent-runtime/src/statewire-attach-observer.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-state.cjs +8 -0
- package/dist/agent-runtime/src/statewire-state.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-state.js +8 -0
- package/dist/agent-runtime/src/statewire-state.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-suspended.cjs +4 -0
- package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-suspended.js +4 -0
- package/dist/agent-runtime/src/statewire-suspended.js.map +1 -0
- package/dist/agent-runtime/src/statewire-transport.cjs +43 -0
- package/dist/agent-runtime/src/statewire-transport.cjs.map +1 -0
- package/dist/agent-runtime/src/statewire-transport.js +43 -0
- package/dist/agent-runtime/src/statewire-transport.js.map +1 -0
- package/dist/agent-runtime/src/streaming-markdown.cjs.map +1 -0
- package/dist/agent-runtime/src/streaming-markdown.js.map +1 -0
- package/dist/agent-runtime/src/subscription-wake-event.cjs +252 -0
- package/dist/agent-runtime/src/subscription-wake-event.cjs.map +1 -0
- package/dist/agent-runtime/src/subscription-wake-event.js +252 -0
- package/dist/agent-runtime/src/subscription-wake-event.js.map +1 -0
- package/dist/agent-runtime/src/thread-extras.cjs.map +1 -0
- package/dist/agent-runtime/src/thread-extras.js.map +1 -0
- package/dist/agent-runtime/src/thread-snapshot-cache.cjs.map +1 -0
- package/dist/agent-runtime/src/thread-snapshot-cache.js.map +1 -0
- package/dist/agent-runtime/src/thread-status.cjs.map +1 -0
- package/dist/agent-runtime/src/thread-status.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/tool-metadata.cjs +279 -3
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/tool-metadata.js +279 -3
- package/dist/agent-runtime/src/tool-metadata.js.map +1 -0
- package/dist/agent-runtime/src/tool-names.cjs +5 -0
- package/dist/agent-runtime/src/tool-names.cjs.map +1 -0
- package/dist/agent-runtime/src/tool-names.js +5 -0
- package/dist/agent-runtime/src/tool-names.js.map +1 -0
- package/dist/agent-runtime/src/tool-outputs.cjs.map +1 -0
- package/dist/agent-runtime/src/tool-outputs.js.map +1 -0
- package/dist/agent-runtime/src/tool-result.cjs.map +1 -0
- package/dist/agent-runtime/src/tool-result.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-conversation-list.cjs +33 -22
- package/dist/agent-runtime/src/use-conversation-list.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-conversation-list.js +34 -23
- package/dist/agent-runtime/src/use-conversation-list.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-config.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-config.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-edit-submit.cjs +2 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-edit-submit.js +2 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-thread.cjs +1 -0
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-thread.js +2 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-window-sync.js.map +1 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.cjs +52 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.cjs.map +1 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.js +52 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/voice-presentation.cjs +14 -0
- package/dist/agent-runtime/src/voice-presentation.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/voice-presentation.js +14 -0
- package/dist/agent-runtime/src/voice-presentation.js.map +1 -0
- package/dist/agent-runtime/src/voice-turn-grouping.cjs.map +1 -0
- package/dist/agent-runtime/src/voice-turn-grouping.js.map +1 -0
- package/dist/assets/AthenaAssetEmbed.cjs +8 -2
- package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
- package/dist/assets/AthenaAssetEmbed.d.ts +8 -0
- package/dist/assets/AthenaAssetEmbed.js +8 -2
- package/dist/assets/AthenaAssetEmbed.js.map +1 -1
- package/dist/assets/AthenaLayout.cjs +97 -31
- package/dist/assets/AthenaLayout.cjs.map +1 -1
- package/dist/assets/AthenaLayout.d.ts +13 -0
- package/dist/assets/AthenaLayout.js +98 -32
- package/dist/assets/AthenaLayout.js.map +1 -1
- package/dist/assets/asset-embed-messages.cjs.map +1 -1
- package/dist/assets/asset-embed-messages.d.ts +6 -0
- package/dist/assets/asset-embed-messages.js.map +1 -1
- package/dist/assets/asset-panel-store.cjs +68 -32
- package/dist/assets/asset-panel-store.cjs.map +1 -1
- package/dist/assets/asset-panel-store.d.ts +47 -1
- package/dist/assets/asset-panel-store.js +68 -32
- package/dist/assets/asset-panel-store.js.map +1 -1
- package/dist/assets/use-asset-embed.cjs +29 -8
- package/dist/assets/use-asset-embed.cjs.map +1 -1
- package/dist/assets/use-asset-embed.d.ts +7 -0
- package/dist/assets/use-asset-embed.js +29 -8
- package/dist/assets/use-asset-embed.js.map +1 -1
- package/dist/catalog/chat-pickers.cjs +152 -0
- package/dist/catalog/chat-pickers.cjs.map +1 -0
- package/dist/catalog/chat-pickers.d.ts +22 -0
- package/dist/catalog/chat-pickers.js +152 -0
- package/dist/catalog/chat-pickers.js.map +1 -0
- package/dist/catalog/runtime-catalog.cjs +181 -0
- package/dist/catalog/runtime-catalog.cjs.map +1 -0
- package/dist/catalog/runtime-catalog.d.ts +100 -0
- package/dist/catalog/runtime-catalog.js +181 -0
- package/dist/catalog/runtime-catalog.js.map +1 -0
- package/dist/chat/AthenaChat.cjs +86 -46
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +21 -4
- package/dist/chat/AthenaChat.js +88 -48
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireApprovalCard.cjs +38 -37
- package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
- package/dist/chat/StatewireApprovalCard.d.ts +2 -0
- package/dist/chat/StatewireApprovalCard.js +39 -38
- package/dist/chat/StatewireApprovalCard.js.map +1 -1
- package/dist/chat/StatewireClientToolBridge.cjs +2 -2
- package/dist/chat/StatewireClientToolBridge.js +2 -2
- package/dist/chat/StatewireQueuedMessages.cjs +15 -12
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.d.ts +22 -2
- package/dist/chat/StatewireQueuedMessages.js +15 -12
- package/dist/chat/StatewireQueuedMessages.js.map +1 -1
- package/dist/chat/StatewireRunRefusalNotice.cjs +48 -0
- package/dist/chat/StatewireRunRefusalNotice.cjs.map +1 -0
- package/dist/chat/StatewireRunRefusalNotice.d.ts +25 -0
- package/dist/chat/StatewireRunRefusalNotice.js +48 -0
- package/dist/chat/StatewireRunRefusalNotice.js.map +1 -0
- package/dist/chat/WaitingOnYouBanner.cjs +2 -2
- package/dist/chat/WaitingOnYouBanner.js +2 -2
- package/dist/chat/athena-citation-links.cjs +19 -15
- package/dist/chat/athena-citation-links.cjs.map +1 -1
- package/dist/chat/athena-citation-links.js +19 -15
- package/dist/chat/athena-citation-links.js.map +1 -1
- package/dist/chat/run-activity.cjs +9 -1
- package/dist/chat/run-activity.cjs.map +1 -1
- package/dist/chat/run-activity.d.ts +6 -0
- package/dist/chat/run-activity.js +10 -2
- package/dist/chat/run-activity.js.map +1 -1
- package/dist/chat/statewire-banners.cjs +30 -1
- package/dist/chat/statewire-banners.cjs.map +1 -1
- package/dist/chat/statewire-banners.d.ts +20 -1
- package/dist/chat/statewire-banners.js +32 -3
- package/dist/chat/statewire-banners.js.map +1 -1
- package/dist/chat/statewire-client-tools.cjs +1 -1
- package/dist/chat/statewire-client-tools.js +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.cjs +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.js +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +7 -5
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +8 -2
- package/dist/chat/super-grouping/SuperGroupingCard.js +7 -5
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +350 -0
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -0
- package/dist/chat/super-grouping/SuperGroupingTranscript.d.ts +31 -0
- package/dist/chat/super-grouping/SuperGroupingTranscript.js +350 -0
- package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -0
- package/dist/chat/super-grouping/ToolTimeline.cjs +13 -2
- package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.d.ts +10 -3
- package/dist/chat/super-grouping/ToolTimeline.js +13 -2
- package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.cjs +51 -26
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.d.ts +40 -8
- package/dist/chat/super-grouping/activity-timeline.js +52 -27
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
- package/dist/chat/super-grouping/index.cjs +12 -0
- package/dist/chat/super-grouping/index.cjs.map +1 -1
- package/dist/chat/super-grouping/index.d.ts +7 -2
- package/dist/chat/super-grouping/index.js +14 -2
- package/dist/chat/super-grouping/index.js.map +1 -1
- package/dist/chat/super-grouping/timeline-step.cjs +14 -5
- package/dist/chat/super-grouping/timeline-step.cjs.map +1 -1
- package/dist/chat/super-grouping/timeline-step.d.ts +10 -1
- package/dist/chat/super-grouping/timeline-step.js +15 -6
- package/dist/chat/super-grouping/timeline-step.js.map +1 -1
- package/dist/chat/super-grouping/turn-segments.cjs +82 -0
- package/dist/chat/super-grouping/turn-segments.cjs.map +1 -0
- package/dist/chat/super-grouping/turn-segments.d.ts +69 -0
- package/dist/chat/super-grouping/turn-segments.js +82 -0
- package/dist/chat/super-grouping/turn-segments.js.map +1 -0
- package/dist/chat/super-grouping/turn-timing.cjs +110 -0
- package/dist/chat/super-grouping/turn-timing.cjs.map +1 -0
- package/dist/chat/super-grouping/turn-timing.d.ts +52 -0
- package/dist/chat/super-grouping/turn-timing.js +110 -0
- package/dist/chat/super-grouping/turn-timing.js.map +1 -0
- package/dist/chat/tiptap-text.cjs +1 -1
- package/dist/chat/tiptap-text.js +1 -1
- package/dist/chat/use-athena-run-live.cjs +1 -1
- package/dist/chat/use-athena-run-live.js +1 -1
- package/dist/chat/use-statewire-approval-request.cjs +73 -4
- package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
- package/dist/chat/use-statewire-approval-request.js +74 -5
- package/dist/chat/use-statewire-approval-request.js.map +1 -1
- package/dist/chat-ui/composer/composer-message.cjs +284 -0
- package/dist/chat-ui/composer/composer-message.cjs.map +1 -0
- package/dist/chat-ui/composer/composer-message.d.ts +152 -0
- package/dist/chat-ui/composer/composer-message.js +284 -0
- package/dist/chat-ui/composer/composer-message.js.map +1 -0
- package/dist/chat-ui/composer/tiptap-composer.cjs +57 -11
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +34 -6
- package/dist/chat-ui/composer/tiptap-composer.js +57 -11
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/index.cjs +4 -1
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +3 -2
- package/dist/chat-ui/index.js +5 -2
- package/dist/chat-ui/index.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +3 -2
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.js +4 -3
- package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
- package/dist/chat-ui/mentions/mention-extension.cjs +8 -2
- package/dist/chat-ui/mentions/mention-extension.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-extension.js +8 -2
- package/dist/chat-ui/mentions/mention-extension.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs +3 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.js +3 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +65 -19
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +15 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +67 -21
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +4 -2
- 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 +2 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +5 -3
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -1
- package/dist/chat-ui/messages/message-components.cjs +30 -10
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.d.ts +21 -1
- package/dist/chat-ui/messages/message-components.js +30 -10
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/messages/runtime-message.cjs +1 -1
- package/dist/chat-ui/messages/runtime-message.js +1 -1
- package/dist/chat-ui/messages/statewire-continue-run.cjs +5 -5
- package/dist/chat-ui/messages/statewire-continue-run.js +5 -5
- package/dist/chat-ui/messages/user-edit-composer.cjs +1 -1
- package/dist/chat-ui/messages/user-edit-composer.js +1 -1
- package/dist/chat-ui/messages/wake-marker.cjs +39 -4
- package/dist/chat-ui/messages/wake-marker.cjs.map +1 -1
- package/dist/chat-ui/messages/wake-marker.d.ts +16 -5
- package/dist/chat-ui/messages/wake-marker.js +40 -5
- package/dist/chat-ui/messages/wake-marker.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-message-body.cjs +12 -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 +6 -1
- package/dist/chat-ui/rich-text/chat-message-body.js +13 -9
- package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.cjs +64 -6
- package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.d.ts +5 -0
- package/dist/chat-ui/rich-text/chat-text-schema.js +66 -8
- package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
- package/dist/chat-ui/statewire.cjs +1 -1
- package/dist/chat-ui/statewire.d.ts +1 -1
- package/dist/chat-ui/statewire.js +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.cjs +2 -2
- package/dist/chat-ui/thread/statewire-history-edge.js +2 -2
- package/dist/collab/client.cjs +218 -13
- package/dist/collab/client.cjs.map +1 -1
- package/dist/collab/client.d.ts +105 -2
- package/dist/collab/client.js +221 -17
- package/dist/collab/client.js.map +1 -1
- package/dist/collab/index.cjs +2 -0
- package/dist/collab/index.cjs.map +1 -1
- package/dist/collab/index.d.ts +1 -1
- package/dist/collab/index.js +3 -1
- package/dist/composer/AttachmentContext.cjs +38 -12
- package/dist/composer/AttachmentContext.cjs.map +1 -1
- package/dist/composer/AttachmentContext.d.ts +22 -1
- package/dist/composer/AttachmentContext.js +40 -14
- package/dist/composer/AttachmentContext.js.map +1 -1
- package/dist/composer/QuoteContext.cjs +80 -28
- package/dist/composer/QuoteContext.cjs.map +1 -1
- package/dist/composer/QuoteContext.d.ts +35 -6
- package/dist/composer/QuoteContext.js +82 -30
- package/dist/composer/QuoteContext.js.map +1 -1
- package/dist/composer/build-composed-message.cjs +27 -0
- package/dist/composer/build-composed-message.cjs.map +1 -1
- package/dist/composer/build-composed-message.d.ts +21 -0
- package/dist/composer/build-composed-message.js +28 -1
- package/dist/composer/build-composed-message.js.map +1 -1
- package/dist/composer/composer-handoff.cjs +13 -1
- package/dist/composer/composer-handoff.cjs.map +1 -1
- package/dist/composer/composer-handoff.d.ts +12 -0
- package/dist/composer/composer-handoff.js +15 -3
- package/dist/composer/composer-handoff.js.map +1 -1
- package/dist/composer/index.d.ts +6 -3
- package/dist/composer/useReadComposerDraft.cjs +16 -0
- package/dist/composer/useReadComposerDraft.cjs.map +1 -0
- package/dist/composer/useReadComposerDraft.d.ts +6 -0
- package/dist/composer/useReadComposerDraft.js +16 -0
- package/dist/composer/useReadComposerDraft.js.map +1 -0
- package/dist/diagnostics/errors.cjs +6 -0
- package/dist/diagnostics/errors.cjs.map +1 -1
- package/dist/diagnostics/errors.d.ts +6 -0
- package/dist/diagnostics/errors.js +6 -0
- package/dist/diagnostics/errors.js.map +1 -1
- package/dist/index.cjs +159 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +53 -12
- package/dist/index.js +166 -14
- package/dist/index.js.map +1 -1
- package/dist/lib/owner-document.cjs +32 -0
- package/dist/lib/owner-document.cjs.map +1 -0
- package/dist/lib/owner-document.d.ts +17 -0
- package/dist/lib/owner-document.js +32 -0
- package/dist/lib/owner-document.js.map +1 -0
- package/dist/lib/portal-surface.cjs +55 -0
- package/dist/lib/portal-surface.cjs.map +1 -0
- package/dist/lib/portal-surface.d.ts +37 -0
- package/dist/lib/portal-surface.js +55 -0
- package/dist/lib/portal-surface.js.map +1 -0
- package/dist/lib/use-athena-rest-query.cjs +34 -0
- package/dist/lib/use-athena-rest-query.cjs.map +1 -0
- package/dist/lib/use-athena-rest-query.d.ts +31 -0
- package/dist/lib/use-athena-rest-query.js +34 -0
- package/dist/lib/use-athena-rest-query.js.map +1 -0
- package/dist/provider/AthenaProvider.cjs +36 -6
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +20 -1
- package/dist/provider/AthenaProvider.js +38 -8
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/provider/citation-links.d.ts +10 -2
- package/dist/{packages/react → react}/package.json.cjs +1 -1
- package/dist/{packages/react → react}/package.json.js +1 -1
- package/dist/runtime/statewire-lifecycle.cjs +15 -3
- package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
- package/dist/runtime/statewire-lifecycle.d.ts +6 -0
- package/dist/runtime/statewire-lifecycle.js +15 -3
- package/dist/runtime/statewire-lifecycle.js.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.cjs +11 -7
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.js +11 -7
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/search/useAthenaRepoSearch.cjs +5 -13
- package/dist/search/useAthenaRepoSearch.cjs.map +1 -1
- package/dist/search/useAthenaRepoSearch.d.ts +3 -3
- package/dist/search/useAthenaRepoSearch.js +6 -14
- package/dist/search/useAthenaRepoSearch.js.map +1 -1
- package/dist/sheet-range/a1.cjs +162 -0
- package/dist/sheet-range/a1.cjs.map +1 -0
- package/dist/sheet-range/a1.d.ts +91 -0
- package/dist/sheet-range/a1.js +162 -0
- package/dist/sheet-range/a1.js.map +1 -0
- package/dist/sheet-range/index.cjs +22 -0
- package/dist/sheet-range/index.cjs.map +1 -0
- package/dist/sheet-range/index.d.ts +12 -0
- package/dist/sheet-range/index.js +22 -0
- package/dist/sheet-range/index.js.map +1 -0
- package/dist/sheet-range/range-preview-table.cjs +75 -0
- package/dist/sheet-range/range-preview-table.cjs.map +1 -0
- package/dist/sheet-range/range-preview-table.d.ts +20 -0
- package/dist/sheet-range/range-preview-table.js +75 -0
- package/dist/sheet-range/range-preview-table.js.map +1 -0
- package/dist/sheet-range/range-preview.cjs +116 -0
- package/dist/sheet-range/range-preview.cjs.map +1 -0
- package/dist/sheet-range/range-preview.d.ts +67 -0
- package/dist/sheet-range/range-preview.js +116 -0
- package/dist/sheet-range/range-preview.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/threads/Inbox.cjs +289 -0
- package/dist/threads/Inbox.cjs.map +1 -0
- package/dist/threads/Inbox.d.ts +46 -0
- package/dist/threads/Inbox.js +289 -0
- package/dist/threads/Inbox.js.map +1 -0
- package/dist/threads/SessionList.cjs +51 -126
- package/dist/threads/SessionList.cjs.map +1 -1
- package/dist/threads/SessionList.d.ts +26 -1
- package/dist/threads/SessionList.js +45 -120
- package/dist/threads/SessionList.js.map +1 -1
- package/dist/threads/SessionsPage.cjs +753 -0
- package/dist/threads/SessionsPage.cjs.map +1 -0
- package/dist/threads/SessionsPage.d.ts +35 -0
- package/dist/threads/SessionsPage.js +753 -0
- package/dist/threads/SessionsPage.js.map +1 -0
- package/dist/threads/api.cjs +21 -1
- package/dist/threads/api.cjs.map +1 -1
- package/dist/threads/api.d.ts +59 -0
- package/dist/threads/api.js +21 -1
- package/dist/threads/api.js.map +1 -1
- package/dist/threads/conversation-list-fetcher.cjs +9 -2
- package/dist/threads/conversation-list-fetcher.cjs.map +1 -1
- package/dist/threads/conversation-list-fetcher.d.ts +14 -1
- package/dist/threads/conversation-list-fetcher.js +9 -2
- package/dist/threads/conversation-list-fetcher.js.map +1 -1
- package/dist/threads/index.d.ts +2 -1
- package/dist/threads/pull-request-display.cjs +25 -0
- package/dist/threads/pull-request-display.cjs.map +1 -0
- package/dist/threads/pull-request-display.d.ts +15 -0
- package/dist/threads/pull-request-display.js +25 -0
- package/dist/threads/pull-request-display.js.map +1 -0
- package/dist/threads/session-list-model.cjs +16 -2
- package/dist/threads/session-list-model.cjs.map +1 -1
- package/dist/threads/session-list-model.d.ts +10 -0
- package/dist/threads/session-list-model.js +16 -2
- package/dist/threads/session-list-model.js.map +1 -1
- package/dist/threads/session-row-parts.cjs +152 -0
- package/dist/threads/session-row-parts.cjs.map +1 -0
- package/dist/threads/session-row-parts.d.ts +50 -0
- package/dist/threads/session-row-parts.js +152 -0
- package/dist/threads/session-row-parts.js.map +1 -0
- package/dist/threads/sessions-page-model.cjs +305 -0
- package/dist/threads/sessions-page-model.cjs.map +1 -0
- package/dist/threads/sessions-page-model.d.ts +86 -0
- package/dist/threads/sessions-page-model.js +305 -0
- package/dist/threads/sessions-page-model.js.map +1 -0
- package/dist/threads/sessions-page-storage.cjs +93 -0
- package/dist/threads/sessions-page-storage.cjs.map +1 -0
- package/dist/threads/sessions-page-storage.d.ts +23 -0
- package/dist/threads/sessions-page-storage.js +93 -0
- package/dist/threads/sessions-page-storage.js.map +1 -0
- package/dist/threads/sessions-query.cjs +235 -0
- package/dist/threads/sessions-query.cjs.map +1 -0
- package/dist/threads/sessions-query.d.ts +119 -0
- package/dist/threads/sessions-query.js +235 -0
- package/dist/threads/sessions-query.js.map +1 -0
- package/dist/threads/statewire-thread-list.cjs +133 -40
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.d.ts +83 -2
- package/dist/threads/statewire-thread-list.js +134 -41
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/threads/use-athena-sessions.cjs +198 -0
- package/dist/threads/use-athena-sessions.cjs.map +1 -0
- package/dist/threads/use-athena-sessions.d.ts +81 -0
- package/dist/threads/use-athena-sessions.js +198 -0
- package/dist/threads/use-athena-sessions.js.map +1 -0
- package/dist/threads/use-rest-conversation-history.cjs +1 -1
- package/dist/threads/use-rest-conversation-history.js +1 -1
- package/dist/threads/use-statewire-conversation-history.cjs +1 -1
- package/dist/threads/use-statewire-conversation-history.d.ts +3 -0
- package/dist/threads/use-statewire-conversation-history.js +1 -1
- package/dist/threads/use-thread-read-state.cjs +73 -0
- package/dist/threads/use-thread-read-state.cjs.map +1 -0
- package/dist/threads/use-thread-read-state.d.ts +51 -0
- package/dist/threads/use-thread-read-state.js +73 -0
- package/dist/threads/use-thread-read-state.js.map +1 -0
- package/dist/tiptap-markdown-table/src/markdown-table-serializer.cjs.map +1 -0
- package/dist/tiptap-markdown-table/src/markdown-table-serializer.js.map +1 -0
- package/dist/tools/auto-open-tools.cjs +2 -0
- package/dist/tools/auto-open-tools.cjs.map +1 -1
- package/dist/tools/auto-open-tools.js +2 -0
- package/dist/tools/auto-open-tools.js.map +1 -1
- package/dist/tools/file-tool-uis.cjs +18 -43
- package/dist/tools/file-tool-uis.cjs.map +1 -1
- package/dist/tools/file-tool-uis.d.ts +1 -2
- package/dist/tools/file-tool-uis.js +18 -42
- package/dist/tools/file-tool-uis.js.map +1 -1
- package/dist/tools/index.cjs +6 -2
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +6 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/misc-tool-uis.cjs +2 -2
- package/dist/tools/misc-tool-uis.js +2 -2
- package/dist/tools/primitives.cjs +1 -1
- package/dist/tools/primitives.js +1 -1
- package/dist/tools/read-asset-tool-ui.cjs +21 -70
- package/dist/tools/read-asset-tool-ui.cjs.map +1 -1
- package/dist/tools/read-asset-tool-ui.js +21 -70
- package/dist/tools/read-asset-tool-ui.js.map +1 -1
- package/dist/tools/step-text.cjs +21 -0
- package/dist/tools/step-text.cjs.map +1 -0
- package/dist/tools/step-text.d.ts +10 -0
- package/dist/tools/step-text.js +21 -0
- package/dist/tools/step-text.js.map +1 -0
- package/dist/tools/tool-fallback.cjs +24 -5
- package/dist/tools/tool-fallback.cjs.map +1 -1
- package/dist/tools/tool-fallback.d.ts +3 -1
- package/dist/tools/tool-fallback.js +24 -5
- package/dist/tools/tool-fallback.js.map +1 -1
- package/dist/tools/tool-summary.cjs +661 -0
- package/dist/tools/tool-summary.cjs.map +1 -0
- package/dist/tools/tool-summary.d.ts +99 -0
- package/dist/tools/tool-summary.js +661 -0
- package/dist/tools/tool-summary.js.map +1 -0
- package/dist/tools/tool-uis.cjs +37 -95
- package/dist/tools/tool-uis.cjs.map +1 -1
- package/dist/tools/tool-uis.js +37 -95
- package/dist/tools/tool-uis.js.map +1 -1
- package/dist/tools/voice-update-tool-ui.cjs +1 -1
- package/dist/tools/voice-update-tool-ui.js +1 -1
- package/dist/tools/write-todos-tool-ui.cjs +3 -2
- package/dist/tools/write-todos-tool-ui.cjs.map +1 -1
- package/dist/tools/write-todos-tool-ui.d.ts +5 -0
- package/dist/tools/write-todos-tool-ui.js +5 -4
- package/dist/tools/write-todos-tool-ui.js.map +1 -1
- package/dist/ui/popover.cjs +6 -6
- package/dist/ui/popover.cjs.map +1 -1
- package/dist/ui/popover.js +6 -6
- package/dist/ui/popover.js.map +1 -1
- package/dist/ui/tooltip.cjs +16 -2
- package/dist/ui/tooltip.cjs.map +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/dist/ui/tooltip.js +16 -2
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/voice/use-athena-voice-session.cjs.map +1 -1
- package/dist/voice/use-athena-voice-session.d.ts +3 -3
- package/dist/voice/use-athena-voice-session.js.map +1 -1
- package/dist/workbench/SessionWorkbench.cjs +378 -0
- package/dist/workbench/SessionWorkbench.cjs.map +1 -0
- package/dist/workbench/SessionWorkbench.d.ts +30 -0
- package/dist/workbench/SessionWorkbench.js +378 -0
- package/dist/workbench/SessionWorkbench.js.map +1 -0
- package/dist/workbench/session-workbench-context.cjs +26 -0
- package/dist/workbench/session-workbench-context.cjs.map +1 -0
- package/dist/workbench/session-workbench-context.d.ts +55 -0
- package/dist/workbench/session-workbench-context.js +26 -0
- package/dist/workbench/session-workbench-context.js.map +1 -0
- package/dist/workbench/session-workbench-model.cjs +288 -0
- package/dist/workbench/session-workbench-model.cjs.map +1 -0
- package/dist/workbench/session-workbench-model.d.ts +168 -0
- package/dist/workbench/session-workbench-model.js +288 -0
- package/dist/workbench/session-workbench-model.js.map +1 -0
- package/dist/workbench/session-workbench-panes.cjs +580 -0
- package/dist/workbench/session-workbench-panes.cjs.map +1 -0
- package/dist/workbench/session-workbench-panes.d.ts +16 -0
- package/dist/workbench/session-workbench-panes.js +580 -0
- package/dist/workbench/session-workbench-panes.js.map +1 -0
- package/dist/workbench/session-workspace-api.cjs +157 -0
- package/dist/workbench/session-workspace-api.cjs.map +1 -0
- package/dist/workbench/session-workspace-api.d.ts +70 -0
- package/dist/workbench/session-workspace-api.js +157 -0
- package/dist/workbench/session-workspace-api.js.map +1 -0
- package/dist/workbench/use-session-workspace.cjs +100 -0
- package/dist/workbench/use-session-workspace.cjs.map +1 -0
- package/dist/workbench/use-session-workspace.d.ts +45 -0
- package/dist/workbench/use-session-workspace.js +100 -0
- package/dist/workbench/use-session-workspace.js.map +1 -0
- package/dist/workbench/workbench-layout-context.cjs +10 -0
- package/dist/workbench/workbench-layout-context.cjs.map +1 -0
- package/dist/workbench/workbench-layout-context.d.ts +17 -0
- package/dist/workbench/workbench-layout-context.js +10 -0
- package/dist/workbench/workbench-layout-context.js.map +1 -0
- package/package.json +20 -9
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.cjs +0 -77
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.cjs.map +0 -1
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.js +0 -77
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.js.map +0 -1
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.cjs +0 -181
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.cjs.map +0 -1
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.js +0 -181
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.js.map +0 -1
- package/dist/packages/agent-runtime/src/asset-attachment.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/asset-attachment.js.map +0 -1
- package/dist/packages/agent-runtime/src/auth-denial.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/auth-denial.js.map +0 -1
- package/dist/packages/agent-runtime/src/client-tool-bridge.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/client-tool-bridge.js.map +0 -1
- package/dist/packages/agent-runtime/src/client-tools.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/client-tools.js.map +0 -1
- package/dist/packages/agent-runtime/src/conversation-index.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/conversation-index.js.map +0 -1
- package/dist/packages/agent-runtime/src/conversation-list.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/conversation-list.js.map +0 -1
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js.map +0 -1
- package/dist/packages/agent-runtime/src/edit-command.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/edit-command.js.map +0 -1
- package/dist/packages/agent-runtime/src/errors.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/errors.js.map +0 -1
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.js.map +0 -1
- package/dist/packages/agent-runtime/src/github-wake-event.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/github-wake-event.js.map +0 -1
- package/dist/packages/agent-runtime/src/interrupts.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/interrupts.js.map +0 -1
- package/dist/packages/agent-runtime/src/message-author.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/message-author.js.map +0 -1
- package/dist/packages/agent-runtime/src/message-window.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/message-window.js.map +0 -1
- package/dist/packages/agent-runtime/src/messages.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/messages.js.map +0 -1
- package/dist/packages/agent-runtime/src/model-context.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/model-context.js.map +0 -1
- package/dist/packages/agent-runtime/src/optimistic-content.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/optimistic-content.js.map +0 -1
- package/dist/packages/agent-runtime/src/protocol.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/protocol.js.map +0 -1
- package/dist/packages/agent-runtime/src/queue.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/queue.js.map +0 -1
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js.map +0 -1
- package/dist/packages/agent-runtime/src/runtime-messages.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/runtime-messages.js.map +0 -1
- package/dist/packages/agent-runtime/src/screen-point.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/screen-point.js.map +0 -1
- package/dist/packages/agent-runtime/src/send-recovery.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/send-recovery.js.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-attach-observer.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-attach-observer.js.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-state.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-state.js.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-suspended.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-suspended.js.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-transport.cjs +0 -11
- package/dist/packages/agent-runtime/src/statewire-transport.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-transport.js +0 -11
- package/dist/packages/agent-runtime/src/statewire-transport.js.map +0 -1
- package/dist/packages/agent-runtime/src/streaming-markdown.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/streaming-markdown.js.map +0 -1
- package/dist/packages/agent-runtime/src/thread-extras.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/thread-extras.js.map +0 -1
- package/dist/packages/agent-runtime/src/thread-snapshot-cache.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/thread-snapshot-cache.js.map +0 -1
- package/dist/packages/agent-runtime/src/thread-status.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/thread-status.js.map +0 -1
- package/dist/packages/agent-runtime/src/tool-metadata.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/tool-metadata.js.map +0 -1
- package/dist/packages/agent-runtime/src/tool-outputs.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/tool-outputs.js.map +0 -1
- package/dist/packages/agent-runtime/src/tool-result.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/tool-result.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-conversation-list.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-conversation-list.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-config.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-runtime.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-runtime.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js.map +0 -1
- package/dist/packages/agent-runtime/src/voice-presentation.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/voice-presentation.js.map +0 -1
- package/dist/packages/agent-runtime/src/voice-turn-grouping.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/voice-turn-grouping.js.map +0 -1
- package/dist/packages/tiptap-markdown-table/src/markdown-table-serializer.cjs.map +0 -1
- package/dist/packages/tiptap-markdown-table/src/markdown-table-serializer.js.map +0 -1
- /package/dist/{packages/agent-runtime → agent-runtime}/src/asset-attachment.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/asset-attachment.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/auth-denial.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/auth-denial.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/client-tool-bridge.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/client-tool-bridge.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/client-tools.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/client-tools.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/conversation-index.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/conversation-index.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/edit-command.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/edit-command.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/github-wake-event.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/github-wake-event.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/message-author.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/message-author.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/message-window.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/message-window.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/model-context.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/model-context.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/optimistic-content.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/optimistic-content.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/protocol.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/protocol.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/runtime-messages.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/runtime-messages.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/screen-point.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/screen-point.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/send-recovery.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/send-recovery.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-attach-observer.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-attach-observer.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/streaming-markdown.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/streaming-markdown.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-extras.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-extras.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-snapshot-cache.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-snapshot-cache.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-status.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-status.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/tool-outputs.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/tool-outputs.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/tool-result.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/tool-result.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-config.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-config.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-runtime.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-runtime.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-window-sync.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-window-sync.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/voice-turn-grouping.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/voice-turn-grouping.js +0 -0
- /package/dist/{packages/react → react}/package.json.cjs.map +0 -0
- /package/dist/{packages/react → react}/package.json.js.map +0 -0
- /package/dist/{packages/tiptap-markdown-table → tiptap-markdown-table}/src/markdown-table-serializer.cjs +0 -0
- /package/dist/{packages/tiptap-markdown-table → tiptap-markdown-table}/src/markdown-table-serializer.js +0 -0
package/README.md
CHANGED
|
@@ -16,6 +16,18 @@ npm install @propelauth/react
|
|
|
16
16
|
|
|
17
17
|
## Upgrading
|
|
18
18
|
|
|
19
|
+
SDK0.29.0 uses native Statewire wire2026-09-30 with Athena application2026-09-13
|
|
20
|
+
when installed with public, unpatched dependencies, over HTTP/SSE: published
|
|
21
|
+
statewire0.20.0 pings a WebSocket with empty frames that Athena's hosts reject,
|
|
22
|
+
so the SDK opens a socket only over the patched client the monorepo's own apps
|
|
23
|
+
install. It requires a compatible backend. Publication is temporarily withheld until production HTTP+WebSocket
|
|
24
|
+
and authorization tests pass and a compatible backend rollback release is
|
|
25
|
+
retained. The publish workflow requires a manual
|
|
26
|
+
`PRODUCTION_NATIVE_CONTEXT_AND_ROLLBACK_QUALIFIED` acknowledgement; dry runs
|
|
27
|
+
remain available. Computer templates keep SDK0.28.0 until the qualified
|
|
28
|
+
release is published. The qualification steps and gate removal condition are
|
|
29
|
+
in the [coordinated release runbook](../../docs/runbooks/coordinated-client-releases.md#public-native-context-publication-gate).
|
|
30
|
+
|
|
19
31
|
The SDK pins its assistant-ui runtime (`@assistant-ui/tap`, `store`, `core`,
|
|
20
32
|
`react`, `react-statewire`, `statewire`) at exact versions, and those packages
|
|
21
33
|
carry React contexts and module singletons: an app must resolve exactly **one**
|
|
@@ -104,6 +116,35 @@ function App() {
|
|
|
104
116
|
|
|
105
117
|
`config` accepts `apiKey`, `token`, `getToken`, `apiUrl`, `backendUrl`, `appUrl`, `statewireSyncUrl`, `trustedParentOrigins`, `environment`, `extraRunConfig`, and `posthog`. Top-level `apiKey`, `token`, `apiUrl`, `backendUrl`, `appUrl`, and `environment` props remain supported as compatibility aliases, but `config` is now the preferred API.
|
|
106
118
|
|
|
119
|
+
### Several chats side by side
|
|
120
|
+
|
|
121
|
+
A host can show several chats at once: one `AthenaProvider` with `enableThreadList` drives the
|
|
122
|
+
session list and its chat, and each further chat is an `AthenaProvider` of its own, bound to one
|
|
123
|
+
thread with `threadId`, mounted anywhere in the tree (under the first one too):
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
const [thread] = useState(() => ({ threadId: mintThreadId(), isNew: true }));
|
|
127
|
+
|
|
128
|
+
<AthenaProvider config={config} threadId={thread.threadId} threadIsNew={thread.isNew}>
|
|
129
|
+
<AttachmentProvider store={attachments}>
|
|
130
|
+
<QuoteProvider store={quote}>
|
|
131
|
+
<AthenaChat />
|
|
132
|
+
</QuoteProvider>
|
|
133
|
+
</AttachmentProvider>
|
|
134
|
+
</AthenaProvider>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- `threadIsNew` says the host minted `threadId` (`mintThreadId`) for a chat that has not started:
|
|
138
|
+
it attaches as new until the host turns it false, once the session list has the thread.
|
|
139
|
+
- Each provider's assistant client is its own root, and one without a thread list hides any list
|
|
140
|
+
above it, so a chat never defines another's tools or follows its thread.
|
|
141
|
+
- `createAttachmentStore()` / `createQuoteStore()` give each chat's composer its own staged
|
|
142
|
+
attachments and quote (`<AttachmentProvider store>`, `<QuoteProvider store>`), kept outside React
|
|
143
|
+
so they survive the chat remounting in another window.
|
|
144
|
+
- ⌘L quotes a selection into the chat it was made in, and one made outside every chat (or an
|
|
145
|
+
embedded frame's text) into the chat the person last focused.
|
|
146
|
+
- `SessionList`'s `onOpenInNewTab` hands the host a session to open in such a chat.
|
|
147
|
+
|
|
107
148
|
If `config.appUrl` is omitted, the provider resolves it from the parent bridge or from the matching Athena environment defaults. Known Athena staging and production `apiUrl` and `backendUrl` values automatically fall back to the corresponding frontend origin.
|
|
108
149
|
|
|
109
150
|
Use `trustedParentOrigins` when the SDK runs inside an iframe on a private-cloud or custom parent domain and you want to explicitly allow postMessage auth/config from that parent. Only the window that frames the app is heard. By default `athenaintel.com` hosts, localhost and your own origin are trusted, except the hosts that serve customer-written code (`*.app.athenaintel.com`, `*.code-sandpack.athenaintel.com` and friends; see "What's new in 0.28.0").
|
|
@@ -174,8 +215,9 @@ What the statewire transport wires up in `AthenaChat`:
|
|
|
174
215
|
`icon`, `extraAction`, `notice`, `renderResult`, `onOpenAsset`,
|
|
175
216
|
`hideInternalIdArgs`) instead of being copied. `@athenaintel/react/super-grouping`
|
|
176
217
|
exports the grouped ("conversational") view of an assistant turn —
|
|
177
|
-
`
|
|
178
|
-
|
|
218
|
+
`SuperGroupingTranscript` (what `AthenaChat` renders), `SuperGroupingCard`,
|
|
219
|
+
`SuperGroupingFinalText`, `CollapsibleGroup`, the activity-timeline
|
|
220
|
+
derivation, and the tool-based grouping function — with
|
|
179
221
|
slots for the host's text/tool renderers and controls (`renderHeaderActions`,
|
|
180
222
|
`renderRunningMeta`, `summaryDetails`, `waitingTools`, `expansionKey`), so
|
|
181
223
|
Olympus and the Chrome extension mount one card instead of copies.
|
|
@@ -196,7 +238,17 @@ What the statewire transport wires up in `AthenaChat`:
|
|
|
196
238
|
paywall refusals) render as a dismissible banner; a degraded connection
|
|
197
239
|
shows a reconnect strip; a send into a thread created by the retired legacy
|
|
198
240
|
runtime is refused with a dismissible read-only notice (start a new chat).
|
|
199
|
-
|
|
241
|
+
A send the server admits but refuses to START — a session keeps the
|
|
242
|
+
collab-agent channel (the app's mode) it began on, so a send in the other
|
|
243
|
+
mode is refused with `collab_agent_channel_session_mismatch` — leaves the
|
|
244
|
+
message queued and the run in `error`; `StatewireRunRefusalNotice` (mounted
|
|
245
|
+
by `AthenaChat` above the queue) shows the server's `detail.message` and, for
|
|
246
|
+
that code, a "Start a new session" action (the thread list's `newThread`).
|
|
247
|
+
The same code on a rejected command reaches `StatewireErrorBanner` with the
|
|
248
|
+
same action (`AthenaStatewireErrorNotice.code`). `readRunStartRefusal` and
|
|
249
|
+
`COLLAB_AGENT_CHANNEL_SESSION_MISMATCH` are exported for hosts with their
|
|
250
|
+
own thread UI. Custom hosts can read all of it via
|
|
251
|
+
`useAthenaStatewireLifecycle`.
|
|
200
252
|
- **Thread list:** `enableThreadList` provides the persisted Agora session
|
|
201
253
|
list; switching threads (or starting a new chat) re-attaches the statewire
|
|
202
254
|
session to the selected thread while the host's own `children` stay
|
|
@@ -248,6 +300,7 @@ server omits them and the SDK reads `undefined`):
|
|
|
248
300
|
| `attention_source` | `attentionSource` | `interrupt` · `run` · `pull_request` · `termination` · `wake` · `handoff` |
|
|
249
301
|
| `is_favorited` | `isFavorited` | boolean — toggled through `setFavorited` / `POST /api/conversations/threads/favorite` |
|
|
250
302
|
| `last_wake` | `lastWake` | `{ source, reason, at }` |
|
|
303
|
+
| `created_by_me` | `createdByMe` | boolean — the viewer started the session (`false`: shared with them) |
|
|
251
304
|
| `pull_requests` (opt-in: `include_pull_requests`) | `pullRequests` | `[{ repoFullName, number, url, title, state OPEN/CLOSED/MERGED, isDraft, reviewDecision, checksState SUCCESS/FAILURE/PENDING/NONE, updatedAt }]` — `[]` none, `null` unreadable right now |
|
|
252
305
|
|
|
253
306
|
The per-user conversation index pushes `attention`, `next_action`,
|
|
@@ -277,6 +330,10 @@ Same visual language as `ThreadList` (Tailwind via `cn`, lucide icons), plus:
|
|
|
277
330
|
- a trailing action cluster per row, revealed on hover / focus (a pinned pin
|
|
278
331
|
and any action whose write is in flight stay visible) — every action a
|
|
279
332
|
labelled `<button>` that is a sibling of the row control, never nested:
|
|
333
|
+
- **Open in new tab** (prop `onOpenInNewTab`, absent by default): hands the
|
|
334
|
+
host `{ threadId, title }` instead of selecting the row, as does a
|
|
335
|
+
⌘-click (Ctrl-click) or middle-click on the row (see "Several chats side
|
|
336
|
+
by side");
|
|
280
337
|
- **Rename** (prop `showRename`, default `true`): the title becomes an
|
|
281
338
|
input in place; Enter commits, Escape cancels, blur commits; an unchanged
|
|
282
339
|
or empty title is never sent; the row shows the new title at once and
|
|
@@ -315,7 +372,10 @@ Same visual language as `ThreadList` (Tailwind via `cn`, lucide icons), plus:
|
|
|
315
372
|
answer (`hasResolvedFirstPage`); a background refresh keeps the rows it has;
|
|
316
373
|
- a search box wired to the server-side `search` (prop `showSearch`, default
|
|
317
374
|
`true`), `Load more` over the shared pager, and `New Chat` / refresh as in
|
|
318
|
-
`ThreadList
|
|
375
|
+
`ThreadList` (prop `showNewChat`, default `true`; `false` for a host with
|
|
376
|
+
its own new-session control);
|
|
377
|
+
- an origin badge per row (prop `originBadges`: `'all'` by default,
|
|
378
|
+
`'external'` to leave sessions started in the web app unbadged, `'none'`).
|
|
319
379
|
|
|
320
380
|
The pin writes `POST /api/conversations/threads/favorite`
|
|
321
381
|
(`{ thread_id, is_favorited }` → the server's state after the write) with the
|
|
@@ -385,6 +445,193 @@ only when it is an `https://github.com/<repo>/…` URL for that repository
|
|
|
385
445
|
The full message text always reaches the model; the marker is provenance for
|
|
386
446
|
rendering only.
|
|
387
447
|
|
|
448
|
+
## Sessions page and inbox
|
|
449
|
+
|
|
450
|
+
A full-page, Devin-style session list and a notifications inbox, both on top
|
|
451
|
+
of `enableThreadList` and live through the same conversation index as
|
|
452
|
+
`SessionList`:
|
|
453
|
+
|
|
454
|
+
```tsx
|
|
455
|
+
import { AthenaProvider, InboxButton, SessionsPage } from '@athenaintel/react';
|
|
456
|
+
|
|
457
|
+
<AthenaProvider enableThreadList config={{ token }}>
|
|
458
|
+
<header><InboxButton onOpenSession={() => showChat()} /></header>
|
|
459
|
+
<SessionsPage
|
|
460
|
+
onOpenSession={() => showChat()}
|
|
461
|
+
labels={{ agents: { asset_123: 'Athena Engineer' }, channels: { ask: 'Ask' } }}
|
|
462
|
+
/>
|
|
463
|
+
</AthenaProvider>
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### `SessionsPage`
|
|
467
|
+
|
|
468
|
+
- **Filters the server applies.** A Filter menu (status, pull requests,
|
|
469
|
+
unread, pinned, creator, who started it, agent, mode, origin, created /
|
|
470
|
+
updated date) and a title search. Each filter travels to
|
|
471
|
+
`POST /api/conversations/threads/list` as a predicate of the server's one
|
|
472
|
+
page statement, ANDed onto the list's unchanged permission gate — a filter
|
|
473
|
+
only narrows what the viewer already sees, and `Load more` continues the
|
|
474
|
+
filtered set. Active filters show as removable chips; **Save as default**
|
|
475
|
+
remembers them in this browser (`storageKey` namespaces it), **Reset to
|
|
476
|
+
default** goes back.
|
|
477
|
+
- **Display options.** Sort by last update or creation, newest or oldest
|
|
478
|
+
first; group by what each session needs (Needs you, Working, Ready,
|
|
479
|
+
Waiting, Error, Done), by run status, or not at all; show or hide the
|
|
480
|
+
Status, Origin, Mode, Pull requests, Creator, Created and Updated columns
|
|
481
|
+
(remembered per browser).
|
|
482
|
+
- **A status column that says what to do.** `sessionStatusChip`: the server's
|
|
483
|
+
next action where the person must act ("Approve send email", "Merge #12"),
|
|
484
|
+
else Working / Sleeping (a follow-up is pending) / Waiting / Error /
|
|
485
|
+
PR merged / Done — an orange, blue, green, violet, red or grey dot by
|
|
486
|
+
attention.
|
|
487
|
+
- **Row actions** (revealed on hover / focus): mark read / unread
|
|
488
|
+
(`setReadState` → `POST /api/conversations/threads/read-state`), pin,
|
|
489
|
+
archive — the provider's writes, so the row flips in every list at once.
|
|
490
|
+
- **Export CSV** of the loaded rows (`sessionsCsv`; cells a spreadsheet would
|
|
491
|
+
run as a formula are prefixed with `'`).
|
|
492
|
+
|
|
493
|
+
### `Inbox` / `InboxButton`
|
|
494
|
+
|
|
495
|
+
The inbox is the viewer's own sessions, newest activity first, minus the ones
|
|
496
|
+
dismissed from it — read through the same route with `created_by_me` +
|
|
497
|
+
`exclude_dismissed` (`INBOX_QUERY`; the Unread tab adds `unread_only`). No
|
|
498
|
+
endpoint of its own. Each row: an unread dot, the title, the latest message
|
|
499
|
+
(two lines), a state chip (`inboxStateChip`: Needs you, Working, PR ready,
|
|
500
|
+
Sleeping, Waiting, Error, PR merged, PR closed, Answered) and the time.
|
|
501
|
+
Opening a row selects the session and marks it read; **Mark all read** marks
|
|
502
|
+
the loaded unread rows; **Dismiss** uses
|
|
503
|
+
`POST /api/conversations/threads/notifications/dismiss` (EDIT on the
|
|
504
|
+
session — a dismissed session comes back with its next message).
|
|
505
|
+
`InboxButton` is a bell with the unread count (`useAthenaInboxUnreadCount`,
|
|
506
|
+
the Unread tab's first page: `50+` past one page) that opens the inbox in a
|
|
507
|
+
popover.
|
|
508
|
+
|
|
509
|
+
### Server filters and older servers
|
|
510
|
+
|
|
511
|
+
`useAthenaSessions({ query })` is the data layer both components use, for
|
|
512
|
+
hosts drawing their own rows. `query` is an `AthenaSessionsQuery`:
|
|
513
|
+
|
|
514
|
+
| Field | Server field | Meaning |
|
|
515
|
+
|---|---|---|
|
|
516
|
+
| `search` | `search` | case-insensitive title match |
|
|
517
|
+
| `runStatuses` / `sessionStatuses` | `run_statuses` / `session_statuses` | status_v2 planes (`running` leaves out runs silent for 12 hours, as every list does) |
|
|
518
|
+
| `unreadOnly` | `unread_only` | not read since it last changed (the read receipt) |
|
|
519
|
+
| `favoritesOnly` | `favorites_only` | pinned by the viewer |
|
|
520
|
+
| `hasPullRequests` | `has_pull_requests` | opened a pull request (`true`) or none (`false`) |
|
|
521
|
+
| `createdByMe` | `created_by_me` | the viewer's own (`true`) or shared with them (`false`) |
|
|
522
|
+
| `collabAgentIds` / `collabChannelIds` | `collab_agent_ids` / `collab_channel_ids` | the collab agent and its channel (mode); `'default'` (`DEFAULT_COLLAB_CHANNEL`) is the agent's default channel; channels need an agent |
|
|
523
|
+
| `startChannels` | `start_channels` | where it started (`web`, `github`, `email`, …) |
|
|
524
|
+
| `createdAfter` / `createdBefore` / `updatedAfter` / `updatedBefore` | same, snake_case | ISO bounds, after inclusive, before exclusive |
|
|
525
|
+
| `excludeDismissed` / `excludeTriggered` | `exclude_dismissed` / `exclude_triggered` | not dismissed from the inbox / started by a person |
|
|
526
|
+
| `sort` / `direction` | `sort` / `direction` | `updated` or `created`, `desc` or `asc` |
|
|
527
|
+
|
|
528
|
+
An agora ignores request fields it does not know, so every list response now
|
|
529
|
+
names the filters it applies (`supported_filters`). The hook reads that once
|
|
530
|
+
per identity (a one-row probe) and splits the query (`planSessionsQuery`):
|
|
531
|
+
fields the server applies are sent; fields it cannot are applied to the
|
|
532
|
+
loaded rows instead (`degradedFields` — exact per page, but a page can come
|
|
533
|
+
back short, and `SessionsPage` says so); fields the rows carry nothing to
|
|
534
|
+
test on (creator, dismissed; pull requests when the list does not fetch
|
|
535
|
+
them) are reported in `unsupportedFields` / `unavailableFields` and not
|
|
536
|
+
applied, so `SessionsPage` disables them rather than show wrong rows.
|
|
537
|
+
Server-applied filters are still checked on rows a live push changed, so a
|
|
538
|
+
session you just read leaves "Unread" and a finished one leaves "Running".
|
|
539
|
+
`listThreads` takes the server filters as `filters` (`ThreadListFilterBody`),
|
|
540
|
+
and `app_ids` (`additionalListAppIds`) now reaches the server: the request
|
|
541
|
+
body used to drop it.
|
|
542
|
+
|
|
543
|
+
## Session workbench
|
|
544
|
+
|
|
545
|
+
A Devin-style workspace pane beside the chat for the active session: a tab
|
|
546
|
+
strip of panes, a "+" menu right after the tabs to open more (with a search
|
|
547
|
+
box; Enter opens the first match), closable tabs, a collapse to a rail, a
|
|
548
|
+
maximize that gives the workspace the chat's width (the chat stays mounted,
|
|
549
|
+
hidden), and a resizable edge. With every tab closed, the column lists each
|
|
550
|
+
pane with its `description`, centred, to open one.
|
|
551
|
+
|
|
552
|
+
```tsx
|
|
553
|
+
import { AthenaChat, AthenaLayout, AthenaProvider, SessionList, SessionWorkbench } from '@athenaintel/react';
|
|
554
|
+
|
|
555
|
+
<AthenaProvider enableThreadList config={{ token }}>
|
|
556
|
+
<aside><SessionList /></aside>
|
|
557
|
+
<AthenaLayout workbench={<SessionWorkbench />}>
|
|
558
|
+
<AthenaChat />
|
|
559
|
+
</AthenaLayout>
|
|
560
|
+
</AthenaProvider>
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
`AthenaLayout`'s `workbench` prop puts it in a right-hand column
|
|
564
|
+
(`defaultWorkbenchPercent`, default 40; `defaultWorkbenchCollapsed`). With a
|
|
565
|
+
workbench the layout opens no asset column of its own: assets the agent or the
|
|
566
|
+
person opens show as the workbench's **Open assets** tab (closing the tab
|
|
567
|
+
closes the asset panel). Maximize is offered only inside `AthenaLayout`, which
|
|
568
|
+
owns the column's width; collapsing a maximized workspace brings the chat back
|
|
569
|
+
beside the rail. `SessionWorkbench` also works on its own anywhere under
|
|
570
|
+
`<AthenaProvider>`; it then keeps its collapsed state itself.
|
|
571
|
+
|
|
572
|
+
Built-in panes and what each reads:
|
|
573
|
+
|
|
574
|
+
| Pane | id | Source |
|
|
575
|
+
|---|---|---|
|
|
576
|
+
| Tasks | `tasks` | The thread state's `todos` channel (the deepagents plan), else the newest `write_todos` call in the loaded transcript — "N/M done" and numbered steps with their status |
|
|
577
|
+
| Shell | `shell` | Every `execute` call in the loaded transcript, newest first: first line of the command, the machine it ran on (`sandbox_asset_id` named through the workspace's computers, else "Session sandbox"), the exit status parsed from `[Command succeeded/failed with exit code N]`, the time; searchable; a row expands to its output (first 4,000 characters) |
|
|
578
|
+
| Computer | `computer` | `GET /api/conversations/threads/{id}/workspace`: the session computer, else the most recent computer — its state (`GET /api/sandbox/computer/{id}/status`, a read that never wakes it, re-read every 30 s while shown), "Open in Athena", and "Copy SSH command" (`GET /api/v0/computer/{id}/ssh-access`, offered only when the viewer may edit the computer); the other computers it used below |
|
|
579
|
+
| Pull requests | `pull-requests` | The thread list's live pull-request state for the session (`enableThreadList`): number, title, state, checks and review decision, each a link to GitHub |
|
|
580
|
+
| Attachments | `attachments` | The workspace's assets — what the session created or edited — with type, last update, "Open in Athena", and a click that opens it in the asset panel when an `AthenaLayout` hosts one |
|
|
581
|
+
|
|
582
|
+
"Open in Athena" links go to the deployment's Athena frontend
|
|
583
|
+
(`athenaLinkAppUrl`): in an app a computer serves, Marathon's `/_athena/auth`
|
|
584
|
+
mints the app's own origin as `appUrl`, so a known Athena backend's frontend is
|
|
585
|
+
used instead. Every workspace read is gated server-side (thread access, then
|
|
586
|
+
each asset's own permission), so a pane lists only what the viewer may open. One query
|
|
587
|
+
serves every pane; it is idle for a never-started chat, re-reads every 15 s
|
|
588
|
+
while the run is live and once more as it settles, and is keyed by the
|
|
589
|
+
signed-in principal and a one-way credential fingerprint, so one account's
|
|
590
|
+
cached workspace is never shown to another. Open assets stay mounted (hidden)
|
|
591
|
+
while another pane shows or the workbench is a rail, so their viewers keep
|
|
592
|
+
their state.
|
|
593
|
+
|
|
594
|
+
**Tabs per thread.** Each thread keeps its open tabs and its active tab for as
|
|
595
|
+
long as the workbench stays mounted (in memory only — nothing is written to
|
|
596
|
+
storage); a thread it has not seen opens `defaultOpenPaneIds` (Tasks, Shell,
|
|
597
|
+
Computer).
|
|
598
|
+
|
|
599
|
+
**Custom panes.** `panes` is a registry: spread the built-ins and add your own.
|
|
600
|
+
A pane is `{ id, title, description?, icon?, render(context) }` (`description`
|
|
601
|
+
is the one line the empty column shows under the title), where `context` is
|
|
602
|
+
`{ threadId, isPersisted, isRunning }`; inside a pane,
|
|
603
|
+
`useSessionWorkbench()` reads the same context and
|
|
604
|
+
`useSessionWorkbenchWorkspace()` the shared workspace query.
|
|
605
|
+
|
|
606
|
+
```tsx
|
|
607
|
+
import {
|
|
608
|
+
DEFAULT_SESSION_WORKBENCH_PANES,
|
|
609
|
+
SessionWorkbench,
|
|
610
|
+
type SessionWorkbenchPane,
|
|
611
|
+
} from '@athenaintel/react';
|
|
612
|
+
import { ScaleIcon } from 'lucide-react';
|
|
613
|
+
|
|
614
|
+
const MATTER_PANE: SessionWorkbenchPane = {
|
|
615
|
+
id: 'matter',
|
|
616
|
+
title: 'Matter',
|
|
617
|
+
icon: ScaleIcon,
|
|
618
|
+
render: ({ threadId, isPersisted }) =>
|
|
619
|
+
isPersisted && threadId ? <MatterSummary threadId={threadId} /> : <p>No matter yet.</p>,
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
<SessionWorkbench
|
|
623
|
+
panes={[...DEFAULT_SESSION_WORKBENCH_PANES, MATTER_PANE]}
|
|
624
|
+
defaultOpenPaneIds={['matter', 'tasks']}
|
|
625
|
+
/>
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
The built-in pane bodies (`SessionTasksPane`, `SessionShellPane`, …), their
|
|
629
|
+
registry entries (`SESSION_WORKBENCH_TASKS_PANE`, …), the data hooks
|
|
630
|
+
(`useAthenaSessionWorkspace`, `useAthenaComputerStatus`,
|
|
631
|
+
`useAthenaComputerSshAccess`) and the pure derivations behind them
|
|
632
|
+
(`deriveShellRows`, `filterShellRows`, `deriveTaskSteps`, `taskProgress`,
|
|
633
|
+
`workspaceComputers`) are exported for hosts composing their own.
|
|
634
|
+
|
|
388
635
|
## Voice Sessions (`@athenaintel/react/voice`)
|
|
389
636
|
|
|
390
637
|
`useAthenaVoiceSession` runs a real-time voice conversation with an Athena
|
|
@@ -420,10 +667,10 @@ const voice = useAthenaVoiceSession({
|
|
|
420
667
|
**Voice tools.** `enabled_tools` takes voice tool names (`AthenaVoiceToolId`),
|
|
421
668
|
not the chat `Toolkits` ids — `'web_search_browse_toolkit'` is not a voice tool,
|
|
422
669
|
`'web_search'` is. Available: `web_search` (`search_web` is a legacy alias),
|
|
423
|
-
`browse` (read a URL), `
|
|
424
|
-
(
|
|
425
|
-
`
|
|
426
|
-
|
|
670
|
+
`browse` (read a URL), `read_full_asset` and `search_assets` (as the viewer),
|
|
671
|
+
`ask_agent` (hand a question to the general agent), `save_note`,
|
|
672
|
+
`get_current_time_est`. `search_knowledge_base` and `search_knowledge_base_lr`
|
|
673
|
+
are retired: still accepted, and ignored. Tools that
|
|
427
674
|
call back into the client over room RPC (`write_to_clipboard`, the desktop and
|
|
428
675
|
mobile tools) are not part of the hook's contract. Omit the field for the
|
|
429
676
|
server's default set; pass `[]` for pure conversation. The server refuses
|
|
@@ -470,6 +717,38 @@ Both use the same bearer / API key as session creation. The full recipe
|
|
|
470
717
|
template skill `voice-session-guide.md`. `createAthenaVoiceSession` is also
|
|
471
718
|
exported if you hold the bridge state yourself.
|
|
472
719
|
|
|
720
|
+
## What's new in 0.30.0
|
|
721
|
+
|
|
722
|
+
**Session workbench, closer to Devin's.** The "+" menu now sits right after the tabs and has a search box (Enter opens the first match). Inside `AthenaLayout`, a maximize button gives the workspace the chat's width; the chat stays mounted, hidden, and collapsing a maximized workspace brings it back. With every tab closed, the column lists each pane centred with a one-line `description`, which is a new optional field on `SessionWorkbenchPane` that the built-in panes now carry. Tabs use 13px labels, and the close control stays quiet until the tab is hovered, focused or selected. Pure helper: `filterWorkbenchPanes`.
|
|
723
|
+
|
|
724
|
+
**`SessionList` options for hosts with their own chrome.** Set `showNewChat={false}` to drop the New Chat and refresh buttons when your sidebar has its own new-session control. `originBadges` picks which rows carry an origin badge: `'all'` (the default, as before), `'external'` (every origin except the web app, so sessions started in a browser tab of the app carry none, while Slack, GitHub, Chrome and the rest still do), or `'none'`. `sessionOriginBadge` and `WEB_APP_ORIGIN_LABEL` are exported.
|
|
725
|
+
|
|
726
|
+
**Composer hints.** `<AthenaChat composer={{ placeholder, runningPlaceholder }}>` sets the empty composer's hint. `runningPlaceholder` shows while a run is live, when a message steers or queues instead of starting a turn. The editor repaints a changed hint in place without being rebuilt.
|
|
727
|
+
|
|
728
|
+
**`@assistant-ui/store` 0.3.21.** Its client accessors answer `call`, `apply` and `bind` themselves, so apps whose bundler lowers optional chaining (Vite's default target) no longer crash on mount (#44102). No `build.target` workaround is needed.
|
|
729
|
+
|
|
730
|
+
## What's new in 0.29.5
|
|
731
|
+
|
|
732
|
+
**No more "linkifyjs: already initialized" warning.** The chat text schema no longer passes `protocols: ["athena-point"]` to Tiptap's Link extension. Link registers those schemes with linkifyjs in every editor's `onCreate`, and linkifyjs accepts a new scheme only before its first scan, so every composer or message body created after the first one logged `linkifyjs: already initialized - will not register custom scheme "athena-point"`. Chrome shows it on an extension's Errors page. Screen-point chips are unchanged: they arrive as markdown links (`[label](athena-point://…)`), which parse without linkify, and the chat link allow-list still accepts the scheme. Only a bare `athena-point://…` string typed into the composer is no longer turned into a link by itself. Nothing to change in your app.
|
|
733
|
+
|
|
734
|
+
## What's new in 0.29.4
|
|
735
|
+
|
|
736
|
+
**A streaming reply no longer jumps a line up and down in narrow panels.** The chat-ui message components no longer load `@assistant-ui/react-markdown/styles/dot.css`. That stylesheet put a pulsing "●" after the last block of every running message body, next to the body's own caret. The dot and its margins need about 17px at the end of the line, so in a narrow panel it wrapped onto its own line before the text did: the thread scrolled up one line, then the next word dropped down to join the dot. The caret is now the only streaming indicator. A message that has no text yet still shows the "Thinking..." indicator.
|
|
737
|
+
|
|
738
|
+
## What's new in 0.29.3
|
|
739
|
+
|
|
740
|
+
**Tooltips, popovers and the composer's agent and model menus draw their own background again, in any host.** They render outside the provider wrapper, under `document.body`, carrying the `.athena-sdk` scope class for their tokens. That class is `display: contents` for the wrapper's sake, and nothing on a tooltip undid it, so every SDK tooltip lost its box: no background, padding or radius, just the text and the arrow. Themed popovers and pickers also carried `.athena-themed`, whose unlayered `display: contents` beat their `block`. A host whose own Tailwind compiles the same utility names against tokens in another format also broke them: shadcn's HSL channels, for example, make `bg-popover` `hsl(var(--popover))`, and that is invalid for the SDK's full colours, so the menu was transparent over the page. The portaled roots now set their box (`display: block`) and colours (`var(--popover)` / `var(--popover-foreground)` / `var(--border)` for panels, `var(--foreground)` on `var(--background)` for tooltips) inline, which no stylesheet rule beats; the theme's variables still apply through the same inline style. What your own `className` on `TooltipContent` sets stays yours: a colour or display class (`bg-red-600`, `hover:text-white`, `flex`) keeps that property out of the inline defaults, as before, and `style` overrides any of them. A tooltip's arrow follows the tooltip's background when that background is inline, whether it is the default or your `style`. Nothing to change in your app.
|
|
741
|
+
|
|
742
|
+
## What's new in 0.29.2
|
|
743
|
+
|
|
744
|
+
Tool cards inside an expanded collapsible tool group and the super-grouping "Run details" panel are now spaced with flex `gap-2` instead of `space-y-2`, so cards wrapped in a `display: contents` element (e.g. a host's deep-link anchor) keep the 0.5rem gap between them; boxed children look the same as before. `SuperGroupingCard` also accepts `classNames.detailsParts` to tune the gap (or other classes) on the flex column the run's parts render in.
|
|
745
|
+
|
|
746
|
+
## What's new in 0.29.1
|
|
747
|
+
|
|
748
|
+
**A running grouped turn shows one status line.** The activity card's header already says what the run is doing ("Thinking", "Preparing response", "Searching the web"); the elapsed counter that used to sit beneath it as a second row ("Working… · 11s", with its own pulsing dot) is now just the counter ("11s", "1m 05s"), inline on the header row to the right of the status and before the Stop control. It still appears after three seconds, turns amber once nothing has streamed for thirty, and is not shown while the card reads "Waiting for you". `SuperGroupingCard`'s `renderRunningMeta` slot keeps its signature; whatever a host returns is now placed on the header row (small, right-aligned) rather than on a line of its own, and only while the phase is `running`. Ungrouped threads (`groupToolCalls={false}`) and the per-tool-row counters are unchanged.
|
|
749
|
+
|
|
750
|
+
Two related fixes in the grouped card: a tool whose only result so far is the backend's streaming placeholder (`artifact._tool_message_metadata.streaming === true` — task subagents, studio and Python execution, deep research) now stays a running step, so the header keeps naming the tool instead of flipping to "Preparing response" while it still runs (`isStreamingToolPlaceholder` is exported from `super-grouping`); and the thirty-second stall is announced to screen readers through a polite live region, while the ticking counter itself stays out of it.
|
|
751
|
+
|
|
473
752
|
## What's new in 0.28.0
|
|
474
753
|
|
|
475
754
|
**The iframe auth bridge only listens to the page that frames your app, and that page can no longer point the SDK's token at another server.** When the SDK runs inside an iframe, `useParentBridge` takes `athena-auth` (a token) and `athena-config` (URLs) from the parent window. Before this release it took them from any window on any `*.athenaintel.com` origin, including the hosts that serve customer computer and application apps, and an `athena-config` could replace `backendBaseUrl` / `statewireSyncUrl` at any time. A page on one of those hosts could frame or open another app and make its SDK send its token to a server of its choosing. Now:
|
|
@@ -1047,6 +1326,40 @@ function App() {
|
|
|
1047
1326
|
|
|
1048
1327
|
Set `linkClicks={{ interceptAthenaCitations: false }}` to keep Athena citation links opening in the browser while still letting your app observe all link clicks.
|
|
1049
1328
|
|
|
1329
|
+
### Opening assets the host's own way (`onOpenAsset`)
|
|
1330
|
+
|
|
1331
|
+
A host with its own place for assets (a desktop app's tabs, a route of its own) passes `onOpenAsset`
|
|
1332
|
+
to `<AthenaProvider>`. While it is set, every request to open an asset goes to it before the SDK's
|
|
1333
|
+
asset panel:
|
|
1334
|
+
|
|
1335
|
+
- a tool card's Open (and the open-asset link on a tool's card);
|
|
1336
|
+
- an Athena citation or asset link in a message, which the SDK then intercepts as it does with an
|
|
1337
|
+
asset panel mounted (`isAssetPanelAvailable` is true); a modified click (⌘, Ctrl, Shift, Alt)
|
|
1338
|
+
stays the browser's;
|
|
1339
|
+
- the auto-open after a tool created or touched an asset, marked `origin: 'auto'` (a person's open
|
|
1340
|
+
is `origin: 'user'`).
|
|
1341
|
+
|
|
1342
|
+
```tsx
|
|
1343
|
+
<AthenaProvider
|
|
1344
|
+
config={config}
|
|
1345
|
+
onOpenAsset={({ assetId, origin, reference, href }) => {
|
|
1346
|
+
if (origin === 'auto') return; // handled: open nothing the person did not ask for
|
|
1347
|
+
if (!canShowHere(assetId)) return false; // the asset panel (or the link's own navigation) takes it
|
|
1348
|
+
openTab({ assetId, reference }); // `reference`: the citation's anchor and excerpt
|
|
1349
|
+
}}
|
|
1350
|
+
>
|
|
1351
|
+
```
|
|
1352
|
+
|
|
1353
|
+
The request carries the asset id, the name and coarse type the card or link knew, the citation
|
|
1354
|
+
target (`reference`, for `AthenaAssetEmbed`), and for a link its own address (`href`), so a host that
|
|
1355
|
+
opens it on the web keeps every parameter it carried. Return `false` to leave the request to the
|
|
1356
|
+
asset panel, or, with no panel mounted, to the link's own navigation; anything else (returning
|
|
1357
|
+
nothing included) means the host opened it. Hosts that do not pass `onOpenAsset` behave as before.
|
|
1358
|
+
|
|
1359
|
+
`appendCitationReferenceParams({ params, reference })` writes a reference's place (its anchor and
|
|
1360
|
+
excerpt) into any URL's search params, the way `AthenaAssetEmbed` writes it into the embed URL; a
|
|
1361
|
+
host that opens a cited place in Athena on the web writes it into the Spaces link the same way.
|
|
1362
|
+
|
|
1050
1363
|
## Standalone Asset Embeds
|
|
1051
1364
|
|
|
1052
1365
|
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.
|
|
@@ -1093,6 +1406,22 @@ function AssetView() {
|
|
|
1093
1406
|
}
|
|
1094
1407
|
```
|
|
1095
1408
|
|
|
1409
|
+
A host that mints its own embed links (`POST /api/embed/generate-token` from its own backend, so
|
|
1410
|
+
its credentials never reach the page) passes the link as `embedUrl`: the component frames that page
|
|
1411
|
+
and mints none itself. `onReady` says when the framed page has answered (its bridge's first
|
|
1412
|
+
message), which tells a page that is still loading from one that never arrived (a frame its
|
|
1413
|
+
`frame-ancestors` refused, a network failure). Other iframe attributes (`sandbox`,
|
|
1414
|
+
`referrerPolicy`, `allow`) pass through to the frame.
|
|
1415
|
+
|
|
1416
|
+
```tsx
|
|
1417
|
+
<AthenaAssetEmbed
|
|
1418
|
+
assetId={assetId}
|
|
1419
|
+
embedUrl={embed.embedUrl}
|
|
1420
|
+
sandbox="allow-scripts allow-same-origin allow-forms allow-popups"
|
|
1421
|
+
onReady={() => setReady(true)}
|
|
1422
|
+
/>
|
|
1423
|
+
```
|
|
1424
|
+
|
|
1096
1425
|
When `onCitationClick` is provided, citation navigation is delegated to the host by default. Set `citationBehavior="browser"` to observe the event while preserving Athena's default new-tab navigation. Host mode requires `onCitationClick`; without a handler, the SDK safely falls back to browser navigation.
|
|
1097
1426
|
|
|
1098
1427
|
`onCitationAction` handles actions initiated from a citation popover. It currently receives `action: 'open-in-spaces'` when the user clicks the (+) button. Providing the handler delegates that action to the host by default. Set `citationActionBehavior="browser"` to observe the event while preserving Athena's default navigation; requesting host mode without a handler safely falls back to browser behavior.
|
|
@@ -1102,6 +1431,13 @@ Pass the callback's complete `reference` to the linked `AthenaAssetEmbed`, rathe
|
|
|
1102
1431
|
the cited excerpt or rectangular region. Updating the reference also navigates when the host opens
|
|
1103
1432
|
another citation in the same asset.
|
|
1104
1433
|
|
|
1434
|
+
`reference.anchor` may also be the anchor's raw query string, the form Athena links, citations and
|
|
1435
|
+
search results carry (`anchor=slide&slide_index=3&slide_id=…`, `anchor=time&time=0:42`,
|
|
1436
|
+
`anchor=pm_node&node_id=…`, or an asset ref such as `asset_x?anchor=cell&cell_id=…`). The embed
|
|
1437
|
+
receives its parameters as written, so it lands on any kind of place: a slide, a moment of a
|
|
1438
|
+
recording, an image region. A `meta.excerpt` with no anchor is forwarded too; the embed finds the
|
|
1439
|
+
passage by its words.
|
|
1440
|
+
|
|
1105
1441
|
If the host starts with an Athena citation URL/string instead of an
|
|
1106
1442
|
`onCitationAction` event, parse it and pass the returned `reference` directly to the embed:
|
|
1107
1443
|
|
|
@@ -1201,6 +1537,26 @@ The `collab` entry hosts the Keryx-backed live surfaces: `useGenericDoc` /
|
|
|
1201
1537
|
workspace presence feed below. Both mint short-lived room-bound tokens with the
|
|
1202
1538
|
provider's credentials and re-mint before expiry on their own.
|
|
1203
1539
|
|
|
1540
|
+
`connectGenericDoc` also serves hosts that keep a **local copy** of the document
|
|
1541
|
+
(Midas, through `@athenaintel/local-copy`):
|
|
1542
|
+
|
|
1543
|
+
- `localCopy.prepare({ doc, transport })` runs once, before the first mint: it
|
|
1544
|
+
applies the stored copy to the document and returns the local edits an earlier
|
|
1545
|
+
session never had acknowledged, which the handle sends and waits on like its
|
|
1546
|
+
own. `handle.prepared` flips once it has run; mount readers after it.
|
|
1547
|
+
- `localCopy.transportChanged()` is called whenever the handle's unconfirmed
|
|
1548
|
+
edits (`handle.unconfirmedEdits()`) or its sync state change.
|
|
1549
|
+
- `localCopy.beforeConnect({ grant, firstConnection, offlineForMs,
|
|
1550
|
+
hasUnsyncedEdits })` is asked after each mint and before the connection it
|
|
1551
|
+
would open: the first connection, a reconnect after an outage longer than
|
|
1552
|
+
`offlineGateAfterMs` (default 15 s, past which the handle reconnects itself,
|
|
1553
|
+
re-minting each time), and a re-mint after a revocation. `'hold'` keeps the
|
|
1554
|
+
handle disconnected (`handle.held`) until `handle.resume()`.
|
|
1555
|
+
- A mint that fails for want of the network (`retryMintError`, default
|
|
1556
|
+
`isRetryableMintError`: network errors, timeouts, 408, 429, 5xx) leaves the
|
|
1557
|
+
handle `disconnected` and is retried, immediately when the browser comes back
|
|
1558
|
+
online; a refusal (401/403/404) still ends it with `status: 'error'`.
|
|
1559
|
+
|
|
1204
1560
|
### Workspace presence (admin only)
|
|
1205
1561
|
|
|
1206
1562
|
`useWorkspacePresence(workspaceId)` is a **read-only** subscriber to the
|
|
@@ -1287,9 +1643,33 @@ For CSS-level theming without the `theme` prop, set the design-token custom prop
|
|
|
1287
1643
|
}
|
|
1288
1644
|
```
|
|
1289
1645
|
|
|
1646
|
+
## Pop-out windows
|
|
1647
|
+
|
|
1648
|
+
A host that shows SDK UI in a second browser window (the React tree stays in the main window while the DOM lives in the pop-out's document, as flexlayout pop-outs do) wraps that subtree in `OwnerDocumentProvider` with the pop-out's document. The SDK's popover, tooltip and composer mention menu then portal into that document's `body` instead of the main window's; with no provider (or the main document) they keep their default container.
|
|
1649
|
+
|
|
1650
|
+
```tsx
|
|
1651
|
+
import { OwnerDocumentProvider } from '@athenaintel/react/owner-document';
|
|
1652
|
+
|
|
1653
|
+
<OwnerDocumentProvider document={popoutWindow.document}>
|
|
1654
|
+
<AthenaChat />
|
|
1655
|
+
</OwnerDocumentProvider>
|
|
1656
|
+
```
|
|
1657
|
+
|
|
1658
|
+
Your own portals can read the same context: `usePortalContainer()` returns the pop-out's `body` (or `undefined` in the main window, so a library keeps its default), `useOwnerDocument()` the hosting document, and `useIsInPopoutDocument()` whether it is a pop-out. The same exports are on the root entry; `@athenaintel/react/owner-document` imports nothing else from the SDK, so a shell can provide the context without loading the chat. The pop-out document needs the SDK stylesheet too.
|
|
1659
|
+
|
|
1290
1660
|
## Tool cards in the thread
|
|
1291
1661
|
|
|
1292
|
-
`<AthenaChat>`
|
|
1662
|
+
`<AthenaChat>` renders each turn as a transcript (`groupToolCalls`, default `true`; pass `false` to list every tool card inline in call order):
|
|
1663
|
+
|
|
1664
|
+
- **The agent's sentences stay visible.** Every text part the agent writes before its last tool call ("I'll find your workstation, then check origin/staging.", "Started. Now I'll compare.") renders in the transcript, in order, as it streams. Only the work between two sentences folds: each run of tool calls and reasoning becomes one collapsed step row. The answer (the text after the last tool call) renders below, as before; no text renders twice.
|
|
1665
|
+
- **Each step says what it did.** A collapsed row names the step in progress, else the last one it took — "Ran `git log -1 origin/staging`", "Read `live_audio.py`", "Edited `upstream.py`" with "+4 −1", "Found 3 assets for "workstation"", "jevin-box is running", "Viewed pull request #43093", "Updated plan (3/7 done)" — with "+2 more" when the row folds several. Opening it lists every step, and "Show tool details" reveals that row's tool UIs.
|
|
1666
|
+
- **The header counts the turn.** "Working for 1m 12s" while it runs, "Worked for 2m 30s · Used 7 tools" once done (from the messages' own server stamps), "Waiting for you" on an approval. After thirty seconds without a streamed change the header adds "Nothing new for 42s" in amber.
|
|
1667
|
+
|
|
1668
|
+
The transcript is `SuperGroupingTranscript` from `@athenaintel/react/super-grouping`; it takes the same renderer and host slots as `SuperGroupingCard` (which keeps the single-card layout for hosts that mount it). `splitTurnSegments`, `readTurnTiming` and `formatWorkDuration` are exported for hosts that lay a turn out themselves.
|
|
1669
|
+
|
|
1670
|
+
Every step row and every thread tool card reads one summary registry, `summarizeToolCall({ toolName, args, result, status })` → `{ label, detail?, meta?, code? }` (also on `@athenaintel/react/tools`). It has rules for the deep agent's core tools (`execute`, the workspace file tools, `search_assets`, the computer and GitHub tools, web search and browse, `read_asset`, `write_todos`, `task`); other tools read the shared display registry, and a tool neither knows falls back to a host catalog name (`resolveToolDisplayName`), else its sentence-cased name. A call that targets a machine or document by id (`sandbox_asset_id`, `computer_asset_id`) is named by its title when an earlier result in the turn carried one (`collectAssetTitles`); nothing is fetched.
|
|
1671
|
+
|
|
1672
|
+
Every tool call it renders — the generic `ToolFallback`, the built-in tool UIs, nested sub-calls — shares one row anatomy: a status glyph (spinner / check / x / alert), the verb and its target on one line, a running call's elapsed seconds after three, a failed call tinted red, and a disclosure for the arguments and result.
|
|
1293
1673
|
|
|
1294
1674
|
That row is the `thread` appearance of `ToolFallback`. Hosts that render their own thread keep the boxed host card they render today (the default, `card`); to adopt the row, wrap the thread in the provider or set it per card:
|
|
1295
1675
|
|
|
@@ -1302,12 +1682,33 @@ import { ToolFallback, ToolFallbackAppearanceProvider } from '@athenaintel/react
|
|
|
1302
1682
|
|
|
1303
1683
|
Dedicated tool UIs built on `ToolCard` follow the provider automatically; `useToolAppearance()` reads the appearance in force for a custom tool UI.
|
|
1304
1684
|
|
|
1685
|
+
## Spreadsheet range previews (`@athenaintel/react/sheet-range`)
|
|
1686
|
+
|
|
1687
|
+
The sheet tool cards show a read-only preview of the range a tool read or wrote: column letters across the top, row numbers down the side, each cell on one line (its full text on hover), and the rows and columns left out counted under the table. The same pieces are on the `@athenaintel/react/sheet-range` entry (and the root entry) for a custom tool UI:
|
|
1688
|
+
|
|
1689
|
+
```tsx
|
|
1690
|
+
import { RangePreviewTable, rangePreviewFromCellMap } from '@athenaintel/react/sheet-range';
|
|
1691
|
+
|
|
1692
|
+
const preview = rangePreviewFromCellMap({
|
|
1693
|
+
range: "'Q1 Plan'!A1:F40", // the A1 range the cells were read from
|
|
1694
|
+
cells, // A1-keyed values: { A1: 'Region', B1: 1200, … }
|
|
1695
|
+
formatCell: (value) => (value == null ? '' : String(value)),
|
|
1696
|
+
maxRows: 20,
|
|
1697
|
+
});
|
|
1698
|
+
|
|
1699
|
+
{preview && <RangePreviewTable preview={preview} maxRows={20} caption="Q1 Plan A1:F40" />}
|
|
1700
|
+
```
|
|
1701
|
+
|
|
1702
|
+
`rangePreviewFromRows` previews rows of values written from an anchor cell instead. `parseA1Range` reads a cell (`B7`), a rectangle (`A1:C5`), whole columns (`A:C`) or whole rows (`3:5`), with an optional sheet prefix (`Sales!`, `'Q1 Plan'!`, `''` for a quote in a quoted name), `$` markers and any letter case, and returns `null` for anything else (a named range, a column past XFD, row 0). The entry imports nothing else from the SDK, so a shell can use it without loading the chat.
|
|
1703
|
+
|
|
1305
1704
|
## Key Components
|
|
1306
1705
|
|
|
1307
1706
|
- **`<AthenaProvider>`** — Runtime, auth, theming, and configuration
|
|
1308
1707
|
- **`<AthenaChat>`** — Full chat UI with composer, messages, and tool rendering
|
|
1309
|
-
- **`<AthenaLayout>`** — Split-pane layout with asset panel
|
|
1708
|
+
- **`<AthenaLayout>`** — Split-pane layout with asset panel (or a `workbench` column)
|
|
1709
|
+
- **`<SessionWorkbench>`** — Devin-style workspace pane: Tasks, Shell, Computer, Pull requests, Attachments, and your own panes (see [Session workbench](#session-workbench))
|
|
1310
1710
|
- **`<SessionList>`** — Session sidebar: attention, next action, pull-request chips, pin, search (see [Session list, attention and wake markers](#session-list-attention-and-wake-markers))
|
|
1711
|
+
- **`<SessionsPage>`** / **`<Inbox>`** / **`<InboxButton>`** — Full-page session list with server-side filters, display options and CSV export; the notifications inbox (see [Sessions page and inbox](#sessions-page-and-inbox))
|
|
1311
1712
|
- **`<ThreadList>`** — Plain conversation history sidebar (title rows only)
|
|
1312
1713
|
- **`Toolkits`** — Constants for all available backend toolkits
|
|
1313
1714
|
|
|
@@ -1347,6 +1748,13 @@ thread. `useComposerReady()` exposes the readiness for UI that wants to show a
|
|
|
1347
1748
|
"loading" state; `composer.handoff` records each deferred, applied and dropped
|
|
1348
1749
|
write.
|
|
1349
1750
|
|
|
1751
|
+
`useFocusComposer()` puts the caret at the end of the draft and leaves the draft
|
|
1752
|
+
as it is, for a host that shows the chat again and wants typing to land in it (a
|
|
1753
|
+
launcher window brought back by a shortcut). Asked before the editor has mounted,
|
|
1754
|
+
it focuses the editor as it mounts. `useReadComposerDraft()` returns a function
|
|
1755
|
+
that reads the draft's text when called, for a host that hands the chat to
|
|
1756
|
+
another window and carries the unsent text along.
|
|
1757
|
+
|
|
1350
1758
|
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.
|
|
1351
1759
|
|
|
1352
1760
|
```tsx
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-attachment.cjs","sources":["../../../../agent-runtime/src/asset-attachment.ts"],"sourcesContent":["import type {\n Attachment,\n AttachmentAdapter,\n CompleteAttachment,\n PendingAttachment,\n} from '@assistant-ui/core';\n\n/**\n * Shared Athena asset-attachment choreography (issue #29088): upload the file\n * as a normal Athena asset, insert its final mention into the host composer,\n * and yield no assistant-ui attachment tile — the deep-agent backend resolves\n * the mention (documents via read_asset, images inlined server-side), so no\n * duplicate base64 part ever enters statewire. No preparation state rides the\n * wire: readiness is local to the composer doing the attaching.\n */\n\nexport interface UploadedChatAsset {\n id: string;\n title: string;\n assetType: string;\n}\n\n/** Composer mention-insertion hook. The source file stays local to the client\n * and lets rich composers show a preview without putting image bytes on the\n * statewire. The return value is awaited when it is a promise and otherwise\n * ignored, so ordinary event-handler arrows fit. */\nexport type ChatAssetMentionHandler = (\n asset: UploadedChatAsset,\n sourceFile?: File,\n) => unknown;\n\n/**\n * The registry lives on `globalThis`, not in module scope, because two copies\n * of this module can run in one page: the SDK bundles agent-runtime into its\n * dist (the package is private, so the published SDK must inline it) while a\n * host such as the Chrome extension imports agent-runtime directly. The SDK\n * composer registers through the SDK's copy and the host's attachment adapter\n * looks the handler up through its own, so a module-local map would never see\n * the registration.\n */\nconst MENTION_HANDLER_REGISTRY = Symbol.for(\n '@athenaintel/agent-runtime/chat-asset-mention-handlers'\n);\n\ntype MentionHandlerRegistryHost = typeof globalThis & {\n [MENTION_HANDLER_REGISTRY]?: Map<string, ChatAssetMentionHandler>;\n};\n\nfunction mentionHandlersByThread(): Map<string, ChatAssetMentionHandler> {\n const host = globalThis as MentionHandlerRegistryHost;\n return (host[MENTION_HANDLER_REGISTRY] ??= new Map());\n}\n\n/**\n * Register the composer's mention-insertion hook for one thread. The hook is\n * the per-client seam — TipTap on web, the native editor bridge on mobile —\n * and the identity-checked unregister keeps a stale composer from clobbering\n * a newer registration.\n */\nexport function registerChatAssetMentionHandler(\n threadId: string,\n handler: ChatAssetMentionHandler\n): () => void {\n mentionHandlersByThread().set(threadId, handler);\n return () => {\n if (mentionHandlersByThread().get(threadId) === handler) {\n mentionHandlersByThread().delete(threadId);\n }\n };\n}\n\nexport function getChatAssetMentionHandler(\n threadId: string\n): ChatAssetMentionHandler | undefined {\n return mentionHandlersByThread().get(threadId);\n}\n\nexport interface ChatAssetUploadResponse {\n success?: Array<{\n id?: unknown;\n title?: unknown;\n file_name?: unknown;\n athena_original_type?: unknown;\n }>;\n}\n\n/**\n * Map agora's `/api/upload/` response to the mention payload. Title falls\n * back `title → file_name → local file name`; the asset type falls back to\n * the caller's sniffed default when the row carries none.\n */\nexport function uploadedChatAsset(args: {\n body: ChatAssetUploadResponse;\n fallbackTitle: string;\n fallbackAssetType: string;\n}): UploadedChatAsset {\n const row = args.body.success?.[0];\n if (!row || typeof row.id !== 'string') {\n throw new Error('The upload finished without creating an asset.');\n }\n const title =\n typeof row.title === 'string' && row.title.trim()\n ? row.title\n : typeof row.file_name === 'string' && row.file_name.trim()\n ? row.file_name\n : args.fallbackTitle;\n return {\n id: row.id,\n title,\n assetType:\n typeof row.athena_original_type === 'string' && row.athena_original_type.length > 0\n ? row.athena_original_type\n : args.fallbackAssetType,\n };\n}\n\n/** The local default when the upload response carries no asset type. */\nexport function sniffAssetTypeForFile(file: { type: string }): string {\n if (file.type.startsWith('image/')) return 'image';\n if (file.type === 'application/pdf') return 'pdf';\n return 'file';\n}\n\nexport interface UploadChatAssetOptions {\n /** Agora base URL (trailing slashes tolerated). */\n baseUrl: string;\n file: File;\n /** Auth headers for the upload request. */\n headers: () => Promise<Record<string, string>> | Record<string, string>;\n /**\n * Fresh headers for exactly one retry after a 401 (e.g. a force-renewed\n * token). Omitted, a 401 fails like any other error status.\n */\n retryHeadersOn401?: () => Promise<Record<string, string>> | Record<string, string>;\n /** Upload timeout; the request aborts (and the add() rejects) past it. */\n timeoutMs?: number;\n}\n\nconst DEFAULT_UPLOAD_TIMEOUT_MS = 60_000;\n\nasync function uploadOnce(\n options: UploadChatAssetOptions,\n headers: Record<string, string>\n): Promise<Response> {\n const form = new FormData();\n form.append('files', options.file, options.file.name);\n return fetch(`${options.baseUrl.replace(/\\/+$/, '')}/api/upload/`, {\n method: 'POST',\n headers,\n body: form,\n signal: AbortSignal.timeout(options.timeoutMs ?? DEFAULT_UPLOAD_TIMEOUT_MS),\n });\n}\n\n/**\n * Upload one file as an Athena asset through agora's `/api/upload/`.\n * Cancellation and the timeout live inside the adapter path by construction:\n * the abort signal rejects the `add()` generator, so the composer's send\n * (which awaits adapter completion) can never race a hung upload.\n */\nexport async function uploadChatAsset(\n options: UploadChatAssetOptions\n): Promise<UploadedChatAsset> {\n let response = await uploadOnce(options, await options.headers());\n if (response.status === 401 && options.retryHeadersOn401) {\n response = await uploadOnce(options, await options.retryHeadersOn401());\n }\n if (!response.ok) {\n const detail = await response.text().catch(() => '');\n throw new Error(\n `Attachment upload failed (${response.status})${\n detail ? `: ${detail.slice(0, 200)}` : ''\n }`\n );\n }\n return uploadedChatAsset({\n body: (await response.json()) as ChatAssetUploadResponse,\n fallbackTitle: options.file.name,\n fallbackAssetType: sniffAssetTypeForFile(options.file),\n });\n}\n\nexport interface AthenaAssetAttachmentAdapterOptions {\n threadId: string;\n /** File-picker filter; defaults to images (the deep-agent mention path). */\n accept?: string;\n /** Platform upload transport; most hosts wrap {@link uploadChatAsset}. */\n upload: (file: File) => Promise<UploadedChatAsset>;\n}\n\n/**\n * The shared mention-backed attachment adapter: `add()` requires the thread's\n * registered composer hook up front (no upload cost when the composer is\n * gone), uploads, then inserts the mention into the thread's CURRENT hook —\n * a same-thread composer remount mid-upload still receives the mention, and\n * the thread-keyed registry makes cross-thread insertion impossible by\n * construction. A thread whose hook is gone after the upload rejects with a\n * visible error (the conversation closed; the user must re-attach).\n * `send()` throws by contract: mention-backed attachments are never message\n * parts.\n */\nexport class AthenaAssetAttachmentAdapter implements AttachmentAdapter {\n readonly accept: string;\n\n constructor(private readonly options: AthenaAssetAttachmentAdapterOptions) {\n this.accept = options.accept ?? 'image/*';\n }\n\n // eslint-disable-next-line require-yield -- mention-backed uploads deliberately create no attachment tile\n async *add(args: { file: File }): AsyncGenerator<PendingAttachment, void> {\n const handler = getChatAssetMentionHandler(this.options.threadId);\n if (handler === undefined) {\n throw new Error('The original conversation is no longer open.');\n }\n const uploaded = await this.options.upload(args.file);\n const current = getChatAssetMentionHandler(this.options.threadId);\n if (current === undefined) {\n throw new Error('The original conversation is no longer open.');\n }\n await current(uploaded, args.file);\n }\n\n async remove(_attachment: Attachment): Promise<void> {}\n\n async send(_attachment: PendingAttachment): Promise<CompleteAttachment> {\n throw new Error('Mention-backed attachments are not sent as message parts.');\n }\n}\n"],"names":[],"mappings":";;AAwCA,MAAM,2BAA2B,OAAO;AAAA,EACtC;AACF;AAMA,SAAS,0BAAgE;AACvE,QAAM,OAAO;AACb,SAAQ,oEAAmC,oBAAI,IAAA;AACjD;AAQO,SAAS,gCACd,UACA,SACY;AACZ,4BAA0B,IAAI,UAAU,OAAO;AAC/C,SAAO,MAAM;AACX,QAAI,wBAAA,EAA0B,IAAI,QAAQ,MAAM,SAAS;AACvD,8BAAA,EAA0B,OAAO,QAAQ;AAAA,IAC3C;AAAA,EACF;AACF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-attachment.js","sources":["../../../../agent-runtime/src/asset-attachment.ts"],"sourcesContent":["import type {\n Attachment,\n AttachmentAdapter,\n CompleteAttachment,\n PendingAttachment,\n} from '@assistant-ui/core';\n\n/**\n * Shared Athena asset-attachment choreography (issue #29088): upload the file\n * as a normal Athena asset, insert its final mention into the host composer,\n * and yield no assistant-ui attachment tile — the deep-agent backend resolves\n * the mention (documents via read_asset, images inlined server-side), so no\n * duplicate base64 part ever enters statewire. No preparation state rides the\n * wire: readiness is local to the composer doing the attaching.\n */\n\nexport interface UploadedChatAsset {\n id: string;\n title: string;\n assetType: string;\n}\n\n/** Composer mention-insertion hook. The source file stays local to the client\n * and lets rich composers show a preview without putting image bytes on the\n * statewire. The return value is awaited when it is a promise and otherwise\n * ignored, so ordinary event-handler arrows fit. */\nexport type ChatAssetMentionHandler = (\n asset: UploadedChatAsset,\n sourceFile?: File,\n) => unknown;\n\n/**\n * The registry lives on `globalThis`, not in module scope, because two copies\n * of this module can run in one page: the SDK bundles agent-runtime into its\n * dist (the package is private, so the published SDK must inline it) while a\n * host such as the Chrome extension imports agent-runtime directly. The SDK\n * composer registers through the SDK's copy and the host's attachment adapter\n * looks the handler up through its own, so a module-local map would never see\n * the registration.\n */\nconst MENTION_HANDLER_REGISTRY = Symbol.for(\n '@athenaintel/agent-runtime/chat-asset-mention-handlers'\n);\n\ntype MentionHandlerRegistryHost = typeof globalThis & {\n [MENTION_HANDLER_REGISTRY]?: Map<string, ChatAssetMentionHandler>;\n};\n\nfunction mentionHandlersByThread(): Map<string, ChatAssetMentionHandler> {\n const host = globalThis as MentionHandlerRegistryHost;\n return (host[MENTION_HANDLER_REGISTRY] ??= new Map());\n}\n\n/**\n * Register the composer's mention-insertion hook for one thread. The hook is\n * the per-client seam — TipTap on web, the native editor bridge on mobile —\n * and the identity-checked unregister keeps a stale composer from clobbering\n * a newer registration.\n */\nexport function registerChatAssetMentionHandler(\n threadId: string,\n handler: ChatAssetMentionHandler\n): () => void {\n mentionHandlersByThread().set(threadId, handler);\n return () => {\n if (mentionHandlersByThread().get(threadId) === handler) {\n mentionHandlersByThread().delete(threadId);\n }\n };\n}\n\nexport function getChatAssetMentionHandler(\n threadId: string\n): ChatAssetMentionHandler | undefined {\n return mentionHandlersByThread().get(threadId);\n}\n\nexport interface ChatAssetUploadResponse {\n success?: Array<{\n id?: unknown;\n title?: unknown;\n file_name?: unknown;\n athena_original_type?: unknown;\n }>;\n}\n\n/**\n * Map agora's `/api/upload/` response to the mention payload. Title falls\n * back `title → file_name → local file name`; the asset type falls back to\n * the caller's sniffed default when the row carries none.\n */\nexport function uploadedChatAsset(args: {\n body: ChatAssetUploadResponse;\n fallbackTitle: string;\n fallbackAssetType: string;\n}): UploadedChatAsset {\n const row = args.body.success?.[0];\n if (!row || typeof row.id !== 'string') {\n throw new Error('The upload finished without creating an asset.');\n }\n const title =\n typeof row.title === 'string' && row.title.trim()\n ? row.title\n : typeof row.file_name === 'string' && row.file_name.trim()\n ? row.file_name\n : args.fallbackTitle;\n return {\n id: row.id,\n title,\n assetType:\n typeof row.athena_original_type === 'string' && row.athena_original_type.length > 0\n ? row.athena_original_type\n : args.fallbackAssetType,\n };\n}\n\n/** The local default when the upload response carries no asset type. */\nexport function sniffAssetTypeForFile(file: { type: string }): string {\n if (file.type.startsWith('image/')) return 'image';\n if (file.type === 'application/pdf') return 'pdf';\n return 'file';\n}\n\nexport interface UploadChatAssetOptions {\n /** Agora base URL (trailing slashes tolerated). */\n baseUrl: string;\n file: File;\n /** Auth headers for the upload request. */\n headers: () => Promise<Record<string, string>> | Record<string, string>;\n /**\n * Fresh headers for exactly one retry after a 401 (e.g. a force-renewed\n * token). Omitted, a 401 fails like any other error status.\n */\n retryHeadersOn401?: () => Promise<Record<string, string>> | Record<string, string>;\n /** Upload timeout; the request aborts (and the add() rejects) past it. */\n timeoutMs?: number;\n}\n\nconst DEFAULT_UPLOAD_TIMEOUT_MS = 60_000;\n\nasync function uploadOnce(\n options: UploadChatAssetOptions,\n headers: Record<string, string>\n): Promise<Response> {\n const form = new FormData();\n form.append('files', options.file, options.file.name);\n return fetch(`${options.baseUrl.replace(/\\/+$/, '')}/api/upload/`, {\n method: 'POST',\n headers,\n body: form,\n signal: AbortSignal.timeout(options.timeoutMs ?? DEFAULT_UPLOAD_TIMEOUT_MS),\n });\n}\n\n/**\n * Upload one file as an Athena asset through agora's `/api/upload/`.\n * Cancellation and the timeout live inside the adapter path by construction:\n * the abort signal rejects the `add()` generator, so the composer's send\n * (which awaits adapter completion) can never race a hung upload.\n */\nexport async function uploadChatAsset(\n options: UploadChatAssetOptions\n): Promise<UploadedChatAsset> {\n let response = await uploadOnce(options, await options.headers());\n if (response.status === 401 && options.retryHeadersOn401) {\n response = await uploadOnce(options, await options.retryHeadersOn401());\n }\n if (!response.ok) {\n const detail = await response.text().catch(() => '');\n throw new Error(\n `Attachment upload failed (${response.status})${\n detail ? `: ${detail.slice(0, 200)}` : ''\n }`\n );\n }\n return uploadedChatAsset({\n body: (await response.json()) as ChatAssetUploadResponse,\n fallbackTitle: options.file.name,\n fallbackAssetType: sniffAssetTypeForFile(options.file),\n });\n}\n\nexport interface AthenaAssetAttachmentAdapterOptions {\n threadId: string;\n /** File-picker filter; defaults to images (the deep-agent mention path). */\n accept?: string;\n /** Platform upload transport; most hosts wrap {@link uploadChatAsset}. */\n upload: (file: File) => Promise<UploadedChatAsset>;\n}\n\n/**\n * The shared mention-backed attachment adapter: `add()` requires the thread's\n * registered composer hook up front (no upload cost when the composer is\n * gone), uploads, then inserts the mention into the thread's CURRENT hook —\n * a same-thread composer remount mid-upload still receives the mention, and\n * the thread-keyed registry makes cross-thread insertion impossible by\n * construction. A thread whose hook is gone after the upload rejects with a\n * visible error (the conversation closed; the user must re-attach).\n * `send()` throws by contract: mention-backed attachments are never message\n * parts.\n */\nexport class AthenaAssetAttachmentAdapter implements AttachmentAdapter {\n readonly accept: string;\n\n constructor(private readonly options: AthenaAssetAttachmentAdapterOptions) {\n this.accept = options.accept ?? 'image/*';\n }\n\n // eslint-disable-next-line require-yield -- mention-backed uploads deliberately create no attachment tile\n async *add(args: { file: File }): AsyncGenerator<PendingAttachment, void> {\n const handler = getChatAssetMentionHandler(this.options.threadId);\n if (handler === undefined) {\n throw new Error('The original conversation is no longer open.');\n }\n const uploaded = await this.options.upload(args.file);\n const current = getChatAssetMentionHandler(this.options.threadId);\n if (current === undefined) {\n throw new Error('The original conversation is no longer open.');\n }\n await current(uploaded, args.file);\n }\n\n async remove(_attachment: Attachment): Promise<void> {}\n\n async send(_attachment: PendingAttachment): Promise<CompleteAttachment> {\n throw new Error('Mention-backed attachments are not sent as message parts.');\n }\n}\n"],"names":[],"mappings":"AAwCA,MAAM,2BAA2B,OAAO;AAAA,EACtC;AACF;AAMA,SAAS,0BAAgE;AACvE,QAAM,OAAO;AACb,SAAQ,oEAAmC,oBAAI,IAAA;AACjD;AAQO,SAAS,gCACd,UACA,SACY;AACZ,4BAA0B,IAAI,UAAU,OAAO;AAC/C,SAAO,MAAM;AACX,QAAI,wBAAA,EAA0B,IAAI,QAAQ,MAAM,SAAS;AACvD,8BAAA,EAA0B,OAAO,QAAQ;AAAA,IAC3C;AAAA,EACF;AACF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-denial.cjs","sources":["../../../../agent-runtime/src/auth-denial.ts"],"sourcesContent":["import type { DeepAgentConnectionState } from './types';\n\n/**\n * How many consecutive `unauthorized` attach denials park the transport.\n *\n * The client's reconnect backoff reaches its 30s ceiling around the eighth\n * attempt, so eight denials ≈ one minute of the server actively refusing the\n * credential. Transient auth blips (a tab waking with a stale token that\n * refreshes on the next attempt) recover in one or two attempts and never\n * park; a credential the server keeps refusing (revoked access, no workspace)\n * would otherwise retry every 30s indefinitely — the prod \"attach denied\"\n * loops ran for hours per tab.\n */\nexport const AUTH_DENIAL_PARK_THRESHOLD = 8;\n\nexport interface AuthDenialTrackerState {\n /** Reconnect attempt number of the last counted denial (dedupes converter re-runs). */\n lastAttempt: number | null;\n /** Consecutive `unauthorized` denials observed on this attach. */\n consecutive: number;\n /** The denial's host-supplied message, kept for the parked connection state. */\n message: string | undefined;\n}\n\nexport const initialAuthDenialTrackerState = (): AuthDenialTrackerState => ({\n lastAttempt: null,\n consecutive: 0,\n message: undefined,\n});\n\n/** Count distinct unauthorized retries, preserving the streak during each dial. */\nexport function observeAuthDenial(\n state: AuthDenialTrackerState,\n connection: DeepAgentConnectionState,\n { threshold = AUTH_DENIAL_PARK_THRESHOLD }: { threshold?: number } = {}\n): { state: AuthDenialTrackerState; park: boolean } {\n if (connection.status !== 'retrying' || connection.cause !== 'unauthorized') {\n if (\n connection.status === 'connecting' ||\n (connection.status === 'retrying' && connection.cause === undefined)\n ) {\n return { state, park: false };\n }\n return { state: initialAuthDenialTrackerState(), park: false };\n }\n const attempt = connection.attempt;\n if (attempt === state.lastAttempt) return { state, park: false };\n const next: AuthDenialTrackerState = {\n lastAttempt: attempt,\n consecutive: state.consecutive + 1,\n message: connection.message ?? state.message,\n };\n return { state: next, park: next.consecutive >= threshold };\n}\n"],"names":[],"mappings":";;AAaO,MAAM,6BAA6B;AAWnC,MAAM,gCAAgC,OAA+B;AAAA,EAC1E,aAAa;AAAA,EACb,aAAa;AAAA,EACb,SAAS;AACX;AAGO,SAAS,kBACd,OACA,YACA,EAAE,YAAY,2BAAA,IAAuD,IACnB;AAClD,MAAI,WAAW,WAAW,cAAc,WAAW,UAAU,gBAAgB;AAC3E,QACE,WAAW,WAAW,gBACrB,WAAW,WAAW,cAAc,WAAW,UAAU,QAC1D;AACA,aAAO,EAAE,OAAO,MAAM,MAAA;AAAA,IACxB;AACA,WAAO,EAAE,OAAO,iCAAiC,MAAM,MAAA;AAAA,EACzD;AACA,QAAM,UAAU,WAAW;AAC3B,MAAI,YAAY,MAAM,oBAAoB,EAAE,OAAO,MAAM,MAAA;AACzD,QAAM,OAA+B;AAAA,IACnC,aAAa;AAAA,IACb,aAAa,MAAM,cAAc;AAAA,IACjC,SAAS,WAAW,WAAW,MAAM;AAAA,EAAA;AAEvC,SAAO,EAAE,OAAO,MAAM,MAAM,KAAK,eAAe,UAAA;AAClD;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-denial.js","sources":["../../../../agent-runtime/src/auth-denial.ts"],"sourcesContent":["import type { DeepAgentConnectionState } from './types';\n\n/**\n * How many consecutive `unauthorized` attach denials park the transport.\n *\n * The client's reconnect backoff reaches its 30s ceiling around the eighth\n * attempt, so eight denials ≈ one minute of the server actively refusing the\n * credential. Transient auth blips (a tab waking with a stale token that\n * refreshes on the next attempt) recover in one or two attempts and never\n * park; a credential the server keeps refusing (revoked access, no workspace)\n * would otherwise retry every 30s indefinitely — the prod \"attach denied\"\n * loops ran for hours per tab.\n */\nexport const AUTH_DENIAL_PARK_THRESHOLD = 8;\n\nexport interface AuthDenialTrackerState {\n /** Reconnect attempt number of the last counted denial (dedupes converter re-runs). */\n lastAttempt: number | null;\n /** Consecutive `unauthorized` denials observed on this attach. */\n consecutive: number;\n /** The denial's host-supplied message, kept for the parked connection state. */\n message: string | undefined;\n}\n\nexport const initialAuthDenialTrackerState = (): AuthDenialTrackerState => ({\n lastAttempt: null,\n consecutive: 0,\n message: undefined,\n});\n\n/** Count distinct unauthorized retries, preserving the streak during each dial. */\nexport function observeAuthDenial(\n state: AuthDenialTrackerState,\n connection: DeepAgentConnectionState,\n { threshold = AUTH_DENIAL_PARK_THRESHOLD }: { threshold?: number } = {}\n): { state: AuthDenialTrackerState; park: boolean } {\n if (connection.status !== 'retrying' || connection.cause !== 'unauthorized') {\n if (\n connection.status === 'connecting' ||\n (connection.status === 'retrying' && connection.cause === undefined)\n ) {\n return { state, park: false };\n }\n return { state: initialAuthDenialTrackerState(), park: false };\n }\n const attempt = connection.attempt;\n if (attempt === state.lastAttempt) return { state, park: false };\n const next: AuthDenialTrackerState = {\n lastAttempt: attempt,\n consecutive: state.consecutive + 1,\n message: connection.message ?? state.message,\n };\n return { state: next, park: next.consecutive >= threshold };\n}\n"],"names":[],"mappings":"AAaO,MAAM,6BAA6B;AAWnC,MAAM,gCAAgC,OAA+B;AAAA,EAC1E,aAAa;AAAA,EACb,aAAa;AAAA,EACb,SAAS;AACX;AAGO,SAAS,kBACd,OACA,YACA,EAAE,YAAY,2BAAA,IAAuD,IACnB;AAClD,MAAI,WAAW,WAAW,cAAc,WAAW,UAAU,gBAAgB;AAC3E,QACE,WAAW,WAAW,gBACrB,WAAW,WAAW,cAAc,WAAW,UAAU,QAC1D;AACA,aAAO,EAAE,OAAO,MAAM,MAAA;AAAA,IACxB;AACA,WAAO,EAAE,OAAO,iCAAiC,MAAM,MAAA;AAAA,EACzD;AACA,QAAM,UAAU,WAAW;AAC3B,MAAI,YAAY,MAAM,oBAAoB,EAAE,OAAO,MAAM,MAAA;AACzD,QAAM,OAA+B;AAAA,IACnC,aAAa;AAAA,IACb,aAAa,MAAM,cAAc;AAAA,IACjC,SAAS,WAAW,WAAW,MAAM;AAAA,EAAA;AAEvC,SAAO,EAAE,OAAO,MAAM,MAAM,KAAK,eAAe,UAAA;AAClD;"}
|