@opengeni/react 3.1.0 → 3.1.2
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 +769 -22
- package/dist/accounts.js +89 -11
- package/dist/accounts.js.map +1 -1
- package/dist/approvals.d.ts +2 -1
- package/dist/artifacts-document.js +5 -3
- package/dist/artifacts-presentation.js +5 -3
- package/dist/artifacts-spreadsheet.d.ts +1 -1
- package/dist/artifacts-spreadsheet.js +5 -3
- package/dist/artifacts.d.ts +5 -1
- package/dist/artifacts.js +536 -42
- package/dist/artifacts.js.map +1 -1
- package/dist/browser-viewer-ZWR6MWJ7.js +19 -0
- package/dist/capability-catalog-row.d.ts +20 -0
- package/dist/capability-logo-fallback.d.ts +3 -0
- package/dist/chat-interactive-block-BO2IWXVK.js +14 -0
- package/dist/chunk-2DDJ6YH6.js +41 -0
- package/dist/chunk-2DDJ6YH6.js.map +1 -0
- package/dist/chunk-2HVLQ26H.js +183 -0
- package/dist/chunk-2HVLQ26H.js.map +1 -0
- package/dist/{chunk-RGALCTWO.js → chunk-2I6R3GCZ.js} +4285 -3980
- package/dist/chunk-2I6R3GCZ.js.map +1 -0
- package/dist/{chunk-D3UIAJKY.js → chunk-2SFFYIH3.js} +1179 -166
- package/dist/chunk-2SFFYIH3.js.map +1 -0
- package/dist/chunk-3PVDYTTB.js +24 -0
- package/dist/chunk-3PVDYTTB.js.map +1 -0
- package/dist/chunk-3UZCWK46.js +298 -0
- package/dist/chunk-3UZCWK46.js.map +1 -0
- package/dist/chunk-47CKUXTW.js +293 -0
- package/dist/chunk-47CKUXTW.js.map +1 -0
- package/dist/chunk-4QYP6QUI.js +109 -0
- package/dist/chunk-4QYP6QUI.js.map +1 -0
- package/dist/chunk-5EY26VZ7.js +1053 -0
- package/dist/chunk-5EY26VZ7.js.map +1 -0
- package/dist/chunk-5I4VRWBB.js +56 -0
- package/dist/chunk-5I4VRWBB.js.map +1 -0
- package/dist/chunk-5WOR7UCL.js +191 -0
- package/dist/chunk-5WOR7UCL.js.map +1 -0
- package/dist/chunk-5YJLGOM5.js +51 -0
- package/dist/chunk-5YJLGOM5.js.map +1 -0
- package/dist/chunk-6JFN3OWG.js +386 -0
- package/dist/chunk-6JFN3OWG.js.map +1 -0
- package/dist/chunk-7QJT5O4S.js +35 -0
- package/dist/chunk-7QJT5O4S.js.map +1 -0
- package/dist/chunk-A55KV72M.js +402 -0
- package/dist/chunk-A55KV72M.js.map +1 -0
- package/dist/chunk-ADWCLI4G.js +2028 -0
- package/dist/chunk-ADWCLI4G.js.map +1 -0
- package/dist/chunk-B27E3V37.js +29 -0
- package/dist/chunk-B27E3V37.js.map +1 -0
- package/dist/chunk-B7TC2A33.js +83 -0
- package/dist/chunk-B7TC2A33.js.map +1 -0
- package/dist/chunk-BLL56F7R.js +385 -0
- package/dist/chunk-BLL56F7R.js.map +1 -0
- package/dist/chunk-BOFEQC6K.js +162 -0
- package/dist/chunk-BOFEQC6K.js.map +1 -0
- package/dist/chunk-CM7LVUKC.js +35 -0
- package/dist/chunk-CM7LVUKC.js.map +1 -0
- package/dist/chunk-CORUP6JB.js +122 -0
- package/dist/chunk-CORUP6JB.js.map +1 -0
- package/dist/chunk-CSX5FFKZ.js +35 -0
- package/dist/chunk-CSX5FFKZ.js.map +1 -0
- package/dist/chunk-EGVHJKGJ.js +3125 -0
- package/dist/chunk-EGVHJKGJ.js.map +1 -0
- package/dist/{chunk-NEXLLTP4.js → chunk-G76LSA76.js} +6 -5
- package/dist/chunk-G76LSA76.js.map +1 -0
- package/dist/{chunk-PEI6RANI.js → chunk-GQMRL52F.js} +311 -75
- package/dist/chunk-GQMRL52F.js.map +1 -0
- package/dist/{chunk-ELIYWBZR.js → chunk-GUUXOISA.js} +1113 -457
- package/dist/chunk-GUUXOISA.js.map +1 -0
- package/dist/{chunk-HUIKIDM5.js → chunk-I7X2P4FU.js} +225 -116
- package/dist/chunk-I7X2P4FU.js.map +1 -0
- package/dist/chunk-IGFZFLI2.js +1390 -0
- package/dist/chunk-IGFZFLI2.js.map +1 -0
- package/dist/{chunk-4MDLEHXL.js → chunk-IMSUVYQB.js} +26 -13
- package/dist/chunk-IMSUVYQB.js.map +1 -0
- package/dist/chunk-IOYHDEP3.js +38 -0
- package/dist/chunk-IOYHDEP3.js.map +1 -0
- package/dist/chunk-IZV5FTJC.js +55 -0
- package/dist/chunk-IZV5FTJC.js.map +1 -0
- package/dist/chunk-KF33GTWN.js +343 -0
- package/dist/chunk-KF33GTWN.js.map +1 -0
- package/dist/chunk-KSGQ5ODA.js +457 -0
- package/dist/chunk-KSGQ5ODA.js.map +1 -0
- package/dist/{chunk-OAM4WAAM.js → chunk-KZC6QRNR.js} +1513 -697
- package/dist/chunk-KZC6QRNR.js.map +1 -0
- package/dist/chunk-LJUMYUBO.js +218 -0
- package/dist/chunk-LJUMYUBO.js.map +1 -0
- package/dist/chunk-LSW2OJVV.js +380 -0
- package/dist/chunk-LSW2OJVV.js.map +1 -0
- package/dist/chunk-M357MHH3.js +2 -0
- package/dist/chunk-M357MHH3.js.map +1 -0
- package/dist/chunk-MK2TQO4Y.js +24 -0
- package/dist/chunk-MK2TQO4Y.js.map +1 -0
- package/dist/chunk-N7S72EXK.js +25 -0
- package/dist/chunk-N7S72EXK.js.map +1 -0
- package/dist/{chunk-XXWH2JLC.js → chunk-NKMYZFHA.js} +616 -621
- package/dist/chunk-NKMYZFHA.js.map +1 -0
- package/dist/chunk-NX4ADH73.js +14 -0
- package/dist/chunk-NX4ADH73.js.map +1 -0
- package/dist/chunk-O7F6UJO4.js +71 -0
- package/dist/chunk-O7F6UJO4.js.map +1 -0
- package/dist/chunk-OVB5WIG5.js +14064 -0
- package/dist/chunk-OVB5WIG5.js.map +1 -0
- package/dist/chunk-OYQQJL3J.js +16 -0
- package/dist/chunk-OYQQJL3J.js.map +1 -0
- package/dist/{chunk-H5YGYNXS.js → chunk-P4BNUO57.js} +60 -17
- package/dist/chunk-P4BNUO57.js.map +1 -0
- package/dist/{chunk-JVYQRRC4.js → chunk-PEHTX3V7.js} +21 -1
- package/dist/chunk-PEHTX3V7.js.map +1 -0
- package/dist/chunk-PMV53IMM.js +26 -0
- package/dist/chunk-PMV53IMM.js.map +1 -0
- package/dist/{chunk-KCGXPP5V.js → chunk-PYEOPA4M.js} +13 -7
- package/dist/chunk-PYEOPA4M.js.map +1 -0
- package/dist/{chunk-KZ73RL76.js → chunk-QHUE7E4N.js} +8 -3
- package/dist/chunk-QHUE7E4N.js.map +1 -0
- package/dist/chunk-QV3DJVRZ.js +11 -0
- package/dist/chunk-QV3DJVRZ.js.map +1 -0
- package/dist/chunk-R5SBNG7S.js +810 -0
- package/dist/chunk-R5SBNG7S.js.map +1 -0
- package/dist/chunk-RI42H5IU.js +326 -0
- package/dist/chunk-RI42H5IU.js.map +1 -0
- package/dist/chunk-S2QH6EZ5.js +211 -0
- package/dist/chunk-S2QH6EZ5.js.map +1 -0
- package/dist/chunk-SHLZMAJN.js +304 -0
- package/dist/chunk-SHLZMAJN.js.map +1 -0
- package/dist/chunk-TGXK4BAZ.js +293 -0
- package/dist/chunk-TGXK4BAZ.js.map +1 -0
- package/dist/{chunk-5YK2ZDIG.js → chunk-TNEZNMSN.js} +4 -10
- package/dist/chunk-TNEZNMSN.js.map +1 -0
- package/dist/{chunk-22KP6LR5.js → chunk-TXS65BB2.js} +3 -1
- package/dist/{chunk-22KP6LR5.js.map → chunk-TXS65BB2.js.map} +1 -1
- package/dist/chunk-UNJPZGNK.js +63 -0
- package/dist/chunk-UNJPZGNK.js.map +1 -0
- package/dist/{chunk-MZ2G2XBA.js → chunk-V5ZUJT2T.js} +205 -45
- package/dist/chunk-V5ZUJT2T.js.map +1 -0
- package/dist/chunk-VIUEOHXY.js +394 -0
- package/dist/chunk-VIUEOHXY.js.map +1 -0
- package/dist/chunk-WIUKB3LD.js +1911 -0
- package/dist/chunk-WIUKB3LD.js.map +1 -0
- package/dist/{chunk-ICA6R6TW.js → chunk-WNN7NO2N.js} +1451 -355
- package/dist/chunk-WNN7NO2N.js.map +1 -0
- package/dist/{chunk-YJFGAFBD.js → chunk-X5UVUIMF.js} +1892 -1223
- package/dist/chunk-X5UVUIMF.js.map +1 -0
- package/dist/chunk-XDA5QJE7.js +402 -0
- package/dist/chunk-XDA5QJE7.js.map +1 -0
- package/dist/{chunk-VZTQ73XT.js → chunk-XEA5BCMA.js} +3 -1
- package/dist/{chunk-VZTQ73XT.js.map → chunk-XEA5BCMA.js.map} +1 -1
- package/dist/chunk-XHF7OYAN.js +1150 -0
- package/dist/chunk-XHF7OYAN.js.map +1 -0
- package/dist/chunk-YSRBFJMQ.js +43 -0
- package/dist/chunk-YSRBFJMQ.js.map +1 -0
- package/dist/chunk-ZOZAPAUO.js +174 -0
- package/dist/chunk-ZOZAPAUO.js.map +1 -0
- package/dist/chunk-ZQV5W7YC.js +809 -0
- package/dist/chunk-ZQV5W7YC.js.map +1 -0
- package/dist/chunk-ZUWF4NF7.js +13 -0
- package/dist/chunk-ZUWF4NF7.js.map +1 -0
- package/dist/client.d.ts +16 -7
- package/dist/clipboard.js +3 -1
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/anthropic-mark.d.ts +3 -0
- package/dist/components/approval-surface.d.ts +19 -6
- package/dist/components/artifacts/artifact-chrome.d.ts +120 -0
- package/dist/components/artifacts/artifact-sandbox.d.ts +30 -0
- package/dist/components/artifacts/artifact-surface.d.ts +4 -2
- package/dist/components/artifacts/chat-interactive-block.d.ts +29 -0
- package/dist/components/artifacts/deferred-chat-media.d.ts +15 -0
- package/dist/components/artifacts/document-editor.d.ts +4 -2
- package/dist/components/artifacts/editable-artifact-ui.d.ts +2 -1
- package/dist/components/artifacts/editable-artifact-view.d.ts +48 -0
- package/dist/components/artifacts/editable-document.d.ts +1 -1
- package/dist/components/artifacts/editable-presentation.d.ts +2 -2
- package/dist/components/artifacts/editable-spreadsheet.d.ts +8 -3
- package/dist/components/artifacts/index.d.ts +9 -2
- package/dist/components/artifacts/inline-html-document.d.ts +2 -0
- package/dist/components/artifacts/latest-task-runner.d.ts +15 -0
- package/dist/components/artifacts/presentation-editor.d.ts +6 -2
- package/dist/components/artifacts/published-html-artifact-frame.d.ts +23 -3
- package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
- package/dist/components/artifacts/site-view.d.ts +26 -0
- package/dist/components/artifacts/spreadsheet-command-queue.d.ts +20 -0
- package/dist/components/artifacts/spreadsheet-download.d.ts +7 -0
- package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -0
- package/dist/components/artifacts/spreadsheet-grid.d.ts +10 -3
- package/dist/components/artifacts/spreadsheet-resize.d.ts +50 -0
- package/dist/components/artifacts/spreadsheet-submissions.d.ts +9 -0
- package/dist/components/artifacts/visualization-assets.gen.d.ts +2 -0
- package/dist/components/browser-select-control.d.ts +16 -0
- package/dist/components/browser-viewer.d.ts +11 -2
- package/dist/components/chat-composer.d.ts +21 -3
- package/dist/components/child-session-link.d.ts +9 -0
- package/dist/components/claude-mark.d.ts +3 -0
- package/dist/components/code-editor.d.ts +1 -4
- package/dist/components/composer-transcription-control.d.ts +7 -0
- package/dist/components/composer.d.ts +34 -67
- package/dist/components/computer-viewer.d.ts +1 -1
- package/dist/components/copy-button.d.ts +3 -1
- package/dist/components/desktop-viewer.d.ts +1 -1
- package/dist/components/fleet-tile.d.ts +2 -2
- package/dist/components/grok-mark.d.ts +26 -0
- package/dist/components/human-input-form.d.ts +28 -32
- package/dist/components/human-input-surface.d.ts +7 -2
- package/dist/components/linkified-text.d.ts +18 -0
- package/dist/components/machine-input-display.d.ts +22 -1
- package/dist/components/machines/agent-status-icon.d.ts +6 -0
- package/dist/components/machines/machine-detail.d.ts +7 -1
- package/dist/components/machines/machine-status.d.ts +48 -0
- package/dist/components/markdown-table-layout.d.ts +18 -0
- package/dist/components/markdown.d.ts +37 -4
- package/dist/components/message-timeline.d.ts +86 -7
- package/dist/components/model-mark.d.ts +29 -0
- package/dist/components/model-policy-picker-menu.d.ts +9 -0
- package/dist/components/model-policy-picker.d.ts +41 -25
- package/dist/components/new-conversation.d.ts +32 -0
- package/dist/components/open-geni-chat.d.ts +73 -0
- package/dist/components/open-geni-links.d.ts +68 -0
- package/dist/components/openrouter-mark.d.ts +6 -0
- package/dist/components/opper-mark.d.ts +7 -0
- package/dist/components/preview-loading.d.ts +2 -0
- package/dist/components/provider-recovery-notice.d.ts +16 -0
- package/dist/components/queue-item-content.d.ts +9 -0
- package/dist/components/rehype-secret-refs.d.ts +23 -0
- package/dist/components/remark-soft-line-breaks.d.ts +38 -0
- package/dist/components/sandbox-files.d.ts +3 -1
- package/dist/components/sandbox-workspace.d.ts +18 -0
- package/dist/components/secret-question-field.d.ts +31 -0
- package/dist/components/secret-ref-chip.d.ts +35 -0
- package/dist/components/session-capability-frame.d.ts +37 -0
- package/dist/components/session-chrome.d.ts +57 -8
- package/dist/components/session-commands-panel.d.ts +6 -0
- package/dist/components/session-commands.d.ts +6 -0
- package/dist/components/session-connection-request.d.ts +8 -0
- package/dist/components/session-conversation.d.ts +157 -0
- package/dist/components/session-list.d.ts +39 -0
- package/dist/components/session-mcp-capability-card.d.ts +41 -0
- package/dist/components/session-proxy-scope.d.ts +35 -0
- package/dist/components/session-status.d.ts +4 -1
- package/dist/components/session-usage-limit-notice.d.ts +39 -0
- package/dist/components/timeline-anchor.d.ts +24 -0
- package/dist/components/timeline-annotation-chrome.d.ts +25 -0
- package/dist/components/timeline-annotation-layout.d.ts +42 -0
- package/dist/components/timeline-annotation-markers.d.ts +8 -0
- package/dist/components/timeline-annotation-reveal-context.d.ts +4 -0
- package/dist/components/timeline-annotation-shared.d.ts +31 -0
- package/dist/components/timeline-annotations-dialog.d.ts +3 -2
- package/dist/components/timeline-annotations.d.ts +13 -3
- package/dist/components/timeline-reading-progress.d.ts +11 -0
- package/dist/components/timeline-search.d.ts +34 -0
- package/dist/components/timeline-settlement.d.ts +16 -0
- package/dist/components/tip-follow.d.ts +16 -0
- package/dist/components/tool-action-review.d.ts +47 -0
- package/dist/components/tool-review-history.d.ts +25 -0
- package/dist/components/usage-limit-notice.d.ts +49 -0
- package/dist/components/usage-member-list.d.ts +91 -0
- package/dist/components/usage-meter.d.ts +73 -0
- package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
- package/dist/components/user-message-body.d.ts +10 -1
- package/dist/composer-messages.d.ts +74 -0
- package/dist/composer-messages.js +9 -0
- package/dist/composer-messages.js.map +1 -0
- package/dist/composer-voice-events.d.ts +8 -0
- package/dist/composer.d.ts +5 -4
- package/dist/composer.js +26 -13
- package/dist/computer-viewer-GMLDXPON.js +20 -0
- package/dist/computer-viewer-GMLDXPON.js.map +1 -0
- package/dist/connect-account-identity.d.ts +8 -0
- package/dist/connect-accounts.d.ts +15 -0
- package/dist/connect-chooser.d.ts +18 -0
- package/dist/connect-panel.d.ts +18 -0
- package/dist/connect-setup.d.ts +18 -0
- package/dist/connect.d.ts +21 -0
- package/dist/connect.js +2149 -0
- package/dist/connect.js.map +1 -0
- package/dist/connection-catalog.d.ts +38 -0
- package/dist/connection-discovery.d.ts +12 -0
- package/dist/connection-installed.d.ts +17 -0
- package/dist/connection-logo.d.ts +9 -0
- package/dist/connection-service-logo.d.ts +8 -0
- package/dist/connection-service-presentation.d.ts +13 -0
- package/dist/connection-skeleton.d.ts +5 -0
- package/dist/connection-type-picker.d.ts +6 -0
- package/dist/conversation-timeline.d.ts +5 -0
- package/dist/desktop.d.ts +7 -0
- package/dist/desktop.js +27 -0
- package/dist/desktop.js.map +1 -0
- package/dist/device-authorization.d.ts +23 -0
- package/dist/diffs.d.ts +8 -0
- package/dist/diffs.js +15 -0
- package/dist/diffs.js.map +1 -0
- package/dist/discovery-cache.d.ts +5 -0
- package/dist/editor.d.ts +7 -0
- package/dist/editor.js +22 -0
- package/dist/editor.js.map +1 -0
- package/dist/embedded-new-voice-OCRNT6U5.js +18 -0
- package/dist/embedded-new-voice-OCRNT6U5.js.map +1 -0
- package/dist/embedded-voice-RPHPYVBT.js +18 -0
- package/dist/embedded-voice-RPHPYVBT.js.map +1 -0
- package/dist/{fleet-decision-row-GGCAT4E4.js → fleet-decision-row-SI63O5V4.js} +4 -1
- package/dist/fleet-decision-row-SI63O5V4.js.map +1 -0
- package/dist/hooks/latest-question.d.ts +25 -0
- package/dist/hooks/shared-machines-list.d.ts +4 -0
- package/dist/hooks/shared-query.d.ts +113 -0
- package/dist/hooks/use-attached-browsers.d.ts +1 -1
- package/dist/hooks/use-auth-runs.d.ts +1 -4
- package/dist/hooks/use-available-models.d.ts +1 -1
- package/dist/hooks/use-browser-frame-stream.d.ts +1 -1
- package/dist/hooks/use-browser-session.d.ts +12 -1
- package/dist/hooks/use-client-config-flags.d.ts +49 -0
- package/dist/hooks/use-codex-accounts.d.ts +59 -10
- package/dist/hooks/use-composer.d.ts +24 -2
- package/dist/hooks/use-computer-frame-stream.d.ts +1 -1
- package/dist/hooks/use-computer-input-posture.d.ts +13 -0
- package/dist/hooks/use-computer-session.d.ts +4 -0
- package/dist/hooks/use-connect.d.ts +23 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-file-attachments.d.ts +12 -0
- package/dist/hooks/use-goal.d.ts +2 -1
- package/dist/hooks/use-last-started-turn-policy.d.ts +5 -1
- package/dist/hooks/use-new-conversation.d.ts +56 -0
- package/dist/hooks/use-new-session-draft.d.ts +74 -0
- package/dist/hooks/use-realtime-voice-models.d.ts +7 -0
- package/dist/hooks/use-sandbox-files.d.ts +4 -1
- package/dist/hooks/use-session-conversation.d.ts +49 -0
- package/dist/hooks/use-session-events.d.ts +28 -7
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session-model-account.d.ts +48 -0
- package/dist/hooks/use-supergrok-accounts.d.ts +7 -1
- package/dist/hooks/use-terminal-stream.d.ts +11 -5
- package/dist/hooks/use-usage.d.ts +40 -0
- package/dist/hooks/use-vaults.d.ts +53 -0
- package/dist/hooks/use-voice-input.d.ts +8 -1
- package/dist/hooks/use-workspace-edit.d.ts +4 -0
- package/dist/hooks/use-workspace-sessions.d.ts +22 -5
- package/dist/human-input-model.d.ts +122 -0
- package/dist/identity-link-accounts.d.ts +11 -0
- package/dist/identity-link-consent.d.ts +18 -0
- package/dist/index.d.ts +82 -20
- package/dist/index.js +2350 -6605
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +1 -1
- package/dist/interaction.js +14 -24
- package/dist/interaction.js.map +1 -1
- package/dist/latest-question-R77KWSUP.js +118 -0
- package/dist/latest-question-R77KWSUP.js.map +1 -0
- package/dist/lib/clipboard.d.ts +7 -0
- package/dist/lib/error-message.d.ts +7 -0
- package/dist/lib/format.d.ts +58 -4
- package/dist/lib/host-theme.d.ts +77 -0
- package/dist/lib/interaction-errors.d.ts +3 -0
- package/dist/lib/menu-styles.d.ts +22 -0
- package/dist/lib/notify-observer.d.ts +2 -0
- package/dist/lib/pierre-diffs-loader.d.ts +20 -0
- package/dist/lib/provider-recovery.d.ts +55 -0
- package/dist/lib/scrollbars.d.ts +11 -0
- package/dist/lib/terminal-input-readiness.d.ts +11 -0
- package/dist/lib/transient-retry.d.ts +25 -0
- package/dist/lib/workbench-peers.d.ts +36 -0
- package/dist/lib/xterm-theme.d.ts +7 -5
- package/dist/machines.js +9 -5
- package/dist/markdown-table-layout-3PV2UAAH.js +113 -0
- package/dist/markdown-table-layout-3PV2UAAH.js.map +1 -0
- package/dist/mcp-connection-status.d.ts +14 -0
- package/dist/model-mark-paths.d.ts +34 -0
- package/dist/model-mark-paths.js +16 -0
- package/dist/model-mark-paths.js.map +1 -0
- package/dist/model-picker-model.d.ts +111 -0
- package/dist/model-picker-model.js +25 -0
- package/dist/model-picker-model.js.map +1 -0
- package/dist/model-policy-picker-menu-7GJ5URPR.js +17 -0
- package/dist/model-policy-picker-menu-7GJ5URPR.js.map +1 -0
- package/dist/model-policy.d.ts +30 -3
- package/dist/model-policy.js +14 -1
- package/dist/native-previews.d.ts +28 -0
- package/dist/native-previews.js +82 -0
- package/dist/native-previews.js.map +1 -0
- package/dist/new-session-draft.d.ts +7 -0
- package/dist/new-session-draft.js +639 -0
- package/dist/new-session-draft.js.map +1 -0
- package/dist/notification-text.d.ts +27 -0
- package/dist/{noto-sans-arabic-loader-IA2T4X2A.js → noto-sans-arabic-loader-XSH2KYWJ.js} +3 -1
- package/dist/{noto-sans-arabic-loader-IA2T4X2A.js.map → noto-sans-arabic-loader-XSH2KYWJ.js.map} +1 -1
- package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js → noto-sans-jp-loader.generated-MR5L6V7K.js} +3 -1
- package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js.map → noto-sans-jp-loader.generated-MR5L6V7K.js.map} +1 -1
- package/dist/older-history.d.ts +3 -2
- package/dist/organization-model.d.ts +32 -0
- package/dist/organization-model.js +65 -0
- package/dist/organization-model.js.map +1 -0
- package/dist/{platform-activity-row-BJHUHXAT.js → platform-activity-row-5OCKOQWZ.js} +16 -78
- package/dist/platform-activity-row-5OCKOQWZ.js.map +1 -0
- package/dist/plugin-details.d.ts +14 -0
- package/dist/plugin-discovery.d.ts +25 -0
- package/dist/preview-loading-paint.d.ts +20 -0
- package/dist/provider.d.ts +25 -2
- package/dist/queue-presentation-model.d.ts +72 -0
- package/dist/queue-presentation-model.js +38 -0
- package/dist/queue-presentation-model.js.map +1 -0
- package/dist/{queue-surface-implementation-BSKUWHRI.js → queue-surface-implementation-GJBH7NKO.js} +65 -265
- package/dist/queue-surface-implementation-GJBH7NKO.js.map +1 -0
- package/dist/realtime/embedded-new-voice.d.ts +1 -0
- package/dist/realtime/embedded-voice.d.ts +1 -0
- package/dist/realtime/realtime-control.d.ts +4 -65
- package/dist/realtime/session-realtime.d.ts +78 -0
- package/dist/realtime.js +25 -1294
- package/dist/realtime.js.map +1 -1
- package/dist/sandbox-files-O27IPOZW.js +21 -0
- package/dist/sandbox-files-O27IPOZW.js.map +1 -0
- package/dist/sandbox-label-model.d.ts +30 -0
- package/dist/sandbox-label-model.js +20 -0
- package/dist/sandbox-label-model.js.map +1 -0
- package/dist/scrollbars.d.ts +1 -0
- package/dist/scrollbars.js +10 -0
- package/dist/scrollbars.js.map +1 -0
- package/dist/secret-reference-label.d.ts +14 -0
- package/dist/secrets-ui.d.ts +57 -0
- package/dist/session-agents-model.d.ts +10 -0
- package/dist/session-agents-model.js +25 -0
- package/dist/session-agents-model.js.map +1 -0
- package/dist/session-attention-model.d.ts +8 -0
- package/dist/session-attention-model.js +47 -0
- package/dist/session-attention-model.js.map +1 -0
- package/dist/session-auth-recommendation.d.ts +5 -0
- package/dist/session-capability-policy.d.ts +31 -0
- package/dist/session-feedback-model.d.ts +20 -0
- package/dist/session-feedback-model.js +56 -0
- package/dist/session-feedback-model.js.map +1 -0
- package/dist/session-list-model.d.ts +138 -0
- package/dist/session-list-model.js +274 -0
- package/dist/session-list-model.js.map +1 -0
- package/dist/session-realtime-7DJOIHQW.js +21 -0
- package/dist/session-realtime-7DJOIHQW.js.map +1 -0
- package/dist/session-realtime.d.ts +7 -0
- package/dist/session-realtime.js +19 -0
- package/dist/session-realtime.js.map +1 -0
- package/dist/session-status-model.d.ts +36 -0
- package/dist/session-ui.d.ts +39 -1
- package/dist/session-ui.js +126 -12
- package/dist/session-ui.js.map +1 -1
- package/dist/session.d.ts +8 -2
- package/dist/session.js +35 -20
- package/dist/site-snapshot.d.ts +14 -0
- package/dist/sites-ui.d.ts +24 -0
- package/dist/sites.d.ts +3 -0
- package/dist/sites.js +14 -0
- package/dist/sites.js.map +1 -0
- package/dist/skill-discovery.d.ts +47 -0
- package/dist/terminal.d.ts +8 -0
- package/dist/terminal.js +32 -0
- package/dist/terminal.js.map +1 -0
- package/dist/testing/session-scenarios.d.ts +10 -0
- package/dist/testing/session-scenarios.js +367 -0
- package/dist/testing/session-scenarios.js.map +1 -0
- package/dist/timeline/activity-rail.d.ts +11 -2
- package/dist/timeline/agent-identity.d.ts +30 -0
- package/dist/timeline/agent-row.d.ts +31 -0
- package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
- package/dist/timeline/compaction-copy.d.ts +46 -0
- package/dist/timeline/entrance.d.ts +13 -1
- package/dist/timeline/focus-sequence.d.ts +9 -0
- package/dist/timeline/genie-copy.d.ts +3 -0
- package/dist/timeline/genie-loading.d.ts +47 -0
- package/dist/timeline/index.d.ts +10 -5
- package/dist/timeline/knowledge-receipt.d.ts +17 -0
- package/dist/timeline/message-sender.d.ts +19 -0
- package/dist/timeline/notice-presentation.d.ts +13 -0
- package/dist/timeline/parsers.d.ts +11 -0
- package/dist/timeline/patch-apply-command.d.ts +18 -0
- package/dist/timeline/platform-activity-presentation.d.ts +21 -0
- package/dist/timeline/platform-activity-row.d.ts +1 -2
- package/dist/timeline/presented-image.d.ts +11 -0
- package/dist/timeline/projection.d.ts +31 -2
- package/dist/timeline/provider-logo.d.ts +15 -0
- package/dist/timeline/question-nav-model.d.ts +23 -0
- package/dist/timeline/registry.d.ts +12 -1
- package/dist/timeline/retained-image.d.ts +18 -0
- package/dist/timeline/retained-loaders.d.ts +27 -0
- package/dist/timeline/rolling-activity.d.ts +11 -0
- package/dist/timeline/screenshot-lightbox.d.ts +23 -1
- package/dist/timeline/session-usage-limit-row.d.ts +11 -0
- package/dist/timeline/shared.d.ts +4 -1
- package/dist/timeline/startup-dispatch-details.d.ts +5 -0
- package/dist/timeline/startup-preference.d.ts +3 -0
- package/dist/timeline/startup-timings.d.ts +4 -0
- package/dist/timeline/tool-display-name.d.ts +5 -2
- package/dist/timeline/tool-presentation.d.ts +172 -0
- package/dist/timeline/turn-summary-model.d.ts +95 -0
- package/dist/timeline/turn-summary.d.ts +20 -54
- package/dist/timeline/types.d.ts +179 -7
- package/dist/timeline/work-presentation.d.ts +60 -0
- package/dist/timeline-annotation-markers-U3G66KUD.js +166 -0
- package/dist/timeline-annotation-markers-U3G66KUD.js.map +1 -0
- package/dist/timeline-annotation-selection-BI7QTPTZ.js +242 -0
- package/dist/timeline-annotation-selection-BI7QTPTZ.js.map +1 -0
- package/dist/timeline-annotations-dialog-FOMHSDTE.js +274 -0
- package/dist/timeline-annotations-dialog-FOMHSDTE.js.map +1 -0
- package/dist/timeline-model.d.ts +29 -0
- package/dist/timeline-model.js +254 -0
- package/dist/timeline-model.js.map +1 -0
- package/dist/usage/allowance-copy.d.ts +25 -0
- package/dist/usage/session-usage-limit.d.ts +88 -0
- package/dist/usage/summary.d.ts +35 -0
- package/dist/usage.d.ts +17 -0
- package/dist/usage.js +1187 -0
- package/dist/usage.js.map +1 -0
- package/dist/voice-recording-owner.d.ts +7 -0
- package/package.json +107 -7
- package/src/accounts.tsx +116 -14
- package/src/approvals.ts +8 -1
- package/src/artifacts-spreadsheet.ts +1 -0
- package/src/artifacts.ts +44 -0
- package/src/assets/README.md +8 -0
- package/src/assets/gmail.ico +0 -0
- package/src/assets/outlook.ico +0 -0
- package/src/capability-catalog-row.tsx +94 -0
- package/src/capability-logo-fallback.ts +22 -0
- package/src/client.ts +20 -31
- package/src/commands/registry.ts +18 -15
- package/src/commands/types.ts +2 -0
- package/src/components/anthropic-mark.tsx +10 -0
- package/src/components/approval-surface.tsx +401 -138
- package/src/components/artifacts/artifact-chrome.tsx +413 -0
- package/src/components/artifacts/artifact-sandbox.tsx +189 -0
- package/src/components/artifacts/artifact-surface.tsx +40 -20
- package/src/components/artifacts/chat-interactive-block.tsx +260 -0
- package/src/components/artifacts/deferred-chat-media.tsx +67 -0
- package/src/components/artifacts/document-editor.tsx +141 -16
- package/src/components/artifacts/editable-artifact-ui.tsx +4 -2
- package/src/components/artifacts/editable-artifact-view.tsx +197 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +5 -2
- package/src/components/artifacts/editable-document.tsx +37 -36
- package/src/components/artifacts/editable-presentation.tsx +36 -18
- package/src/components/artifacts/editable-spreadsheet.tsx +543 -103
- package/src/components/artifacts/index.ts +45 -0
- package/src/components/artifacts/inline-html-document.ts +24 -0
- package/src/components/artifacts/latest-task-runner.ts +49 -0
- package/src/components/artifacts/presentation-editor.tsx +323 -67
- package/src/components/artifacts/published-html-artifact-frame.tsx +122 -5
- package/src/components/artifacts/session-artifact-viewer.tsx +378 -0
- package/src/components/artifacts/site-view.tsx +121 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
- package/src/components/artifacts/spreadsheet-command-queue.ts +184 -0
- package/src/components/artifacts/spreadsheet-download.tsx +109 -0
- package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +344 -144
- package/src/components/artifacts/spreadsheet-resize.tsx +421 -0
- package/src/components/artifacts/spreadsheet-submissions.tsx +46 -0
- package/src/components/artifacts/visualization-assets/base.css +1015 -0
- package/src/components/artifacts/visualization-assets/helpers.html +349 -0
- package/src/components/artifacts/visualization-assets.gen.ts +3 -0
- package/src/components/browser-select-control.tsx +312 -0
- package/src/components/browser-viewer.tsx +778 -318
- package/src/components/chat-composer.tsx +47 -5
- package/src/components/child-session-link.tsx +36 -0
- package/src/components/claude-mark.tsx +11 -0
- package/src/components/code-editor.tsx +13 -16
- package/src/components/composer-transcription-control.tsx +128 -30
- package/src/components/composer.tsx +404 -195
- package/src/components/computer-viewer.tsx +880 -253
- package/src/components/copy-button.tsx +13 -5
- package/src/components/desktop-viewer.tsx +1 -1
- package/src/components/enrollment-consent.tsx +1 -1
- package/src/components/enrollment-device-flow.tsx +1 -1
- package/src/components/file-browser.tsx +10 -14
- package/src/components/fleet-tile.tsx +9 -18
- package/src/components/generated-video-player.tsx +4 -2
- package/src/components/grok-mark.tsx +34 -0
- package/src/components/human-input-form.tsx +590 -283
- package/src/components/human-input-surface.tsx +11 -0
- package/src/components/interaction-intervention-banner.tsx +2 -2
- package/src/components/linkified-text.tsx +79 -0
- package/src/components/machine-card.tsx +35 -78
- package/src/components/machine-dock-bar.tsx +1 -1
- package/src/components/machine-input-display.ts +197 -3
- package/src/components/machines/agent-status-icon.tsx +31 -0
- package/src/components/machines/machine-detail.tsx +200 -31
- package/src/components/machines/machine-operation-policy.tsx +1 -1
- package/src/components/machines/machine-status.ts +241 -0
- package/src/components/machines-dashboard.tsx +2 -17
- package/src/components/markdown-table-layout.ts +143 -0
- package/src/components/markdown.tsx +466 -129
- package/src/components/message-timeline.tsx +2567 -728
- package/src/components/model-mark.tsx +102 -0
- package/src/components/model-picker.tsx +15 -4
- package/src/components/model-policy-picker-menu.tsx +371 -0
- package/src/components/model-policy-picker.tsx +256 -412
- package/src/components/new-conversation.tsx +221 -0
- package/src/components/open-geni-chat.tsx +309 -0
- package/src/components/open-geni-links.tsx +179 -0
- package/src/components/openrouter-mark.tsx +13 -0
- package/src/components/opper-mark.tsx +18 -0
- package/src/components/pierre-diff.tsx +41 -16
- package/src/components/pierre-file.tsx +35 -10
- package/src/components/preview-loading.tsx +109 -0
- package/src/components/provider-recovery-notice.tsx +49 -0
- package/src/components/queue-item-content.ts +14 -0
- package/src/components/queue-surface-implementation.tsx +51 -356
- package/src/components/queue-surface-state.tsx +3 -1
- package/src/components/rehype-secret-refs.ts +98 -0
- package/src/components/remark-soft-line-breaks.ts +166 -0
- package/src/components/sandbox-files.tsx +91 -15
- package/src/components/sandbox-terminal.tsx +84 -13
- package/src/components/sandbox-workspace.tsx +147 -51
- package/src/components/secret-question-field.tsx +324 -0
- package/src/components/secret-ref-chip.tsx +185 -0
- package/src/components/session-capability-frame.tsx +197 -0
- package/src/components/session-chrome.tsx +842 -251
- package/src/components/session-commands-panel.tsx +126 -0
- package/src/components/session-commands.tsx +18 -0
- package/src/components/session-connection-request.tsx +97 -0
- package/src/components/session-conversation.tsx +876 -0
- package/src/components/session-list.tsx +257 -0
- package/src/components/session-mcp-capability-card.tsx +680 -0
- package/src/components/session-proxy-scope.tsx +153 -0
- package/src/components/session-status.tsx +26 -17
- package/src/components/session-usage-limit-notice.tsx +174 -0
- package/src/components/timeline-anchor.tsx +119 -0
- package/src/components/timeline-annotation-chrome.tsx +196 -0
- package/src/components/timeline-annotation-layout.ts +268 -0
- package/src/components/timeline-annotation-markers.tsx +185 -0
- package/src/components/timeline-annotation-reveal-context.ts +9 -0
- package/src/components/timeline-annotation-selection.tsx +106 -54
- package/src/components/timeline-annotation-shared.ts +245 -0
- package/src/components/timeline-annotations-dialog.tsx +185 -128
- package/src/components/timeline-annotations.tsx +189 -45
- package/src/components/timeline-reading-progress.ts +80 -0
- package/src/components/timeline-search.tsx +168 -0
- package/src/components/timeline-settlement.ts +60 -0
- package/src/components/tip-follow.ts +52 -0
- package/src/components/tool-action-review.tsx +650 -0
- package/src/components/tool-review-history.tsx +88 -0
- package/src/components/tooltip.tsx +38 -5
- package/src/components/usage-limit-notice.tsx +179 -0
- package/src/components/usage-member-list.tsx +792 -0
- package/src/components/usage-meter.tsx +382 -0
- package/src/components/use-viewer-menu-dismiss.ts +33 -0
- package/src/components/user-message-body.tsx +27 -2
- package/src/components/workspace-dock.tsx +18 -1
- package/src/composer-messages.ts +150 -0
- package/src/composer-voice-events.ts +12 -0
- package/src/composer.ts +6 -1
- package/src/connect-account-identity.tsx +34 -0
- package/src/connect-accounts.tsx +233 -0
- package/src/connect-chooser.tsx +336 -0
- package/src/connect-panel.tsx +99 -0
- package/src/connect-setup.tsx +355 -0
- package/src/connect.ts +60 -0
- package/src/connection-assets.d.ts +4 -0
- package/src/connection-catalog.tsx +162 -0
- package/src/connection-discovery.tsx +238 -0
- package/src/connection-installed.tsx +51 -0
- package/src/connection-logo.tsx +37 -0
- package/src/connection-service-logo.tsx +55 -0
- package/src/connection-service-presentation.ts +46 -0
- package/src/connection-skeleton.tsx +16 -0
- package/src/connection-type-picker.tsx +36 -0
- package/src/conversation-timeline.ts +92 -0
- package/src/desktop.ts +24 -0
- package/src/device-authorization.tsx +98 -0
- package/src/diffs.ts +16 -0
- package/src/discovery-cache.ts +42 -0
- package/src/editor.ts +13 -0
- package/src/hooks/internal.ts +3 -2
- package/src/hooks/latest-question.ts +164 -0
- package/src/hooks/shared-machines-list.ts +34 -1
- package/src/hooks/shared-query.ts +721 -0
- package/src/hooks/use-attached-browsers.ts +1 -1
- package/src/hooks/use-auth-runs.ts +0 -27
- package/src/hooks/use-available-models.ts +21 -15
- package/src/hooks/use-browser-frame-stream.ts +19 -2
- package/src/hooks/use-browser-session.ts +680 -205
- package/src/hooks/use-browser-sessions.ts +32 -1
- package/src/hooks/use-client-config-flags.ts +118 -0
- package/src/hooks/use-codex-accounts.ts +247 -47
- package/src/hooks/use-composer.ts +276 -47
- package/src/hooks/use-computer-frame-stream.ts +25 -7
- package/src/hooks/use-computer-input-posture.ts +94 -0
- package/src/hooks/use-computer-session.ts +409 -95
- package/src/hooks/use-connect.ts +23 -0
- package/src/hooks/use-desktop-stream.ts +19 -28
- package/src/hooks/use-file-attachments.ts +80 -4
- package/src/hooks/use-goal.ts +107 -13
- package/src/hooks/use-last-started-turn-policy.ts +46 -14
- package/src/hooks/use-machines.ts +4 -0
- package/src/hooks/use-new-conversation.ts +374 -0
- package/src/hooks/use-new-session-draft.ts +813 -0
- package/src/hooks/use-realtime-voice-models.ts +46 -0
- package/src/hooks/use-sandbox-files.ts +68 -20
- package/src/hooks/use-session-background-commands.ts +22 -11
- package/src/hooks/use-session-capabilities.ts +3 -2
- package/src/hooks/use-session-conversation.ts +150 -0
- package/src/hooks/use-session-events.ts +703 -382
- package/src/hooks/use-session-lineage.ts +20 -16
- package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
- package/src/hooks/use-session-model-account.ts +174 -0
- package/src/hooks/use-session.ts +53 -21
- package/src/hooks/use-slash-commands.ts +6 -11
- package/src/hooks/use-supergrok-accounts.ts +22 -8
- package/src/hooks/use-terminal-stream.ts +153 -27
- package/src/hooks/use-transcription.ts +6 -0
- package/src/hooks/use-turn-queue.ts +2 -1
- package/src/hooks/use-usage.ts +100 -0
- package/src/hooks/use-vaults.ts +153 -0
- package/src/hooks/use-video-artifact-playback.ts +1 -1
- package/src/hooks/use-voice-input.ts +127 -19
- package/src/hooks/use-workspace-capture.ts +3 -2
- package/src/hooks/use-workspace-edit.ts +23 -5
- package/src/hooks/use-workspace-sessions.ts +97 -32
- package/src/human-input-model.ts +359 -0
- package/src/identity-link-accounts.tsx +148 -0
- package/src/identity-link-consent.tsx +192 -0
- package/src/index.ts +262 -16
- package/src/interaction.ts +1 -0
- package/src/lib/clipboard.ts +29 -0
- package/src/lib/error-message.ts +37 -0
- package/src/lib/format.ts +213 -16
- package/src/lib/host-theme.ts +529 -0
- package/src/lib/interaction-errors.ts +15 -0
- package/src/lib/menu-styles.ts +44 -0
- package/src/lib/notify-observer.ts +15 -0
- package/src/lib/pierre-diffs-loader.ts +53 -0
- package/src/lib/provider-recovery.ts +243 -0
- package/src/lib/scrollbars.ts +30 -0
- package/src/lib/terminal-input-readiness.ts +51 -0
- package/src/lib/transient-retry.ts +99 -0
- package/src/lib/workbench-peers.ts +62 -0
- package/src/lib/xterm-theme.ts +23 -21
- package/src/mcp-connection-status.ts +35 -0
- package/src/model-mark-paths.ts +53 -0
- package/src/model-picker-model.ts +330 -0
- package/src/model-policy.ts +299 -74
- package/src/native-previews.ts +100 -0
- package/src/new-session-draft.ts +22 -0
- package/src/notification-text.ts +81 -0
- package/src/older-history.ts +22 -4
- package/src/organization-model.ts +118 -0
- package/src/plugin-details.tsx +185 -0
- package/src/plugin-discovery.tsx +196 -0
- package/src/preview-loading-paint.ts +68 -0
- package/src/provider.tsx +74 -15
- package/src/queue-presentation-model.ts +464 -0
- package/src/realtime/dropdown-menu.tsx +19 -12
- package/src/realtime/embedded-new-voice.tsx +1 -0
- package/src/realtime/embedded-voice.tsx +3 -0
- package/src/realtime/realtime-control.tsx +138 -501
- package/src/realtime/session-realtime.ts +566 -0
- package/src/sandbox-label-model.ts +53 -0
- package/src/scrollbars.ts +3 -0
- package/src/secret-reference-label.ts +43 -0
- package/src/secrets-ui.tsx +59 -0
- package/src/session-agents-model.ts +33 -0
- package/src/session-attention-model.ts +62 -0
- package/src/session-auth-recommendation.ts +48 -0
- package/src/session-capability-policy.ts +196 -0
- package/src/session-context.ts +3 -4
- package/src/session-feedback-model.ts +95 -0
- package/src/session-list-model.ts +434 -0
- package/src/session-realtime.ts +18 -0
- package/src/session-status-model.ts +99 -0
- package/src/session-ui.ts +98 -1
- package/src/session.ts +17 -1
- package/src/site-snapshot.ts +74 -0
- package/src/sites-ui.tsx +348 -0
- package/src/sites.ts +3 -0
- package/src/skill-discovery.tsx +208 -0
- package/src/terminal.ts +26 -0
- package/src/testing/session-scenarios.ts +404 -0
- package/src/timeline/activity-rail.tsx +242 -101
- package/src/timeline/agent-identity.tsx +84 -0
- package/src/timeline/agent-row.tsx +231 -0
- package/src/timeline/allowance-exhausted-row.tsx +86 -0
- package/src/timeline/compaction-copy.ts +115 -0
- package/src/timeline/entrance.tsx +28 -3
- package/src/timeline/fleet-decision-projection.ts +2 -1
- package/src/timeline/fleet-decision-row.tsx +1 -0
- package/src/timeline/focus-sequence.ts +44 -0
- package/src/timeline/genie-copy.ts +19 -0
- package/src/timeline/genie-loading.tsx +143 -0
- package/src/timeline/index.ts +30 -2
- package/src/timeline/knowledge-receipt.tsx +100 -0
- package/src/timeline/message-sender.tsx +71 -0
- package/src/timeline/notice-presentation.ts +48 -0
- package/src/timeline/parsers.ts +42 -2
- package/src/timeline/patch-apply-command.tsx +135 -0
- package/src/timeline/platform-activity-presentation.ts +166 -0
- package/src/timeline/platform-activity-row.tsx +15 -90
- package/src/timeline/presented-image.ts +63 -0
- package/src/timeline/projection.ts +1746 -76
- package/src/timeline/provider-logo.tsx +53 -0
- package/src/timeline/question-nav-model.ts +28 -0
- package/src/timeline/registry.ts +26 -4
- package/src/timeline/retained-image.ts +97 -0
- package/src/timeline/retained-loaders.ts +91 -0
- package/src/timeline/rolling-activity.tsx +80 -0
- package/src/timeline/screenshot-lightbox.tsx +228 -5
- package/src/timeline/session-usage-limit-row.tsx +42 -0
- package/src/timeline/shared.tsx +42 -15
- package/src/timeline/startup-dispatch-details.tsx +36 -0
- package/src/timeline/startup-preference.ts +33 -0
- package/src/timeline/startup-timings.tsx +145 -0
- package/src/timeline/tool-display-name.ts +19 -7
- package/src/timeline/tool-presentation.ts +1316 -0
- package/src/timeline/tool-renderers.tsx +835 -1138
- package/src/timeline/turn-summary-model.ts +343 -0
- package/src/timeline/turn-summary.tsx +272 -365
- package/src/timeline/types.ts +189 -6
- package/src/timeline/work-presentation.ts +189 -0
- package/src/timeline-model.ts +143 -0
- package/src/usage/allowance-copy.ts +64 -0
- package/src/usage/session-usage-limit.ts +266 -0
- package/src/usage/summary.ts +93 -0
- package/src/usage.ts +70 -0
- package/src/voice-recording-owner.ts +22 -0
- package/styles/compiled.css +2319 -748
- package/styles/connect.css +290 -0
- package/styles/connect.d.ts +1 -0
- package/styles/effective-tokens.css +1 -0
- package/styles/index.css +309 -9
- package/styles/responsive.css +99 -7
- package/styles/session-capability.css +44 -0
- package/styles/tokens.css +134 -66
- package/dist/browser-viewer-AEFHUYZK.js +0 -14
- package/dist/chunk-4MDLEHXL.js.map +0 -1
- package/dist/chunk-5YK2ZDIG.js.map +0 -1
- package/dist/chunk-D3UIAJKY.js.map +0 -1
- package/dist/chunk-ELIYWBZR.js.map +0 -1
- package/dist/chunk-H5YGYNXS.js.map +0 -1
- package/dist/chunk-HQVCKCLG.js +0 -9458
- package/dist/chunk-HQVCKCLG.js.map +0 -1
- package/dist/chunk-HUIKIDM5.js.map +0 -1
- package/dist/chunk-ICA6R6TW.js.map +0 -1
- package/dist/chunk-JVYQRRC4.js.map +0 -1
- package/dist/chunk-KCGXPP5V.js.map +0 -1
- package/dist/chunk-KZ73RL76.js.map +0 -1
- package/dist/chunk-LAKLF4PA.js +0 -141
- package/dist/chunk-LAKLF4PA.js.map +0 -1
- package/dist/chunk-MZ2G2XBA.js.map +0 -1
- package/dist/chunk-NEXLLTP4.js.map +0 -1
- package/dist/chunk-OAM4WAAM.js.map +0 -1
- package/dist/chunk-PEI6RANI.js.map +0 -1
- package/dist/chunk-RGALCTWO.js.map +0 -1
- package/dist/chunk-W6NFJXSA.js +0 -454
- package/dist/chunk-W6NFJXSA.js.map +0 -1
- package/dist/chunk-WSK7G5LE.js +0 -170
- package/dist/chunk-WSK7G5LE.js.map +0 -1
- package/dist/chunk-X4A66EWZ.js +0 -223
- package/dist/chunk-X4A66EWZ.js.map +0 -1
- package/dist/chunk-XXWH2JLC.js.map +0 -1
- package/dist/chunk-YFKJ7VZH.js +0 -268
- package/dist/chunk-YFKJ7VZH.js.map +0 -1
- package/dist/chunk-YJFGAFBD.js.map +0 -1
- package/dist/computer-viewer-FWEZISW4.js +0 -16
- package/dist/fleet-decision-row-GGCAT4E4.js.map +0 -1
- package/dist/hooks/use-environments.d.ts +0 -41
- package/dist/hooks/use-packs.d.ts +0 -32
- package/dist/platform-activity-row-BJHUHXAT.js.map +0 -1
- package/dist/queue-surface-implementation-BSKUWHRI.js.map +0 -1
- package/dist/timeline-annotation-selection-3L7LHGG2.js +0 -187
- package/dist/timeline-annotation-selection-3L7LHGG2.js.map +0 -1
- package/dist/timeline-annotations-dialog-U7EVLR75.js +0 -196
- package/dist/timeline-annotations-dialog-U7EVLR75.js.map +0 -1
- package/src/hooks/use-environments.ts +0 -182
- package/src/hooks/use-packs.ts +0 -157
- /package/dist/{browser-viewer-AEFHUYZK.js.map → browser-viewer-ZWR6MWJ7.js.map} +0 -0
- /package/dist/{computer-viewer-FWEZISW4.js.map → chat-interactive-block-BO2IWXVK.js.map} +0 -0
|
@@ -0,0 +1,1150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
sandboxAcceptsLiveIo
|
|
4
|
+
} from "./chunk-QV3DJVRZ.js";
|
|
5
|
+
import {
|
|
6
|
+
STREAM_KIND_PTY,
|
|
7
|
+
STREAM_ROLE_CLIENT,
|
|
8
|
+
decodeStreamFrame,
|
|
9
|
+
decodeStreamOpenAck,
|
|
10
|
+
encodeStreamFrame,
|
|
11
|
+
encodeStreamOpen
|
|
12
|
+
} from "./chunk-TNEZNMSN.js";
|
|
13
|
+
import {
|
|
14
|
+
sandboxTerminalPeers
|
|
15
|
+
} from "./chunk-5I4VRWBB.js";
|
|
16
|
+
import {
|
|
17
|
+
cn
|
|
18
|
+
} from "./chunk-TXS65BB2.js";
|
|
19
|
+
|
|
20
|
+
// src/hooks/use-terminal-stream.ts
|
|
21
|
+
import {
|
|
22
|
+
TTYD_SUBPROTOCOL,
|
|
23
|
+
terminalSocketUrl,
|
|
24
|
+
ttydAuthFrame,
|
|
25
|
+
ttydInputFrame,
|
|
26
|
+
ttydResizeFrame,
|
|
27
|
+
TtydServerCommand
|
|
28
|
+
} from "@opengeni/sdk";
|
|
29
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
30
|
+
|
|
31
|
+
// src/lib/terminal-input-readiness.ts
|
|
32
|
+
var TERMINAL_INPUT_READY_PREFERENCE = "opengeniInputReady";
|
|
33
|
+
var TERMINAL_INPUT_READY_PROTOCOL = "bash-readline-v1";
|
|
34
|
+
var PREFIX = "\x1B]777;opengeni-input;";
|
|
35
|
+
var FRAME = /^\x1b\]777;opengeni-input;(hello|ready);([a-f0-9]{32})\x07$/;
|
|
36
|
+
var MAX_FRAME = PREFIX.length + "hello;".length + 32 + 1;
|
|
37
|
+
function terminalInputReadyDecoder() {
|
|
38
|
+
let pending = "";
|
|
39
|
+
let received = false;
|
|
40
|
+
let identity = null;
|
|
41
|
+
return (data) => {
|
|
42
|
+
let input = pending + data;
|
|
43
|
+
let output = "";
|
|
44
|
+
let ready = false;
|
|
45
|
+
pending = "";
|
|
46
|
+
while (input.length > 0) {
|
|
47
|
+
const marker = input.indexOf(PREFIX);
|
|
48
|
+
if (marker < 0) break;
|
|
49
|
+
output += input.slice(0, marker);
|
|
50
|
+
input = input.slice(marker);
|
|
51
|
+
const end = input.indexOf("\x07", PREFIX.length);
|
|
52
|
+
if (end < 0 && input.length < MAX_FRAME) {
|
|
53
|
+
pending = input;
|
|
54
|
+
return { output, ready };
|
|
55
|
+
}
|
|
56
|
+
const match = end >= 0 && end < MAX_FRAME ? FRAME.exec(input.slice(0, end + 1)) : null;
|
|
57
|
+
if (!match) {
|
|
58
|
+
output += input[0];
|
|
59
|
+
input = input.slice(1);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
input = input.slice(end + 1);
|
|
63
|
+
if (match[1] === "hello" && identity === null) identity = match[2];
|
|
64
|
+
if (match[1] === "ready" && match[2] === identity && !received) {
|
|
65
|
+
ready = true;
|
|
66
|
+
received = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
let suffix = Math.min(input.length, PREFIX.length - 1);
|
|
70
|
+
while (suffix > 0 && !PREFIX.startsWith(input.slice(-suffix))) suffix--;
|
|
71
|
+
pending = suffix > 0 ? input.slice(-suffix) : "";
|
|
72
|
+
return { output: output + (suffix > 0 ? input.slice(0, -suffix) : input), ready };
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/hooks/use-terminal-stream.ts
|
|
77
|
+
var MAX_PENDING_TERMINAL_INPUT_CODE_UNITS = 64 * 1024;
|
|
78
|
+
var TERMINAL_CONNECT_EXPIRY_SKEW_MS = 5e3;
|
|
79
|
+
var TERMINAL_RECONNECT_INITIAL_MS = 100;
|
|
80
|
+
var TERMINAL_RECONNECT_MAX_MS = 3e3;
|
|
81
|
+
var RELAY_TAG_OPEN = 1;
|
|
82
|
+
var RELAY_TAG_OPEN_ACK = 2;
|
|
83
|
+
var RELAY_TAG_FRAME = 3;
|
|
84
|
+
function relayDatagram(tag, body) {
|
|
85
|
+
const bytes = new Uint8Array(body.length + 1);
|
|
86
|
+
bytes[0] = tag;
|
|
87
|
+
bytes.set(body, 1);
|
|
88
|
+
return bytes.buffer;
|
|
89
|
+
}
|
|
90
|
+
function relayChannelFromUrl(url) {
|
|
91
|
+
const endpoint = new URL(url);
|
|
92
|
+
const channel = {
|
|
93
|
+
channelId: endpoint.searchParams.get("channel") ?? "",
|
|
94
|
+
workspaceId: endpoint.searchParams.get("ws") ?? "",
|
|
95
|
+
agentId: endpoint.searchParams.get("agent") ?? "",
|
|
96
|
+
kind: STREAM_KIND_PTY,
|
|
97
|
+
port: Number(endpoint.searchParams.get("port") ?? "0")
|
|
98
|
+
};
|
|
99
|
+
if (!channel.channelId || !channel.workspaceId || !channel.agentId || !Number.isSafeInteger(channel.port) || channel.port <= 0) {
|
|
100
|
+
throw new Error("terminal relay endpoint is incomplete");
|
|
101
|
+
}
|
|
102
|
+
return channel;
|
|
103
|
+
}
|
|
104
|
+
function sendRelayInput(socket, channel, sequence, data) {
|
|
105
|
+
socket.send(
|
|
106
|
+
relayDatagram(
|
|
107
|
+
RELAY_TAG_FRAME,
|
|
108
|
+
encodeStreamFrame({
|
|
109
|
+
channelId: channel.channelId,
|
|
110
|
+
seq: sequence.toString(),
|
|
111
|
+
data: new TextEncoder().encode(data),
|
|
112
|
+
producedAtMs: String(Date.now())
|
|
113
|
+
})
|
|
114
|
+
)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function terminalStreamCredentialUsable(capability, nowMs = Date.now()) {
|
|
118
|
+
if (capability?.transport !== "pty-ws" && capability?.transport !== "relay-pty" || !capability.url) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
if (!capability.expiresAt) return true;
|
|
122
|
+
const expiresAt = Date.parse(capability.expiresAt);
|
|
123
|
+
return Number.isFinite(expiresAt) && expiresAt > nowMs + TERMINAL_CONNECT_EXPIRY_SKEW_MS;
|
|
124
|
+
}
|
|
125
|
+
function decodeFrame(data) {
|
|
126
|
+
if (typeof data === "string") {
|
|
127
|
+
return { command: data.charAt(0), payload: data.slice(1) };
|
|
128
|
+
}
|
|
129
|
+
const bytes = new Uint8Array(data);
|
|
130
|
+
const command = bytes.length > 0 ? String.fromCharCode(bytes[0]) : "";
|
|
131
|
+
const payload = bytes.length > 1 ? new TextDecoder().decode(bytes.subarray(1)) : "";
|
|
132
|
+
return { command, payload };
|
|
133
|
+
}
|
|
134
|
+
function closeSocket(socket) {
|
|
135
|
+
try {
|
|
136
|
+
socket?.close();
|
|
137
|
+
} catch {
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function useTerminalStream(options) {
|
|
141
|
+
const { capability, onOutput, onTitle, onReconnectNeeded, initialCols, initialRows } = options;
|
|
142
|
+
const [status, setStatus] = useState("closed");
|
|
143
|
+
const [inputReadiness, setInputReadiness] = useState("pending");
|
|
144
|
+
const [reconnectGeneration, setReconnectGeneration] = useState(0);
|
|
145
|
+
const wsRef = useRef(null);
|
|
146
|
+
const pendingInputRef = useRef("");
|
|
147
|
+
const socketFailedRef = useRef(false);
|
|
148
|
+
const socketAuthenticatedRef = useRef(false);
|
|
149
|
+
const legacyInputRef = useRef(null);
|
|
150
|
+
const manuallyDisconnectedRef = useRef(false);
|
|
151
|
+
const relayChannelRef = useRef(null);
|
|
152
|
+
const relayIdentityRef = useRef(null);
|
|
153
|
+
const relayInputSequenceRef = useRef(0n);
|
|
154
|
+
const relayOutputSequenceRef = useRef(0n);
|
|
155
|
+
const reconnectAttemptRef = useRef(0);
|
|
156
|
+
const credentialIdentityRef = useRef(null);
|
|
157
|
+
const refreshRequestedRef = useRef(false);
|
|
158
|
+
const intentionalCloseRef = useRef(/* @__PURE__ */ new WeakSet());
|
|
159
|
+
const sizeRef = useRef({
|
|
160
|
+
cols: initialCols ?? 80,
|
|
161
|
+
rows: initialRows ?? 24
|
|
162
|
+
});
|
|
163
|
+
const onOutputRef = useRef(onOutput);
|
|
164
|
+
const onTitleRef = useRef(onTitle);
|
|
165
|
+
const onReconnectNeededRef = useRef(onReconnectNeeded);
|
|
166
|
+
onOutputRef.current = onOutput;
|
|
167
|
+
onTitleRef.current = onTitle;
|
|
168
|
+
onReconnectNeededRef.current = onReconnectNeeded;
|
|
169
|
+
const transport = capability?.transport ?? null;
|
|
170
|
+
const url = capability?.url ?? null;
|
|
171
|
+
const token = capability?.token ?? null;
|
|
172
|
+
const expiresAt = capability?.expiresAt ?? null;
|
|
173
|
+
const transportRef = useRef(transport);
|
|
174
|
+
transportRef.current = transport;
|
|
175
|
+
const acquiringPty = transport === "sse-events" && capability?.ptyCapable === true && (capability.reason === "lease_cold" || capability.reason === "not_provisioned");
|
|
176
|
+
const acquiringPtyRef = useRef(acquiringPty);
|
|
177
|
+
acquiringPtyRef.current = acquiringPty;
|
|
178
|
+
useEffect(() => {
|
|
179
|
+
manuallyDisconnectedRef.current = false;
|
|
180
|
+
setInputReadiness("pending");
|
|
181
|
+
if (typeof window === "undefined" || typeof WebSocket === "undefined") return;
|
|
182
|
+
const relay = transport === "relay-pty";
|
|
183
|
+
if (transport !== "pty-ws" && !relay) {
|
|
184
|
+
pendingInputRef.current = "";
|
|
185
|
+
socketAuthenticatedRef.current = false;
|
|
186
|
+
relayIdentityRef.current = null;
|
|
187
|
+
relayInputSequenceRef.current = 0n;
|
|
188
|
+
relayOutputSequenceRef.current = 0n;
|
|
189
|
+
reconnectAttemptRef.current = 0;
|
|
190
|
+
credentialIdentityRef.current = null;
|
|
191
|
+
refreshRequestedRef.current = false;
|
|
192
|
+
socketFailedRef.current = false;
|
|
193
|
+
setStatus("closed");
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const credentialIdentity = `${transport}\0${url ?? ""}\0${token ?? ""}\0${expiresAt ?? ""}`;
|
|
197
|
+
if (credentialIdentityRef.current !== credentialIdentity) {
|
|
198
|
+
credentialIdentityRef.current = credentialIdentity;
|
|
199
|
+
reconnectAttemptRef.current = 0;
|
|
200
|
+
refreshRequestedRef.current = false;
|
|
201
|
+
}
|
|
202
|
+
socketFailedRef.current = false;
|
|
203
|
+
socketAuthenticatedRef.current = false;
|
|
204
|
+
if (!url) {
|
|
205
|
+
setStatus("closed");
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (!terminalStreamCredentialUsable({ transport, url, expiresAt })) {
|
|
209
|
+
setStatus("closed");
|
|
210
|
+
if (!refreshRequestedRef.current) {
|
|
211
|
+
refreshRequestedRef.current = true;
|
|
212
|
+
onReconnectNeededRef.current?.();
|
|
213
|
+
}
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
let disposed = false;
|
|
217
|
+
let reconnectTimer = null;
|
|
218
|
+
let socket;
|
|
219
|
+
let relayChannel = null;
|
|
220
|
+
let authSent = false;
|
|
221
|
+
let preferencesReceived = false;
|
|
222
|
+
let readinessNegotiated = false;
|
|
223
|
+
let sentSize = null;
|
|
224
|
+
const decodeReadyOutput = terminalInputReadyDecoder();
|
|
225
|
+
const relayOutputDecoder = new TextDecoder();
|
|
226
|
+
setStatus("connecting");
|
|
227
|
+
try {
|
|
228
|
+
if (relay) {
|
|
229
|
+
relayChannel = relayChannelFromUrl(url);
|
|
230
|
+
const relayIdentity = [
|
|
231
|
+
relayChannel.workspaceId,
|
|
232
|
+
relayChannel.agentId,
|
|
233
|
+
relayChannel.port,
|
|
234
|
+
relayChannel.channelId
|
|
235
|
+
].join("\0");
|
|
236
|
+
if (relayIdentityRef.current !== relayIdentity) {
|
|
237
|
+
relayIdentityRef.current = relayIdentity;
|
|
238
|
+
relayInputSequenceRef.current = 0n;
|
|
239
|
+
relayOutputSequenceRef.current = 0n;
|
|
240
|
+
}
|
|
241
|
+
relayChannelRef.current = relayChannel;
|
|
242
|
+
socket = new WebSocket(url);
|
|
243
|
+
} else {
|
|
244
|
+
socket = new WebSocket(terminalSocketUrl({ url }), TTYD_SUBPROTOCOL);
|
|
245
|
+
}
|
|
246
|
+
} catch {
|
|
247
|
+
socketFailedRef.current = true;
|
|
248
|
+
setStatus("error");
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
socket.binaryType = "arraybuffer";
|
|
252
|
+
wsRef.current = socket;
|
|
253
|
+
const requestFreshGrant = () => {
|
|
254
|
+
if (disposed || refreshRequestedRef.current || intentionalCloseRef.current.has(socket))
|
|
255
|
+
return;
|
|
256
|
+
refreshRequestedRef.current = true;
|
|
257
|
+
onReconnectNeededRef.current?.();
|
|
258
|
+
};
|
|
259
|
+
const scheduleTransportReconnect = () => {
|
|
260
|
+
if (disposed || reconnectTimer !== null || intentionalCloseRef.current.has(socket)) return;
|
|
261
|
+
if (refreshRequestedRef.current) return;
|
|
262
|
+
if (!terminalStreamCredentialUsable({ transport, url, expiresAt })) {
|
|
263
|
+
requestFreshGrant();
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const attempt = reconnectAttemptRef.current++;
|
|
267
|
+
const delay = Math.min(
|
|
268
|
+
TERMINAL_RECONNECT_INITIAL_MS * 2 ** Math.min(attempt, 8),
|
|
269
|
+
TERMINAL_RECONNECT_MAX_MS
|
|
270
|
+
);
|
|
271
|
+
setStatus("connecting");
|
|
272
|
+
reconnectTimer = setTimeout(() => {
|
|
273
|
+
reconnectTimer = null;
|
|
274
|
+
if (!disposed && !manuallyDisconnectedRef.current)
|
|
275
|
+
setReconnectGeneration((generation) => generation + 1);
|
|
276
|
+
}, delay);
|
|
277
|
+
};
|
|
278
|
+
const openTtydInput = (mode, discardPending = false) => {
|
|
279
|
+
if (disposed || wsRef.current !== socket || socket.readyState !== WebSocket.OPEN || !authSent || socketFailedRef.current)
|
|
280
|
+
return;
|
|
281
|
+
if (discardPending) pendingInputRef.current = "";
|
|
282
|
+
try {
|
|
283
|
+
if (sentSize?.cols !== sizeRef.current.cols || sentSize.rows !== sizeRef.current.rows) {
|
|
284
|
+
socket.send(ttydResizeFrame(sizeRef.current.cols, sizeRef.current.rows));
|
|
285
|
+
sentSize = { ...sizeRef.current };
|
|
286
|
+
}
|
|
287
|
+
if (pendingInputRef.current.length > 0) {
|
|
288
|
+
socket.send(ttydInputFrame(pendingInputRef.current));
|
|
289
|
+
pendingInputRef.current = "";
|
|
290
|
+
}
|
|
291
|
+
socketAuthenticatedRef.current = true;
|
|
292
|
+
legacyInputRef.current = null;
|
|
293
|
+
setInputReadiness(mode);
|
|
294
|
+
setStatus("open");
|
|
295
|
+
reconnectAttemptRef.current = 0;
|
|
296
|
+
refreshRequestedRef.current = false;
|
|
297
|
+
} catch {
|
|
298
|
+
socketAuthenticatedRef.current = false;
|
|
299
|
+
setInputReadiness("pending");
|
|
300
|
+
setStatus("connecting");
|
|
301
|
+
closeSocket(socket);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
socket.onopen = () => {
|
|
305
|
+
if (disposed || wsRef.current !== socket || socketFailedRef.current) return;
|
|
306
|
+
if (relay && relayChannel) {
|
|
307
|
+
try {
|
|
308
|
+
socket.send(
|
|
309
|
+
relayDatagram(
|
|
310
|
+
RELAY_TAG_OPEN,
|
|
311
|
+
encodeStreamOpen({
|
|
312
|
+
channel: relayChannel,
|
|
313
|
+
token: token ?? "",
|
|
314
|
+
role: STREAM_ROLE_CLIENT,
|
|
315
|
+
resumeFromSeq: relayOutputSequenceRef.current.toString()
|
|
316
|
+
})
|
|
317
|
+
)
|
|
318
|
+
);
|
|
319
|
+
} catch {
|
|
320
|
+
socketFailedRef.current = false;
|
|
321
|
+
setStatus("connecting");
|
|
322
|
+
closeSocket(socket);
|
|
323
|
+
}
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
try {
|
|
327
|
+
socket.send(ttydAuthFrame({ columns: sizeRef.current.cols, rows: sizeRef.current.rows }));
|
|
328
|
+
socket.send(ttydResizeFrame(sizeRef.current.cols, sizeRef.current.rows));
|
|
329
|
+
sentSize = { ...sizeRef.current };
|
|
330
|
+
authSent = true;
|
|
331
|
+
} catch {
|
|
332
|
+
socketFailedRef.current = false;
|
|
333
|
+
setStatus("connecting");
|
|
334
|
+
closeSocket(socket);
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
socket.onmessage = (ev) => {
|
|
339
|
+
if (disposed || wsRef.current !== socket || socketFailedRef.current) return;
|
|
340
|
+
if (relay) {
|
|
341
|
+
if (!(ev.data instanceof ArrayBuffer) || !relayChannel) return;
|
|
342
|
+
const bytes = new Uint8Array(ev.data);
|
|
343
|
+
if (bytes.length < 1) return;
|
|
344
|
+
const tag = bytes[0];
|
|
345
|
+
const body = bytes.subarray(1);
|
|
346
|
+
if (tag === RELAY_TAG_OPEN_ACK) {
|
|
347
|
+
try {
|
|
348
|
+
const ack = decodeStreamOpenAck(body);
|
|
349
|
+
if (!ack.accepted) throw new Error(ack.error?.message ?? "terminal relay rejected");
|
|
350
|
+
reconnectAttemptRef.current = 0;
|
|
351
|
+
refreshRequestedRef.current = false;
|
|
352
|
+
socketAuthenticatedRef.current = true;
|
|
353
|
+
if (pendingInputRef.current.length > 0) {
|
|
354
|
+
sendRelayInput(
|
|
355
|
+
socket,
|
|
356
|
+
relayChannel,
|
|
357
|
+
relayInputSequenceRef.current++,
|
|
358
|
+
pendingInputRef.current
|
|
359
|
+
);
|
|
360
|
+
pendingInputRef.current = "";
|
|
361
|
+
}
|
|
362
|
+
setStatus("open");
|
|
363
|
+
setInputReadiness("ready");
|
|
364
|
+
} catch {
|
|
365
|
+
socketFailedRef.current = true;
|
|
366
|
+
setStatus("error");
|
|
367
|
+
requestFreshGrant();
|
|
368
|
+
closeSocket(socket);
|
|
369
|
+
}
|
|
370
|
+
} else if (tag === RELAY_TAG_FRAME && socketAuthenticatedRef.current) {
|
|
371
|
+
try {
|
|
372
|
+
const frame = decodeStreamFrame(body);
|
|
373
|
+
const sequence = BigInt(frame.seq);
|
|
374
|
+
if (sequence < relayOutputSequenceRef.current) return;
|
|
375
|
+
relayOutputSequenceRef.current = sequence + 1n;
|
|
376
|
+
if (frame.data.length > 0) {
|
|
377
|
+
onOutputRef.current?.(relayOutputDecoder.decode(frame.data, { stream: true }));
|
|
378
|
+
}
|
|
379
|
+
} catch {
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
const { command, payload } = decodeFrame(ev.data);
|
|
385
|
+
switch (command) {
|
|
386
|
+
case TtydServerCommand.OUTPUT:
|
|
387
|
+
if (readinessNegotiated) {
|
|
388
|
+
const decoded = decodeReadyOutput(payload);
|
|
389
|
+
if (decoded.output) onOutputRef.current?.(decoded.output);
|
|
390
|
+
if (decoded.ready && !socketAuthenticatedRef.current) openTtydInput("ready");
|
|
391
|
+
} else {
|
|
392
|
+
onOutputRef.current?.(payload);
|
|
393
|
+
}
|
|
394
|
+
break;
|
|
395
|
+
case TtydServerCommand.SET_WINDOW_TITLE:
|
|
396
|
+
onTitleRef.current?.(payload);
|
|
397
|
+
break;
|
|
398
|
+
case TtydServerCommand.SET_PREFERENCES:
|
|
399
|
+
if (!authSent || preferencesReceived || socketAuthenticatedRef.current) break;
|
|
400
|
+
preferencesReceived = true;
|
|
401
|
+
try {
|
|
402
|
+
const preferences = JSON.parse(payload);
|
|
403
|
+
if (!preferences || typeof preferences !== "object" || Array.isArray(preferences)) {
|
|
404
|
+
throw new Error("invalid ttyd preferences");
|
|
405
|
+
}
|
|
406
|
+
const protocol = preferences[TERMINAL_INPUT_READY_PREFERENCE];
|
|
407
|
+
if (protocol === void 0) {
|
|
408
|
+
openTtydInput("legacy");
|
|
409
|
+
} else {
|
|
410
|
+
readinessNegotiated = protocol === TERMINAL_INPUT_READY_PROTOCOL;
|
|
411
|
+
setInputReadiness("waiting");
|
|
412
|
+
legacyInputRef.current = () => openTtydInput("legacy", true);
|
|
413
|
+
}
|
|
414
|
+
} catch {
|
|
415
|
+
setInputReadiness("waiting");
|
|
416
|
+
legacyInputRef.current = () => openTtydInput("legacy", true);
|
|
417
|
+
}
|
|
418
|
+
break;
|
|
419
|
+
default:
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
socket.onerror = () => {
|
|
424
|
+
if (!disposed && wsRef.current === socket && !intentionalCloseRef.current.has(socket)) {
|
|
425
|
+
socketFailedRef.current = false;
|
|
426
|
+
setStatus("connecting");
|
|
427
|
+
closeSocket(socket);
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
socket.onclose = () => {
|
|
431
|
+
if (disposed || wsRef.current !== socket) return;
|
|
432
|
+
if (wsRef.current === socket) wsRef.current = null;
|
|
433
|
+
socketAuthenticatedRef.current = false;
|
|
434
|
+
legacyInputRef.current = null;
|
|
435
|
+
setInputReadiness("pending");
|
|
436
|
+
if (!disposed) {
|
|
437
|
+
if (socketFailedRef.current) setStatus("error");
|
|
438
|
+
else scheduleTransportReconnect();
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
return () => {
|
|
442
|
+
disposed = true;
|
|
443
|
+
wsRef.current = null;
|
|
444
|
+
socketAuthenticatedRef.current = false;
|
|
445
|
+
legacyInputRef.current = null;
|
|
446
|
+
relayChannelRef.current = null;
|
|
447
|
+
if (reconnectTimer !== null) clearTimeout(reconnectTimer);
|
|
448
|
+
socket.onopen = null;
|
|
449
|
+
socket.onmessage = null;
|
|
450
|
+
socket.onerror = null;
|
|
451
|
+
socket.onclose = null;
|
|
452
|
+
closeSocket(socket);
|
|
453
|
+
};
|
|
454
|
+
}, [transport, url, token, expiresAt, acquiringPty, reconnectGeneration]);
|
|
455
|
+
const write = useCallback((data) => {
|
|
456
|
+
const currentTransport = transportRef.current;
|
|
457
|
+
const ws = wsRef.current;
|
|
458
|
+
if (ws && ws.readyState === WebSocket.OPEN && socketAuthenticatedRef.current) {
|
|
459
|
+
try {
|
|
460
|
+
const relayChannel = relayChannelRef.current;
|
|
461
|
+
if (currentTransport === "relay-pty" && relayChannel) {
|
|
462
|
+
sendRelayInput(ws, relayChannel, relayInputSequenceRef.current++, data);
|
|
463
|
+
} else {
|
|
464
|
+
ws.send(ttydInputFrame(data));
|
|
465
|
+
}
|
|
466
|
+
} catch {
|
|
467
|
+
if (currentTransport === "pty-ws") {
|
|
468
|
+
const nextSize = pendingInputRef.current.length + data.length;
|
|
469
|
+
if (nextSize > MAX_PENDING_TERMINAL_INPUT_CODE_UNITS) {
|
|
470
|
+
pendingInputRef.current = "";
|
|
471
|
+
socketFailedRef.current = true;
|
|
472
|
+
socketAuthenticatedRef.current = false;
|
|
473
|
+
setStatus("error");
|
|
474
|
+
closeSocket(ws);
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
pendingInputRef.current += data;
|
|
478
|
+
}
|
|
479
|
+
socketAuthenticatedRef.current = false;
|
|
480
|
+
socketFailedRef.current = false;
|
|
481
|
+
setStatus("connecting");
|
|
482
|
+
closeSocket(ws);
|
|
483
|
+
}
|
|
484
|
+
} else if ((currentTransport === "pty-ws" || currentTransport === "relay-pty" || acquiringPtyRef.current) && !socketFailedRef.current) {
|
|
485
|
+
const nextSize = pendingInputRef.current.length + data.length;
|
|
486
|
+
if (nextSize > MAX_PENDING_TERMINAL_INPUT_CODE_UNITS) {
|
|
487
|
+
pendingInputRef.current = "";
|
|
488
|
+
socketFailedRef.current = true;
|
|
489
|
+
setStatus("error");
|
|
490
|
+
closeSocket(ws);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
pendingInputRef.current += data;
|
|
494
|
+
}
|
|
495
|
+
}, []);
|
|
496
|
+
const resize = useCallback((cols, rows) => {
|
|
497
|
+
if (cols <= 0 || rows <= 0) return;
|
|
498
|
+
sizeRef.current = { cols, rows };
|
|
499
|
+
const ws = wsRef.current;
|
|
500
|
+
if (ws && ws.readyState === WebSocket.OPEN && socketAuthenticatedRef.current) {
|
|
501
|
+
try {
|
|
502
|
+
if (transportRef.current === "pty-ws") ws.send(ttydResizeFrame(cols, rows));
|
|
503
|
+
} catch {
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}, []);
|
|
507
|
+
const disconnect = useCallback(() => {
|
|
508
|
+
manuallyDisconnectedRef.current = true;
|
|
509
|
+
const ws = wsRef.current;
|
|
510
|
+
wsRef.current = null;
|
|
511
|
+
pendingInputRef.current = "";
|
|
512
|
+
socketFailedRef.current = false;
|
|
513
|
+
socketAuthenticatedRef.current = false;
|
|
514
|
+
legacyInputRef.current = null;
|
|
515
|
+
relayChannelRef.current = null;
|
|
516
|
+
setStatus("closed");
|
|
517
|
+
setInputReadiness("pending");
|
|
518
|
+
if (ws) intentionalCloseRef.current.add(ws);
|
|
519
|
+
closeSocket(ws);
|
|
520
|
+
}, []);
|
|
521
|
+
const useLegacyInput = useCallback(() => legacyInputRef.current?.(), []);
|
|
522
|
+
return useMemo(() => {
|
|
523
|
+
return {
|
|
524
|
+
connected: status === "open",
|
|
525
|
+
status,
|
|
526
|
+
inputReadiness,
|
|
527
|
+
useLegacyInput,
|
|
528
|
+
write,
|
|
529
|
+
resize,
|
|
530
|
+
disconnect
|
|
531
|
+
};
|
|
532
|
+
}, [status, inputReadiness, useLegacyInput, write, resize, disconnect]);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// src/lib/xterm-theme.ts
|
|
536
|
+
var DARK_ANSI = {
|
|
537
|
+
black: "oklch(0.3 0 0)",
|
|
538
|
+
red: "oklch(0.68 0.17 22)",
|
|
539
|
+
green: "oklch(0.75 0.13 155)",
|
|
540
|
+
yellow: "oklch(0.8 0.11 80)",
|
|
541
|
+
blue: "oklch(0.7 0.14 255)",
|
|
542
|
+
magenta: "oklch(0.72 0.13 305)",
|
|
543
|
+
cyan: "oklch(0.75 0.1 210)",
|
|
544
|
+
white: "oklch(0.8 0 0)",
|
|
545
|
+
brightBlack: "oklch(0.45 0 0)",
|
|
546
|
+
brightRed: "oklch(0.76 0.17 22)",
|
|
547
|
+
brightGreen: "oklch(0.82 0.14 155)",
|
|
548
|
+
brightYellow: "oklch(0.86 0.12 85)",
|
|
549
|
+
brightBlue: "oklch(0.78 0.13 255)",
|
|
550
|
+
brightMagenta: "oklch(0.8 0.13 305)",
|
|
551
|
+
brightCyan: "oklch(0.83 0.1 200)",
|
|
552
|
+
brightWhite: "oklch(0.97 0 0)",
|
|
553
|
+
selectionBackground: "oklch(0.8 0 0 / 0.3)",
|
|
554
|
+
selectionForeground: "oklch(0.985 0 0)",
|
|
555
|
+
selectionInactiveBackground: "oklch(0.72 0 0 / 0.2)"
|
|
556
|
+
};
|
|
557
|
+
var LIGHT_ANSI = {
|
|
558
|
+
black: "oklch(0.35 0 0)",
|
|
559
|
+
red: "oklch(0.52 0.19 22)",
|
|
560
|
+
green: "oklch(0.5 0.13 155)",
|
|
561
|
+
yellow: "oklch(0.56 0.13 80)",
|
|
562
|
+
blue: "oklch(0.52 0.18 255)",
|
|
563
|
+
magenta: "oklch(0.52 0.16 305)",
|
|
564
|
+
cyan: "oklch(0.52 0.1 210)",
|
|
565
|
+
white: "oklch(0.7 0 0)",
|
|
566
|
+
brightBlack: "oklch(0.5 0 0)",
|
|
567
|
+
brightRed: "oklch(0.55 0.2 22)",
|
|
568
|
+
brightGreen: "oklch(0.54 0.14 155)",
|
|
569
|
+
brightYellow: "oklch(0.6 0.14 80)",
|
|
570
|
+
brightBlue: "oklch(0.48 0.19 255)",
|
|
571
|
+
brightMagenta: "oklch(0.54 0.17 305)",
|
|
572
|
+
brightCyan: "oklch(0.54 0.11 210)",
|
|
573
|
+
brightWhite: "oklch(0.3 0 0)",
|
|
574
|
+
selectionBackground: "oklch(0.45 0 0 / 0.2)",
|
|
575
|
+
selectionForeground: "oklch(0.21 0 0)",
|
|
576
|
+
selectionInactiveBackground: "oklch(0.6 0 0 / 0.14)"
|
|
577
|
+
};
|
|
578
|
+
function ogAnsiPalette(mode) {
|
|
579
|
+
return mode === "light" ? LIGHT_ANSI : DARK_ANSI;
|
|
580
|
+
}
|
|
581
|
+
function buildXtermTheme(read, mode) {
|
|
582
|
+
const ansi = ogAnsiPalette(mode);
|
|
583
|
+
const bgFallback = mode === "light" ? "#ffffff" : "#202020";
|
|
584
|
+
const fgFallback = mode === "light" ? "#242424" : "#e6e6e6";
|
|
585
|
+
const bg = read("--og-color-bg") ?? bgFallback;
|
|
586
|
+
const fg = read("--og-color-fg") ?? fgFallback;
|
|
587
|
+
const accent = read("--og-color-accent") ?? ansi.brightBlue;
|
|
588
|
+
return {
|
|
589
|
+
// Match the dock surface the terminal paints on (`--og-color-bg`).
|
|
590
|
+
background: bg,
|
|
591
|
+
foreground: fg,
|
|
592
|
+
cursor: accent,
|
|
593
|
+
cursorAccent: bg,
|
|
594
|
+
selectionBackground: ansi.selectionBackground,
|
|
595
|
+
selectionForeground: ansi.selectionForeground,
|
|
596
|
+
selectionInactiveBackground: ansi.selectionInactiveBackground,
|
|
597
|
+
black: ansi.black,
|
|
598
|
+
red: ansi.red,
|
|
599
|
+
green: ansi.green,
|
|
600
|
+
yellow: ansi.yellow,
|
|
601
|
+
blue: ansi.blue,
|
|
602
|
+
magenta: ansi.magenta,
|
|
603
|
+
cyan: ansi.cyan,
|
|
604
|
+
white: ansi.white,
|
|
605
|
+
brightBlack: ansi.brightBlack,
|
|
606
|
+
brightRed: ansi.brightRed,
|
|
607
|
+
brightGreen: ansi.brightGreen,
|
|
608
|
+
brightYellow: ansi.brightYellow,
|
|
609
|
+
brightBlue: ansi.brightBlue,
|
|
610
|
+
brightMagenta: ansi.brightMagenta,
|
|
611
|
+
brightCyan: ansi.brightCyan,
|
|
612
|
+
brightWhite: ansi.brightWhite
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
function detectMode(el, style) {
|
|
616
|
+
const closest = el.closest?.bind(el);
|
|
617
|
+
if (closest) {
|
|
618
|
+
if (closest('[data-og-theme="light"]') || closest(".og-light")) return "light";
|
|
619
|
+
const explicit = closest("[data-og-theme]");
|
|
620
|
+
if (explicit) return explicit.getAttribute("data-og-theme") === "light" ? "light" : "dark";
|
|
621
|
+
}
|
|
622
|
+
const scheme = (style.getPropertyValue("color-scheme").trim() || style.colorScheme || "").toLowerCase();
|
|
623
|
+
if (scheme.includes("light") && !scheme.includes("dark")) return "light";
|
|
624
|
+
return "dark";
|
|
625
|
+
}
|
|
626
|
+
function xtermThemeFromTokens(root) {
|
|
627
|
+
if (typeof window === "undefined" || typeof getComputedStyle === "undefined") return void 0;
|
|
628
|
+
const el = root ?? (typeof document !== "undefined" ? document.querySelector("[data-og-theme]") ?? document.documentElement : null);
|
|
629
|
+
if (!el) return void 0;
|
|
630
|
+
const style = getComputedStyle(el);
|
|
631
|
+
const read = (name) => {
|
|
632
|
+
const value = style.getPropertyValue(name).trim();
|
|
633
|
+
return value || void 0;
|
|
634
|
+
};
|
|
635
|
+
return buildXtermTheme(read, detectMode(el, style));
|
|
636
|
+
}
|
|
637
|
+
var FALLBACK_MONO = "ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace";
|
|
638
|
+
function resolveTerminalFontFromReader(read, overrides) {
|
|
639
|
+
const rawFamily = overrides?.fontFamily ?? read("--og-font-mono");
|
|
640
|
+
const fontFamily = rawFamily && rawFamily.trim() && !rawFamily.includes("var(") ? rawFamily.trim() : FALLBACK_MONO;
|
|
641
|
+
let fontSize = overrides?.fontSize;
|
|
642
|
+
if (fontSize == null) {
|
|
643
|
+
const raw = read("--og-code-font-size");
|
|
644
|
+
const parsed = raw ? Number.parseFloat(raw) : Number.NaN;
|
|
645
|
+
fontSize = Number.isFinite(parsed) && parsed > 0 ? parsed : 13;
|
|
646
|
+
}
|
|
647
|
+
return { fontFamily, fontSize, lineHeight: 1.3 };
|
|
648
|
+
}
|
|
649
|
+
function resolveTerminalFont(el, overrides) {
|
|
650
|
+
const style = getComputedStyle(el);
|
|
651
|
+
const read = (name) => {
|
|
652
|
+
const value = style.getPropertyValue(name).trim();
|
|
653
|
+
return value || void 0;
|
|
654
|
+
};
|
|
655
|
+
return resolveTerminalFontFromReader(read, overrides);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
// src/components/sandbox-terminal.tsx
|
|
659
|
+
import {
|
|
660
|
+
useEffect as useEffect2,
|
|
661
|
+
useLayoutEffect,
|
|
662
|
+
useRef as useRef2,
|
|
663
|
+
useState as useState2,
|
|
664
|
+
useSyncExternalStore
|
|
665
|
+
} from "react";
|
|
666
|
+
|
|
667
|
+
// src/lib/terminal-capability.ts
|
|
668
|
+
function terminalCanAcquirePty(cell) {
|
|
669
|
+
if (!cell?.ptyCapable) return false;
|
|
670
|
+
if (cell.transport === "pty-ws" || cell.transport === "relay-pty") return true;
|
|
671
|
+
return cell.reason === "lease_cold" || cell.reason === "not_provisioned";
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
// src/lib/xterm-renderer.ts
|
|
675
|
+
var ORDER = ["webgl", "canvas", "dom"];
|
|
676
|
+
function nextRendererTier(tier) {
|
|
677
|
+
const i = ORDER.indexOf(tier);
|
|
678
|
+
return i >= 0 && i < ORDER.length - 1 ? ORDER[i + 1] : null;
|
|
679
|
+
}
|
|
680
|
+
async function attachRenderer(prefer, loaders, onTier) {
|
|
681
|
+
const start = Math.max(0, ORDER.indexOf(prefer));
|
|
682
|
+
for (let i = start; i < ORDER.length; i++) {
|
|
683
|
+
const tier = ORDER[i];
|
|
684
|
+
if (tier === "dom") break;
|
|
685
|
+
const loader = tier === "webgl" ? loaders.webgl : loaders.canvas;
|
|
686
|
+
if (!loader) continue;
|
|
687
|
+
try {
|
|
688
|
+
const downgrade = nextRendererTier(tier) ?? "dom";
|
|
689
|
+
await loader(() => {
|
|
690
|
+
void attachRenderer(downgrade, loaders, onTier);
|
|
691
|
+
});
|
|
692
|
+
onTier(tier);
|
|
693
|
+
return tier;
|
|
694
|
+
} catch {
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
onTier("dom");
|
|
698
|
+
return "dom";
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
// src/components/sandbox-terminal.tsx
|
|
702
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
703
|
+
function terminalSurfaceState(input) {
|
|
704
|
+
if (!input.ready) return "loading";
|
|
705
|
+
if (input.acceptsInput) return "interactive";
|
|
706
|
+
if (input.inputPending) return "connecting";
|
|
707
|
+
if (input.ptyStatus === "connecting") return "connecting";
|
|
708
|
+
if (input.ptyStatus === "error") return "error";
|
|
709
|
+
if (input.booting) return "waking";
|
|
710
|
+
return "output-only";
|
|
711
|
+
}
|
|
712
|
+
function subscribeTerminalInput(term, sink, enabled) {
|
|
713
|
+
if (!enabled || !term || !sink) return null;
|
|
714
|
+
return term.onData(sink);
|
|
715
|
+
}
|
|
716
|
+
function clearTerminalBootStatus(term) {
|
|
717
|
+
term.write("\r\x1B[2K\x1B[2J\x1B[H");
|
|
718
|
+
}
|
|
719
|
+
function forcedRendererFailures() {
|
|
720
|
+
const raw = typeof globalThis !== "undefined" ? globalThis.__OG_FORCE_RENDERER_FAIL__ : void 0;
|
|
721
|
+
const set = /* @__PURE__ */ new Set();
|
|
722
|
+
if (typeof raw === "string") {
|
|
723
|
+
for (const tier of raw.split(/[\s,]+/)) {
|
|
724
|
+
if (tier === "webgl" || tier === "canvas") set.add(tier);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
return set;
|
|
728
|
+
}
|
|
729
|
+
function SandboxTerminal({
|
|
730
|
+
result,
|
|
731
|
+
terminalCapability,
|
|
732
|
+
theme,
|
|
733
|
+
fontFamily,
|
|
734
|
+
fontSize,
|
|
735
|
+
liveness,
|
|
736
|
+
readOnly,
|
|
737
|
+
placeholder,
|
|
738
|
+
showHeader,
|
|
739
|
+
shell,
|
|
740
|
+
onActivate,
|
|
741
|
+
onReconnectNeeded,
|
|
742
|
+
className
|
|
743
|
+
}) {
|
|
744
|
+
const containerRef = useRef2(null);
|
|
745
|
+
const termRef = useRef2(null);
|
|
746
|
+
const fitRef = useRef2(null);
|
|
747
|
+
const rendererRef = useRef2(null);
|
|
748
|
+
const writtenRef = useRef2(/* @__PURE__ */ new Set());
|
|
749
|
+
const wroteFirehoseRef = useRef2(false);
|
|
750
|
+
const bootActiveRef = useRef2(false);
|
|
751
|
+
const [ready, setReady] = useState2(false);
|
|
752
|
+
const [loadError, setLoadError] = useState2(null);
|
|
753
|
+
const peerRevision = useSyncExternalStore(
|
|
754
|
+
sandboxTerminalPeers.subscribe,
|
|
755
|
+
sandboxTerminalPeers.revision,
|
|
756
|
+
sandboxTerminalPeers.revision
|
|
757
|
+
);
|
|
758
|
+
const [inputReady, setInputReady] = useState2(false);
|
|
759
|
+
const [activated, setActivated] = useState2(false);
|
|
760
|
+
const ptyDescriptor = terminalCapability?.transport === "pty-ws" || terminalCapability?.transport === "relay-pty";
|
|
761
|
+
const ptyAttachable = terminalCanAcquirePty(terminalCapability);
|
|
762
|
+
const {
|
|
763
|
+
status: ptyStatus,
|
|
764
|
+
write: ptyWrite,
|
|
765
|
+
resize: resizePty,
|
|
766
|
+
connected: ptyConnected,
|
|
767
|
+
inputReadiness,
|
|
768
|
+
useLegacyInput
|
|
769
|
+
} = useTerminalStream({
|
|
770
|
+
// Connect only after xterm exists. This makes the renderer the sole output
|
|
771
|
+
// owner from the first websocket frame and removes an otherwise unbounded
|
|
772
|
+
// pre-mount output queue during large command bursts.
|
|
773
|
+
capability: ptyAttachable && ready ? {
|
|
774
|
+
transport: terminalCapability.transport,
|
|
775
|
+
url: ptyDescriptor ? terminalCapability.url : null,
|
|
776
|
+
token: ptyDescriptor ? terminalCapability.token : null,
|
|
777
|
+
expiresAt: ptyDescriptor ? terminalCapability.expiresAt : null,
|
|
778
|
+
ptyCapable: terminalCapability.ptyCapable,
|
|
779
|
+
reason: terminalCapability.reason
|
|
780
|
+
} : null,
|
|
781
|
+
onOutput: (data) => {
|
|
782
|
+
termRef.current?.write(data);
|
|
783
|
+
},
|
|
784
|
+
onReconnectNeeded
|
|
785
|
+
});
|
|
786
|
+
const ptyMode = ptyDescriptor;
|
|
787
|
+
const ptyCapturesInput = ptyAttachable && ptyStatus !== "error";
|
|
788
|
+
const interactive = !readOnly && (ptyAttachable ? ptyCapturesInput : result.write !== null);
|
|
789
|
+
const acceptsInput = inputReady && (!ptyAttachable || ptyConnected);
|
|
790
|
+
const inputPending = inputReady && ptyAttachable && !ptyConnected && activated;
|
|
791
|
+
let terminalModeLabel;
|
|
792
|
+
if (readOnly) terminalModeLabel = "read-only";
|
|
793
|
+
else if (!ptyAttachable) terminalModeLabel = acceptsInput ? null : "output only";
|
|
794
|
+
else if (ptyStatus === "error") terminalModeLabel = "connection error";
|
|
795
|
+
else if (acceptsInput) terminalModeLabel = inputReadiness === "legacy" ? "legacy input" : null;
|
|
796
|
+
else terminalModeLabel = activated ? "connecting" : "connect on input";
|
|
797
|
+
const warm = sandboxAcceptsLiveIo(liveness);
|
|
798
|
+
const booting = activated && !ptyMode && !warm && liveness !== null && liveness !== void 0 && result.chunks.length === 0;
|
|
799
|
+
const surfaceState = terminalSurfaceState({
|
|
800
|
+
ready,
|
|
801
|
+
acceptsInput,
|
|
802
|
+
inputPending,
|
|
803
|
+
ptyStatus,
|
|
804
|
+
booting
|
|
805
|
+
});
|
|
806
|
+
function handleActivate() {
|
|
807
|
+
const term = termRef.current;
|
|
808
|
+
if (term && !readOnly && (ptyAttachable || result.write !== null)) {
|
|
809
|
+
term.options.disableStdin = false;
|
|
810
|
+
term.options.cursorBlink = true;
|
|
811
|
+
}
|
|
812
|
+
term?.focus();
|
|
813
|
+
if (!activated) setActivated(true);
|
|
814
|
+
onActivate?.();
|
|
815
|
+
}
|
|
816
|
+
useEffect2(() => {
|
|
817
|
+
if (typeof window === "undefined") return;
|
|
818
|
+
const el = containerRef.current;
|
|
819
|
+
if (!el) return;
|
|
820
|
+
let disposed = false;
|
|
821
|
+
const waitForSize = (node) => new Promise((resolve) => {
|
|
822
|
+
if (node.clientWidth > 0 && node.clientHeight > 0) return resolve();
|
|
823
|
+
const ro = new ResizeObserver(() => {
|
|
824
|
+
if (node.clientWidth > 0 && node.clientHeight > 0) {
|
|
825
|
+
ro.disconnect();
|
|
826
|
+
resolve();
|
|
827
|
+
}
|
|
828
|
+
});
|
|
829
|
+
ro.observe(node);
|
|
830
|
+
setTimeout(() => {
|
|
831
|
+
ro.disconnect();
|
|
832
|
+
resolve();
|
|
833
|
+
}, 1e3);
|
|
834
|
+
});
|
|
835
|
+
ensureXtermBaseCss();
|
|
836
|
+
setLoadError(null);
|
|
837
|
+
void (async () => {
|
|
838
|
+
const { Terminal, FitAddon, WebLinksAddon, loadWebgl } = await sandboxTerminalPeers.load();
|
|
839
|
+
if (disposed) return;
|
|
840
|
+
await waitForSize(el);
|
|
841
|
+
if (disposed) return;
|
|
842
|
+
const font = resolveTerminalFont(el, { fontFamily, fontSize });
|
|
843
|
+
const initialTheme = theme ?? xtermThemeFromTokens(el);
|
|
844
|
+
const term = new Terminal({
|
|
845
|
+
convertEol: true,
|
|
846
|
+
disableStdin: !interactive,
|
|
847
|
+
cursorBlink: interactive,
|
|
848
|
+
fontFamily: font.fontFamily,
|
|
849
|
+
fontSize: font.fontSize,
|
|
850
|
+
lineHeight: font.lineHeight,
|
|
851
|
+
...initialTheme ? { theme: initialTheme } : {}
|
|
852
|
+
});
|
|
853
|
+
const fit = new FitAddon();
|
|
854
|
+
term.loadAddon(fit);
|
|
855
|
+
term.loadAddon(
|
|
856
|
+
new WebLinksAddon(
|
|
857
|
+
(_e, uri) => window.open(uri, "_blank", "noopener,noreferrer")
|
|
858
|
+
)
|
|
859
|
+
);
|
|
860
|
+
term.open(el);
|
|
861
|
+
termRef.current = term;
|
|
862
|
+
fitRef.current = fit;
|
|
863
|
+
const failSet = forcedRendererFailures();
|
|
864
|
+
const loaders = {
|
|
865
|
+
webgl: async (onLoss) => {
|
|
866
|
+
if (disposed) throw new Error("Terminal was disposed");
|
|
867
|
+
if (failSet.has("webgl")) throw new Error("forced webgl failure");
|
|
868
|
+
if (!loadWebgl) throw new Error("WebGL terminal renderer is not enabled");
|
|
869
|
+
const { WebglAddon } = await loadWebgl();
|
|
870
|
+
if (disposed) throw new Error("Terminal was disposed");
|
|
871
|
+
const addon = new WebglAddon();
|
|
872
|
+
addon.onContextLoss?.(() => {
|
|
873
|
+
if (disposed) return;
|
|
874
|
+
try {
|
|
875
|
+
addon.dispose();
|
|
876
|
+
} catch {
|
|
877
|
+
}
|
|
878
|
+
onLoss();
|
|
879
|
+
});
|
|
880
|
+
term.loadAddon(addon);
|
|
881
|
+
return addon;
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
await attachRenderer("webgl", loaders, (tier) => {
|
|
885
|
+
if (disposed) return;
|
|
886
|
+
rendererRef.current = tier;
|
|
887
|
+
el.setAttribute("data-og-term-renderer", tier);
|
|
888
|
+
});
|
|
889
|
+
if (disposed) return;
|
|
890
|
+
const settle = () => {
|
|
891
|
+
try {
|
|
892
|
+
fit.fit();
|
|
893
|
+
} catch {
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
settle();
|
|
897
|
+
requestAnimationFrame(() => {
|
|
898
|
+
if (disposed) return;
|
|
899
|
+
settle();
|
|
900
|
+
el.setAttribute("data-og-term-ready", "true");
|
|
901
|
+
if (typeof globalThis.__OG_TERMINAL_DEBUG__ === "function") {
|
|
902
|
+
globalThis.__OG_TERMINAL_DEBUG__({
|
|
903
|
+
renderer: rendererRef.current,
|
|
904
|
+
fontFamily: term.options.fontFamily,
|
|
905
|
+
fontSize: term.options.fontSize,
|
|
906
|
+
hasVarInFont: String(term.options.fontFamily ?? "").includes("var("),
|
|
907
|
+
theme: term.options.theme,
|
|
908
|
+
term
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
setReady(true);
|
|
912
|
+
});
|
|
913
|
+
})().catch((cause) => {
|
|
914
|
+
if (!disposed) setLoadError(cause instanceof Error ? cause : new Error(String(cause)));
|
|
915
|
+
});
|
|
916
|
+
return () => {
|
|
917
|
+
disposed = true;
|
|
918
|
+
termRef.current?.dispose();
|
|
919
|
+
termRef.current = null;
|
|
920
|
+
fitRef.current = null;
|
|
921
|
+
rendererRef.current = null;
|
|
922
|
+
writtenRef.current = /* @__PURE__ */ new Set();
|
|
923
|
+
wroteFirehoseRef.current = false;
|
|
924
|
+
bootActiveRef.current = false;
|
|
925
|
+
setReady(false);
|
|
926
|
+
};
|
|
927
|
+
}, [peerRevision]);
|
|
928
|
+
useLayoutEffect(() => {
|
|
929
|
+
const term = termRef.current;
|
|
930
|
+
if (!ready || !term) return;
|
|
931
|
+
term.options.disableStdin = !interactive;
|
|
932
|
+
term.options.cursorBlink = interactive;
|
|
933
|
+
}, [ready, interactive]);
|
|
934
|
+
useEffect2(() => {
|
|
935
|
+
const term = termRef.current;
|
|
936
|
+
if (!ready || !term) return;
|
|
937
|
+
const next = theme ?? xtermThemeFromTokens(containerRef.current);
|
|
938
|
+
if (next) term.options.theme = next;
|
|
939
|
+
}, [ready, theme]);
|
|
940
|
+
useEffect2(() => {
|
|
941
|
+
const term = termRef.current;
|
|
942
|
+
if (!ready || !term) return;
|
|
943
|
+
if (!booting) {
|
|
944
|
+
if (bootActiveRef.current) {
|
|
945
|
+
bootActiveRef.current = false;
|
|
946
|
+
if (!wroteFirehoseRef.current) clearTerminalBootStatus(term);
|
|
947
|
+
}
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
bootActiveRef.current = true;
|
|
951
|
+
const start = Date.now();
|
|
952
|
+
const paint = () => {
|
|
953
|
+
const s = Math.max(0, Math.round((Date.now() - start) / 1e3));
|
|
954
|
+
term.write(`\r\x1B[2K\x1B[94m\u25CF\x1B[0m \x1B[2mwaking machine \u2014 ${s}s\u2026\x1B[0m`);
|
|
955
|
+
};
|
|
956
|
+
term.write("\r\n");
|
|
957
|
+
paint();
|
|
958
|
+
const id = setInterval(paint, 1e3);
|
|
959
|
+
return () => clearInterval(id);
|
|
960
|
+
}, [ready, booting]);
|
|
961
|
+
useEffect2(() => {
|
|
962
|
+
const term = termRef.current;
|
|
963
|
+
if (!ready || !term || ptyMode) return;
|
|
964
|
+
for (const chunk of result.chunks) {
|
|
965
|
+
if (writtenRef.current.has(chunk.id)) continue;
|
|
966
|
+
writtenRef.current.add(chunk.id);
|
|
967
|
+
wroteFirehoseRef.current = true;
|
|
968
|
+
term.write(chunk.text);
|
|
969
|
+
}
|
|
970
|
+
}, [ready, result.chunks, ptyMode]);
|
|
971
|
+
useLayoutEffect(() => {
|
|
972
|
+
const term = termRef.current;
|
|
973
|
+
if (!ready || !term || !interactive) {
|
|
974
|
+
setInputReady(false);
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
const sink = ptyAttachable ? ptyWrite : result.write;
|
|
978
|
+
if (!sink) {
|
|
979
|
+
setInputReady(false);
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
982
|
+
const sub = subscribeTerminalInput(term, sink, true);
|
|
983
|
+
setInputReady(sub !== null);
|
|
984
|
+
return () => sub?.dispose();
|
|
985
|
+
}, [ready, interactive, ptyAttachable, ptyWrite, result.write]);
|
|
986
|
+
useEffect2(() => {
|
|
987
|
+
const term = termRef.current;
|
|
988
|
+
if (!ready || !term || !ptyMode) return;
|
|
989
|
+
resizePty(term.cols, term.rows);
|
|
990
|
+
const sub = term.onResize(({ cols, rows }) => resizePty(cols, rows));
|
|
991
|
+
return () => sub.dispose();
|
|
992
|
+
}, [ready, ptyMode, ptyConnected, resizePty]);
|
|
993
|
+
useEffect2(() => {
|
|
994
|
+
if (typeof window === "undefined") return;
|
|
995
|
+
const refit = () => {
|
|
996
|
+
try {
|
|
997
|
+
fitRef.current?.fit();
|
|
998
|
+
} catch {
|
|
999
|
+
}
|
|
1000
|
+
};
|
|
1001
|
+
window.addEventListener("resize", refit);
|
|
1002
|
+
let observer = null;
|
|
1003
|
+
const el = containerRef.current;
|
|
1004
|
+
if (el && typeof ResizeObserver !== "undefined") {
|
|
1005
|
+
observer = new ResizeObserver(() => refit());
|
|
1006
|
+
observer.observe(el);
|
|
1007
|
+
}
|
|
1008
|
+
return () => {
|
|
1009
|
+
window.removeEventListener("resize", refit);
|
|
1010
|
+
observer?.disconnect();
|
|
1011
|
+
};
|
|
1012
|
+
}, [ready]);
|
|
1013
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative flex h-full w-full flex-col overflow-hidden", className), children: [
|
|
1014
|
+
showHeader && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center justify-between gap-2 border-b border-og-border px-2 py-1 text-og-xs text-og-fg-subtle", children: [
|
|
1015
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
1016
|
+
/* @__PURE__ */ jsx(
|
|
1017
|
+
"span",
|
|
1018
|
+
{
|
|
1019
|
+
className: cn(
|
|
1020
|
+
"size-1.5 shrink-0 rounded-full",
|
|
1021
|
+
result.running ? "bg-og-status-running" : "bg-og-fg-subtle"
|
|
1022
|
+
)
|
|
1023
|
+
}
|
|
1024
|
+
),
|
|
1025
|
+
/* @__PURE__ */ jsxs("span", { className: "truncate font-og-mono", children: [
|
|
1026
|
+
"pty: ",
|
|
1027
|
+
shell ?? "shell"
|
|
1028
|
+
] })
|
|
1029
|
+
] }),
|
|
1030
|
+
/* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-2", children: [
|
|
1031
|
+
terminalModeLabel && /* @__PURE__ */ jsx(
|
|
1032
|
+
"span",
|
|
1033
|
+
{
|
|
1034
|
+
className: "rounded-og-sm bg-og-surface-2 px-1.5 py-0.5 text-og-xs uppercase tracking-wide",
|
|
1035
|
+
role: "status",
|
|
1036
|
+
title: inputReadiness === "legacy" ? "Shell readiness is not guaranteed. Wait for startup before typing." : void 0,
|
|
1037
|
+
children: terminalModeLabel
|
|
1038
|
+
}
|
|
1039
|
+
),
|
|
1040
|
+
/* @__PURE__ */ jsx(
|
|
1041
|
+
"button",
|
|
1042
|
+
{
|
|
1043
|
+
type: "button",
|
|
1044
|
+
onClick: () => {
|
|
1045
|
+
termRef.current?.clear();
|
|
1046
|
+
writtenRef.current = /* @__PURE__ */ new Set();
|
|
1047
|
+
wroteFirehoseRef.current = false;
|
|
1048
|
+
},
|
|
1049
|
+
className: "rounded-og-sm px-1.5 py-0.5 text-og-xs hover:text-og-fg pointer-coarse:min-h-11",
|
|
1050
|
+
children: "Clear"
|
|
1051
|
+
}
|
|
1052
|
+
)
|
|
1053
|
+
] })
|
|
1054
|
+
] }),
|
|
1055
|
+
ptyAttachable && !readOnly && !showHeader && inputReadiness === "legacy" && /* @__PURE__ */ jsx("p", { role: "status", className: "shrink-0 px-3 py-1 text-og-xs text-og-fg-subtle", children: "Legacy input \u2014 wait for shell startup before typing." }),
|
|
1056
|
+
ptyAttachable && !readOnly && inputReadiness === "waiting" && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-wrap items-center justify-between gap-2 border-b border-og-border px-3 py-2 text-og-xs text-og-fg-subtle", children: [
|
|
1057
|
+
/* @__PURE__ */ jsx("span", { role: "status", children: "Waiting for shell readiness. Manual input clears buffered typing." }),
|
|
1058
|
+
/* @__PURE__ */ jsx(
|
|
1059
|
+
"button",
|
|
1060
|
+
{
|
|
1061
|
+
type: "button",
|
|
1062
|
+
onClick: () => {
|
|
1063
|
+
useLegacyInput();
|
|
1064
|
+
termRef.current?.focus();
|
|
1065
|
+
},
|
|
1066
|
+
title: "Use for startup prompts or shells without readiness support. Early input is not guaranteed.",
|
|
1067
|
+
className: "shrink-0 rounded-og-sm px-2 py-1 text-og-fg hover:bg-og-surface-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-og-accent pointer-coarse:min-h-11",
|
|
1068
|
+
children: "Use manual input"
|
|
1069
|
+
}
|
|
1070
|
+
)
|
|
1071
|
+
] }),
|
|
1072
|
+
/* @__PURE__ */ jsxs(
|
|
1073
|
+
"div",
|
|
1074
|
+
{
|
|
1075
|
+
className: "relative min-h-0 flex-1 bg-og-bg p-3",
|
|
1076
|
+
onPointerDownCapture: handleActivate,
|
|
1077
|
+
onFocusCapture: handleActivate,
|
|
1078
|
+
children: [
|
|
1079
|
+
!ready && (loadError ? /* @__PURE__ */ jsx("p", { role: "alert", children: loadError.message }) : placeholder ?? /* @__PURE__ */ jsx(TerminalPlaceholder, {})),
|
|
1080
|
+
/* @__PURE__ */ jsx(
|
|
1081
|
+
"div",
|
|
1082
|
+
{
|
|
1083
|
+
ref: containerRef,
|
|
1084
|
+
className: "h-full w-full",
|
|
1085
|
+
style: { visibility: ready ? "visible" : "hidden" },
|
|
1086
|
+
"data-opengeni-terminal": true,
|
|
1087
|
+
"data-opengeni-terminal-ready": ready ? "true" : "false",
|
|
1088
|
+
"data-opengeni-terminal-interactive": surfaceState === "interactive" ? "true" : "false",
|
|
1089
|
+
"data-opengeni-terminal-state": surfaceState,
|
|
1090
|
+
"data-opengeni-terminal-status": ptyAttachable ? ptyStatus : "firehose",
|
|
1091
|
+
"data-opengeni-terminal-input-readiness": ptyAttachable ? inputReadiness : "firehose"
|
|
1092
|
+
}
|
|
1093
|
+
)
|
|
1094
|
+
]
|
|
1095
|
+
}
|
|
1096
|
+
)
|
|
1097
|
+
] });
|
|
1098
|
+
}
|
|
1099
|
+
var XTERM_STYLE_ID = "opengeni-xterm-base-css";
|
|
1100
|
+
var XTERM_BASE_CSS = `
|
|
1101
|
+
.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}
|
|
1102
|
+
.xterm.focus,.xterm:focus{outline:none}
|
|
1103
|
+
.xterm .xterm-helpers{position:absolute;top:0;z-index:5}
|
|
1104
|
+
.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}
|
|
1105
|
+
.xterm .composition-view{background:var(--og-color-bg);color:var(--og-color-fg);display:none;position:absolute;white-space:nowrap;z-index:1}
|
|
1106
|
+
.xterm .composition-view.active{display:block}
|
|
1107
|
+
.xterm .xterm-viewport{background-color:transparent;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}
|
|
1108
|
+
.xterm .xterm-screen{position:relative}
|
|
1109
|
+
.xterm .xterm-screen canvas{position:absolute;left:0;top:0}
|
|
1110
|
+
.xterm .xterm-scroll-area{visibility:hidden}
|
|
1111
|
+
.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}
|
|
1112
|
+
.xterm.enable-mouse-events{cursor:default}
|
|
1113
|
+
.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}
|
|
1114
|
+
.xterm.column-select.focus{cursor:crosshair}
|
|
1115
|
+
.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}
|
|
1116
|
+
.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}
|
|
1117
|
+
.xterm .xterm-accessibility-tree{user-select:text;white-space:pre}
|
|
1118
|
+
.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
|
|
1119
|
+
.xterm-dim{opacity:1!important}
|
|
1120
|
+
.xterm-underline-1{text-decoration:underline}
|
|
1121
|
+
.xterm-underline-2{text-decoration:double underline}
|
|
1122
|
+
.xterm-underline-3{text-decoration:wavy underline}
|
|
1123
|
+
.xterm-underline-4{text-decoration:dotted underline}
|
|
1124
|
+
.xterm-underline-5{text-decoration:dashed underline}
|
|
1125
|
+
.xterm-overline{text-decoration:overline}
|
|
1126
|
+
.xterm-strikethrough{text-decoration:line-through}
|
|
1127
|
+
.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}
|
|
1128
|
+
.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}
|
|
1129
|
+
.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}
|
|
1130
|
+
.xterm-decoration-top{z-index:2;position:relative}
|
|
1131
|
+
`;
|
|
1132
|
+
function ensureXtermBaseCss() {
|
|
1133
|
+
if (typeof document === "undefined") return;
|
|
1134
|
+
if (document.getElementById(XTERM_STYLE_ID)) return;
|
|
1135
|
+
const style = document.createElement("style");
|
|
1136
|
+
style.id = XTERM_STYLE_ID;
|
|
1137
|
+
style.textContent = XTERM_BASE_CSS;
|
|
1138
|
+
document.head.appendChild(style);
|
|
1139
|
+
}
|
|
1140
|
+
function TerminalPlaceholder() {
|
|
1141
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-og-sm text-og-fg-subtle", children: "Loading terminal\u2026" });
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export {
|
|
1145
|
+
useTerminalStream,
|
|
1146
|
+
xtermThemeFromTokens,
|
|
1147
|
+
terminalCanAcquirePty,
|
|
1148
|
+
SandboxTerminal
|
|
1149
|
+
};
|
|
1150
|
+
//# sourceMappingURL=chunk-XHF7OYAN.js.map
|