@athenaintel/react 0.57.2 → 0.59.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 +759 -9
- 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.map +1 -1
- package/dist/agent-runtime/src/composer-markdown.d.ts +1 -1
- 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 +66 -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 +12 -0
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.js +12 -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 +290 -97
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +80 -4
- package/dist/chat/AthenaChat.js +290 -97
- 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 +3 -0
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +3 -2
- package/dist/chat-ui/index.js +3 -0
- package/dist/chat-ui/index.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.js +2 -2
- 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 +2 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.js +3 -1
- 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 +36 -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 +42 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.js +36 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +235 -19
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +88 -10
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +236 -20
- 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/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 +17 -5
- package/dist/collab/client.cjs.map +1 -1
- package/dist/collab/client.d.ts +22 -7
- package/dist/collab/client.js +17 -5
- 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/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 +458 -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 +458 -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 +56 -19
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +24 -8
- package/dist/provider/AthenaProvider.js +57 -20
- 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/types.cjs +5 -0
- package/dist/references/src/anchors/types.cjs.map +1 -1
- 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/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 +65 -8
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +26 -10
- package/dist/runtime/useAthenaStatewireRuntime.js +67 -10
- 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/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 +425 -0
- package/dist/tools/drive-tool-uis.cjs.map +1 -0
- package/dist/tools/drive-tool-uis.d.ts +120 -0
- package/dist/tools/drive-tool-uis.js +425 -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/workbench/session-workbench-panes.cjs +6 -6
- package/dist/workbench/session-workbench-panes.cjs.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-task-tool-ui.cjs","sources":["../../src/tools/subagent-task-tool-ui.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * The subagent card: one `task` call the deep agent delegated, shown the way\n * Olympus shows a subagent lane.\n *\n * - On the card: where the lane is (queued, running, done, failed, stopped),\n * how many tool calls it made (the wire's cut marker counts a lane whose\n * card carries only its newest steps), how long it has run, and while it\n * runs, its newest step; a finished lane's report, or why it failed, under\n * it, clamped.\n * - Behind its disclosure: the lane's steps, live while it runs, ending on\n * what the lane ended on, whole (a failure, or a report no step carries),\n * so a lane with no steps still opens to its full result. The lane is\n * assistant-ui's native nested thread: the `task` part's `messages`, which\n * the SDK runtime's opt-in conversion fills\n * (`createSubagentTranscriptConversionCache`), rendered read-only under\n * `ReadonlyThreadProvider` with the chat's own tool UIs. A cut lane (a\n * running card always; a finished one when the provider declares the\n * lane-cut contract, `subagentLaneHistory`) says how many of its steps it\n * shows, and \"Load earlier steps\" reads the rest with `history/lane`\n * (`useDeepAgentLaneHistory`), a read under the thread's own attach.\n *\n * A read-only nested thread has no statewire thread behind it: a `task` call\n * inside a subagent's own steps renders as a static row, and the steps are\n * their own error boundary, so a tool UI that throws there never takes the\n * chat down with it.\n */\nimport {\n getExternalStoreMessages,\n MessagePrimitive,\n ReadonlyThreadProvider,\n type ThreadMessage,\n ThreadPrimitive,\n type ToolCallMessagePartComponent,\n type ToolCallMessagePartProps,\n type ToolCallMessagePartStatus,\n useAuiState,\n} from \"@assistant-ui/react\";\nimport type { LangChainMessage } from \"@assistant-ui/react-langgraph\";\nimport {\n createSubagentLaneConversion,\n deepAgentRowKey,\n hasStatewireThreadExtras,\n SUBAGENT_AWAITING_APPROVAL_LABEL,\n salientToolCallDetail,\n type SubagentDiscoverySnapshot,\n type SubagentLaneApprovalWait,\n type SubagentStatus,\n subagentApprovalNoteLabel,\n taskSubagentsOfTurn,\n turnLaneApprovalWait,\n useDeepAgentLaneHistory,\n withLaneReport,\n} from \"@athenaintel/agent-runtime\";\nimport { QueryClientProvider } from \"@tanstack/react-query\";\nimport {\n AlertCircleIcon,\n BotIcon,\n CheckIcon,\n ChevronDownIcon,\n CircleDashedIcon,\n LoaderIcon,\n ShieldAlertIcon,\n XCircleIcon,\n} from \"lucide-react\";\nimport {\n Component,\n createContext,\n type ErrorInfo,\n type FC,\n memo,\n type ReactNode,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { useApprovalWaitInScope } from \"../chat/use-statewire-approval-request\";\nimport { MESSAGE_CREATED_AT_KEY } from \"../chat/message-time\";\nimport { formatWorkDuration, readInstantMs } from \"../chat/super-grouping/turn-timing\";\nimport { athenaDiagnostics } from \"../diagnostics/athena-diagnostics\";\nimport { useAthenaQueryClient } from \"../lib/use-athena-rest-query\";\nimport { cn } from \"../lib/utils\";\nimport { CollapsibleTrigger } from \"../ui/collapsible\";\nimport { useNestedPtcComponents } from \"./NestedPtcMessages\";\nimport { StepText } from \"./step-text\";\nimport { useToolAppearance } from \"./tool-appearance\";\nimport { ToolFallback, ToolFallbackContent, ToolFallbackRoot } from \"./tool-fallback\";\nimport { humanizeToolName, summarizeToolCall, type ToolCallSummary } from \"./tool-summary\";\n\nconst NO_LANE_STEPS: readonly LangChainMessage[] = [];\nconst NOT_AWAITING_APPROVAL: SubagentLaneApprovalWait = { awaitingApproval: false, gatedCall: undefined };\nconst NO_MESSAGES: readonly ThreadMessage[] = [];\n\n// ─── What the card says ──────────────────────────────────────────────\n// Pure: where a lane is, how long it ran, the step it took last, and the\n// note over a cut lane's steps, tested without rendering the card.\n\n/**\n * Where a lane is, as the card shows it: the lane's own status, except that a\n * lane parked on a person's approval is `approval` (its own dispatch, or a call\n * it made, is a gated call nobody has answered; read as Spaces and the phone\n * read it, agent-runtime's `turnLaneApprovalWait`), any other call the run\n * waits on an answer for is `waiting`, and one the run stopped before it\n * settled is `stopped`.\n */\nexport type SubagentLanePhase =\n | \"queued\"\n | \"approval\"\n | \"waiting\"\n | \"running\"\n | \"complete\"\n | \"error\"\n | \"stopped\";\n\nexport const SUBAGENT_LANE_PHASE_LABELS: Record<SubagentLanePhase, string> = {\n queued: \"Queued\",\n approval: SUBAGENT_AWAITING_APPROVAL_LABEL,\n waiting: \"Waiting for you\",\n running: \"Running\",\n complete: \"Done\",\n error: \"Failed\",\n stopped: \"Stopped\",\n};\n\n/** The lane's phase from its status, the status assistant-ui gives its part, and the run's approval. */\nexport function subagentLanePhase({\n status,\n partStatus,\n awaitingApproval = false,\n}: {\n status: SubagentStatus;\n partStatus: ToolCallMessagePartStatus | undefined;\n /** The lane waits on a person's approval (agent-runtime's `turnLaneApprovalWait`). */\n awaitingApproval?: boolean;\n}): SubagentLanePhase {\n if (status === \"complete\" || status === \"error\") return status;\n if (awaitingApproval) return \"approval\";\n if (partStatus?.type === \"requires-action\") return \"waiting\";\n if (partStatus?.type === \"incomplete\") {\n return partStatus.reason === \"cancelled\" ? \"stopped\" : \"error\";\n }\n return status;\n}\n\n/** The phases a lane never leaves. */\nexport function isSettledSubagentLanePhase(phase: SubagentLanePhase): boolean {\n return phase === \"complete\" || phase === \"error\" || phase === \"stopped\";\n}\n\n/**\n * What a settled lane ended on, whole: its report, or why it failed. A lane\n * that the run's own failure ended has no result of its own, so the `task`\n * part's status says why (as the generic card shows a failed call). Empty\n * while the lane runs.\n */\nexport function subagentLaneResult({\n output,\n phase,\n partStatus,\n}: {\n /** The lane's own result text (`SubagentDiscoverySnapshot.output`). */\n output: string | undefined;\n phase: SubagentLanePhase;\n partStatus: ToolCallMessagePartStatus | undefined;\n}): string {\n if (!isSettledSubagentLanePhase(phase)) return \"\";\n const own = output?.trim() ?? \"\";\n if (own !== \"\" || phase !== \"error\" || partStatus?.type !== \"incomplete\") return own;\n const { error } = partStatus;\n if (error === undefined || error === null) return \"\";\n return (typeof error === \"string\" ? error : JSON.stringify(error)).trim();\n}\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n return value && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\n/**\n * How long a finished lane ran, measured by the server: the `task` result's\n * `_started_at` and `_created_at`, which the deep agent's tool-call timing\n * stamps on every tool result and mirrors onto its artifact (the one field of\n * a tool message the converter hands the tool-call part). `null` when either\n * stamp is missing.\n */\nexport function finishedLaneDurationMs(artifact: unknown): number | null {\n const stamps = record(artifact);\n const startedAt = readInstantMs(stamps?._started_at);\n const finishedAt = readInstantMs(stamps?.[MESSAGE_CREATED_AT_KEY]);\n return startedAt !== null && finishedAt !== null && finishedAt >= startedAt\n ? finishedAt - startedAt\n : null;\n}\n\nconst ASSISTANT_TYPES: ReadonlySet<unknown> = new Set([\"ai\", \"AIMessageChunk\"]);\n\n/**\n * When the agent delegated the call `toolCallId`: the server stamp\n * (`_created_at`) of the assistant message that made it, among the raw\n * messages bound to the turn. A running lane's card carries no stamp of its\n * own, so its clock counts from here, the way the turn header counts from the\n * turn's own stamps. `null` without one.\n */\nexport function laneDelegatedAtMs({\n sources,\n toolCallId,\n}: {\n sources: readonly unknown[];\n toolCallId: string;\n}): number | null {\n for (const source of sources) {\n const message = record(source);\n if (!message || !ASSISTANT_TYPES.has(message.type)) continue;\n const calls = message.tool_calls;\n if (!Array.isArray(calls) || !calls.some((call) => record(call)?.id === toolCallId)) continue;\n const kwargs = record(message.additional_kwargs);\n const metadata = record(kwargs?.metadata);\n return (\n readInstantMs(metadata?.[MESSAGE_CREATED_AT_KEY]) ??\n readInstantMs(kwargs?.[MESSAGE_CREATED_AT_KEY]) ??\n readInstantMs(message[MESSAGE_CREATED_AT_KEY])\n );\n }\n return null;\n}\n\n/**\n * The lane's newest tool step as its summary line (\"Read `routes.ts`\",\n * \"Running `npm test`\"), from the lane's converted steps: the last tool call\n * of its newest assistant turn, worded for whether it has answered. `null`\n * before the lane's first tool call.\n */\nexport function latestLaneStep(messages: readonly ThreadMessage[]): ToolCallSummary | null {\n for (let index = messages.length - 1; index >= 0; index -= 1) {\n const message = messages[index];\n if (message?.role !== \"assistant\") continue;\n for (let partIndex = message.content.length - 1; partIndex >= 0; partIndex -= 1) {\n const part = message.content[partIndex];\n if (part?.type !== \"tool-call\") continue;\n const answered = part.result !== undefined && part.isPreliminary !== true;\n return summarizeToolCall({\n toolName: part.toolName,\n args: part.args,\n result: answered ? part.result : undefined,\n status: answered ? (part.isError === true ? \"error\" : \"complete\") : \"running\",\n });\n }\n }\n return null;\n}\n\n/**\n * The subagent's type as the card names it: the `task` call's `subagent_type`\n * in words, with the default `general-purpose` agent as \"Subagent\".\n */\nexport function subagentTypeLabel(name: string): string {\n const trimmed = name.trim();\n if (trimmed === \"\" || trimmed === \"subagent\" || trimmed === \"general-purpose\") return \"Subagent\";\n return humanizeToolName(trimmed);\n}\n\n/** \"1 tool call\", \"12 tool calls\". */\nexport function toolCallCountLabel(count: number): string {\n return `${count} tool call${count === 1 ? \"\" : \"s\"}`;\n}\n\n/** \"1 step\", \"12 steps\". */\nfunction stepsLabel(count: number): string {\n return `${count} step${count === 1 ? \"\" : \"s\"}`;\n}\n\n/** What the steps panel says about the steps it shows of a cut lane. */\nexport function laneStepsNote({\n shown,\n total,\n arrivesLater,\n}: {\n /** Steps the panel shows. */\n shown: number;\n /** Steps the lane stores (its cut marker), when the card carries fewer. */\n total: number | undefined;\n /**\n * A running lane on a host that pages no running lane: its card brings the\n * rest once the subagent finishes.\n */\n arrivesLater: boolean;\n}): string | null {\n if (total === undefined || total <= shown) return null;\n const leftOff = total - shown;\n return arrivesLater\n ? `Showing the latest steps. ${leftOff} earlier ${leftOff === 1 ? \"step arrives\" : \"steps arrive\"} when this subagent finishes.`\n : `Showing the latest ${shown} of ${stepsLabel(total)}.`;\n}\n\n/**\n * Whether this card renders inside a read-only nested thread (a subagent's own\n * steps, under `ReadonlyThreadProvider`), whose thread has no statewire\n * extras. Never throws: rendered outside any thread, it is not nested.\n */\nfunction useInReadOnlyThread(): boolean {\n return useAuiState((s) => {\n const thread = s.optional?.thread;\n return thread !== undefined && !hasStatewireThreadExtras(thread.extras);\n });\n}\n\n/** A lane for a call agent-runtime read no lane for: what its arguments say, queued. */\nfunction laneFromArgs(toolCallId: string, args: unknown): SubagentDiscoverySnapshot {\n const record = typeof args === \"object\" && args !== null ? (args as Record<string, unknown>) : {};\n return {\n id: toolCallId,\n name: typeof record.subagent_type === \"string\" ? record.subagent_type : \"subagent\",\n description: typeof record.description === \"string\" ? record.description : \"\",\n status: \"queued\",\n toolCallCount: 0,\n messages: NO_MESSAGES,\n messageCount: 0,\n currentText: \"\",\n };\n}\n\n// ─── Status glyph ────────────────────────────────────────────────────\n\nfunction LaneStatusGlyph({ phase }: { phase: SubagentLanePhase }) {\n const glyph =\n phase === \"running\" ? (\n <LoaderIcon className=\"size-3.5 animate-spin text-muted-foreground motion-reduce:animate-none\" />\n ) : phase === \"complete\" ? (\n <CheckIcon className=\"size-3.5 text-emerald-600\" />\n ) : phase === \"error\" ? (\n <AlertCircleIcon className=\"size-3.5 text-destructive\" />\n ) : phase === \"stopped\" ? (\n <XCircleIcon className=\"size-3.5 text-muted-foreground\" />\n ) : phase === \"waiting\" || phase === \"approval\" ? (\n <ShieldAlertIcon className=\"size-3.5 text-amber-600\" />\n ) : (\n <CircleDashedIcon className=\"size-3.5 text-muted-foreground motion-safe:animate-pulse\" />\n );\n return (\n <span\n data-slot=\"subagent-status\"\n data-phase={phase}\n aria-hidden=\"true\"\n className=\"mt-0.5 flex size-4 shrink-0 items-center justify-center\"\n >\n {glyph}\n </span>\n );\n}\n\n// ─── Clock ───────────────────────────────────────────────────────────\n\n/**\n * How long a running lane has run: since `startMs` (the server's stamp on the\n * delegating message), else since this card saw it running; `null` while it\n * does not run. Ticks once a second off the wall clock.\n */\nfunction useRunningElapsedMs(running: boolean, startMs: number | null): number | null {\n const [clock, setClock] = useState<{ seenAt: number; now: number } | null>(null);\n useEffect(() => {\n if (!running) {\n setClock(null);\n return undefined;\n }\n const seenAt = Date.now();\n setClock({ seenAt, now: seenAt });\n const timer = setInterval(() => setClock({ seenAt, now: Date.now() }), 1000);\n return () => clearInterval(timer);\n }, [running]);\n if (!running || clock === null) return null;\n return Math.max(0, clock.now - (startMs ?? clock.seenAt));\n}\n\n// ─── The lane's steps ────────────────────────────────────────────────\n\ntype NestedPartsComponents = ReturnType<typeof useNestedPtcComponents>;\n\nconst LaneStepComponentsContext = createContext<NestedPartsComponents | null>(null);\n\nconst EmptyStepPart: FC = () => null;\n\n/**\n * One row of the lane: an assistant turn's parts, through the chat's own\n * renderers (`NestedPtcComponentsProvider`, which `AthenaChat` mounts). The\n * subagent's brief (its user message) is the card's own description, so it is\n * not repeated.\n */\nconst LaneStep: FC = () => {\n const role = useAuiState((s) => s.message.role);\n const components = useContext(LaneStepComponentsContext);\n if (role !== \"assistant\") return null;\n return <MessagePrimitive.Parts components={{ Empty: EmptyStepPart, ...components }} />;\n};\n\nconst LANE_ROW_COMPONENTS = { Message: LaneStep };\n\nconst ROW_KEY_SEPARATOR = \"\\u0000\";\n\n/**\n * The nested thread's rows, each under its row key (`deepAgentRowKey`): the\n * lane's turn keeps its row while the card's cut drops its oldest steps and\n * when earlier pages land, so what the person opened in it stays open.\n */\nfunction LaneRows() {\n const joinedKeys = useAuiState((s) =>\n s.thread.messages.map((message) => deepAgentRowKey(message)).join(ROW_KEY_SEPARATOR),\n );\n const rowKeys = useMemo(\n () => (joinedKeys === \"\" ? [] : joinedKeys.split(ROW_KEY_SEPARATOR)),\n [joinedKeys],\n );\n return (\n <>\n {rowKeys.map((key, index) => (\n <ThreadPrimitive.MessageByIndex key={key} index={index} components={LANE_ROW_COMPONENTS} />\n ))}\n </>\n );\n}\n\ninterface LaneStepsBoundaryProps {\n name: string;\n children: ReactNode;\n}\n\n/**\n * The steps' own boundary: they render the chat's tool UIs (a host's own\n * among them) in a nested thread no statewire thread backs, and a card that\n * throws there must not take the chat down. Reported like a chat render\n * crash, with the lane named.\n */\nclass LaneStepsBoundary extends Component<LaneStepsBoundaryProps, { failed: boolean }> {\n constructor(props: LaneStepsBoundaryProps) {\n super(props);\n this.state = { failed: false };\n }\n\n static getDerivedStateFromError(): { failed: boolean } {\n return { failed: true };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n athenaDiagnostics.error(\n \"sdk.error\",\n error,\n {\n code: \"chat_render_crash\",\n message: \"A subagent's steps could not be shown\",\n hint: \"Inspect component_stack: a tool UI that reads the live thread fails inside a subagent's read-only steps.\",\n },\n {\n surface: \"subagent-lane\",\n subagent: this.props.name,\n component_stack: errorInfo.componentStack?.slice(0, 2000) ?? null,\n },\n );\n }\n\n render(): ReactNode {\n if (this.state.failed) {\n return (\n <p role=\"alert\" className=\"px-1 text-xs text-muted-foreground\">\n These steps couldn't be shown. The conversation is not affected.\n </p>\n );\n }\n return this.props.children;\n }\n}\n\n/** The host's `QueryClient` when one is in context, else one of the panel's own (`useAthenaQueryClient`). */\nfunction LaneQueryScope({ children }: { children: ReactNode }) {\n const queryClient = useAthenaQueryClient();\n return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;\n}\n\ninterface LaneStepsProps {\n lane: SubagentDiscoverySnapshot;\n phase: SubagentLanePhase;\n /** What the lane ended on, whole (`subagentLaneResult`); empty while it runs. */\n result: string;\n /** The `task` part's own nested thread, shown if the panel cannot convert the lane itself. */\n partMessages: readonly ThreadMessage[] | undefined;\n}\n\n/**\n * The open card's steps: the lane the card carries, and the earlier steps the\n * person asks for. The panel converts the lane itself, with one conversion\n * memory while it is open (`createSubagentLaneConversion`), so the lane's turn\n * keeps its row key as the cut slides and pages land. It ends on what the lane\n * ended on, whole and selectable: the card clamps it.\n */\nfunction LaneSteps({ lane, phase, result, partMessages }: LaneStepsProps) {\n // The lane's card is its running placeholder, whether it streams or waits on an approval.\n const running = lane.status === \"running\" && (phase === \"running\" || phase === \"approval\");\n const source = lane.source;\n const history = useDeepAgentLaneHistory({\n messageId: source?.messageId,\n lane: source?.lane,\n carried: source?.transcript ?? NO_LANE_STEPS,\n total: source?.truncated?.messages,\n finished: source?.truncated?.finished === true,\n });\n const [convertLane] = useState(() => createSubagentLaneConversion());\n // A `task` lane that finished ends on its report, the card's content, even\n // when its stored transcript does not (`withLaneReport`), as in Olympus's drawer.\n const report =\n lane.status === \"complete\" && source?.messageId !== undefined ? lane.output : undefined;\n const messages =\n (source === undefined\n ? undefined\n : convertLane(withLaneReport(history.steps, report), running)) ??\n partMessages ??\n NO_MESSAGES;\n const components = useNestedPtcComponents(ToolFallback);\n const shown = history.steps.length;\n // A running card on a host that pages no running lane carries the rest once it finishes.\n const arrivesLater = running && source?.messageId !== undefined && !history.available;\n const note = laneStepsNote({ shown, total: history.total, arrivesLater });\n const emptyText =\n phase === \"running\"\n ? \"Starting…\"\n : phase === \"queued\" || phase === \"waiting\" || phase === \"approval\"\n ? \"Not started yet.\"\n : \"No steps were recorded for this subagent.\";\n // Why a lane failed is never one of its steps; a report is the closing\n // step of a lane with steps to close (`withLaneReport`).\n const failed = phase === \"error\";\n const closing = failed || messages.length === 0 ? result : \"\";\n\n return (\n <div data-slot=\"subagent-steps\" className=\"flex min-w-0 flex-col gap-2 px-2.5\">\n {lane.description ? (\n <p\n data-slot=\"subagent-brief\"\n className=\"whitespace-pre-wrap break-words text-xs leading-relaxed text-muted-foreground\"\n >\n {lane.description}\n </p>\n ) : null}\n {note ? (\n <div\n data-slot=\"subagent-steps-note\"\n className=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground\"\n >\n <span>{note}</span>\n {history.hasEarlier && !arrivesLater ? (\n <button\n type=\"button\"\n onClick={history.loadEarlier}\n disabled={history.loading}\n className=\"rounded font-medium text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-default disabled:no-underline disabled:opacity-60\"\n >\n {history.loading ? \"Loading earlier steps…\" : \"Load earlier steps\"}\n </button>\n ) : null}\n </div>\n ) : null}\n {messages.length > 0 ? (\n <LaneStepsBoundary name={lane.name}>\n <LaneStepComponentsContext.Provider value={components}>\n <ReadonlyThreadProvider messages={messages}>\n <div data-slot=\"subagent-step-rows\" className=\"flex min-w-0 flex-col gap-1\">\n <LaneRows />\n </div>\n </ReadonlyThreadProvider>\n </LaneStepComponentsContext.Provider>\n </LaneStepsBoundary>\n ) : (\n <p className=\"text-xs text-muted-foreground\">{emptyText}</p>\n )}\n {closing ? (\n <div data-slot=\"subagent-result\" className=\"flex min-w-0 flex-col gap-0.5\">\n <p\n className={cn(\n \"text-xs font-medium\",\n failed ? \"text-destructive\" : \"text-muted-foreground\",\n )}\n >\n {failed ? \"Error\" : \"Report\"}\n </p>\n <p\n data-slot=\"subagent-result-text\"\n className={cn(\n \"max-h-72 overflow-auto whitespace-pre-wrap break-words text-xs leading-relaxed\",\n failed ? \"text-destructive/80\" : \"text-foreground/80\",\n )}\n >\n {closing}\n </p>\n </div>\n ) : null}\n </div>\n );\n}\n\n// ─── The card ────────────────────────────────────────────────────────\n\n/** The card's second line: where the lane is, its tool calls, how long it ran. */\nfunction laneMeta({\n phase,\n toolCallCount,\n elapsedMs,\n}: {\n phase: SubagentLanePhase;\n toolCallCount: number;\n elapsedMs: number | null;\n}): string {\n const parts: string[] = [SUBAGENT_LANE_PHASE_LABELS[phase]];\n if (toolCallCount > 0 || isSettledSubagentLanePhase(phase)) {\n parts.push(toolCallCountLabel(toolCallCount));\n }\n if (elapsedMs !== null && (phase !== \"running\" || elapsedMs >= 1000)) {\n parts.push(formatWorkDuration(elapsedMs));\n }\n return parts.join(\" · \");\n}\n\nfunction SubagentTaskCard({ toolCallId, args, status, artifact, messages }: ToolCallMessagePartProps) {\n const appearance = useToolAppearance();\n const isThread = appearance === \"thread\";\n const readLane = useAuiState((s) => taskSubagentsOfTurn(s.message).get(toolCallId));\n const lane = useMemo(\n () => readLane ?? laneFromArgs(toolCallId, args),\n [readLane, toolCallId, args],\n );\n // A lane holding a gated call the run's approval names waits on a person:\n // no live activity, no clock, just what it waits on. Read-only (the approval\n // card answers). A lane opened after its run parked carries no steps, so the\n // turn's other lanes say whether it holds the call (as Spaces reads it); the\n // turn is read only while something waits.\n const { toolCallIds: waitingToolCallIds, actionRequests } = useApprovalWaitInScope();\n const waitingTurn = useAuiState((s) => (waitingToolCallIds.size === 0 ? null : s.message));\n const approvalWait = useMemo<SubagentLaneApprovalWait>(\n () =>\n waitingTurn === null\n ? NOT_AWAITING_APPROVAL\n : turnLaneApprovalWait({\n message: waitingTurn,\n toolCallId,\n toolCallIds: waitingToolCallIds,\n actionRequests,\n }),\n [waitingTurn, toolCallId, waitingToolCallIds, actionRequests],\n );\n const { awaitingApproval, gatedCall } = approvalWait;\n const phase = subagentLanePhase({ status: lane.status, partStatus: status, awaitingApproval });\n const running = phase === \"running\";\n // Only a running lane's clock reads it, so a settled card scans nothing.\n const delegatedAt = useAuiState((s) =>\n running\n ? laneDelegatedAtMs({ sources: getExternalStoreMessages<unknown>(s.message), toolCallId })\n : null,\n );\n const runningElapsed = useRunningElapsedMs(running, delegatedAt);\n const elapsedMs = running\n ? runningElapsed\n : isSettledSubagentLanePhase(phase)\n ? finishedLaneDurationMs(artifact)\n : null;\n const step = useMemo(() => (running ? latestLaneStep(lane.messages) : null), [running, lane.messages]);\n const hasSteps = lane.messageCount > 0 || (lane.omittedMessageCount ?? 0) > 0;\n const typeLabel = subagentTypeLabel(lane.name);\n const title = lane.description.trim() || typeLabel;\n const meta = laneMeta({ phase, toolCallCount: lane.toolCallCount, elapsedMs });\n const liveText = step ? null : lane.currentText.trim();\n const report = subagentLaneResult({ output: lane.output, phase, partStatus: status });\n\n const header = (\n <>\n <LaneStatusGlyph phase={phase} />\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span className=\"flex min-w-0 items-baseline gap-1.5\">\n <span\n data-slot=\"subagent-title\"\n title={lane.description || undefined}\n className=\"min-w-0 truncate font-medium text-foreground\"\n >\n {title}\n </span>\n {title !== typeLabel ? (\n <span\n data-slot=\"subagent-type\"\n className=\"shrink-0 rounded-full bg-muted px-1.5 py-px text-[10px] font-medium text-muted-foreground\"\n >\n {typeLabel}\n </span>\n ) : null}\n </span>\n <span\n data-slot=\"subagent-meta\"\n className={cn(\n \"text-xs tabular-nums text-muted-foreground\",\n phase === \"error\" && \"text-destructive\",\n )}\n >\n {meta}\n </span>\n {phase === \"approval\" ? (\n <span\n data-slot=\"subagent-approval\"\n className=\"flex min-w-0 items-baseline gap-1 text-xs text-muted-foreground\"\n >\n <span className=\"shrink-0 text-amber-700\">{subagentApprovalNoteLabel(approvalWait)}</span>\n {gatedCall ? (\n <>\n <code className=\"shrink-0 rounded bg-foreground/[0.06] px-1 py-px font-mono text-[11px] text-foreground/85\">\n {gatedCall.name}\n </code>\n <span className=\"min-w-0 truncate\">{salientToolCallDetail(gatedCall)}</span>\n </>\n ) : null}\n </span>\n ) : running ? (\n <span data-slot=\"subagent-activity\" className=\"min-w-0 truncate text-xs text-muted-foreground\">\n {step ? (\n <span title={step.detail}>\n <StepText text={step.label} code={step.code} />\n </span>\n ) : (\n liveText || \"Starting…\"\n )}\n </span>\n ) : null}\n </span>\n </>\n );\n\n return (\n <ToolFallbackRoot\n data-testid=\"subagent-task-card\"\n data-phase={phase}\n role=\"group\"\n aria-label={`Subagent: ${title}`}\n className={cn(isThread && phase === \"error\" && \"border-destructive/30 bg-destructive/5\")}\n >\n {/* A report or a failure is behind the disclosure whole, steps or none. */}\n {hasSteps || running || report ? (\n <CollapsibleTrigger\n data-slot=\"subagent-trigger\"\n className={cn(\n \"group/trigger flex w-full min-w-0 items-start gap-2 text-left text-[13px] leading-snug transition-colors hover:bg-muted/40\",\n isThread ? \"rounded-lg px-2.5 py-1.5\" : \"px-3\",\n )}\n >\n {header}\n <ChevronDownIcon\n aria-hidden=\"true\"\n className={cn(\n \"mt-0.5 size-3.5 shrink-0 text-muted-foreground/60\",\n \"transition-transform duration-(--animation-duration) ease-out\",\n \"group-data-[state=closed]/trigger:-rotate-90\",\n )}\n />\n </CollapsibleTrigger>\n ) : (\n <div\n data-slot=\"subagent-trigger\"\n className={cn(\n \"flex w-full min-w-0 items-start gap-2 text-[13px] leading-snug\",\n isThread ? \"px-2.5 py-1.5\" : \"px-3\",\n )}\n >\n {header}\n </div>\n )}\n {report ? (\n <p\n data-slot=\"subagent-report\"\n // Margins, not padding: a clamped block clips at its padding edge,\n // so bottom padding would show the top of the next line.\n className={cn(\n \"mb-1.5 line-clamp-3 whitespace-pre-line break-words text-xs leading-relaxed\",\n isThread ? \"mr-2.5 ml-8\" : \"mx-3 mt-1.5 ml-9\",\n phase === \"error\" ? \"text-destructive\" : \"text-foreground/80\",\n )}\n >\n {report}\n </p>\n ) : null}\n <ToolFallbackContent>\n <LaneQueryScope>\n <LaneSteps lane={lane} phase={phase} result={report} partMessages={messages} />\n </LaneQueryScope>\n </ToolFallbackContent>\n </ToolFallbackRoot>\n );\n}\n\n/**\n * A delegation inside a subagent's own steps: one static row. It is not the\n * run's lane to show; its steps live in the subagent's own transcript.\n */\nfunction SubagentDelegationRow({ args, result, isError, status }: ToolCallMessagePartProps) {\n const settled = result !== undefined && status?.type !== \"running\";\n const summary = summarizeToolCall({\n toolName: \"task\",\n args: typeof args === \"object\" && args !== null ? (args as Record<string, unknown>) : undefined,\n status: !settled ? \"running\" : isError === true ? \"error\" : \"complete\",\n });\n return (\n <div\n data-testid=\"subagent-delegation\"\n className=\"my-1 flex min-w-0 items-center gap-2 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-[13px]\"\n >\n <BotIcon aria-hidden=\"true\" className=\"size-3.5 shrink-0 text-muted-foreground\" />\n <span title={summary.detail} className=\"min-w-0 truncate text-foreground\">\n {summary.label}\n </span>\n </div>\n );\n}\n\nconst SubagentTaskToolUIImpl: ToolCallMessagePartComponent = (props) =>\n useInReadOnlyThread() ? <SubagentDelegationRow {...props} /> : <SubagentTaskCard {...props} />;\n\n/**\n * The `task` tool UI (`TOOL_UI_REGISTRY.task`): the subagent card, or inside\n * a subagent's own steps, a static delegation row.\n */\nexport const SubagentTaskToolUI = memo(\n SubagentTaskToolUIImpl,\n) as unknown as ToolCallMessagePartComponent;\nSubagentTaskToolUI.displayName = \"SubagentTaskToolUI\";\n"],"names":["SUBAGENT_AWAITING_APPROVAL_LABEL","readInstantMs","MESSAGE_CREATED_AT_KEY","messages","summarizeToolCall","humanizeToolName","useAuiState","hasStatewireThreadExtras","record","LoaderIcon","jsx","CheckIcon","AlertCircleIcon","XCircleIcon","ShieldAlertIcon","CircleDashedIcon","useState","useEffect","createContext","useContext","MessagePrimitive","deepAgentRowKey","useMemo","Fragment","ThreadPrimitive","Component","athenaDiagnostics","useAthenaQueryClient","QueryClientProvider","useDeepAgentLaneHistory","createSubagentLaneConversion","withLaneReport","useNestedPtcComponents","ToolFallback","jsxs","ReadonlyThreadProvider","cn","formatWorkDuration","useToolAppearance","taskSubagentsOfTurn","useApprovalWaitInScope","turnLaneApprovalWait","getExternalStoreMessages","subagentApprovalNoteLabel","salientToolCallDetail","StepText","ToolFallbackRoot","CollapsibleTrigger","ChevronDownIcon","ToolFallbackContent","BotIcon","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2FA,MAAM,gBAA6C,CAAA;AACnD,MAAM,wBAAkD,EAAE,kBAAkB,OAAO,WAAW,OAAA;AAC9F,MAAM,cAAwC,CAAA;AAuBvC,MAAM,6BAAgE;AAAA,EAC3E,QAAQ;AAAA,EACR,UAAUA,UAAAA;AAAAA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BAAAA,IAACwC,YAAAA,SAAA,EAAQ,eAAY,QAAO,WAAU,2CAA0C;AAAA,QAChFxC,2BAAAA,IAAC,UAAK,OAAO,QAAQ,QAAQ,WAAU,oCACpC,kBAAQ,MAAA,CACX;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,MAAM,yBAAuD,CAAC,UAC5D,oBAAA,IAAwBA,2BAAAA,IAAC,uBAAA,EAAuB,GAAG,MAAA,CAAO,IAAKA,2BAAAA,IAAC,kBAAA,EAAkB,GAAG,MAAA,CAAO;AAMvF,MAAM,qBAAqByC,WAAAA;AAAAA,EAChC;AACF;AACA,mBAAmB,cAAc;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"subagent-task-tool-ui.cjs","sources":["../../src/tools/subagent-task-tool-ui.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * The `task` tool UI (`TOOL_UI_REGISTRY.task`): the subagent lanes of a\n * delegation, drawn as Athena draws them on the web.\n *\n * - Sibling `task` calls of one turn (a parallel fan-out) render side by side\n * under the orchestration strip, with fork connectors, four lanes a page;\n * a lone delegation is one lane card. Only the first sibling's tool UI draws\n * the group; the others draw nothing (`useTaskSubagentGroup`).\n * - Each card says where its lane is (queued, running, waiting for approval,\n * done, failed), how long it has run, the call it made last and the thought\n * it streams, a badge once it has gone quiet, and its report or failure; its\n * footer counts its tool calls, plan steps and tokens.\n * - \"View transcript\" opens the lane's whole transcript in a drawer: its steps\n * read-only under the chat's own tool UIs, live while it runs, with \"Load\n * earlier steps\" for a lane its card carries cut (`history/lane`).\n *\n * Inside a subagent's own transcript (a read-only nested thread, with no\n * statewire thread behind it) a delegation is a static chip: it is not the\n * run's lane to show and carries no approval.\n */\nimport {\n type ToolCallMessagePartComponent,\n type ToolCallMessagePartProps,\n useAuiState,\n} from \"@assistant-ui/react\";\nimport { hasStatewireThreadExtras } from \"@athenaintel/agent-runtime\";\nimport { memo } from \"react\";\nimport { SubagentDelegationChip } from \"../subagents/lane-parts\";\nimport { SubagentLaneGroup } from \"../subagents/subagent-lane-group\";\nimport { useTaskSubagentGroup } from \"../subagents/task-subagent-group\";\n\n/**\n * Whether this card renders inside a read-only nested thread (a subagent's own\n * steps, under `ReadonlyThreadProvider`), whose thread has no statewire\n * extras. Never throws: rendered outside any thread, it is not nested.\n */\nfunction useInReadOnlyThread(): boolean {\n return useAuiState((s) => {\n const thread = s.optional?.thread;\n return thread !== undefined && !hasStatewireThreadExtras(thread.extras);\n });\n}\n\nfunction argsRecord(args: unknown): Record<string, unknown> {\n return typeof args === \"object\" && args !== null && !Array.isArray(args)\n ? (args as Record<string, unknown>)\n : {};\n}\n\n/** The lanes of the call's sibling group, drawn by its first sibling alone. */\nfunction TaskSubagentLanes({ toolCallId, args }: Pick<ToolCallMessagePartProps, \"toolCallId\" | \"args\">) {\n const task = useTaskSubagentGroup({ toolCallId, args });\n if (!task.isAnchor) return null;\n return (\n <SubagentLaneGroup\n lanes={task.lanes}\n turnToolCallIds={task.turnToolCallIds}\n stoppedLaneIds={task.stoppedLaneIds}\n delegatedAtMs={task.delegatedAtMs}\n />\n );\n}\n\nconst SubagentTaskToolUIImpl: ToolCallMessagePartComponent = ({ toolCallId, args }) => {\n const readOnly = useInReadOnlyThread();\n if (readOnly) {\n const fields = argsRecord(args);\n const name = fields.subagent_type ?? fields.subagentType;\n return (\n <SubagentDelegationChip\n name={typeof name === \"string\" ? name : \"subagent\"}\n description={typeof fields.description === \"string\" ? fields.description : undefined}\n />\n );\n }\n return <TaskSubagentLanes toolCallId={toolCallId} args={args} />;\n};\n\n/**\n * The `task` tool UI: the delegation's subagent lanes, or inside a subagent's\n * own transcript, a static delegation chip.\n */\nexport const SubagentTaskToolUI = memo(\n SubagentTaskToolUIImpl,\n) as unknown as ToolCallMessagePartComponent;\nSubagentTaskToolUI.displayName = \"SubagentTaskToolUI\";\n"],"names":["useAuiState","hasStatewireThreadExtras","useTaskSubagentGroup","jsx","SubagentLaneGroup","SubagentDelegationChip","memo"],"mappings":";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lanes of a
|
|
3
|
+
* delegation, drawn as Athena draws them on the web.
|
|
4
4
|
*
|
|
5
|
-
* -
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* the
|
|
15
|
-
* (`
|
|
16
|
-
* `ReadonlyThreadProvider` with the chat's own tool UIs. A cut lane (a
|
|
17
|
-
* running card always; a finished one when the provider declares the
|
|
18
|
-
* lane-cut contract, `subagentLaneHistory`) says how many of its steps it
|
|
19
|
-
* shows, and "Load earlier steps" reads the rest with `history/lane`
|
|
20
|
-
* (`useDeepAgentLaneHistory`), a read under the thread's own attach.
|
|
5
|
+
* - Sibling `task` calls of one turn (a parallel fan-out) render side by side
|
|
6
|
+
* under the orchestration strip, with fork connectors, four lanes a page;
|
|
7
|
+
* a lone delegation is one lane card. Only the first sibling's tool UI draws
|
|
8
|
+
* the group; the others draw nothing (`useTaskSubagentGroup`).
|
|
9
|
+
* - Each card says where its lane is (queued, running, waiting for approval,
|
|
10
|
+
* done, failed), how long it has run, the call it made last and the thought
|
|
11
|
+
* it streams, a badge once it has gone quiet, and its report or failure; its
|
|
12
|
+
* footer counts its tool calls, plan steps and tokens.
|
|
13
|
+
* - "View transcript" opens the lane's whole transcript in a drawer: its steps
|
|
14
|
+
* read-only under the chat's own tool UIs, live while it runs, with "Load
|
|
15
|
+
* earlier steps" for a lane its card carries cut (`history/lane`).
|
|
21
16
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* chat down with it.
|
|
17
|
+
* Inside a subagent's own transcript (a read-only nested thread, with no
|
|
18
|
+
* statewire thread behind it) a delegation is a static chip: it is not the
|
|
19
|
+
* run's lane to show and carries no approval.
|
|
26
20
|
*/
|
|
27
|
-
import { type
|
|
28
|
-
import { type SubagentStatus } from "../agent-runtime/src/index";
|
|
29
|
-
import { type ToolCallSummary } from "./tool-summary";
|
|
21
|
+
import { type ToolCallMessagePartComponent } from "@assistant-ui/react";
|
|
30
22
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* it made, is a gated call nobody has answered; read as Spaces and the phone
|
|
34
|
-
* read it, agent-runtime's `turnLaneApprovalWait`), any other call the run
|
|
35
|
-
* waits on an answer for is `waiting`, and one the run stopped before it
|
|
36
|
-
* settled is `stopped`.
|
|
37
|
-
*/
|
|
38
|
-
export type SubagentLanePhase = "queued" | "approval" | "waiting" | "running" | "complete" | "error" | "stopped";
|
|
39
|
-
export declare const SUBAGENT_LANE_PHASE_LABELS: Record<SubagentLanePhase, string>;
|
|
40
|
-
/** The lane's phase from its status, the status assistant-ui gives its part, and the run's approval. */
|
|
41
|
-
export declare function subagentLanePhase({ status, partStatus, awaitingApproval, }: {
|
|
42
|
-
status: SubagentStatus;
|
|
43
|
-
partStatus: ToolCallMessagePartStatus | undefined;
|
|
44
|
-
/** The lane waits on a person's approval (agent-runtime's `turnLaneApprovalWait`). */
|
|
45
|
-
awaitingApproval?: boolean;
|
|
46
|
-
}): SubagentLanePhase;
|
|
47
|
-
/** The phases a lane never leaves. */
|
|
48
|
-
export declare function isSettledSubagentLanePhase(phase: SubagentLanePhase): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* What a settled lane ended on, whole: its report, or why it failed. A lane
|
|
51
|
-
* that the run's own failure ended has no result of its own, so the `task`
|
|
52
|
-
* part's status says why (as the generic card shows a failed call). Empty
|
|
53
|
-
* while the lane runs.
|
|
54
|
-
*/
|
|
55
|
-
export declare function subagentLaneResult({ output, phase, partStatus, }: {
|
|
56
|
-
/** The lane's own result text (`SubagentDiscoverySnapshot.output`). */
|
|
57
|
-
output: string | undefined;
|
|
58
|
-
phase: SubagentLanePhase;
|
|
59
|
-
partStatus: ToolCallMessagePartStatus | undefined;
|
|
60
|
-
}): string;
|
|
61
|
-
/**
|
|
62
|
-
* How long a finished lane ran, measured by the server: the `task` result's
|
|
63
|
-
* `_started_at` and `_created_at`, which the deep agent's tool-call timing
|
|
64
|
-
* stamps on every tool result and mirrors onto its artifact (the one field of
|
|
65
|
-
* a tool message the converter hands the tool-call part). `null` when either
|
|
66
|
-
* stamp is missing.
|
|
67
|
-
*/
|
|
68
|
-
export declare function finishedLaneDurationMs(artifact: unknown): number | null;
|
|
69
|
-
/**
|
|
70
|
-
* When the agent delegated the call `toolCallId`: the server stamp
|
|
71
|
-
* (`_created_at`) of the assistant message that made it, among the raw
|
|
72
|
-
* messages bound to the turn. A running lane's card carries no stamp of its
|
|
73
|
-
* own, so its clock counts from here, the way the turn header counts from the
|
|
74
|
-
* turn's own stamps. `null` without one.
|
|
75
|
-
*/
|
|
76
|
-
export declare function laneDelegatedAtMs({ sources, toolCallId, }: {
|
|
77
|
-
sources: readonly unknown[];
|
|
78
|
-
toolCallId: string;
|
|
79
|
-
}): number | null;
|
|
80
|
-
/**
|
|
81
|
-
* The lane's newest tool step as its summary line ("Read `routes.ts`",
|
|
82
|
-
* "Running `npm test`"), from the lane's converted steps: the last tool call
|
|
83
|
-
* of its newest assistant turn, worded for whether it has answered. `null`
|
|
84
|
-
* before the lane's first tool call.
|
|
85
|
-
*/
|
|
86
|
-
export declare function latestLaneStep(messages: readonly ThreadMessage[]): ToolCallSummary | null;
|
|
87
|
-
/**
|
|
88
|
-
* The subagent's type as the card names it: the `task` call's `subagent_type`
|
|
89
|
-
* in words, with the default `general-purpose` agent as "Subagent".
|
|
90
|
-
*/
|
|
91
|
-
export declare function subagentTypeLabel(name: string): string;
|
|
92
|
-
/** "1 tool call", "12 tool calls". */
|
|
93
|
-
export declare function toolCallCountLabel(count: number): string;
|
|
94
|
-
/** What the steps panel says about the steps it shows of a cut lane. */
|
|
95
|
-
export declare function laneStepsNote({ shown, total, arrivesLater, }: {
|
|
96
|
-
/** Steps the panel shows. */
|
|
97
|
-
shown: number;
|
|
98
|
-
/** Steps the lane stores (its cut marker), when the card carries fewer. */
|
|
99
|
-
total: number | undefined;
|
|
100
|
-
/**
|
|
101
|
-
* A running lane on a host that pages no running lane: its card brings the
|
|
102
|
-
* rest once the subagent finishes.
|
|
103
|
-
*/
|
|
104
|
-
arrivesLater: boolean;
|
|
105
|
-
}): string | null;
|
|
106
|
-
/**
|
|
107
|
-
* The `task` tool UI (`TOOL_UI_REGISTRY.task`): the subagent card, or inside
|
|
108
|
-
* a subagent's own steps, a static delegation row.
|
|
23
|
+
* The `task` tool UI: the delegation's subagent lanes, or inside a subagent's
|
|
24
|
+
* own transcript, a static delegation chip.
|
|
109
25
|
*/
|
|
110
26
|
export declare const SubagentTaskToolUI: ToolCallMessagePartComponent;
|