@teaflask/assistant 0.0.0 → 0.6.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/LICENSE +105 -0
- package/README.md +164 -2
- package/dist/activity.d.ts +5 -0
- package/dist/activity.js +3 -0
- package/dist/affordances/highlight.d.ts +3 -0
- package/dist/affordances/highlight.js +67 -0
- package/dist/affordances/prefill.d.ts +14 -0
- package/dist/affordances/prefill.js +151 -0
- package/dist/appearance/theme.d.ts +31 -0
- package/dist/appearance/theme.js +46 -0
- package/dist/components/activity-rail.d.ts +12 -0
- package/dist/components/activity-rail.js +60 -0
- package/dist/components/activity-shelf.d.ts +7 -0
- package/dist/components/activity-shelf.js +7 -0
- package/dist/components/agent-identity-mark.d.ts +7 -0
- package/dist/components/agent-identity-mark.js +29 -0
- package/dist/components/appearance-context.d.ts +14 -0
- package/dist/components/appearance-context.js +10 -0
- package/dist/components/approval-card.d.ts +7 -0
- package/dist/components/approval-card.js +117 -0
- package/dist/components/approval-context.d.ts +8 -0
- package/dist/components/approval-context.js +17 -0
- package/dist/components/assistant-companion.d.ts +5 -0
- package/dist/components/assistant-companion.js +147 -0
- package/dist/components/assistant-page.d.ts +23 -0
- package/dist/components/assistant-page.js +107 -0
- package/dist/components/assistant-palette-body.d.ts +3 -0
- package/dist/components/assistant-palette-body.js +25 -0
- package/dist/components/assistant-palette.d.ts +5 -0
- package/dist/components/assistant-palette.js +20 -0
- package/dist/components/assistant-transcript.d.ts +47 -0
- package/dist/components/assistant-transcript.js +116 -0
- package/dist/components/attachment-chips.d.ts +4 -0
- package/dist/components/attachment-chips.js +63 -0
- package/dist/components/child-transcript.d.ts +22 -0
- package/dist/components/child-transcript.js +120 -0
- package/dist/components/companion-drawer-body.d.ts +1 -0
- package/dist/components/companion-drawer-body.js +33 -0
- package/dist/components/companion-drawer.d.ts +10 -0
- package/dist/components/companion-drawer.js +88 -0
- package/dist/components/companion-header-disclosure.d.ts +20 -0
- package/dist/components/companion-header-disclosure.js +63 -0
- package/dist/components/companion-history-menu.d.ts +15 -0
- package/dist/components/companion-history-menu.js +25 -0
- package/dist/components/companion-mark-image.d.ts +3 -0
- package/dist/components/companion-mark-image.js +18 -0
- package/dist/components/companion-mark.d.ts +1 -0
- package/dist/components/companion-mark.js +8 -0
- package/dist/components/companion-mode-menu.d.ts +15 -0
- package/dist/components/companion-mode-menu.js +19 -0
- package/dist/components/composer-attachment-chip.d.ts +7 -0
- package/dist/components/composer-attachment-chip.js +32 -0
- package/dist/components/composer-banner.d.ts +4 -0
- package/dist/components/composer-banner.js +17 -0
- package/dist/components/composer.d.ts +4 -0
- package/dist/components/composer.js +250 -0
- package/dist/components/conversation-context.d.ts +4 -0
- package/dist/components/conversation-context.js +10 -0
- package/dist/components/conversation-gate-card.d.ts +8 -0
- package/dist/components/conversation-gate-card.js +87 -0
- package/dist/components/conversation-surfaces-provider.d.ts +6 -0
- package/dist/components/conversation-surfaces-provider.js +23 -0
- package/dist/components/conversation-view.d.ts +21 -0
- package/dist/components/conversation-view.js +74 -0
- package/dist/components/copy-text-button.d.ts +5 -0
- package/dist/components/copy-text-button.js +33 -0
- package/dist/components/elicitation-context.d.ts +14 -0
- package/dist/components/elicitation-context.js +24 -0
- package/dist/components/elicitation-receipt-row.d.ts +4 -0
- package/dist/components/elicitation-receipt-row.js +16 -0
- package/dist/components/human-file-size.d.ts +1 -0
- package/dist/components/human-file-size.js +9 -0
- package/dist/components/icons.d.ts +15 -0
- package/dist/components/icons.js +46 -0
- package/dist/components/lazy-body.d.ts +4 -0
- package/dist/components/lazy-body.js +30 -0
- package/dist/components/markdown/assistant-markdown.d.ts +3 -0
- package/dist/components/markdown/assistant-markdown.js +12 -0
- package/dist/components/markdown/code-block.d.ts +4 -0
- package/dist/components/markdown/code-block.js +8 -0
- package/dist/components/markdown/highlight.d.ts +1 -0
- package/dist/components/markdown/highlight.js +15 -0
- package/dist/components/markdown/markdown-structure.d.ts +16 -0
- package/dist/components/markdown/markdown-structure.js +67 -0
- package/dist/components/markdown/memoized-blocks.d.ts +6 -0
- package/dist/components/markdown/memoized-blocks.js +20 -0
- package/dist/components/markdown/paced-assistant-markdown.d.ts +4 -0
- package/dist/components/markdown/paced-assistant-markdown.js +10 -0
- package/dist/components/markdown/reveal-pacer.d.ts +20 -0
- package/dist/components/markdown/reveal-pacer.js +85 -0
- package/dist/components/markdown/shiki-highlighter.d.ts +1 -0
- package/dist/components/markdown/shiki-highlighter.js +39 -0
- package/dist/components/markdown/streaming-repair.d.ts +1 -0
- package/dist/components/markdown/streaming-repair.js +59 -0
- package/dist/components/markdown/use-highlighted-html.d.ts +1 -0
- package/dist/components/markdown/use-highlighted-html.js +28 -0
- package/dist/components/markdown/use-paced-reveal.d.ts +5 -0
- package/dist/components/markdown/use-paced-reveal.js +90 -0
- package/dist/components/memory-updated-footer.d.ts +4 -0
- package/dist/components/memory-updated-footer.js +66 -0
- package/dist/components/message-list-row.d.ts +13 -0
- package/dist/components/message-list-row.js +46 -0
- package/dist/components/message-list-slots.d.ts +25 -0
- package/dist/components/message-list-slots.js +1 -0
- package/dist/components/message-list.d.ts +23 -0
- package/dist/components/message-list.js +62 -0
- package/dist/components/model-picker-chip.d.ts +1 -0
- package/dist/components/model-picker-chip.js +168 -0
- package/dist/components/model-picker-effort.d.ts +4 -0
- package/dist/components/model-picker-effort.js +48 -0
- package/dist/components/model-picker-panels.d.ts +22 -0
- package/dist/components/model-picker-panels.js +45 -0
- package/dist/components/notice-banner.d.ts +8 -0
- package/dist/components/notice-banner.js +9 -0
- package/dist/components/operation-icons.d.ts +19 -0
- package/dist/components/operation-icons.js +40 -0
- package/dist/components/pretty-print.d.ts +1 -0
- package/dist/components/pretty-print.js +9 -0
- package/dist/components/primitives/autofocus.d.ts +1 -0
- package/dist/components/primitives/autofocus.js +12 -0
- package/dist/components/primitives/button.d.ts +10 -0
- package/dist/components/primitives/button.js +66 -0
- package/dist/components/primitives/cx.d.ts +1 -0
- package/dist/components/primitives/cx.js +3 -0
- package/dist/components/primitives/dialog.d.ts +7 -0
- package/dist/components/primitives/dialog.js +40 -0
- package/dist/components/primitives/disclosure.d.ts +22 -0
- package/dist/components/primitives/disclosure.js +32 -0
- package/dist/components/primitives/file-input.d.ts +5 -0
- package/dist/components/primitives/file-input.js +9 -0
- package/dist/components/primitives/floating-panel.d.ts +15 -0
- package/dist/components/primitives/floating-panel.js +113 -0
- package/dist/components/primitives/kbd.d.ts +2 -0
- package/dist/components/primitives/kbd.js +6 -0
- package/dist/components/primitives/sheet.d.ts +11 -0
- package/dist/components/primitives/sheet.js +18 -0
- package/dist/components/primitives/textarea.d.ts +7 -0
- package/dist/components/primitives/textarea.js +13 -0
- package/dist/components/primitives/use-dock-reflow.d.ts +2 -0
- package/dist/components/primitives/use-dock-reflow.js +30 -0
- package/dist/components/primitives/use-swipe-dismiss.d.ts +17 -0
- package/dist/components/primitives/use-swipe-dismiss.js +152 -0
- package/dist/components/provider-chip.d.ts +8 -0
- package/dist/components/provider-chip.js +135 -0
- package/dist/components/question-panel-answers.d.ts +29 -0
- package/dist/components/question-panel-answers.js +42 -0
- package/dist/components/question-panel-footer.d.ts +9 -0
- package/dist/components/question-panel-footer.js +51 -0
- package/dist/components/question-panel.d.ts +4 -0
- package/dist/components/question-panel.js +98 -0
- package/dist/components/react-tool-view.d.ts +4 -0
- package/dist/components/react-tool-view.js +82 -0
- package/dist/components/reasoning-row.d.ts +4 -0
- package/dist/components/reasoning-row.js +11 -0
- package/dist/components/receipt-rows.d.ts +3 -0
- package/dist/components/receipt-rows.js +6 -0
- package/dist/components/run-status-announcer.d.ts +5 -0
- package/dist/components/run-status-announcer.js +11 -0
- package/dist/components/scroll-follow-guards.d.ts +1 -0
- package/dist/components/scroll-follow-guards.js +156 -0
- package/dist/components/served-suggestions.d.ts +3 -0
- package/dist/components/served-suggestions.js +29 -0
- package/dist/components/slot-boundary.d.ts +11 -0
- package/dist/components/slot-boundary.js +33 -0
- package/dist/components/standing-poll.d.ts +1 -0
- package/dist/components/standing-poll.js +25 -0
- package/dist/components/streaming-states.d.ts +12 -0
- package/dist/components/streaming-states.js +15 -0
- package/dist/components/subagent-count-pill.d.ts +8 -0
- package/dist/components/subagent-count-pill.js +112 -0
- package/dist/components/subagent-current-work.d.ts +6 -0
- package/dist/components/subagent-current-work.js +12 -0
- package/dist/components/subagent-delegation-surface.d.ts +9 -0
- package/dist/components/subagent-delegation-surface.js +143 -0
- package/dist/components/subagent-delivery-divider.d.ts +5 -0
- package/dist/components/subagent-delivery-divider.js +22 -0
- package/dist/components/subagent-drill-in.d.ts +8 -0
- package/dist/components/subagent-drill-in.js +6 -0
- package/dist/components/subagent-execution-work.d.ts +3 -0
- package/dist/components/subagent-execution-work.js +7 -0
- package/dist/components/subagent-group-row.d.ts +26 -0
- package/dist/components/subagent-group-row.js +145 -0
- package/dist/components/subagent-preview-popover.d.ts +8 -0
- package/dist/components/subagent-preview-popover.js +78 -0
- package/dist/components/subscription-connect-arms.d.ts +25 -0
- package/dist/components/subscription-connect-arms.js +43 -0
- package/dist/components/subscription-connect-flow.d.ts +60 -0
- package/dist/components/subscription-connect-flow.js +319 -0
- package/dist/components/subscription-connected-standing.d.ts +16 -0
- package/dist/components/subscription-connected-standing.js +71 -0
- package/dist/components/subscription-plan-notice.d.ts +1 -0
- package/dist/components/subscription-plan-notice.js +29 -0
- package/dist/components/subscription-recheck.d.ts +10 -0
- package/dist/components/subscription-recheck.js +73 -0
- package/dist/components/surface-boundary.d.ts +8 -0
- package/dist/components/surface-boundary.js +56 -0
- package/dist/components/suspension-surfaces.d.ts +3 -0
- package/dist/components/suspension-surfaces.js +141 -0
- package/dist/components/teaflask-assistant-provider.d.ts +69 -0
- package/dist/components/teaflask-assistant-provider.js +203 -0
- package/dist/components/teaflask-assistant.d.ts +11 -0
- package/dist/components/teaflask-assistant.js +52 -0
- package/dist/components/thread-list.d.ts +16 -0
- package/dist/components/thread-list.js +57 -0
- package/dist/components/tool-arguments-summary.d.ts +2 -0
- package/dist/components/tool-arguments-summary.js +89 -0
- package/dist/components/tool-call-rows.d.ts +10 -0
- package/dist/components/tool-call-rows.js +103 -0
- package/dist/components/tool-row.d.ts +7 -0
- package/dist/components/tool-row.js +34 -0
- package/dist/components/tool-view-registry-context.d.ts +3 -0
- package/dist/components/tool-view-registry-context.js +6 -0
- package/dist/components/tool-view-slot.d.ts +11 -0
- package/dist/components/tool-view-slot.js +171 -0
- package/dist/components/tool-views/action-view.d.ts +1 -0
- package/dist/components/tool-views/action-view.js +111 -0
- package/dist/components/tool-views/command-view.d.ts +1 -0
- package/dist/components/tool-views/command-view.js +46 -0
- package/dist/components/tool-views/docs-search-view.d.ts +10 -0
- package/dist/components/tool-views/docs-search-view.js +109 -0
- package/dist/components/tool-views/file-edit-view.d.ts +1 -0
- package/dist/components/tool-views/file-edit-view.js +148 -0
- package/dist/components/tool-views/parts-classes.d.ts +28 -0
- package/dist/components/tool-views/parts-classes.js +28 -0
- package/dist/components/tool-views/parts.d.ts +41 -0
- package/dist/components/tool-views/parts.js +34 -0
- package/dist/components/tool-views/questions-view.d.ts +1 -0
- package/dist/components/tool-views/questions-view.js +41 -0
- package/dist/components/tool-views/view-dom.d.ts +51 -0
- package/dist/components/tool-views/view-dom.js +360 -0
- package/dist/components/transcript.d.ts +3 -0
- package/dist/components/transcript.js +59 -0
- package/dist/components/use-agent-subscriber.d.ts +3 -0
- package/dist/components/use-agent-subscriber.js +13 -0
- package/dist/components/use-answer-list-fold.d.ts +6 -0
- package/dist/components/use-answer-list-fold.js +31 -0
- package/dist/components/use-assistant-activity.d.ts +2 -0
- package/dist/components/use-assistant-activity.js +7 -0
- package/dist/components/use-assistant-conversation.d.ts +23 -0
- package/dist/components/use-assistant-conversation.js +26 -0
- package/dist/components/use-assistant-surface-presence.d.ts +2 -0
- package/dist/components/use-assistant-surface-presence.js +6 -0
- package/dist/components/use-child-replay-stream.d.ts +20 -0
- package/dist/components/use-child-replay-stream.js +186 -0
- package/dist/components/use-latest-ref.d.ts +2 -0
- package/dist/components/use-latest-ref.js +9 -0
- package/dist/components/use-member-toggle-outrank.d.ts +6 -0
- package/dist/components/use-member-toggle-outrank.js +32 -0
- package/dist/components/use-perch-clearance.d.ts +2 -0
- package/dist/components/use-perch-clearance.js +123 -0
- package/dist/components/use-question-panel-keys.d.ts +32 -0
- package/dist/components/use-question-panel-keys.js +179 -0
- package/dist/components/use-register-assistant-surface.d.ts +2 -0
- package/dist/components/use-register-assistant-surface.js +11 -0
- package/dist/components/use-resolved-theme-mode.d.ts +3 -0
- package/dist/components/use-resolved-theme-mode.js +67 -0
- package/dist/components/use-roster-disclosure.d.ts +20 -0
- package/dist/components/use-roster-disclosure.js +114 -0
- package/dist/components/use-roster-preview.d.ts +24 -0
- package/dist/components/use-roster-preview.js +82 -0
- package/dist/components/use-store-cell.d.ts +2 -0
- package/dist/components/use-store-cell.js +5 -0
- package/dist/components/use-thread-dispatches.d.ts +8 -0
- package/dist/components/use-thread-dispatches.js +400 -0
- package/dist/components/use-transcript-folds.d.ts +26 -0
- package/dist/components/use-transcript-folds.js +97 -0
- package/dist/components/use-transcript.d.ts +19 -0
- package/dist/components/use-transcript.js +40 -0
- package/dist/components/user-message.d.ts +6 -0
- package/dist/components/user-message.js +9 -0
- package/dist/contract/actions-adapter.d.ts +26 -0
- package/dist/contract/actions-adapter.js +1 -0
- package/dist/contract/assistant-config.d.ts +1 -0
- package/dist/contract/assistant-config.js +1 -0
- package/dist/contract/dispatches.d.ts +15 -0
- package/dist/contract/dispatches.js +24 -0
- package/dist/contract/errors.d.ts +11 -0
- package/dist/contract/errors.js +1 -0
- package/dist/contract/events.d.ts +20 -0
- package/dist/contract/events.js +13 -0
- package/dist/contract/identity.d.ts +1 -0
- package/dist/contract/identity.js +1 -0
- package/dist/contract/subscriptions.d.ts +16 -0
- package/dist/contract/subscriptions.js +35 -0
- package/dist/contract/telemetry.d.ts +30 -0
- package/dist/contract/telemetry.js +19 -0
- package/dist/contract/threads.d.ts +3 -0
- package/dist/contract/threads.js +2 -0
- package/dist/core/activity-title.d.ts +1 -0
- package/dist/core/activity-title.js +8 -0
- package/dist/core/activity.d.ts +27 -0
- package/dist/core/activity.js +53 -0
- package/dist/core/agent-identity.d.ts +2 -0
- package/dist/core/agent-identity.js +4 -0
- package/dist/core/approval-decision.d.ts +6 -0
- package/dist/core/approval-decision.js +162 -0
- package/dist/core/approval-inbox.d.ts +101 -0
- package/dist/core/approval-inbox.js +399 -0
- package/dist/core/approval-request-narrowing.d.ts +15 -0
- package/dist/core/approval-request-narrowing.js +59 -0
- package/dist/core/approval-resolved.d.ts +7 -0
- package/dist/core/approval-resolved.js +16 -0
- package/dist/core/assistant-prose.d.ts +2 -0
- package/dist/core/assistant-prose.js +11 -0
- package/dist/core/assistant-session-registry.d.ts +51 -0
- package/dist/core/assistant-session-registry.js +313 -0
- package/dist/core/attachment-uploads.d.ts +5 -0
- package/dist/core/attachment-uploads.js +22 -0
- package/dist/core/block-timing-anchors.d.ts +5 -0
- package/dist/core/block-timing-anchors.js +93 -0
- package/dist/core/companion-drawer-flag.d.ts +4 -0
- package/dist/core/companion-drawer-flag.js +9 -0
- package/dist/core/companion-presence.d.ts +7 -0
- package/dist/core/companion-presence.js +9 -0
- package/dist/core/composer-input-state.d.ts +8 -0
- package/dist/core/composer-input-state.js +40 -0
- package/dist/core/composer-policy.d.ts +38 -0
- package/dist/core/composer-policy.js +56 -0
- package/dist/core/connect-gate.d.ts +21 -0
- package/dist/core/connect-gate.js +85 -0
- package/dist/core/connection-driver.d.ts +3 -0
- package/dist/core/connection-driver.js +106 -0
- package/dist/core/connection-epoch.d.ts +65 -0
- package/dist/core/connection-epoch.js +232 -0
- package/dist/core/consumed-interrupts.d.ts +12 -0
- package/dist/core/consumed-interrupts.js +64 -0
- package/dist/core/conversation-adoption.d.ts +13 -0
- package/dist/core/conversation-adoption.js +325 -0
- package/dist/core/conversation-contract.d.ts +87 -0
- package/dist/core/conversation-contract.js +1 -0
- package/dist/core/conversation-publish.d.ts +8 -0
- package/dist/core/conversation-publish.js +117 -0
- package/dist/core/conversation-refresh.d.ts +4 -0
- package/dist/core/conversation-refresh.js +76 -0
- package/dist/core/conversation-send.d.ts +6 -0
- package/dist/core/conversation-send.js +127 -0
- package/dist/core/conversation-store.d.ts +125 -0
- package/dist/core/conversation-store.js +241 -0
- package/dist/core/coworker-execution-work.d.ts +10 -0
- package/dist/core/coworker-execution-work.js +53 -0
- package/dist/core/disposable-subscriber.d.ts +6 -0
- package/dist/core/disposable-subscriber.js +18 -0
- package/dist/core/dock-reflow.d.ts +5 -0
- package/dist/core/dock-reflow.js +68 -0
- package/dist/core/elicitation-answers.d.ts +7 -0
- package/dist/core/elicitation-answers.js +71 -0
- package/dist/core/elicitation-cards.d.ts +29 -0
- package/dist/core/elicitation-cards.js +69 -0
- package/dist/core/elicitation-pickers.d.ts +13 -0
- package/dist/core/elicitation-pickers.js +71 -0
- package/dist/core/epoch-sync.d.ts +12 -0
- package/dist/core/epoch-sync.js +238 -0
- package/dist/core/error-copy.d.ts +3 -0
- package/dist/core/error-copy.js +45 -0
- package/dist/core/execution-driver.d.ts +37 -0
- package/dist/core/execution-driver.js +223 -0
- package/dist/core/execution-handlers.d.ts +9 -0
- package/dist/core/execution-handlers.js +369 -0
- package/dist/core/execution-inbox.d.ts +72 -0
- package/dist/core/execution-inbox.js +243 -0
- package/dist/core/execution-kinds.d.ts +34 -0
- package/dist/core/execution-kinds.js +18 -0
- package/dist/core/execution-request-narrowing.d.ts +15 -0
- package/dist/core/execution-request-narrowing.js +64 -0
- package/dist/core/host-fill.d.ts +1 -0
- package/dist/core/host-fill.js +3 -0
- package/dist/core/hotkey.d.ts +18 -0
- package/dist/core/hotkey.js +72 -0
- package/dist/core/identity-pair.d.ts +14 -0
- package/dist/core/identity-pair.js +18 -0
- package/dist/core/idle-recheck.d.ts +3 -0
- package/dist/core/idle-recheck.js +27 -0
- package/dist/core/memory-provenance-anchors.d.ts +19 -0
- package/dist/core/memory-provenance-anchors.js +154 -0
- package/dist/core/messages-cell.d.ts +11 -0
- package/dist/core/messages-cell.js +49 -0
- package/dist/core/observable-cell.d.ts +12 -0
- package/dist/core/observable-cell.js +25 -0
- package/dist/core/pending-decision-gap.d.ts +36 -0
- package/dist/core/pending-decision-gap.js +101 -0
- package/dist/core/perch-clearance.d.ts +19 -0
- package/dist/core/perch-clearance.js +53 -0
- package/dist/core/question-drafts.d.ts +40 -0
- package/dist/core/question-drafts.js +135 -0
- package/dist/core/question-receipt.d.ts +11 -0
- package/dist/core/question-receipt.js +55 -0
- package/dist/core/reasoning-copy.d.ts +2 -0
- package/dist/core/reasoning-copy.js +2 -0
- package/dist/core/receipt-anchors.d.ts +9 -0
- package/dist/core/receipt-anchors.js +88 -0
- package/dist/core/run-folds.d.ts +43 -0
- package/dist/core/run-folds.js +211 -0
- package/dist/core/run-status.d.ts +4 -0
- package/dist/core/run-status.js +12 -0
- package/dist/core/segment-timing.d.ts +13 -0
- package/dist/core/segment-timing.js +47 -0
- package/dist/core/settle-refresh.d.ts +9 -0
- package/dist/core/settle-refresh.js +24 -0
- package/dist/core/step-caption.d.ts +2 -0
- package/dist/core/step-caption.js +7 -0
- package/dist/core/stop-copy.d.ts +1 -0
- package/dist/core/stop-copy.js +1 -0
- package/dist/core/stop-settle.d.ts +5 -0
- package/dist/core/stop-settle.js +15 -0
- package/dist/core/stream-trouble.d.ts +5 -0
- package/dist/core/stream-trouble.js +83 -0
- package/dist/core/subagent-brief.d.ts +3 -0
- package/dist/core/subagent-brief.js +38 -0
- package/dist/core/subagent-delivery-anchors.d.ts +11 -0
- package/dist/core/subagent-delivery-anchors.js +90 -0
- package/dist/core/subagent-presence.d.ts +10 -0
- package/dist/core/subagent-presence.js +64 -0
- package/dist/core/subagent-roster.d.ts +35 -0
- package/dist/core/subagent-roster.js +80 -0
- package/dist/core/subagent-rows.d.ts +50 -0
- package/dist/core/subagent-rows.js +187 -0
- package/dist/core/surface-registry.d.ts +16 -0
- package/dist/core/surface-registry.js +56 -0
- package/dist/core/suspension-queue.d.ts +14 -0
- package/dist/core/suspension-queue.js +46 -0
- package/dist/core/tail-slot-pool.d.ts +13 -0
- package/dist/core/tail-slot-pool.js +52 -0
- package/dist/core/time-labels.d.ts +7 -0
- package/dist/core/time-labels.js +47 -0
- package/dist/core/tool-call-display-anchors.d.ts +11 -0
- package/dist/core/tool-call-display-anchors.js +186 -0
- package/dist/core/tool-call-display.d.ts +28 -0
- package/dist/core/tool-call-display.js +69 -0
- package/dist/core/tool-call-presentation.d.ts +15 -0
- package/dist/core/tool-call-presentation.js +139 -0
- package/dist/core/tool-cancel-anchors.d.ts +5 -0
- package/dist/core/tool-cancel-anchors.js +7 -0
- package/dist/core/tool-decision-anchors.d.ts +6 -0
- package/dist/core/tool-decision-anchors.js +56 -0
- package/dist/core/tool-denial-anchors.d.ts +19 -0
- package/dist/core/tool-denial-anchors.js +68 -0
- package/dist/core/tool-error-anchors.d.ts +5 -0
- package/dist/core/tool-error-anchors.js +7 -0
- package/dist/core/tool-flag-anchors.d.ts +9 -0
- package/dist/core/tool-flag-anchors.js +37 -0
- package/dist/core/tool-offload-anchors.d.ts +5 -0
- package/dist/core/tool-offload-anchors.js +7 -0
- package/dist/core/tool-outcome.d.ts +9 -0
- package/dist/core/tool-outcome.js +72 -0
- package/dist/core/tool-refusal-anchors.d.ts +5 -0
- package/dist/core/tool-refusal-anchors.js +7 -0
- package/dist/core/tool-result-envelope.d.ts +3 -0
- package/dist/core/tool-result-envelope.js +28 -0
- package/dist/core/tool-schema-anchors.d.ts +18 -0
- package/dist/core/tool-schema-anchors.js +101 -0
- package/dist/core/tool-sentence-anchors.d.ts +11 -0
- package/dist/core/tool-sentence-anchors.js +46 -0
- package/dist/core/tool-view.d.ts +66 -0
- package/dist/core/tool-view.js +70 -0
- package/dist/core/transcript-lease.d.ts +2 -0
- package/dist/core/transcript-lease.js +20 -0
- package/dist/core/transcript-rows.d.ts +83 -0
- package/dist/core/transcript-rows.js +305 -0
- package/dist/core/turn-failed-anchors.d.ts +8 -0
- package/dist/core/turn-failed-anchors.js +9 -0
- package/dist/core/turn-failure-copy.d.ts +4 -0
- package/dist/core/turn-failure-copy.js +19 -0
- package/dist/core/turn-usage-anchors.d.ts +16 -0
- package/dist/core/turn-usage-anchors.js +100 -0
- package/dist/core/turns-backfill.d.ts +14 -0
- package/dist/core/turns-backfill.js +27 -0
- package/dist/core/user-turn-ledger.d.ts +45 -0
- package/dist/core/user-turn-ledger.js +106 -0
- package/dist/core/wire-sentence-cap.d.ts +1 -0
- package/dist/core/wire-sentence-cap.js +1 -0
- package/dist/generated/models/activityMessage.d.ts +11 -0
- package/dist/generated/models/activityMessage.js +1 -0
- package/dist/generated/models/activityMessageContent.d.ts +3 -0
- package/dist/generated/models/activityMessageContent.js +1 -0
- package/dist/generated/models/activityMessageMetadata.d.ts +3 -0
- package/dist/generated/models/activityMessageMetadata.js +1 -0
- package/dist/generated/models/agentDispatchStatus.d.ts +7 -0
- package/dist/generated/models/agentDispatchStatus.js +6 -0
- package/dist/generated/models/apiErrorBody.d.ts +6 -0
- package/dist/generated/models/apiErrorBody.js +1 -0
- package/dist/generated/models/apiErrorCode.d.ts +146 -0
- package/dist/generated/models/apiErrorCode.js +145 -0
- package/dist/generated/models/approvalRequestedMarker.d.ts +15 -0
- package/dist/generated/models/approvalRequestedMarker.js +1 -0
- package/dist/generated/models/approvalRequestedMarkerToolArgs.d.ts +3 -0
- package/dist/generated/models/approvalRequestedMarkerToolArgs.js +1 -0
- package/dist/generated/models/approvalRequestedMarkerToolInputSchema.d.ts +3 -0
- package/dist/generated/models/approvalRequestedMarkerToolInputSchema.js +1 -0
- package/dist/generated/models/approvalRequestedMarkerToolOutputSchema.d.ts +3 -0
- package/dist/generated/models/approvalRequestedMarkerToolOutputSchema.js +1 -0
- package/dist/generated/models/approvalResolvedMarker.d.ts +6 -0
- package/dist/generated/models/approvalResolvedMarker.js +1 -0
- package/dist/generated/models/askQuestionsAction.d.ts +4 -0
- package/dist/generated/models/askQuestionsAction.js +1 -0
- package/dist/generated/models/askQuestionsResult.d.ts +5 -0
- package/dist/generated/models/askQuestionsResult.js +1 -0
- package/dist/generated/models/assistantConfigResponse.d.ts +10 -0
- package/dist/generated/models/assistantConfigResponse.js +1 -0
- package/dist/generated/models/assistantMessage.d.ts +13 -0
- package/dist/generated/models/assistantMessage.js +1 -0
- package/dist/generated/models/assistantMessageMetadata.d.ts +3 -0
- package/dist/generated/models/assistantMessageMetadata.js +1 -0
- package/dist/generated/models/assistantStreamMarkerName.d.ts +19 -0
- package/dist/generated/models/assistantStreamMarkerName.js +18 -0
- package/dist/generated/models/assistantTurnKind.d.ts +4 -0
- package/dist/generated/models/assistantTurnKind.js +3 -0
- package/dist/generated/models/assistantTurnStatus.d.ts +11 -0
- package/dist/generated/models/assistantTurnStatus.js +10 -0
- package/dist/generated/models/attachmentKind.d.ts +8 -0
- package/dist/generated/models/attachmentKind.js +7 -0
- package/dist/generated/models/attachmentPolicyResponse.d.ts +6 -0
- package/dist/generated/models/attachmentPolicyResponse.js +1 -0
- package/dist/generated/models/audioInputContent.d.ts +10 -0
- package/dist/generated/models/audioInputContent.js +1 -0
- package/dist/generated/models/audioPart.d.ts +10 -0
- package/dist/generated/models/audioPart.js +1 -0
- package/dist/generated/models/beginSubscriptionAuthorizationResponse.d.ts +4 -0
- package/dist/generated/models/beginSubscriptionAuthorizationResponse.js +1 -0
- package/dist/generated/models/binaryInputContent.d.ts +9 -0
- package/dist/generated/models/binaryInputContent.js +1 -0
- package/dist/generated/models/completeSubscriptionAuthorizationRequest.d.ts +5 -0
- package/dist/generated/models/completeSubscriptionAuthorizationRequest.js +1 -0
- package/dist/generated/models/completeSubscriptionAuthorizationResponse.d.ts +4 -0
- package/dist/generated/models/completeSubscriptionAuthorizationResponse.js +1 -0
- package/dist/generated/models/connectProjectionResponse.d.ts +9 -0
- package/dist/generated/models/connectProjectionResponse.js +1 -0
- package/dist/generated/models/connectProjectionResponseGate.d.ts +8 -0
- package/dist/generated/models/connectProjectionResponseGate.js +7 -0
- package/dist/generated/models/connectProjectionResponseReason.d.ts +5 -0
- package/dist/generated/models/connectProjectionResponseReason.js +4 -0
- package/dist/generated/models/context.d.ts +5 -0
- package/dist/generated/models/context.js +1 -0
- package/dist/generated/models/createServingAttachmentUploadRequest.d.ts +4 -0
- package/dist/generated/models/createServingAttachmentUploadRequest.js +1 -0
- package/dist/generated/models/createServingAttachmentUploadResponse.d.ts +6 -0
- package/dist/generated/models/createServingAttachmentUploadResponse.js +1 -0
- package/dist/generated/models/currentVisitorResponse.d.ts +11 -0
- package/dist/generated/models/currentVisitorResponse.js +1 -0
- package/dist/generated/models/dataSource.d.ts +6 -0
- package/dist/generated/models/dataSource.js +1 -0
- package/dist/generated/models/deliveredSubagentResult.d.ts +5 -0
- package/dist/generated/models/deliveredSubagentResult.js +1 -0
- package/dist/generated/models/developerMessage.d.ts +11 -0
- package/dist/generated/models/developerMessage.js +1 -0
- package/dist/generated/models/developerMessageMetadata.d.ts +3 -0
- package/dist/generated/models/developerMessageMetadata.js +1 -0
- package/dist/generated/models/docHeading.d.ts +6 -0
- package/dist/generated/models/docHeading.js +1 -0
- package/dist/generated/models/docHeadingLevel.d.ts +9 -0
- package/dist/generated/models/docHeadingLevel.js +8 -0
- package/dist/generated/models/documentInputContent.d.ts +10 -0
- package/dist/generated/models/documentInputContent.js +1 -0
- package/dist/generated/models/documentPart.d.ts +10 -0
- package/dist/generated/models/documentPart.js +1 -0
- package/dist/generated/models/endUserIdentity.d.ts +4 -0
- package/dist/generated/models/endUserIdentity.js +1 -0
- package/dist/generated/models/errorEnvelope.d.ts +4 -0
- package/dist/generated/models/errorEnvelope.js +1 -0
- package/dist/generated/models/evidenceAfterVoidRecordedMarker.d.ts +9 -0
- package/dist/generated/models/evidenceAfterVoidRecordedMarker.js +1 -0
- package/dist/generated/models/evidenceAfterVoidRecordedMarkerError.d.ts +3 -0
- package/dist/generated/models/evidenceAfterVoidRecordedMarkerError.js +1 -0
- package/dist/generated/models/evidenceAfterVoidRecordedMarkerResult.d.ts +3 -0
- package/dist/generated/models/evidenceAfterVoidRecordedMarkerResult.js +1 -0
- package/dist/generated/models/fileSource.d.ts +7 -0
- package/dist/generated/models/fileSource.js +1 -0
- package/dist/generated/models/functionCall.d.ts +5 -0
- package/dist/generated/models/functionCall.js +1 -0
- package/dist/generated/models/getServingAssistantThreadParams.d.ts +5 -0
- package/dist/generated/models/getServingAssistantThreadParams.js +1 -0
- package/dist/generated/models/helpHostResolution.d.ts +3 -0
- package/dist/generated/models/helpHostResolution.js +1 -0
- package/dist/generated/models/helpPageResponse.d.ts +6 -0
- package/dist/generated/models/helpPageResponse.js +1 -0
- package/dist/generated/models/helpSearchHit.d.ts +7 -0
- package/dist/generated/models/helpSearchHit.js +1 -0
- package/dist/generated/models/helpSearchMode.d.ts +5 -0
- package/dist/generated/models/helpSearchMode.js +4 -0
- package/dist/generated/models/helpSearchResponse.d.ts +7 -0
- package/dist/generated/models/helpSearchResponse.js +1 -0
- package/dist/generated/models/helpSiteGroup.d.ts +7 -0
- package/dist/generated/models/helpSiteGroup.js +1 -0
- package/dist/generated/models/helpSitePage.d.ts +7 -0
- package/dist/generated/models/helpSitePage.js +1 -0
- package/dist/generated/models/helpSiteResponse.d.ts +9 -0
- package/dist/generated/models/helpSiteResponse.js +1 -0
- package/dist/generated/models/helpSiteTab.d.ts +7 -0
- package/dist/generated/models/helpSiteTab.js +1 -0
- package/dist/generated/models/highlightResult.d.ts +4 -0
- package/dist/generated/models/highlightResult.js +1 -0
- package/dist/generated/models/httpIntentResult.d.ts +7 -0
- package/dist/generated/models/httpIntentResult.js +1 -0
- package/dist/generated/models/httpIntentResultHeaders.d.ts +3 -0
- package/dist/generated/models/httpIntentResultHeaders.js +1 -0
- package/dist/generated/models/imageInputContent.d.ts +10 -0
- package/dist/generated/models/imageInputContent.js +1 -0
- package/dist/generated/models/imagePart.d.ts +10 -0
- package/dist/generated/models/imagePart.js +1 -0
- package/dist/generated/models/index.d.ts +163 -0
- package/dist/generated/models/index.js +163 -0
- package/dist/generated/models/inputContentDataSource.d.ts +6 -0
- package/dist/generated/models/inputContentDataSource.js +1 -0
- package/dist/generated/models/inputContentUrlSource.d.ts +6 -0
- package/dist/generated/models/inputContentUrlSource.js +1 -0
- package/dist/generated/models/interruptAnswerConsumedMarker.d.ts +6 -0
- package/dist/generated/models/interruptAnswerConsumedMarker.js +1 -0
- package/dist/generated/models/interruptAnswerConsumedMarkerFamily.d.ts +5 -0
- package/dist/generated/models/interruptAnswerConsumedMarkerFamily.js +4 -0
- package/dist/generated/models/listServingAssistantThreadsParams.d.ts +5 -0
- package/dist/generated/models/listServingAssistantThreadsParams.js +1 -0
- package/dist/generated/models/memoryUpdatedMarker.d.ts +5 -0
- package/dist/generated/models/memoryUpdatedMarker.js +1 -0
- package/dist/generated/models/mintVisitorTokenRequest.d.ts +5 -0
- package/dist/generated/models/mintVisitorTokenRequest.js +1 -0
- package/dist/generated/models/mintVisitorTokenResponse.d.ts +7 -0
- package/dist/generated/models/mintVisitorTokenResponse.js +1 -0
- package/dist/generated/models/modelChoiceOption.d.ts +7 -0
- package/dist/generated/models/modelChoiceOption.js +1 -0
- package/dist/generated/models/modelChoiceResponse.d.ts +9 -0
- package/dist/generated/models/modelChoiceResponse.js +1 -0
- package/dist/generated/models/modelPickRequest.d.ts +5 -0
- package/dist/generated/models/modelPickRequest.js +1 -0
- package/dist/generated/models/navigateResult.d.ts +4 -0
- package/dist/generated/models/navigateResult.js +1 -0
- package/dist/generated/models/prefillFormResult.d.ts +5 -0
- package/dist/generated/models/prefillFormResult.js +1 -0
- package/dist/generated/models/publishableKeyMode.d.ts +5 -0
- package/dist/generated/models/publishableKeyMode.js +4 -0
- package/dist/generated/models/question.d.ts +7 -0
- package/dist/generated/models/question.js +1 -0
- package/dist/generated/models/questionAnswer.d.ts +4 -0
- package/dist/generated/models/questionAnswer.js +1 -0
- package/dist/generated/models/questionOption.d.ts +4 -0
- package/dist/generated/models/questionOption.js +1 -0
- package/dist/generated/models/readPageResult.d.ts +7 -0
- package/dist/generated/models/readPageResult.js +1 -0
- package/dist/generated/models/reasoningMessage.d.ts +10 -0
- package/dist/generated/models/reasoningMessage.js +1 -0
- package/dist/generated/models/reasoningMessageMetadata.d.ts +3 -0
- package/dist/generated/models/reasoningMessageMetadata.js +1 -0
- package/dist/generated/models/refusedField.d.ts +4 -0
- package/dist/generated/models/refusedField.js +1 -0
- package/dist/generated/models/resolveServingTurnApprovalRequest.d.ts +4 -0
- package/dist/generated/models/resolveServingTurnApprovalRequest.js +1 -0
- package/dist/generated/models/resolveServingTurnApprovalResponse.d.ts +6 -0
- package/dist/generated/models/resolveServingTurnApprovalResponse.js +1 -0
- package/dist/generated/models/resolveServingTurnToolResultsRequest.d.ts +4 -0
- package/dist/generated/models/resolveServingTurnToolResultsRequest.js +1 -0
- package/dist/generated/models/resolveServingTurnToolResultsResponse.d.ts +7 -0
- package/dist/generated/models/resolveServingTurnToolResultsResponse.js +1 -0
- package/dist/generated/models/resolvedLanding.d.ts +6 -0
- package/dist/generated/models/resolvedLanding.js +1 -0
- package/dist/generated/models/resolvedLandingCard.d.ts +6 -0
- package/dist/generated/models/resolvedLandingCard.js +1 -0
- package/dist/generated/models/resumeEntry.d.ts +9 -0
- package/dist/generated/models/resumeEntry.js +1 -0
- package/dist/generated/models/resumeEntryMetadata.d.ts +3 -0
- package/dist/generated/models/resumeEntryMetadata.js +1 -0
- package/dist/generated/models/resumeEntryStatus.d.ts +5 -0
- package/dist/generated/models/resumeEntryStatus.js +4 -0
- package/dist/generated/models/routeSuggestions.d.ts +5 -0
- package/dist/generated/models/routeSuggestions.js +1 -0
- package/dist/generated/models/runAgentInput.d.ts +23 -0
- package/dist/generated/models/runAgentInput.js +1 -0
- package/dist/generated/models/runResumedMarker.d.ts +4 -0
- package/dist/generated/models/runResumedMarker.js +1 -0
- package/dist/generated/models/sendServingAssistantMessageRequest.d.ts +7 -0
- package/dist/generated/models/sendServingAssistantMessageRequest.js +1 -0
- package/dist/generated/models/sendServingAssistantMessageResponse.d.ts +6 -0
- package/dist/generated/models/sendServingAssistantMessageResponse.js +1 -0
- package/dist/generated/models/servingAgentDispatchResponse.d.ts +11 -0
- package/dist/generated/models/servingAgentDispatchResponse.js +1 -0
- package/dist/generated/models/servingApprovalDelivery.d.ts +6 -0
- package/dist/generated/models/servingApprovalDelivery.js +5 -0
- package/dist/generated/models/servingAssistantThreadDetailResponse.d.ts +6 -0
- package/dist/generated/models/servingAssistantThreadDetailResponse.js +1 -0
- package/dist/generated/models/servingAssistantThreadResponse.d.ts +10 -0
- package/dist/generated/models/servingAssistantThreadResponse.js +1 -0
- package/dist/generated/models/servingAssistantTurnResponse.d.ts +26 -0
- package/dist/generated/models/servingAssistantTurnResponse.js +1 -0
- package/dist/generated/models/servingAssistantTurnResponsePendingApprovalDisplays.d.ts +4 -0
- package/dist/generated/models/servingAssistantTurnResponsePendingApprovalDisplays.js +1 -0
- package/dist/generated/models/servingAttachmentDownloadUrlResponse.d.ts +4 -0
- package/dist/generated/models/servingAttachmentDownloadUrlResponse.js +1 -0
- package/dist/generated/models/servingAttachmentResponse.d.ts +9 -0
- package/dist/generated/models/servingAttachmentResponse.js +1 -0
- package/dist/generated/models/servingCoworkerApprovalRequest.d.ts +10 -0
- package/dist/generated/models/servingCoworkerApprovalRequest.js +1 -0
- package/dist/generated/models/servingCoworkerExecutionRequest.d.ts +10 -0
- package/dist/generated/models/servingCoworkerExecutionRequest.js +1 -0
- package/dist/generated/models/servingErrorCode.d.ts +33 -0
- package/dist/generated/models/servingErrorCode.js +32 -0
- package/dist/generated/models/servingStopDelivery.d.ts +6 -0
- package/dist/generated/models/servingStopDelivery.js +5 -0
- package/dist/generated/models/servingSubscriptionStatus.d.ts +11 -0
- package/dist/generated/models/servingSubscriptionStatus.js +1 -0
- package/dist/generated/models/servingSubscriptionStatusBounceCause.d.ts +6 -0
- package/dist/generated/models/servingSubscriptionStatusBounceCause.js +5 -0
- package/dist/generated/models/servingSubscriptionsResponse.d.ts +4 -0
- package/dist/generated/models/servingSubscriptionsResponse.js +1 -0
- package/dist/generated/models/servingToolResultDelivery.d.ts +7 -0
- package/dist/generated/models/servingToolResultDelivery.js +6 -0
- package/dist/generated/models/servingToolResultReport.d.ts +9 -0
- package/dist/generated/models/servingToolResultReport.js +1 -0
- package/dist/generated/models/servingToolResultReportError.d.ts +3 -0
- package/dist/generated/models/servingToolResultReportError.js +1 -0
- package/dist/generated/models/servingToolResultReportResult.d.ts +3 -0
- package/dist/generated/models/servingToolResultReportResult.js +1 -0
- package/dist/generated/models/servingTurnApprovalDecision.d.ts +6 -0
- package/dist/generated/models/servingTurnApprovalDecision.js +1 -0
- package/dist/generated/models/servingTurnAttachmentResponse.d.ts +8 -0
- package/dist/generated/models/servingTurnAttachmentResponse.js +1 -0
- package/dist/generated/models/siteTheme.d.ts +8 -0
- package/dist/generated/models/siteTheme.js +1 -0
- package/dist/generated/models/siteThemeDefaultAppearance.d.ts +6 -0
- package/dist/generated/models/siteThemeDefaultAppearance.js +5 -0
- package/dist/generated/models/steeringFiredAction.d.ts +5 -0
- package/dist/generated/models/steeringFiredAction.js +4 -0
- package/dist/generated/models/steeringFiredMarker.d.ts +7 -0
- package/dist/generated/models/steeringFiredMarker.js +1 -0
- package/dist/generated/models/stopServingTurnResponse.d.ts +6 -0
- package/dist/generated/models/stopServingTurnResponse.js +1 -0
- package/dist/generated/models/subagentResultsDeliveredMarker.d.ts +4 -0
- package/dist/generated/models/subagentResultsDeliveredMarker.js +1 -0
- package/dist/generated/models/subscriptionCredentialState.d.ts +6 -0
- package/dist/generated/models/subscriptionCredentialState.js +5 -0
- package/dist/generated/models/subscriptionProvider.d.ts +4 -0
- package/dist/generated/models/subscriptionProvider.js +3 -0
- package/dist/generated/models/suggestionItem.d.ts +5 -0
- package/dist/generated/models/suggestionItem.js +1 -0
- package/dist/generated/models/suggestionKind.d.ts +7 -0
- package/dist/generated/models/suggestionKind.js +6 -0
- package/dist/generated/models/suggestionsConfig.d.ts +6 -0
- package/dist/generated/models/suggestionsConfig.js +1 -0
- package/dist/generated/models/systemMessage.d.ts +11 -0
- package/dist/generated/models/systemMessage.js +1 -0
- package/dist/generated/models/systemMessageMetadata.d.ts +3 -0
- package/dist/generated/models/systemMessageMetadata.js +1 -0
- package/dist/generated/models/textInputContent.d.ts +7 -0
- package/dist/generated/models/textInputContent.js +1 -0
- package/dist/generated/models/textPart.d.ts +7 -0
- package/dist/generated/models/textPart.js +1 -0
- package/dist/generated/models/thinkingEffort.d.ts +8 -0
- package/dist/generated/models/thinkingEffort.js +7 -0
- package/dist/generated/models/threadModelPickResponse.d.ts +5 -0
- package/dist/generated/models/threadModelPickResponse.js +1 -0
- package/dist/generated/models/tool.d.ts +8 -0
- package/dist/generated/models/tool.js +1 -0
- package/dist/generated/models/toolCall.d.ts +10 -0
- package/dist/generated/models/toolCall.js +1 -0
- package/dist/generated/models/toolCallAnnotatedMarker.d.ts +9 -0
- package/dist/generated/models/toolCallAnnotatedMarker.js +1 -0
- package/dist/generated/models/toolCallAnnotatedMarkerToolInputSchema.d.ts +3 -0
- package/dist/generated/models/toolCallAnnotatedMarkerToolInputSchema.js +1 -0
- package/dist/generated/models/toolCallAnnotatedMarkerToolOutputSchema.d.ts +3 -0
- package/dist/generated/models/toolCallAnnotatedMarkerToolOutputSchema.js +1 -0
- package/dist/generated/models/toolCallDisplayPayload.d.ts +9 -0
- package/dist/generated/models/toolCallDisplayPayload.js +1 -0
- package/dist/generated/models/toolCallMetadata.d.ts +3 -0
- package/dist/generated/models/toolCallMetadata.js +1 -0
- package/dist/generated/models/toolExecutionRequestPayload.d.ts +8 -0
- package/dist/generated/models/toolExecutionRequestPayload.js +1 -0
- package/dist/generated/models/toolExecutionRequestPayloadAction.d.ts +3 -0
- package/dist/generated/models/toolExecutionRequestPayloadAction.js +1 -0
- package/dist/generated/models/toolExecutionRequestPayloadIntent.d.ts +3 -0
- package/dist/generated/models/toolExecutionRequestPayloadIntent.js +1 -0
- package/dist/generated/models/toolExecutionRequestedMarker.d.ts +8 -0
- package/dist/generated/models/toolExecutionRequestedMarker.js +1 -0
- package/dist/generated/models/toolMessage.d.ts +17 -0
- package/dist/generated/models/toolMessage.js +1 -0
- package/dist/generated/models/toolMessageMetadata.d.ts +3 -0
- package/dist/generated/models/toolMessageMetadata.js +1 -0
- package/dist/generated/models/toolMetadata.d.ts +3 -0
- package/dist/generated/models/toolMetadata.js +1 -0
- package/dist/generated/models/toolResultRecordedMarker.d.ts +5 -0
- package/dist/generated/models/toolResultRecordedMarker.js +1 -0
- package/dist/generated/models/toolViewRef.d.ts +4 -0
- package/dist/generated/models/toolViewRef.js +1 -0
- package/dist/generated/models/turnFailedMarker.d.ts +3 -0
- package/dist/generated/models/turnFailedMarker.js +1 -0
- package/dist/generated/models/turnStoppedMarker.d.ts +3 -0
- package/dist/generated/models/turnStoppedMarker.js +1 -0
- package/dist/generated/models/turnUsageRecordedMarker.d.ts +9 -0
- package/dist/generated/models/turnUsageRecordedMarker.js +1 -0
- package/dist/generated/models/turnVoidedMarker.d.ts +3 -0
- package/dist/generated/models/turnVoidedMarker.js +1 -0
- package/dist/generated/models/urlSource.d.ts +6 -0
- package/dist/generated/models/urlSource.js +1 -0
- package/dist/generated/models/userMessage.d.ts +17 -0
- package/dist/generated/models/userMessage.js +1 -0
- package/dist/generated/models/userMessageMetadata.d.ts +3 -0
- package/dist/generated/models/userMessageMetadata.js +1 -0
- package/dist/generated/models/videoInputContent.d.ts +10 -0
- package/dist/generated/models/videoInputContent.js +1 -0
- package/dist/generated/models/videoPart.d.ts +10 -0
- package/dist/generated/models/videoPart.js +1 -0
- package/dist/generated/models/visitorTier.d.ts +5 -0
- package/dist/generated/models/visitorTier.js +4 -0
- package/dist/generated/serving.d.ts +38 -0
- package/dist/generated/serving.js +265 -0
- package/dist/headless.d.ts +40 -0
- package/dist/headless.js +10 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +18 -0
- package/dist/markdown.d.ts +4 -0
- package/dist/markdown.js +4 -0
- package/dist/persistence/execution-ledger.d.ts +7 -0
- package/dist/persistence/execution-ledger.js +85 -0
- package/dist/persistence/panel-mode.d.ts +6 -0
- package/dist/persistence/panel-mode.js +49 -0
- package/dist/persistence/plan-notice.d.ts +3 -0
- package/dist/persistence/plan-notice.js +30 -0
- package/dist/persistence/stored-thread.d.ts +12 -0
- package/dist/persistence/stored-thread.js +67 -0
- package/dist/reader/accessible-name.d.ts +3 -0
- package/dist/reader/accessible-name.js +248 -0
- package/dist/reader/interactivity.d.ts +11 -0
- package/dist/reader/interactivity.js +117 -0
- package/dist/reader/layout-probe.d.ts +29 -0
- package/dist/reader/layout-probe.js +113 -0
- package/dist/reader/line-diff.d.ts +1 -0
- package/dist/reader/line-diff.js +147 -0
- package/dist/reader/read-page.d.ts +12 -0
- package/dist/reader/read-page.js +130 -0
- package/dist/reader/redaction.d.ts +3 -0
- package/dist/reader/redaction.js +49 -0
- package/dist/reader/render.d.ts +3 -0
- package/dist/reader/render.js +117 -0
- package/dist/reader/roles.d.ts +8 -0
- package/dist/reader/roles.js +245 -0
- package/dist/reader/snapshot-compaction.d.ts +5 -0
- package/dist/reader/snapshot-compaction.js +166 -0
- package/dist/reader/snapshot-node.d.ts +4 -0
- package/dist/reader/snapshot-node.js +113 -0
- package/dist/reader/snapshot-root.d.ts +15 -0
- package/dist/reader/snapshot-root.js +85 -0
- package/dist/reader/snapshot.d.ts +60 -0
- package/dist/reader/snapshot.js +167 -0
- package/dist/reader/visibility.d.ts +8 -0
- package/dist/reader/visibility.js +105 -0
- package/dist/scroll.d.ts +1 -0
- package/dist/scroll.js +1 -0
- package/dist/styles.css +2 -0
- package/dist/transcript-ui.d.ts +15 -0
- package/dist/transcript-ui.js +8 -0
- package/dist/transcript.d.ts +43 -0
- package/dist/transcript.js +38 -0
- package/dist/transport/actions-adapter.d.ts +4 -0
- package/dist/transport/actions-adapter.js +139 -0
- package/dist/transport/door-budget.d.ts +4 -0
- package/dist/transport/door-budget.js +51 -0
- package/dist/transport/replay-stream-agent.d.ts +24 -0
- package/dist/transport/replay-stream-agent.js +100 -0
- package/dist/transport/serving-api.d.ts +33 -0
- package/dist/transport/serving-api.js +67 -0
- package/dist/transport/serving-error.d.ts +15 -0
- package/dist/transport/serving-error.js +54 -0
- package/dist/transport/serving-fetch.d.ts +11 -0
- package/dist/transport/serving-fetch.js +20 -0
- package/dist/transport/stream-resume.d.ts +70 -0
- package/dist/transport/stream-resume.js +276 -0
- package/dist/transport/token-session.d.ts +33 -0
- package/dist/transport/token-session.js +203 -0
- package/package.json +88 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-ALv2
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Teaflask
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,165 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/teaflask/assistant/main/images/logo-dark.svg">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/logo.svg" width="56" alt="Teaflask logo">
|
|
5
|
+
</picture>
|
|
6
|
+
<h1>Teaflask Assistant</h1>
|
|
7
|
+
<p>An AI agent that works inside your product, in one component.</p>
|
|
8
|
+
<p>
|
|
9
|
+
<a href="https://docs.teaflask.com/getting-started">Get started</a> ·
|
|
10
|
+
<a href="https://docs.teaflask.com">Docs</a> ·
|
|
11
|
+
<a href="https://app.teaflask.com/">Dashboard</a> ·
|
|
12
|
+
<a href="https://github.com/teaflask/assistant/issues">Issues</a>
|
|
13
|
+
</p>
|
|
14
|
+
<p>
|
|
15
|
+
<a href="https://www.npmjs.com/package/@teaflask/assistant"><img src="https://img.shields.io/npm/v/@teaflask/assistant?color=111" alt="npm version"></a>
|
|
16
|
+
<a href="https://github.com/teaflask/assistant/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@teaflask/assistant?color=111" alt="License: FSL-1.1-ALv2"></a>
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
2
19
|
|
|
3
|
-
|
|
20
|
+
<table>
|
|
21
|
+
<tr>
|
|
22
|
+
<td width="50%" valign="top">
|
|
23
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/surface-widget.png" alt="Corner widget">
|
|
24
|
+
<p align="center"><sub>Corner widget</sub></p>
|
|
25
|
+
</td>
|
|
26
|
+
<td width="50%" valign="top">
|
|
27
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/surface-sidebar.png" alt="Sidebar">
|
|
28
|
+
<p align="center"><sub>Sidebar</sub></p>
|
|
29
|
+
</td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td width="50%" valign="top">
|
|
33
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/surface-palette.png" alt="⌘K palette">
|
|
34
|
+
<p align="center"><sub>⌘K palette</sub></p>
|
|
35
|
+
</td>
|
|
36
|
+
<td width="50%" valign="top">
|
|
37
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/surface-page.png" alt="Full page">
|
|
38
|
+
<p align="center"><sub>Full page</sub></p>
|
|
39
|
+
</td>
|
|
40
|
+
</tr>
|
|
41
|
+
</table>
|
|
42
|
+
|
|
43
|
+
[Teaflask](https://teaflask.com) gives your product an AI agent that understands how it works and gets things done for your users. `@teaflask/assistant` is the part your users see: drop it into your app and Teaflask hosts everything behind it. Your app keeps its own business logic, authentication and permissions.
|
|
44
|
+
|
|
45
|
+
**React**
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import "@teaflask/assistant/styles.css";
|
|
49
|
+
import { TeaflaskAssistant } from "@teaflask/assistant";
|
|
50
|
+
|
|
51
|
+
<TeaflaskAssistant publishableKey="pk_live_…" />;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Any other stack**, with a script tag
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<script
|
|
58
|
+
type="module"
|
|
59
|
+
src="https://app.teaflask.com/assistant/v1/assistant.js"
|
|
60
|
+
></script>
|
|
61
|
+
<teaflask-assistant publishable-key="pk_live_…"></teaflask-assistant>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## What your agent can do
|
|
65
|
+
|
|
66
|
+
- **Take actions.** It calls your API on the user's behalf, with the user's own session. You set every action to Allow, Ask or Deny.
|
|
67
|
+
- **Follow your workflows.** Write a procedure once, like how refunds work or when to escalate, and the agent follows it.
|
|
68
|
+
- **Guide users around your app.** It takes people to the right page and highlights what to click.
|
|
69
|
+
- **Fill in forms.** It fills the fields; the user reviews and submits.
|
|
70
|
+
- **Hand off long-running work.** It sends complex, multi-step jobs to background sub-agents and picks up their results.
|
|
71
|
+
- **Answer from your docs.** It answers from the documentation you release, so what it tells users matches your product.
|
|
72
|
+
- **Remember.** It keeps facts across conversations, for your whole organization or for each user.
|
|
73
|
+
|
|
74
|
+
You choose which of these each agent gets. [How Teaflask works →](https://docs.teaflask.com/fundamentals)
|
|
75
|
+
|
|
76
|
+
## Batteries included
|
|
77
|
+
|
|
78
|
+
Everything you'd otherwise build by hand to put an agent in front of your users:
|
|
79
|
+
|
|
80
|
+
- Real-time streaming that resumes mid-sentence after a dropped connection
|
|
81
|
+
- Durable runs that pick up mid-step after a crash, a deploy, or an approval that takes days
|
|
82
|
+
- Approvals right in the conversation, before an action runs
|
|
83
|
+
- Live progress for actions and sub-agents
|
|
84
|
+
- [Tool views](https://docs.teaflask.com/tool-views): show a result as your own component, like an order card instead of JSON
|
|
85
|
+
- Four [surfaces](https://docs.teaflask.com/surfaces) for one conversation: a corner widget, a sidebar, a ⌘K command palette, and a full-page assistant
|
|
86
|
+
- A polished default design in light and dark, restyled with [theme tokens](https://docs.teaflask.com/appearance) and isolated from your CSS
|
|
87
|
+
- Docs that stay true: every claim checked against your code, and a fix proposed when the code moves
|
|
88
|
+
- [Skills](https://docs.teaflask.com/skills), [memory](https://docs.teaflask.com/memory), and a [sandboxed workspace](https://docs.teaflask.com/workspace) the agent can use
|
|
89
|
+
- The model of your choice, on your own provider key or your user's own plan
|
|
90
|
+
- Conversation history across devices, file attachments, and markdown with code highlighting
|
|
91
|
+
- Anonymous visitors or [signed-in users](https://docs.teaflask.com/identity)
|
|
92
|
+
- Every conversation, action and approval recorded for review
|
|
93
|
+
- Keyboard-complete, screen-reader friendly, and respects reduced motion
|
|
94
|
+
- A React component, a script tag for any other stack, or a headless entry point for your own UI
|
|
95
|
+
|
|
96
|
+
<table>
|
|
97
|
+
<tr>
|
|
98
|
+
<td width="50%" valign="top">
|
|
99
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/tool-view.png" alt="Tool views: your own components, right in the conversation">
|
|
100
|
+
<p align="center"><sub>Tool views: your own components, right in the conversation</sub></p>
|
|
101
|
+
</td>
|
|
102
|
+
<td width="50%" valign="top">
|
|
103
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/sub-agents.png" alt="Sub-agents work in parallel. Open one to watch it live">
|
|
104
|
+
<p align="center"><sub>Sub-agents work in parallel. Open one to watch it live</sub></p>
|
|
105
|
+
</td>
|
|
106
|
+
</tr>
|
|
107
|
+
<tr>
|
|
108
|
+
<td width="50%" valign="top">
|
|
109
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/approval.png" alt="An approval before anything changes">
|
|
110
|
+
<p align="center"><sub>An approval before anything changes</sub></p>
|
|
111
|
+
</td>
|
|
112
|
+
<td width="50%" valign="top">
|
|
113
|
+
<img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/form-fill.png" alt="It fills in your forms and points at what to press">
|
|
114
|
+
<p align="center"><sub>It fills in your forms and points at what to press</sub></p>
|
|
115
|
+
</td>
|
|
116
|
+
</tr>
|
|
117
|
+
</table>
|
|
118
|
+
|
|
119
|
+
## Getting started
|
|
120
|
+
|
|
121
|
+
You need a Teaflask agent and its publishable key. The [getting started guide](https://docs.teaflask.com/getting-started) takes you from connecting your codebase to a published agent. Then add the assistant to your app, once, in the layout that wraps every page.
|
|
122
|
+
|
|
123
|
+
### React
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
npm install @teaflask/assistant
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import "@teaflask/assistant/styles.css";
|
|
131
|
+
import { TeaflaskAssistant } from "@teaflask/assistant";
|
|
132
|
+
|
|
133
|
+
<TeaflaskAssistant publishableKey="pk_live_…" />;
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Any other stack
|
|
137
|
+
|
|
138
|
+
Rails, Django, Laravel, Vue, WordPress or plain HTML: add the script tag before `</body>`. React is bundled inside, so your page doesn't need it.
|
|
139
|
+
|
|
140
|
+
```html
|
|
141
|
+
<script
|
|
142
|
+
type="module"
|
|
143
|
+
src="https://app.teaflask.com/assistant/v1/assistant.js"
|
|
144
|
+
></script>
|
|
145
|
+
<teaflask-assistant publishable-key="pk_live_…"></teaflask-assistant>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Next, [connect actions to your API](https://docs.teaflask.com/adapters), [identify signed-in users](https://docs.teaflask.com/identity), and run through the [production checklist](https://docs.teaflask.com/production-checklist).
|
|
149
|
+
|
|
150
|
+
## Learn more
|
|
151
|
+
|
|
152
|
+
- [How Teaflask works](https://docs.teaflask.com/fundamentals)
|
|
153
|
+
- [How it connects to your app](https://docs.teaflask.com/architecture)
|
|
154
|
+
- [Grounding and control](https://docs.teaflask.com/grounding)
|
|
155
|
+
- [Install](https://docs.teaflask.com/install)
|
|
156
|
+
- [Assistant UI](https://docs.teaflask.com/assistant-ui)
|
|
157
|
+
- [Trust](https://docs.teaflask.com/trust)
|
|
158
|
+
|
|
159
|
+
Requires `react` and `react-dom` 18.3 or 19, and `use-stick-to-bottom` (npm installs peers for you; the script tag needs none of them). The package is pre-1.0: a breaking change bumps the minor version, and the [changelog](https://github.com/teaflask/assistant/blob/main/CHANGELOG.md) lists what changed in every release. You can inspect the published code on [npm](https://www.npmjs.com/package/@teaflask/assistant?activeTab=code) or [unpkg](https://unpkg.com/@teaflask/assistant/).
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
[Functional Source License, Version 1.1, ALv2 Future License](https://github.com/teaflask/assistant/blob/main/LICENSE) (FSL-1.1-ALv2). You can use it in your own product. You can't use it to build a competing product or service. Every release becomes Apache-2.0 two years after it ships.
|
|
164
|
+
|
|
165
|
+
Report security issues to [security@teaflask.com](mailto:security@teaflask.com); see [SECURITY.md](https://github.com/teaflask/assistant/blob/main/SECURITY.md).
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { TeaflaskAssistantProvider, type TeaflaskAssistantAnonymousProps, type TeaflaskAssistantIdentityProps, type TeaflaskAssistantProviderBaseProps, type TeaflaskAssistantProviderProps, } from "./components/teaflask-assistant-provider.js";
|
|
2
|
+
export { useAssistantActivity } from "./components/use-assistant-activity.js";
|
|
3
|
+
export type { AssistantActivityResult, AssistantActivitySnapshot, } from "./core/activity.js";
|
|
4
|
+
export type { PendingDecisionGap } from "./core/pending-decision-gap.js";
|
|
5
|
+
export { AssistantCompanion, type AssistantCompanionProps, } from "./components/assistant-companion.js";
|
package/dist/activity.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export const HIGHLIGHT_DWELL_MS = 4_000;
|
|
2
|
+
const FADE_MS = 300;
|
|
3
|
+
const RING_INSET_PX = 4;
|
|
4
|
+
const REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
5
|
+
let _activeSpotlight = null;
|
|
6
|
+
export function spotlightElement(element, probe) {
|
|
7
|
+
_activeSpotlight?.dismiss();
|
|
8
|
+
_scrollIntoViewRespectingMotion(element);
|
|
9
|
+
const ring = _ringElement();
|
|
10
|
+
document.body.appendChild(ring);
|
|
11
|
+
const track = () => {
|
|
12
|
+
_placeRingAround(ring, element, probe);
|
|
13
|
+
};
|
|
14
|
+
track();
|
|
15
|
+
window.addEventListener("scroll", track, { capture: true, passive: true });
|
|
16
|
+
window.addEventListener("resize", track);
|
|
17
|
+
const dismiss = _dismisserOf(ring, track);
|
|
18
|
+
_activeSpotlight = { ring, dismiss };
|
|
19
|
+
window.setTimeout(dismiss, HIGHLIGHT_DWELL_MS);
|
|
20
|
+
}
|
|
21
|
+
function _dismisserOf(ring, track) {
|
|
22
|
+
let dismissed = false;
|
|
23
|
+
return () => {
|
|
24
|
+
if (dismissed) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
dismissed = true;
|
|
28
|
+
window.removeEventListener("scroll", track, { capture: true });
|
|
29
|
+
window.removeEventListener("resize", track);
|
|
30
|
+
if (_activeSpotlight?.ring === ring) {
|
|
31
|
+
_activeSpotlight = null;
|
|
32
|
+
}
|
|
33
|
+
ring.dataset.tfHighlightLeaving = "true";
|
|
34
|
+
window.setTimeout(() => {
|
|
35
|
+
ring.remove();
|
|
36
|
+
}, FADE_MS);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function _ringElement() {
|
|
40
|
+
const ring = document.createElement("div");
|
|
41
|
+
ring.setAttribute("data-tf-assistant", "");
|
|
42
|
+
ring.className = "tf-highlight-ring";
|
|
43
|
+
ring.setAttribute("aria-hidden", "true");
|
|
44
|
+
return ring;
|
|
45
|
+
}
|
|
46
|
+
function _placeRingAround(ring, element, probe) {
|
|
47
|
+
const rect = probe.rectOf(element);
|
|
48
|
+
ring.style.top = `${String(rect.top - RING_INSET_PX)}px`;
|
|
49
|
+
ring.style.left = `${String(rect.left - RING_INSET_PX)}px`;
|
|
50
|
+
ring.style.width = `${String(rect.width + 2 * RING_INSET_PX)}px`;
|
|
51
|
+
ring.style.height = `${String(rect.height + 2 * RING_INSET_PX)}px`;
|
|
52
|
+
}
|
|
53
|
+
function _scrollIntoViewRespectingMotion(element) {
|
|
54
|
+
if (typeof element.scrollIntoView !== "function") {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
element.scrollIntoView({
|
|
58
|
+
block: "center",
|
|
59
|
+
inline: "nearest",
|
|
60
|
+
behavior: _reducedMotionIsOn() ? "auto" : "smooth",
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function _reducedMotionIsOn() {
|
|
64
|
+
return ((typeof window.matchMedia === "function" &&
|
|
65
|
+
window.matchMedia(REDUCED_MOTION_QUERY).matches) ||
|
|
66
|
+
document.body.closest('[data-reduce-motion="true"]') !== null);
|
|
67
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface PrefillField {
|
|
2
|
+
refId: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
interface RefusedFieldReport {
|
|
6
|
+
ref_id: string;
|
|
7
|
+
reason: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PrefillReport {
|
|
10
|
+
filled: string[];
|
|
11
|
+
refused: RefusedFieldReport[];
|
|
12
|
+
}
|
|
13
|
+
export declare function prefilledFieldsReport(fields: PrefillField[]): PrefillReport;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { theFieldHoldsASecret } from "../reader/redaction.js";
|
|
2
|
+
import { resolvedElementOfRef } from "../reader/snapshot.js";
|
|
3
|
+
import { isContentEditableElement } from "../reader/roles.js";
|
|
4
|
+
const SECRET_FIELD_REASON = "This field holds a secret (a password or payment detail) — the user " +
|
|
5
|
+
"must type it themselves.";
|
|
6
|
+
const FILE_FIELD_REASON = "File pickers cannot be filled by the assistant — the user must choose " +
|
|
7
|
+
"the file themselves.";
|
|
8
|
+
const INERT_FIELD_REASON = "This field is disabled or read-only and cannot take a value right now.";
|
|
9
|
+
const NOT_FILLABLE_REASON = "This element is not a fillable form field — take a fresh read and " +
|
|
10
|
+
"pick a textbox, dropdown, checkbox, or editor ref.";
|
|
11
|
+
const CHECKBOX_VALUE_REASON = 'A checkbox takes "true" or "false", nothing else.';
|
|
12
|
+
const RADIO_VALUE_REASON = 'A radio button can only be selected — pass "true" on the option to ' +
|
|
13
|
+
"select instead.";
|
|
14
|
+
const NO_MATCHING_OPTION_REASON = "No option in this dropdown matches that value — read the page to see " +
|
|
15
|
+
"the options it offers.";
|
|
16
|
+
const VALUE_DID_NOT_LAND_REASON = "The page's own scripts rejected this value — it did not stay in the " +
|
|
17
|
+
"field.";
|
|
18
|
+
const EDITOR_UNAVAILABLE_REASON = "This editor cannot be filled on this page — tell the user what to " +
|
|
19
|
+
"type instead.";
|
|
20
|
+
export function prefilledFieldsReport(fields) {
|
|
21
|
+
const report = { filled: [], refused: [] };
|
|
22
|
+
for (const field of fields) {
|
|
23
|
+
const refusal = _filledFieldRefusalOf(field);
|
|
24
|
+
if (refusal === null) {
|
|
25
|
+
report.filled.push(field.refId);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
report.refused.push({ ref_id: field.refId, reason: refusal });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return report;
|
|
32
|
+
}
|
|
33
|
+
function _filledFieldRefusalOf(field) {
|
|
34
|
+
const resolved = resolvedElementOfRef(field.refId);
|
|
35
|
+
if (resolved.error !== null) {
|
|
36
|
+
return resolved.error;
|
|
37
|
+
}
|
|
38
|
+
const element = resolved.element;
|
|
39
|
+
if (element instanceof HTMLInputElement) {
|
|
40
|
+
return _inputRefusalOf(element, field.value);
|
|
41
|
+
}
|
|
42
|
+
if (element instanceof HTMLTextAreaElement) {
|
|
43
|
+
return _textAreaRefusalOf(element, field.value);
|
|
44
|
+
}
|
|
45
|
+
if (element instanceof HTMLSelectElement) {
|
|
46
|
+
return _selectRefusalOf(element, field.value);
|
|
47
|
+
}
|
|
48
|
+
if (isContentEditableElement(element)) {
|
|
49
|
+
return _editorRefusalOf(element, field.value);
|
|
50
|
+
}
|
|
51
|
+
return NOT_FILLABLE_REASON;
|
|
52
|
+
}
|
|
53
|
+
const _NOT_A_FIELD_INPUT_TYPES = new Set([
|
|
54
|
+
"hidden",
|
|
55
|
+
"submit",
|
|
56
|
+
"button",
|
|
57
|
+
"reset",
|
|
58
|
+
"image",
|
|
59
|
+
]);
|
|
60
|
+
function _inputRefusalOf(input, value) {
|
|
61
|
+
if (input.type === "password" || theFieldHoldsASecret(input)) {
|
|
62
|
+
return SECRET_FIELD_REASON;
|
|
63
|
+
}
|
|
64
|
+
if (input.type === "file") {
|
|
65
|
+
return FILE_FIELD_REASON;
|
|
66
|
+
}
|
|
67
|
+
if (_NOT_A_FIELD_INPUT_TYPES.has(input.type)) {
|
|
68
|
+
return NOT_FILLABLE_REASON;
|
|
69
|
+
}
|
|
70
|
+
if (input.disabled || input.readOnly) {
|
|
71
|
+
return INERT_FIELD_REASON;
|
|
72
|
+
}
|
|
73
|
+
if (input.type === "checkbox" || input.type === "radio") {
|
|
74
|
+
return _checkedRefusalOf(input, value);
|
|
75
|
+
}
|
|
76
|
+
_setThroughThePrototype(input, value);
|
|
77
|
+
_announceTheEdit(input);
|
|
78
|
+
return input.value === value ? null : VALUE_DID_NOT_LAND_REASON;
|
|
79
|
+
}
|
|
80
|
+
function _checkedRefusalOf(input, value) {
|
|
81
|
+
if (value !== "true" && value !== "false") {
|
|
82
|
+
return CHECKBOX_VALUE_REASON;
|
|
83
|
+
}
|
|
84
|
+
if (input.type === "radio" && value === "false") {
|
|
85
|
+
return RADIO_VALUE_REASON;
|
|
86
|
+
}
|
|
87
|
+
const desired = value === "true";
|
|
88
|
+
if (input.checked !== desired) {
|
|
89
|
+
input.click();
|
|
90
|
+
}
|
|
91
|
+
return input.checked === desired ? null : VALUE_DID_NOT_LAND_REASON;
|
|
92
|
+
}
|
|
93
|
+
function _textAreaRefusalOf(textArea, value) {
|
|
94
|
+
if (theFieldHoldsASecret(textArea)) {
|
|
95
|
+
return SECRET_FIELD_REASON;
|
|
96
|
+
}
|
|
97
|
+
if (textArea.disabled || textArea.readOnly) {
|
|
98
|
+
return INERT_FIELD_REASON;
|
|
99
|
+
}
|
|
100
|
+
_setThroughThePrototype(textArea, value);
|
|
101
|
+
_announceTheEdit(textArea);
|
|
102
|
+
return textArea.value === value ? null : VALUE_DID_NOT_LAND_REASON;
|
|
103
|
+
}
|
|
104
|
+
function _selectRefusalOf(select, value) {
|
|
105
|
+
if (select.disabled) {
|
|
106
|
+
return INERT_FIELD_REASON;
|
|
107
|
+
}
|
|
108
|
+
const option = _optionMatching(select, value);
|
|
109
|
+
if (option === null) {
|
|
110
|
+
return NO_MATCHING_OPTION_REASON;
|
|
111
|
+
}
|
|
112
|
+
_setThroughThePrototype(select, option.value);
|
|
113
|
+
_announceTheEdit(select);
|
|
114
|
+
return select.value === option.value ? null : VALUE_DID_NOT_LAND_REASON;
|
|
115
|
+
}
|
|
116
|
+
function _optionMatching(select, value) {
|
|
117
|
+
const options = Array.from(select.options);
|
|
118
|
+
return (options.find((option) => option.value === value) ??
|
|
119
|
+
options.find((option) => option.label.trim() === value.trim()) ??
|
|
120
|
+
null);
|
|
121
|
+
}
|
|
122
|
+
function _editorRefusalOf(element, value) {
|
|
123
|
+
if (!(element instanceof HTMLElement)) {
|
|
124
|
+
return EDITOR_UNAVAILABLE_REASON;
|
|
125
|
+
}
|
|
126
|
+
if (typeof document.execCommand !== "function") {
|
|
127
|
+
return EDITOR_UNAVAILABLE_REASON;
|
|
128
|
+
}
|
|
129
|
+
element.focus();
|
|
130
|
+
const selection = window.getSelection();
|
|
131
|
+
if (selection === null) {
|
|
132
|
+
return EDITOR_UNAVAILABLE_REASON;
|
|
133
|
+
}
|
|
134
|
+
selection.selectAllChildren(element);
|
|
135
|
+
document.execCommand("insertText", false, value);
|
|
136
|
+
const landed = element.textContent.includes(value);
|
|
137
|
+
return landed ? null : VALUE_DID_NOT_LAND_REASON;
|
|
138
|
+
}
|
|
139
|
+
function _setThroughThePrototype(control, value) {
|
|
140
|
+
const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(control), "value");
|
|
141
|
+
if (descriptor?.set !== undefined) {
|
|
142
|
+
descriptor.set.call(control, value);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
control.value = value;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function _announceTheEdit(control) {
|
|
149
|
+
control.dispatchEvent(new Event("input", { bubbles: true }));
|
|
150
|
+
control.dispatchEvent(new Event("change", { bubbles: true }));
|
|
151
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type AssistantThemeMode = "light" | "dark" | "auto";
|
|
2
|
+
export interface AssistantThemeTokens {
|
|
3
|
+
background?: string;
|
|
4
|
+
foreground?: string;
|
|
5
|
+
card?: string;
|
|
6
|
+
cardForeground?: string;
|
|
7
|
+
popover?: string;
|
|
8
|
+
popoverForeground?: string;
|
|
9
|
+
primary?: string;
|
|
10
|
+
primaryForeground?: string;
|
|
11
|
+
secondary?: string;
|
|
12
|
+
secondaryForeground?: string;
|
|
13
|
+
muted?: string;
|
|
14
|
+
mutedForeground?: string;
|
|
15
|
+
accent?: string;
|
|
16
|
+
accentForeground?: string;
|
|
17
|
+
destructive?: string;
|
|
18
|
+
border?: string;
|
|
19
|
+
input?: string;
|
|
20
|
+
ring?: string;
|
|
21
|
+
radius?: string | number;
|
|
22
|
+
fontSans?: string;
|
|
23
|
+
colorScheme?: string;
|
|
24
|
+
}
|
|
25
|
+
export type AssistantThemeDarkTokens = Omit<AssistantThemeTokens, "radius" | "fontSans" | "colorScheme">;
|
|
26
|
+
export interface AssistantTheme extends AssistantThemeTokens {
|
|
27
|
+
dark?: AssistantThemeDarkTokens;
|
|
28
|
+
}
|
|
29
|
+
export declare const THEME_TOKEN_KEYS: readonly (keyof AssistantThemeTokens)[];
|
|
30
|
+
export declare const DARK_THEME_TOKEN_KEYS: readonly (keyof AssistantThemeDarkTokens)[];
|
|
31
|
+
export declare function themeToStyleVars(theme: AssistantTheme): Record<string, string>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const THEME_TOKEN_KEYS = [
|
|
2
|
+
"background",
|
|
3
|
+
"foreground",
|
|
4
|
+
"card",
|
|
5
|
+
"cardForeground",
|
|
6
|
+
"popover",
|
|
7
|
+
"popoverForeground",
|
|
8
|
+
"primary",
|
|
9
|
+
"primaryForeground",
|
|
10
|
+
"secondary",
|
|
11
|
+
"secondaryForeground",
|
|
12
|
+
"muted",
|
|
13
|
+
"mutedForeground",
|
|
14
|
+
"accent",
|
|
15
|
+
"accentForeground",
|
|
16
|
+
"destructive",
|
|
17
|
+
"border",
|
|
18
|
+
"input",
|
|
19
|
+
"ring",
|
|
20
|
+
"radius",
|
|
21
|
+
"fontSans",
|
|
22
|
+
"colorScheme",
|
|
23
|
+
];
|
|
24
|
+
export const DARK_THEME_TOKEN_KEYS = THEME_TOKEN_KEYS.filter((key) => key !== "radius" && key !== "fontSans" && key !== "colorScheme");
|
|
25
|
+
export function themeToStyleVars(theme) {
|
|
26
|
+
const vars = {};
|
|
27
|
+
for (const key of THEME_TOKEN_KEYS) {
|
|
28
|
+
const value = theme[key];
|
|
29
|
+
if (value !== undefined) {
|
|
30
|
+
vars[`--tf-${_cssNameOf(key)}`] = _cssValueOf(value);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
for (const key of DARK_THEME_TOKEN_KEYS) {
|
|
34
|
+
const value = theme.dark?.[key];
|
|
35
|
+
if (value !== undefined) {
|
|
36
|
+
vars[`--_tf-dark-${_cssNameOf(key)}`] = _cssValueOf(value);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return vars;
|
|
40
|
+
}
|
|
41
|
+
function _cssNameOf(key) {
|
|
42
|
+
return key.replace(/[A-Z]/g, (upper) => `-${upper.toLowerCase()}`);
|
|
43
|
+
}
|
|
44
|
+
function _cssValueOf(value) {
|
|
45
|
+
return typeof value === "number" ? `${String(value)}px` : value;
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ApprovalCardModel } from "../core/approval-inbox.js";
|
|
2
|
+
import { type RunFoldRow } from "../core/run-folds.js";
|
|
3
|
+
import type { ToolRowSlot } from "./message-list-slots.js";
|
|
4
|
+
export declare function ActivityRail({ fold, cards, turnLive, inCurrentTurn, identityToken, decisionSurfacesInShelf, toolRow, }: {
|
|
5
|
+
fold: RunFoldRow;
|
|
6
|
+
cards: readonly ApprovalCardModel[];
|
|
7
|
+
turnLive: boolean;
|
|
8
|
+
inCurrentTurn: boolean;
|
|
9
|
+
identityToken: string;
|
|
10
|
+
decisionSurfacesInShelf: boolean;
|
|
11
|
+
toolRow?: ToolRowSlot;
|
|
12
|
+
}): import("react").JSX.Element;
|