@athenaintel/react 0.57.2 → 0.60.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 +795 -12
- package/dist/agent-runtime/src/addressed-agents.cjs +16 -0
- package/dist/agent-runtime/src/addressed-agents.cjs.map +1 -0
- package/dist/agent-runtime/src/addressed-agents.d.ts +30 -0
- package/dist/agent-runtime/src/addressed-agents.js +16 -0
- package/dist/agent-runtime/src/addressed-agents.js.map +1 -0
- package/dist/agent-runtime/src/answer-label.cjs +4 -3
- package/dist/agent-runtime/src/answer-label.cjs.map +1 -1
- package/dist/agent-runtime/src/answer-label.d.ts +13 -6
- package/dist/agent-runtime/src/answer-label.js +4 -3
- package/dist/agent-runtime/src/answer-label.js.map +1 -1
- package/dist/agent-runtime/src/chat-outbox-attachments.cjs.map +1 -1
- package/dist/agent-runtime/src/chat-outbox-attachments.d.ts +1 -1
- package/dist/agent-runtime/src/chat-outbox-attachments.js.map +1 -1
- package/dist/agent-runtime/src/chat-outbox-entry.cjs +101 -0
- package/dist/agent-runtime/src/chat-outbox-entry.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-entry.d.ts +99 -0
- package/dist/agent-runtime/src/chat-outbox-entry.js +101 -0
- package/dist/agent-runtime/src/chat-outbox-entry.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-legacy.cjs +252 -0
- package/dist/agent-runtime/src/chat-outbox-legacy.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-legacy.d.ts +96 -0
- package/dist/agent-runtime/src/chat-outbox-legacy.js +252 -0
- package/dist/agent-runtime/src/chat-outbox-legacy.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-policy.cjs +30 -0
- package/dist/agent-runtime/src/chat-outbox-policy.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-policy.d.ts +42 -0
- package/dist/agent-runtime/src/chat-outbox-policy.js +30 -0
- package/dist/agent-runtime/src/chat-outbox-policy.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-storage.cjs +306 -0
- package/dist/agent-runtime/src/chat-outbox-storage.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-storage.d.ts +194 -0
- package/dist/agent-runtime/src/chat-outbox-storage.js +306 -0
- package/dist/agent-runtime/src/chat-outbox-storage.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-thread.cjs +21 -94
- package/dist/agent-runtime/src/chat-outbox-thread.cjs.map +1 -1
- package/dist/agent-runtime/src/chat-outbox-thread.d.ts +22 -18
- package/dist/agent-runtime/src/chat-outbox-thread.js +21 -94
- package/dist/agent-runtime/src/chat-outbox-thread.js.map +1 -1
- package/dist/agent-runtime/src/chat-outbox.cjs +492 -547
- package/dist/agent-runtime/src/chat-outbox.cjs.map +1 -1
- package/dist/agent-runtime/src/chat-outbox.d.ts +110 -142
- package/dist/agent-runtime/src/chat-outbox.js +492 -547
- package/dist/agent-runtime/src/chat-outbox.js.map +1 -1
- package/dist/agent-runtime/src/composer-markdown.cjs +0 -16
- package/dist/agent-runtime/src/composer-markdown.cjs.map +1 -1
- package/dist/agent-runtime/src/composer-markdown.d.ts +1 -1
- package/dist/agent-runtime/src/composer-markdown.js +1 -17
- package/dist/agent-runtime/src/composer-markdown.js.map +1 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs +3 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.d.ts +8 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js +3 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
- package/dist/agent-runtime/src/dictation-preferences.d.ts +356 -0
- package/dist/agent-runtime/src/dictation-record.d.ts +279 -0
- package/dist/agent-runtime/src/dictation-session.d.ts +106 -7
- package/dist/agent-runtime/src/dictation-snippets.d.ts +9 -0
- package/dist/agent-runtime/src/dictation-transfer.d.ts +142 -0
- package/dist/agent-runtime/src/edit-command.cjs.map +1 -1
- package/dist/agent-runtime/src/edit-command.d.ts +1 -1
- package/dist/agent-runtime/src/edit-command.js.map +1 -1
- package/dist/agent-runtime/src/errors.cjs +1 -0
- package/dist/agent-runtime/src/errors.cjs.map +1 -1
- package/dist/agent-runtime/src/errors.js +1 -0
- package/dist/agent-runtime/src/errors.js.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs +24 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +3 -3
- package/dist/agent-runtime/src/generated/runconfig-contract.js +24 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
- package/dist/agent-runtime/src/index.d.ts +14 -8
- package/dist/agent-runtime/src/lane-follow.cjs +289 -0
- package/dist/agent-runtime/src/lane-follow.cjs.map +1 -0
- package/dist/agent-runtime/src/lane-follow.js +289 -0
- package/dist/agent-runtime/src/lane-follow.js.map +1 -0
- package/dist/agent-runtime/src/lane-images.cjs +387 -0
- package/dist/agent-runtime/src/lane-images.cjs.map +1 -0
- package/dist/agent-runtime/src/lane-images.js +387 -0
- package/dist/agent-runtime/src/lane-images.js.map +1 -0
- package/dist/agent-runtime/src/message-window.js +1 -1
- package/dist/agent-runtime/src/messages.cjs +19 -1
- package/dist/agent-runtime/src/messages.cjs.map +1 -1
- package/dist/agent-runtime/src/messages.d.ts +8 -0
- package/dist/agent-runtime/src/messages.js +21 -3
- package/dist/agent-runtime/src/messages.js.map +1 -1
- package/dist/agent-runtime/src/named-agents.cjs +301 -0
- package/dist/agent-runtime/src/named-agents.cjs.map +1 -0
- package/dist/agent-runtime/src/named-agents.d.ts +246 -0
- package/dist/agent-runtime/src/named-agents.js +301 -0
- package/dist/agent-runtime/src/named-agents.js.map +1 -0
- package/dist/agent-runtime/src/offline-status.cjs.map +1 -1
- package/dist/agent-runtime/src/offline-status.d.ts +93 -2
- package/dist/agent-runtime/src/offline-status.js.map +1 -1
- package/dist/agent-runtime/src/ptc-subcalls.cjs +41 -0
- package/dist/agent-runtime/src/ptc-subcalls.cjs.map +1 -0
- package/dist/agent-runtime/src/ptc-subcalls.js +41 -0
- package/dist/agent-runtime/src/ptc-subcalls.js.map +1 -0
- package/dist/agent-runtime/src/queue.cjs +2 -2
- package/dist/agent-runtime/src/queue.cjs.map +1 -1
- package/dist/agent-runtime/src/queue.d.ts +20 -25
- package/dist/agent-runtime/src/queue.js +2 -2
- package/dist/agent-runtime/src/queue.js.map +1 -1
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +314 -84
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
- package/dist/agent-runtime/src/quota-safe-local-storage-session.d.ts +137 -40
- package/dist/agent-runtime/src/quota-safe-local-storage-session.js +318 -88
- package/dist/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
- package/dist/agent-runtime/src/run-send.cjs +54 -0
- package/dist/agent-runtime/src/run-send.cjs.map +1 -0
- package/dist/agent-runtime/src/run-send.d.ts +51 -0
- package/dist/agent-runtime/src/run-send.js +54 -0
- package/dist/agent-runtime/src/run-send.js.map +1 -0
- package/dist/agent-runtime/src/running-tool-placeholder.cjs +6 -0
- package/dist/agent-runtime/src/running-tool-placeholder.cjs.map +1 -1
- package/dist/agent-runtime/src/running-tool-placeholder.js +6 -0
- package/dist/agent-runtime/src/running-tool-placeholder.js.map +1 -1
- package/dist/agent-runtime/src/runtime.d.ts +9 -5
- package/dist/agent-runtime/src/sealed-idb.cjs +64 -0
- package/dist/agent-runtime/src/sealed-idb.cjs.map +1 -1
- package/dist/agent-runtime/src/sealed-idb.d.ts +16 -0
- package/dist/agent-runtime/src/sealed-idb.js +64 -0
- package/dist/agent-runtime/src/sealed-idb.js.map +1 -1
- package/dist/agent-runtime/src/send-recovery.cjs +90 -118
- package/dist/agent-runtime/src/send-recovery.cjs.map +1 -1
- package/dist/agent-runtime/src/send-recovery.d.ts +25 -29
- package/dist/agent-runtime/src/send-recovery.js +90 -118
- package/dist/agent-runtime/src/send-recovery.js.map +1 -1
- package/dist/agent-runtime/src/statewire-diagnostics.d.ts +4 -1
- package/dist/agent-runtime/src/statewire-held-sends.cjs +191 -0
- package/dist/agent-runtime/src/statewire-held-sends.cjs.map +1 -0
- package/dist/agent-runtime/src/statewire-held-sends.d.ts +119 -0
- package/dist/agent-runtime/src/statewire-held-sends.js +191 -0
- package/dist/agent-runtime/src/statewire-held-sends.js.map +1 -0
- package/dist/agent-runtime/src/statewire-state.cjs +4 -0
- package/dist/agent-runtime/src/statewire-state.cjs.map +1 -1
- package/dist/agent-runtime/src/statewire-state.js +4 -0
- package/dist/agent-runtime/src/statewire-state.js.map +1 -1
- package/dist/agent-runtime/src/statewire-transport.cjs +8 -2
- package/dist/agent-runtime/src/statewire-transport.cjs.map +1 -1
- package/dist/agent-runtime/src/statewire-transport.d.ts +14 -5
- package/dist/agent-runtime/src/statewire-transport.js +8 -2
- package/dist/agent-runtime/src/statewire-transport.js.map +1 -1
- package/dist/agent-runtime/src/subagent-transcripts.cjs +1 -23
- package/dist/agent-runtime/src/subagent-transcripts.cjs.map +1 -1
- package/dist/agent-runtime/src/subagent-transcripts.js +3 -25
- package/dist/agent-runtime/src/subagent-transcripts.js.map +1 -1
- package/dist/agent-runtime/src/subagents.cjs +22 -29
- package/dist/agent-runtime/src/subagents.cjs.map +1 -1
- package/dist/agent-runtime/src/subagents.js +23 -30
- package/dist/agent-runtime/src/subagents.js.map +1 -1
- package/dist/agent-runtime/src/thread-extras.cjs +27 -19
- package/dist/agent-runtime/src/thread-extras.cjs.map +1 -1
- package/dist/agent-runtime/src/thread-extras.d.ts +19 -6
- package/dist/agent-runtime/src/thread-extras.js +27 -19
- package/dist/agent-runtime/src/thread-extras.js.map +1 -1
- package/dist/agent-runtime/src/thread-handoff-flow-machine.d.ts +8 -8
- package/dist/agent-runtime/src/tool-metadata.cjs +19 -0
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.js +19 -0
- package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
- package/dist/agent-runtime/src/tool-names.cjs +21 -0
- package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-names.d.ts +8 -0
- package/dist/agent-runtime/src/tool-names.js +21 -0
- package/dist/agent-runtime/src/tool-names.js.map +1 -1
- package/dist/agent-runtime/src/typed-interrupt-kinds.cjs +247 -0
- package/dist/agent-runtime/src/typed-interrupt-kinds.cjs.map +1 -0
- package/dist/agent-runtime/src/typed-interrupt-kinds.d.ts +173 -0
- package/dist/agent-runtime/src/typed-interrupt-kinds.js +247 -0
- package/dist/agent-runtime/src/typed-interrupt-kinds.js.map +1 -0
- package/dist/agent-runtime/src/typed-interrupts.cjs +48 -0
- package/dist/agent-runtime/src/typed-interrupts.cjs.map +1 -0
- package/dist/agent-runtime/src/typed-interrupts.d.ts +75 -0
- package/dist/agent-runtime/src/typed-interrupts.js +48 -0
- package/dist/agent-runtime/src/typed-interrupts.js.map +1 -0
- package/dist/agent-runtime/src/types.d.ts +1 -1
- package/dist/agent-runtime/src/use-conversation-list.cjs +1 -0
- package/dist/agent-runtime/src/use-conversation-list.cjs.map +1 -1
- package/dist/agent-runtime/src/use-conversation-list.d.ts +7 -0
- package/dist/agent-runtime/src/use-conversation-list.js +1 -0
- package/dist/agent-runtime/src/use-conversation-list.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +46 -29
- 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 +14 -22
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +46 -29
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +78 -14
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +34 -7
- package/dist/agent-runtime/src/use-deep-agent-runtime.js +79 -15
- package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs +16 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.d.ts +7 -2
- package/dist/agent-runtime/src/use-deep-agent-thread.js +16 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs +30 -4
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +22 -4
- package/dist/agent-runtime/src/use-deep-agent-voice.js +30 -4
- package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -1
- package/dist/agent-runtime/src/withdrawn-turns.d.ts +5 -4
- package/dist/agent-runtime/src/word-device-fit.d.ts +174 -0
- package/dist/agent-runtime/src/work-in.d.ts +127 -0
- package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
- package/dist/assets/AthenaAssetEmbed.d.ts +6 -1
- package/dist/assets/AthenaAssetEmbed.js.map +1 -1
- package/dist/assets/asset-panel-store.cjs +13 -5
- package/dist/assets/asset-panel-store.cjs.map +1 -1
- package/dist/assets/asset-panel-store.d.ts +33 -2
- package/dist/assets/asset-panel-store.js +13 -5
- package/dist/assets/asset-panel-store.js.map +1 -1
- package/dist/auth/AthenaCredentialSourceContext.cjs +11 -0
- package/dist/auth/AthenaCredentialSourceContext.cjs.map +1 -1
- package/dist/auth/AthenaCredentialSourceContext.d.ts +6 -0
- package/dist/auth/AthenaCredentialSourceContext.js +11 -0
- package/dist/auth/AthenaCredentialSourceContext.js.map +1 -1
- package/dist/auth/account-identity.cjs +13 -2
- package/dist/auth/account-identity.cjs.map +1 -1
- package/dist/auth/account-identity.d.ts +9 -0
- package/dist/auth/account-identity.js +13 -2
- package/dist/auth/account-identity.js.map +1 -1
- package/dist/auth/credential-source.cjs +20 -4
- package/dist/auth/credential-source.cjs.map +1 -1
- package/dist/auth/credential-source.d.ts +9 -0
- package/dist/auth/credential-source.js +20 -4
- package/dist/auth/credential-source.js.map +1 -1
- package/dist/catalog/chat-pickers.cjs +31 -0
- package/dist/catalog/chat-pickers.cjs.map +1 -1
- package/dist/catalog/chat-pickers.d.ts +17 -0
- package/dist/catalog/chat-pickers.js +33 -2
- package/dist/catalog/chat-pickers.js.map +1 -1
- package/dist/catalog/runtime-catalog.cjs +63 -3
- package/dist/catalog/runtime-catalog.cjs.map +1 -1
- package/dist/catalog/runtime-catalog.d.ts +63 -3
- package/dist/catalog/runtime-catalog.js +64 -4
- package/dist/catalog/runtime-catalog.js.map +1 -1
- package/dist/chat/AthenaChat.cjs +301 -98
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +80 -4
- package/dist/chat/AthenaChat.js +302 -99
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireApprovalCard.cjs +35 -5
- package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
- package/dist/chat/StatewireApprovalCard.d.ts +55 -2
- package/dist/chat/StatewireApprovalCard.js +37 -7
- package/dist/chat/StatewireApprovalCard.js.map +1 -1
- package/dist/chat/StatewireQueuedMessages.cjs +17 -2
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.d.ts +8 -45
- package/dist/chat/StatewireQueuedMessages.js +18 -3
- package/dist/chat/StatewireQueuedMessages.js.map +1 -1
- package/dist/chat/chat-agent-mentions.cjs +70 -0
- package/dist/chat/chat-agent-mentions.cjs.map +1 -0
- package/dist/chat/chat-agent-mentions.d.ts +13 -0
- package/dist/chat/chat-agent-mentions.js +70 -0
- package/dist/chat/chat-agent-mentions.js.map +1 -0
- package/dist/chat/composer-actions.cjs +12 -0
- package/dist/chat/composer-actions.cjs.map +1 -0
- package/dist/chat/composer-actions.d.ts +22 -0
- package/dist/chat/composer-actions.js +12 -0
- package/dist/chat/composer-actions.js.map +1 -0
- package/dist/chat/follow-up-suggestions.cjs +185 -0
- package/dist/chat/follow-up-suggestions.cjs.map +1 -0
- package/dist/chat/follow-up-suggestions.d.ts +64 -0
- package/dist/chat/follow-up-suggestions.js +185 -0
- package/dist/chat/follow-up-suggestions.js.map +1 -0
- package/dist/chat/super-grouping/ToolTimeline.cjs +4 -3
- package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.d.ts +7 -3
- package/dist/chat/super-grouping/ToolTimeline.js +4 -3
- package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
- package/dist/chat/turn-changes.cjs +284 -0
- package/dist/chat/turn-changes.cjs.map +1 -0
- package/dist/chat/turn-changes.d.ts +130 -0
- package/dist/chat/turn-changes.js +284 -0
- package/dist/chat/turn-changes.js.map +1 -0
- package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.cjs +31 -0
- package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.cjs.map +1 -0
- package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.d.ts +31 -0
- package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.js +31 -0
- package/dist/chat/typed-interrupts/StatewireTypedInterruptCard.js.map +1 -0
- package/dist/chat/typed-interrupts/approval-cards.cjs +250 -0
- package/dist/chat/typed-interrupts/approval-cards.cjs.map +1 -0
- package/dist/chat/typed-interrupts/approval-cards.d.ts +22 -0
- package/dist/chat/typed-interrupts/approval-cards.js +250 -0
- package/dist/chat/typed-interrupts/approval-cards.js.map +1 -0
- package/dist/chat/typed-interrupts/form-cards.cjs +289 -0
- package/dist/chat/typed-interrupts/form-cards.cjs.map +1 -0
- package/dist/chat/typed-interrupts/form-cards.d.ts +6 -0
- package/dist/chat/typed-interrupts/form-cards.js +289 -0
- package/dist/chat/typed-interrupts/form-cards.js.map +1 -0
- package/dist/chat/typed-interrupts/interrupt-card-shell.cjs +182 -0
- package/dist/chat/typed-interrupts/interrupt-card-shell.cjs.map +1 -0
- package/dist/chat/typed-interrupts/interrupt-card-shell.d.ts +47 -0
- package/dist/chat/typed-interrupts/interrupt-card-shell.js +182 -0
- package/dist/chat/typed-interrupts/interrupt-card-shell.js.map +1 -0
- package/dist/chat/typed-interrupts/json-schema-form.cjs +388 -0
- package/dist/chat/typed-interrupts/json-schema-form.cjs.map +1 -0
- package/dist/chat/typed-interrupts/json-schema-form.d.ts +33 -0
- package/dist/chat/typed-interrupts/json-schema-form.js +388 -0
- package/dist/chat/typed-interrupts/json-schema-form.js.map +1 -0
- package/dist/chat/typed-interrupts/questionnaire-card.cjs +449 -0
- package/dist/chat/typed-interrupts/questionnaire-card.cjs.map +1 -0
- package/dist/chat/typed-interrupts/questionnaire-card.d.ts +20 -0
- package/dist/chat/typed-interrupts/questionnaire-card.js +449 -0
- package/dist/chat/typed-interrupts/questionnaire-card.js.map +1 -0
- package/dist/chat/typed-interrupts/request-file-card.cjs +159 -0
- package/dist/chat/typed-interrupts/request-file-card.cjs.map +1 -0
- package/dist/chat/typed-interrupts/request-file-card.d.ts +2 -0
- package/dist/chat/typed-interrupts/request-file-card.js +159 -0
- package/dist/chat/typed-interrupts/request-file-card.js.map +1 -0
- package/dist/chat/typed-interrupts/toolkit-selection-card.cjs +189 -0
- package/dist/chat/typed-interrupts/toolkit-selection-card.cjs.map +1 -0
- package/dist/chat/typed-interrupts/toolkit-selection-card.d.ts +23 -0
- package/dist/chat/typed-interrupts/toolkit-selection-card.js +189 -0
- package/dist/chat/typed-interrupts/toolkit-selection-card.js.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-body.cjs +26 -0
- package/dist/chat/typed-interrupts/typed-interrupt-body.cjs.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-body.d.ts +3 -0
- package/dist/chat/typed-interrupts/typed-interrupt-body.js +26 -0
- package/dist/chat/typed-interrupts/typed-interrupt-body.js.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-graphql.cjs +105 -0
- package/dist/chat/typed-interrupts/typed-interrupt-graphql.cjs.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-graphql.d.ts +29 -0
- package/dist/chat/typed-interrupts/typed-interrupt-graphql.js +105 -0
- package/dist/chat/typed-interrupts/typed-interrupt-graphql.js.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-notice.cjs +70 -0
- package/dist/chat/typed-interrupts/typed-interrupt-notice.cjs.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-notice.d.ts +45 -0
- package/dist/chat/typed-interrupts/typed-interrupt-notice.js +70 -0
- package/dist/chat/typed-interrupts/typed-interrupt-notice.js.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-panel.cjs +76 -0
- package/dist/chat/typed-interrupts/typed-interrupt-panel.cjs.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-panel.d.ts +11 -0
- package/dist/chat/typed-interrupts/typed-interrupt-panel.js +76 -0
- package/dist/chat/typed-interrupts/typed-interrupt-panel.js.map +1 -0
- package/dist/chat/typed-interrupts/typed-interrupt-types.d.ts +46 -0
- package/dist/chat/typed-interrupts/use-interrupt-draft.cjs +106 -0
- package/dist/chat/typed-interrupts/use-interrupt-draft.cjs.map +1 -0
- package/dist/chat/typed-interrupts/use-interrupt-draft.d.ts +29 -0
- package/dist/chat/typed-interrupts/use-interrupt-draft.js +106 -0
- package/dist/chat/typed-interrupts/use-interrupt-draft.js.map +1 -0
- package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.cjs +231 -0
- package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.cjs.map +1 -0
- package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.d.ts +66 -0
- package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.js +231 -0
- package/dist/chat/typed-interrupts/use-statewire-typed-interrupt.js.map +1 -0
- package/dist/chat-ui/composer/composer-named-agents.cjs +13 -0
- package/dist/chat-ui/composer/composer-named-agents.cjs.map +1 -0
- package/dist/chat-ui/composer/composer-named-agents.d.ts +20 -0
- package/dist/chat-ui/composer/composer-named-agents.js +13 -0
- package/dist/chat-ui/composer/composer-named-agents.js.map +1 -0
- package/dist/chat-ui/composer/slash-command-menu.cjs +143 -0
- package/dist/chat-ui/composer/slash-command-menu.cjs.map +1 -0
- package/dist/chat-ui/composer/slash-command-menu.d.ts +19 -0
- package/dist/chat-ui/composer/slash-command-menu.js +143 -0
- package/dist/chat-ui/composer/slash-command-menu.js.map +1 -0
- package/dist/chat-ui/composer/slash-commands-extension.cjs +51 -0
- package/dist/chat-ui/composer/slash-commands-extension.cjs.map +1 -0
- package/dist/chat-ui/composer/slash-commands-extension.d.ts +39 -0
- package/dist/chat-ui/composer/slash-commands-extension.js +51 -0
- package/dist/chat-ui/composer/slash-commands-extension.js.map +1 -0
- package/dist/chat-ui/composer/slash-commands.cjs +74 -0
- package/dist/chat-ui/composer/slash-commands.cjs.map +1 -0
- package/dist/chat-ui/composer/slash-commands.d.ts +82 -0
- package/dist/chat-ui/composer/slash-commands.js +74 -0
- package/dist/chat-ui/composer/slash-commands.js.map +1 -0
- package/dist/chat-ui/composer/tiptap-composer.cjs +135 -9
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +61 -2
- package/dist/chat-ui/composer/tiptap-composer.js +135 -9
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/index.cjs +5 -0
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +4 -2
- package/dist/chat-ui/index.js +5 -0
- package/dist/chat-ui/index.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +10 -4
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.js +11 -5
- package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
- package/dist/chat-ui/mentions/mention-extension.cjs +8 -1
- package/dist/chat-ui/mentions/mention-extension.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-extension.js +8 -1
- package/dist/chat-ui/mentions/mention-extension.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/get-scope-name.cjs +1 -0
- package/dist/chat-ui/mentions/suggestions/components/get-scope-name.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/get-scope-name.js +1 -0
- package/dist/chat-ui/mentions/suggestions/components/get-scope-name.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs +20 -2
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.d.ts +10 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.js +22 -4
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-item.cjs +1 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-item.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-item.js +1 -1
- package/dist/chat-ui/mentions/suggestions/components/menu-item.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +45 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +48 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.js +45 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.cjs +89 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.d.ts +8 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.js +89 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icon-names.generated.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs +140 -116
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.d.ts +46 -12
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js +141 -117
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +272 -25
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +88 -10
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +274 -27
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/types.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/types.d.ts +27 -1
- package/dist/chat-ui/mentions/suggestions/data/types.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +56 -5
- 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 +26 -6
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +57 -6
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.cjs +34 -17
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.d.ts +19 -1
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.js +35 -18
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.js.map +1 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.cjs +12 -0
- package/dist/chat-ui/mentions/use-asset-icon-app-url.cjs.map +1 -0
- package/dist/chat-ui/mentions/use-asset-icon-app-url.d.ts +8 -0
- package/dist/chat-ui/mentions/use-asset-icon-app-url.js +12 -0
- package/dist/chat-ui/mentions/use-asset-icon-app-url.js.map +1 -0
- package/dist/chat-ui/statewire.d.ts +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.cjs +15 -0
- package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.d.ts +4 -1
- package/dist/chat-ui/thread/statewire-history-edge.js +15 -0
- package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
- package/dist/collab/client.cjs +41 -6
- package/dist/collab/client.cjs.map +1 -1
- package/dist/collab/client.d.ts +38 -7
- package/dist/collab/client.js +41 -6
- package/dist/collab/client.js.map +1 -1
- package/dist/composer/ComposerAttachedReferences.cjs +119 -0
- package/dist/composer/ComposerAttachedReferences.cjs.map +1 -0
- package/dist/composer/ComposerAttachedReferences.d.ts +26 -0
- package/dist/composer/ComposerAttachedReferences.js +119 -0
- package/dist/composer/ComposerAttachedReferences.js.map +1 -0
- package/dist/composer/ComposerNamedAgents.cjs +63 -0
- package/dist/composer/ComposerNamedAgents.cjs.map +1 -0
- package/dist/composer/ComposerNamedAgents.d.ts +16 -0
- package/dist/composer/ComposerNamedAgents.js +63 -0
- package/dist/composer/ComposerNamedAgents.js.map +1 -0
- package/dist/composer/attached-references.cjs +159 -0
- package/dist/composer/attached-references.cjs.map +1 -0
- package/dist/composer/attached-references.d.ts +86 -0
- package/dist/composer/attached-references.js +159 -0
- package/dist/composer/attached-references.js.map +1 -0
- package/dist/composer/build-composed-message.cjs +14 -7
- package/dist/composer/build-composed-message.cjs.map +1 -1
- package/dist/composer/build-composed-message.d.ts +6 -1
- package/dist/composer/build-composed-message.js +14 -7
- package/dist/composer/build-composed-message.js.map +1 -1
- package/dist/composer/composer-handoff.cjs +6 -2
- package/dist/composer/composer-handoff.cjs.map +1 -1
- package/dist/composer/composer-handoff.d.ts +7 -1
- package/dist/composer/composer-handoff.js +6 -2
- package/dist/composer/composer-handoff.js.map +1 -1
- package/dist/composer/folder-upload.cjs +149 -0
- package/dist/composer/folder-upload.cjs.map +1 -0
- package/dist/composer/folder-upload.d.ts +79 -0
- package/dist/composer/folder-upload.js +149 -0
- package/dist/composer/folder-upload.js.map +1 -0
- package/dist/composer/index.d.ts +1 -1
- package/dist/composer/staged-message-metadata.cjs +12 -0
- package/dist/composer/staged-message-metadata.cjs.map +1 -0
- package/dist/composer/staged-message-metadata.d.ts +15 -0
- package/dist/composer/staged-message-metadata.js +12 -0
- package/dist/composer/staged-message-metadata.js.map +1 -0
- package/dist/composer/useAttachToChat.cjs +35 -0
- package/dist/composer/useAttachToChat.cjs.map +1 -0
- package/dist/composer/useAttachToChat.d.ts +54 -0
- package/dist/composer/useAttachToChat.js +35 -0
- package/dist/composer/useAttachToChat.js.map +1 -0
- package/dist/composer/useAttachedReferencesComposerProps.cjs +19 -0
- package/dist/composer/useAttachedReferencesComposerProps.cjs.map +1 -0
- package/dist/composer/useAttachedReferencesComposerProps.d.ts +12 -0
- package/dist/composer/useAttachedReferencesComposerProps.js +19 -0
- package/dist/composer/useAttachedReferencesComposerProps.js.map +1 -0
- package/dist/composer/useFileUpload.cjs +95 -7
- package/dist/composer/useFileUpload.cjs.map +1 -1
- package/dist/composer/useFileUpload.d.ts +21 -2
- package/dist/composer/useFileUpload.js +95 -7
- package/dist/composer/useFileUpload.js.map +1 -1
- package/dist/data/athena-api-error.cjs +125 -0
- package/dist/data/athena-api-error.cjs.map +1 -0
- package/dist/data/athena-api-error.d.ts +96 -0
- package/dist/data/athena-api-error.js +125 -0
- package/dist/data/athena-api-error.js.map +1 -0
- package/dist/data/athena-data-client.cjs +106 -0
- package/dist/data/athena-data-client.cjs.map +1 -0
- package/dist/data/athena-data-client.d.ts +74 -0
- package/dist/data/athena-data-client.js +106 -0
- package/dist/data/athena-data-client.js.map +1 -0
- package/dist/data/athena-member.cjs +93 -0
- package/dist/data/athena-member.cjs.map +1 -0
- package/dist/data/athena-member.d.ts +125 -0
- package/dist/data/athena-member.js +93 -0
- package/dist/data/athena-member.js.map +1 -0
- package/dist/data/athena-request.cjs +460 -0
- package/dist/data/athena-request.cjs.map +1 -0
- package/dist/data/athena-request.d.ts +120 -0
- package/dist/data/athena-request.js +460 -0
- package/dist/data/athena-request.js.map +1 -0
- package/dist/data/use-athena-fetch.cjs +14 -0
- package/dist/data/use-athena-fetch.cjs.map +1 -0
- package/dist/data/use-athena-fetch.d.ts +19 -0
- package/dist/data/use-athena-fetch.js +14 -0
- package/dist/data/use-athena-fetch.js.map +1 -0
- package/dist/data/use-athena-graphql.cjs +66 -0
- package/dist/data/use-athena-graphql.cjs.map +1 -0
- package/dist/data/use-athena-graphql.d.ts +56 -0
- package/dist/data/use-athena-graphql.js +66 -0
- package/dist/data/use-athena-graphql.js.map +1 -0
- package/dist/data/use-athena-rest.cjs +33 -0
- package/dist/data/use-athena-rest.cjs.map +1 -0
- package/dist/data/use-athena-rest.d.ts +21 -0
- package/dist/data/use-athena-rest.js +33 -0
- package/dist/data/use-athena-rest.js.map +1 -0
- package/dist/data/use-semantic-query.cjs +44 -0
- package/dist/data/use-semantic-query.cjs.map +1 -0
- package/dist/data/use-semantic-query.d.ts +92 -0
- package/dist/data/use-semantic-query.js +44 -0
- package/dist/data/use-semantic-query.js.map +1 -0
- package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +5 -1
- package/dist/diagnostics/athena-diagnostics.js.map +1 -1
- package/dist/diagnostics/errors.cjs +7 -0
- package/dist/diagnostics/errors.cjs.map +1 -1
- package/dist/diagnostics/errors.d.ts +7 -0
- package/dist/diagnostics/errors.js +7 -0
- package/dist/diagnostics/errors.js.map +1 -1
- package/dist/index.cjs +155 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +72 -13
- package/dist/index.js +148 -4
- package/dist/index.js.map +1 -1
- package/dist/keryx-http/src/initial-sync.cjs +64 -16
- package/dist/keryx-http/src/initial-sync.cjs.map +1 -1
- package/dist/keryx-http/src/initial-sync.d.ts +31 -1
- package/dist/keryx-http/src/initial-sync.js +64 -16
- package/dist/keryx-http/src/initial-sync.js.map +1 -1
- package/dist/keryx-http/src/own-awareness.cjs +20 -0
- package/dist/keryx-http/src/own-awareness.cjs.map +1 -0
- package/dist/keryx-http/src/own-awareness.d.ts +50 -0
- package/dist/keryx-http/src/own-awareness.js +20 -0
- package/dist/keryx-http/src/own-awareness.js.map +1 -0
- package/dist/keryx-http/src/update-attributions.cjs +26 -1
- package/dist/keryx-http/src/update-attributions.cjs.map +1 -1
- package/dist/keryx-http/src/update-attributions.d.ts +10 -1
- package/dist/keryx-http/src/update-attributions.js +26 -1
- package/dist/keryx-http/src/update-attributions.js.map +1 -1
- package/dist/offline/chat-outbox.cjs +262 -26
- package/dist/offline/chat-outbox.cjs.map +1 -1
- package/dist/offline/chat-outbox.d.ts +90 -12
- package/dist/offline/chat-outbox.js +263 -27
- package/dist/offline/chat-outbox.js.map +1 -1
- package/dist/provider/AthenaProvider.cjs +60 -22
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +24 -8
- package/dist/provider/AthenaProvider.js +61 -23
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/references/src/anchors/parse.cjs +11 -1
- package/dist/references/src/anchors/parse.cjs.map +1 -1
- package/dist/references/src/anchors/parse.js +11 -1
- package/dist/references/src/anchors/parse.js.map +1 -1
- package/dist/references/src/anchors/schemas.d.ts +1 -0
- package/dist/references/src/anchors/serialize.cjs +1 -0
- package/dist/references/src/anchors/serialize.cjs.map +1 -1
- package/dist/references/src/anchors/serialize.js +1 -0
- package/dist/references/src/anchors/serialize.js.map +1 -1
- package/dist/references/src/anchors/types.cjs +5 -0
- package/dist/references/src/anchors/types.cjs.map +1 -1
- package/dist/references/src/anchors/types.d.ts +9 -0
- package/dist/references/src/anchors/types.js +5 -0
- package/dist/references/src/anchors/types.js.map +1 -1
- package/dist/references/src/attachable.cjs +149 -0
- package/dist/references/src/attachable.cjs.map +1 -0
- package/dist/references/src/attachable.d.ts +87 -0
- package/dist/references/src/attachable.js +149 -0
- package/dist/references/src/attachable.js.map +1 -0
- package/dist/references/src/schemas.d.ts +2 -0
- package/dist/runtime/StatewirePlanModeLaneSync.cjs +93 -0
- package/dist/runtime/StatewirePlanModeLaneSync.cjs.map +1 -0
- package/dist/runtime/StatewirePlanModeLaneSync.d.ts +34 -0
- package/dist/runtime/StatewirePlanModeLaneSync.js +93 -0
- package/dist/runtime/StatewirePlanModeLaneSync.js.map +1 -0
- package/dist/runtime/StatewireThreadConfigLaneSync.cjs +2 -0
- package/dist/runtime/StatewireThreadConfigLaneSync.cjs.map +1 -1
- package/dist/runtime/StatewireThreadConfigLaneSync.d.ts +4 -0
- package/dist/runtime/StatewireThreadConfigLaneSync.js +2 -0
- package/dist/runtime/StatewireThreadConfigLaneSync.js.map +1 -1
- package/dist/runtime/statewire-plan-mode.cjs +71 -0
- package/dist/runtime/statewire-plan-mode.cjs.map +1 -0
- package/dist/runtime/statewire-plan-mode.d.ts +88 -0
- package/dist/runtime/statewire-plan-mode.js +71 -0
- package/dist/runtime/statewire-plan-mode.js.map +1 -0
- package/dist/runtime/statewire-run-config.cjs +3 -1
- package/dist/runtime/statewire-run-config.cjs.map +1 -1
- package/dist/runtime/statewire-run-config.d.ts +7 -0
- package/dist/runtime/statewire-run-config.js +3 -1
- package/dist/runtime/statewire-run-config.js.map +1 -1
- package/dist/runtime/statewire-session-key.cjs +11 -5
- package/dist/runtime/statewire-session-key.cjs.map +1 -1
- package/dist/runtime/statewire-session-key.d.ts +22 -10
- package/dist/runtime/statewire-session-key.js +11 -5
- package/dist/runtime/statewire-session-key.js.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.cjs +64 -9
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +26 -10
- package/dist/runtime/useAthenaStatewireRuntime.js +66 -11
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/search/useAthenaAssets.cjs +394 -0
- package/dist/search/useAthenaAssets.cjs.map +1 -0
- package/dist/search/useAthenaAssets.d.ts +186 -0
- package/dist/search/useAthenaAssets.js +394 -0
- package/dist/search/useAthenaAssets.js.map +1 -0
- package/dist/sheet-range/index.cjs +4 -0
- package/dist/sheet-range/index.cjs.map +1 -1
- package/dist/sheet-range/index.d.ts +4 -2
- package/dist/sheet-range/index.js +4 -0
- package/dist/sheet-range/index.js.map +1 -1
- package/dist/sheet-range/query-range.cjs +102 -0
- package/dist/sheet-range/query-range.cjs.map +1 -0
- package/dist/sheet-range/query-range.d.ts +46 -0
- package/dist/sheet-range/query-range.js +102 -0
- package/dist/sheet-range/query-range.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/subagents/index.cjs +49 -0
- package/dist/subagents/index.cjs.map +1 -0
- package/dist/subagents/index.d.ts +16 -0
- package/dist/subagents/index.js +49 -0
- package/dist/subagents/index.js.map +1 -0
- package/dist/subagents/lane-follow.cjs +19 -0
- package/dist/subagents/lane-follow.cjs.map +1 -0
- package/dist/subagents/lane-follow.d.ts +9 -0
- package/dist/subagents/lane-follow.js +19 -0
- package/dist/subagents/lane-follow.js.map +1 -0
- package/dist/subagents/lane-model.cjs +178 -0
- package/dist/subagents/lane-model.cjs.map +1 -0
- package/dist/subagents/lane-model.d.ts +140 -0
- package/dist/subagents/lane-model.js +178 -0
- package/dist/subagents/lane-model.js.map +1 -0
- package/dist/subagents/lane-parts.cjs +517 -0
- package/dist/subagents/lane-parts.cjs.map +1 -0
- package/dist/subagents/lane-parts.d.ts +130 -0
- package/dist/subagents/lane-parts.js +517 -0
- package/dist/subagents/lane-parts.js.map +1 -0
- package/dist/subagents/subagent-lane-group.cjs +215 -0
- package/dist/subagents/subagent-lane-group.cjs.map +1 -0
- package/dist/subagents/subagent-lane-group.d.ts +67 -0
- package/dist/subagents/subagent-lane-group.js +215 -0
- package/dist/subagents/subagent-lane-group.js.map +1 -0
- package/dist/subagents/subagent-transcript-drawer.cjs +431 -0
- package/dist/subagents/subagent-transcript-drawer.cjs.map +1 -0
- package/dist/subagents/subagent-transcript-drawer.d.ts +78 -0
- package/dist/subagents/subagent-transcript-drawer.js +431 -0
- package/dist/subagents/subagent-transcript-drawer.js.map +1 -0
- package/dist/subagents/task-subagent-group.cjs +115 -0
- package/dist/subagents/task-subagent-group.cjs.map +1 -0
- package/dist/subagents/task-subagent-group.d.ts +36 -0
- package/dist/subagents/task-subagent-group.js +115 -0
- package/dist/subagents/task-subagent-group.js.map +1 -0
- package/dist/subagents/use-omitted-images-in-view.cjs +68 -0
- package/dist/subagents/use-omitted-images-in-view.cjs.map +1 -0
- package/dist/subagents/use-omitted-images-in-view.d.ts +21 -0
- package/dist/subagents/use-omitted-images-in-view.js +68 -0
- package/dist/subagents/use-omitted-images-in-view.js.map +1 -0
- package/dist/threads/Inbox.cjs +2 -2
- package/dist/threads/Inbox.cjs.map +1 -1
- package/dist/threads/SessionList.cjs +6 -6
- package/dist/threads/SessionList.cjs.map +1 -1
- package/dist/threads/SessionsPage.cjs +13 -7
- package/dist/threads/SessionsPage.cjs.map +1 -1
- package/dist/threads/SessionsPage.d.ts +10 -1
- package/dist/threads/SessionsPage.js +9 -3
- package/dist/threads/SessionsPage.js.map +1 -1
- package/dist/threads/session-list-model.cjs.map +1 -1
- package/dist/threads/session-list-model.d.ts +2 -1
- package/dist/threads/session-list-model.js.map +1 -1
- package/dist/threads/session-row-parts.cjs +3 -3
- package/dist/threads/session-row-parts.cjs.map +1 -1
- package/dist/threads/sessions-page-model.cjs +13 -5
- package/dist/threads/sessions-page-model.cjs.map +1 -1
- package/dist/threads/sessions-page-model.d.ts +7 -0
- package/dist/threads/sessions-page-model.js +11 -3
- package/dist/threads/sessions-page-model.js.map +1 -1
- package/dist/threads/sessions-page-storage.cjs +8 -8
- package/dist/threads/sessions-page-storage.cjs.map +1 -1
- package/dist/threads/sessions-page-storage.d.ts +5 -1
- package/dist/threads/sessions-page-storage.js +8 -8
- package/dist/threads/sessions-page-storage.js.map +1 -1
- package/dist/threads/statewire-thread-list.cjs +14 -2
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.d.ts +11 -2
- package/dist/threads/statewire-thread-list.js +14 -2
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/threads/use-athena-sessions.cjs +1 -0
- package/dist/threads/use-athena-sessions.cjs.map +1 -1
- package/dist/threads/use-athena-sessions.d.ts +7 -0
- package/dist/threads/use-athena-sessions.js +1 -0
- package/dist/threads/use-athena-sessions.js.map +1 -1
- package/dist/threads/use-athena-thread-agent.cjs +31 -0
- package/dist/threads/use-athena-thread-agent.cjs.map +1 -0
- package/dist/threads/use-athena-thread-agent.d.ts +38 -0
- package/dist/threads/use-athena-thread-agent.js +31 -0
- package/dist/threads/use-athena-thread-agent.js.map +1 -0
- package/dist/threads/use-athena-thread-plan-mode.cjs +18 -0
- package/dist/threads/use-athena-thread-plan-mode.cjs.map +1 -0
- package/dist/threads/use-athena-thread-plan-mode.d.ts +18 -0
- package/dist/threads/use-athena-thread-plan-mode.js +18 -0
- package/dist/threads/use-athena-thread-plan-mode.js.map +1 -0
- package/dist/threads/use-rest-conversation-history.d.ts +1 -0
- package/dist/tools/agent-creations.cjs +97 -0
- package/dist/tools/agent-creations.cjs.map +1 -0
- package/dist/tools/agent-creations.d.ts +38 -0
- package/dist/tools/agent-creations.js +97 -0
- package/dist/tools/agent-creations.js.map +1 -0
- package/dist/tools/agent-highlights.cjs +100 -0
- package/dist/tools/agent-highlights.cjs.map +1 -0
- package/dist/tools/agent-highlights.d.ts +57 -0
- package/dist/tools/agent-highlights.js +100 -0
- package/dist/tools/agent-highlights.js.map +1 -0
- package/dist/tools/append-document-tool-ui.cjs +1 -0
- package/dist/tools/append-document-tool-ui.cjs.map +1 -1
- package/dist/tools/append-document-tool-ui.d.ts +7 -0
- package/dist/tools/append-document-tool-ui.js +2 -1
- package/dist/tools/append-document-tool-ui.js.map +1 -1
- package/dist/tools/auto-open-tools.cjs +144 -71
- package/dist/tools/auto-open-tools.cjs.map +1 -1
- package/dist/tools/auto-open-tools.d.ts +131 -1
- package/dist/tools/auto-open-tools.js +145 -72
- package/dist/tools/auto-open-tools.js.map +1 -1
- package/dist/tools/browser-tool-uis.cjs +594 -0
- package/dist/tools/browser-tool-uis.cjs.map +1 -0
- package/dist/tools/browser-tool-uis.d.ts +8 -0
- package/dist/tools/browser-tool-uis.js +594 -0
- package/dist/tools/browser-tool-uis.js.map +1 -0
- package/dist/tools/computer-asset-tool-uis.cjs +313 -0
- package/dist/tools/computer-asset-tool-uis.cjs.map +1 -0
- package/dist/tools/computer-asset-tool-uis.d.ts +5 -0
- package/dist/tools/computer-asset-tool-uis.js +313 -0
- package/dist/tools/computer-asset-tool-uis.js.map +1 -0
- package/dist/tools/document-edit-tool-uis.cjs +218 -0
- package/dist/tools/document-edit-tool-uis.cjs.map +1 -0
- package/dist/tools/document-edit-tool-uis.d.ts +40 -0
- package/dist/tools/document-edit-tool-uis.js +218 -0
- package/dist/tools/document-edit-tool-uis.js.map +1 -0
- package/dist/tools/drive-tool-uis.cjs +429 -0
- package/dist/tools/drive-tool-uis.cjs.map +1 -0
- package/dist/tools/drive-tool-uis.d.ts +121 -0
- package/dist/tools/drive-tool-uis.js +429 -0
- package/dist/tools/drive-tool-uis.js.map +1 -0
- package/dist/tools/email-calendar-tool-uis.cjs +789 -0
- package/dist/tools/email-calendar-tool-uis.cjs.map +1 -0
- package/dist/tools/email-calendar-tool-uis.d.ts +129 -0
- package/dist/tools/email-calendar-tool-uis.js +789 -0
- package/dist/tools/email-calendar-tool-uis.js.map +1 -0
- package/dist/tools/ontology-tool-uis.cjs +83 -0
- package/dist/tools/ontology-tool-uis.cjs.map +1 -0
- package/dist/tools/ontology-tool-uis.d.ts +9 -0
- package/dist/tools/ontology-tool-uis.js +83 -0
- package/dist/tools/ontology-tool-uis.js.map +1 -0
- package/dist/tools/orchestration-tool-uis.cjs +586 -0
- package/dist/tools/orchestration-tool-uis.cjs.map +1 -0
- package/dist/tools/orchestration-tool-uis.d.ts +141 -0
- package/dist/tools/orchestration-tool-uis.js +586 -0
- package/dist/tools/orchestration-tool-uis.js.map +1 -0
- package/dist/tools/presentation-edit-tool-uis.cjs +516 -0
- package/dist/tools/presentation-edit-tool-uis.cjs.map +1 -0
- package/dist/tools/presentation-edit-tool-uis.d.ts +73 -0
- package/dist/tools/presentation-edit-tool-uis.js +516 -0
- package/dist/tools/presentation-edit-tool-uis.js.map +1 -0
- package/dist/tools/project-tool-uis.cjs +213 -0
- package/dist/tools/project-tool-uis.cjs.map +1 -0
- package/dist/tools/project-tool-uis.d.ts +14 -0
- package/dist/tools/project-tool-uis.js +213 -0
- package/dist/tools/project-tool-uis.js.map +1 -0
- package/dist/tools/sandbox-tool-uis.cjs +491 -0
- package/dist/tools/sandbox-tool-uis.cjs.map +1 -0
- package/dist/tools/sandbox-tool-uis.d.ts +116 -0
- package/dist/tools/sandbox-tool-uis.js +491 -0
- package/dist/tools/sandbox-tool-uis.js.map +1 -0
- package/dist/tools/sheet-query-tool-ui.cjs +138 -0
- package/dist/tools/sheet-query-tool-ui.cjs.map +1 -0
- package/dist/tools/sheet-query-tool-ui.d.ts +15 -0
- package/dist/tools/sheet-query-tool-ui.js +138 -0
- package/dist/tools/sheet-query-tool-ui.js.map +1 -0
- package/dist/tools/studio-screenshot-tool-uis.cjs +262 -0
- package/dist/tools/studio-screenshot-tool-uis.cjs.map +1 -0
- package/dist/tools/studio-screenshot-tool-uis.d.ts +52 -0
- package/dist/tools/studio-screenshot-tool-uis.js +262 -0
- package/dist/tools/studio-screenshot-tool-uis.js.map +1 -0
- package/dist/tools/subagent-task-tool-ui.cjs +24 -475
- package/dist/tools/subagent-task-tool-ui.cjs.map +1 -1
- package/dist/tools/subagent-task-tool-ui.d.ts +19 -103
- package/dist/tools/subagent-task-tool-ui.js +28 -479
- package/dist/tools/subagent-task-tool-ui.js.map +1 -1
- package/dist/tools/tool-summary.cjs +36 -0
- package/dist/tools/tool-summary.cjs.map +1 -1
- package/dist/tools/tool-summary.js +36 -0
- package/dist/tools/tool-summary.js.map +1 -1
- package/dist/tools/tool-uis.cjs +181 -53
- package/dist/tools/tool-uis.cjs.map +1 -1
- package/dist/tools/tool-uis.d.ts +40 -0
- package/dist/tools/tool-uis.js +183 -55
- package/dist/tools/tool-uis.js.map +1 -1
- package/dist/typed-interrupts/index.cjs +15 -0
- package/dist/typed-interrupts/index.cjs.map +1 -0
- package/dist/typed-interrupts/index.d.ts +20 -0
- package/dist/typed-interrupts/index.js +15 -0
- package/dist/typed-interrupts/index.js.map +1 -0
- package/dist/version.cjs +4 -0
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.ts +9 -0
- package/dist/version.js +4 -0
- package/dist/version.js.map +1 -1
- package/dist/workbench/live-desktop-api.cjs +2 -1
- package/dist/workbench/live-desktop-api.cjs.map +1 -1
- package/dist/workbench/live-desktop-api.js +2 -1
- package/dist/workbench/live-desktop-api.js.map +1 -1
- package/dist/workbench/session-workbench-panes.cjs +6 -6
- package/dist/workbench/session-workbench-panes.cjs.map +1 -1
- package/dist/workbench/session-workspace-api.cjs +7 -2
- package/dist/workbench/session-workspace-api.cjs.map +1 -1
- package/dist/workbench/session-workspace-api.d.ts +10 -0
- package/dist/workbench/session-workspace-api.js +7 -2
- package/dist/workbench/session-workspace-api.js.map +1 -1
- package/package.json +28 -6
- package/dist/agent-runtime/src/chat-outbox-store.cjs +0 -510
- package/dist/agent-runtime/src/chat-outbox-store.cjs.map +0 -1
- package/dist/agent-runtime/src/chat-outbox-store.d.ts +0 -210
- package/dist/agent-runtime/src/chat-outbox-store.js +0 -510
- package/dist/agent-runtime/src/chat-outbox-store.js.map +0 -1
|
@@ -1,14 +1,55 @@
|
|
|
1
1
|
import { resource, useResource } from "@assistant-ui/tap";
|
|
2
|
-
import { KeyValueSessionStorage } from "statewire/storage";
|
|
3
|
-
import { useRef, useMemo, useEffect,
|
|
2
|
+
import { sessionNamespace, KeyValueSessionStorage } from "statewire/storage";
|
|
3
|
+
import { useRef, useMemo, useCallback, useEffect, useState } from "react";
|
|
4
4
|
import { isSameSessionLaneScope } from "./session-lane-scope.js";
|
|
5
|
-
import {
|
|
5
|
+
import { upgradeLegacyRunCommand, LEGACY_RUN_SEND_BEHAVIORS } from "./run-send.js";
|
|
6
|
+
import { DEEP_AGENT_STATEWIRE_PROTOCOL, DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION } from "./statewire-transport.js";
|
|
6
7
|
const SESSION_PREFIX = "aui:statewire-session:";
|
|
7
8
|
const SESSION_LOCK_PREFIX = "aui:statewire-session-lock:";
|
|
8
9
|
const SESSION_ACTIVE_PREFIX = "aui:statewire-session-active:";
|
|
10
|
+
const TAB_LOCK_PREFIX = "statewire-tab:";
|
|
11
|
+
const NOTIFY_LOCK_PREFIX = "statewire-notify:";
|
|
9
12
|
const DAY_MS = 24 * 60 * 60 * 1e3;
|
|
10
|
-
const
|
|
13
|
+
const LOCAL_SESSION_RECORD_BYTES = 512 * 1024;
|
|
14
|
+
const READABLE_STORAGE_VERSIONS = /* @__PURE__ */ new Set([1, 2, 3, 4, 5, 6]);
|
|
11
15
|
const browserGlobals = globalThis;
|
|
16
|
+
function sessionPrincipal(subject) {
|
|
17
|
+
return `user:${subject}`;
|
|
18
|
+
}
|
|
19
|
+
function localStorageSessionKey({
|
|
20
|
+
namespace,
|
|
21
|
+
principal,
|
|
22
|
+
threadId
|
|
23
|
+
}) {
|
|
24
|
+
return sessionNamespace(namespace, principal) + threadId;
|
|
25
|
+
}
|
|
26
|
+
function adoptUnscopedLocalStorageSessions({
|
|
27
|
+
namespace,
|
|
28
|
+
principal,
|
|
29
|
+
unscopedPrefix,
|
|
30
|
+
threadId,
|
|
31
|
+
storage = browserGlobals.localStorage
|
|
32
|
+
}) {
|
|
33
|
+
if (!storage) return 0;
|
|
34
|
+
const from = SESSION_PREFIX + unscopedPrefix;
|
|
35
|
+
let moved = 0;
|
|
36
|
+
try {
|
|
37
|
+
const keys = threadId === void 0 ? Array.from({ length: storage.length }, (_, index) => storage.key(index)).filter(
|
|
38
|
+
(key) => (key == null ? void 0 : key.startsWith(from)) === true
|
|
39
|
+
) : [from + threadId];
|
|
40
|
+
for (const key of keys) {
|
|
41
|
+
const raw = storage.getItem(key);
|
|
42
|
+
if (raw === null) continue;
|
|
43
|
+
const target = SESSION_PREFIX + localStorageSessionKey({ namespace, principal, threadId: key.slice(from.length) });
|
|
44
|
+
if (target === key || storage.getItem(target) !== null) continue;
|
|
45
|
+
storage.setItem(target, raw);
|
|
46
|
+
storage.removeItem(key);
|
|
47
|
+
moved += 1;
|
|
48
|
+
}
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
return moved;
|
|
52
|
+
}
|
|
12
53
|
function readPersistedFailedSendStamps(sessionKey) {
|
|
13
54
|
const storage = browserGlobals.localStorage;
|
|
14
55
|
if (!storage) return null;
|
|
@@ -28,9 +69,12 @@ function readFailedSendStampsFromRecord(record) {
|
|
|
28
69
|
const lanes = record.lanes && typeof record.lanes === "object" ? record.lanes : {};
|
|
29
70
|
const failed = [
|
|
30
71
|
...Array.isArray(record.failed) ? record.failed : [],
|
|
31
|
-
...Object.values(lanes).flatMap(
|
|
32
|
-
|
|
33
|
-
|
|
72
|
+
...Object.values(lanes).flatMap((lane) => [
|
|
73
|
+
...Array.isArray(lane == null ? void 0 : lane.failed) ? lane.failed : [],
|
|
74
|
+
...Array.isArray(lane == null ? void 0 : lane.inbox) ? lane.inbox.filter(
|
|
75
|
+
(entry) => (entry == null ? void 0 : entry.failure) !== void 0
|
|
76
|
+
) : []
|
|
77
|
+
])
|
|
34
78
|
];
|
|
35
79
|
for (const entry of failed) {
|
|
36
80
|
const failed2 = entry;
|
|
@@ -60,42 +104,73 @@ const replayableOnCurrentWire = (protocol, command, current) => command.produced
|
|
|
60
104
|
{ ...command, produced: { ...command.produced, wire: current.wire } },
|
|
61
105
|
current
|
|
62
106
|
);
|
|
107
|
+
function upgradeLegacyAthenaStatement(protocol, command, current) {
|
|
108
|
+
if (protocol !== DEEP_AGENT_STATEWIRE_PROTOCOL || current.protocols === "*") return void 0;
|
|
109
|
+
const produced = command.produced;
|
|
110
|
+
if (produced === void 0 || produced.protocols === "*") return void 0;
|
|
111
|
+
const athena = produced.protocols.find((p) => p.name === protocol);
|
|
112
|
+
const offer = current.protocols.find((p) => p.name === protocol);
|
|
113
|
+
if ((athena == null ? void 0 : athena.version) !== DEEP_AGENT_LEGACY_STATEWIRE_PROTOCOL_VERSION || offer === void 0 || inRange(athena.version, offer))
|
|
114
|
+
return void 0;
|
|
115
|
+
const upgraded = upgradeLegacyRunCommand(command);
|
|
116
|
+
if (upgraded === null && command.method in LEGACY_RUN_SEND_BEHAVIORS) return null;
|
|
117
|
+
return {
|
|
118
|
+
...command,
|
|
119
|
+
...upgraded ?? {},
|
|
120
|
+
produced: {
|
|
121
|
+
...produced,
|
|
122
|
+
protocols: produced.protocols.map((p) => p.name === protocol ? offer : p)
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
63
126
|
function parkIncompatibleSessionCommands(record, current, now = Date.now()) {
|
|
64
127
|
let parked = 0;
|
|
65
128
|
let restamped = 0;
|
|
66
129
|
const lanes = {};
|
|
130
|
+
const park = (command) => ({
|
|
131
|
+
id: command.id,
|
|
132
|
+
method: command.method,
|
|
133
|
+
params: command.params,
|
|
134
|
+
...command.meta !== void 0 && { meta: command.meta },
|
|
135
|
+
ts: now,
|
|
136
|
+
...command.seq !== void 0 && { seq: command.seq },
|
|
137
|
+
...command.localMeta !== void 0 && { localMeta: command.localMeta },
|
|
138
|
+
failure: { fate: "lost", cause: "session-lost" }
|
|
139
|
+
});
|
|
67
140
|
for (const [protocol, lane] of Object.entries(record.lanes)) {
|
|
68
|
-
const
|
|
69
|
-
const failed = [];
|
|
141
|
+
const inbox = [];
|
|
70
142
|
let laneRestamped = 0;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
143
|
+
const sort = (stored) => stored.flatMap((original) => {
|
|
144
|
+
const upgraded = upgradeLegacyAthenaStatement(protocol, original, current);
|
|
145
|
+
if (upgraded === null) {
|
|
146
|
+
inbox.push(park(original));
|
|
147
|
+
return [];
|
|
148
|
+
}
|
|
149
|
+
const command = upgraded ?? original;
|
|
150
|
+
if (upgraded !== void 0 && storedCommandCompatible(protocol, command, current)) {
|
|
151
|
+
laneRestamped += 1;
|
|
152
|
+
return [command];
|
|
75
153
|
}
|
|
154
|
+
if (storedCommandCompatible(protocol, command, current))
|
|
155
|
+
return [command];
|
|
76
156
|
if (replayableOnCurrentWire(protocol, command, current)) {
|
|
77
|
-
kept.push({ ...command, produced: current });
|
|
78
157
|
laneRestamped += 1;
|
|
79
|
-
|
|
158
|
+
return [{ ...command, produced: current }];
|
|
80
159
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
failure: { fate: "lost", cause: "session-lost" },
|
|
88
|
-
ts: now,
|
|
89
|
-
seq: command.seq
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
parked += failed.length;
|
|
160
|
+
inbox.push(park(command));
|
|
161
|
+
return [];
|
|
162
|
+
});
|
|
163
|
+
const commands = sort(lane.commands);
|
|
164
|
+
const outbox = lane.outbox === void 0 ? void 0 : sort(lane.outbox);
|
|
165
|
+
parked += inbox.length;
|
|
93
166
|
restamped += laneRestamped;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
167
|
+
const { outbox: _outbox, ...rest } = lane;
|
|
168
|
+
lanes[protocol] = inbox.length === 0 && laneRestamped === 0 ? lane : {
|
|
169
|
+
...rest,
|
|
170
|
+
commands,
|
|
171
|
+
...outbox !== void 0 && outbox.length > 0 && { outbox },
|
|
172
|
+
...(inbox.length > 0 || lane.inbox !== void 0) && {
|
|
173
|
+
inbox: [...lane.inbox ?? [], ...inbox]
|
|
99
174
|
}
|
|
100
175
|
};
|
|
101
176
|
}
|
|
@@ -108,21 +183,12 @@ function isStorageQuotaError(error) {
|
|
|
108
183
|
message
|
|
109
184
|
);
|
|
110
185
|
}
|
|
111
|
-
function
|
|
112
|
-
if (error instanceof Error && error.name === "QuotaExceededError")
|
|
113
|
-
return error;
|
|
114
|
-
const normalized = new Error(
|
|
115
|
-
error instanceof Error ? error.message : "storage quota exceeded"
|
|
116
|
-
);
|
|
117
|
-
normalized.name = "QuotaExceededError";
|
|
118
|
-
return normalized;
|
|
119
|
-
}
|
|
120
|
-
function unreadableRecord(raw) {
|
|
186
|
+
function unreadableRecord(key, raw) {
|
|
121
187
|
let parsed;
|
|
122
188
|
try {
|
|
123
189
|
parsed = JSON.parse(raw);
|
|
124
|
-
} catch
|
|
125
|
-
return
|
|
190
|
+
} catch {
|
|
191
|
+
return void 0;
|
|
126
192
|
}
|
|
127
193
|
if (typeof parsed !== "object" || parsed === null) {
|
|
128
194
|
return new Error("stored session record is not an object");
|
|
@@ -133,6 +199,10 @@ function unreadableRecord(raw) {
|
|
|
133
199
|
`stored session record uses storage version ${String(version)}`
|
|
134
200
|
);
|
|
135
201
|
}
|
|
202
|
+
const owner = parsed.principal;
|
|
203
|
+
if (version === 6 && typeof owner === "string" && !key.includes(`:${encodeURIComponent(owner)}:`)) {
|
|
204
|
+
return new Error("stored session record belongs to another principal");
|
|
205
|
+
}
|
|
136
206
|
return void 0;
|
|
137
207
|
}
|
|
138
208
|
function browserBackend({
|
|
@@ -163,24 +233,48 @@ function browserBackend({
|
|
|
163
233
|
);
|
|
164
234
|
}
|
|
165
235
|
);
|
|
236
|
+
},
|
|
237
|
+
subscribe: (listener) => {
|
|
238
|
+
var _a;
|
|
239
|
+
const onStorage = (event) => {
|
|
240
|
+
if (event.key !== null) listener(event.key);
|
|
241
|
+
};
|
|
242
|
+
(_a = browserGlobals.addEventListener) == null ? void 0 : _a.call(browserGlobals, "storage", onStorage);
|
|
243
|
+
return () => {
|
|
244
|
+
var _a2;
|
|
245
|
+
return (_a2 = browserGlobals.removeEventListener) == null ? void 0 : _a2.call(browserGlobals, "storage", onStorage);
|
|
246
|
+
};
|
|
166
247
|
}
|
|
167
248
|
};
|
|
168
249
|
}
|
|
169
250
|
function quotaTolerantBackend({
|
|
170
251
|
inner,
|
|
171
|
-
onDegraded
|
|
252
|
+
onDegraded,
|
|
253
|
+
onQuota
|
|
172
254
|
}) {
|
|
173
|
-
const
|
|
255
|
+
const reclaimed = /* @__PURE__ */ new Set();
|
|
174
256
|
const overlay = /* @__PURE__ */ new Map();
|
|
175
257
|
const shielded = /* @__PURE__ */ new Set();
|
|
176
258
|
const checked = /* @__PURE__ */ new Map();
|
|
177
259
|
const readable = (key, raw) => {
|
|
178
260
|
const previous = checked.get(key);
|
|
179
261
|
if (previous !== void 0 && previous.raw === raw) return previous.verdict;
|
|
180
|
-
const verdict = unreadableRecord(raw);
|
|
262
|
+
const verdict = unreadableRecord(key, raw);
|
|
181
263
|
checked.set(key, { raw, verdict });
|
|
182
264
|
return verdict;
|
|
183
265
|
};
|
|
266
|
+
const writeThrough = (key) => {
|
|
267
|
+
const value = overlay.get(key);
|
|
268
|
+
if (value === void 0 || shielded.has(key)) return;
|
|
269
|
+
try {
|
|
270
|
+
inner.setItem(key, value);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
onDegraded({ operation: "setItem", key, error });
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (overlay.get(key) === value) overlay.delete(key);
|
|
276
|
+
reclaimed.delete(key);
|
|
277
|
+
};
|
|
184
278
|
return {
|
|
185
279
|
getItem: (key) => {
|
|
186
280
|
const shadowed = overlay.get(key);
|
|
@@ -209,13 +303,17 @@ function quotaTolerantBackend({
|
|
|
209
303
|
try {
|
|
210
304
|
inner.setItem(key, value);
|
|
211
305
|
overlay.delete(key);
|
|
212
|
-
|
|
306
|
+
reclaimed.delete(key);
|
|
213
307
|
} catch (error) {
|
|
214
|
-
if (isStorageQuotaError(error) && !quotaSurfaced.has(key)) {
|
|
215
|
-
quotaSurfaced.add(key);
|
|
216
|
-
throw asStatewireQuotaError(error);
|
|
217
|
-
}
|
|
218
308
|
overlay.set(key, value);
|
|
309
|
+
if (isStorageQuotaError(error) && onQuota && !reclaimed.has(key)) {
|
|
310
|
+
reclaimed.add(key);
|
|
311
|
+
onQuota(key).then(
|
|
312
|
+
() => writeThrough(key),
|
|
313
|
+
(reclaimError) => onDegraded({ operation: "withUnused", key, error: reclaimError })
|
|
314
|
+
);
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
219
317
|
onDegraded({ operation: "setItem", key, error });
|
|
220
318
|
}
|
|
221
319
|
},
|
|
@@ -243,10 +341,12 @@ function quotaTolerantBackend({
|
|
|
243
341
|
} catch (error) {
|
|
244
342
|
onDegraded({ operation: "withUnused", key, error });
|
|
245
343
|
}
|
|
246
|
-
}
|
|
344
|
+
},
|
|
345
|
+
...inner.subscribe !== void 0 && { subscribe: inner.subscribe }
|
|
247
346
|
};
|
|
248
347
|
}
|
|
249
|
-
|
|
348
|
+
const asList = (value) => Array.isArray(value) ? value : [];
|
|
349
|
+
function retentionView(raw) {
|
|
250
350
|
if (raw === null) return void 0;
|
|
251
351
|
let parsed;
|
|
252
352
|
try {
|
|
@@ -255,23 +355,61 @@ function savedAtOf(raw) {
|
|
|
255
355
|
return void 0;
|
|
256
356
|
}
|
|
257
357
|
if (typeof parsed !== "object" || parsed === null) return void 0;
|
|
258
|
-
const
|
|
259
|
-
const stamp = savedAt ?? updatedAt;
|
|
260
|
-
|
|
358
|
+
const record = parsed;
|
|
359
|
+
const stamp = record.savedAt ?? record.updatedAt;
|
|
360
|
+
const lanes = typeof record.lanes === "object" && record.lanes !== null ? Object.values(record.lanes) : [];
|
|
361
|
+
const holdsSends = asList(record.commands).length > 0 || asList(record.failed).length > 0 || lanes.some((lane) => {
|
|
362
|
+
if (typeof lane !== "object" || lane === null) return false;
|
|
363
|
+
const fields = lane;
|
|
364
|
+
return [
|
|
365
|
+
"commands",
|
|
366
|
+
"outbox",
|
|
367
|
+
"inbox",
|
|
368
|
+
"removed",
|
|
369
|
+
"verdicts",
|
|
370
|
+
"failed"
|
|
371
|
+
].some((field) => asList(fields[field]).length > 0);
|
|
372
|
+
});
|
|
373
|
+
return {
|
|
374
|
+
savedAt: typeof stamp === "number" && Number.isFinite(stamp) ? stamp : void 0,
|
|
375
|
+
holdsSends
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
function persistedSessionHoldsSends(sessionKey) {
|
|
379
|
+
var _a;
|
|
380
|
+
const storage = browserGlobals.localStorage;
|
|
381
|
+
if (!storage) return false;
|
|
382
|
+
let raw;
|
|
383
|
+
try {
|
|
384
|
+
raw = storage.getItem(SESSION_PREFIX + sessionKey);
|
|
385
|
+
} catch {
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
return ((_a = retentionView(raw)) == null ? void 0 : _a.holdsSends) ?? false;
|
|
261
389
|
}
|
|
262
390
|
async function retireExpiredSessionRecords({
|
|
263
391
|
backend,
|
|
264
392
|
mounted,
|
|
265
393
|
maxAgeMs,
|
|
394
|
+
quota = false,
|
|
266
395
|
now = Date.now()
|
|
267
396
|
}) {
|
|
397
|
+
const empty = [];
|
|
268
398
|
for (const key of backend.getAllKeys()) {
|
|
269
399
|
if (!key.startsWith(SESSION_PREFIX) || mounted.has(key)) continue;
|
|
270
|
-
const
|
|
271
|
-
if (
|
|
400
|
+
const view = retentionView(backend.getItem(key));
|
|
401
|
+
if ((view == null ? void 0 : view.savedAt) === void 0 || view.holdsSends) continue;
|
|
402
|
+
empty.push({ key, savedAt: view.savedAt });
|
|
403
|
+
}
|
|
404
|
+
empty.sort((a, b) => b.savedAt - a.savedAt);
|
|
405
|
+
const quotaStart = Math.floor(empty.length / 2);
|
|
406
|
+
for (const [index, { key, savedAt }] of empty.entries()) {
|
|
407
|
+
const expired = now - savedAt > maxAgeMs;
|
|
408
|
+
if (!expired && !(quota && index >= quotaStart)) continue;
|
|
272
409
|
await backend.withUnused(key, async () => {
|
|
273
|
-
if (mounted.has(key)
|
|
274
|
-
|
|
410
|
+
if (mounted.has(key)) return;
|
|
411
|
+
const again = retentionView(backend.getItem(key));
|
|
412
|
+
if ((again == null ? void 0 : again.savedAt) !== savedAt || again.holdsSends) return;
|
|
275
413
|
backend.removeItem(key);
|
|
276
414
|
});
|
|
277
415
|
}
|
|
@@ -284,26 +422,63 @@ function sharedBackend({
|
|
|
284
422
|
let shared = sharedBackends.get(storage);
|
|
285
423
|
if (shared === void 0) {
|
|
286
424
|
const listeners = /* @__PURE__ */ new Set();
|
|
425
|
+
const mounted = /* @__PURE__ */ new Map();
|
|
426
|
+
const maxAgeMs = /* @__PURE__ */ new Map();
|
|
427
|
+
const inner = browserBackend({ storage, locks });
|
|
287
428
|
shared = {
|
|
288
429
|
listeners,
|
|
289
|
-
mounted
|
|
430
|
+
mounted,
|
|
431
|
+
maxAgeMs,
|
|
290
432
|
backend: quotaTolerantBackend({
|
|
291
|
-
inner
|
|
433
|
+
inner,
|
|
292
434
|
onDegraded: (degradation) => {
|
|
293
435
|
for (const listener of listeners) listener(degradation);
|
|
294
|
-
}
|
|
436
|
+
},
|
|
437
|
+
onQuota: () => retireExpiredSessionRecords({
|
|
438
|
+
backend: inner,
|
|
439
|
+
mounted,
|
|
440
|
+
maxAgeMs: Math.max(7 * DAY_MS, ...maxAgeMs.values()),
|
|
441
|
+
quota: true
|
|
442
|
+
})
|
|
295
443
|
})
|
|
296
444
|
};
|
|
297
445
|
sharedBackends.set(storage, shared);
|
|
298
446
|
}
|
|
299
447
|
return shared;
|
|
300
448
|
}
|
|
449
|
+
async function underLock({
|
|
450
|
+
locks,
|
|
451
|
+
name,
|
|
452
|
+
fn,
|
|
453
|
+
onRefused
|
|
454
|
+
}) {
|
|
455
|
+
let granted = false;
|
|
456
|
+
try {
|
|
457
|
+
return await locks.request(name, async () => {
|
|
458
|
+
granted = true;
|
|
459
|
+
return fn();
|
|
460
|
+
});
|
|
461
|
+
} catch (error) {
|
|
462
|
+
if (granted) throw error;
|
|
463
|
+
onRefused(error);
|
|
464
|
+
return fn();
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
function newTabId() {
|
|
468
|
+
var _a, _b;
|
|
469
|
+
const host = globalThis;
|
|
470
|
+
return ((_b = (_a = host.crypto) == null ? void 0 : _a.randomUUID) == null ? void 0 : _b.call(_a)) ?? `tab-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
471
|
+
}
|
|
301
472
|
const useQuotaSafeLocalStorageSession = ({
|
|
302
473
|
threadId,
|
|
303
|
-
|
|
474
|
+
namespace,
|
|
475
|
+
principal,
|
|
476
|
+
unscopedPrefix,
|
|
304
477
|
ttl = 7 * DAY_MS,
|
|
305
478
|
max = 50,
|
|
306
|
-
|
|
479
|
+
recordBytes = LOCAL_SESSION_RECORD_BYTES,
|
|
480
|
+
onStorageDegraded,
|
|
481
|
+
onEvict
|
|
307
482
|
}) => {
|
|
308
483
|
var _a;
|
|
309
484
|
const storage = browserGlobals.localStorage;
|
|
@@ -316,18 +491,31 @@ const useQuotaSafeLocalStorageSession = ({
|
|
|
316
491
|
throw new Error(
|
|
317
492
|
"statewire: QuotaSafeLocalStorageSession requires the Web Locks API (navigator.locks)"
|
|
318
493
|
);
|
|
319
|
-
const sessionKey =
|
|
494
|
+
const sessionKey = localStorageSessionKey({ namespace, principal, threadId });
|
|
320
495
|
const storageKey = SESSION_PREFIX + sessionKey;
|
|
321
496
|
const lockName = SESSION_LOCK_PREFIX + sessionKey;
|
|
322
497
|
const mountedScope = useRef({
|
|
323
498
|
threadId,
|
|
324
499
|
laneKey: sessionKey
|
|
325
500
|
});
|
|
326
|
-
if (!isSameSessionLaneScope({
|
|
501
|
+
if (!isSameSessionLaneScope({
|
|
502
|
+
scope: mountedScope.current,
|
|
503
|
+
key: (id) => localStorageSessionKey({ namespace, principal, threadId: id })
|
|
504
|
+
})) {
|
|
327
505
|
throw new Error(
|
|
328
506
|
"statewire: principal changed; remount the account's thread/session"
|
|
329
507
|
);
|
|
330
508
|
}
|
|
509
|
+
useMemo(() => {
|
|
510
|
+
if (unscopedPrefix === void 0) return;
|
|
511
|
+
adoptUnscopedLocalStorageSessions({
|
|
512
|
+
namespace,
|
|
513
|
+
principal,
|
|
514
|
+
unscopedPrefix,
|
|
515
|
+
threadId,
|
|
516
|
+
storage
|
|
517
|
+
});
|
|
518
|
+
}, [namespace, principal, unscopedPrefix, threadId, storage]);
|
|
331
519
|
const latestOnDegraded = useRef(onStorageDegraded);
|
|
332
520
|
latestOnDegraded.current = onStorageDegraded;
|
|
333
521
|
const reportDegradation = useMemo(() => {
|
|
@@ -350,6 +538,18 @@ const useQuotaSafeLocalStorageSession = ({
|
|
|
350
538
|
);
|
|
351
539
|
};
|
|
352
540
|
}, []);
|
|
541
|
+
const latestOnEvict = useRef(onEvict);
|
|
542
|
+
latestOnEvict.current = onEvict;
|
|
543
|
+
const reportEvict = useCallback(
|
|
544
|
+
(event) => {
|
|
545
|
+
var _a2;
|
|
546
|
+
try {
|
|
547
|
+
(_a2 = latestOnEvict.current) == null ? void 0 : _a2.call(latestOnEvict, event);
|
|
548
|
+
} catch {
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
[]
|
|
552
|
+
);
|
|
353
553
|
const shared = sharedBackend({ storage, locks });
|
|
354
554
|
shared.listeners.add(reportDegradation);
|
|
355
555
|
useEffect(() => {
|
|
@@ -359,8 +559,9 @@ const useQuotaSafeLocalStorageSession = ({
|
|
|
359
559
|
};
|
|
360
560
|
}, [shared, reportDegradation]);
|
|
361
561
|
useEffect(() => {
|
|
362
|
-
const { mounted } = shared;
|
|
562
|
+
const { mounted, maxAgeMs } = shared;
|
|
363
563
|
mounted.set(storageKey, (mounted.get(storageKey) ?? 0) + 1);
|
|
564
|
+
maxAgeMs.set(storageKey, ttl);
|
|
364
565
|
retireExpiredSessionRecords({
|
|
365
566
|
backend: shared.backend,
|
|
366
567
|
mounted,
|
|
@@ -370,10 +571,23 @@ const useQuotaSafeLocalStorageSession = ({
|
|
|
370
571
|
);
|
|
371
572
|
return () => {
|
|
372
573
|
const count = (mounted.get(storageKey) ?? 1) - 1;
|
|
373
|
-
if (count === 0)
|
|
374
|
-
|
|
574
|
+
if (count === 0) {
|
|
575
|
+
mounted.delete(storageKey);
|
|
576
|
+
maxAgeMs.delete(storageKey);
|
|
577
|
+
} else mounted.set(storageKey, count);
|
|
375
578
|
};
|
|
376
579
|
}, [shared, storageKey, ttl, reportDegradation]);
|
|
580
|
+
const [tabId] = useState(newTabId);
|
|
581
|
+
useEffect(() => {
|
|
582
|
+
let release;
|
|
583
|
+
const held = new Promise((resolve) => {
|
|
584
|
+
release = resolve;
|
|
585
|
+
});
|
|
586
|
+
Promise.resolve(locks.request(TAB_LOCK_PREFIX + tabId, () => held)).catch(
|
|
587
|
+
(error) => reportDegradation({ operation: "lock", key: storageKey, error })
|
|
588
|
+
);
|
|
589
|
+
return () => release == null ? void 0 : release();
|
|
590
|
+
}, [locks, tabId, storageKey, reportDegradation]);
|
|
377
591
|
useEffect(() => {
|
|
378
592
|
let release;
|
|
379
593
|
let disposed = false;
|
|
@@ -414,31 +628,42 @@ const useQuotaSafeLocalStorageSession = ({
|
|
|
414
628
|
const sessionStorage = useResource(
|
|
415
629
|
KeyValueSessionStorage({
|
|
416
630
|
backend: shared.backend,
|
|
417
|
-
key:
|
|
418
|
-
namespace: SESSION_PREFIX,
|
|
631
|
+
key: threadId,
|
|
632
|
+
namespace: SESSION_PREFIX + namespace,
|
|
633
|
+
principal,
|
|
419
634
|
protocol: DEEP_AGENT_STATEWIRE_PROTOCOL,
|
|
420
635
|
migrate,
|
|
636
|
+
// statewire 0.27.1 retires a record past maxAgeMs even while it holds
|
|
637
|
+
// sends: kept failures with their full params were what filled the
|
|
638
|
+
// origin (#52031).
|
|
421
639
|
retention: { maxAgeMs: ttl, maxEntries: max },
|
|
640
|
+
limits: { recordBytes },
|
|
422
641
|
// A failure statewire raises itself (a structurally invalid stored
|
|
423
642
|
// record) still stops the session; it is at least reported the same way.
|
|
424
|
-
onError: (error) => reportDegradation({ operation: "session", key: storageKey, error })
|
|
643
|
+
onError: (error) => reportDegradation({ operation: "session", key: storageKey, error }),
|
|
644
|
+
onEvict: reportEvict
|
|
425
645
|
})
|
|
426
646
|
);
|
|
427
647
|
return useMemo(
|
|
428
648
|
() => ({
|
|
429
649
|
...sessionStorage,
|
|
430
|
-
lock:
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
650
|
+
lock: (fn) => underLock({
|
|
651
|
+
locks,
|
|
652
|
+
name: lockName,
|
|
653
|
+
fn,
|
|
654
|
+
onRefused: (error) => reportDegradation({ operation: "lock", key: storageKey, error })
|
|
655
|
+
}),
|
|
656
|
+
notifyLock: (fn) => underLock({
|
|
657
|
+
locks,
|
|
658
|
+
name: NOTIFY_LOCK_PREFIX + storageKey,
|
|
659
|
+
fn,
|
|
660
|
+
onRefused: (error) => reportDegradation({ operation: "lock", key: storageKey, error })
|
|
661
|
+
}),
|
|
662
|
+
owner: {
|
|
663
|
+
id: tabId,
|
|
664
|
+
whenGone: (id, signal) => Promise.resolve(
|
|
665
|
+
locks.request(TAB_LOCK_PREFIX + id, { signal }, () => void 0)
|
|
666
|
+
)
|
|
442
667
|
},
|
|
443
668
|
subscribe: (listener) => {
|
|
444
669
|
var _a2;
|
|
@@ -452,20 +677,25 @@ const useQuotaSafeLocalStorageSession = ({
|
|
|
452
677
|
};
|
|
453
678
|
}
|
|
454
679
|
}),
|
|
455
|
-
[sessionStorage, locks, storageKey, lockName, reportDegradation]
|
|
680
|
+
[sessionStorage, locks, storageKey, lockName, tabId, reportDegradation]
|
|
456
681
|
);
|
|
457
682
|
};
|
|
458
683
|
const QuotaSafeLocalStorageSession = resource(
|
|
459
684
|
useQuotaSafeLocalStorageSession
|
|
460
685
|
);
|
|
461
686
|
export {
|
|
687
|
+
LOCAL_SESSION_RECORD_BYTES,
|
|
462
688
|
QuotaSafeLocalStorageSession,
|
|
463
689
|
STORED_STATEMENT_WIRE_FLOOR,
|
|
690
|
+
adoptUnscopedLocalStorageSessions,
|
|
464
691
|
isStorageQuotaError,
|
|
692
|
+
localStorageSessionKey,
|
|
465
693
|
parkIncompatibleSessionCommands,
|
|
694
|
+
persistedSessionHoldsSends,
|
|
466
695
|
quotaTolerantBackend,
|
|
467
696
|
readFailedSendStampsFromRecord,
|
|
468
697
|
readPersistedFailedSendStamps,
|
|
469
|
-
retireExpiredSessionRecords
|
|
698
|
+
retireExpiredSessionRecords,
|
|
699
|
+
sessionPrincipal
|
|
470
700
|
};
|
|
471
701
|
//# sourceMappingURL=quota-safe-local-storage-session.js.map
|