@athenaintel/react 0.42.2 → 0.48.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 +225 -3
- package/dist/agent-runtime/src/answer-label.cjs +137 -0
- package/dist/agent-runtime/src/answer-label.cjs.map +1 -0
- package/dist/agent-runtime/src/answer-label.d.ts +104 -0
- package/dist/agent-runtime/src/answer-label.js +137 -0
- package/dist/agent-runtime/src/answer-label.js.map +1 -0
- package/dist/agent-runtime/src/answer-rows.cjs +180 -0
- package/dist/agent-runtime/src/answer-rows.cjs.map +1 -0
- package/dist/agent-runtime/src/answer-rows.d.ts +86 -0
- package/dist/agent-runtime/src/answer-rows.js +180 -0
- package/dist/agent-runtime/src/answer-rows.js.map +1 -0
- package/dist/agent-runtime/src/client-tool-bridge.cjs +15 -15
- package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -1
- package/dist/agent-runtime/src/conversation-index.cjs +8 -8
- package/dist/agent-runtime/src/conversation-index.cjs.map +1 -1
- package/dist/agent-runtime/src/conversation-list-groups.d.ts +74 -0
- package/dist/agent-runtime/src/decision-checks.cjs +207 -0
- package/dist/agent-runtime/src/decision-checks.cjs.map +1 -0
- package/dist/agent-runtime/src/decision-checks.d.ts +142 -0
- package/dist/agent-runtime/src/decision-checks.js +207 -0
- package/dist/agent-runtime/src/decision-checks.js.map +1 -0
- package/dist/agent-runtime/src/desktop-handoff.d.ts +12 -0
- package/dist/agent-runtime/src/errors.cjs +18 -0
- package/dist/agent-runtime/src/errors.cjs.map +1 -1
- package/dist/agent-runtime/src/errors.d.ts +7 -0
- package/dist/agent-runtime/src/errors.js +18 -0
- package/dist/agent-runtime/src/errors.js.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs +12 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +6 -6
- package/dist/agent-runtime/src/generated/runconfig-contract.js +12 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
- package/dist/agent-runtime/src/handoff-arrival.cjs +60 -0
- package/dist/agent-runtime/src/handoff-arrival.cjs.map +1 -0
- package/dist/agent-runtime/src/handoff-arrival.d.ts +46 -0
- package/dist/agent-runtime/src/handoff-arrival.js +60 -0
- package/dist/agent-runtime/src/handoff-arrival.js.map +1 -0
- package/dist/agent-runtime/src/index.d.ts +15 -8
- package/dist/agent-runtime/src/interrupts.cjs +43 -18
- package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
- package/dist/agent-runtime/src/interrupts.d.ts +19 -2
- package/dist/agent-runtime/src/interrupts.js +28 -3
- package/dist/agent-runtime/src/interrupts.js.map +1 -1
- package/dist/agent-runtime/src/lane-history.cjs +8 -8
- package/dist/agent-runtime/src/lane-history.cjs.map +1 -1
- package/dist/agent-runtime/src/messages.cjs +43 -8
- package/dist/agent-runtime/src/messages.cjs.map +1 -1
- package/dist/agent-runtime/src/messages.d.ts +25 -3
- package/dist/agent-runtime/src/messages.js +43 -8
- package/dist/agent-runtime/src/messages.js.map +1 -1
- package/dist/agent-runtime/src/offline-status.cjs +36 -0
- package/dist/agent-runtime/src/offline-status.cjs.map +1 -0
- package/dist/agent-runtime/src/offline-status.d.ts +118 -3
- package/dist/agent-runtime/src/offline-status.js +36 -0
- package/dist/agent-runtime/src/offline-status.js.map +1 -0
- package/dist/agent-runtime/src/queue.cjs +0 -9
- package/dist/agent-runtime/src/queue.cjs.map +1 -1
- package/dist/agent-runtime/src/queue.js +0 -9
- package/dist/agent-runtime/src/queue.js.map +1 -1
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +9 -9
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
- package/dist/agent-runtime/src/runtime-catalog.cjs +42 -0
- package/dist/agent-runtime/src/runtime-catalog.cjs.map +1 -0
- package/dist/agent-runtime/src/runtime-catalog.d.ts +35 -0
- package/dist/agent-runtime/src/runtime-catalog.js +42 -0
- package/dist/agent-runtime/src/runtime-catalog.js.map +1 -0
- package/dist/agent-runtime/src/runtime-messages.cjs.map +1 -1
- package/dist/agent-runtime/src/runtime-messages.d.ts +1 -1
- package/dist/agent-runtime/src/runtime-messages.js.map +1 -1
- package/dist/agent-runtime/src/runtime.d.ts +40 -0
- package/dist/agent-runtime/src/statewire-suspended.cjs +3 -3
- package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -1
- package/dist/agent-runtime/src/subagents.cjs +32 -2
- package/dist/agent-runtime/src/subagents.cjs.map +1 -1
- package/dist/agent-runtime/src/subagents.d.ts +9 -0
- package/dist/agent-runtime/src/subagents.js +30 -0
- package/dist/agent-runtime/src/subagents.js.map +1 -1
- package/dist/agent-runtime/src/thread-driver.cjs +67 -0
- package/dist/agent-runtime/src/thread-driver.cjs.map +1 -0
- package/dist/agent-runtime/src/thread-driver.d.ts +49 -0
- package/dist/agent-runtime/src/thread-driver.js +67 -0
- package/dist/agent-runtime/src/thread-driver.js.map +1 -0
- package/dist/agent-runtime/src/thread-handoff-flow-machine.d.ts +172 -0
- package/dist/agent-runtime/src/thread-handoff-protocol.d.ts +756 -0
- package/dist/agent-runtime/src/thread-handoff-qr.d.ts +11 -0
- package/dist/agent-runtime/src/thread-handoff.d.ts +3 -364
- package/dist/agent-runtime/src/thread-status.cjs +3 -3
- package/dist/agent-runtime/src/thread-status.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.cjs +210 -33
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.d.ts +12 -0
- package/dist/agent-runtime/src/tool-metadata.js +210 -33
- package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
- package/dist/agent-runtime/src/tool-names.cjs +2 -0
- package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-names.d.ts +2 -0
- package/dist/agent-runtime/src/tool-names.js +2 -0
- package/dist/agent-runtime/src/tool-names.js.map +1 -1
- package/dist/agent-runtime/src/types.d.ts +10 -2
- package/dist/agent-runtime/src/use-conversation-list.cjs +11 -11
- package/dist/agent-runtime/src/use-conversation-list.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +24 -19
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +2 -1
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +6 -1
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-config.cjs +14 -14
- package/dist/agent-runtime/src/use-deep-agent-config.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs +6 -6
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +16 -16
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs +45 -45
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs +572 -134
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +137 -10
- package/dist/agent-runtime/src/use-deep-agent-voice.js +514 -76
- package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs +26 -26
- package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -1
- package/dist/agent-runtime/src/use-historical-edit-attachments.cjs +4 -4
- package/dist/agent-runtime/src/use-historical-edit-attachments.cjs.map +1 -1
- package/dist/agent-runtime/src/use-thread-handoff-flow.d.ts +28 -26
- package/dist/agent-runtime/src/voice-media.cjs +117 -0
- package/dist/agent-runtime/src/voice-media.cjs.map +1 -0
- package/dist/agent-runtime/src/voice-media.d.ts +49 -0
- package/dist/agent-runtime/src/voice-media.js +117 -0
- package/dist/agent-runtime/src/voice-media.js.map +1 -0
- package/dist/agent-runtime/src/voice-wire-types.d.ts +32 -0
- package/dist/assets/AssetPanel.cjs +11 -11
- package/dist/assets/AssetPanel.cjs.map +1 -1
- package/dist/assets/AthenaAssetEmbed.cjs +11 -9
- package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
- package/dist/assets/AthenaAssetEmbed.d.ts +7 -0
- package/dist/assets/AthenaAssetEmbed.js +4 -2
- package/dist/assets/AthenaAssetEmbed.js.map +1 -1
- package/dist/assets/AthenaLayout.cjs +16 -16
- package/dist/assets/AthenaLayout.cjs.map +1 -1
- package/dist/assets/use-asset-content.cjs +4 -4
- package/dist/assets/use-asset-content.cjs.map +1 -1
- package/dist/assets/use-asset-embed.cjs +14 -7
- package/dist/assets/use-asset-embed.cjs.map +1 -1
- package/dist/assets/use-asset-embed.d.ts +11 -1
- package/dist/assets/use-asset-embed.js +10 -3
- package/dist/assets/use-asset-embed.js.map +1 -1
- package/dist/auth/AthenaAuthContext.cjs +3 -3
- package/dist/auth/AthenaAuthContext.cjs.map +1 -1
- package/dist/auth/AthenaAuthProvider.cjs +8 -8
- package/dist/auth/AthenaAuthProvider.cjs.map +1 -1
- package/dist/auth/AthenaCredentialSourceContext.cjs +5 -5
- package/dist/auth/AthenaCredentialSourceContext.cjs.map +1 -1
- package/dist/auth/AthenaSSOProvider.cjs +14 -14
- package/dist/auth/AthenaSSOProvider.cjs.map +1 -1
- package/dist/auth/credential-source.cjs +26 -13
- package/dist/auth/credential-source.cjs.map +1 -1
- package/dist/auth/credential-source.d.ts +8 -0
- package/dist/auth/credential-source.js +26 -13
- package/dist/auth/credential-source.js.map +1 -1
- package/dist/catalog/agent-model-options.cjs +25 -17
- package/dist/catalog/agent-model-options.cjs.map +1 -1
- package/dist/catalog/agent-model-options.d.ts +38 -5
- package/dist/catalog/agent-model-options.js +25 -17
- package/dist/catalog/agent-model-options.js.map +1 -1
- package/dist/catalog/channel-refusal.cjs +36 -0
- package/dist/catalog/channel-refusal.cjs.map +1 -0
- package/dist/catalog/channel-refusal.d.ts +29 -0
- package/dist/catalog/channel-refusal.js +36 -0
- package/dist/catalog/channel-refusal.js.map +1 -0
- package/dist/catalog/chat-pickers.cjs +60 -24
- package/dist/catalog/chat-pickers.cjs.map +1 -1
- package/dist/catalog/chat-pickers.d.ts +12 -2
- package/dist/catalog/chat-pickers.js +56 -20
- package/dist/catalog/chat-pickers.js.map +1 -1
- package/dist/catalog/runtime-catalog.cjs +89 -23
- package/dist/catalog/runtime-catalog.cjs.map +1 -1
- package/dist/catalog/runtime-catalog.d.ts +8 -2
- package/dist/catalog/runtime-catalog.js +83 -17
- package/dist/catalog/runtime-catalog.js.map +1 -1
- package/dist/catalog/use-athena-chat-mode.cjs +12 -12
- package/dist/catalog/use-athena-chat-mode.cjs.map +1 -1
- package/dist/chat/AthenaChat.cjs +155 -67
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +42 -2
- package/dist/chat/AthenaChat.js +106 -18
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/AthenaChatErrorBoundary.cjs +3 -3
- package/dist/chat/AthenaChatErrorBoundary.cjs.map +1 -1
- package/dist/chat/DrivingOnChip.cjs +23 -0
- package/dist/chat/DrivingOnChip.cjs.map +1 -0
- package/dist/chat/DrivingOnChip.d.ts +17 -0
- package/dist/chat/DrivingOnChip.js +23 -0
- package/dist/chat/DrivingOnChip.js.map +1 -0
- package/dist/chat/StatewireApprovalCard.cjs +125 -31
- package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
- package/dist/chat/StatewireApprovalCard.d.ts +73 -1
- package/dist/chat/StatewireApprovalCard.js +115 -21
- package/dist/chat/StatewireApprovalCard.js.map +1 -1
- package/dist/chat/StatewireClientToolBridge.cjs +2 -2
- package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.cjs +25 -63
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.d.ts +11 -13
- package/dist/chat/StatewireQueuedMessages.js +16 -54
- package/dist/chat/StatewireQueuedMessages.js.map +1 -1
- package/dist/chat/WaitingOnYouBanner.cjs +3 -3
- package/dist/chat/WaitingOnYouBanner.cjs.map +1 -1
- package/dist/chat/athena-chat-welcome.cjs +2 -2
- package/dist/chat/athena-chat-welcome.cjs.map +1 -1
- package/dist/chat/athena-citation-links.cjs +5 -5
- package/dist/chat/athena-citation-links.cjs.map +1 -1
- package/dist/chat/athena-composer-controls.cjs +26 -16
- package/dist/chat/athena-composer-controls.cjs.map +1 -1
- package/dist/chat/athena-composer-controls.d.ts +6 -0
- package/dist/chat/athena-composer-controls.js +26 -16
- package/dist/chat/athena-composer-controls.js.map +1 -1
- package/dist/chat/athena-turn-end-status.cjs +42 -0
- package/dist/chat/athena-turn-end-status.cjs.map +1 -0
- package/dist/chat/athena-turn-end-status.d.ts +24 -0
- package/dist/chat/athena-turn-end-status.js +42 -0
- package/dist/chat/athena-turn-end-status.js.map +1 -0
- package/dist/chat/browser-decision-check.cjs +131 -0
- package/dist/chat/browser-decision-check.cjs.map +1 -0
- package/dist/chat/browser-decision-check.d.ts +61 -0
- package/dist/chat/browser-decision-check.js +131 -0
- package/dist/chat/browser-decision-check.js.map +1 -0
- package/dist/chat/chat-outbox-rows.cjs +3 -3
- package/dist/chat/chat-outbox-rows.cjs.map +1 -1
- package/dist/chat/chat-voice-controls.cjs +93 -28
- package/dist/chat/chat-voice-controls.cjs.map +1 -1
- package/dist/chat/chat-voice-controls.d.ts +36 -2
- package/dist/chat/chat-voice-controls.js +89 -24
- package/dist/chat/chat-voice-controls.js.map +1 -1
- package/dist/chat/composer-keyboard-hint.cjs +5 -5
- package/dist/chat/composer-keyboard-hint.cjs.map +1 -1
- package/dist/chat/device-operation.cjs +29 -0
- package/dist/chat/device-operation.cjs.map +1 -0
- package/dist/chat/device-operation.d.ts +34 -0
- package/dist/chat/device-operation.js +29 -0
- package/dist/chat/device-operation.js.map +1 -0
- package/dist/chat/super-grouping/CollapsibleGroup.cjs +14 -14
- package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -1
- package/dist/chat/super-grouping/GroupedMessageParts.cjs +4 -4
- package/dist/chat/super-grouping/GroupedMessageParts.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +60 -38
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +24 -4
- package/dist/chat/super-grouping/SuperGroupingCard.js +37 -15
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +32 -32
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.js +3 -3
- package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.cjs +97 -37
- package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.d.ts +14 -2
- package/dist/chat/super-grouping/ToolTimeline.js +94 -34
- package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.cjs +47 -12
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.d.ts +21 -0
- package/dist/chat/super-grouping/activity-timeline.js +47 -12
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
- package/dist/chat/super-grouping/grouping-function.cjs +4 -0
- package/dist/chat/super-grouping/grouping-function.cjs.map +1 -1
- package/dist/chat/super-grouping/grouping-function.d.ts +7 -0
- package/dist/chat/super-grouping/grouping-function.js +5 -1
- package/dist/chat/super-grouping/grouping-function.js.map +1 -1
- package/dist/chat/super-grouping/index.cjs +6 -0
- package/dist/chat/super-grouping/index.cjs.map +1 -1
- package/dist/chat/super-grouping/index.d.ts +6 -2
- package/dist/chat/super-grouping/index.js +7 -1
- package/dist/chat/super-grouping/index.js.map +1 -1
- package/dist/chat/super-grouping/timeline-step.cjs +61 -2
- package/dist/chat/super-grouping/timeline-step.cjs.map +1 -1
- package/dist/chat/super-grouping/timeline-step.d.ts +13 -1
- package/dist/chat/super-grouping/timeline-step.js +61 -2
- package/dist/chat/super-grouping/timeline-step.js.map +1 -1
- package/dist/chat/super-grouping/tool-part-placement.cjs +17 -0
- package/dist/chat/super-grouping/tool-part-placement.cjs.map +1 -0
- package/dist/chat/super-grouping/tool-part-placement.d.ts +22 -0
- package/dist/chat/super-grouping/tool-part-placement.js +17 -0
- package/dist/chat/super-grouping/tool-part-placement.js.map +1 -0
- package/dist/chat/thread-scroll-to-bottom.cjs +2 -2
- package/dist/chat/thread-scroll-to-bottom.cjs.map +1 -1
- package/dist/chat/thread-scroll-to-bottom.d.ts +10 -7
- package/dist/chat/thread-scroll-to-bottom.js +2 -2
- package/dist/chat/thread-scroll-to-bottom.js.map +1 -1
- package/dist/chat/tooltip-icon-button.cjs +2 -2
- package/dist/chat/tooltip-icon-button.cjs.map +1 -1
- package/dist/chat/use-athena-voice-live.cjs +11 -0
- package/dist/chat/use-athena-voice-live.cjs.map +1 -0
- package/dist/chat/use-athena-voice-live.d.ts +11 -0
- package/dist/chat/use-athena-voice-live.js +11 -0
- package/dist/chat/use-athena-voice-live.js.map +1 -0
- package/dist/chat/use-statewire-approval-request.cjs +56 -24
- package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
- package/dist/chat/use-statewire-approval-request.d.ts +33 -4
- package/dist/chat/use-statewire-approval-request.js +41 -9
- package/dist/chat/use-statewire-approval-request.js.map +1 -1
- package/dist/chat-ui/auth/sign-in-card.cjs +2 -2
- package/dist/chat-ui/auth/sign-in-card.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.cjs +138 -107
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +20 -4
- package/dist/chat-ui/composer/tiptap-composer.js +85 -54
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/header/conversation-history-panel.cjs +49 -23
- package/dist/chat-ui/header/conversation-history-panel.cjs.map +1 -1
- package/dist/chat-ui/header/conversation-history-panel.d.ts +12 -1
- package/dist/chat-ui/header/conversation-history-panel.js +38 -12
- package/dist/chat-ui/header/conversation-history-panel.js.map +1 -1
- package/dist/chat-ui/index.cjs +18 -0
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +7 -1
- package/dist/chat-ui/index.js +18 -0
- package/dist/chat-ui/index.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +147 -38
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.d.ts +17 -1
- package/dist/chat-ui/mentions/mention-chip.js +146 -37
- package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs +10 -9
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js +3 -2
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs +2 -2
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs +29 -6
- package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-list.d.ts +7 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-list.js +25 -2
- package/dist/chat-ui/mentions/suggestions/components/menu-list.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs +2 -2
- package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs +2 -2
- package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +3 -3
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs +56 -2
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.d.ts +12 -0
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.js +56 -2
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +24 -3
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +7 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +24 -3
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +35 -13
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +15 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +28 -6
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs +9 -6
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.d.ts +3 -0
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js +5 -2
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js.map +1 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs +45 -10
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +24 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.js +46 -11
- package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -1
- package/dist/chat-ui/mentions/use-member-avatar.cjs +4 -4
- package/dist/chat-ui/mentions/use-member-avatar.cjs.map +1 -1
- package/dist/chat-ui/mentions/use-mention-asset.cjs +140 -0
- package/dist/chat-ui/mentions/use-mention-asset.cjs.map +1 -0
- package/dist/chat-ui/mentions/use-mention-asset.d.ts +16 -0
- package/dist/chat-ui/mentions/use-mention-asset.js +140 -0
- package/dist/chat-ui/mentions/use-mention-asset.js.map +1 -0
- package/dist/chat-ui/messages/answer-label.cjs +42 -0
- package/dist/chat-ui/messages/answer-label.cjs.map +1 -0
- package/dist/chat-ui/messages/answer-label.d.ts +33 -0
- package/dist/chat-ui/messages/answer-label.js +42 -0
- package/dist/chat-ui/messages/answer-label.js.map +1 -0
- package/dist/chat-ui/messages/arrival-animation.cjs +13 -0
- package/dist/chat-ui/messages/arrival-animation.cjs.map +1 -0
- package/dist/chat-ui/messages/arrival-animation.d.ts +14 -0
- package/dist/chat-ui/messages/arrival-animation.js +13 -0
- package/dist/chat-ui/messages/arrival-animation.js.map +1 -0
- package/dist/chat-ui/messages/continue-pill.cjs +5 -5
- package/dist/chat-ui/messages/continue-pill.cjs.map +1 -1
- package/dist/chat-ui/messages/handoff-arrival-divider.cjs +44 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.cjs.map +1 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.d.ts +17 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.js +44 -0
- package/dist/chat-ui/messages/handoff-arrival-divider.js.map +1 -0
- package/dist/chat-ui/messages/message-actions-config.cjs +3 -3
- package/dist/chat-ui/messages/message-actions-config.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.cjs +8 -4
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.js +5 -1
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/messages/message-images.cjs +66 -0
- package/dist/chat-ui/messages/message-images.cjs.map +1 -0
- package/dist/chat-ui/messages/message-images.d.ts +16 -0
- package/dist/chat-ui/messages/message-images.js +66 -0
- package/dist/chat-ui/messages/message-images.js.map +1 -0
- package/dist/chat-ui/messages/user-edit-composer.cjs +2 -2
- package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
- package/dist/chat-ui/messages/wake-marker.cjs +3 -3
- package/dist/chat-ui/messages/wake-marker.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-link.cjs +7 -6
- package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-link.d.ts +2 -3
- package/dist/chat-ui/rich-text/chat-link.js +6 -5
- package/dist/chat-ui/rich-text/chat-link.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-message-body.cjs +8 -8
- package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-node-views.cjs +7 -6
- package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-node-views.js +1 -0
- package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -1
- package/dist/chat-ui/rich-text/dom-output-spec.cjs +2 -2
- package/dist/chat-ui/rich-text/dom-output-spec.cjs.map +1 -1
- package/dist/chat-ui/statewire.cjs +3 -0
- package/dist/chat-ui/statewire.cjs.map +1 -1
- package/dist/chat-ui/statewire.d.ts +2 -1
- package/dist/chat-ui/statewire.js +3 -0
- package/dist/chat-ui/statewire.js.map +1 -1
- package/dist/chat-ui/thread/chat-thread-shell.cjs +43 -14
- package/dist/chat-ui/thread/chat-thread-shell.cjs.map +1 -1
- package/dist/chat-ui/thread/chat-thread-shell.d.ts +16 -2
- package/dist/chat-ui/thread/chat-thread-shell.js +35 -6
- package/dist/chat-ui/thread/chat-thread-shell.js.map +1 -1
- package/dist/chat-ui/thread/composer-send-or-stop.cjs +30 -20
- package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -1
- package/dist/chat-ui/thread/composer-send-or-stop.d.ts +8 -0
- package/dist/chat-ui/thread/composer-send-or-stop.js +29 -19
- package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.cjs +20 -21
- package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.js +3 -4
- package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
- package/dist/chat-ui/thread/thread-loading-overlay.cjs +5 -5
- package/dist/chat-ui/thread/thread-loading-overlay.cjs.map +1 -1
- package/dist/collab/client.cjs +40 -3
- package/dist/collab/client.cjs.map +1 -1
- package/dist/collab/client.d.ts +25 -0
- package/dist/collab/client.js +40 -3
- package/dist/collab/client.js.map +1 -1
- package/dist/collab/document-status.cjs +150 -0
- package/dist/collab/document-status.cjs.map +1 -0
- package/dist/collab/document-status.d.ts +68 -0
- package/dist/collab/document-status.js +150 -0
- package/dist/collab/document-status.js.map +1 -0
- package/dist/collab/index.cjs +7 -0
- package/dist/collab/index.cjs.map +1 -1
- package/dist/collab/index.d.ts +6 -1
- package/dist/collab/index.js +7 -0
- package/dist/collab/index.js.map +1 -1
- package/dist/collab/presence-react.cjs +11 -11
- package/dist/collab/presence-react.cjs.map +1 -1
- package/dist/collab/react.cjs +6 -6
- package/dist/collab/react.cjs.map +1 -1
- package/dist/composer/AttachmentContext.cjs +24 -11
- package/dist/composer/AttachmentContext.cjs.map +1 -1
- package/dist/composer/AttachmentContext.js +18 -5
- package/dist/composer/AttachmentContext.js.map +1 -1
- package/dist/composer/ComposerAttachmentPreview.cjs +78 -23
- package/dist/composer/ComposerAttachmentPreview.cjs.map +1 -1
- package/dist/composer/ComposerAttachmentPreview.d.ts +5 -3
- package/dist/composer/ComposerAttachmentPreview.js +79 -24
- package/dist/composer/ComposerAttachmentPreview.js.map +1 -1
- package/dist/composer/ComposerDropZone.cjs +7 -7
- package/dist/composer/ComposerDropZone.cjs.map +1 -1
- package/dist/composer/FileUploadButton.cjs +37 -22
- package/dist/composer/FileUploadButton.cjs.map +1 -1
- package/dist/composer/FileUploadButton.d.ts +6 -0
- package/dist/composer/FileUploadButton.js +34 -19
- package/dist/composer/FileUploadButton.js.map +1 -1
- package/dist/composer/QuoteContext.cjs +8 -8
- package/dist/composer/QuoteContext.cjs.map +1 -1
- package/dist/composer/composer-handoff.cjs +4 -4
- package/dist/composer/composer-handoff.cjs.map +1 -1
- package/dist/composer/useAppendToComposer.cjs +4 -4
- package/dist/composer/useAppendToComposer.cjs.map +1 -1
- package/dist/composer/useAttachFiles.cjs +23 -6
- package/dist/composer/useAttachFiles.cjs.map +1 -1
- package/dist/composer/useAttachFiles.d.ts +15 -7
- package/dist/composer/useAttachFiles.js +22 -5
- package/dist/composer/useAttachFiles.js.map +1 -1
- package/dist/composer/useComposerAttachment.cjs +4 -4
- package/dist/composer/useComposerAttachment.cjs.map +1 -1
- package/dist/composer/useFileUpload.cjs +21 -16
- package/dist/composer/useFileUpload.cjs.map +1 -1
- package/dist/composer/useFileUpload.d.ts +12 -0
- package/dist/composer/useFileUpload.js +12 -7
- package/dist/composer/useFileUpload.js.map +1 -1
- package/dist/composer/useReadComposerDraft.cjs +2 -2
- package/dist/composer/useReadComposerDraft.cjs.map +1 -1
- package/dist/composer/useSendMessage.cjs +4 -4
- package/dist/composer/useSendMessage.cjs.map +1 -1
- package/dist/diagnostics/useAthenaDiagnostics.cjs +4 -4
- package/dist/diagnostics/useAthenaDiagnostics.cjs.map +1 -1
- package/dist/dictation/audio-level-history.cjs +3 -3
- package/dist/dictation/audio-level-history.cjs.map +1 -1
- package/dist/dictation/dictation-controls.cjs +24 -20
- package/dist/dictation/dictation-controls.cjs.map +1 -1
- package/dist/dictation/dictation-controls.d.ts +6 -1
- package/dist/dictation/dictation-controls.js +24 -20
- package/dist/dictation/dictation-controls.js.map +1 -1
- package/dist/dictation/use-athena-dictation-engine.cjs +3 -3
- package/dist/dictation/use-athena-dictation-engine.cjs.map +1 -1
- package/dist/dictation/use-dictation.cjs +22 -22
- package/dist/dictation/use-dictation.cjs.map +1 -1
- package/dist/index.cjs +26 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -3
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/keryx-http/src/receive-only-socket.cjs +40 -0
- package/dist/keryx-http/src/receive-only-socket.cjs.map +1 -0
- package/dist/keryx-http/src/receive-only-socket.d.ts +27 -0
- package/dist/keryx-http/src/receive-only-socket.js +40 -0
- package/dist/keryx-http/src/receive-only-socket.js.map +1 -0
- package/dist/keryx-http/src/update-attributions.cjs +111 -0
- package/dist/keryx-http/src/update-attributions.cjs.map +1 -0
- package/dist/keryx-http/src/update-attributions.d.ts +75 -0
- package/dist/keryx-http/src/update-attributions.js +111 -0
- package/dist/keryx-http/src/update-attributions.js.map +1 -0
- package/dist/lib/owner-document.cjs +6 -6
- package/dist/lib/owner-document.cjs.map +1 -1
- package/dist/lib/use-athena-rest-query.cjs +4 -4
- package/dist/lib/use-athena-rest-query.cjs.map +1 -1
- package/dist/lib/use-document-active.cjs +4 -4
- package/dist/lib/use-document-active.cjs.map +1 -1
- package/dist/lib/use-prefers-reduced-motion.cjs +2 -2
- package/dist/lib/use-prefers-reduced-motion.cjs.map +1 -1
- package/dist/offline/offline-history.cjs +7 -7
- package/dist/offline/offline-history.cjs.map +1 -1
- package/dist/provider/AthenaContext.cjs +3 -3
- package/dist/provider/AthenaContext.cjs.map +1 -1
- package/dist/provider/AthenaProvider.cjs +116 -79
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.js +40 -3
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/provider/PostHogProvider.cjs +2 -2
- package/dist/provider/PostHogProvider.cjs.map +1 -1
- package/dist/provider/agent-selection-context.cjs +2 -2
- package/dist/provider/agent-selection-context.cjs.map +1 -1
- package/dist/provider/chat-mode-context.cjs +2 -2
- package/dist/provider/chat-mode-context.cjs.map +1 -1
- package/dist/provider/session-persistence-context.cjs +10 -0
- package/dist/provider/session-persistence-context.cjs.map +1 -0
- package/dist/provider/session-persistence-context.d.ts +15 -0
- package/dist/provider/session-persistence-context.js +10 -0
- package/dist/provider/session-persistence-context.js.map +1 -0
- package/dist/provider/statewire-history-context.cjs +4 -4
- package/dist/provider/statewire-history-context.cjs.map +1 -1
- package/dist/provider/statewire-lifecycle-context.cjs +3 -3
- package/dist/provider/statewire-lifecycle-context.cjs.map +1 -1
- package/dist/provider/statewire-window-context.cjs +3 -3
- package/dist/provider/statewire-window-context.cjs.map +1 -1
- package/dist/provider/theme-style-context.cjs +3 -3
- package/dist/provider/theme-style-context.cjs.map +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/references/src/tool-option-schemas.d.ts +0 -34
- package/dist/runtime/StatewireThreadConfigLaneSync.cjs +10 -10
- package/dist/runtime/StatewireThreadConfigLaneSync.cjs.map +1 -1
- package/dist/runtime/auth-refusal-restart.cjs +7 -7
- package/dist/runtime/auth-refusal-restart.cjs.map +1 -1
- package/dist/runtime/auth.cjs +13 -13
- package/dist/runtime/auth.cjs.map +1 -1
- package/dist/runtime/statewire-lifecycle.cjs +1 -0
- package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
- package/dist/runtime/statewire-lifecycle.d.ts +3 -1
- package/dist/runtime/statewire-lifecycle.js +2 -1
- package/dist/runtime/statewire-lifecycle.js.map +1 -1
- package/dist/runtime/statewire-server-lane-context.cjs +2 -2
- package/dist/runtime/statewire-server-lane-context.cjs.map +1 -1
- package/dist/runtime/statewire-session-lane.cjs +4 -4
- package/dist/runtime/statewire-session-lane.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.cjs +10 -8
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +2 -0
- package/dist/runtime/useAthenaStatewireRuntime.js +2 -0
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/threads/Inbox.cjs +8 -8
- package/dist/threads/Inbox.cjs.map +1 -1
- package/dist/threads/SessionList.cjs +9 -9
- package/dist/threads/SessionList.cjs.map +1 -1
- package/dist/threads/SessionsPage.cjs +11 -11
- package/dist/threads/SessionsPage.cjs.map +1 -1
- package/dist/threads/index-triggered-refresh.cjs +10 -10
- package/dist/threads/index-triggered-refresh.cjs.map +1 -1
- package/dist/threads/mark-viewed-thread-read.cjs +12 -12
- package/dist/threads/mark-viewed-thread-read.cjs.map +1 -1
- package/dist/threads/offline-session-list.cjs +3 -3
- package/dist/threads/offline-session-list.cjs.map +1 -1
- package/dist/threads/session-list-tab-share.cjs +5 -5
- package/dist/threads/session-list-tab-share.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.cjs +55 -51
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.js +6 -2
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/threads/thread-id-context.cjs +5 -5
- package/dist/threads/thread-id-context.cjs.map +1 -1
- package/dist/threads/use-athena-session-attention.cjs +2 -2
- package/dist/threads/use-athena-session-attention.cjs.map +1 -1
- package/dist/threads/use-athena-sessions.cjs +10 -10
- package/dist/threads/use-athena-sessions.cjs.map +1 -1
- package/dist/threads/use-athena-thread-model.cjs +3 -3
- package/dist/threads/use-athena-thread-model.cjs.map +1 -1
- package/dist/threads/use-rest-conversation-history.cjs +3 -3
- package/dist/threads/use-rest-conversation-history.cjs.map +1 -1
- package/dist/threads/use-statewire-conversation-history.cjs +8 -8
- package/dist/threads/use-statewire-conversation-history.cjs.map +1 -1
- package/dist/threads/use-thread-archive.cjs +9 -9
- package/dist/threads/use-thread-archive.cjs.map +1 -1
- package/dist/threads/use-thread-favorite.cjs +2 -2
- package/dist/threads/use-thread-favorite.cjs.map +1 -1
- package/dist/threads/use-thread-field-override.cjs +20 -20
- package/dist/threads/use-thread-field-override.cjs.map +1 -1
- package/dist/threads/use-thread-read-state.cjs +4 -4
- package/dist/threads/use-thread-read-state.cjs.map +1 -1
- package/dist/threads/use-thread-rename.cjs +2 -2
- package/dist/threads/use-thread-rename.cjs.map +1 -1
- package/dist/threads/useAthenaThreadManager.cjs +2 -2
- package/dist/threads/useAthenaThreadManager.cjs.map +1 -1
- package/dist/tools/NestedPtcMessages.cjs +6 -6
- package/dist/tools/NestedPtcMessages.cjs.map +1 -1
- package/dist/tools/append-document-tool-ui.cjs +7 -7
- package/dist/tools/append-document-tool-ui.cjs.map +1 -1
- package/dist/tools/file-tool-uis.cjs +2 -2
- package/dist/tools/file-tool-uis.cjs.map +1 -1
- package/dist/tools/misc-tool-uis.cjs +2 -2
- package/dist/tools/misc-tool-uis.cjs.map +1 -1
- package/dist/tools/primitives.cjs +6 -6
- package/dist/tools/primitives.cjs.map +1 -1
- package/dist/tools/read-asset-tool-ui.cjs +6 -6
- package/dist/tools/read-asset-tool-ui.cjs.map +1 -1
- package/dist/tools/subagent-task-tool-ui.cjs +21 -21
- package/dist/tools/subagent-task-tool-ui.cjs.map +1 -1
- package/dist/tools/test-recording-tool-uis.cjs +16 -16
- package/dist/tools/test-recording-tool-uis.cjs.map +1 -1
- package/dist/tools/todo-plan-store.cjs +4 -4
- package/dist/tools/todo-plan-store.cjs.map +1 -1
- package/dist/tools/tool-appearance.cjs +3 -3
- package/dist/tools/tool-appearance.cjs.map +1 -1
- package/dist/tools/tool-fallback.cjs +14 -14
- package/dist/tools/tool-fallback.cjs.map +1 -1
- package/dist/tools/tool-summary.cjs +0 -2
- package/dist/tools/tool-summary.cjs.map +1 -1
- package/dist/tools/tool-summary.js +0 -2
- package/dist/tools/tool-summary.js.map +1 -1
- package/dist/tools/tool-uis.cjs +74 -74
- package/dist/tools/tool-uis.cjs.map +1 -1
- package/dist/tools/use-elapsed-seconds.cjs +3 -3
- package/dist/tools/use-elapsed-seconds.cjs.map +1 -1
- package/dist/tools/write-todos-tool-ui.cjs +9 -9
- package/dist/tools/write-todos-tool-ui.cjs.map +1 -1
- package/dist/ui/image-viewer.cjs +382 -0
- package/dist/ui/image-viewer.cjs.map +1 -0
- package/dist/ui/image-viewer.d.ts +50 -0
- package/dist/ui/image-viewer.js +382 -0
- package/dist/ui/image-viewer.js.map +1 -0
- package/dist/voice/chat.cjs +6 -0
- package/dist/voice/chat.cjs.map +1 -1
- package/dist/voice/chat.d.ts +1 -1
- package/dist/voice/chat.js +8 -2
- package/dist/voice/livekit-join.cjs +52 -101
- package/dist/voice/livekit-join.cjs.map +1 -1
- package/dist/voice/livekit-join.d.ts +1 -6
- package/dist/voice/livekit-join.js +52 -101
- package/dist/voice/livekit-join.js.map +1 -1
- package/dist/voice/livekit.cjs.map +1 -1
- package/dist/voice/livekit.d.ts +11 -1
- package/dist/voice/livekit.js.map +1 -1
- package/dist/voice/use-athena-voice-session.cjs +34 -34
- package/dist/voice/use-athena-voice-session.cjs.map +1 -1
- package/dist/workbench/ComputerLiveDesktop.cjs +13 -13
- package/dist/workbench/ComputerLiveDesktop.cjs.map +1 -1
- package/dist/workbench/SessionWorkbench.cjs +22 -22
- package/dist/workbench/SessionWorkbench.cjs.map +1 -1
- package/dist/workbench/session-workbench-context.cjs +3 -3
- package/dist/workbench/session-workbench-context.cjs.map +1 -1
- package/dist/workbench/session-workbench-panes.cjs +8 -8
- package/dist/workbench/session-workbench-panes.cjs.map +1 -1
- package/dist/workbench/workbench-layout-context.cjs +3 -3
- package/dist/workbench/workbench-layout-context.cjs.map +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runconfig-contract.js","sources":["../../../../../agent-runtime/src/generated/runconfig-contract.ts"],"sourcesContent":["// GENERATED FILE — DO NOT EDIT BY HAND.\n//\n// Source of truth (agora):\n// agora/agora/graphs/athena_deep_agent/run_config.py (_PARSED_CUSTOM_KEYS / _COMPANION_CUSTOM_KEYS / PER_SEND_CUSTOM_KEYS)\n// agora/agora/graphs/athena_deep_agent/thread_config.py (server config lane + config/* command names)\n// agora/agora/graphs/athena_deep_agent/session_asset.py (KNOWN_START_CHANNELS / DEEP_AGENT_RUNTIME_MARKER)\n// agora/agora/graphs/athena_deep_agent/client_tools.py (client-tool interrupt + result-envelope literals)\n// agora/agora/graphs/athena_deep_agent/protocol_version.py (wire-contract version negotiation)\n// agora/agora/graphs/athena_deep_agent/message_window.py (interest windows + history commands)\n// agora/agora/type_definitions/collab_agent.py (CAPABILITIES ladder: absent mode + new-agent default)\n//\n// Regenerate:\n// cd agora && mise exec -- infisical run --command 'uv run python scripts/export_runconfig_contract.py'\n//\n// CI verifies this file matches the Python source (agora-check runs the\n// exporter with --check), so hand edits and un-regenerated key changes fail.\n\n/** `runConfig.custom` keys parsed by agora's `parse_deep_agent_run_config`. */\nexport const RUN_CONFIG_PARSED_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"compiled_subagents\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"tool_description_overrides\",\n \"voice_update_handle\",\n \"workbench\",\n] as const;\n\n/** `runConfig.custom` keys consumed by the surrounding deep-agent request machinery rather than the capability parser. */\nexport const RUN_CONFIG_COMPANION_CUSTOM_KEYS = [\n \"agent\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"client_tools\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"custom_tool_configs\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"enabled_toolkits\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"max_tokens\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"panel_config\",\n \"posthog_session_id\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"temperature\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"workspace_id\",\n] as const;\n\n/** Every `runConfig.custom` key some deep-agent request consumer reads. A key outside this set is invisible to the run and trips agora's unknown-key telemetry. */\nexport const RUN_CONFIG_CUSTOM_KEYS = [\n \"agent\",\n \"agent_catalog_asset_ids\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"channel\",\n \"client_tools\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"drive_mounts\",\n \"dry_run\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"entry_point\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"outbound_approval_allowlist\",\n \"panel_config\",\n \"permissions\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_budget\",\n \"run_label\",\n \"runtime\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_id\",\n \"session_machine\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workbench\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigCustomKey = (typeof RUN_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_CUSTOM_KEYS,\n);\n\n/** `runConfig.custom` keys a client still carries per send on a thread with server config; every other key is dropped at dispatch. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEYS = [\n \"agent\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"client_tools\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigPerSendCustomKey =\n (typeof RUN_CONFIG_PER_SEND_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_PER_SEND_CUSTOM_KEYS,\n);\n\n/** Keys the thread's server config lane owns — changed only through the `config/*` commands, never per send. */\nexport const THREAD_CONFIG_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"workbench\",\n] as const;\n\nexport type ThreadConfigCustomKey = (typeof THREAD_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const THREAD_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n THREAD_CONFIG_CUSTOM_KEYS,\n);\n\n/** Replicated-state key of the server config lane (`{ version, custom }`). */\nexport const DEEP_AGENT_CONFIG_STATE_KEY = \"config\";\n\n/** The statewire commands that mutate the server config lane. */\nexport const DEEP_AGENT_CONFIG_COMMANDS = {\n patch: \"config/patch\",\n toolsEnable: \"config/tools/enable\",\n toolsDisable: \"config/tools/disable\",\n} as const;\n\n/** `start_channel` values the session substrate stamps as provenance; anything else clamps to \"web\". */\nexport const KNOWN_START_CHANNELS = [\n \"agent_orchestration\",\n \"api\",\n \"automation\",\n \"chrome_extension\",\n \"cli\",\n \"comment_agent\",\n \"default_voice\",\n \"desktop_app\",\n \"email\",\n \"mobile_app\",\n \"office_addin\",\n \"orchestration\",\n \"programmatic\",\n \"slack\",\n \"sms\",\n \"task\",\n \"teams\",\n \"voice\",\n \"voice_memo\",\n \"web\",\n] as const;\n\nexport type KnownStartChannel = (typeof KNOWN_START_CHANNELS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const KNOWN_START_CHANNEL_SET: ReadonlySet<string> = new Set(\n KNOWN_START_CHANNELS,\n);\n\n/** `runConfig.custom.runtime` marker selecting the deep-agent runtime. */\nexport const DEEP_AGENT_RUNTIME_MARKER = \"athena_deep_agent\";\n\n/**\n * Collab-agent capability ladder (agent schema v3): per explicit\n * capability field, what an ABSENT value means and the value stamped on\n * a new agent. Resolved by agora's `capability_decoder` and the one agent\n * compiler on every run: `passthrough` — explicit only, absent means off;\n * `off` — absent means off under every `runtime` marker; `runtime` —\n * absent derives from the `runtime` marker (`athena_deep_agent` on, any\n * other or missing marker off).\n */\nexport const COLLAB_AGENT_CAPABILITIES = {\n deepAgentBuiltinsEnabled: { absent: \"runtime\", default: true },\n interpreterEnabled: { absent: \"off\", default: false },\n sandboxEnabled: { absent: \"passthrough\", default: false },\n skillsEnabled: { absent: \"runtime\", default: true },\n} as const;\n\nexport type CollabAgentCapabilityField = keyof typeof COLLAB_AGENT_CAPABILITIES;\n\nexport type CollabAgentCapabilityAbsentMode =\n (typeof COLLAB_AGENT_CAPABILITIES)[CollabAgentCapabilityField][\"absent\"];\n\n/** `source`/`type` stamped on client-tool interrupt payloads by agora. */\nexport const CLIENT_TOOL_INTERRUPT_SOURCE = \"client_tool\";\n\n/** `status` literals of the result envelope a client resumes a parked client-tool call with. */\nexport const CLIENT_TOOL_RESULT_STATUSES = [\"error\", \"success\"] as const;\n\nexport type ClientToolResultStatus =\n (typeof CLIENT_TOOL_RESULT_STATUSES)[number];\n\nexport const CLIENT_TOOL_RESULT_STATUS_SUCCESS = \"success\";\n\nexport const CLIENT_TOOL_RESULT_STATUS_ERROR = \"error\";\n\n/**\n * Result envelope a client resumes a parked client-tool call with,\n * keyed by interrupt id:\n * `{ client_tool_results: { <interrupt_id>: <envelope> } }`.\n * Agora relays the envelope to the model verbatim.\n */\nexport type ClientToolResultEnvelopeContract =\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_SUCCESS; result: unknown }\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_ERROR; error: string };\n\n/**\n * The deep-agent wire-contract version this client build speaks,\n * declared on every attach. The host records it for attach telemetry\n * and per-version behaviour; it has no minimum client version, so no\n * build is refused for the version it declares (the `protocol` state\n * lane's `minClientVersion` is the constant 1).\n */\nexport const DEEP_AGENT_PROTOCOL_VERSION = 2;\n\n/**\n * The first contract version whose host a client states `follow` to (a\n * subagent lane's steps, each its own document): a client follows a\n * lane only on a host whose `protocol` lane advertises at least this\n * version. A host that predates `follow` refuses it with\n * `invalid-interest`.\n */\nexport const DEEP_AGENT_LANE_FOLLOW_PROTOCOL_VERSION = 2;\n\n/** Attach header carrying the client's declared contract version. */\nexport const DEEP_AGENT_PROTOCOL_VERSION_HEADER =\n \"x-athena-deep-agent-protocol-version\";\n\n/** Attach header declaring the head window a fresh client wants in its hello (host-clamped). */\nexport const DEEP_AGENT_MESSAGE_WINDOW_HEADER = \"x-athena-deep-agent-window\";\n\n/** Replicated-state key of the server-advertised version lane. */\nexport const DEEP_AGENT_PROTOCOL_STATE_KEY = \"protocol\";\n\n/** Ephemeral subprotocol carrying a client's message-window interests. */\nexport const DEEP_AGENT_INTEREST_PROTOCOL = \"athena/interest\";\n\n/** Ephemeral subprotocol carrying a client's synced context document. */\nexport const DEEP_AGENT_CONTEXT_PROTOCOL = \"athena/context\";\n\n/** The only interest namespace the host resolves (the linear transcript). */\nexport const DEEP_AGENT_MAIN_NS = \"main\";\n\n/** Window size (interest `before`) a client asks for by default. */\nexport const DEEP_AGENT_DEFAULT_MESSAGE_WINDOW = 40;\n\n/** Bounds on a window size. */\nexport const DEEP_AGENT_MIN_MESSAGE_WINDOW = 8;\n\nexport const DEEP_AGENT_MAX_MESSAGE_WINDOW = 200;\n\n/** Interests one attach may hold at once (the head plus its pages). */\nexport const DEEP_AGENT_MAX_INTERESTS = 16;\n\n/** Command returning a truncated tool output whole. */\nexport const DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND = \"history/tool_output\";\n\n/** Command returning one stored message whole (provenance and full tool output included). */\nexport const DEEP_AGENT_HISTORY_MESSAGE_COMMAND = \"history/message\";\n\n/** Wire key marking a tool message whose content was truncated. */\nexport const DEEP_AGENT_TRUNCATED_CONTENT_KEY = \"athena_content_truncated\";\n\n/**\n * Wire key on a running `task` card whose nested transcript rides cut to its\n * newest steps: `{ messages, tool_calls }` over the whole stored transcript.\n */\nexport const DEEP_AGENT_TRUNCATED_LANE_KEY = \"athena_lane_truncated\";\n\n/**\n * Wire key on a `task` card, and on an in-eval lane's `ptc_subagents` entry,\n * carrying the whole lane's token use however much of the lane the wire\n * carries: `{ input_tokens, output_tokens, cache_read_input_tokens,\n * cache_creation_input_tokens }`, the input counting its cache reads and\n * writes. Absent while the lane's steps report no usage.\n */\nexport const DEEP_AGENT_LANE_USAGE_KEY = \"athena_lane_usage\";\n\n/**\n * The newest nested messages a cut card carries whole; the entries ahead\n * of them are the older assistant turns that requested results among\n * them, cut to those calls.\n */\nexport const DEEP_AGENT_RUNNING_LANE_WIRE_MESSAGES = 8;\n\n/**\n * Key of a followed lane's window (`follows[ns]` on a resolution whose\n * request added `follow: {before}`) naming the `task` call whose card\n * holds the lane.\n */\nexport const DEEP_AGENT_FOLLOW_TOOL_CALL_ID_KEY = \"toolCallId\";\n\n/** The most lane steps one attach follows, across every lane. */\nexport const DEEP_AGENT_MAX_FOLLOWED_STEPS = 200;\n\n/**\n * The first contract version a client declares to see a finished card cut\n * like a running one (and to follow lanes and page them through\n * `history/lane`). Below it, or declaring nothing, finished cards ride whole.\n */\nexport const DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION = 2;\n\n/**\n * Last element of the key a cut finished card's document rides under:\n * `[threadId, \"main\", messageId, \"cut\"]`. A view holds that key or the\n * card's own, never both.\n */\nexport const DEEP_AGENT_CUT_LANE_DOCUMENT = \"cut\";\n\n/**\n * Command returning one page of a card's nested transcript, oldest first:\n * `{ messageId, before, at? }` answers\n * `{ messageId, toolCallId, ns, steps, more: { before }, total }`; the page\n * holds the newest `before` entries, or those strictly older than `at`.\n */\nexport const DEEP_AGENT_HISTORY_LANE_COMMAND = \"history/lane\";\n\n/** The most entries one `history/lane` page asks for. */\nexport const DEEP_AGENT_MAX_LANE_PAGE = 200;\n\n/** The most encoded characters one `history/lane` page carries (at least one entry). */\nexport const DEEP_AGENT_HISTORY_LANE_PAGE_CHARS = 1048576;\n\n/**\n * Set on the last step of a cut finished card whose text is the card's own\n * `content` (the subagent's report): the step rides with empty content, and\n * the card's `content` is its text.\n */\nexport const DEEP_AGENT_REPEATS_RESULT_KEY = \"athena_content_repeats_result\";\n\n/** Most inline-image payload characters one message carries whole on the wire. */\nexport const DEEP_AGENT_INLINE_IMAGE_WIRE_BUDGET = 4194304;\n\n/** Wire key on an image block left off the wire: `{ index, chars, mediaType }`. */\nexport const DEEP_AGENT_OMITTED_IMAGE_KEY = \"athena_image_omitted\";\n\n/** The image an omitted block carries instead of its own (a neutral PNG tile). */\nexport const DEEP_AGENT_OMITTED_IMAGE_PLACEHOLDER_URL =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4AQMAAABPbGssAAAABlBMVEXi6PCUo7jao11HAAAA6ElEQVR42u2UyW3DMBBF3wxogEd2EJbCElKQDRCwC3MpSRc5eLuYokgNLEUxctK/CHyanQts2vRO3QdlALVsXsBvecqxxr1ob0A5GlDJU+hICxN54p/qXAx/+FpoeeE8hTerzfvByn7ifzpaBtWCOwv6bMVMBgzRgNGKmUL9McDs4XOSyEHuoKCI76AiqOugg+y0gx6SN+YQg3QwALGk19pQSKV/reOocyoww27oU5sxhAbKUNgIqrVxrvnovJ80MFgxYy23wtTss44tmL+bAuOE2p2o0fJa3iW/6iR/lEfx8kv3TZtW6AFk5Sf3k+GTswAAAABJRU5ErkJggg==\";\n\n/**\n * Command returning one inline image of a stored message in chunks:\n * `{ messageId, index, offset? }` answers\n * `{ messageId, index, mediaType, offset, total, chunk, next }`; the\n * chunks joined in order are the image's `data:` URL, and `next` is\n * the offset to ask for next (`null` after the last chunk).\n */\nexport const DEEP_AGENT_HISTORY_IMAGE_COMMAND = \"history/image\";\n\n/**\n * Command returning one inline image of a lane step in chunks, as\n * `history/image` does a stored message's: `{ messageId | lane, step,\n * index, offset? }` answers `{ messageId, lane, step, index, mediaType,\n * offset, total, chunk, next }`, with `messageId` null for an in-eval\n * lane and `lane` null for a card.\n */\nexport const DEEP_AGENT_HISTORY_LANE_IMAGE_COMMAND = \"history/lane_image\";\n"],"names":[],"mappings":"AAoHO,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK8D,IAAI;AAAA,EAChE;AACF;AAGO,MAAM,kCAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAMuE,IAAI;AAAA,EACzE;AACF;AAGO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKiE,IAAI;AAAA,EACnE;AACF;AAMO,MAAM,6BAA6B;AAAA,EACxC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAChB;AAGO,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK4D,IAAI;AAAA,EAC9D;AACF;AA2BO,MAAM,+BAA+B;AAQrC,MAAM,oCAAoC;AAE1C,MAAM,kCAAkC;AA+BxC,MAAM,qCACX;AAGK,MAAM,mCAAmC;AAGzC,MAAM,gCAAgC;AAGtC,MAAM,+BAA+B;AAMrC,MAAM,qBAAqB;AAG3B,MAAM,oCAAoC;AAG1C,MAAM,gCAAgC;AAEtC,MAAM,gCAAgC;AAGtC,MAAM,2BAA2B;AAGjC,MAAM,yCAAyC;AAG/C,MAAM,qCAAqC;AAG3C,MAAM,mCAAmC;AAMzC,MAAM,gCAAgC;AAStC,MAAM,4BAA4B;AAwBlC,MAAM,uCAAuC;AAO7C,MAAM,+BAA+B;AAQrC,MAAM,kCAAkC;AAGxC,MAAM,2BAA2B;AAUjC,MAAM,gCAAgC;"}
|
|
1
|
+
{"version":3,"file":"runconfig-contract.js","sources":["../../../../../agent-runtime/src/generated/runconfig-contract.ts"],"sourcesContent":["// GENERATED FILE — DO NOT EDIT BY HAND.\n//\n// Source of truth (agora):\n// agora/agora/graphs/athena_deep_agent/run_config.py (_PARSED_CUSTOM_KEYS / _COMPANION_CUSTOM_KEYS / PER_SEND_CUSTOM_KEYS)\n// agora/agora/graphs/athena_deep_agent/thread_config.py (server config lane + config/* command names)\n// agora/agora/graphs/athena_deep_agent/session_asset.py (KNOWN_START_CHANNELS / DEEP_AGENT_RUNTIME_MARKER)\n// agora/agora/graphs/athena_deep_agent/client_tools.py (client-tool interrupt + result-envelope literals)\n// agora/agora/graphs/athena_deep_agent/protocol_version.py (wire-contract version negotiation)\n// agora/agora/graphs/athena_deep_agent/message_window.py (interest windows + history commands)\n// agora/agora/type_definitions/collab_agent.py (CAPABILITIES ladder: absent mode + new-agent default)\n//\n// Regenerate:\n// cd agora && mise exec -- infisical run --command 'uv run python scripts/export_runconfig_contract.py'\n//\n// CI verifies this file matches the Python source (agora-check runs the\n// exporter with --check), so hand edits and un-regenerated key changes fail.\n\n/** `runConfig.custom` keys parsed by agora's `parse_deep_agent_run_config`. */\nexport const RUN_CONFIG_PARSED_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"channel_reply_turn\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"compiled_subagents\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"pre_approved_tools\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"tool_description_overrides\",\n \"voice_update_handle\",\n \"workbench\",\n] as const;\n\n/** `runConfig.custom` keys consumed by the surrounding deep-agent request machinery rather than the capability parser. */\nexport const RUN_CONFIG_COMPANION_CUSTOM_KEYS = [\n \"addressed_agents\",\n \"agent\",\n \"agent_available_toolkits\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"channel_router\",\n \"client_tools\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"custom_tool_configs\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"enabled_toolkits\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"max_tokens\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"panel_config\",\n \"posthog_session_id\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"temperature\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"workspace_id\",\n] as const;\n\n/** Every `runConfig.custom` key some deep-agent request consumer reads. A key outside this set is invisible to the run and trips agora's unknown-key telemetry. */\nexport const RUN_CONFIG_CUSTOM_KEYS = [\n \"addressed_agents\",\n \"agent\",\n \"agent_available_toolkits\",\n \"agent_catalog_asset_ids\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"channel\",\n \"channel_reply_turn\",\n \"channel_router\",\n \"client_tools\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"drive_mounts\",\n \"dry_run\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"entry_point\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"outbound_approval_allowlist\",\n \"panel_config\",\n \"permissions\",\n \"posthog_session_id\",\n \"pre_approved_tools\",\n \"project_id\",\n \"read_only\",\n \"recursion_limit\",\n \"run_budget\",\n \"run_label\",\n \"runtime\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_id\",\n \"session_machine\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workbench\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigCustomKey = (typeof RUN_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_CUSTOM_KEYS,\n);\n\n/** `runConfig.custom` keys a client still carries per send on a thread with server config; every other key is dropped at dispatch. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEYS = [\n \"addressed_agents\",\n \"agent\",\n \"agent_available_toolkits\",\n \"allowed_tab_ids\",\n \"app_id\",\n \"channel\",\n \"channel_reply_turn\",\n \"channel_router\",\n \"client_tools\",\n \"collab_channel_id\",\n \"collab_entry_channel_id\",\n \"deterministic\",\n \"device_id\",\n \"device_toolkits\",\n \"dry_run\",\n \"entry_point\",\n \"from_stored_config\",\n \"frontend_available\",\n \"generative_frame_inline\",\n \"github_identity\",\n \"muses_enabled\",\n \"muses_recall_enabled\",\n \"office_context\",\n \"posthog_session_id\",\n \"project_id\",\n \"read_only\",\n \"run_budget\",\n \"runtime\",\n \"session_id\",\n \"session_origin_kind\",\n \"session_tab_id\",\n \"skip_title_generation\",\n \"source_aop_id\",\n \"start_channel\",\n \"structured_output\",\n \"tool_limit_override\",\n \"trigger_type\",\n \"voice_update_handle\",\n \"workspace_id\",\n] as const;\n\nexport type RunConfigPerSendCustomKey =\n (typeof RUN_CONFIG_PER_SEND_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const RUN_CONFIG_PER_SEND_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n RUN_CONFIG_PER_SEND_CUSTOM_KEYS,\n);\n\n/** Keys the thread's server config lane owns — changed only through the `config/*` commands, never per send. */\nexport const THREAD_CONFIG_CUSTOM_KEYS = [\n \"agent_catalog_asset_ids\",\n \"approve_changes\",\n \"catalog_asset_ids\",\n \"coding_worker_asset_id\",\n \"coding_workers\",\n \"collab_agent_id\",\n \"compiled_subagents\",\n \"custom_tool_configs\",\n \"declined_toolkit_ids\",\n \"drive_mounts\",\n \"enable_interpreter\",\n \"enable_persistent_fs\",\n \"enable_sandbox\",\n \"enable_skills\",\n \"enabled_toolkits\",\n \"enabled_tools\",\n \"environment\",\n \"environment_id\",\n \"environment_name\",\n \"excluded_middleware\",\n \"excluded_tools\",\n \"extra_middleware\",\n \"include_citation_instructions\",\n \"interpreter_max_ptc_calls\",\n \"interpreter_mode\",\n \"interpreter_ptc\",\n \"interpreter_ptc_exclusive\",\n \"interpreter_runtime\",\n \"interpreter_subagents\",\n \"interpreter_timeout_seconds\",\n \"interrupt_on\",\n \"knowledge_base\",\n \"max_tokens\",\n \"mcp_server_configs\",\n \"mcp_servers\",\n \"memory\",\n \"middleware\",\n \"model\",\n \"outbound_approval_allowlist\",\n \"permissions\",\n \"pre_approved_tools\",\n \"recursion_limit\",\n \"run_label\",\n \"sandbox_runtime\",\n \"secret_asset_ids\",\n \"session_computer\",\n \"session_machine\",\n \"session_vm_retention\",\n \"skill_asset_ids\",\n \"skills\",\n \"subagents\",\n \"system_prompt\",\n \"temperature\",\n \"tool_description_overrides\",\n \"workbench\",\n] as const;\n\nexport type ThreadConfigCustomKey = (typeof THREAD_CONFIG_CUSTOM_KEYS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const THREAD_CONFIG_CUSTOM_KEY_SET: ReadonlySet<string> = new Set(\n THREAD_CONFIG_CUSTOM_KEYS,\n);\n\n/** Replicated-state key of the server config lane (`{ version, custom }`). */\nexport const DEEP_AGENT_CONFIG_STATE_KEY = \"config\";\n\n/** The statewire commands that mutate the server config lane. */\nexport const DEEP_AGENT_CONFIG_COMMANDS = {\n patch: \"config/patch\",\n toolsEnable: \"config/tools/enable\",\n toolsDisable: \"config/tools/disable\",\n} as const;\n\n/** `start_channel` values the session substrate stamps as provenance; anything else clamps to \"web\". */\nexport const KNOWN_START_CHANNELS = [\n \"agent_orchestration\",\n \"api\",\n \"automation\",\n \"chrome_extension\",\n \"cli\",\n \"comment_agent\",\n \"default_voice\",\n \"desktop_app\",\n \"email\",\n \"meetings\",\n \"mobile_app\",\n \"mobile_app_voice\",\n \"office_addin\",\n \"orchestration\",\n \"programmatic\",\n \"slack\",\n \"sms\",\n \"task\",\n \"teams\",\n \"voice\",\n \"voice_memo\",\n \"web\",\n] as const;\n\nexport type KnownStartChannel = (typeof KNOWN_START_CHANNELS)[number];\n\n/** Fast membership checks for builder/test assertions. */\nexport const KNOWN_START_CHANNEL_SET: ReadonlySet<string> = new Set(\n KNOWN_START_CHANNELS,\n);\n\n/** `runConfig.custom.runtime` marker selecting the deep-agent runtime. */\nexport const DEEP_AGENT_RUNTIME_MARKER = \"athena_deep_agent\";\n\n/**\n * Collab-agent capability ladder (agent schema v3): per explicit\n * capability field, what an ABSENT value means and the value stamped on\n * a new agent. Resolved by agora's `capability_decoder` and the one agent\n * compiler on every run: `passthrough` — explicit only, absent means off;\n * `off` — absent means off under every `runtime` marker; `runtime` —\n * absent derives from the `runtime` marker (`athena_deep_agent` on, any\n * other or missing marker off).\n */\nexport const COLLAB_AGENT_CAPABILITIES = {\n deepAgentBuiltinsEnabled: { absent: \"runtime\", default: true },\n interpreterEnabled: { absent: \"off\", default: false },\n sandboxEnabled: { absent: \"passthrough\", default: false },\n skillsEnabled: { absent: \"runtime\", default: true },\n} as const;\n\nexport type CollabAgentCapabilityField = keyof typeof COLLAB_AGENT_CAPABILITIES;\n\nexport type CollabAgentCapabilityAbsentMode =\n (typeof COLLAB_AGENT_CAPABILITIES)[CollabAgentCapabilityField][\"absent\"];\n\n/** `source`/`type` stamped on client-tool interrupt payloads by agora. */\nexport const CLIENT_TOOL_INTERRUPT_SOURCE = \"client_tool\";\n\n/** `status` literals of the result envelope a client resumes a parked client-tool call with. */\nexport const CLIENT_TOOL_RESULT_STATUSES = [\"error\", \"success\"] as const;\n\nexport type ClientToolResultStatus =\n (typeof CLIENT_TOOL_RESULT_STATUSES)[number];\n\nexport const CLIENT_TOOL_RESULT_STATUS_SUCCESS = \"success\";\n\nexport const CLIENT_TOOL_RESULT_STATUS_ERROR = \"error\";\n\n/**\n * Result envelope a client resumes a parked client-tool call with,\n * keyed by interrupt id:\n * `{ client_tool_results: { <interrupt_id>: <envelope> } }`.\n * Agora relays the envelope to the model verbatim.\n */\nexport type ClientToolResultEnvelopeContract =\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_SUCCESS; result: unknown }\n | { status: typeof CLIENT_TOOL_RESULT_STATUS_ERROR; error: string };\n\n/**\n * The deep-agent wire-contract version this client build speaks,\n * declared on every attach. The host records it for attach telemetry\n * and per-version behaviour; it has no minimum client version, so no\n * build is refused for the version it declares (the `protocol` state\n * lane's `minClientVersion` is the constant 1).\n */\nexport const DEEP_AGENT_PROTOCOL_VERSION = 2;\n\n/**\n * The first contract version whose host a client states `follow` to (a\n * subagent lane's steps, each its own document): a client follows a\n * lane only on a host whose `protocol` lane advertises at least this\n * version. A host that predates `follow` refuses it with\n * `invalid-interest`.\n */\nexport const DEEP_AGENT_LANE_FOLLOW_PROTOCOL_VERSION = 2;\n\n/** Attach header carrying the client's declared contract version. */\nexport const DEEP_AGENT_PROTOCOL_VERSION_HEADER =\n \"x-athena-deep-agent-protocol-version\";\n\n/** Attach header declaring the head window a fresh client wants in its hello (host-clamped). */\nexport const DEEP_AGENT_MESSAGE_WINDOW_HEADER = \"x-athena-deep-agent-window\";\n\n/** Replicated-state key of the server-advertised version lane. */\nexport const DEEP_AGENT_PROTOCOL_STATE_KEY = \"protocol\";\n\n/** Ephemeral subprotocol carrying a client's message-window interests. */\nexport const DEEP_AGENT_INTEREST_PROTOCOL = \"athena/interest\";\n\n/** Ephemeral subprotocol carrying a client's synced context document. */\nexport const DEEP_AGENT_CONTEXT_PROTOCOL = \"athena/context\";\n\n/** The only interest namespace the host resolves (the linear transcript). */\nexport const DEEP_AGENT_MAIN_NS = \"main\";\n\n/** Window size (interest `before`) a client asks for by default. */\nexport const DEEP_AGENT_DEFAULT_MESSAGE_WINDOW = 40;\n\n/** Bounds on a window size. */\nexport const DEEP_AGENT_MIN_MESSAGE_WINDOW = 8;\n\nexport const DEEP_AGENT_MAX_MESSAGE_WINDOW = 200;\n\n/** Interests one attach may hold at once (the head plus its pages). */\nexport const DEEP_AGENT_MAX_INTERESTS = 16;\n\n/** Command returning a truncated tool output whole. */\nexport const DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND = \"history/tool_output\";\n\n/** Command returning one stored message whole (provenance and full tool output included). */\nexport const DEEP_AGENT_HISTORY_MESSAGE_COMMAND = \"history/message\";\n\n/** Wire key marking a tool message whose content was truncated. */\nexport const DEEP_AGENT_TRUNCATED_CONTENT_KEY = \"athena_content_truncated\";\n\n/**\n * Wire key on a running `task` card whose nested transcript rides cut to its\n * newest steps: `{ messages, tool_calls }` over the whole stored transcript.\n */\nexport const DEEP_AGENT_TRUNCATED_LANE_KEY = \"athena_lane_truncated\";\n\n/**\n * Wire key on a `task` card, and on an in-eval lane's `ptc_subagents` entry,\n * carrying the whole lane's token use however much of the lane the wire\n * carries: `{ input_tokens, output_tokens, cache_read_input_tokens,\n * cache_creation_input_tokens }`, the input counting its cache reads and\n * writes. Absent while the lane's steps report no usage.\n */\nexport const DEEP_AGENT_LANE_USAGE_KEY = \"athena_lane_usage\";\n\n/**\n * The newest nested messages a cut card carries whole; the entries ahead\n * of them are the older assistant turns that requested results among\n * them, cut to those calls.\n */\nexport const DEEP_AGENT_RUNNING_LANE_WIRE_MESSAGES = 8;\n\n/**\n * Key of a followed lane's window (`follows[ns]` on a resolution whose\n * request added `follow: {before}`) naming the `task` call whose card\n * holds the lane.\n */\nexport const DEEP_AGENT_FOLLOW_TOOL_CALL_ID_KEY = \"toolCallId\";\n\n/** The most lane steps one attach follows, across every lane. */\nexport const DEEP_AGENT_MAX_FOLLOWED_STEPS = 200;\n\n/**\n * The first contract version a client declares to see a finished card cut\n * like a running one (and to follow lanes and page them through\n * `history/lane`). Below it, or declaring nothing, finished cards ride whole.\n */\nexport const DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION = 2;\n\n/**\n * Last element of the key a cut finished card's document rides under:\n * `[threadId, \"main\", messageId, \"cut\"]`. A view holds that key or the\n * card's own, never both.\n */\nexport const DEEP_AGENT_CUT_LANE_DOCUMENT = \"cut\";\n\n/**\n * Command returning one page of a card's nested transcript, oldest first:\n * `{ messageId, before, at? }` answers\n * `{ messageId, toolCallId, ns, steps, more: { before }, total }`; the page\n * holds the newest `before` entries, or those strictly older than `at`.\n */\nexport const DEEP_AGENT_HISTORY_LANE_COMMAND = \"history/lane\";\n\n/** The most entries one `history/lane` page asks for. */\nexport const DEEP_AGENT_MAX_LANE_PAGE = 200;\n\n/** The most encoded characters one `history/lane` page carries (at least one entry). */\nexport const DEEP_AGENT_HISTORY_LANE_PAGE_CHARS = 1048576;\n\n/**\n * Set on the last step of a cut finished card whose text is the card's own\n * `content` (the subagent's report): the step rides with empty content, and\n * the card's `content` is its text.\n */\nexport const DEEP_AGENT_REPEATS_RESULT_KEY = \"athena_content_repeats_result\";\n\n/** Most inline-image payload characters one message carries whole on the wire. */\nexport const DEEP_AGENT_INLINE_IMAGE_WIRE_BUDGET = 4194304;\n\n/** Wire key on an image block left off the wire: `{ index, chars, mediaType }`. */\nexport const DEEP_AGENT_OMITTED_IMAGE_KEY = \"athena_image_omitted\";\n\n/** The image an omitted block carries instead of its own (a neutral PNG tile). */\nexport const DEEP_AGENT_OMITTED_IMAGE_PLACEHOLDER_URL =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4AQMAAABPbGssAAAABlBMVEXi6PCUo7jao11HAAAA6ElEQVR42u2UyW3DMBBF3wxogEd2EJbCElKQDRCwC3MpSRc5eLuYokgNLEUxctK/CHyanQts2vRO3QdlALVsXsBvecqxxr1ob0A5GlDJU+hICxN54p/qXAx/+FpoeeE8hTerzfvByn7ifzpaBtWCOwv6bMVMBgzRgNGKmUL9McDs4XOSyEHuoKCI76AiqOugg+y0gx6SN+YQg3QwALGk19pQSKV/reOocyoww27oU5sxhAbKUNgIqrVxrvnovJ80MFgxYy23wtTss44tmL+bAuOE2p2o0fJa3iW/6iR/lEfx8kv3TZtW6AFk5Sf3k+GTswAAAABJRU5ErkJggg==\";\n\n/**\n * Command returning one inline image of a stored message in chunks:\n * `{ messageId, index, offset? }` answers\n * `{ messageId, index, mediaType, offset, total, chunk, next }`; the\n * chunks joined in order are the image's `data:` URL, and `next` is\n * the offset to ask for next (`null` after the last chunk).\n */\nexport const DEEP_AGENT_HISTORY_IMAGE_COMMAND = \"history/image\";\n\n/**\n * Command returning one inline image of a lane step in chunks, as\n * `history/image` does a stored message's: `{ messageId | lane, step,\n * index, offset? }` answers `{ messageId, lane, step, index, mediaType,\n * offset, total, chunk, next }`, with `messageId` null for an in-eval\n * lane and `lane` null for a card.\n */\nexport const DEEP_AGENT_HISTORY_LANE_IMAGE_COMMAND = \"history/lane_image\";\n"],"names":[],"mappings":"AAyHO,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK8D,IAAI;AAAA,EAChE;AACF;AAGO,MAAM,kCAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAMuE,IAAI;AAAA,EACzE;AACF;AAGO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKiE,IAAI;AAAA,EACnE;AACF;AAMO,MAAM,6BAA6B;AAAA,EACxC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAChB;AAGO,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAK4D,IAAI;AAAA,EAC9D;AACF;AA2BO,MAAM,+BAA+B;AAQrC,MAAM,oCAAoC;AAE1C,MAAM,kCAAkC;AA+BxC,MAAM,qCACX;AAGK,MAAM,mCAAmC;AAGzC,MAAM,gCAAgC;AAGtC,MAAM,+BAA+B;AAMrC,MAAM,qBAAqB;AAG3B,MAAM,oCAAoC;AAG1C,MAAM,gCAAgC;AAEtC,MAAM,gCAAgC;AAGtC,MAAM,2BAA2B;AAGjC,MAAM,yCAAyC;AAG/C,MAAM,qCAAqC;AAG3C,MAAM,mCAAmC;AAMzC,MAAM,gCAAgC;AAStC,MAAM,4BAA4B;AAwBlC,MAAM,uCAAuC;AAO7C,MAAM,+BAA+B;AAQrC,MAAM,kCAAkC;AAGxC,MAAM,2BAA2B;AAUjC,MAAM,gCAAgC;"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require$$0 = require("react");
|
|
4
|
+
const HANDOFF_ARRIVALS = Symbol.for("@athenaintel/agent-runtime/handoff-arrivals");
|
|
5
|
+
function registry() {
|
|
6
|
+
const host = globalThis;
|
|
7
|
+
return host[HANDOFF_ARRIVALS] ?? (host[HANDOFF_ARRIVALS] = { arrivals: /* @__PURE__ */ new Map(), listeners: /* @__PURE__ */ new Set() });
|
|
8
|
+
}
|
|
9
|
+
function publish() {
|
|
10
|
+
for (const listener of registry().listeners) listener();
|
|
11
|
+
}
|
|
12
|
+
function readHandoffArrival(threadId) {
|
|
13
|
+
return threadId && registry().arrivals.get(threadId) || null;
|
|
14
|
+
}
|
|
15
|
+
function subscribeHandoffArrivals(listener) {
|
|
16
|
+
const { listeners } = registry();
|
|
17
|
+
listeners.add(listener);
|
|
18
|
+
return () => {
|
|
19
|
+
listeners.delete(listener);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function anchorHandoffArrival({
|
|
23
|
+
threadId,
|
|
24
|
+
afterMessageId
|
|
25
|
+
}) {
|
|
26
|
+
const { arrivals } = registry();
|
|
27
|
+
const arrival = arrivals.get(threadId);
|
|
28
|
+
if (!arrival || arrival.afterMessageId !== null) return;
|
|
29
|
+
arrivals.set(threadId, { ...arrival, afterMessageId });
|
|
30
|
+
publish();
|
|
31
|
+
}
|
|
32
|
+
function useHandoffArrival({
|
|
33
|
+
threadId,
|
|
34
|
+
lastMessageId,
|
|
35
|
+
loading
|
|
36
|
+
}) {
|
|
37
|
+
const arrival = require$$0.useSyncExternalStore(
|
|
38
|
+
subscribeHandoffArrivals,
|
|
39
|
+
() => readHandoffArrival(threadId),
|
|
40
|
+
() => null
|
|
41
|
+
);
|
|
42
|
+
const unanchored = arrival !== null && arrival.afterMessageId === null;
|
|
43
|
+
require$$0.useEffect(() => {
|
|
44
|
+
if (!threadId || !unanchored || loading || !lastMessageId) return;
|
|
45
|
+
anchorHandoffArrival({ threadId, afterMessageId: lastMessageId });
|
|
46
|
+
}, [threadId, unanchored, loading, lastMessageId]);
|
|
47
|
+
return (arrival == null ? void 0 : arrival.afterMessageId) ? arrival : null;
|
|
48
|
+
}
|
|
49
|
+
const HandoffArrivalContext = require$$0.createContext(null);
|
|
50
|
+
function useHandoffArrivalAfter(messageId) {
|
|
51
|
+
const arrival = require$$0.useContext(HandoffArrivalContext);
|
|
52
|
+
return arrival && messageId && arrival.afterMessageId === messageId ? arrival.label : null;
|
|
53
|
+
}
|
|
54
|
+
exports.HandoffArrivalContext = HandoffArrivalContext;
|
|
55
|
+
exports.anchorHandoffArrival = anchorHandoffArrival;
|
|
56
|
+
exports.readHandoffArrival = readHandoffArrival;
|
|
57
|
+
exports.subscribeHandoffArrivals = subscribeHandoffArrivals;
|
|
58
|
+
exports.useHandoffArrival = useHandoffArrival;
|
|
59
|
+
exports.useHandoffArrivalAfter = useHandoffArrivalAfter;
|
|
60
|
+
//# sourceMappingURL=handoff-arrival.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff-arrival.cjs","sources":["../../../../agent-runtime/src/handoff-arrival.ts"],"sourcesContent":["/**\n * Where a handed-off conversation arrived on this surface: a transcript divider\n * (\"Continued from your phone\") after the last message that was already there\n * when the person picked it up.\n *\n * Ephemeral and client-side. A host records an arrival when its pick-up lands\n * (`recordHandoffArrival`); its transcript anchors it to the thread's last\n * message once that history has loaded (`useHandoffArrival`) and renders the\n * divider after that message (`useHandoffArrivalAfter`). Nothing is sent to\n * Athena or persisted; a reload forgets it.\n */\nimport { createContext, useContext, useEffect, useSyncExternalStore } from 'react';\nimport { continuedFromLabel } from './thread-handoff-protocol';\n\nexport interface HandoffArrival {\n threadId: string;\n /** \"Continued from your phone\". */\n label: string;\n /**\n * The last message present when the conversation arrived; the divider goes\n * right after it. `null` until the transcript has anchored it.\n */\n afterMessageId: string | null;\n}\n\n/** Enough for every conversation one person picks up in a session. */\nexport const MAX_HANDOFF_ARRIVALS = 20;\n\n/**\n * The arrivals live on `globalThis`, not in module scope, because two copies of\n * this module can run in one page: the SDK bundles agent-runtime into its dist\n * while a host (Spaces, the Chrome extension, Midas) imports it directly. The\n * host records through its copy and the SDK transcript reads through its own.\n */\nconst HANDOFF_ARRIVALS = Symbol.for('@athenaintel/agent-runtime/handoff-arrivals');\n\ninterface ArrivalRegistry {\n arrivals: Map<string, HandoffArrival>;\n listeners: Set<() => void>;\n}\n\ntype ArrivalRegistryHost = typeof globalThis & { [HANDOFF_ARRIVALS]?: ArrivalRegistry };\n\n// process-local: this client only — what this surface picked up; nothing is persisted\nfunction registry(): ArrivalRegistry {\n const host = globalThis as ArrivalRegistryHost;\n return (host[HANDOFF_ARRIVALS] ??= { arrivals: new Map(), listeners: new Set() });\n}\n\nfunction publish(): void {\n for (const listener of registry().listeners) listener();\n}\n\n/**\n * A pick-up landed `threadId` here from `source` (`mobile`, `chrome`, …). A\n * second pick-up of the same thread moves the divider to the new arrival.\n */\nexport function recordHandoffArrival({\n threadId,\n source,\n}: {\n threadId: string;\n source: string;\n}): void {\n if (!threadId) return;\n const { arrivals } = registry();\n arrivals.delete(threadId);\n arrivals.set(threadId, { threadId, label: continuedFromLabel(source), afterMessageId: null });\n while (arrivals.size > MAX_HANDOFF_ARRIVALS) {\n const oldest = arrivals.keys().next().value;\n if (oldest === undefined) break;\n arrivals.delete(oldest);\n }\n publish();\n}\n\n/** The arrival recorded for `threadId`, anchored or not. */\nexport function readHandoffArrival(threadId: string | null | undefined): HandoffArrival | null {\n return (threadId && registry().arrivals.get(threadId)) || null;\n}\n\nexport function subscribeHandoffArrivals(listener: () => void): () => void {\n const { listeners } = registry();\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\n/** Forgets the arrival of `threadId`: the pick-up never opened the conversation here. */\nexport function clearHandoffArrival(threadId: string): void {\n if (!registry().arrivals.delete(threadId)) return;\n publish();\n}\n\n/** The first anchor wins: later messages are what came after the arrival. */\nexport function anchorHandoffArrival({\n threadId,\n afterMessageId,\n}: {\n threadId: string;\n afterMessageId: string;\n}): void {\n const { arrivals } = registry();\n const arrival = arrivals.get(threadId);\n if (!arrival || arrival.afterMessageId !== null) return;\n arrivals.set(threadId, { ...arrival, afterMessageId });\n publish();\n}\n\n/**\n * The divider for the transcript of `threadId`, once anchored. The transcript\n * passes its last message id and whether its history is still loading; the\n * first time history has loaded with a message in it, the arrival anchors\n * after that message. A thread already on screen anchors at once.\n */\nexport function useHandoffArrival({\n threadId,\n lastMessageId,\n loading,\n}: {\n threadId: string | null | undefined;\n lastMessageId: string | null | undefined;\n loading: boolean;\n}): HandoffArrival | null {\n const arrival = useSyncExternalStore(\n subscribeHandoffArrivals,\n () => readHandoffArrival(threadId),\n () => null\n );\n const unanchored = arrival !== null && arrival.afterMessageId === null;\n useEffect(() => {\n if (!threadId || !unanchored || loading || !lastMessageId) return;\n anchorHandoffArrival({ threadId, afterMessageId: lastMessageId });\n }, [threadId, unanchored, loading, lastMessageId]);\n return arrival?.afterMessageId ? arrival : null;\n}\n\n/** The anchored arrival of the transcript being rendered, for its messages. */\nexport const HandoffArrivalContext = createContext<HandoffArrival | null>(null);\n\n/** The divider label when it goes right after `messageId`; `null` otherwise. */\nexport function useHandoffArrivalAfter(messageId: string | null | undefined): string | null {\n const arrival = useContext(HandoffArrivalContext);\n return arrival && messageId && arrival.afterMessageId === messageId ? arrival.label : null;\n}\n\nexport function resetHandoffArrivalsForTests(): void {\n registry().arrivals.clear();\n publish();\n}\n"],"names":["useSyncExternalStore","useEffect","createContext","useContext"],"mappings":";;;AAkCA,MAAM,mBAAmB,OAAO,IAAI,6CAA6C;AAUjF,SAAS,WAA4B;AACnC,QAAM,OAAO;AACb,SAAQ,oDAA2B,EAAE,UAAU,oBAAI,OAAO,WAAW,oBAAI,MAAI;AAC/E;AAEA,SAAS,UAAgB;AACvB,aAAW,YAAY,WAAW,UAAW,UAAA;AAC/C;AA0BO,SAAS,mBAAmB,UAA4D;AAC7F,SAAQ,YAAY,SAAA,EAAW,SAAS,IAAI,QAAQ,KAAM;AAC5D;AAEO,SAAS,yBAAyB,UAAkC;AACzE,QAAM,EAAE,UAAA,IAAc,SAAA;AACtB,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM;AACX,cAAU,OAAO,QAAQ;AAAA,EAC3B;AACF;AASO,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AACF,GAGS;AACP,QAAM,EAAE,SAAA,IAAa,SAAA;AACrB,QAAM,UAAU,SAAS,IAAI,QAAQ;AACrC,MAAI,CAAC,WAAW,QAAQ,mBAAmB,KAAM;AACjD,WAAS,IAAI,UAAU,EAAE,GAAG,SAAS,gBAAgB;AACrD,UAAA;AACF;AAQO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAI0B;AACxB,QAAM,UAAUA,WAAAA;AAAAA,IACd;AAAA,IACA,MAAM,mBAAmB,QAAQ;AAAA,IACjC,MAAM;AAAA,EAAA;AAER,QAAM,aAAa,YAAY,QAAQ,QAAQ,mBAAmB;AAClEC,aAAAA,UAAU,MAAM;AACd,QAAI,CAAC,YAAY,CAAC,cAAc,WAAW,CAAC,cAAe;AAC3D,yBAAqB,EAAE,UAAU,gBAAgB,cAAA,CAAe;AAAA,EAClE,GAAG,CAAC,UAAU,YAAY,SAAS,aAAa,CAAC;AACjD,UAAO,mCAAS,kBAAiB,UAAU;AAC7C;AAGO,MAAM,wBAAwBC,WAAAA,cAAqC,IAAI;AAGvE,SAAS,uBAAuB,WAAqD;AAC1F,QAAM,UAAUC,WAAAA,WAAW,qBAAqB;AAChD,SAAO,WAAW,aAAa,QAAQ,mBAAmB,YAAY,QAAQ,QAAQ;AACxF;;;;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface HandoffArrival {
|
|
2
|
+
threadId: string;
|
|
3
|
+
/** "Continued from your phone". */
|
|
4
|
+
label: string;
|
|
5
|
+
/**
|
|
6
|
+
* The last message present when the conversation arrived; the divider goes
|
|
7
|
+
* right after it. `null` until the transcript has anchored it.
|
|
8
|
+
*/
|
|
9
|
+
afterMessageId: string | null;
|
|
10
|
+
}
|
|
11
|
+
/** Enough for every conversation one person picks up in a session. */
|
|
12
|
+
export declare const MAX_HANDOFF_ARRIVALS = 20;
|
|
13
|
+
/**
|
|
14
|
+
* A pick-up landed `threadId` here from `source` (`mobile`, `chrome`, …). A
|
|
15
|
+
* second pick-up of the same thread moves the divider to the new arrival.
|
|
16
|
+
*/
|
|
17
|
+
export declare function recordHandoffArrival({ threadId, source, }: {
|
|
18
|
+
threadId: string;
|
|
19
|
+
source: string;
|
|
20
|
+
}): void;
|
|
21
|
+
/** The arrival recorded for `threadId`, anchored or not. */
|
|
22
|
+
export declare function readHandoffArrival(threadId: string | null | undefined): HandoffArrival | null;
|
|
23
|
+
export declare function subscribeHandoffArrivals(listener: () => void): () => void;
|
|
24
|
+
/** Forgets the arrival of `threadId`: the pick-up never opened the conversation here. */
|
|
25
|
+
export declare function clearHandoffArrival(threadId: string): void;
|
|
26
|
+
/** The first anchor wins: later messages are what came after the arrival. */
|
|
27
|
+
export declare function anchorHandoffArrival({ threadId, afterMessageId, }: {
|
|
28
|
+
threadId: string;
|
|
29
|
+
afterMessageId: string;
|
|
30
|
+
}): void;
|
|
31
|
+
/**
|
|
32
|
+
* The divider for the transcript of `threadId`, once anchored. The transcript
|
|
33
|
+
* passes its last message id and whether its history is still loading; the
|
|
34
|
+
* first time history has loaded with a message in it, the arrival anchors
|
|
35
|
+
* after that message. A thread already on screen anchors at once.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useHandoffArrival({ threadId, lastMessageId, loading, }: {
|
|
38
|
+
threadId: string | null | undefined;
|
|
39
|
+
lastMessageId: string | null | undefined;
|
|
40
|
+
loading: boolean;
|
|
41
|
+
}): HandoffArrival | null;
|
|
42
|
+
/** The anchored arrival of the transcript being rendered, for its messages. */
|
|
43
|
+
export declare const HandoffArrivalContext: import("react").Context<HandoffArrival | null>;
|
|
44
|
+
/** The divider label when it goes right after `messageId`; `null` otherwise. */
|
|
45
|
+
export declare function useHandoffArrivalAfter(messageId: string | null | undefined): string | null;
|
|
46
|
+
export declare function resetHandoffArrivalsForTests(): void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useContext, useSyncExternalStore, useEffect, createContext } from "react";
|
|
2
|
+
const HANDOFF_ARRIVALS = Symbol.for("@athenaintel/agent-runtime/handoff-arrivals");
|
|
3
|
+
function registry() {
|
|
4
|
+
const host = globalThis;
|
|
5
|
+
return host[HANDOFF_ARRIVALS] ?? (host[HANDOFF_ARRIVALS] = { arrivals: /* @__PURE__ */ new Map(), listeners: /* @__PURE__ */ new Set() });
|
|
6
|
+
}
|
|
7
|
+
function publish() {
|
|
8
|
+
for (const listener of registry().listeners) listener();
|
|
9
|
+
}
|
|
10
|
+
function readHandoffArrival(threadId) {
|
|
11
|
+
return threadId && registry().arrivals.get(threadId) || null;
|
|
12
|
+
}
|
|
13
|
+
function subscribeHandoffArrivals(listener) {
|
|
14
|
+
const { listeners } = registry();
|
|
15
|
+
listeners.add(listener);
|
|
16
|
+
return () => {
|
|
17
|
+
listeners.delete(listener);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function anchorHandoffArrival({
|
|
21
|
+
threadId,
|
|
22
|
+
afterMessageId
|
|
23
|
+
}) {
|
|
24
|
+
const { arrivals } = registry();
|
|
25
|
+
const arrival = arrivals.get(threadId);
|
|
26
|
+
if (!arrival || arrival.afterMessageId !== null) return;
|
|
27
|
+
arrivals.set(threadId, { ...arrival, afterMessageId });
|
|
28
|
+
publish();
|
|
29
|
+
}
|
|
30
|
+
function useHandoffArrival({
|
|
31
|
+
threadId,
|
|
32
|
+
lastMessageId,
|
|
33
|
+
loading
|
|
34
|
+
}) {
|
|
35
|
+
const arrival = useSyncExternalStore(
|
|
36
|
+
subscribeHandoffArrivals,
|
|
37
|
+
() => readHandoffArrival(threadId),
|
|
38
|
+
() => null
|
|
39
|
+
);
|
|
40
|
+
const unanchored = arrival !== null && arrival.afterMessageId === null;
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (!threadId || !unanchored || loading || !lastMessageId) return;
|
|
43
|
+
anchorHandoffArrival({ threadId, afterMessageId: lastMessageId });
|
|
44
|
+
}, [threadId, unanchored, loading, lastMessageId]);
|
|
45
|
+
return (arrival == null ? void 0 : arrival.afterMessageId) ? arrival : null;
|
|
46
|
+
}
|
|
47
|
+
const HandoffArrivalContext = createContext(null);
|
|
48
|
+
function useHandoffArrivalAfter(messageId) {
|
|
49
|
+
const arrival = useContext(HandoffArrivalContext);
|
|
50
|
+
return arrival && messageId && arrival.afterMessageId === messageId ? arrival.label : null;
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
HandoffArrivalContext,
|
|
54
|
+
anchorHandoffArrival,
|
|
55
|
+
readHandoffArrival,
|
|
56
|
+
subscribeHandoffArrivals,
|
|
57
|
+
useHandoffArrival,
|
|
58
|
+
useHandoffArrivalAfter
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=handoff-arrival.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff-arrival.js","sources":["../../../../agent-runtime/src/handoff-arrival.ts"],"sourcesContent":["/**\n * Where a handed-off conversation arrived on this surface: a transcript divider\n * (\"Continued from your phone\") after the last message that was already there\n * when the person picked it up.\n *\n * Ephemeral and client-side. A host records an arrival when its pick-up lands\n * (`recordHandoffArrival`); its transcript anchors it to the thread's last\n * message once that history has loaded (`useHandoffArrival`) and renders the\n * divider after that message (`useHandoffArrivalAfter`). Nothing is sent to\n * Athena or persisted; a reload forgets it.\n */\nimport { createContext, useContext, useEffect, useSyncExternalStore } from 'react';\nimport { continuedFromLabel } from './thread-handoff-protocol';\n\nexport interface HandoffArrival {\n threadId: string;\n /** \"Continued from your phone\". */\n label: string;\n /**\n * The last message present when the conversation arrived; the divider goes\n * right after it. `null` until the transcript has anchored it.\n */\n afterMessageId: string | null;\n}\n\n/** Enough for every conversation one person picks up in a session. */\nexport const MAX_HANDOFF_ARRIVALS = 20;\n\n/**\n * The arrivals live on `globalThis`, not in module scope, because two copies of\n * this module can run in one page: the SDK bundles agent-runtime into its dist\n * while a host (Spaces, the Chrome extension, Midas) imports it directly. The\n * host records through its copy and the SDK transcript reads through its own.\n */\nconst HANDOFF_ARRIVALS = Symbol.for('@athenaintel/agent-runtime/handoff-arrivals');\n\ninterface ArrivalRegistry {\n arrivals: Map<string, HandoffArrival>;\n listeners: Set<() => void>;\n}\n\ntype ArrivalRegistryHost = typeof globalThis & { [HANDOFF_ARRIVALS]?: ArrivalRegistry };\n\n// process-local: this client only — what this surface picked up; nothing is persisted\nfunction registry(): ArrivalRegistry {\n const host = globalThis as ArrivalRegistryHost;\n return (host[HANDOFF_ARRIVALS] ??= { arrivals: new Map(), listeners: new Set() });\n}\n\nfunction publish(): void {\n for (const listener of registry().listeners) listener();\n}\n\n/**\n * A pick-up landed `threadId` here from `source` (`mobile`, `chrome`, …). A\n * second pick-up of the same thread moves the divider to the new arrival.\n */\nexport function recordHandoffArrival({\n threadId,\n source,\n}: {\n threadId: string;\n source: string;\n}): void {\n if (!threadId) return;\n const { arrivals } = registry();\n arrivals.delete(threadId);\n arrivals.set(threadId, { threadId, label: continuedFromLabel(source), afterMessageId: null });\n while (arrivals.size > MAX_HANDOFF_ARRIVALS) {\n const oldest = arrivals.keys().next().value;\n if (oldest === undefined) break;\n arrivals.delete(oldest);\n }\n publish();\n}\n\n/** The arrival recorded for `threadId`, anchored or not. */\nexport function readHandoffArrival(threadId: string | null | undefined): HandoffArrival | null {\n return (threadId && registry().arrivals.get(threadId)) || null;\n}\n\nexport function subscribeHandoffArrivals(listener: () => void): () => void {\n const { listeners } = registry();\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\n/** Forgets the arrival of `threadId`: the pick-up never opened the conversation here. */\nexport function clearHandoffArrival(threadId: string): void {\n if (!registry().arrivals.delete(threadId)) return;\n publish();\n}\n\n/** The first anchor wins: later messages are what came after the arrival. */\nexport function anchorHandoffArrival({\n threadId,\n afterMessageId,\n}: {\n threadId: string;\n afterMessageId: string;\n}): void {\n const { arrivals } = registry();\n const arrival = arrivals.get(threadId);\n if (!arrival || arrival.afterMessageId !== null) return;\n arrivals.set(threadId, { ...arrival, afterMessageId });\n publish();\n}\n\n/**\n * The divider for the transcript of `threadId`, once anchored. The transcript\n * passes its last message id and whether its history is still loading; the\n * first time history has loaded with a message in it, the arrival anchors\n * after that message. A thread already on screen anchors at once.\n */\nexport function useHandoffArrival({\n threadId,\n lastMessageId,\n loading,\n}: {\n threadId: string | null | undefined;\n lastMessageId: string | null | undefined;\n loading: boolean;\n}): HandoffArrival | null {\n const arrival = useSyncExternalStore(\n subscribeHandoffArrivals,\n () => readHandoffArrival(threadId),\n () => null\n );\n const unanchored = arrival !== null && arrival.afterMessageId === null;\n useEffect(() => {\n if (!threadId || !unanchored || loading || !lastMessageId) return;\n anchorHandoffArrival({ threadId, afterMessageId: lastMessageId });\n }, [threadId, unanchored, loading, lastMessageId]);\n return arrival?.afterMessageId ? arrival : null;\n}\n\n/** The anchored arrival of the transcript being rendered, for its messages. */\nexport const HandoffArrivalContext = createContext<HandoffArrival | null>(null);\n\n/** The divider label when it goes right after `messageId`; `null` otherwise. */\nexport function useHandoffArrivalAfter(messageId: string | null | undefined): string | null {\n const arrival = useContext(HandoffArrivalContext);\n return arrival && messageId && arrival.afterMessageId === messageId ? arrival.label : null;\n}\n\nexport function resetHandoffArrivalsForTests(): void {\n registry().arrivals.clear();\n publish();\n}\n"],"names":[],"mappings":";AAkCA,MAAM,mBAAmB,OAAO,IAAI,6CAA6C;AAUjF,SAAS,WAA4B;AACnC,QAAM,OAAO;AACb,SAAQ,oDAA2B,EAAE,UAAU,oBAAI,OAAO,WAAW,oBAAI,MAAI;AAC/E;AAEA,SAAS,UAAgB;AACvB,aAAW,YAAY,WAAW,UAAW,UAAA;AAC/C;AA0BO,SAAS,mBAAmB,UAA4D;AAC7F,SAAQ,YAAY,SAAA,EAAW,SAAS,IAAI,QAAQ,KAAM;AAC5D;AAEO,SAAS,yBAAyB,UAAkC;AACzE,QAAM,EAAE,UAAA,IAAc,SAAA;AACtB,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM;AACX,cAAU,OAAO,QAAQ;AAAA,EAC3B;AACF;AASO,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AACF,GAGS;AACP,QAAM,EAAE,SAAA,IAAa,SAAA;AACrB,QAAM,UAAU,SAAS,IAAI,QAAQ;AACrC,MAAI,CAAC,WAAW,QAAQ,mBAAmB,KAAM;AACjD,WAAS,IAAI,UAAU,EAAE,GAAG,SAAS,gBAAgB;AACrD,UAAA;AACF;AAQO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAI0B;AACxB,QAAM,UAAU;AAAA,IACd;AAAA,IACA,MAAM,mBAAmB,QAAQ;AAAA,IACjC,MAAM;AAAA,EAAA;AAER,QAAM,aAAa,YAAY,QAAQ,QAAQ,mBAAmB;AAClE,YAAU,MAAM;AACd,QAAI,CAAC,YAAY,CAAC,cAAc,WAAW,CAAC,cAAe;AAC3D,yBAAqB,EAAE,UAAU,gBAAgB,cAAA,CAAe;AAAA,EAClE,GAAG,CAAC,UAAU,YAAY,SAAS,aAAa,CAAC;AACjD,UAAO,mCAAS,kBAAiB,UAAU;AAC7C;AAGO,MAAM,wBAAwB,cAAqC,IAAI;AAGvE,SAAS,uBAAuB,WAAqD;AAC1F,QAAM,UAAU,WAAW,qBAAqB;AAChD,SAAO,WAAW,aAAa,QAAQ,mBAAmB,YAAY,QAAQ,QAAQ;AACxF;"}
|
|
@@ -4,17 +4,19 @@ export { CLIENT_TOOL_INTERRUPT_SOURCE, clientToolCallArgs, type ClientToolCached
|
|
|
4
4
|
export { CLIENT_TOOL_WRITE_DECLINED_MESSAGE, type ClientToolBridgeTool, type ClientToolCallSettledEvent, clientToolClaimKey, type ClientToolWriteConsentDecision, defaultMissingClientToolMessage, executeClientToolBatch, type ExecuteClientToolBatchOptions, isPendingClientToolRequest, jsonSafeClientToolResult, useStatewireClientToolBridge, type UseStatewireClientToolBridgeOptions, } from "./client-tool-bridge";
|
|
5
5
|
export { conversationIndexFingerprint, conversationIndexId, conversationIndexUrlFromStatewireUrl, type ConversationIndexEntry, type ConversationWatchActivity, useConversationIndex, type UseConversationIndexOptions, type UseConversationIndexResult, watchActivityFingerprint, } from "./conversation-index";
|
|
6
6
|
export { cancelConversationListCaches, CONVERSATION_ATTENTIONS, CONVERSATION_LIST_DEFAULT_SCOPE_KEY, CONVERSATION_LIST_QUERY_KEY_ROOT, type ConversationAttention, type ConversationAttentionSource, type ConversationListFetcher, type ConversationListFetchParams, type ConversationListFilter, type ConversationListPage, conversationListFilterKey, conversationListQueryKeys, type ConversationPullRequest, type ConversationSummary, type ConversationWake, deriveConversationAttention, invalidateConversationListCaches, isConversationRunning, mergeConversationIndexIntoPage, mergeConversationPages, normalizeConversationListFilter, patchConversationListCaches, patchConversationsInPage, prependConversationToPage, removeConversationFromListCaches, removeConversationFromPage, summaryFromConversationIndexEntry, } from "./conversation-list";
|
|
7
|
+
export { CONVERSATION_LIST_GROUP_ORDER, type ConversationAttentionIndicator, type ConversationAttentionInput, type ConversationListGroup, type ConversationListSection, type ConversationNextAction, type ConversationNextActionTone, type ConversationTimeGroup, conversationAttentionIndicator, conversationListGroupOf, conversationNextAction, conversationTimeGroup, groupConversationsForList, resolveConversationAttention, } from "./conversation-list-groups";
|
|
7
8
|
export { CATEGORY_EMOJI, defaultToolDisplayMeta, describeDelegation, describeNamed, describePackage, describePath, describeQuery, describeRange, describeSql, describeTable, describeToolArgs, describeUrl, formatToolName, getCategoryEmoji, getToolDisplayMeta, hasToolDisplayMeta, isInlineTool, knownToolNames, TOOL_DISPLAY_META, type ToolArgsDescriber, type ToolCategory, toolActiveLabel, toolCompletedLabel, type ToolDisplayMeta, type ToolDisplayMetaEntry, type ToolIconKey, toolStatusLabel, type ToolStatusLabelState, truncateLine, } from "./tool-metadata";
|
|
8
9
|
export { classifyToolResult, isRecord, isRejectedToolResult, isToolResultSuccess, parseJsonRecord, readRejectedToolResult, type RejectedToolResult, resultMessage, resultRecord, stringField, type ToolCallStatusLike, toolFailure, type ToolFailure, type ToolResultClassification, type ToolResultState, } from "./tool-result";
|
|
9
10
|
export { type ConversationListController, useConversationList, type UseConversationListOptions, } from "./use-conversation-list";
|
|
10
11
|
export { CLIENT_TOOL_RESULT_STATUS_ERROR, CLIENT_TOOL_RESULT_STATUS_SUCCESS, CLIENT_TOOL_RESULT_STATUSES, type ClientToolResultEnvelopeContract, type ClientToolResultStatus, DEEP_AGENT_CONTEXT_PROTOCOL, DEEP_AGENT_CUT_LANE_DOCUMENT, DEEP_AGENT_DEFAULT_MESSAGE_WINDOW, DEEP_AGENT_FOLLOW_TOOL_CALL_ID_KEY, DEEP_AGENT_INTEREST_PROTOCOL, DEEP_AGENT_LANE_CUT_PROTOCOL_VERSION, DEEP_AGENT_LANE_FOLLOW_PROTOCOL_VERSION, DEEP_AGENT_MAIN_NS, DEEP_AGENT_MAX_FOLLOWED_STEPS, DEEP_AGENT_MAX_LANE_PAGE, DEEP_AGENT_HISTORY_IMAGE_COMMAND, DEEP_AGENT_HISTORY_LANE_COMMAND, DEEP_AGENT_HISTORY_LANE_IMAGE_COMMAND, DEEP_AGENT_HISTORY_LANE_PAGE_CHARS, DEEP_AGENT_HISTORY_MESSAGE_COMMAND, DEEP_AGENT_HISTORY_TOOL_OUTPUT_COMMAND, DEEP_AGENT_INLINE_IMAGE_WIRE_BUDGET, DEEP_AGENT_MAX_INTERESTS, DEEP_AGENT_MAX_MESSAGE_WINDOW, DEEP_AGENT_MESSAGE_WINDOW_HEADER, DEEP_AGENT_MIN_MESSAGE_WINDOW, DEEP_AGENT_OMITTED_IMAGE_KEY, DEEP_AGENT_OMITTED_IMAGE_PLACEHOLDER_URL, DEEP_AGENT_PROTOCOL_STATE_KEY, DEEP_AGENT_PROTOCOL_VERSION, DEEP_AGENT_PROTOCOL_VERSION_HEADER, DEEP_AGENT_REPEATS_RESULT_KEY, DEEP_AGENT_RUNNING_LANE_WIRE_MESSAGES, DEEP_AGENT_RUNTIME_MARKER, DEEP_AGENT_TRUNCATED_CONTENT_KEY, DEEP_AGENT_TRUNCATED_LANE_KEY, KNOWN_START_CHANNEL_SET, KNOWN_START_CHANNELS, type KnownStartChannel, RUN_CONFIG_COMPANION_CUSTOM_KEYS, RUN_CONFIG_CUSTOM_KEY_SET, RUN_CONFIG_CUSTOM_KEYS, RUN_CONFIG_PARSED_CUSTOM_KEYS, RUN_CONFIG_PER_SEND_CUSTOM_KEY_SET, RUN_CONFIG_PER_SEND_CUSTOM_KEYS, type RunConfigCustomKey, type RunConfigPerSendCustomKey, DEEP_AGENT_CONFIG_COMMANDS, DEEP_AGENT_CONFIG_STATE_KEY, THREAD_CONFIG_CUSTOM_KEY_SET, THREAD_CONFIG_CUSTOM_KEYS, type ThreadConfigCustomKey, } from "./generated/runconfig-contract";
|
|
11
|
-
export { COLLAB_AGENT_CHANNEL_SESSION_MISMATCH, CONVERSATION_ARCHIVED, CONVERSATION_ARCHIVED_MESSAGE, isConversationArchivedRejection, isLegacyThreadReadOnlyRejection, isStatewireChannelTeardown, isStatewireCommandAuthContextExpired, isStatewireExpiredVerdict, isStatewireRewindAnchorRejection, projectDeepAgentConnection, readRetryableCommandRejection, readRetryableRunRefusal, readRunStartRefusal, type RetryableCommandRejection, type RetryableRunRefusal, type RunStartRefusal, STATEWIRE_COMMAND_AUTH_CONTEXT_EXPIRED, statewireRejectionCode, statewireRejectionDetailMessage, statewireRejectionPayload, type StatewireRejectionPayload, statewireTransportOutcome, } from "./errors";
|
|
12
|
+
export { COLLAB_AGENT_CHANNEL_SESSION_MISMATCH, CONVERSATION_ARCHIVED, CONVERSATION_ARCHIVED_MESSAGE, isConversationArchivedRejection, isLegacyThreadReadOnlyRejection, isStatewireChannelTeardown, isStatewireCommandAuthContextExpired, isStatewireExpiredVerdict, isStatewireRewindAnchorRejection, projectDeepAgentConnection, readRetryableCommandRejection, readRetryableRunRefusal, readRunStartRefusal, type RetryableCommandRejection, type RetryableRunRefusal, type RunStartRefusal, STATEWIRE_COMMAND_AUTH_CONTEXT_EXPIRED, statewireRejectionCode, isVoiceCommandRejection, statewireRejectionDetailMessage, statewireRejectionPayload, type StatewireRejectionPayload, statewireTransportOutcome, } from "./errors";
|
|
12
13
|
export { type ParsedExecuteOutput, parseExecuteOutput, type ShellCommandSummary, summarizeShellCommand, } from "./execute-output";
|
|
13
|
-
export { type AbandonedInputRequest, type ApprovalResumeLock, asHitlApproval, canApproveForSession, DEFAULT_INTERRUPT_PAUSED_MESSAGE, fanLaneDecision, findAbandonedInterrupt, HITL_PENDING_RESUME_GRACE_MS, HITL_REJECT_REASON, HITL_RESUME_TRANSPORT_RETRIES, type HitlActionDecision, type HitlApprovalPayload, actionRequestToolCallIds, hitlResumeActionDecisions, hitlResumeApprove, hitlResumeApproveForSession, INTERRUPT_DECLINE_REASON, interruptMirrorPayload, interruptResumeDecline, hitlResumeReject, isApprovalCardInterrupt, isPendingInterrupt, isResumeTransportLoss, isSystemPauseInterrupt, laneInterruptIds, type PendingActionRequest, type PendingApprovalContext, type PendingApprovalFact, type PendingApprovalWarning, parsePendingApprovalContext, pendingActionRequests, readAbandonedInputRequests, readInterruptMessage, readInterruptMirror, readQueuedLaneDecisions, toolCallIdsAwaitingApproval, useApprovalResumeLock, type UseApprovalResumeLockOptions, } from "./interrupts";
|
|
14
|
+
export { type AbandonedInputRequest, type ApprovalResumeLock, asHitlApproval, canApproveForSession, DEFAULT_INTERRUPT_PAUSED_MESSAGE, fanLaneDecision, findAbandonedInterrupt, HITL_PENDING_RESUME_GRACE_MS, HITL_REJECT_REASON, HITL_RESUME_TRANSPORT_RETRIES, type HitlActionDecision, type HitlApprovalPayload, actionRequestToolCallIds, hitlResumeActionDecisions, hitlResumeApprove, hitlResumeApproveForSession, INTERRUPT_DECLINE_REASON, interruptMirrorPayload, interruptResumeDecline, hitlResumeReject, isApprovalCardInterrupt, isPendingInterrupt, isResumeTransportLoss, isSystemPauseInterrupt, laneInterruptIds, type PendingActionRequest, type PendingApprovalContext, type PendingApprovalFact, type PendingApprovalWarning, parsePendingApprovalContext, pendingActionRequests, readAbandonedInputRequests, readInterruptMessage, readInterruptMirror, readQueuedLaneDecisions, type ResumeExtras, resumeValueApproves, toolCallIdsAwaitingApproval, useApprovalResumeLock, type UseApprovalResumeLockOptions, } from "./interrupts";
|
|
15
|
+
export { type AgoraFetch, bareDecisionThreadId, type BrowserDecisionCheckOutcome, DECISION_CHECK_HEADER, type DecisionCheckClient, type DecisionCheckClientKind, type DecisionCheckDescriptor, DecisionCheckKind, MAX_DECISIONS_PER_CHECK, type PendingBrowserDecisionCheck, respondDecisionDescriptor, type RunBrowserDecisionCheckOptions, runBrowserDecisionCheck, type StatewireAnswerForCheck, statewireAnswerDescriptors, } from "./decision-checks";
|
|
14
16
|
export { buildQueueEditCommand, buildStatewireQueueRows, describeQueueSendFailure, isFailedSendEntryRace, isQueueEntryUnsettled, QUEUE_AUTO_CONTINUE_DELAY_MS, type QueueEditCommand, queueEntryText, queueLaneFlags, type QueueLaneFlags, readPrioritizedQueueIds, showQueueRowSendNow, showQueueRowSteer, type StatewireQueueRow, userStopBlocksQueueAutoContinue, } from "./queue";
|
|
15
17
|
export { createDeepAgentSendRecovery, type DeepAgentSendRecovery, type DeepAgentSendRecoveryOptions, shouldAutoRetryFailedSend, } from "./send-recovery";
|
|
16
18
|
export { hasStatewireThreadExtras, readStatewireFailedSendLane, requireStatewireFailedActions, type StatewireFailedActions, type StatewireFailedSendEntry, type StatewireFailedSendLane, } from "./thread-extras";
|
|
17
|
-
export { applyRunErrorStatus, ATHENA_ERRORS_KEY, ATHENA_HANDOFF_KEY, ATHENA_QUEUED_LANE_KEY, ATHENA_RUN_MARKER_CANCELLED, ATHENA_RUN_MARKER_FAILED, ATHENA_RUN_MARKER_KEY, ATHENA_RUN_MARKER_SOURCE_KEY, ATHENA_STOP_SOURCE_INSTANCE_CLOSED, ATHENA_STOP_SOURCE_POD_DRAIN, ATHENA_STOP_SOURCE_SEND_NOW, ATHENA_STOP_SOURCE_VOICE_STEER, ATHENA_TERMINATION_REASON_KEY, convertDeepAgentLangChainMessage, convertDeepAgentState, type ConvertDeepAgentStateOptions, type DeepAgentMessageConversionOptions, createDeepAgentMaterialize, createDeepAgentMessageConversionCache, type DeepAgentConversionMemory, deepAgentMaterialize, type DeepAgentMaterializeOptions, DeepAgentMessageConversionCache, deepAgentRowKey, isConvertibleChatMessage, isDrainRunMarker, isLangGraphState, isMessageHiddenFromFrontend, isQueuedLaneMessage, isServerUpdateStopSource, isSilentRunMarker, laneTailMessages, liftBranchIntoMetadata, liftCompactionBoundaryIntoMetadata, liftConversationStatsIntoMetadata, liftErrorsIntoMetadata, liftHandoffSummaryIntoMetadata, liftModelIntoMetadata, liftRunMarkerIntoMetadata, liftTerminationIntoMetadata, liftToolMessageMetadataIntoArtifact, liftTruncatedToolOutputIntoArtifact, convertDeepAgentMessage, markPreliminaryToolResults, messageConverter, nativeStepUsage, PENDING_ASSISTANT_MESSAGE_ID, readMessageErrorsFromSourceMessages, readRunMarkerFromSourceMessages, readSoleRunMarker, type RunMarkerInfo, sanitizeLangChainMessages, substituteToolOutput, withPendingAssistantMessage, } from "./messages";
|
|
19
|
+
export { applyRunErrorStatus, ATHENA_ERRORS_KEY, ATHENA_HANDOFF_KEY, ATHENA_QUEUED_LANE_KEY, ATHENA_RUN_MARKER_CANCELLED, ATHENA_RUN_MARKER_FAILED, ATHENA_RUN_MARKER_KEY, ATHENA_RUN_MARKER_SOURCE_KEY, ATHENA_STOP_SOURCE_INSTANCE_CLOSED, ATHENA_STOP_SOURCE_POD_DRAIN, ATHENA_STOP_SOURCE_SEND_NOW, ATHENA_STOP_SOURCE_VOICE_STEER, ATHENA_TERMINATION_REASON_KEY, convertDeepAgentLangChainMessage, convertDeepAgentState, type ConvertDeepAgentStateOptions, type DeepAgentMessageConversionOptions, createDeepAgentMaterialize, createDeepAgentMessageConversionCache, type DeepAgentConversionMemory, deepAgentMaterialize, type DeepAgentMaterializeOptions, DeepAgentMessageConversionCache, deepAgentRowKey, isConvertibleChatMessage, isDrainRunMarker, isLangGraphState, isMessageHiddenFromFrontend, isQueuedLaneMessage, isServerUpdateStopSource, isSilentRunMarker, laneTailMessages, liftBranchIntoMetadata, liftCompactionBoundaryIntoMetadata, liftConversationStatsIntoMetadata, liftErrorsIntoMetadata, liftHandoffSummaryIntoMetadata, liftModelIntoMetadata, liftPlaceInstructionsIntoMetadata, liftRunMarkerIntoMetadata, liftTerminationIntoMetadata, liftToolMessageMetadataIntoArtifact, liftTruncatedToolOutputIntoArtifact, convertDeepAgentMessage, markPreliminaryToolResults, messageConverter, nativeStepUsage, PENDING_ASSISTANT_MESSAGE_ID, PLACE_INSTRUCTIONS_STAMP_KEY, readMessageErrorsFromSourceMessages, readRunMarkerFromSourceMessages, readSoleRunMarker, type RunMarkerInfo, sanitizeLangChainMessages, substituteToolOutput, withPendingAssistantMessage, } from "./messages";
|
|
18
20
|
export { ATHENA_TRUNCATED_TOOL_OUTPUT_ARTIFACT_KEY, buildHistoryMessageCommand, buildToolOutputCommand, clampMessageWindowSize, type DeepAgentInterestChainEntry, type DeepAgentInterestRequest, type DeepAgentInterestResolution, type DeepAgentMessageWindow, type DeepAgentMessageWindowDeclaration, headInterestRequest, type HistoryMessageCommand, type HistoryMessageResult, interestsCovered, pageInterestRequest, pageInterestRequests, readDeepAgentInterestDocument, readDeepAgentInterestResolution, readDeepAgentMessageWindow, readHistoryMessageResult, readToolOutputResult, readTruncatedToolContent, readTruncatedToolOutputArtifact, type ToolOutputCommand, type ToolOutputResult, type TruncatedToolContent, type TruncatedToolOutputArtifact, withDeclaredMessageWindow, } from "./message-window";
|
|
19
21
|
export { buildHistoryLaneCommand, type DeepAgentLaneHistoryState, type DeepAgentLaneTarget, deepAgentLaneHistoryQueryKey, type HistoryLaneCommand, type HistoryLanePage, isWholeCardRefusal, mergeLaneHistory, readHistoryLanePage, useDeepAgentLaneHistory, } from "./lane-history";
|
|
20
22
|
export { buildHistoryLaneImageCommand, type DeepAgentLaneImagesState, deepAgentLaneImageQueryKey, type HistoryLaneImageChunk, type HistoryLaneImageCommand, type InlineImage, type InlineImageChunk, type LaneImageRef, laneImageKey, omittedLaneImages, readChunkedInlineImage, readHistoryLaneImageChunk, readInlineImageChunk, readLaneImage, readLaneImageTile, showLaneImages, useDeepAgentLaneImages, } from "./lane-images";
|
|
@@ -26,6 +28,8 @@ export { createDeepAgentToolOutputStore, type DeepAgentToolOutputEntry, type Dee
|
|
|
26
28
|
export { claimDeepAgentFailedSendText, type DeepAgentFailedSend, type DeepAgentWithdrawableTurn, type DeepAgentWithdrawnFromRun, type DeepAgentWithdrawnTurns, type DeepAgentWithdrawnTurnVerdict, readDeepAgentFailedSends, readDeepAgentWithdrawableTurn, readDeepAgentWithdrawnTurnVerdict, } from "./withdrawn-turns";
|
|
27
29
|
export { DEEP_AGENT_COMPOSER_MARKDOWN_KEY, isComposerMarkdownOfText, readDeepAgentComposerMarkdown, resetStagedComposerMarkdown, STAGED_COMPOSER_MARKDOWN_TTL_MS, stageComposerMarkdown, takeStagedComposerMarkdownMetadata, trimComposerDraft, withDeepAgentComposerMarkdown, withStagedComposerMarkdown, } from "./composer-markdown";
|
|
28
30
|
export { ATHENA_MESSAGE_AUTHOR_KEY, type DeepAgentMessageAuthor, isSameMessageAuthor, laneEntryAuthor, readMessageAuthor, } from "./message-author";
|
|
31
|
+
export { answerLabelText, ATHENA_ANSWERED_BY_KEY, ATHENA_ASSISTANT_NAME, type DeepAgentAnsweredBy, readAnsweredBy, readLangChainAnswer, readMessageAnswers, showsAnswerLabel, threadShowsAnswerLabels, } from "./answer-label";
|
|
32
|
+
export { ADDRESSED_TURN_STATE_KEY, type DeepAgentAddressedOutcome, type DeepAgentAddressedTurn, NEXT_AGENT_PENDING_MESSAGE_ID, readAnswerRowKey, readDeepAgentAddressedTurn, withAnswerRows, } from "./answer-rows";
|
|
29
33
|
export { AIMessage, enrichStreamMessage, getMessageText, modelNameFromMessage, type StreamMessage, ToolMessage, } from "./message-text";
|
|
30
34
|
export { hideUnterminatedMarkdownLink, UNTERMINATED_LABEL_HOLD_LIMIT, UNTERMINATED_LINK_HOLD_LIMIT, } from "./streaming-markdown";
|
|
31
35
|
export { DEFAULT_CUA_SCREENSHOT_SIZE, describeScreenPointError, findScreenPointLinks, fitScreenBasis, formatScreenPoint, isScreenPointHref, parseScreenPointHref, SCREEN_POINT_HREF_PREFIX, SCREEN_POINT_HOST, SCREEN_POINT_PROTOCOL, sameScreenSize, type ScreenBasisFit, type ScreenPoint, type ScreenPointParseError, type ScreenPointParseResult, screenPointFraction, type ScreenSize, serializeScreenPointHref, } from "./screen-point";
|
|
@@ -33,8 +37,8 @@ export { type DeepAgentModelContextHost, registerDeepAgentRunConfig, } from "./m
|
|
|
33
37
|
export { type CompletedPtcParent, extractCompletedPtcParents, type PtcSubcall, ptcSubcallsFromArtifact, } from "./ptc-subcalls";
|
|
34
38
|
export { isRunningToolPlaceholder, isRunningToolPlaceholderArtifact, } from "./running-tool-placeholder";
|
|
35
39
|
export { convertSubagentTranscript, createSubagentLaneConversion, createSubagentTranscriptConversionCache, type SubagentLaneConversion, withLaneReport, withRepeatedResult, } from "./subagent-transcripts";
|
|
36
|
-
export { countSubagentStatuses, deriveEvalSubagents, finalizeOrphanedSubagents, isTerminalSubagentStatus, nestedMessagesFromArtifact, nestedTodosFromArtifact, ORPHANED_SUBAGENT_OUTPUT, ptcSubagentsFromArtifact, readLaneUsage, readTruncatedLane, type SubagentDiscoverySnapshot, type SubagentLaneSource, type SubagentStatus, type SubagentStatusCounts, type SubagentTokenUsage, subagentAwaitingApproval, subagentToolCallAwaitingApproval, type TaskSiblingGroup, type TokenCounts, type TruncatedLane, taskSiblingGroup, taskSubagentsOfThread, taskSubagentsOfTurn, transcriptStepUsage, turnToolCallsAwaitingApproval, useTurnToolCallsAwaitingApproval, } from "./subagents";
|
|
37
|
-
export { ASYNC_TASK_TOOL_NAMES, CANCEL_ASYNC_TASK_TOOL_NAME, CHECK_ASYNC_TASK_TOOL_NAME, EDIT_FILE_TOOL_NAME, EVAL_TOOL_NAME, EXECUTE_PRESENTATION_CODE_TOOL_NAME, EXECUTE_SPREADSHEET_CODE_TOOL_NAME, EXECUTE_TOOL_NAME, EXECUTE_WORD_DOCUMENT_CODE_TOOL_NAME, type FileToolArgs, LIST_ASYNC_TASKS_TOOL_NAME, PTC_PARENT_TOOL_NAMES, QUIET_TOOL_NAMES, RUN_PYTHON_CODE_TOOL_NAME, salientToolCallDetail, START_ASYNC_TASK_TOOL_NAME, SUBMIT_FEEDBACK_TOOL_NAME, TASK_TOOL_NAME, UPDATE_ASYNC_TASK_TOOL_NAME, WRITE_FILE_TOOL_NAME, } from "./tool-names";
|
|
40
|
+
export { countInEvalDispatches, countSubagentStatuses, deriveEvalSubagents, finalizeOrphanedSubagents, isTerminalSubagentStatus, nestedMessagesFromArtifact, nestedTodosFromArtifact, ORPHANED_SUBAGENT_OUTPUT, ptcSubagentsFromArtifact, readLaneUsage, readTruncatedLane, type SubagentDiscoverySnapshot, type SubagentLaneSource, type SubagentStatus, type SubagentStatusCounts, type SubagentTokenUsage, subagentAwaitingApproval, subagentToolCallAwaitingApproval, type TaskSiblingGroup, type TokenCounts, type TruncatedLane, taskSiblingGroup, taskSubagentsOfThread, taskSubagentsOfTurn, transcriptStepUsage, turnToolCallsAwaitingApproval, useTurnToolCallsAwaitingApproval, } from "./subagents";
|
|
41
|
+
export { ASK_AGENT_TOOL_NAME, ASYNC_TASK_TOOL_NAMES, CANCEL_ASYNC_TASK_TOOL_NAME, CHECK_ASYNC_TASK_TOOL_NAME, EDIT_FILE_TOOL_NAME, EVAL_TOOL_NAME, EXECUTE_PRESENTATION_CODE_TOOL_NAME, EXECUTE_SPREADSHEET_CODE_TOOL_NAME, EXECUTE_TOOL_NAME, EXECUTE_WORD_DOCUMENT_CODE_TOOL_NAME, type FileToolArgs, LIST_ASYNC_TASKS_TOOL_NAME, PTC_PARENT_TOOL_NAMES, QUIET_TOOL_NAMES, RUN_PYTHON_CODE_TOOL_NAME, salientToolCallDetail, START_ASYNC_TASK_TOOL_NAME, SUBMIT_FEEDBACK_TOOL_NAME, TASK_TOOL_NAME, UPDATE_ASYNC_TASK_TOOL_NAME, WRITE_FILE_TOOL_NAME, } from "./tool-names";
|
|
38
42
|
export { buildOptimisticHumanContent, type OptimisticContentPart, } from "./optimistic-content";
|
|
39
43
|
export { DEEP_AGENT_DEFAULT_CLIENT_PROTOCOL_VERSION, type DeepAgentProtocolDeclaration, type DeepAgentProtocolStatus, type DeepAgentWireProtocol, declaredDeepAgentProtocolVersion, isDeepAgentHostState, projectDeepAgentProtocol, readDeepAgentProtocol, withDeclaredProtocolVersion, } from "./protocol";
|
|
40
44
|
export { AUTH_DENIAL_PARK_THRESHOLD, type AuthDenialTrackerState, initialAuthDenialTrackerState, observeAuthDenial, } from "./auth-denial";
|
|
@@ -61,7 +65,7 @@ export { BACK_ONLINE_MS, chatSocketCannotReach, chatSocketOutage, useBrowserOnli
|
|
|
61
65
|
export { type DeepAgentConfigControllerInputs, type DeepAgentConfigWriteResult, type DeepAgentServerConfig, type DeepAgentServerConfigEvent, foldPendingConfigOps, isConfigSyncUnavailableRejection, isConfigWriteForbiddenRejection, readConfigVersion, readServerConfig, readThreadServerConfig, useDeepAgentConfig, useDeepAgentConfigController, type UseDeepAgentConfigOptions, type UseDeepAgentConfigResult, } from "./use-deep-agent-config";
|
|
62
66
|
export { applyConfigPatch, applyToolsDisable, applyToolsEnable, diffThreadConfig, pickPerSendCustom, pickThreadConfigCustom, readDeclinedToolkitIds, readEnabledTools, type ThreadConfigCustom, type ThreadConfigPatch, } from "./config-mutations";
|
|
63
67
|
export { DEEP_AGENT_CONNECTION_STATUSES, type DeepAgentConnectionState, type DeepAgentConnectionStatus, type DeepAgentLaneProjection, type DeepAgentStreamValues, type LangGraphState, type PtcSubagentEntry, type Todo, } from "./types";
|
|
64
|
-
export { classifyVoiceStartError, type DeepAgentVoiceDiagnostic, type DeepAgentVoiceDiagnosticEvent, type DeepAgentVoiceFailure, type DeepAgentVoiceFailureKind, type DeepAgentVoiceFailureStage, type DeepAgentVoiceLiveKitAdapter, type DeepAgentVoiceLiveKitAnswer, type DeepAgentVoiceLiveKitSession, type DeepAgentVoiceModelOption, type DeepAgentVoicePhase, type DeepAgentVoiceRemoteStream, type DeepAgentVoiceToolCall, type DeepAgentVoiceTransport, type DeepAgentVoiceWireState, describeVoiceFailure, describeVoiceWireError, float32FromPcm16, formatVoiceElapsed, parseVoiceLiveKitAnswer, parseVoiceModelOptions, pcm16FromFloat32, useDeepAgentVoice, useVoiceElapsed, type UseDeepAgentVoiceOptions, type UseDeepAgentVoiceReturn, VOICE_LIVEKIT_ANSWER_PREFIX, VOICE_LIVEKIT_OFFER, VOICE_RELAY_ANSWER_PREFIX, VOICE_RELAY_SAMPLE_RATE, VOICE_WEBSOCKET_OFFER, voiceRelayUrl, } from "./use-deep-agent-voice";
|
|
68
|
+
export { classifyVoiceStartError, type DeepAgentVoiceDiagnostic, type DeepAgentVoiceDiagnosticEvent, type DeepAgentVoiceFailure, type DeepAgentVoiceFailureKind, type DeepAgentVoiceFailureStage, type DeepAgentVoiceLiveKitAdapter, type DeepAgentVoiceLiveKitAnswer, type DeepAgentVoiceLiveKitSession, type DeepAgentVoiceModelOption, type DeepAgentVoiceOpening, type DeepAgentVoiceOwnerWireState, type DeepAgentVoicePhase, type DeepAgentVoiceRemoteStream, type DeepAgentVoiceStartOptions, type DeepAgentVoiceSurface, type DeepAgentVoiceToolCall, type DeepAgentVoiceTransferWireState, type DeepAgentVoiceTransport, type DeepAgentVoiceWireState, describeVoiceFailure, describeVoiceLiveElsewhere, describeVoiceMovedTo, describeVoiceWireError, float32FromPcm16, formatVoiceElapsed, parseVoiceLiveKitAnswer, parseVoiceModelOptions, parseVoiceOwner, pcm16FromFloat32, useDeepAgentVoice, useVoiceElapsed, useVoiceMovedNotice, type UseDeepAgentVoiceOptions, type UseDeepAgentVoiceReturn, VOICE_LIVEKIT_ANSWER_PREFIX, VOICE_CONTINUE_BY_VOICE_LABEL, VOICE_LIVEKIT_OFFER, VOICE_MOVE_CALL_HERE_LABEL, VOICE_MOVE_HERE_ACTION, VOICE_MOVED_NOTICE_MS, VOICE_RELAY_ANSWER_PREFIX, VOICE_RELAY_SAMPLE_RATE, VOICE_WEBSOCKET_OFFER, voiceRelayUrl, voiceSurfaceLabel, } from "./use-deep-agent-voice";
|
|
65
69
|
export { type DeepAgentVoiceWireError } from "./types";
|
|
66
70
|
export { describeVoiceUpdateToolCall, isSpokenTurnTextPart, isVoiceDelegationMessage, VOICE_DELEGATION_ID_PREFIX, VOICE_LIVE_KEY, VOICE_LIVE_TYPED_HINT, VOICE_SOURCE_DELEGATION, VOICE_SOURCE_SPOKEN, VOICE_SOURCE_TYPED, VOICE_TURN_IDS_KEY, VOICE_UPDATE_TOOL_NAME, type VoiceMessageMarker, type VoiceProvenance, type VoiceUpdateToolCall, voiceProvenanceLabel, voiceUpdateStatusLabel, } from "./voice-presentation";
|
|
67
71
|
export { groupSpokenUserTurns, isSpokenUserTurn } from "./voice-turn-grouping";
|
|
@@ -70,5 +74,8 @@ export { type DeepAgentAttachSource, type DeepAgentHeadersResolver, readSessionP
|
|
|
70
74
|
export { GITHUB_EVENT_SOURCE_KEY, type GithubWakeEvent, githubWakeEventLabel, githubWakeEventUrl, githubWakeMarkerText, githubWakeReference, isGithubWakeMessage, readGithubWakeEvent, } from "./github-wake-event";
|
|
71
75
|
export { githubSubscriptionHeadline, isSubscriptionWakeMessage, readSubscriptionWakeEvent, SUBSCRIPTION_EVENT_KEY, type SubscriptionWakeChange, type SubscriptionWakeEvent, type SubscriptionWakeGithub, subscriptionPlaceWords, subscriptionWakeDetail, subscriptionWakeGithub, subscriptionWakeHeadline, } from "./subscription-wake-event";
|
|
72
76
|
export { describeTerminationReason, readRuntimeMessageFromSourceMessages, readSoleRuntimeMessageKind, readTerminationReason, runtimeMessageMarkerText, TERMINATION_REASONS, type AthenaRuntimeMessage, type AthenaRuntimeMessageKind, type AthenaRuntimeMessageSeverity, type AthenaTerminationReason, type TerminationDescription, } from "./runtime-messages";
|
|
73
|
-
export { buildHandoffQrSvg, buildMobileHandoffSchemeUrl, classifyHandoffTransportError, type CreateThreadHandoffInput, type CreateThreadHandoffResponse, createThreadHandoffResponseSchema, describeHandoffTransportError, type DestinationReadiness, HANDOFF_DESTINATION_LABELS, HANDOFF_DESTINATIONS, HANDOFF_URL_PARAM, type HandoffDestination, type HandoffDestinationPresentation, type HandoffEnvironment, HandoffGoneError, type HandoffLaunch, type HandoffOutcome, HandoffPermanentError, type HandoffReadinessResponse, type HandoffReadinessState, type HandoffSource, type HandoffState, type HandoffTransportErrorKind, handoffHttpError, handoffReadinessResponseSchema, handoffStateSchema, isHandoffGoneError, isHandoffPermanentError, isRetryableHandoffHttpStatus, isOfficeHandoffDestination, isServerHandoffDestination, isTerminalHandoffState, type MobileHandoffLaunch, type MobileLaunchMode, mobileHandoffLaunchSchema, OFFICE_HANDOFF_DESTINATIONS, type OfficeHandoffDestination, type OfficeHandoffLaunch, officeHandoffLaunchSchema, parseHandoffIdParam, presentHandoffDestination, readinessByDestination, SERVER_HANDOFF_DESTINATIONS, type ServerHandoffDestination, selectMobileLaunchMode, type ThreadHandoffTransport, type ThreadHandoffView, threadHandoffViewSchema, waitForHandoffOutcome, type WaitForHandoffOutcomeOptions, } from "./thread-handoff";
|
|
74
|
-
export { DEFAULT_MOBILE_HANDOFF_TIMEOUT_MS, DEFAULT_OFFICE_HANDOFF_TIMEOUT_MS, type StartThreadHandoffInput, type ThreadHandoffFlowCallbacks, type ThreadHandoffFlowController, type ThreadHandoffFlowPhase, useThreadHandoffFlow, type UseThreadHandoffFlowOptions, } from "./use-thread-handoff-flow";
|
|
77
|
+
export { buildHandoffQrSvg, buildMobileHandoffSchemeUrl, classifyHandoffTransportError, type CreateThreadHandoffInput, type CreateThreadHandoffResponse, createThreadHandoffResponseSchema, describeHandoffTransportError, type DestinationReadiness, HANDOFF_DESTINATION_LABELS, HANDOFF_DESTINATIONS, HANDOFF_URL_PARAM, type HandoffDestination, type HandoffDestinationPresentation, type HandoffEnvironment, HandoffGoneError, type HandoffLaunch, type HandoffOutcome, HandoffPermanentError, type HandoffReadinessResponse, type HandoffReadinessState, type HandoffSource, type HandoffState, type HandoffTransportErrorKind, handoffHttpError, handoffReadinessResponseSchema, handoffStateSchema, isHandoffGoneError, isHandoffPermanentError, isRetryableHandoffHttpStatus, isOfficeHandoffDestination, isServerHandoffDestination, isTerminalHandoffState, type MobileHandoffLaunch, type MobileLaunchMode, mobileHandoffLaunchSchema, OFFICE_HANDOFF_DESTINATIONS, type OfficeHandoffDestination, type OfficeHandoffLaunch, officeHandoffLaunchSchema, type OfficeInvitationLaunch, officeInvitationLaunchSchema, type OfficeLaunchMode, officeLaunchModeSchema, threadHandoffCreateBody, parseHandoffIdParam, presentHandoffDestination, readinessByDestination, SERVER_HANDOFF_DESTINATIONS, type ServerHandoffDestination, selectMobileLaunchMode, supportsDesktopHandoffSource, type ThreadHandoffTransport, type ThreadHandoffView, threadHandoffViewSchema, waitForHandoffOutcome, type WaitForHandoffOutcomeOptions, type ClaimThreadHandoffResponse, claimThreadHandoffResponseSchema, clampHandoffDraft, continuedFromLabel, pickUpFromLabel, pickUpOfferLabel, type DesktopThreadHandoffLaunch, desktopThreadHandoffLaunchSchema, driverSurfaceForChannel, drivingOnLabel, type HandoffLanding, handoffLandingFromView, isPickupSurface, MAX_HANDOFF_DRAFT_LENGTH, nextHandoffLaunchSchema, parseThreadHandoffCreateResponse, pendingThreadHandoffResponseSchema, pickedUpOnLabel, PICKUP_SURFACES, type PickupSurface, shouldOfferPendingHandoff, SPACES_HANDOFF_URL_PARAM, type SpacesHandoffLaunch, spacesHandoffLaunchSchema, SURFACE_HANDOFF_DESTINATIONS, type SurfaceHandoffDestination, supportsSurfaceHandoffDestinations, THREAD_HANDOFF_DESTINATION_LABELS, THREAD_HANDOFF_DESTINATIONS, threadHandoffClaimBody, threadHandoffCreateRequest, type ThreadHandoffDestination, type ThreadHandoffReceiverTransport, MAX_PENDING_EXCLUDE, pendingExcludeIds, pickupExcludeIds, pendingHandoffPath, type HandoffMode, handoffModeSchema, isVoiceHandoffDestination, } from "./thread-handoff";
|
|
78
|
+
export { DEFAULT_MOBILE_HANDOFF_TIMEOUT_MS, DEFAULT_OFFICE_HANDOFF_TIMEOUT_MS, DEFAULT_PICKUP_HANDOFF_TIMEOUT_MS, type StartThreadHandoffInput, type ThreadHandoffFlowCallbacks, type ThreadHandoffFlowController, type ThreadHandoffFlowPhase, useThreadHandoffFlow, type UseThreadHandoffFlowOptions, } from "./use-thread-handoff-flow";
|
|
79
|
+
export { anchorHandoffArrival, clearHandoffArrival, type HandoffArrival, HandoffArrivalContext, MAX_HANDOFF_ARRIVALS, readHandoffArrival, recordHandoffArrival, resetHandoffArrivalsForTests, subscribeHandoffArrivals, useHandoffArrival, useHandoffArrivalAfter, } from "./handoff-arrival";
|
|
80
|
+
export { connectVoiceMedia, VOICE_MICROPHONE_CAPTURE } from './voice-media';
|
|
81
|
+
export type { VoiceMediaDriver, VoiceMediaHandlers, VoiceMediaSession } from './voice-media';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const require$$0 = require("react");
|
|
4
4
|
const clientTools = require("./client-tools.cjs");
|
|
5
5
|
const errors = require("./errors.cjs");
|
|
6
6
|
const statewireState = require("./statewire-state.cjs");
|
|
@@ -171,6 +171,30 @@ function hitlResumeActionDecisions(decisions) {
|
|
|
171
171
|
action_decisions: decisions
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
+
const NON_APPROVING_ACTIONS = /* @__PURE__ */ new Set(["reject", "timeout"]);
|
|
175
|
+
function resumeValueApproves(value) {
|
|
176
|
+
if (!isRecord(value)) return true;
|
|
177
|
+
const decisions = value.decisions;
|
|
178
|
+
if (Array.isArray(decisions)) {
|
|
179
|
+
return decisions.length === 0 || decisions.some(resumeValueApproves);
|
|
180
|
+
}
|
|
181
|
+
const perAction = value.action_decisions;
|
|
182
|
+
if (perAction !== void 0) {
|
|
183
|
+
if (!isRecord(perAction)) return true;
|
|
184
|
+
const answers = Object.values(perAction);
|
|
185
|
+
return answers.length === 0 || answers.some(resumeValueApproves);
|
|
186
|
+
}
|
|
187
|
+
const lanes = value.lane_decisions;
|
|
188
|
+
if (lanes !== void 0) {
|
|
189
|
+
if (!isRecord(lanes)) return true;
|
|
190
|
+
const answers = Object.values(lanes);
|
|
191
|
+
return answers.length === 0 || answers.some(resumeValueApproves);
|
|
192
|
+
}
|
|
193
|
+
const kind = value.type;
|
|
194
|
+
if (typeof kind === "string") return !NON_APPROVING_ACTIONS.has(kind);
|
|
195
|
+
const action = value.action;
|
|
196
|
+
return typeof action !== "string" || !NON_APPROVING_ACTIONS.has(action);
|
|
197
|
+
}
|
|
174
198
|
const INTERRUPT_DECLINE_REASON = "User declined the request.";
|
|
175
199
|
function interruptResumeDecline(reason = INTERRUPT_DECLINE_REASON) {
|
|
176
200
|
return { action: "reject", reason };
|
|
@@ -185,15 +209,15 @@ function useApprovalResumeLock(options) {
|
|
|
185
209
|
onResumeRetry,
|
|
186
210
|
maxTransportRetries = HITL_RESUME_TRANSPORT_RETRIES
|
|
187
211
|
} = options;
|
|
188
|
-
const [pending, setPending] =
|
|
189
|
-
const [attempt, setAttempt] =
|
|
190
|
-
const prevRequestIdRef =
|
|
212
|
+
const [pending, setPending] = require$$0.useState(false);
|
|
213
|
+
const [attempt, setAttempt] = require$$0.useState(0);
|
|
214
|
+
const prevRequestIdRef = require$$0.useRef(requestId);
|
|
191
215
|
if (prevRequestIdRef.current !== requestId) {
|
|
192
216
|
prevRequestIdRef.current = requestId;
|
|
193
217
|
if (pending) setPending(false);
|
|
194
218
|
}
|
|
195
|
-
const sawResumeRunRef =
|
|
196
|
-
|
|
219
|
+
const sawResumeRunRef = require$$0.useRef(false);
|
|
220
|
+
require$$0.useEffect(() => {
|
|
197
221
|
if (!pending) {
|
|
198
222
|
sawResumeRunRef.current = false;
|
|
199
223
|
return;
|
|
@@ -207,34 +231,34 @@ function useApprovalResumeLock(options) {
|
|
|
207
231
|
setPending(false);
|
|
208
232
|
}
|
|
209
233
|
}, [pending, isRunning]);
|
|
210
|
-
|
|
234
|
+
require$$0.useEffect(() => {
|
|
211
235
|
if (!pending || pendingResumeGraceMs === void 0) return;
|
|
212
236
|
const timer = setTimeout(() => {
|
|
213
237
|
if (!sawResumeRunRef.current) setPending(false);
|
|
214
238
|
}, pendingResumeGraceMs);
|
|
215
239
|
return () => clearTimeout(timer);
|
|
216
240
|
}, [pending, requestId, pendingResumeGraceMs, attempt]);
|
|
217
|
-
const sendResumeRef =
|
|
241
|
+
const sendResumeRef = require$$0.useRef(sendResume);
|
|
218
242
|
sendResumeRef.current = sendResume;
|
|
219
|
-
const onResumeRejectedRef =
|
|
243
|
+
const onResumeRejectedRef = require$$0.useRef(onResumeRejected);
|
|
220
244
|
onResumeRejectedRef.current = onResumeRejected;
|
|
221
|
-
const onResumeRetryRef =
|
|
245
|
+
const onResumeRetryRef = require$$0.useRef(onResumeRetry);
|
|
222
246
|
onResumeRetryRef.current = onResumeRetry;
|
|
223
|
-
const maxTransportRetriesRef =
|
|
247
|
+
const maxTransportRetriesRef = require$$0.useRef(maxTransportRetries);
|
|
224
248
|
maxTransportRetriesRef.current = maxTransportRetries;
|
|
225
|
-
const currentRequestIdRef =
|
|
249
|
+
const currentRequestIdRef = require$$0.useRef(requestId);
|
|
226
250
|
currentRequestIdRef.current = requestId;
|
|
227
|
-
const pendingRef =
|
|
251
|
+
const pendingRef = require$$0.useRef(pending);
|
|
228
252
|
pendingRef.current = pending;
|
|
229
|
-
const submissionRef =
|
|
230
|
-
const resume =
|
|
231
|
-
(value) => {
|
|
253
|
+
const submissionRef = require$$0.useRef(0);
|
|
254
|
+
const resume = require$$0.useCallback(
|
|
255
|
+
(value, extras) => {
|
|
232
256
|
if (requestId === void 0 || pendingRef.current) return void 0;
|
|
233
257
|
const submission = ++submissionRef.current;
|
|
234
258
|
setPending(true);
|
|
235
259
|
pendingRef.current = true;
|
|
236
260
|
setAttempt(0);
|
|
237
|
-
const first = sendResumeRef.current(requestId, value);
|
|
261
|
+
const first = sendResumeRef.current(requestId, value, extras);
|
|
238
262
|
if (!(first instanceof Promise)) return void 0;
|
|
239
263
|
const outcome = new Promise((resolve, reject) => {
|
|
240
264
|
const settle = (dispatched, retries) => {
|
|
@@ -251,7 +275,7 @@ function useApprovalResumeLock(options) {
|
|
|
251
275
|
setPending(true);
|
|
252
276
|
pendingRef.current = true;
|
|
253
277
|
setAttempt(next);
|
|
254
|
-
const resent = sendResumeRef.current(requestId, value);
|
|
278
|
+
const resent = sendResumeRef.current(requestId, value, extras);
|
|
255
279
|
if (resent instanceof Promise) {
|
|
256
280
|
settle(resent, next);
|
|
257
281
|
return;
|
|
@@ -302,6 +326,7 @@ exports.readAbandonedInputRequests = readAbandonedInputRequests;
|
|
|
302
326
|
exports.readInterruptMessage = readInterruptMessage;
|
|
303
327
|
exports.readInterruptMirror = readInterruptMirror;
|
|
304
328
|
exports.readQueuedLaneDecisions = readQueuedLaneDecisions;
|
|
329
|
+
exports.resumeValueApproves = resumeValueApproves;
|
|
305
330
|
exports.toolCallIdsAwaitingApproval = toolCallIdsAwaitingApproval;
|
|
306
331
|
exports.useApprovalResumeLock = useApprovalResumeLock;
|
|
307
332
|
//# sourceMappingURL=interrupts.cjs.map
|