@athenaintel/react 0.28.1 → 0.32.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 +479 -10
- package/dist/agent-runtime/src/asset-attachment.cjs.map +1 -0
- package/dist/agent-runtime/src/asset-attachment.js.map +1 -0
- package/dist/agent-runtime/src/athena-asset-drag.cjs +44 -0
- package/dist/agent-runtime/src/athena-asset-drag.cjs.map +1 -0
- package/dist/agent-runtime/src/athena-asset-drag.js +44 -0
- package/dist/agent-runtime/src/athena-asset-drag.js.map +1 -0
- package/dist/agent-runtime/src/auth-denial.cjs.map +1 -0
- package/dist/agent-runtime/src/auth-denial.js.map +1 -0
- package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -0
- package/dist/agent-runtime/src/client-tool-bridge.js.map +1 -0
- package/dist/agent-runtime/src/client-tools.cjs.map +1 -0
- package/dist/agent-runtime/src/client-tools.js.map +1 -0
- package/dist/agent-runtime/src/composer-markdown.cjs +124 -0
- package/dist/agent-runtime/src/composer-markdown.cjs.map +1 -0
- package/dist/agent-runtime/src/composer-markdown.js +124 -0
- package/dist/agent-runtime/src/composer-markdown.js.map +1 -0
- package/dist/agent-runtime/src/config-mutations.cjs +59 -0
- package/dist/agent-runtime/src/config-mutations.cjs.map +1 -0
- package/dist/agent-runtime/src/config-mutations.js +59 -0
- package/dist/agent-runtime/src/config-mutations.js.map +1 -0
- package/dist/agent-runtime/src/conversation-index.cjs.map +1 -0
- package/dist/agent-runtime/src/conversation-index.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/conversation-list.cjs +36 -0
- package/dist/agent-runtime/src/conversation-list.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/conversation-list.js +36 -0
- package/dist/agent-runtime/src/conversation-list.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/deep-agent-transport-recipe.cjs +5 -3
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/deep-agent-transport-recipe.js +6 -4
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -0
- package/dist/agent-runtime/src/edit-command.cjs.map +1 -0
- package/dist/agent-runtime/src/edit-command.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/errors.cjs +23 -0
- package/dist/agent-runtime/src/errors.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/errors.js +23 -0
- package/dist/agent-runtime/src/errors.js.map +1 -0
- package/dist/agent-runtime/src/execute-output.cjs +41 -0
- package/dist/agent-runtime/src/execute-output.cjs.map +1 -0
- package/dist/agent-runtime/src/execute-output.js +41 -0
- package/dist/agent-runtime/src/execute-output.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/generated/runconfig-contract.cjs +16 -2
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/generated/runconfig-contract.js +16 -2
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -0
- package/dist/agent-runtime/src/github-wake-event.cjs.map +1 -0
- package/dist/agent-runtime/src/github-wake-event.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/interrupts.cjs +24 -1
- package/dist/agent-runtime/src/interrupts.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/interrupts.js +24 -1
- package/dist/agent-runtime/src/interrupts.js.map +1 -0
- package/dist/agent-runtime/src/message-author.cjs.map +1 -0
- package/dist/agent-runtime/src/message-author.js.map +1 -0
- package/dist/agent-runtime/src/message-window.cjs.map +1 -0
- package/dist/agent-runtime/src/message-window.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/messages.cjs +8 -4
- package/dist/agent-runtime/src/messages.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/messages.js +6 -2
- package/dist/agent-runtime/src/messages.js.map +1 -0
- package/dist/agent-runtime/src/model-context.cjs.map +1 -0
- package/dist/agent-runtime/src/model-context.js.map +1 -0
- package/dist/agent-runtime/src/optimistic-content.cjs.map +1 -0
- package/dist/agent-runtime/src/optimistic-content.js.map +1 -0
- package/dist/agent-runtime/src/protocol.cjs.map +1 -0
- package/dist/agent-runtime/src/protocol.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/queue.cjs +23 -2
- package/dist/agent-runtime/src/queue.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/queue.js +23 -2
- package/dist/agent-runtime/src/queue.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/quota-safe-local-storage-session.cjs +71 -13
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/quota-safe-local-storage-session.js +73 -15
- package/dist/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -0
- package/dist/agent-runtime/src/runtime-messages.cjs.map +1 -0
- package/dist/agent-runtime/src/runtime-messages.js.map +1 -0
- package/dist/agent-runtime/src/screen-point.cjs.map +1 -0
- package/dist/agent-runtime/src/screen-point.js.map +1 -0
- package/dist/agent-runtime/src/send-recovery.cjs.map +1 -0
- package/dist/agent-runtime/src/send-recovery.js.map +1 -0
- package/dist/agent-runtime/src/statewire-attach-observer.cjs.map +1 -0
- package/dist/agent-runtime/src/statewire-attach-observer.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-state.cjs +8 -0
- package/dist/agent-runtime/src/statewire-state.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-state.js +8 -0
- package/dist/agent-runtime/src/statewire-state.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-suspended.cjs +4 -0
- package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-suspended.js +4 -0
- package/dist/agent-runtime/src/statewire-suspended.js.map +1 -0
- package/dist/agent-runtime/src/statewire-transport.cjs +43 -0
- package/dist/agent-runtime/src/statewire-transport.cjs.map +1 -0
- package/dist/agent-runtime/src/statewire-transport.js +43 -0
- package/dist/agent-runtime/src/statewire-transport.js.map +1 -0
- package/dist/agent-runtime/src/streaming-markdown.cjs.map +1 -0
- package/dist/agent-runtime/src/streaming-markdown.js.map +1 -0
- package/dist/agent-runtime/src/subscription-wake-event.cjs +252 -0
- package/dist/agent-runtime/src/subscription-wake-event.cjs.map +1 -0
- package/dist/agent-runtime/src/subscription-wake-event.js +252 -0
- package/dist/agent-runtime/src/subscription-wake-event.js.map +1 -0
- package/dist/agent-runtime/src/thread-extras.cjs.map +1 -0
- package/dist/agent-runtime/src/thread-extras.js.map +1 -0
- package/dist/agent-runtime/src/thread-snapshot-cache.cjs.map +1 -0
- package/dist/agent-runtime/src/thread-snapshot-cache.js.map +1 -0
- package/dist/agent-runtime/src/thread-status.cjs.map +1 -0
- package/dist/agent-runtime/src/thread-status.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/tool-metadata.cjs +304 -9
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/tool-metadata.js +304 -9
- package/dist/agent-runtime/src/tool-metadata.js.map +1 -0
- package/dist/agent-runtime/src/tool-names.cjs +5 -0
- package/dist/agent-runtime/src/tool-names.cjs.map +1 -0
- package/dist/agent-runtime/src/tool-names.js +5 -0
- package/dist/agent-runtime/src/tool-names.js.map +1 -0
- package/dist/agent-runtime/src/tool-outputs.cjs.map +1 -0
- package/dist/agent-runtime/src/tool-outputs.js.map +1 -0
- package/dist/agent-runtime/src/tool-result.cjs.map +1 -0
- package/dist/agent-runtime/src/tool-result.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-conversation-list.cjs +33 -22
- package/dist/agent-runtime/src/use-conversation-list.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-conversation-list.js +34 -23
- package/dist/agent-runtime/src/use-conversation-list.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-config.cjs +129 -0
- package/dist/agent-runtime/src/use-deep-agent-config.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-config.js +129 -0
- package/dist/agent-runtime/src/use-deep-agent-config.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-edit-submit.cjs +2 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-edit-submit.js +2 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-thread.cjs +1 -0
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-thread.js +2 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-window-sync.js.map +1 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.cjs +52 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.cjs.map +1 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.js +52 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.js.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/voice-presentation.cjs +14 -0
- package/dist/agent-runtime/src/voice-presentation.cjs.map +1 -0
- package/dist/{packages/agent-runtime → agent-runtime}/src/voice-presentation.js +14 -0
- package/dist/agent-runtime/src/voice-presentation.js.map +1 -0
- package/dist/agent-runtime/src/voice-turn-grouping.cjs.map +1 -0
- package/dist/agent-runtime/src/voice-turn-grouping.js.map +1 -0
- package/dist/assets/AthenaAssetEmbed.cjs +13 -2
- package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
- package/dist/assets/AthenaAssetEmbed.d.ts +10 -0
- package/dist/assets/AthenaAssetEmbed.js +14 -3
- package/dist/assets/AthenaAssetEmbed.js.map +1 -1
- package/dist/assets/AthenaLayout.cjs +97 -31
- package/dist/assets/AthenaLayout.cjs.map +1 -1
- package/dist/assets/AthenaLayout.d.ts +13 -0
- package/dist/assets/AthenaLayout.js +98 -32
- package/dist/assets/AthenaLayout.js.map +1 -1
- package/dist/assets/asset-embed-messages.cjs +6 -0
- package/dist/assets/asset-embed-messages.cjs.map +1 -1
- package/dist/assets/asset-embed-messages.d.ts +13 -0
- package/dist/assets/asset-embed-messages.js +6 -0
- package/dist/assets/asset-embed-messages.js.map +1 -1
- package/dist/assets/asset-panel-store.cjs +68 -32
- package/dist/assets/asset-panel-store.cjs.map +1 -1
- package/dist/assets/asset-panel-store.d.ts +47 -1
- package/dist/assets/asset-panel-store.js +68 -32
- package/dist/assets/asset-panel-store.js.map +1 -1
- package/dist/assets/use-asset-embed.cjs +29 -8
- package/dist/assets/use-asset-embed.cjs.map +1 -1
- package/dist/assets/use-asset-embed.d.ts +7 -0
- package/dist/assets/use-asset-embed.js +29 -8
- package/dist/assets/use-asset-embed.js.map +1 -1
- package/dist/catalog/chat-pickers.cjs +152 -0
- package/dist/catalog/chat-pickers.cjs.map +1 -0
- package/dist/catalog/chat-pickers.d.ts +22 -0
- package/dist/catalog/chat-pickers.js +152 -0
- package/dist/catalog/chat-pickers.js.map +1 -0
- package/dist/catalog/runtime-catalog.cjs +181 -0
- package/dist/catalog/runtime-catalog.cjs.map +1 -0
- package/dist/catalog/runtime-catalog.d.ts +100 -0
- package/dist/catalog/runtime-catalog.js +181 -0
- package/dist/catalog/runtime-catalog.js.map +1 -0
- package/dist/chat/AthenaChat.cjs +122 -67
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +21 -4
- package/dist/chat/AthenaChat.js +124 -69
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireApprovalCard.cjs +38 -37
- package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
- package/dist/chat/StatewireApprovalCard.d.ts +2 -0
- package/dist/chat/StatewireApprovalCard.js +39 -38
- package/dist/chat/StatewireApprovalCard.js.map +1 -1
- package/dist/chat/StatewireClientToolBridge.cjs +2 -2
- package/dist/chat/StatewireClientToolBridge.js +2 -2
- package/dist/chat/StatewireQueuedMessages.cjs +15 -12
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.d.ts +22 -2
- package/dist/chat/StatewireQueuedMessages.js +15 -12
- package/dist/chat/StatewireQueuedMessages.js.map +1 -1
- package/dist/chat/StatewireRunRefusalNotice.cjs +48 -0
- package/dist/chat/StatewireRunRefusalNotice.cjs.map +1 -0
- package/dist/chat/StatewireRunRefusalNotice.d.ts +25 -0
- package/dist/chat/StatewireRunRefusalNotice.js +48 -0
- package/dist/chat/StatewireRunRefusalNotice.js.map +1 -0
- package/dist/chat/WaitingOnYouBanner.cjs +2 -2
- package/dist/chat/WaitingOnYouBanner.js +2 -2
- package/dist/chat/athena-citation-links.cjs +19 -15
- package/dist/chat/athena-citation-links.cjs.map +1 -1
- package/dist/chat/athena-citation-links.js +19 -15
- package/dist/chat/athena-citation-links.js.map +1 -1
- package/dist/chat/run-activity.cjs +9 -1
- package/dist/chat/run-activity.cjs.map +1 -1
- package/dist/chat/run-activity.d.ts +6 -0
- package/dist/chat/run-activity.js +10 -2
- package/dist/chat/run-activity.js.map +1 -1
- package/dist/chat/statewire-banners.cjs +30 -1
- package/dist/chat/statewire-banners.cjs.map +1 -1
- package/dist/chat/statewire-banners.d.ts +20 -1
- package/dist/chat/statewire-banners.js +32 -3
- package/dist/chat/statewire-banners.js.map +1 -1
- package/dist/chat/statewire-client-tools.cjs +1 -1
- package/dist/chat/statewire-client-tools.js +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.cjs +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.js +1 -1
- package/dist/chat/super-grouping/CollapsibleGroup.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +38 -16
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +21 -4
- package/dist/chat/super-grouping/SuperGroupingCard.js +39 -17
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +377 -0
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -0
- package/dist/chat/super-grouping/SuperGroupingTranscript.d.ts +31 -0
- package/dist/chat/super-grouping/SuperGroupingTranscript.js +377 -0
- package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -0
- package/dist/chat/super-grouping/ToolTimeline.cjs +13 -2
- package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.d.ts +10 -3
- package/dist/chat/super-grouping/ToolTimeline.js +13 -2
- package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.cjs +69 -29
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.d.ts +60 -9
- package/dist/chat/super-grouping/activity-timeline.js +70 -30
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
- package/dist/chat/super-grouping/index.cjs +14 -0
- package/dist/chat/super-grouping/index.cjs.map +1 -1
- package/dist/chat/super-grouping/index.d.ts +7 -2
- package/dist/chat/super-grouping/index.js +16 -2
- package/dist/chat/super-grouping/index.js.map +1 -1
- package/dist/chat/super-grouping/timeline-step.cjs +14 -5
- package/dist/chat/super-grouping/timeline-step.cjs.map +1 -1
- package/dist/chat/super-grouping/timeline-step.d.ts +10 -1
- package/dist/chat/super-grouping/timeline-step.js +15 -6
- package/dist/chat/super-grouping/timeline-step.js.map +1 -1
- package/dist/chat/super-grouping/toolkit-map.cjs +1 -0
- package/dist/chat/super-grouping/toolkit-map.cjs.map +1 -1
- package/dist/chat/super-grouping/toolkit-map.js +1 -0
- package/dist/chat/super-grouping/toolkit-map.js.map +1 -1
- package/dist/chat/super-grouping/turn-segments.cjs +82 -0
- package/dist/chat/super-grouping/turn-segments.cjs.map +1 -0
- package/dist/chat/super-grouping/turn-segments.d.ts +69 -0
- package/dist/chat/super-grouping/turn-segments.js +82 -0
- package/dist/chat/super-grouping/turn-segments.js.map +1 -0
- package/dist/chat/super-grouping/turn-timing.cjs +110 -0
- package/dist/chat/super-grouping/turn-timing.cjs.map +1 -0
- package/dist/chat/super-grouping/turn-timing.d.ts +52 -0
- package/dist/chat/super-grouping/turn-timing.js +110 -0
- package/dist/chat/super-grouping/turn-timing.js.map +1 -0
- package/dist/chat/tiptap-text.cjs +1 -1
- package/dist/chat/tiptap-text.js +1 -1
- package/dist/chat/use-athena-run-live.cjs +1 -1
- package/dist/chat/use-athena-run-live.js +1 -1
- package/dist/chat/use-statewire-approval-request.cjs +73 -4
- package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
- package/dist/chat/use-statewire-approval-request.js +74 -5
- package/dist/chat/use-statewire-approval-request.js.map +1 -1
- package/dist/chat-ui/composer/composer-message.cjs +284 -0
- package/dist/chat-ui/composer/composer-message.cjs.map +1 -0
- package/dist/chat-ui/composer/composer-message.d.ts +152 -0
- package/dist/chat-ui/composer/composer-message.js +284 -0
- package/dist/chat-ui/composer/composer-message.js.map +1 -0
- package/dist/chat-ui/composer/tiptap-composer.cjs +97 -15
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +34 -6
- package/dist/chat-ui/composer/tiptap-composer.js +97 -15
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/index.cjs +4 -1
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +3 -2
- package/dist/chat-ui/index.js +5 -2
- package/dist/chat-ui/index.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +31 -3
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.d.ts +2 -5
- package/dist/chat-ui/mentions/mention-chip.js +33 -5
- package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
- package/dist/chat-ui/mentions/mention-extension.cjs +9 -3
- package/dist/chat-ui/mentions/mention-extension.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-extension.js +9 -3
- package/dist/chat-ui/mentions/mention-extension.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs +3 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.js +3 -1
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +65 -19
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +15 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +67 -21
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +4 -2
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +2 -1
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +5 -3
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs +61 -0
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -0
- package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +3 -0
- package/dist/chat-ui/mentions/use-account-workspace-id.js +61 -0
- package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -0
- package/dist/chat-ui/mentions/use-member-avatar.cjs +75 -0
- package/dist/chat-ui/mentions/use-member-avatar.cjs.map +1 -0
- package/dist/chat-ui/mentions/use-member-avatar.d.ts +2 -0
- package/dist/chat-ui/mentions/use-member-avatar.js +75 -0
- package/dist/chat-ui/mentions/use-member-avatar.js.map +1 -0
- package/dist/chat-ui/messages/message-components.cjs +30 -10
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.d.ts +21 -1
- package/dist/chat-ui/messages/message-components.js +30 -10
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/messages/runtime-message.cjs +1 -1
- package/dist/chat-ui/messages/runtime-message.js +1 -1
- package/dist/chat-ui/messages/statewire-continue-run.cjs +5 -5
- package/dist/chat-ui/messages/statewire-continue-run.js +5 -5
- package/dist/chat-ui/messages/user-edit-composer.cjs +1 -1
- package/dist/chat-ui/messages/user-edit-composer.js +1 -1
- package/dist/chat-ui/messages/wake-marker.cjs +39 -4
- package/dist/chat-ui/messages/wake-marker.cjs.map +1 -1
- package/dist/chat-ui/messages/wake-marker.d.ts +16 -5
- package/dist/chat-ui/messages/wake-marker.js +40 -5
- package/dist/chat-ui/messages/wake-marker.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-message-body.cjs +12 -8
- package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-message-body.d.ts +6 -1
- package/dist/chat-ui/rich-text/chat-message-body.js +13 -9
- package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.cjs +64 -6
- package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.d.ts +5 -0
- package/dist/chat-ui/rich-text/chat-text-schema.js +66 -8
- package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
- package/dist/chat-ui/statewire.cjs +1 -1
- package/dist/chat-ui/statewire.d.ts +1 -1
- package/dist/chat-ui/statewire.js +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.cjs +2 -2
- package/dist/chat-ui/thread/statewire-history-edge.js +2 -2
- package/dist/collab/client.cjs +282 -16
- package/dist/collab/client.cjs.map +1 -1
- package/dist/collab/client.d.ts +127 -2
- package/dist/collab/client.js +285 -20
- package/dist/collab/client.js.map +1 -1
- package/dist/collab/index.cjs +2 -0
- package/dist/collab/index.cjs.map +1 -1
- package/dist/collab/index.d.ts +1 -1
- package/dist/collab/index.js +3 -1
- package/dist/composer/AttachmentContext.cjs +38 -12
- package/dist/composer/AttachmentContext.cjs.map +1 -1
- package/dist/composer/AttachmentContext.d.ts +22 -1
- package/dist/composer/AttachmentContext.js +40 -14
- package/dist/composer/AttachmentContext.js.map +1 -1
- package/dist/composer/QuoteContext.cjs +80 -28
- package/dist/composer/QuoteContext.cjs.map +1 -1
- package/dist/composer/QuoteContext.d.ts +35 -6
- package/dist/composer/QuoteContext.js +82 -30
- package/dist/composer/QuoteContext.js.map +1 -1
- package/dist/composer/build-composed-message.cjs +27 -0
- package/dist/composer/build-composed-message.cjs.map +1 -1
- package/dist/composer/build-composed-message.d.ts +21 -0
- package/dist/composer/build-composed-message.js +28 -1
- package/dist/composer/build-composed-message.js.map +1 -1
- package/dist/composer/composer-handoff.cjs +13 -1
- package/dist/composer/composer-handoff.cjs.map +1 -1
- package/dist/composer/composer-handoff.d.ts +12 -0
- package/dist/composer/composer-handoff.js +15 -3
- package/dist/composer/composer-handoff.js.map +1 -1
- package/dist/composer/index.d.ts +6 -3
- package/dist/composer/useReadComposerDraft.cjs +16 -0
- package/dist/composer/useReadComposerDraft.cjs.map +1 -0
- package/dist/composer/useReadComposerDraft.d.ts +6 -0
- package/dist/composer/useReadComposerDraft.js +16 -0
- package/dist/composer/useReadComposerDraft.js.map +1 -0
- package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +3 -1
- package/dist/diagnostics/athena-diagnostics.js.map +1 -1
- package/dist/diagnostics/errors.cjs +6 -0
- package/dist/diagnostics/errors.cjs.map +1 -1
- package/dist/diagnostics/errors.d.ts +6 -0
- package/dist/diagnostics/errors.js +6 -0
- package/dist/diagnostics/errors.js.map +1 -1
- package/dist/index.cjs +163 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +55 -12
- package/dist/index.js +170 -14
- package/dist/index.js.map +1 -1
- package/dist/lib/owner-document.cjs +32 -0
- package/dist/lib/owner-document.cjs.map +1 -0
- package/dist/lib/owner-document.d.ts +17 -0
- package/dist/lib/owner-document.js +32 -0
- package/dist/lib/owner-document.js.map +1 -0
- package/dist/lib/portal-surface.cjs +55 -0
- package/dist/lib/portal-surface.cjs.map +1 -0
- package/dist/lib/portal-surface.d.ts +37 -0
- package/dist/lib/portal-surface.js +55 -0
- package/dist/lib/portal-surface.js.map +1 -0
- package/dist/lib/use-athena-rest-query.cjs +34 -0
- package/dist/lib/use-athena-rest-query.cjs.map +1 -0
- package/dist/lib/use-athena-rest-query.d.ts +31 -0
- package/dist/lib/use-athena-rest-query.js +34 -0
- package/dist/lib/use-athena-rest-query.js.map +1 -0
- package/dist/provider/AthenaProvider.cjs +70 -10
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +27 -2
- package/dist/provider/AthenaProvider.js +74 -14
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/provider/citation-links.d.ts +10 -2
- package/dist/{packages/react → react}/package.json.cjs +1 -1
- package/dist/{packages/react → react}/package.json.js +1 -1
- package/dist/runtime/StatewireModelLaneSync.cjs +96 -0
- package/dist/runtime/StatewireModelLaneSync.cjs.map +1 -0
- package/dist/runtime/StatewireModelLaneSync.d.ts +45 -0
- package/dist/runtime/StatewireModelLaneSync.js +96 -0
- package/dist/runtime/StatewireModelLaneSync.js.map +1 -0
- package/dist/runtime/statewire-lifecycle.cjs +20 -5
- package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
- package/dist/runtime/statewire-lifecycle.d.ts +11 -0
- package/dist/runtime/statewire-lifecycle.js +20 -5
- package/dist/runtime/statewire-lifecycle.js.map +1 -1
- package/dist/runtime/statewire-model-lane.cjs +28 -0
- package/dist/runtime/statewire-model-lane.cjs.map +1 -0
- package/dist/runtime/statewire-model-lane.d.ts +64 -0
- package/dist/runtime/statewire-model-lane.js +28 -0
- package/dist/runtime/statewire-model-lane.js.map +1 -0
- package/dist/runtime/statewire-run-config.cjs +16 -2
- package/dist/runtime/statewire-run-config.cjs.map +1 -1
- package/dist/runtime/statewire-run-config.d.ts +10 -0
- package/dist/runtime/statewire-run-config.js +16 -2
- package/dist/runtime/statewire-run-config.js.map +1 -1
- package/dist/runtime/statewire-server-lane-context.cjs +24 -0
- package/dist/runtime/statewire-server-lane-context.cjs.map +1 -0
- package/dist/runtime/statewire-server-lane-context.d.ts +30 -0
- package/dist/runtime/statewire-server-lane-context.js +24 -0
- package/dist/runtime/statewire-server-lane-context.js.map +1 -0
- package/dist/runtime/useAthenaStatewireRuntime.cjs +47 -23
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +8 -1
- package/dist/runtime/useAthenaStatewireRuntime.js +48 -24
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/search/useAthenaRepoSearch.cjs +5 -13
- package/dist/search/useAthenaRepoSearch.cjs.map +1 -1
- package/dist/search/useAthenaRepoSearch.d.ts +3 -3
- package/dist/search/useAthenaRepoSearch.js +6 -14
- package/dist/search/useAthenaRepoSearch.js.map +1 -1
- package/dist/sheet-range/a1.cjs +162 -0
- package/dist/sheet-range/a1.cjs.map +1 -0
- package/dist/sheet-range/a1.d.ts +91 -0
- package/dist/sheet-range/a1.js +162 -0
- package/dist/sheet-range/a1.js.map +1 -0
- package/dist/sheet-range/index.cjs +22 -0
- package/dist/sheet-range/index.cjs.map +1 -0
- package/dist/sheet-range/index.d.ts +12 -0
- package/dist/sheet-range/index.js +22 -0
- package/dist/sheet-range/index.js.map +1 -0
- package/dist/sheet-range/range-preview-table.cjs +75 -0
- package/dist/sheet-range/range-preview-table.cjs.map +1 -0
- package/dist/sheet-range/range-preview-table.d.ts +20 -0
- package/dist/sheet-range/range-preview-table.js +75 -0
- package/dist/sheet-range/range-preview-table.js.map +1 -0
- package/dist/sheet-range/range-preview.cjs +116 -0
- package/dist/sheet-range/range-preview.cjs.map +1 -0
- package/dist/sheet-range/range-preview.d.ts +67 -0
- package/dist/sheet-range/range-preview.js +116 -0
- package/dist/sheet-range/range-preview.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/threads/Inbox.cjs +289 -0
- package/dist/threads/Inbox.cjs.map +1 -0
- package/dist/threads/Inbox.d.ts +46 -0
- package/dist/threads/Inbox.js +289 -0
- package/dist/threads/Inbox.js.map +1 -0
- package/dist/threads/SessionList.cjs +51 -126
- package/dist/threads/SessionList.cjs.map +1 -1
- package/dist/threads/SessionList.d.ts +26 -1
- package/dist/threads/SessionList.js +45 -120
- package/dist/threads/SessionList.js.map +1 -1
- package/dist/threads/SessionsPage.cjs +753 -0
- package/dist/threads/SessionsPage.cjs.map +1 -0
- package/dist/threads/SessionsPage.d.ts +35 -0
- package/dist/threads/SessionsPage.js +753 -0
- package/dist/threads/SessionsPage.js.map +1 -0
- package/dist/threads/api.cjs +23 -2
- package/dist/threads/api.cjs.map +1 -1
- package/dist/threads/api.d.ts +60 -0
- package/dist/threads/api.js +23 -2
- package/dist/threads/api.js.map +1 -1
- package/dist/threads/conversation-list-fetcher.cjs +9 -2
- package/dist/threads/conversation-list-fetcher.cjs.map +1 -1
- package/dist/threads/conversation-list-fetcher.d.ts +14 -1
- package/dist/threads/conversation-list-fetcher.js +9 -2
- package/dist/threads/conversation-list-fetcher.js.map +1 -1
- package/dist/threads/index.d.ts +2 -1
- package/dist/threads/pull-request-display.cjs +25 -0
- package/dist/threads/pull-request-display.cjs.map +1 -0
- package/dist/threads/pull-request-display.d.ts +15 -0
- package/dist/threads/pull-request-display.js +25 -0
- package/dist/threads/pull-request-display.js.map +1 -0
- package/dist/threads/session-list-model.cjs +16 -2
- package/dist/threads/session-list-model.cjs.map +1 -1
- package/dist/threads/session-list-model.d.ts +10 -0
- package/dist/threads/session-list-model.js +16 -2
- package/dist/threads/session-list-model.js.map +1 -1
- package/dist/threads/session-row-parts.cjs +152 -0
- package/dist/threads/session-row-parts.cjs.map +1 -0
- package/dist/threads/session-row-parts.d.ts +50 -0
- package/dist/threads/session-row-parts.js +152 -0
- package/dist/threads/session-row-parts.js.map +1 -0
- package/dist/threads/sessions-page-model.cjs +305 -0
- package/dist/threads/sessions-page-model.cjs.map +1 -0
- package/dist/threads/sessions-page-model.d.ts +86 -0
- package/dist/threads/sessions-page-model.js +305 -0
- package/dist/threads/sessions-page-model.js.map +1 -0
- package/dist/threads/sessions-page-storage.cjs +93 -0
- package/dist/threads/sessions-page-storage.cjs.map +1 -0
- package/dist/threads/sessions-page-storage.d.ts +23 -0
- package/dist/threads/sessions-page-storage.js +93 -0
- package/dist/threads/sessions-page-storage.js.map +1 -0
- package/dist/threads/sessions-query.cjs +235 -0
- package/dist/threads/sessions-query.cjs.map +1 -0
- package/dist/threads/sessions-query.d.ts +119 -0
- package/dist/threads/sessions-query.js +235 -0
- package/dist/threads/sessions-query.js.map +1 -0
- package/dist/threads/statewire-thread-list.cjs +133 -40
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.d.ts +83 -2
- package/dist/threads/statewire-thread-list.js +134 -41
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/threads/use-athena-sessions.cjs +198 -0
- package/dist/threads/use-athena-sessions.cjs.map +1 -0
- package/dist/threads/use-athena-sessions.d.ts +81 -0
- package/dist/threads/use-athena-sessions.js +198 -0
- package/dist/threads/use-athena-sessions.js.map +1 -0
- package/dist/threads/use-athena-thread-model.cjs +14 -0
- package/dist/threads/use-athena-thread-model.cjs.map +1 -0
- package/dist/threads/use-athena-thread-model.d.ts +22 -0
- package/dist/threads/use-athena-thread-model.js +14 -0
- package/dist/threads/use-athena-thread-model.js.map +1 -0
- package/dist/threads/use-rest-conversation-history.cjs +1 -1
- package/dist/threads/use-rest-conversation-history.js +1 -1
- package/dist/threads/use-statewire-conversation-history.cjs +1 -1
- package/dist/threads/use-statewire-conversation-history.d.ts +3 -0
- package/dist/threads/use-statewire-conversation-history.js +1 -1
- package/dist/threads/use-thread-read-state.cjs +73 -0
- package/dist/threads/use-thread-read-state.cjs.map +1 -0
- package/dist/threads/use-thread-read-state.d.ts +51 -0
- package/dist/threads/use-thread-read-state.js +73 -0
- package/dist/threads/use-thread-read-state.js.map +1 -0
- package/dist/tiptap-markdown-table/src/markdown-table-serializer.cjs.map +1 -0
- package/dist/tiptap-markdown-table/src/markdown-table-serializer.js.map +1 -0
- package/dist/tools/auto-open-tools.cjs +2 -0
- package/dist/tools/auto-open-tools.cjs.map +1 -1
- package/dist/tools/auto-open-tools.js +2 -0
- package/dist/tools/auto-open-tools.js.map +1 -1
- package/dist/tools/file-tool-uis.cjs +18 -43
- package/dist/tools/file-tool-uis.cjs.map +1 -1
- package/dist/tools/file-tool-uis.d.ts +1 -2
- package/dist/tools/file-tool-uis.js +18 -42
- package/dist/tools/file-tool-uis.js.map +1 -1
- package/dist/tools/index.cjs +6 -2
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +6 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/misc-tool-uis.cjs +2 -2
- package/dist/tools/misc-tool-uis.js +2 -2
- package/dist/tools/primitives.cjs +1 -1
- package/dist/tools/primitives.js +1 -1
- package/dist/tools/read-asset-tool-ui.cjs +21 -70
- package/dist/tools/read-asset-tool-ui.cjs.map +1 -1
- package/dist/tools/read-asset-tool-ui.js +21 -70
- package/dist/tools/read-asset-tool-ui.js.map +1 -1
- package/dist/tools/step-text.cjs +21 -0
- package/dist/tools/step-text.cjs.map +1 -0
- package/dist/tools/step-text.d.ts +10 -0
- package/dist/tools/step-text.js +21 -0
- package/dist/tools/step-text.js.map +1 -0
- package/dist/tools/tool-fallback.cjs +24 -5
- package/dist/tools/tool-fallback.cjs.map +1 -1
- package/dist/tools/tool-fallback.d.ts +3 -1
- package/dist/tools/tool-fallback.js +24 -5
- package/dist/tools/tool-fallback.js.map +1 -1
- package/dist/tools/tool-summary.cjs +661 -0
- package/dist/tools/tool-summary.cjs.map +1 -0
- package/dist/tools/tool-summary.d.ts +99 -0
- package/dist/tools/tool-summary.js +661 -0
- package/dist/tools/tool-summary.js.map +1 -0
- package/dist/tools/tool-uis.cjs +37 -95
- package/dist/tools/tool-uis.cjs.map +1 -1
- package/dist/tools/tool-uis.js +37 -95
- package/dist/tools/tool-uis.js.map +1 -1
- package/dist/tools/voice-update-tool-ui.cjs +1 -1
- package/dist/tools/voice-update-tool-ui.js +1 -1
- package/dist/tools/write-todos-tool-ui.cjs +3 -2
- package/dist/tools/write-todos-tool-ui.cjs.map +1 -1
- package/dist/tools/write-todos-tool-ui.d.ts +5 -0
- package/dist/tools/write-todos-tool-ui.js +5 -4
- package/dist/tools/write-todos-tool-ui.js.map +1 -1
- package/dist/ui/popover.cjs +6 -6
- package/dist/ui/popover.cjs.map +1 -1
- package/dist/ui/popover.js +6 -6
- package/dist/ui/popover.js.map +1 -1
- package/dist/ui/tooltip.cjs +16 -2
- package/dist/ui/tooltip.cjs.map +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/dist/ui/tooltip.js +16 -2
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/voice/use-athena-voice-session.cjs.map +1 -1
- package/dist/voice/use-athena-voice-session.d.ts +3 -3
- package/dist/voice/use-athena-voice-session.js.map +1 -1
- package/dist/workbench/SessionWorkbench.cjs +378 -0
- package/dist/workbench/SessionWorkbench.cjs.map +1 -0
- package/dist/workbench/SessionWorkbench.d.ts +30 -0
- package/dist/workbench/SessionWorkbench.js +378 -0
- package/dist/workbench/SessionWorkbench.js.map +1 -0
- package/dist/workbench/session-workbench-context.cjs +26 -0
- package/dist/workbench/session-workbench-context.cjs.map +1 -0
- package/dist/workbench/session-workbench-context.d.ts +55 -0
- package/dist/workbench/session-workbench-context.js +26 -0
- package/dist/workbench/session-workbench-context.js.map +1 -0
- package/dist/workbench/session-workbench-model.cjs +288 -0
- package/dist/workbench/session-workbench-model.cjs.map +1 -0
- package/dist/workbench/session-workbench-model.d.ts +168 -0
- package/dist/workbench/session-workbench-model.js +288 -0
- package/dist/workbench/session-workbench-model.js.map +1 -0
- package/dist/workbench/session-workbench-panes.cjs +580 -0
- package/dist/workbench/session-workbench-panes.cjs.map +1 -0
- package/dist/workbench/session-workbench-panes.d.ts +16 -0
- package/dist/workbench/session-workbench-panes.js +580 -0
- package/dist/workbench/session-workbench-panes.js.map +1 -0
- package/dist/workbench/session-workspace-api.cjs +157 -0
- package/dist/workbench/session-workspace-api.cjs.map +1 -0
- package/dist/workbench/session-workspace-api.d.ts +70 -0
- package/dist/workbench/session-workspace-api.js +157 -0
- package/dist/workbench/session-workspace-api.js.map +1 -0
- package/dist/workbench/use-session-workspace.cjs +100 -0
- package/dist/workbench/use-session-workspace.cjs.map +1 -0
- package/dist/workbench/use-session-workspace.d.ts +45 -0
- package/dist/workbench/use-session-workspace.js +100 -0
- package/dist/workbench/use-session-workspace.js.map +1 -0
- package/dist/workbench/workbench-layout-context.cjs +10 -0
- package/dist/workbench/workbench-layout-context.cjs.map +1 -0
- package/dist/workbench/workbench-layout-context.d.ts +17 -0
- package/dist/workbench/workbench-layout-context.js +10 -0
- package/dist/workbench/workbench-layout-context.js.map +1 -0
- package/package.json +21 -10
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.cjs +0 -77
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.cjs.map +0 -1
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.js +0 -77
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.js.map +0 -1
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.cjs +0 -181
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.cjs.map +0 -1
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.js +0 -181
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.js.map +0 -1
- package/dist/packages/agent-runtime/src/asset-attachment.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/asset-attachment.js.map +0 -1
- package/dist/packages/agent-runtime/src/auth-denial.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/auth-denial.js.map +0 -1
- package/dist/packages/agent-runtime/src/client-tool-bridge.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/client-tool-bridge.js.map +0 -1
- package/dist/packages/agent-runtime/src/client-tools.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/client-tools.js.map +0 -1
- package/dist/packages/agent-runtime/src/conversation-index.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/conversation-index.js.map +0 -1
- package/dist/packages/agent-runtime/src/conversation-list.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/conversation-list.js.map +0 -1
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js.map +0 -1
- package/dist/packages/agent-runtime/src/edit-command.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/edit-command.js.map +0 -1
- package/dist/packages/agent-runtime/src/errors.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/errors.js.map +0 -1
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.js.map +0 -1
- package/dist/packages/agent-runtime/src/github-wake-event.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/github-wake-event.js.map +0 -1
- package/dist/packages/agent-runtime/src/interrupts.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/interrupts.js.map +0 -1
- package/dist/packages/agent-runtime/src/message-author.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/message-author.js.map +0 -1
- package/dist/packages/agent-runtime/src/message-window.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/message-window.js.map +0 -1
- package/dist/packages/agent-runtime/src/messages.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/messages.js.map +0 -1
- package/dist/packages/agent-runtime/src/model-context.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/model-context.js.map +0 -1
- package/dist/packages/agent-runtime/src/optimistic-content.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/optimistic-content.js.map +0 -1
- package/dist/packages/agent-runtime/src/protocol.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/protocol.js.map +0 -1
- package/dist/packages/agent-runtime/src/queue.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/queue.js.map +0 -1
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js.map +0 -1
- package/dist/packages/agent-runtime/src/runtime-messages.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/runtime-messages.js.map +0 -1
- package/dist/packages/agent-runtime/src/screen-point.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/screen-point.js.map +0 -1
- package/dist/packages/agent-runtime/src/send-recovery.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/send-recovery.js.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-attach-observer.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-attach-observer.js.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-state.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-state.js.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-suspended.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-suspended.js.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-transport.cjs +0 -11
- package/dist/packages/agent-runtime/src/statewire-transport.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/statewire-transport.js +0 -11
- package/dist/packages/agent-runtime/src/statewire-transport.js.map +0 -1
- package/dist/packages/agent-runtime/src/streaming-markdown.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/streaming-markdown.js.map +0 -1
- package/dist/packages/agent-runtime/src/thread-extras.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/thread-extras.js.map +0 -1
- package/dist/packages/agent-runtime/src/thread-snapshot-cache.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/thread-snapshot-cache.js.map +0 -1
- package/dist/packages/agent-runtime/src/thread-status.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/thread-status.js.map +0 -1
- package/dist/packages/agent-runtime/src/tool-metadata.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/tool-metadata.js.map +0 -1
- package/dist/packages/agent-runtime/src/tool-outputs.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/tool-outputs.js.map +0 -1
- package/dist/packages/agent-runtime/src/tool-result.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/tool-result.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-conversation-list.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-conversation-list.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs +0 -13
- package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-config.js +0 -13
- package/dist/packages/agent-runtime/src/use-deep-agent-config.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-runtime.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-runtime.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.js.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js.map +0 -1
- package/dist/packages/agent-runtime/src/voice-presentation.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/voice-presentation.js.map +0 -1
- package/dist/packages/agent-runtime/src/voice-turn-grouping.cjs.map +0 -1
- package/dist/packages/agent-runtime/src/voice-turn-grouping.js.map +0 -1
- package/dist/packages/tiptap-markdown-table/src/markdown-table-serializer.cjs.map +0 -1
- package/dist/packages/tiptap-markdown-table/src/markdown-table-serializer.js.map +0 -1
- /package/dist/{packages/agent-runtime → agent-runtime}/src/asset-attachment.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/asset-attachment.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/auth-denial.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/auth-denial.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/client-tool-bridge.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/client-tool-bridge.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/client-tools.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/client-tools.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/conversation-index.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/conversation-index.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/edit-command.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/edit-command.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/github-wake-event.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/github-wake-event.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/message-author.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/message-author.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/message-window.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/message-window.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/model-context.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/model-context.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/optimistic-content.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/optimistic-content.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/protocol.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/protocol.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/runtime-messages.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/runtime-messages.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/screen-point.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/screen-point.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/send-recovery.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/send-recovery.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-attach-observer.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/statewire-attach-observer.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/streaming-markdown.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/streaming-markdown.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-extras.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-extras.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-snapshot-cache.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-snapshot-cache.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-status.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/thread-status.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/tool-outputs.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/tool-outputs.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/tool-result.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/tool-result.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-runtime.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-runtime.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-window-sync.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/use-deep-agent-window-sync.js +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/voice-turn-grouping.cjs +0 -0
- /package/dist/{packages/agent-runtime → agent-runtime}/src/voice-turn-grouping.js +0 -0
- /package/dist/{packages/react → react}/package.json.cjs.map +0 -0
- /package/dist/{packages/react → react}/package.json.js.map +0 -0
- /package/dist/{packages/tiptap-markdown-table → tiptap-markdown-table}/src/markdown-table-serializer.cjs +0 -0
- /package/dist/{packages/tiptap-markdown-table → tiptap-markdown-table}/src/markdown-table-serializer.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-markdown.cjs","sources":["../../../../agent-runtime/src/streaming-markdown.ts"],"sourcesContent":["/**\n * Hide a markdown link the stream has not finished writing.\n *\n * The agent mentions and cites assets as markdown links —\n * `[@Considerations/Notes](https://…/dashboard/spaces/?asset_ids=asset_…&type=document&anchor=pm_node&node_id=…&excerpt=…)`\n * — which every chat surface renders as a mention chip once the link is\n * complete. While it is still arriving, a markdown parser sees a bracketed\n * label followed by a bare URL: the label shows as raw text and the half URL\n * linkifies into a live link whose target changes with every batch, for as\n * long as the destination takes to stream (an `excerpt` parameter can run to\n * hundreds of characters). Then the closing `)` lands and the run is rebuilt\n * as a chip.\n *\n * While a part is streaming, cut the text at the start of a trailing link\n * whose `)` has not arrived; it reappears whole, as a chip, in the batch that\n * closes it. Every link and image destination is held — a web citation\n * flickers the same way — and so is every bracket still undecided on the\n * line: an unfinished `[label`, and a closed `[label]` at the very end of the\n * text, which waits one batch for its `(`. Holding the label too is what\n * makes the visible text only ever grow — a link never shows as a label and\n * then retracts when its destination starts — and that append-only property\n * is what keeps Olympus's incremental streaming apply on its cheap path.\n * Brackets match innermost-first, as CommonMark does, and the hold starts at\n * the outermost undecided bracket the size bound allows, so an unmatched\n * bracket in prose hides at most a phrase, briefly, and never masks a later\n * mention. A construct that crosses a line break or runs past its bound is\n * released so a malformed link cannot hide the rest of the message; fenced\n * code (including fences inside blockquotes), indented code and inline code\n * are left untouched; and settled text is never passed through this\n * function, so a link the model genuinely left open shows raw once the part\n * completes.\n *\n * Shared by every chat surface (Olympus, the React SDK hosts, mobile) so the\n * hold behaves identically wherever a transcript streams. Pure string work,\n * linear in the text.\n */\n\n/** An open bracket further back than this is prose, not a label being streamed. */\nexport const UNTERMINATED_LABEL_HOLD_LIMIT = 200;\n/** A link (label and destination) longer than this is broken, not streaming. */\nexport const UNTERMINATED_LINK_HOLD_LIMIT = 1500;\n\n/** Opening or closing code fence: three or more backticks or tildes, then the info string. */\nconst FENCE_LINE = /^\\s*(`{3,}|~{3,})(.*)$/;\n/** Leading blockquote markers (`> `, `>>`, each indented at most three spaces). */\nconst BLOCKQUOTE_PREFIX = /^(?: {0,3}>[ \\t]?)+/;\n/** Bullet or ordered list marker at the start of a line, with the spaces that follow it. */\nconst LIST_MARKER = /^([ \\t]*)([-*+]|\\d{1,9}[.)])([ \\t]+)/;\n\n/**\n * The streamed text with a trailing, still-undecided markdown link or image\n * removed. Text without such a construct is returned as is, and the result is\n * always a prefix of `text`.\n */\nexport function hideUnterminatedMarkdownLink(text: string): string {\n if (!text.includes(\"[\")) return text;\n\n const start = scanTrailingLink(text);\n return start === null ? text : text.slice(0, start);\n}\n\n/** Length of the run of `char` starting at `index`. */\nfunction runLength(text: string, index: number, char: string): number {\n let end = index;\n while (end < text.length && text[end] === char) end += 1;\n return end - index;\n}\n\n/**\n * Index just past the backtick run of exactly `length` that closes a code\n * span opened before `from`, or -1 when none arrives before the paragraph\n * ends (a blank line) — an open span runs to the end of the text.\n */\nfunction codeSpanEnd(text: string, from: number, length: number): number {\n const blankLine = text.indexOf(\"\\n\\n\", from);\n const paragraphEnd = blankLine === -1 ? text.length : blankLine;\n let cursor = from;\n while (cursor < paragraphEnd) {\n const next = text.indexOf(\"`\", cursor);\n if (next === -1 || next >= paragraphEnd) return -1;\n const run = runLength(text, next, \"`\");\n if (run === length) return next + run;\n cursor = next + run;\n }\n return -1;\n}\n\n/**\n * The fence run a line opens or closes, or null. A backtick fence's info\n * string cannot contain a backtick (that is inline code, not a fence).\n */\nfunction fenceRun(line: string): string | null {\n const match = FENCE_LINE.exec(line);\n if (!match) return null;\n if (match[1][0] === \"`\" && match[2].includes(\"`\")) return null;\n return match[1];\n}\n\n/** Columns of leading whitespace on a line; a tab counts as four. */\nfunction leadingIndent(line: string): number {\n let indent = 0;\n for (const char of line) {\n if (char === \" \") indent += 1;\n else if (char === \"\\t\") indent += 4;\n else break;\n }\n return indent;\n}\n\n/**\n * Tracks the block structure the inline scan must not read: fenced code\n * (also inside blockquotes), indented code, and the list nesting that decides\n * how deep an indent has to be before it is code rather than a nested item\n * or a continuation paragraph. Fed one line at a time, in order.\n */\nfunction createBlockTracker() {\n let fence: string | null = null;\n let indentedCode = false;\n let previousBlank = true;\n /** Content indents of the open list items, outermost first. */\n const listContentIndents: number[] = [];\n\n /** Whether `line` is prose the inline scan should read. */\n return (line: string): boolean => {\n const content = line.replace(BLOCKQUOTE_PREFIX, \"\");\n const blank = content.trim() === \"\";\n try {\n const run = fenceRun(content);\n if (fence !== null) {\n // Code: a run of the same character at least as long as the opener\n // closes the block; everything else on the line is content.\n if (run !== null && run[0] === fence[0] && run.length >= fence.length) fence = null;\n return false;\n }\n if (run !== null) {\n fence = run;\n indentedCode = false;\n return false;\n }\n\n // Indented code needs four columns beyond the innermost open list\n // item's content — less than that is a nested item or a continuation\n // paragraph — and cannot interrupt a paragraph.\n const indent = leadingIndent(line);\n const codeIndent = (listContentIndents.at(-1) ?? 0) + 4;\n if (indentedCode) {\n if (blank || indent >= codeIndent) return false;\n indentedCode = false;\n } else if (!blank && previousBlank && indent >= codeIndent) {\n indentedCode = true;\n return false;\n }\n if (blank) return true;\n\n const marker = LIST_MARKER.exec(line);\n if (marker) {\n const markerIndent = leadingIndent(marker[1]);\n while ((listContentIndents.at(-1) ?? -1) > markerIndent) listContentIndents.pop();\n // Five or more spaces after the marker start an indented code block\n // inside the item, so the content column is one past the marker.\n const gap = marker[3].length;\n const width = marker[2].length;\n listContentIndents.push(markerIndent + width + (gap > 4 ? 1 : gap));\n } else {\n while (listContentIndents.length > 0 && indent < (listContentIndents.at(-1) ?? 0)) {\n listContentIndents.pop();\n }\n }\n return true;\n } finally {\n previousBlank = blank;\n }\n };\n}\n\n/**\n * The CommonMark link-destination grammar after `](`: optional whitespace,\n * then either `<…>` or a bare destination whose parentheses must balance,\n * then optional whitespace and a `\"…\"`, `'…'` or `(…)` title, then `)`.\n */\ninterface Destination {\n start: number;\n phase: \"start\" | \"angle\" | \"bare\" | \"after-destination\" | \"title\" | \"after-title\";\n depth: number;\n titleClose: string;\n}\n\nfunction advanceDestination(\n destination: Destination,\n char: string,\n): \"open\" | \"closed\" | \"invalid\" {\n const space = char === \" \" || char === \"\\t\";\n switch (destination.phase) {\n case \"start\":\n if (space) return \"open\";\n if (char === \")\") return \"closed\";\n if (char === \"<\") {\n destination.phase = \"angle\";\n return \"open\";\n }\n destination.phase = \"bare\";\n return advanceDestination(destination, char);\n case \"angle\":\n if (char === \">\") destination.phase = \"after-destination\";\n return \"open\";\n case \"bare\":\n if (char === \"(\") {\n destination.depth += 1;\n return \"open\";\n }\n if (char === \")\") {\n if (destination.depth === 0) return \"closed\";\n destination.depth -= 1;\n return \"open\";\n }\n if (space) destination.phase = \"after-destination\";\n return \"open\";\n case \"after-destination\":\n if (space) return \"open\";\n if (char === \")\") return \"closed\";\n if (char === '\"' || char === \"'\" || char === \"(\") {\n destination.phase = \"title\";\n destination.titleClose = char === \"(\" ? \")\" : char;\n return \"open\";\n }\n return \"invalid\";\n case \"title\":\n if (char === destination.titleClose) destination.phase = \"after-title\";\n return \"open\";\n case \"after-title\":\n if (space) return \"open\";\n return char === \")\" ? \"closed\" : \"invalid\";\n }\n}\n\n/**\n * Where the text should be cut for the link construct still undecided at its\n * very end, or null when nothing is open: the outermost unclosed `[` within\n * the label bound, else the `[` of a closed label or open destination that\n * is still within its own bound.\n */\nfunction scanTrailingLink(text: string): number | null {\n /** Positions of the `[` not yet closed on this line, outermost first. */\n let labelStarts: number[] = [];\n /** The `[` whose `]` is the last character of the text — `(` may be next. */\n let closedAtEnd: number | null = null;\n let destination: Destination | null = null;\n const isProseLine = createBlockTracker();\n let index = 0;\n let lineStart = true;\n\n const resetInline = (): void => {\n labelStarts = [];\n closedAtEnd = null;\n destination = null;\n };\n const result = (): number | null => {\n // Every bracket still open on the line may yet become a link, so hold\n // from the outermost one the bound allows: the visible text then only\n // ever grows, even as an inner link opens and closes.\n for (const start of labelStarts) {\n if (text.length - start <= UNTERMINATED_LABEL_HOLD_LIMIT) return start;\n }\n if (destination !== null) {\n return text.length - destination.start <= UNTERMINATED_LINK_HOLD_LIMIT\n ? destination.start\n : null;\n }\n if (closedAtEnd !== null && text.length - closedAtEnd <= UNTERMINATED_LABEL_HOLD_LIMIT) {\n return closedAtEnd;\n }\n return null;\n };\n\n while (index < text.length) {\n if (lineStart) {\n lineStart = false;\n let lineEnd = text.indexOf(\"\\n\", index);\n if (lineEnd === -1) lineEnd = text.length;\n if (!isProseLine(text.slice(index, lineEnd))) {\n // A block boundary or a code line: no inline construct survives it.\n resetInline();\n index = lineEnd + 1;\n lineStart = true;\n continue;\n }\n }\n\n const char = text[index];\n if (char === \"\\n\") {\n // Labels and destinations do not span lines in a streamed message.\n resetInline();\n lineStart = true;\n index += 1;\n continue;\n }\n if (char === \"\\\\\") {\n index += 2;\n continue;\n }\n if (char === \"`\") {\n const length = runLength(text, index, \"`\");\n const end = codeSpanEnd(text, index + length, length);\n // An open code span runs to the end of the text: nothing after it is\n // markdown, and a construct opened before it is still being written.\n if (end === -1) return result();\n index = end;\n continue;\n }\n\n if (destination !== null) {\n const verdict = advanceDestination(destination, char);\n if (verdict !== \"open\") destination = null;\n } else if (char === \"[\") {\n // An image's `!` stays visible: cutting before it would take back a\n // character already shown, and the renderer consumes it at completion.\n labelStarts.push(index);\n } else if (char === \"]\") {\n // Innermost-first, as CommonMark matches brackets: the `]` closes the\n // most recent `[`, and only that pair can become a link.\n const start = labelStarts.pop();\n if (start !== undefined) {\n if (index + 1 >= text.length) {\n closedAtEnd = start;\n } else if (text[index + 1] === \"(\") {\n destination = { start, phase: \"start\", depth: 0, titleClose: \"\" };\n index += 1;\n }\n }\n }\n index += 1;\n }\n\n return result();\n}\n"],"names":[],"mappings":";;AAsCO,MAAM,gCAAgC;AAEtC,MAAM,+BAA+B;AAG5C,MAAM,aAAa;AAEnB,MAAM,oBAAoB;AAE1B,MAAM,cAAc;AAOb,SAAS,6BAA6B,MAAsB;AACjE,MAAI,CAAC,KAAK,SAAS,GAAG,EAAG,QAAO;AAEhC,QAAM,QAAQ,iBAAiB,IAAI;AACnC,SAAO,UAAU,OAAO,OAAO,KAAK,MAAM,GAAG,KAAK;AACpD;AAGA,SAAS,UAAU,MAAc,OAAe,MAAsB;AACpE,MAAI,MAAM;AACV,SAAO,MAAM,KAAK,UAAU,KAAK,GAAG,MAAM,KAAM,QAAO;AACvD,SAAO,MAAM;AACf;AAOA,SAAS,YAAY,MAAc,MAAc,QAAwB;AACvE,QAAM,YAAY,KAAK,QAAQ,QAAQ,IAAI;AAC3C,QAAM,eAAe,cAAc,KAAK,KA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A;AACA,kBAAY;AACZ,eAAS;AACT;AAAA,IACF;AACA,QAAI,SAAS,MAAM;AACjB,eAAS;AACT;AAAA,IACF;AACA,QAAI,SAAS,KAAK;AAChB,YAAM,SAAS,UAAU,MAAM,OAAO,GAAG;AACzC,YAAM,MAAM,YAAY,MAAM,QAAQ,QAAQ,MAAM;AAGpD,UAAI,QAAQ,GAAI,QAAO,OAAA;AACvB,cAAQ;AACR;AAAA,IACF;AAEA,QAAI,gBAAgB,MAAM;AACxB,YAAM,UAAU,mBAAmB,aAAa,IAAI;AACpD,UAAI,YAAY,OAAQ,eAAc;AAAA,IACxC,WAAW,SAAS,KAAK;AAGvB,kBAAY,KAAK,KAAK;AAAA,IACxB,WAAW,SAAS,KAAK;AAGvB,YAAM,QAAQ,YAAY,IAAA;AAC1B,UAAI,UAAU,QAAW;AACvB,YAAI,QAAQ,KAAK,KAAK,QAAQ;AAC5B,wBAAc;AAAA,QAChB,WAAW,KAAK,QAAQ,CAAC,MAAM,KAAK;AAClC,wBAAc,EAAE,OAAO,OAAO,SAAS,OAAO,GAAG,YAAY,GAAA;AAC7D,mBAAS;AAAA,QACX;AAAA,MACF;AAAA,IACF;AACA,aAAS;AAAA,EACX;AAEA,SAAO,OAAA;AACT;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-markdown.js","sources":["../../../../agent-runtime/src/streaming-markdown.ts"],"sourcesContent":["/**\n * Hide a markdown link the stream has not finished writing.\n *\n * The agent mentions and cites assets as markdown links —\n * `[@Considerations/Notes](https://…/dashboard/spaces/?asset_ids=asset_…&type=document&anchor=pm_node&node_id=…&excerpt=…)`\n * — which every chat surface renders as a mention chip once the link is\n * complete. While it is still arriving, a markdown parser sees a bracketed\n * label followed by a bare URL: the label shows as raw text and the half URL\n * linkifies into a live link whose target changes with every batch, for as\n * long as the destination takes to stream (an `excerpt` parameter can run to\n * hundreds of characters). Then the closing `)` lands and the run is rebuilt\n * as a chip.\n *\n * While a part is streaming, cut the text at the start of a trailing link\n * whose `)` has not arrived; it reappears whole, as a chip, in the batch that\n * closes it. Every link and image destination is held — a web citation\n * flickers the same way — and so is every bracket still undecided on the\n * line: an unfinished `[label`, and a closed `[label]` at the very end of the\n * text, which waits one batch for its `(`. Holding the label too is what\n * makes the visible text only ever grow — a link never shows as a label and\n * then retracts when its destination starts — and that append-only property\n * is what keeps Olympus's incremental streaming apply on its cheap path.\n * Brackets match innermost-first, as CommonMark does, and the hold starts at\n * the outermost undecided bracket the size bound allows, so an unmatched\n * bracket in prose hides at most a phrase, briefly, and never masks a later\n * mention. A construct that crosses a line break or runs past its bound is\n * released so a malformed link cannot hide the rest of the message; fenced\n * code (including fences inside blockquotes), indented code and inline code\n * are left untouched; and settled text is never passed through this\n * function, so a link the model genuinely left open shows raw once the part\n * completes.\n *\n * Shared by every chat surface (Olympus, the React SDK hosts, mobile) so the\n * hold behaves identically wherever a transcript streams. Pure string work,\n * linear in the text.\n */\n\n/** An open bracket further back than this is prose, not a label being streamed. */\nexport const UNTERMINATED_LABEL_HOLD_LIMIT = 200;\n/** A link (label and destination) longer than this is broken, not streaming. */\nexport const UNTERMINATED_LINK_HOLD_LIMIT = 1500;\n\n/** Opening or closing code fence: three or more backticks or tildes, then the info string. */\nconst FENCE_LINE = /^\\s*(`{3,}|~{3,})(.*)$/;\n/** Leading blockquote markers (`> `, `>>`, each indented at most three spaces). */\nconst BLOCKQUOTE_PREFIX = /^(?: {0,3}>[ \\t]?)+/;\n/** Bullet or ordered list marker at the start of a line, with the spaces that follow it. */\nconst LIST_MARKER = /^([ \\t]*)([-*+]|\\d{1,9}[.)])([ \\t]+)/;\n\n/**\n * The streamed text with a trailing, still-undecided markdown link or image\n * removed. Text without such a construct is returned as is, and the result is\n * always a prefix of `text`.\n */\nexport function hideUnterminatedMarkdownLink(text: string): string {\n if (!text.includes(\"[\")) return text;\n\n const start = scanTrailingLink(text);\n return start === null ? text : text.slice(0, start);\n}\n\n/** Length of the run of `char` starting at `index`. */\nfunction runLength(text: string, index: number, char: string): number {\n let end = index;\n while (end < text.length && text[end] === char) end += 1;\n return end - index;\n}\n\n/**\n * Index just past the backtick run of exactly `length` that closes a code\n * span opened before `from`, or -1 when none arrives before the paragraph\n * ends (a blank line) — an open span runs to the end of the text.\n */\nfunction codeSpanEnd(text: string, from: number, length: number): number {\n const blankLine = text.indexOf(\"\\n\\n\", from);\n const paragraphEnd = blankLine === -1 ? text.length : blankLine;\n let cursor = from;\n while (cursor < paragraphEnd) {\n const next = text.indexOf(\"`\", cursor);\n if (next === -1 || next >= paragraphEnd) return -1;\n const run = runLength(text, next, \"`\");\n if (run === length) return next + run;\n cursor = next + run;\n }\n return -1;\n}\n\n/**\n * The fence run a line opens or closes, or null. A backtick fence's info\n * string cannot contain a backtick (that is inline code, not a fence).\n */\nfunction fenceRun(line: string): string | null {\n const match = FENCE_LINE.exec(line);\n if (!match) return null;\n if (match[1][0] === \"`\" && match[2].includes(\"`\")) return null;\n return match[1];\n}\n\n/** Columns of leading whitespace on a line; a tab counts as four. */\nfunction leadingIndent(line: string): number {\n let indent = 0;\n for (const char of line) {\n if (char === \" \") indent += 1;\n else if (char === \"\\t\") indent += 4;\n else break;\n }\n return indent;\n}\n\n/**\n * Tracks the block structure the inline scan must not read: fenced code\n * (also inside blockquotes), indented code, and the list nesting that decides\n * how deep an indent has to be before it is code rather than a nested item\n * or a continuation paragraph. Fed one line at a time, in order.\n */\nfunction createBlockTracker() {\n let fence: string | null = null;\n let indentedCode = false;\n let previousBlank = true;\n /** Content indents of the open list items, outermost first. */\n const listContentIndents: number[] = [];\n\n /** Whether `line` is prose the inline scan should read. */\n return (line: string): boolean => {\n const content = line.replace(BLOCKQUOTE_PREFIX, \"\");\n const blank = content.trim() === \"\";\n try {\n const run = fenceRun(content);\n if (fence !== null) {\n // Code: a run of the same character at least as long as the opener\n // closes the block; everything else on the line is content.\n if (run !== null && run[0] === fence[0] && run.length >= fence.length) fence = null;\n return false;\n }\n if (run !== null) {\n fence = run;\n indentedCode = false;\n return false;\n }\n\n // Indented code needs four columns beyond the innermost open list\n // item's content — less than that is a nested item or a continuation\n // paragraph — and cannot interrupt a paragraph.\n const indent = leadingIndent(line);\n const codeIndent = (listContentIndents.at(-1) ?? 0) + 4;\n if (indentedCode) {\n if (blank || indent >= codeIndent) return false;\n indentedCode = false;\n } else if (!blank && previousBlank && indent >= codeIndent) {\n indentedCode = true;\n return false;\n }\n if (blank) return true;\n\n const marker = LIST_MARKER.exec(line);\n if (marker) {\n const markerIndent = leadingIndent(marker[1]);\n while ((listContentIndents.at(-1) ?? -1) > markerIndent) listContentIndents.pop();\n // Five or more spaces after the marker start an indented code block\n // inside the item, so the content column is one past the marker.\n const gap = marker[3].length;\n const width = marker[2].length;\n listContentIndents.push(markerIndent + width + (gap > 4 ? 1 : gap));\n } else {\n while (listContentIndents.length > 0 && indent < (listContentIndents.at(-1) ?? 0)) {\n listContentIndents.pop();\n }\n }\n return true;\n } finally {\n previousBlank = blank;\n }\n };\n}\n\n/**\n * The CommonMark link-destination grammar after `](`: optional whitespace,\n * then either `<…>` or a bare destination whose parentheses must balance,\n * then optional whitespace and a `\"…\"`, `'…'` or `(…)` title, then `)`.\n */\ninterface Destination {\n start: number;\n phase: \"start\" | \"angle\" | \"bare\" | \"after-destination\" | \"title\" | \"after-title\";\n depth: number;\n titleClose: string;\n}\n\nfunction advanceDestination(\n destination: Destination,\n char: string,\n): \"open\" | \"closed\" | \"invalid\" {\n const space = char === \" \" || char === \"\\t\";\n switch (destination.phase) {\n case \"start\":\n if (space) return \"open\";\n if (char === \")\") return \"closed\";\n if (char === \"<\") {\n destination.phase = \"angle\";\n return \"open\";\n }\n destination.phase = \"bare\";\n return advanceDestination(destination, char);\n case \"angle\":\n if (char === \">\") destination.phase = \"after-destination\";\n return \"open\";\n case \"bare\":\n if (char === \"(\") {\n destination.depth += 1;\n return \"open\";\n }\n if (char === \")\") {\n if (destination.depth === 0) return \"closed\";\n destination.depth -= 1;\n return \"open\";\n }\n if (space) destination.phase = \"after-destination\";\n return \"open\";\n case \"after-destination\":\n if (space) return \"open\";\n if (char === \")\") return \"closed\";\n if (char === '\"' || char === \"'\" || char === \"(\") {\n destination.phase = \"title\";\n destination.titleClose = char === \"(\" ? \")\" : char;\n return \"open\";\n }\n return \"invalid\";\n case \"title\":\n if (char === destination.titleClose) destination.phase = \"after-title\";\n return \"open\";\n case \"after-title\":\n if (space) return \"open\";\n return char === \")\" ? \"closed\" : \"invalid\";\n }\n}\n\n/**\n * Where the text should be cut for the link construct still undecided at its\n * very end, or null when nothing is open: the outermost unclosed `[` within\n * the label bound, else the `[` of a closed label or open destination that\n * is still within its own bound.\n */\nfunction scanTrailingLink(text: string): number | null {\n /** Positions of the `[` not yet closed on this line, outermost first. */\n let labelStarts: number[] = [];\n /** The `[` whose `]` is the last character of the text — `(` may be next. */\n let closedAtEnd: number | null = null;\n let destination: Destination | null = null;\n const isProseLine = createBlockTracker();\n let index = 0;\n let lineStart = true;\n\n const resetInline = (): void => {\n labelStarts = [];\n closedAtEnd = null;\n destination = null;\n };\n const result = (): number | null => {\n // Every bracket still open on the line may yet become a link, so hold\n // from the outermost one the bound allows: the visible text then only\n // ever grows, even as an inner link opens and closes.\n for (const start of labelStarts) {\n if (text.length - start <= UNTERMINATED_LABEL_HOLD_LIMIT) return start;\n }\n if (destination !== null) {\n return text.length - destination.start <= UNTERMINATED_LINK_HOLD_LIMIT\n ? destination.start\n : null;\n }\n if (closedAtEnd !== null && text.length - closedAtEnd <= UNTERMINATED_LABEL_HOLD_LIMIT) {\n return closedAtEnd;\n }\n return null;\n };\n\n while (index < text.length) {\n if (lineStart) {\n lineStart = false;\n let lineEnd = text.indexOf(\"\\n\", index);\n if (lineEnd === -1) lineEnd = text.length;\n if (!isProseLine(text.slice(index, lineEnd))) {\n // A block boundary or a code line: no inline construct survives it.\n resetInline();\n index = lineEnd + 1;\n lineStart = true;\n continue;\n }\n }\n\n const char = text[index];\n if (char === \"\\n\") {\n // Labels and destinations do not span lines in a streamed message.\n resetInline();\n lineStart = true;\n index += 1;\n continue;\n }\n if (char === \"\\\\\") {\n index += 2;\n continue;\n }\n if (char === \"`\") {\n const length = runLength(text, index, \"`\");\n const end = codeSpanEnd(text, index + length, length);\n // An open code span runs to the end of the text: nothing after it is\n // markdown, and a construct opened before it is still being written.\n if (end === -1) return result();\n index = end;\n continue;\n }\n\n if (destination !== null) {\n const verdict = advanceDestination(destination, char);\n if (verdict !== \"open\") destination = null;\n } else if (char === \"[\") {\n // An image's `!` stays visible: cutting before it would take back a\n // character already shown, and the renderer consumes it at completion.\n labelStarts.push(index);\n } else if (char === \"]\") {\n // Innermost-first, as CommonMark matches brackets: the `]` closes the\n // most recent `[`, and only that pair can become a link.\n const start = labelStarts.pop();\n if (start !== undefined) {\n if (index + 1 >= text.length) {\n closedAtEnd = start;\n } else if (text[index + 1] === \"(\") {\n destination = { start, phase: \"start\", depth: 0, titleClose: \"\" };\n index += 1;\n }\n }\n }\n index += 1;\n }\n\n return result();\n}\n"],"names":[],"mappings":"AAsCO,MAAM,gCAAgC;AAEtC,MAAM,+BAA+B;AAG5C,MAAM,aAAa;AAEnB,MAAM,oBAAoB;AAE1B,MAAM,cAAc;AAOb,SAAS,6BAA6B,MAAsB;AACjE,MAAI,CAAC,KAAK,SAAS,GAAG,EAAG,QAAO;AAEhC,QAAM,QAAQ,iBAAiB,IAAI;AACnC,SAAO,UAAU,OAAO,OAAO,KAAK,MAAM,GAAG,KAAK;AACpD;AAGA,SAAS,UAAU,MAAc,OAAe,MAAsB;AACpE,MAAI,MAAM;AACV,SAAO,MAAM,KAAK,UAAU,KAAK,GAAG,MAAM,KAAM,QAAO;AACvD,SAAO,MAAM;AACf;AAOA,SAAS,YAAY,MAAc,MAAc,QAAwB;AACvE,QAAM,YAAY,KAAK,QAAQ,QAAQ,IAAI;AAC3C,QAAM,eAAe,cAAc,KAAK,KAAK,SAAS;AACtD,MAAI,SAAS;AACb,SAAO,SAAS,cAAc;AAC5B,UAAM,OA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ACjB,eAAS;AACT;AAAA,IACF;AACA,QAAI,SAAS,KAAK;AAChB,YAAM,SAAS,UAAU,MAAM,OAAO,GAAG;AACzC,YAAM,MAAM,YAAY,MAAM,QAAQ,QAAQ,MAAM;AAGpD,UAAI,QAAQ,GAAI,QAAO,OAAA;AACvB,cAAQ;AACR;AAAA,IACF;AAEA,QAAI,gBAAgB,MAAM;AACxB,YAAM,UAAU,mBAAmB,aAAa,IAAI;AACpD,UAAI,YAAY,OAAQ,eAAc;AAAA,IACxC,WAAW,SAAS,KAAK;AAGvB,kBAAY,KAAK,KAAK;AAAA,IACxB,WAAW,SAAS,KAAK;AAGvB,YAAM,QAAQ,YAAY,IAAA;AAC1B,UAAI,UAAU,QAAW;AACvB,YAAI,QAAQ,KAAK,KAAK,QAAQ;AAC5B,wBAAc;AAAA,QAChB,WAAW,KAAK,QAAQ,CAAC,MAAM,KAAK;AAClC,wBAAc,EAAE,OAAO,OAAO,SAAS,OAAO,GAAG,YAAY,GAAA;AAC7D,mBAAS;AAAA,QACX;AAAA,MACF;AAAA,IACF;AACA,aAAS;AAAA,EACX;AAEA,SAAO,OAAA;AACT;"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const SUBSCRIPTION_EVENT_KEY = "athena_subscription_event";
|
|
4
|
+
const MAX_SHOWN_PLACES = 3;
|
|
5
|
+
const MAX_VALUE_CHARS = 40;
|
|
6
|
+
const CONTENT_CHANGED = "asset.content.changed";
|
|
7
|
+
const COMMENT_CREATED = "asset.comment.created";
|
|
8
|
+
const COMMENT_REPLIED = "asset.comment.replied";
|
|
9
|
+
const COMMENT_RESOLVED = "asset.comment.resolved";
|
|
10
|
+
const PRESENCE_JOINED = "asset.presence.joined";
|
|
11
|
+
const SLACK_PREFIX = "user_slack.";
|
|
12
|
+
const COMMENT_EVENTS = /* @__PURE__ */ new Set([
|
|
13
|
+
COMMENT_CREATED,
|
|
14
|
+
COMMENT_REPLIED,
|
|
15
|
+
COMMENT_RESOLVED
|
|
16
|
+
]);
|
|
17
|
+
const SLACK_WORDS = {
|
|
18
|
+
"user_slack.dm.received": "sent you a Slack direct message",
|
|
19
|
+
"user_slack.mention.received": "mentioned you in Slack",
|
|
20
|
+
"user_slack.thread_reply.received": "replied in your Slack thread",
|
|
21
|
+
"user_slack.channel_message.posted": "posted in a Slack channel",
|
|
22
|
+
"user_slack.reaction.added": "reacted to a Slack message",
|
|
23
|
+
"user_slack.message.saved": "saved a Slack message",
|
|
24
|
+
"user_slack.pin.added": "pinned a Slack message"
|
|
25
|
+
};
|
|
26
|
+
function isRecord(value) {
|
|
27
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28
|
+
}
|
|
29
|
+
function stringOf(value) {
|
|
30
|
+
return typeof value === "string" && value.trim().length > 0 ? value : null;
|
|
31
|
+
}
|
|
32
|
+
function numberOf(value) {
|
|
33
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
34
|
+
}
|
|
35
|
+
function sheetQualifier(sheet) {
|
|
36
|
+
return /^[A-Za-z_][A-Za-z0-9_.]*$/.test(sheet) ? sheet : `'${sheet.replaceAll("'", "''")}'`;
|
|
37
|
+
}
|
|
38
|
+
function subscriptionPlaceWords(anchor) {
|
|
39
|
+
if (!isRecord(anchor)) return null;
|
|
40
|
+
const sheet = stringOf(anchor.sheet) ?? stringOf(anchor.sheet_name);
|
|
41
|
+
const range = stringOf(anchor.range) ?? stringOf(anchor.cell);
|
|
42
|
+
if (range) return sheet ? `${sheetQualifier(sheet)}!${range}` : range;
|
|
43
|
+
const page = numberOf(anchor.page);
|
|
44
|
+
if (page !== null) return `page ${page}`;
|
|
45
|
+
const slide = numberOf(anchor.slide_index);
|
|
46
|
+
if (slide !== null) return `slide ${slide}`;
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
function actorWords(envelope) {
|
|
50
|
+
const actor = isRecord(envelope.actor) ? envelope.actor : {};
|
|
51
|
+
const name = stringOf(actor.name);
|
|
52
|
+
let who;
|
|
53
|
+
switch (actor.kind) {
|
|
54
|
+
case "self":
|
|
55
|
+
who = "You";
|
|
56
|
+
break;
|
|
57
|
+
case "agent":
|
|
58
|
+
who = name ?? "An agent";
|
|
59
|
+
break;
|
|
60
|
+
case "system":
|
|
61
|
+
who = name ?? "Athena";
|
|
62
|
+
break;
|
|
63
|
+
default:
|
|
64
|
+
who = name ?? "Someone";
|
|
65
|
+
}
|
|
66
|
+
const more = numberOf(envelope.more_actors) ?? 0;
|
|
67
|
+
if (more <= 0) return who;
|
|
68
|
+
return `${who} and ${more} ${more === 1 ? "other" : "others"}`;
|
|
69
|
+
}
|
|
70
|
+
function readChanges(value) {
|
|
71
|
+
if (!Array.isArray(value)) return [];
|
|
72
|
+
return value.flatMap((entry) => {
|
|
73
|
+
if (!isRecord(entry)) return [];
|
|
74
|
+
const raw = entry.value;
|
|
75
|
+
const scalar = typeof raw === "string" || typeof raw === "number" || typeof raw === "boolean" ? String(raw) : null;
|
|
76
|
+
return [{ place: subscriptionPlaceWords(entry.anchor), value: scalar }];
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function readSubscriptionWakeEvent(custom) {
|
|
80
|
+
const envelope = custom == null ? void 0 : custom[SUBSCRIPTION_EVENT_KEY];
|
|
81
|
+
if (!isRecord(envelope)) return void 0;
|
|
82
|
+
const subscriptionId = stringOf(envelope.subscription_id);
|
|
83
|
+
if (subscriptionId === null) return void 0;
|
|
84
|
+
const comment = isRecord(envelope.comment) ? envelope.comment : null;
|
|
85
|
+
const schedule = isRecord(envelope.schedule) ? envelope.schedule : null;
|
|
86
|
+
const eventTypes = Array.isArray(envelope.event_types) ? envelope.event_types.filter((type) => typeof type === "string") : [];
|
|
87
|
+
const subscribed = Array.isArray(envelope.subscribed) ? envelope.subscribed.flatMap((anchor) => {
|
|
88
|
+
const words = subscriptionPlaceWords(anchor);
|
|
89
|
+
return words ? [words] : [];
|
|
90
|
+
}) : [];
|
|
91
|
+
return {
|
|
92
|
+
subscriptionId,
|
|
93
|
+
kind: envelope.kind === "schedule" ? "schedule" : "event",
|
|
94
|
+
assetTitle: stringOf(envelope.asset_title),
|
|
95
|
+
eventTypes,
|
|
96
|
+
eventCount: numberOf(envelope.event_count),
|
|
97
|
+
actor: actorWords(envelope),
|
|
98
|
+
changes: readChanges(envelope.changes),
|
|
99
|
+
moreChanges: Math.max(0, numberOf(envelope.more_changes) ?? 0),
|
|
100
|
+
subscribed,
|
|
101
|
+
commentPlace: comment ? subscriptionPlaceWords(comment.anchor) : null,
|
|
102
|
+
commentResolved: typeof (comment == null ? void 0 : comment.resolved) === "boolean" ? comment.resolved : null,
|
|
103
|
+
scheduleSetAt: schedule ? stringOf(schedule.set_at) : null,
|
|
104
|
+
note: stringOf(envelope.note),
|
|
105
|
+
runsLeft: numberOf(envelope.runs_left),
|
|
106
|
+
deliveredAt: stringOf(envelope.delivered_at)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function isSubscriptionWakeMessage(custom) {
|
|
110
|
+
return readSubscriptionWakeEvent(custom) !== void 0;
|
|
111
|
+
}
|
|
112
|
+
function valueWords(value) {
|
|
113
|
+
const folded = value.replace(/\s+/g, " ").trim();
|
|
114
|
+
if (folded === "") return "“ ”";
|
|
115
|
+
return folded.length > MAX_VALUE_CHARS ? `${folded.slice(0, MAX_VALUE_CHARS - 1).trimEnd()}…` : folded;
|
|
116
|
+
}
|
|
117
|
+
function joinList({ items, last }) {
|
|
118
|
+
if (items.length <= 1) return items.join("");
|
|
119
|
+
return `${items.slice(0, -1).join(", ")}${last}${items.at(-1)}`;
|
|
120
|
+
}
|
|
121
|
+
function joinClauses(clauses) {
|
|
122
|
+
const itemLast = clauses.length === 1 ? " and " : ", ";
|
|
123
|
+
return joinList({
|
|
124
|
+
items: clauses.map(({ lead, items }) => `${lead}${joinList({ items, last: itemLast })}`),
|
|
125
|
+
last: " and "
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function changeClauses({
|
|
129
|
+
changes,
|
|
130
|
+
moreChanges
|
|
131
|
+
}) {
|
|
132
|
+
const located = changes.filter(
|
|
133
|
+
(change) => change.place !== null
|
|
134
|
+
);
|
|
135
|
+
const shown = located.slice(0, MAX_SHOWN_PLACES);
|
|
136
|
+
if (shown.length === 0) return [];
|
|
137
|
+
const hidden = located.length - shown.length + moreChanges;
|
|
138
|
+
const set = shown.filter((change) => change.value !== null && change.value !== "");
|
|
139
|
+
const cleared = shown.filter((change) => change.value === "");
|
|
140
|
+
const changed = shown.filter((change) => change.value === null);
|
|
141
|
+
const clauses = [];
|
|
142
|
+
if (set.length > 0) {
|
|
143
|
+
clauses.push({
|
|
144
|
+
lead: "set ",
|
|
145
|
+
items: set.map((change) => `${change.place} to ${valueWords(change.value ?? "")}`)
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
if (cleared.length > 0) {
|
|
149
|
+
clauses.push({ lead: "cleared ", items: cleared.map((change) => change.place) });
|
|
150
|
+
}
|
|
151
|
+
if (changed.length > 0) {
|
|
152
|
+
clauses.push({ lead: "changed ", items: changed.map((change) => change.place) });
|
|
153
|
+
}
|
|
154
|
+
if (hidden > 0) clauses.push({ lead: `${hidden} more`, items: [] });
|
|
155
|
+
return clauses;
|
|
156
|
+
}
|
|
157
|
+
function commentLead({ type, resolved }) {
|
|
158
|
+
if (type === COMMENT_CREATED) return "commented on ";
|
|
159
|
+
if (type === COMMENT_REPLIED) return "replied to a comment on ";
|
|
160
|
+
const verb = resolved === true ? "resolved" : resolved === false ? "reopened" : "updated";
|
|
161
|
+
return `${verb} a comment on `;
|
|
162
|
+
}
|
|
163
|
+
function eventLabel(type) {
|
|
164
|
+
const words = type.replace(/^asset\./, "").replace(/[.\s_-]+/g, " ").trim().toLowerCase();
|
|
165
|
+
return words ? `${words.charAt(0).toUpperCase()}${words.slice(1)}` : "—";
|
|
166
|
+
}
|
|
167
|
+
function eventClauses(event) {
|
|
168
|
+
const asset = event.assetTitle ?? "the asset";
|
|
169
|
+
const changes = changeClauses({ changes: event.changes, moreChanges: event.moreChanges });
|
|
170
|
+
const listed = event.eventTypes;
|
|
171
|
+
const types = [
|
|
172
|
+
...new Set(
|
|
173
|
+
listed.length === 0 || changes.length > 0 && !listed.includes(CONTENT_CHANGED) ? [CONTENT_CHANGED, ...listed] : listed
|
|
174
|
+
)
|
|
175
|
+
];
|
|
176
|
+
const firstComment = types.find((type) => COMMENT_EVENTS.has(type));
|
|
177
|
+
const clauses = types.flatMap((type) => {
|
|
178
|
+
if (type === CONTENT_CHANGED) {
|
|
179
|
+
return changes.length > 0 ? changes : [{ lead: "edited ", items: [asset] }];
|
|
180
|
+
}
|
|
181
|
+
if (COMMENT_EVENTS.has(type)) {
|
|
182
|
+
const where = type === firstComment && event.commentPlace ? event.commentPlace : asset;
|
|
183
|
+
return [{ lead: commentLead({ type, resolved: event.commentResolved }), items: [where] }];
|
|
184
|
+
}
|
|
185
|
+
if (type === PRESENCE_JOINED) return [{ lead: "opened ", items: [asset] }];
|
|
186
|
+
if (type.startsWith(SLACK_PREFIX)) {
|
|
187
|
+
return [{ lead: SLACK_WORDS[type] ?? "had Slack activity", items: [] }];
|
|
188
|
+
}
|
|
189
|
+
return [{ lead: `triggered “${eventLabel(type)}” on `, items: [asset] }];
|
|
190
|
+
});
|
|
191
|
+
const said = /* @__PURE__ */ new Set();
|
|
192
|
+
return clauses.filter((clause) => {
|
|
193
|
+
if (clause.items.length > 0) return true;
|
|
194
|
+
if (said.has(clause.lead)) return false;
|
|
195
|
+
said.add(clause.lead);
|
|
196
|
+
return true;
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function setOnWords({ setAt, now }) {
|
|
200
|
+
const date = new Date(setAt);
|
|
201
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
202
|
+
const midnight = (day) => new Date(day.getFullYear(), day.getMonth(), day.getDate()).getTime();
|
|
203
|
+
const days = Math.round((midnight(now) - midnight(date)) / (24 * 60 * 60 * 1e3));
|
|
204
|
+
if (days === 0) return "today";
|
|
205
|
+
if (days === 1) return "yesterday";
|
|
206
|
+
const sameYear = date.getFullYear() === now.getFullYear();
|
|
207
|
+
return `on ${date.toLocaleDateString("en-US", {
|
|
208
|
+
month: "short",
|
|
209
|
+
day: "numeric",
|
|
210
|
+
...sameYear ? {} : { year: "numeric" }
|
|
211
|
+
})}`;
|
|
212
|
+
}
|
|
213
|
+
function subscriptionWakeHeadline({
|
|
214
|
+
event,
|
|
215
|
+
now = /* @__PURE__ */ new Date()
|
|
216
|
+
}) {
|
|
217
|
+
if (event.kind === "schedule") {
|
|
218
|
+
const when = event.scheduleSetAt ? setOnWords({ setAt: event.scheduleSetAt, now }) : null;
|
|
219
|
+
return when ? `Scheduled check-in you set ${when}` : "Scheduled check-in";
|
|
220
|
+
}
|
|
221
|
+
return `${event.actor} ${joinClauses(eventClauses(event))}`;
|
|
222
|
+
}
|
|
223
|
+
function runsLeftWords(runsLeft) {
|
|
224
|
+
if (runsLeft <= 0) return "No runs left";
|
|
225
|
+
return `${runsLeft} ${runsLeft === 1 ? "run" : "runs"} left`;
|
|
226
|
+
}
|
|
227
|
+
function subscriptionWakeDetail(event) {
|
|
228
|
+
if (event.kind === "schedule") {
|
|
229
|
+
const parts2 = [
|
|
230
|
+
event.note,
|
|
231
|
+
event.runsLeft !== null && event.runsLeft > 0 ? runsLeftWords(event.runsLeft) : null
|
|
232
|
+
].filter((part) => part !== null);
|
|
233
|
+
return parts2.length > 0 ? parts2.join(" · ") : null;
|
|
234
|
+
}
|
|
235
|
+
const shown = event.subscribed.slice(0, MAX_SHOWN_PLACES);
|
|
236
|
+
const hidden = event.subscribed.length - shown.length;
|
|
237
|
+
const subscribed = shown.length > 0 ? `subscribed to ${shown.join(", ")}${hidden > 0 ? ` and ${hidden} more` : ""}` : null;
|
|
238
|
+
const parts = [
|
|
239
|
+
event.assetTitle,
|
|
240
|
+
subscribed,
|
|
241
|
+
event.runsLeft !== null ? runsLeftWords(event.runsLeft) : null,
|
|
242
|
+
event.eventCount !== null && event.eventCount > 1 ? `${event.eventCount} events` : null
|
|
243
|
+
].filter((part) => part !== null);
|
|
244
|
+
return parts.length > 0 ? parts.join(" · ") : null;
|
|
245
|
+
}
|
|
246
|
+
exports.SUBSCRIPTION_EVENT_KEY = SUBSCRIPTION_EVENT_KEY;
|
|
247
|
+
exports.isSubscriptionWakeMessage = isSubscriptionWakeMessage;
|
|
248
|
+
exports.readSubscriptionWakeEvent = readSubscriptionWakeEvent;
|
|
249
|
+
exports.subscriptionPlaceWords = subscriptionPlaceWords;
|
|
250
|
+
exports.subscriptionWakeDetail = subscriptionWakeDetail;
|
|
251
|
+
exports.subscriptionWakeHeadline = subscriptionWakeHeadline;
|
|
252
|
+
//# sourceMappingURL=subscription-wake-event.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-wake-event.cjs","sources":["../../../../agent-runtime/src/subscription-wake-event.ts"],"sourcesContent":["/**\n * The asset-subscription delivery that woke a conversation, read from the user\n * turn the delivery started.\n *\n * When an asset subscription fires, agora starts a turn on its conversation\n * with the delivery text the model reads (`render_delivery`), and stamps the\n * facts a person needs beside it under `athena_subscription_event` in the\n * message metadata — server-authoritative like `author`, never sent to the\n * model. The shipped converter exposes that metadata as the thread message's\n * `metadata.custom`, so a surface renders the turn as a compact marker\n * (\"Brendon Geils set B4 to Target\") instead of a user bubble quoting the\n * delivery text. Olympus draws the same facts as its event card with citation\n * chips; this is the text every other surface shows. The envelope is for\n * RENDERING only: a surface that ignores it degrades to a plain bubble, never\n * to a lost instruction.\n */\n\n/** `metadata.custom` key agora stamps on a subscription's delivery turn. */\nexport const SUBSCRIPTION_EVENT_KEY = 'athena_subscription_event';\n\n/** A changed cell or range, and its value now when agora read it. */\nexport interface SubscriptionWakeChange {\n /** Where: \"B4\", \"Sheet1!B2:B11\", \"page 5\"; `null` for a place the marker has no words for. */\n place: string | null;\n /** The value now; `null` when agora read none (a busy run's tray, a failed or capped read). */\n value: string | null;\n}\n\nexport interface SubscriptionWakeEvent {\n subscriptionId: string;\n /** `event`: something happened on an asset. `schedule`: a check-in the person set. */\n kind: 'event' | 'schedule';\n assetTitle: string | null;\n eventTypes: string[];\n eventCount: number | null;\n /** Who did it, in words: their name, \"You\", \"An agent\", \"Athena\", \"Someone\", with others counted. */\n actor: string;\n changes: SubscriptionWakeChange[];\n /** Changed places past the ones `changes` lists (agora caps the list): counted, never named. */\n moreChanges: number;\n /** The ranges the subscription names (\"B2:B11\"); empty for the whole asset. */\n subscribed: string[];\n /** Where a comment event's thread sits, when its anchor names a place. */\n commentPlace: string | null;\n /** Whether a comment-resolved event resolved (true) or reopened (false); `null` when unsaid. */\n commentResolved: boolean | null;\n /** When the person set a scheduled check-in. */\n scheduleSetAt: string | null;\n /** A scheduled check-in's own words. */\n note: string | null;\n runsLeft: number | null;\n deliveredAt: string | null;\n}\n\n/** Changed places and subscribed ranges named in one line; the rest are counted. */\nconst MAX_SHOWN_PLACES = 3;\n/** A changed value longer than this is cut in the marker. */\nconst MAX_VALUE_CHARS = 40;\n\nconst CONTENT_CHANGED = 'asset.content.changed';\nconst COMMENT_CREATED = 'asset.comment.created';\nconst COMMENT_REPLIED = 'asset.comment.replied';\nconst COMMENT_RESOLVED = 'asset.comment.resolved';\nconst PRESENCE_JOINED = 'asset.presence.joined';\nconst SLACK_PREFIX = 'user_slack.';\nconst COMMENT_EVENTS: ReadonlySet<string> = new Set([\n COMMENT_CREATED,\n COMMENT_REPLIED,\n COMMENT_RESOLVED,\n]);\n\nconst SLACK_WORDS: Readonly<Record<string, string>> = {\n 'user_slack.dm.received': 'sent you a Slack direct message',\n 'user_slack.mention.received': 'mentioned you in Slack',\n 'user_slack.thread_reply.received': 'replied in your Slack thread',\n 'user_slack.channel_message.posted': 'posted in a Slack channel',\n 'user_slack.reaction.added': 'reacted to a Slack message',\n 'user_slack.message.saved': 'saved a Slack message',\n 'user_slack.pin.added': 'pinned a Slack message',\n};\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** A string with something in it, else `null`. */\nfunction stringOf(value: unknown): string | null {\n return typeof value === 'string' && value.trim().length > 0 ? value : null;\n}\n\n/** A finite number, else `null`. */\nfunction numberOf(value: unknown): number | null {\n return typeof value === 'number' && Number.isFinite(value) ? value : null;\n}\n\n/** A sheet name as an A1 qualifier: quoted when it is not a bare word. */\nfunction sheetQualifier(sheet: string): string {\n return /^[A-Za-z_][A-Za-z0-9_.]*$/.test(sheet) ? sheet : `'${sheet.replaceAll(\"'\", \"''\")}'`;\n}\n\n/**\n * Where a reference-standard anchor in agora's wire form points, in words:\n * a range or cell (with its sheet when the anchor names one), a page, a\n * slide; `null` for any other place.\n */\nexport function subscriptionPlaceWords(anchor: unknown): string | null {\n if (!isRecord(anchor)) return null;\n const sheet = stringOf(anchor.sheet) ?? stringOf(anchor.sheet_name);\n const range = stringOf(anchor.range) ?? stringOf(anchor.cell);\n if (range) return sheet ? `${sheetQualifier(sheet)}!${range}` : range;\n const page = numberOf(anchor.page);\n if (page !== null) return `page ${page}`;\n const slide = numberOf(anchor.slide_index);\n if (slide !== null) return `slide ${slide}`;\n return null;\n}\n\nfunction actorWords(envelope: Record<string, unknown>): string {\n const actor = isRecord(envelope.actor) ? envelope.actor : {};\n const name = stringOf(actor.name);\n let who: string;\n switch (actor.kind) {\n case 'self':\n who = 'You';\n break;\n case 'agent':\n who = name ?? 'An agent';\n break;\n case 'system':\n who = name ?? 'Athena';\n break;\n default:\n who = name ?? 'Someone';\n }\n const more = numberOf(envelope.more_actors) ?? 0;\n if (more <= 0) return who;\n return `${who} and ${more} ${more === 1 ? 'other' : 'others'}`;\n}\n\nfunction readChanges(value: unknown): SubscriptionWakeChange[] {\n if (!Array.isArray(value)) return [];\n return value.flatMap((entry) => {\n if (!isRecord(entry)) return [];\n const raw = entry.value;\n const scalar =\n typeof raw === 'string' || typeof raw === 'number' || typeof raw === 'boolean'\n ? String(raw)\n : null;\n return [{ place: subscriptionPlaceWords(entry.anchor), value: scalar }];\n });\n}\n\n/**\n * The delivery behind a thread message's `metadata.custom`, or `undefined`\n * when the message is not a subscription's delivery (or carries no\n * subscription id). Every other field is read leniently: a field of the wrong\n * shape reads as absent.\n */\nexport function readSubscriptionWakeEvent(\n custom: Record<string, unknown> | null | undefined\n): SubscriptionWakeEvent | undefined {\n const envelope = custom?.[SUBSCRIPTION_EVENT_KEY];\n if (!isRecord(envelope)) return undefined;\n const subscriptionId = stringOf(envelope.subscription_id);\n if (subscriptionId === null) return undefined;\n const comment = isRecord(envelope.comment) ? envelope.comment : null;\n const schedule = isRecord(envelope.schedule) ? envelope.schedule : null;\n const eventTypes = Array.isArray(envelope.event_types)\n ? envelope.event_types.filter((type): type is string => typeof type === 'string')\n : [];\n const subscribed = Array.isArray(envelope.subscribed)\n ? envelope.subscribed.flatMap((anchor) => {\n const words = subscriptionPlaceWords(anchor);\n return words ? [words] : [];\n })\n : [];\n return {\n subscriptionId,\n kind: envelope.kind === 'schedule' ? 'schedule' : 'event',\n assetTitle: stringOf(envelope.asset_title),\n eventTypes,\n eventCount: numberOf(envelope.event_count),\n actor: actorWords(envelope),\n changes: readChanges(envelope.changes),\n moreChanges: Math.max(0, numberOf(envelope.more_changes) ?? 0),\n subscribed,\n commentPlace: comment ? subscriptionPlaceWords(comment.anchor) : null,\n commentResolved: typeof comment?.resolved === 'boolean' ? comment.resolved : null,\n scheduleSetAt: schedule ? stringOf(schedule.set_at) : null,\n note: stringOf(envelope.note),\n runsLeft: numberOf(envelope.runs_left),\n deliveredAt: stringOf(envelope.delivered_at),\n };\n}\n\n/**\n * Whether a thread message is a subscription's delivery. Returns a primitive,\n * so it is safe as a `useAuiState` selector.\n */\nexport function isSubscriptionWakeMessage(\n custom: Record<string, unknown> | null | undefined\n): boolean {\n return readSubscriptionWakeEvent(custom) !== undefined;\n}\n\n/**\n * A value as the marker shows it: whitespace folded, cut at\n * {@link MAX_VALUE_CHARS}. A value of only whitespace is not empty (an empty\n * one is \"cleared\"), so it reads as a quoted space rather than as nothing.\n */\nfunction valueWords(value: string): string {\n const folded = value.replace(/\\s+/g, ' ').trim();\n if (folded === '') return '“ ”';\n return folded.length > MAX_VALUE_CHARS\n ? `${folded.slice(0, MAX_VALUE_CHARS - 1).trimEnd()}…`\n : folded;\n}\n\n/** \"a, b and c\" — items joined the way a sentence lists them, `last` before the last. */\nfunction joinList({ items, last }: { items: string[]; last: string }): string {\n if (items.length <= 1) return items.join('');\n return `${items.slice(0, -1).join(', ')}${last}${items.at(-1)}`;\n}\n\n/** One clause of the marker's line: its leading words, then the places it lists. */\ninterface Clause {\n lead: string;\n items: string[];\n}\n\n/**\n * The clauses after who did it, as one predicate: \"set B4 to Target and\n * commented on B7\". The clauses are listed \"a, b and c\". A lone clause lists\n * its own items the same way (\"changed B4 and B7\"); with several, each lists\n * its items with commas only, so the clauses' \"and\" is the only one.\n */\nfunction joinClauses(clauses: Clause[]): string {\n const itemLast = clauses.length === 1 ? ' and ' : ', ';\n return joinList({\n items: clauses.map(({ lead, items }) => `${lead}${joinList({ items, last: itemLast })}`),\n last: ' and ',\n });\n}\n\n/**\n * The changed places as clauses: \"set B4 to Target\", \"cleared B9\", \"changed\n * B7\" (no value read). At most three places are named; the others — and the\n * ones agora counted past what it sent — are one more clause, \"2 more\".\n */\nfunction changeClauses({\n changes,\n moreChanges,\n}: {\n changes: SubscriptionWakeChange[];\n moreChanges: number;\n}): Clause[] {\n const located = changes.filter(\n (change): change is { place: string; value: string | null } => change.place !== null\n );\n const shown = located.slice(0, MAX_SHOWN_PLACES);\n if (shown.length === 0) return [];\n const hidden = located.length - shown.length + moreChanges;\n const set = shown.filter((change) => change.value !== null && change.value !== '');\n const cleared = shown.filter((change) => change.value === '');\n const changed = shown.filter((change) => change.value === null);\n const clauses: Clause[] = [];\n if (set.length > 0) {\n clauses.push({\n lead: 'set ',\n items: set.map((change) => `${change.place} to ${valueWords(change.value ?? '')}`),\n });\n }\n if (cleared.length > 0) {\n clauses.push({ lead: 'cleared ', items: cleared.map((change) => change.place) });\n }\n if (changed.length > 0) {\n clauses.push({ lead: 'changed ', items: changed.map((change) => change.place) });\n }\n if (hidden > 0) clauses.push({ lead: `${hidden} more`, items: [] });\n return clauses;\n}\n\nfunction commentLead({ type, resolved }: { type: string; resolved: boolean | null }): string {\n if (type === COMMENT_CREATED) return 'commented on ';\n if (type === COMMENT_REPLIED) return 'replied to a comment on ';\n const verb = resolved === true ? 'resolved' : resolved === false ? 'reopened' : 'updated';\n return `${verb} a comment on `;\n}\n\n/** An event type without words of its own, in words: `asset.version.created` → \"Version created\". */\nfunction eventLabel(type: string): string {\n const words = type\n .replace(/^asset\\./, '')\n .replace(/[.\\s_-]+/g, ' ')\n .trim()\n .toLowerCase();\n return words ? `${words.charAt(0).toUpperCase()}${words.slice(1)}` : '—';\n}\n\n/**\n * One clause per kind of event the delivery carries, in the order agora lists\n * them (first seen first), so a batch that both changed cells and brought a\n * comment says both. A content change is its changed places, or \"edited\n * <asset>\" when none were located; changes count as one even when the types\n * leave the content change out. The envelope's comment is the batch's first\n * comment event's, so only the first comment clause names its place.\n */\nfunction eventClauses(event: SubscriptionWakeEvent): Clause[] {\n const asset = event.assetTitle ?? 'the asset';\n const changes = changeClauses({ changes: event.changes, moreChanges: event.moreChanges });\n const listed = event.eventTypes;\n const types = [\n ...new Set(\n listed.length === 0 || (changes.length > 0 && !listed.includes(CONTENT_CHANGED))\n ? [CONTENT_CHANGED, ...listed]\n : listed\n ),\n ];\n const firstComment = types.find((type) => COMMENT_EVENTS.has(type));\n const clauses = types.flatMap((type): Clause[] => {\n if (type === CONTENT_CHANGED) {\n return changes.length > 0 ? changes : [{ lead: 'edited ', items: [asset] }];\n }\n if (COMMENT_EVENTS.has(type)) {\n const where = type === firstComment && event.commentPlace ? event.commentPlace : asset;\n return [{ lead: commentLead({ type, resolved: event.commentResolved }), items: [where] }];\n }\n if (type === PRESENCE_JOINED) return [{ lead: 'opened ', items: [asset] }];\n if (type.startsWith(SLACK_PREFIX)) {\n return [{ lead: SLACK_WORDS[type] ?? 'had Slack activity', items: [] }];\n }\n return [{ lead: `triggered “${eventLabel(type)}” on `, items: [asset] }];\n });\n // Two Slack events of kinds without words of their own say the same thing once.\n const said = new Set<string>();\n return clauses.filter((clause) => {\n if (clause.items.length > 0) return true;\n if (said.has(clause.lead)) return false;\n said.add(clause.lead);\n return true;\n });\n}\n\n/** The day a check-in was set, as a person says it: \"today\", \"yesterday\", \"on Oct 8\". */\nfunction setOnWords({ setAt, now }: { setAt: string; now: Date }): string | null {\n const date = new Date(setAt);\n if (Number.isNaN(date.getTime())) return null;\n const midnight = (day: Date) => new Date(day.getFullYear(), day.getMonth(), day.getDate()).getTime();\n const days = Math.round((midnight(now) - midnight(date)) / (24 * 60 * 60 * 1000));\n if (days === 0) return 'today';\n if (days === 1) return 'yesterday';\n const sameYear = date.getFullYear() === now.getFullYear();\n return `on ${date.toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n ...(sameYear ? {} : { year: 'numeric' as const }),\n })}`;\n}\n\n/**\n * The marker's line: who did what, where — \"Brendon Geils set B4 to Target\",\n * \"Brendon Geils changed B4\" when agora read no value, \"Ana Lopez commented\n * on B7\", \"Brendon Geils set B4 to Target and commented on B7\" for a batch\n * that carried both — or, for a schedule, \"Scheduled check-in you set on\n * Oct 8\" (`now` decides \"today\" and \"yesterday\").\n */\nexport function subscriptionWakeHeadline({\n event,\n now = new Date(),\n}: {\n event: SubscriptionWakeEvent;\n now?: Date;\n}): string {\n if (event.kind === 'schedule') {\n const when = event.scheduleSetAt ? setOnWords({ setAt: event.scheduleSetAt, now }) : null;\n return when ? `Scheduled check-in you set ${when}` : 'Scheduled check-in';\n }\n return `${event.actor} ${joinClauses(eventClauses(event))}`;\n}\n\n/** \"99 runs left\", \"1 run left\", \"No runs left\". */\nfunction runsLeftWords(runsLeft: number): string {\n if (runsLeft <= 0) return 'No runs left';\n return `${runsLeft} ${runsLeft === 1 ? 'run' : 'runs'} left`;\n}\n\n/**\n * The line under it: \"Series A Investors · subscribed to B2:B11 · 99 runs\n * left · 3 events\" for an asset event; a check-in's note for a schedule.\n * `null` when there is nothing to add.\n */\nexport function subscriptionWakeDetail(event: SubscriptionWakeEvent): string | null {\n if (event.kind === 'schedule') {\n const parts = [\n event.note,\n event.runsLeft !== null && event.runsLeft > 0 ? runsLeftWords(event.runsLeft) : null,\n ].filter((part): part is string => part !== null);\n return parts.length > 0 ? parts.join(' · ') : null;\n }\n const shown = event.subscribed.slice(0, MAX_SHOWN_PLACES);\n const hidden = event.subscribed.length - shown.length;\n const subscribed =\n shown.length > 0\n ? `subscribed to ${shown.join(', ')}${hidden > 0 ? ` and ${hidden} more` : ''}`\n : null;\n const parts = [\n event.assetTitle,\n subscribed,\n event.runsLeft !== null ? runsLeftWords(event.runsLeft) : null,\n event.eventCount !== null && event.eventCount > 1 ? `${event.eventCount} events` : null,\n ].filter((part): part is string => part !== null);\n return parts.length > 0 ? parts.join(' · ') : null;\n}\n"],"names":["parts"],"mappings":";;AAkBO,MAAM,yBAAyB;AAqCtC,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;AAExB,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AACxB,MAAM,eAAe;AACrB,MAAM,qCAA0C,IAAI;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,MAAM,cAAgD;AAAA,EACpD,0BAA0B;AAAA,EAC1B,+BAA+B;AAAA,EAC/B,oCAAoC;AAAA,EACpC,qCAAqC;AAAA,EACrC,6BAA6B;AAAA,EAC7B,4BAA4B;AAAA,EAC5B,wBAAwB;AAC1B;AAEA,SAAS,SAAS,OAAkD;AAClE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAGA,SAAS,SAAS,OAA+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AAQ,IAAI;AAAA,IAAA,EAChF,OAAO,CAAC,SAAyB,SAAS,IAAI;AAChD,WAAOA,OAAM,SAAS,IAAIA,OAAM,KAAK,KAAK,IAAI;AAAA,EAChD;AACA,QAAM,QAAQ,MAAM,WAAW,MAAM,GAAG,gBAAgB;AACxD,QAAM,SAAS,MAAM,WAAW,SAAS,MAAM;AAC/C,QAAM,aACJ,MAAM,SAAS,IACX,iBAAiB,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,IAAI,QAAQ,MAAM,UAAU,EAAE,KAC3E;AACN,QAAM,QAAQ;AAAA,IACZ,MAAM;AAAA,IACN;AAAA,IACA,MAAM,aAAa,OAAO,cAAc,MAAM,QAAQ,IAAI;AAAA,IAC1D,MAAM,eAAe,QAAQ,MAAM,aAAa,IAAI,GAAG,MAAM,UAAU,YAAY;AAAA,EAAA,EACnF,OAAO,CAAC,SAAyB,SAAS,IAAI;AAChD,SAAO,MAAM,SAAS,IAAI,MAAM,KAAK,KAAK,IAAI;AAChD;;;;;;;"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
const SUBSCRIPTION_EVENT_KEY = "athena_subscription_event";
|
|
2
|
+
const MAX_SHOWN_PLACES = 3;
|
|
3
|
+
const MAX_VALUE_CHARS = 40;
|
|
4
|
+
const CONTENT_CHANGED = "asset.content.changed";
|
|
5
|
+
const COMMENT_CREATED = "asset.comment.created";
|
|
6
|
+
const COMMENT_REPLIED = "asset.comment.replied";
|
|
7
|
+
const COMMENT_RESOLVED = "asset.comment.resolved";
|
|
8
|
+
const PRESENCE_JOINED = "asset.presence.joined";
|
|
9
|
+
const SLACK_PREFIX = "user_slack.";
|
|
10
|
+
const COMMENT_EVENTS = /* @__PURE__ */ new Set([
|
|
11
|
+
COMMENT_CREATED,
|
|
12
|
+
COMMENT_REPLIED,
|
|
13
|
+
COMMENT_RESOLVED
|
|
14
|
+
]);
|
|
15
|
+
const SLACK_WORDS = {
|
|
16
|
+
"user_slack.dm.received": "sent you a Slack direct message",
|
|
17
|
+
"user_slack.mention.received": "mentioned you in Slack",
|
|
18
|
+
"user_slack.thread_reply.received": "replied in your Slack thread",
|
|
19
|
+
"user_slack.channel_message.posted": "posted in a Slack channel",
|
|
20
|
+
"user_slack.reaction.added": "reacted to a Slack message",
|
|
21
|
+
"user_slack.message.saved": "saved a Slack message",
|
|
22
|
+
"user_slack.pin.added": "pinned a Slack message"
|
|
23
|
+
};
|
|
24
|
+
function isRecord(value) {
|
|
25
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26
|
+
}
|
|
27
|
+
function stringOf(value) {
|
|
28
|
+
return typeof value === "string" && value.trim().length > 0 ? value : null;
|
|
29
|
+
}
|
|
30
|
+
function numberOf(value) {
|
|
31
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
32
|
+
}
|
|
33
|
+
function sheetQualifier(sheet) {
|
|
34
|
+
return /^[A-Za-z_][A-Za-z0-9_.]*$/.test(sheet) ? sheet : `'${sheet.replaceAll("'", "''")}'`;
|
|
35
|
+
}
|
|
36
|
+
function subscriptionPlaceWords(anchor) {
|
|
37
|
+
if (!isRecord(anchor)) return null;
|
|
38
|
+
const sheet = stringOf(anchor.sheet) ?? stringOf(anchor.sheet_name);
|
|
39
|
+
const range = stringOf(anchor.range) ?? stringOf(anchor.cell);
|
|
40
|
+
if (range) return sheet ? `${sheetQualifier(sheet)}!${range}` : range;
|
|
41
|
+
const page = numberOf(anchor.page);
|
|
42
|
+
if (page !== null) return `page ${page}`;
|
|
43
|
+
const slide = numberOf(anchor.slide_index);
|
|
44
|
+
if (slide !== null) return `slide ${slide}`;
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
function actorWords(envelope) {
|
|
48
|
+
const actor = isRecord(envelope.actor) ? envelope.actor : {};
|
|
49
|
+
const name = stringOf(actor.name);
|
|
50
|
+
let who;
|
|
51
|
+
switch (actor.kind) {
|
|
52
|
+
case "self":
|
|
53
|
+
who = "You";
|
|
54
|
+
break;
|
|
55
|
+
case "agent":
|
|
56
|
+
who = name ?? "An agent";
|
|
57
|
+
break;
|
|
58
|
+
case "system":
|
|
59
|
+
who = name ?? "Athena";
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
who = name ?? "Someone";
|
|
63
|
+
}
|
|
64
|
+
const more = numberOf(envelope.more_actors) ?? 0;
|
|
65
|
+
if (more <= 0) return who;
|
|
66
|
+
return `${who} and ${more} ${more === 1 ? "other" : "others"}`;
|
|
67
|
+
}
|
|
68
|
+
function readChanges(value) {
|
|
69
|
+
if (!Array.isArray(value)) return [];
|
|
70
|
+
return value.flatMap((entry) => {
|
|
71
|
+
if (!isRecord(entry)) return [];
|
|
72
|
+
const raw = entry.value;
|
|
73
|
+
const scalar = typeof raw === "string" || typeof raw === "number" || typeof raw === "boolean" ? String(raw) : null;
|
|
74
|
+
return [{ place: subscriptionPlaceWords(entry.anchor), value: scalar }];
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function readSubscriptionWakeEvent(custom) {
|
|
78
|
+
const envelope = custom == null ? void 0 : custom[SUBSCRIPTION_EVENT_KEY];
|
|
79
|
+
if (!isRecord(envelope)) return void 0;
|
|
80
|
+
const subscriptionId = stringOf(envelope.subscription_id);
|
|
81
|
+
if (subscriptionId === null) return void 0;
|
|
82
|
+
const comment = isRecord(envelope.comment) ? envelope.comment : null;
|
|
83
|
+
const schedule = isRecord(envelope.schedule) ? envelope.schedule : null;
|
|
84
|
+
const eventTypes = Array.isArray(envelope.event_types) ? envelope.event_types.filter((type) => typeof type === "string") : [];
|
|
85
|
+
const subscribed = Array.isArray(envelope.subscribed) ? envelope.subscribed.flatMap((anchor) => {
|
|
86
|
+
const words = subscriptionPlaceWords(anchor);
|
|
87
|
+
return words ? [words] : [];
|
|
88
|
+
}) : [];
|
|
89
|
+
return {
|
|
90
|
+
subscriptionId,
|
|
91
|
+
kind: envelope.kind === "schedule" ? "schedule" : "event",
|
|
92
|
+
assetTitle: stringOf(envelope.asset_title),
|
|
93
|
+
eventTypes,
|
|
94
|
+
eventCount: numberOf(envelope.event_count),
|
|
95
|
+
actor: actorWords(envelope),
|
|
96
|
+
changes: readChanges(envelope.changes),
|
|
97
|
+
moreChanges: Math.max(0, numberOf(envelope.more_changes) ?? 0),
|
|
98
|
+
subscribed,
|
|
99
|
+
commentPlace: comment ? subscriptionPlaceWords(comment.anchor) : null,
|
|
100
|
+
commentResolved: typeof (comment == null ? void 0 : comment.resolved) === "boolean" ? comment.resolved : null,
|
|
101
|
+
scheduleSetAt: schedule ? stringOf(schedule.set_at) : null,
|
|
102
|
+
note: stringOf(envelope.note),
|
|
103
|
+
runsLeft: numberOf(envelope.runs_left),
|
|
104
|
+
deliveredAt: stringOf(envelope.delivered_at)
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function isSubscriptionWakeMessage(custom) {
|
|
108
|
+
return readSubscriptionWakeEvent(custom) !== void 0;
|
|
109
|
+
}
|
|
110
|
+
function valueWords(value) {
|
|
111
|
+
const folded = value.replace(/\s+/g, " ").trim();
|
|
112
|
+
if (folded === "") return "“ ”";
|
|
113
|
+
return folded.length > MAX_VALUE_CHARS ? `${folded.slice(0, MAX_VALUE_CHARS - 1).trimEnd()}…` : folded;
|
|
114
|
+
}
|
|
115
|
+
function joinList({ items, last }) {
|
|
116
|
+
if (items.length <= 1) return items.join("");
|
|
117
|
+
return `${items.slice(0, -1).join(", ")}${last}${items.at(-1)}`;
|
|
118
|
+
}
|
|
119
|
+
function joinClauses(clauses) {
|
|
120
|
+
const itemLast = clauses.length === 1 ? " and " : ", ";
|
|
121
|
+
return joinList({
|
|
122
|
+
items: clauses.map(({ lead, items }) => `${lead}${joinList({ items, last: itemLast })}`),
|
|
123
|
+
last: " and "
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function changeClauses({
|
|
127
|
+
changes,
|
|
128
|
+
moreChanges
|
|
129
|
+
}) {
|
|
130
|
+
const located = changes.filter(
|
|
131
|
+
(change) => change.place !== null
|
|
132
|
+
);
|
|
133
|
+
const shown = located.slice(0, MAX_SHOWN_PLACES);
|
|
134
|
+
if (shown.length === 0) return [];
|
|
135
|
+
const hidden = located.length - shown.length + moreChanges;
|
|
136
|
+
const set = shown.filter((change) => change.value !== null && change.value !== "");
|
|
137
|
+
const cleared = shown.filter((change) => change.value === "");
|
|
138
|
+
const changed = shown.filter((change) => change.value === null);
|
|
139
|
+
const clauses = [];
|
|
140
|
+
if (set.length > 0) {
|
|
141
|
+
clauses.push({
|
|
142
|
+
lead: "set ",
|
|
143
|
+
items: set.map((change) => `${change.place} to ${valueWords(change.value ?? "")}`)
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
if (cleared.length > 0) {
|
|
147
|
+
clauses.push({ lead: "cleared ", items: cleared.map((change) => change.place) });
|
|
148
|
+
}
|
|
149
|
+
if (changed.length > 0) {
|
|
150
|
+
clauses.push({ lead: "changed ", items: changed.map((change) => change.place) });
|
|
151
|
+
}
|
|
152
|
+
if (hidden > 0) clauses.push({ lead: `${hidden} more`, items: [] });
|
|
153
|
+
return clauses;
|
|
154
|
+
}
|
|
155
|
+
function commentLead({ type, resolved }) {
|
|
156
|
+
if (type === COMMENT_CREATED) return "commented on ";
|
|
157
|
+
if (type === COMMENT_REPLIED) return "replied to a comment on ";
|
|
158
|
+
const verb = resolved === true ? "resolved" : resolved === false ? "reopened" : "updated";
|
|
159
|
+
return `${verb} a comment on `;
|
|
160
|
+
}
|
|
161
|
+
function eventLabel(type) {
|
|
162
|
+
const words = type.replace(/^asset\./, "").replace(/[.\s_-]+/g, " ").trim().toLowerCase();
|
|
163
|
+
return words ? `${words.charAt(0).toUpperCase()}${words.slice(1)}` : "—";
|
|
164
|
+
}
|
|
165
|
+
function eventClauses(event) {
|
|
166
|
+
const asset = event.assetTitle ?? "the asset";
|
|
167
|
+
const changes = changeClauses({ changes: event.changes, moreChanges: event.moreChanges });
|
|
168
|
+
const listed = event.eventTypes;
|
|
169
|
+
const types = [
|
|
170
|
+
...new Set(
|
|
171
|
+
listed.length === 0 || changes.length > 0 && !listed.includes(CONTENT_CHANGED) ? [CONTENT_CHANGED, ...listed] : listed
|
|
172
|
+
)
|
|
173
|
+
];
|
|
174
|
+
const firstComment = types.find((type) => COMMENT_EVENTS.has(type));
|
|
175
|
+
const clauses = types.flatMap((type) => {
|
|
176
|
+
if (type === CONTENT_CHANGED) {
|
|
177
|
+
return changes.length > 0 ? changes : [{ lead: "edited ", items: [asset] }];
|
|
178
|
+
}
|
|
179
|
+
if (COMMENT_EVENTS.has(type)) {
|
|
180
|
+
const where = type === firstComment && event.commentPlace ? event.commentPlace : asset;
|
|
181
|
+
return [{ lead: commentLead({ type, resolved: event.commentResolved }), items: [where] }];
|
|
182
|
+
}
|
|
183
|
+
if (type === PRESENCE_JOINED) return [{ lead: "opened ", items: [asset] }];
|
|
184
|
+
if (type.startsWith(SLACK_PREFIX)) {
|
|
185
|
+
return [{ lead: SLACK_WORDS[type] ?? "had Slack activity", items: [] }];
|
|
186
|
+
}
|
|
187
|
+
return [{ lead: `triggered “${eventLabel(type)}” on `, items: [asset] }];
|
|
188
|
+
});
|
|
189
|
+
const said = /* @__PURE__ */ new Set();
|
|
190
|
+
return clauses.filter((clause) => {
|
|
191
|
+
if (clause.items.length > 0) return true;
|
|
192
|
+
if (said.has(clause.lead)) return false;
|
|
193
|
+
said.add(clause.lead);
|
|
194
|
+
return true;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function setOnWords({ setAt, now }) {
|
|
198
|
+
const date = new Date(setAt);
|
|
199
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
200
|
+
const midnight = (day) => new Date(day.getFullYear(), day.getMonth(), day.getDate()).getTime();
|
|
201
|
+
const days = Math.round((midnight(now) - midnight(date)) / (24 * 60 * 60 * 1e3));
|
|
202
|
+
if (days === 0) return "today";
|
|
203
|
+
if (days === 1) return "yesterday";
|
|
204
|
+
const sameYear = date.getFullYear() === now.getFullYear();
|
|
205
|
+
return `on ${date.toLocaleDateString("en-US", {
|
|
206
|
+
month: "short",
|
|
207
|
+
day: "numeric",
|
|
208
|
+
...sameYear ? {} : { year: "numeric" }
|
|
209
|
+
})}`;
|
|
210
|
+
}
|
|
211
|
+
function subscriptionWakeHeadline({
|
|
212
|
+
event,
|
|
213
|
+
now = /* @__PURE__ */ new Date()
|
|
214
|
+
}) {
|
|
215
|
+
if (event.kind === "schedule") {
|
|
216
|
+
const when = event.scheduleSetAt ? setOnWords({ setAt: event.scheduleSetAt, now }) : null;
|
|
217
|
+
return when ? `Scheduled check-in you set ${when}` : "Scheduled check-in";
|
|
218
|
+
}
|
|
219
|
+
return `${event.actor} ${joinClauses(eventClauses(event))}`;
|
|
220
|
+
}
|
|
221
|
+
function runsLeftWords(runsLeft) {
|
|
222
|
+
if (runsLeft <= 0) return "No runs left";
|
|
223
|
+
return `${runsLeft} ${runsLeft === 1 ? "run" : "runs"} left`;
|
|
224
|
+
}
|
|
225
|
+
function subscriptionWakeDetail(event) {
|
|
226
|
+
if (event.kind === "schedule") {
|
|
227
|
+
const parts2 = [
|
|
228
|
+
event.note,
|
|
229
|
+
event.runsLeft !== null && event.runsLeft > 0 ? runsLeftWords(event.runsLeft) : null
|
|
230
|
+
].filter((part) => part !== null);
|
|
231
|
+
return parts2.length > 0 ? parts2.join(" · ") : null;
|
|
232
|
+
}
|
|
233
|
+
const shown = event.subscribed.slice(0, MAX_SHOWN_PLACES);
|
|
234
|
+
const hidden = event.subscribed.length - shown.length;
|
|
235
|
+
const subscribed = shown.length > 0 ? `subscribed to ${shown.join(", ")}${hidden > 0 ? ` and ${hidden} more` : ""}` : null;
|
|
236
|
+
const parts = [
|
|
237
|
+
event.assetTitle,
|
|
238
|
+
subscribed,
|
|
239
|
+
event.runsLeft !== null ? runsLeftWords(event.runsLeft) : null,
|
|
240
|
+
event.eventCount !== null && event.eventCount > 1 ? `${event.eventCount} events` : null
|
|
241
|
+
].filter((part) => part !== null);
|
|
242
|
+
return parts.length > 0 ? parts.join(" · ") : null;
|
|
243
|
+
}
|
|
244
|
+
export {
|
|
245
|
+
SUBSCRIPTION_EVENT_KEY,
|
|
246
|
+
isSubscriptionWakeMessage,
|
|
247
|
+
readSubscriptionWakeEvent,
|
|
248
|
+
subscriptionPlaceWords,
|
|
249
|
+
subscriptionWakeDetail,
|
|
250
|
+
subscriptionWakeHeadline
|
|
251
|
+
};
|
|
252
|
+
//# sourceMappingURL=subscription-wake-event.js.map
|