@opengeni/react 4.0.2 → 4.0.5-canary.39118806767001
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 +787 -26
- package/dist/accounts.js +2 -0
- package/dist/accounts.js.map +1 -1
- package/dist/approvals.d.ts +2 -1
- package/dist/artifacts-document.js +6 -3
- package/dist/artifacts-presentation.js +6 -3
- package/dist/artifacts-spreadsheet.d.ts +1 -1
- package/dist/artifacts-spreadsheet.js +6 -3
- package/dist/artifacts.d.ts +5 -1
- package/dist/artifacts.js +542 -278
- package/dist/artifacts.js.map +1 -1
- package/dist/browser-viewer-GEHX3KYE.js +20 -0
- package/dist/capability-catalog-row.d.ts +20 -0
- package/dist/capability-logo-fallback.d.ts +3 -0
- package/dist/chat-interactive-block-5V3BGLXT.js +15 -0
- package/dist/chunk-2DDJ6YH6.js +41 -0
- package/dist/chunk-2DDJ6YH6.js.map +1 -0
- package/dist/chunk-2EGXXUG4.js +1161 -0
- package/dist/chunk-2EGXXUG4.js.map +1 -0
- package/dist/chunk-2XKRY4GF.js +302 -0
- package/dist/chunk-2XKRY4GF.js.map +1 -0
- package/dist/chunk-2ZUUIMBY.js +343 -0
- package/dist/chunk-2ZUUIMBY.js.map +1 -0
- package/dist/chunk-4F4FGCH2.js +34 -0
- package/dist/chunk-4F4FGCH2.js.map +1 -0
- package/dist/{chunk-Z7WBDB4E.js → chunk-4M2MJLY3.js} +848 -867
- package/dist/chunk-4M2MJLY3.js.map +1 -0
- package/dist/chunk-4U7SHFQ2.js +193 -0
- package/dist/chunk-4U7SHFQ2.js.map +1 -0
- package/dist/chunk-5I4VRWBB.js +56 -0
- package/dist/chunk-5I4VRWBB.js.map +1 -0
- package/dist/{chunk-24M4YBCL.js → chunk-62XZ3IX3.js} +1751 -845
- package/dist/chunk-62XZ3IX3.js.map +1 -0
- package/dist/chunk-77THWHSU.js +308 -0
- package/dist/chunk-77THWHSU.js.map +1 -0
- package/dist/chunk-7CZLTFXF.js +466 -0
- package/dist/chunk-7CZLTFXF.js.map +1 -0
- package/dist/chunk-7N5AD2TC.js +327 -0
- package/dist/chunk-7N5AD2TC.js.map +1 -0
- package/dist/chunk-7SZ7MMCY.js +325 -0
- package/dist/chunk-7SZ7MMCY.js.map +1 -0
- package/dist/chunk-7TG6KTR2.js +3153 -0
- package/dist/chunk-7TG6KTR2.js.map +1 -0
- package/dist/chunk-AIX25FIQ.js +409 -0
- package/dist/chunk-AIX25FIQ.js.map +1 -0
- package/dist/chunk-AT2HD6RQ.js +1936 -0
- package/dist/chunk-AT2HD6RQ.js.map +1 -0
- package/dist/chunk-B27E3V37.js +29 -0
- package/dist/chunk-B27E3V37.js.map +1 -0
- package/dist/{chunk-5M6VTFJ5.js → chunk-B4EDAXMC.js} +37 -13
- package/dist/chunk-B4EDAXMC.js.map +1 -0
- package/dist/chunk-BOG2FED3.js +35 -0
- package/dist/chunk-BOG2FED3.js.map +1 -0
- package/dist/chunk-BQYQU5QW.js +109 -0
- package/dist/chunk-BQYQU5QW.js.map +1 -0
- package/dist/{chunk-PAJU5KKL.js → chunk-BRIOXCLH.js} +68 -25
- package/dist/chunk-BRIOXCLH.js.map +1 -0
- package/dist/chunk-CM7LVUKC.js +35 -0
- package/dist/chunk-CM7LVUKC.js.map +1 -0
- package/dist/{chunk-KCGXPP5V.js → chunk-CXIGFHVL.js} +35 -23
- package/dist/chunk-CXIGFHVL.js.map +1 -0
- package/dist/chunk-DHXKEJBH.js +71 -0
- package/dist/chunk-DHXKEJBH.js.map +1 -0
- package/dist/{chunk-NOSYBS2D.js → chunk-DN3TKURW.js} +12 -9
- package/dist/chunk-DN3TKURW.js.map +1 -0
- package/dist/chunk-DNJ23AWQ.js +35 -0
- package/dist/chunk-DNJ23AWQ.js.map +1 -0
- package/dist/chunk-ESAMXNBZ.js +3237 -0
- package/dist/chunk-ESAMXNBZ.js.map +1 -0
- package/dist/{chunk-4MDLEHXL.js → chunk-EWATYP5L.js} +64 -44
- package/dist/chunk-EWATYP5L.js.map +1 -0
- package/dist/{chunk-YBM6CQRU.js → chunk-FQ5CXNUG.js} +65 -42
- package/dist/chunk-FQ5CXNUG.js.map +1 -0
- package/dist/chunk-HEVQKE27.js +150 -0
- package/dist/chunk-HEVQKE27.js.map +1 -0
- package/dist/chunk-HZ47S3DP.js +1086 -0
- package/dist/chunk-HZ47S3DP.js.map +1 -0
- package/dist/chunk-I5BJ7ENY.js +174 -0
- package/dist/chunk-I5BJ7ENY.js.map +1 -0
- package/dist/chunk-IGFZFLI2.js +1390 -0
- package/dist/chunk-IGFZFLI2.js.map +1 -0
- package/dist/chunk-IGVL3ELX.js +46 -0
- package/dist/chunk-IGVL3ELX.js.map +1 -0
- package/dist/chunk-IOD24LGR.js +384 -0
- package/dist/chunk-IOD24LGR.js.map +1 -0
- package/dist/chunk-IOYHDEP3.js +38 -0
- package/dist/chunk-IOYHDEP3.js.map +1 -0
- package/dist/chunk-IQL77TMM.js +803 -0
- package/dist/chunk-IQL77TMM.js.map +1 -0
- package/dist/chunk-IZV5FTJC.js +55 -0
- package/dist/chunk-IZV5FTJC.js.map +1 -0
- package/dist/{chunk-H5YGYNXS.js → chunk-JAYYFOOB.js} +75 -28
- package/dist/chunk-JAYYFOOB.js.map +1 -0
- package/dist/chunk-KN2MYSCC.js +409 -0
- package/dist/chunk-KN2MYSCC.js.map +1 -0
- package/dist/{chunk-PEI6RANI.js → chunk-KYVJMTXL.js} +434 -145
- package/dist/chunk-KYVJMTXL.js.map +1 -0
- package/dist/{chunk-ZYRGEKWS.js → chunk-LJUMYUBO.js} +3 -1
- package/dist/{chunk-ZYRGEKWS.js.map → chunk-LJUMYUBO.js.map} +1 -1
- package/dist/{chunk-ICA6R6TW.js → chunk-LNUD3JNI.js} +1532 -395
- package/dist/chunk-LNUD3JNI.js.map +1 -0
- package/dist/chunk-M357MHH3.js +2 -0
- package/dist/{chunk-BV5A4OTE.js → chunk-MEL6PH2I.js} +1218 -537
- package/dist/chunk-MEL6PH2I.js.map +1 -0
- package/dist/chunk-MF6WS2XF.js +386 -0
- package/dist/chunk-MF6WS2XF.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-KZ73RL76.js → chunk-NAWXARTY.js} +58 -9
- package/dist/chunk-NAWXARTY.js.map +1 -0
- package/dist/chunk-NX4ADH73.js +14 -0
- package/dist/chunk-NX4ADH73.js.map +1 -0
- package/dist/chunk-OYQQJL3J.js +16 -0
- package/dist/chunk-OYQQJL3J.js.map +1 -0
- package/dist/chunk-P4MKPCTC.js +51 -0
- package/dist/chunk-P4MKPCTC.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-PYSEGV5X.js +14396 -0
- package/dist/chunk-PYSEGV5X.js.map +1 -0
- package/dist/{chunk-HUIKIDM5.js → chunk-QOEWDOFW.js} +295 -156
- package/dist/chunk-QOEWDOFW.js.map +1 -0
- package/dist/chunk-QV3DJVRZ.js +11 -0
- package/dist/chunk-QV3DJVRZ.js.map +1 -0
- package/dist/{chunk-HUMIRRYI.js → chunk-QYUYVSNG.js} +1103 -1699
- package/dist/chunk-QYUYVSNG.js.map +1 -0
- package/dist/{chunk-6J56T3MG.js → chunk-RRAQ5FV5.js} +186 -60
- package/dist/chunk-RRAQ5FV5.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-UIWIOB4U.js +2215 -0
- package/dist/chunk-UIWIOB4U.js.map +1 -0
- package/dist/chunk-UNJPZGNK.js +63 -0
- package/dist/chunk-UNJPZGNK.js.map +1 -0
- package/dist/chunk-V7UGCQHQ.js +86 -0
- package/dist/chunk-V7UGCQHQ.js.map +1 -0
- package/dist/chunk-VU4QUISJ.js +3405 -0
- package/dist/chunk-VU4QUISJ.js.map +1 -0
- package/dist/chunk-WEY5J52U.js +467 -0
- package/dist/chunk-WEY5J52U.js.map +1 -0
- package/dist/chunk-WH2CBESG.js +409 -0
- package/dist/chunk-WH2CBESG.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-NLTS7JHI.js → chunk-XEIHS3RN.js} +834 -403
- package/dist/chunk-XEIHS3RN.js.map +1 -0
- package/dist/chunk-YNXZRE3F.js +408 -0
- package/dist/chunk-YNXZRE3F.js.map +1 -0
- package/dist/chunk-YSRBFJMQ.js +43 -0
- package/dist/chunk-YSRBFJMQ.js.map +1 -0
- package/dist/{chunk-NEXLLTP4.js → chunk-ZGFU4LVW.js} +6 -5
- package/dist/chunk-ZGFU4LVW.js.map +1 -0
- package/dist/chunk-ZO35BAMO.js +172 -0
- package/dist/chunk-ZO35BAMO.js.map +1 -0
- package/dist/chunk-ZUWF4NF7.js +13 -0
- package/dist/chunk-ZUWF4NF7.js.map +1 -0
- package/dist/client.d.ts +15 -6
- package/dist/clipboard.js +3 -1
- package/dist/commands/registry.d.ts +2 -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 +21 -7
- package/dist/components/artifacts/artifact-chrome.d.ts +121 -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 +4 -2
- package/dist/components/artifacts/editable-artifact-view.d.ts +48 -0
- package/dist/components/artifacts/editable-document.d.ts +3 -2
- package/dist/components/artifacts/editable-presentation.d.ts +4 -3
- package/dist/components/artifacts/editable-spreadsheet.d.ts +8 -3
- package/dist/components/artifacts/index.d.ts +8 -1
- 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 +17 -40
- 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 +11 -4
- 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 +5 -1
- package/dist/components/claude-mark.d.ts +3 -0
- package/dist/components/code-editor.d.ts +1 -4
- package/dist/components/command-palette.d.ts +1 -1
- package/dist/components/composer-transcription-control.d.ts +7 -0
- package/dist/components/composer.d.ts +30 -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/generated-video-player.d.ts +1 -1
- package/dist/components/grok-mark.d.ts +26 -0
- package/dist/components/human-input-form.d.ts +26 -32
- package/dist/components/human-input-surface.d.ts +5 -1
- package/dist/components/linkified-text.d.ts +18 -0
- package/dist/components/machine-input-display.d.ts +25 -3
- package/dist/components/machine-status-pill.d.ts +3 -2
- package/dist/components/machines/agent-status-icon.d.ts +6 -0
- package/dist/components/machines/health.d.ts +2 -1
- package/dist/components/machines/machine-detail.d.ts +7 -1
- package/dist/components/machines/machine-status.d.ts +49 -0
- package/dist/components/machines/metric-history-chart.d.ts +1 -1
- package/dist/components/machines/series.d.ts +3 -2
- package/dist/components/markdown-table-layout.d.ts +11 -2
- package/dist/components/markdown.d.ts +37 -4
- package/dist/components/message-timeline.d.ts +79 -7
- package/dist/components/model-mark.d.ts +29 -0
- package/dist/components/model-picker.d.ts +1 -1
- package/dist/components/model-policy-picker.d.ts +31 -22
- 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 +69 -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 +17 -0
- package/dist/components/queue-item-content.d.ts +10 -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-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 +20 -7
- 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 +147 -6
- 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 +6 -2
- package/dist/components/session-usage-limit-notice.d.ts +39 -0
- package/dist/components/this-computer/illustrations.d.ts +38 -0
- package/dist/components/this-computer/labels.d.ts +111 -0
- package/dist/components/this-computer/this-computer-card.d.ts +40 -0
- package/dist/components/this-computer/this-computer-setup.d.ts +35 -0
- package/dist/components/this-computer/this-computer-status.d.ts +42 -0
- package/dist/components/this-computer/use-this-computer.d.ts +29 -0
- package/dist/components/timeline-anchor.d.ts +3 -0
- package/dist/components/timeline-annotation-shared.d.ts +3 -2
- package/dist/components/timeline-annotations-dialog.d.ts +2 -1
- package/dist/components/timeline-annotations.d.ts +5 -1
- 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/tool-action-review.d.ts +48 -0
- package/dist/components/tool-review-history.d.ts +25 -0
- package/dist/components/usage-limit-notice.d.ts +50 -0
- package/dist/components/usage-member-list.d.ts +92 -0
- package/dist/components/usage-meter.d.ts +74 -0
- package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
- package/dist/components/user-message-body.d.ts +10 -1
- package/dist/components/workbench-changes.d.ts +2 -1
- package/dist/composer-messages.d.ts +75 -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 +3 -3
- package/dist/composer.js +25 -12
- package/dist/computer-viewer-VOIOZGVZ.js +21 -0
- package/dist/computer-viewer-VOIOZGVZ.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 +2216 -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 +1 -1
- package/dist/desktop.d.ts +7 -0
- package/dist/desktop.js +28 -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 +23 -0
- package/dist/editor.js.map +1 -0
- package/dist/embedded-new-voice-KPLC5UJZ.js +19 -0
- package/dist/embedded-new-voice-KPLC5UJZ.js.map +1 -0
- package/dist/embedded-voice-V2RFSLIU.js +19 -0
- package/dist/embedded-voice-V2RFSLIU.js.map +1 -0
- package/dist/fleet-decision-row-FE73NSQ6.js +361 -0
- package/dist/fleet-decision-row-FE73NSQ6.js.map +1 -0
- package/dist/hooks/internal.d.ts +27 -2
- package/dist/hooks/latest-question.d.ts +26 -0
- package/dist/hooks/session-view-cache.d.ts +38 -0
- package/dist/hooks/shared-machines-list.d.ts +4 -0
- package/dist/hooks/shared-query.d.ts +123 -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 +8 -3
- 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 +48 -9
- package/dist/hooks/use-composer.d.ts +24 -3
- 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 +5 -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 +4 -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-machine-chip.d.ts +3 -2
- 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 +3 -2
- package/dist/hooks/use-session-conversation.d.ts +49 -0
- package/dist/hooks/use-session-events.d.ts +21 -2
- 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-transcription.d.ts +2 -1
- 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-sessions.d.ts +24 -5
- package/dist/human-input-model.d.ts +123 -0
- package/dist/identity-link-accounts.d.ts +11 -0
- package/dist/identity-link-consent.d.ts +18 -0
- package/dist/index.d.ts +83 -18
- package/dist/index.js +2317 -6453
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +1 -1
- package/dist/interaction.js +20 -29
- package/dist/interaction.js.map +1 -1
- package/dist/latest-question-SXBXROBT.js +118 -0
- package/dist/latest-question-SXBXROBT.js.map +1 -0
- package/dist/lib/client-config-read.d.ts +31 -0
- package/dist/lib/clipboard.d.ts +7 -0
- package/dist/lib/error-message.d.ts +7 -0
- package/dist/lib/format.d.ts +59 -9
- 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 +56 -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 +26 -0
- package/dist/lib/workbench-peers.d.ts +36 -0
- package/dist/lib/xterm-theme.d.ts +7 -5
- package/dist/machines.js +12 -6
- package/dist/{markdown-table-layout-3Z3AWBY7.js → markdown-table-layout-3PV2UAAH.js} +51 -9
- package/dist/markdown-table-layout-3PV2UAAH.js.map +1 -0
- package/dist/mcp-connection-status.d.ts +15 -0
- package/dist/messages/en.d.ts +3328 -0
- package/dist/messages/runtime.d.ts +69 -0
- package/dist/messages.d.ts +3 -0
- package/dist/messages.js +16 -0
- package/dist/messages.js.map +1 -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 +112 -0
- package/dist/model-picker-model.js +25 -0
- package/dist/model-picker-model.js.map +1 -0
- package/dist/model-policy-picker-menu-NWIETWSR.js +18 -0
- package/dist/model-policy-picker-menu-NWIETWSR.js.map +1 -0
- package/dist/model-policy.d.ts +35 -10
- package/dist/model-policy.js +12 -1
- package/dist/native-previews.d.ts +29 -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/organization-model.d.ts +33 -0
- package/dist/organization-model.js +65 -0
- package/dist/organization-model.js.map +1 -0
- package/dist/platform-activity-row-VSQ2FZ5T.js +119 -0
- package/dist/platform-activity-row-VSQ2FZ5T.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 +37 -2
- package/dist/queue-presentation-model.d.ts +73 -0
- package/dist/queue-presentation-model.js +38 -0
- package/dist/queue-presentation-model.js.map +1 -0
- package/dist/{queue-surface-implementation-LK3S4BIW.js → queue-surface-implementation-MEKXXWGR.js} +189 -343
- package/dist/queue-surface-implementation-MEKXXWGR.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 +79 -0
- package/dist/realtime.js +26 -1333
- package/dist/realtime.js.map +1 -1
- package/dist/sandbox-files-5NRC2QUT.js +24 -0
- package/dist/sandbox-files-5NRC2QUT.js.map +1 -0
- package/dist/sandbox-label-model.d.ts +31 -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 +15 -0
- package/dist/secrets-ui.d.ts +57 -0
- package/dist/session-agents-model.d.ts +11 -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 +6 -0
- package/dist/session-capability-policy.d.ts +32 -0
- package/dist/session-context.d.ts +9 -1
- package/dist/session-feedback-model.d.ts +21 -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 +139 -0
- package/dist/session-list-model.js +274 -0
- package/dist/session-list-model.js.map +1 -0
- package/dist/session-realtime-OZCE6IKP.js +22 -0
- package/dist/session-realtime-OZCE6IKP.js.map +1 -0
- package/dist/session-realtime.d.ts +7 -0
- package/dist/session-realtime.js +20 -0
- package/dist/session-realtime.js.map +1 -0
- package/dist/session-status-model.d.ts +37 -0
- package/dist/session-ui.d.ts +40 -3
- package/dist/session-ui.js +127 -21
- package/dist/session-ui.js.map +1 -1
- package/dist/session.d.ts +10 -2
- package/dist/session.js +44 -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 +15 -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 +33 -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/this-computer.d.ts +8 -0
- package/dist/this-computer.js +1042 -0
- package/dist/this-computer.js.map +1 -0
- package/dist/timeline/activity-rail.d.ts +12 -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 +47 -0
- package/dist/timeline/focus-sequence.d.ts +9 -0
- package/dist/timeline/genie-copy.d.ts +4 -0
- package/dist/timeline/genie-loading.d.ts +48 -0
- package/dist/timeline/index.d.ts +12 -5
- package/dist/timeline/invoked-tool.d.ts +6 -0
- package/dist/timeline/knowledge-receipt.d.ts +17 -0
- package/dist/timeline/learning-refusal-copy.d.ts +23 -0
- package/dist/timeline/learning-refusal-row.d.ts +19 -0
- package/dist/timeline/message-sender.d.ts +19 -0
- package/dist/timeline/notice-presentation.d.ts +14 -0
- package/dist/timeline/parsers.d.ts +11 -0
- package/dist/timeline/patch-apply-command.d.ts +19 -0
- package/dist/timeline/platform-activity-presentation.d.ts +26 -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 +32 -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 +10 -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 +8 -3
- 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 +6 -2
- package/dist/timeline/tool-presentation.d.ts +185 -0
- package/dist/timeline/turn-summary-model.d.ts +102 -0
- package/dist/timeline/turn-summary.d.ts +20 -54
- package/dist/timeline/types.d.ts +184 -7
- package/dist/timeline/work-presentation.d.ts +61 -0
- package/dist/{timeline-annotation-markers-DRSTLEM6.js → timeline-annotation-markers-HYLRTT6S.js} +11 -6
- package/dist/timeline-annotation-markers-HYLRTT6S.js.map +1 -0
- package/dist/{timeline-annotation-selection-IHLUGVND.js → timeline-annotation-selection-LBKW5GHA.js} +15 -5
- package/dist/timeline-annotation-selection-LBKW5GHA.js.map +1 -0
- package/dist/{timeline-annotations-dialog-6Q53N5FG.js → timeline-annotations-dialog-JKVINC42.js} +34 -19
- package/dist/timeline-annotations-dialog-JKVINC42.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 +26 -0
- package/dist/usage/session-usage-limit.d.ts +89 -0
- package/dist/usage/summary.d.ts +35 -0
- package/dist/usage.d.ts +17 -0
- package/dist/usage.js +1201 -0
- package/dist/usage.js.map +1 -0
- package/dist/voice-recording-owner.d.ts +7 -0
- package/package.json +119 -7
- package/src/approvals.ts +8 -1
- package/src/artifacts-spreadsheet.ts +1 -0
- package/src/artifacts.ts +41 -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 +96 -0
- package/src/capability-logo-fallback.ts +22 -0
- package/src/client.ts +18 -30
- package/src/commands/registry.ts +46 -36
- package/src/commands/types.ts +2 -0
- package/src/components/anthropic-mark.tsx +10 -0
- package/src/components/approval-surface.tsx +407 -142
- package/src/components/artifacts/artifact-chrome.tsx +425 -0
- package/src/components/artifacts/artifact-sandbox.tsx +193 -0
- package/src/components/artifacts/artifact-surface.tsx +48 -26
- package/src/components/artifacts/chat-interactive-block.tsx +260 -0
- package/src/components/artifacts/deferred-chat-media.tsx +72 -0
- package/src/components/artifacts/document-editor.tsx +193 -45
- package/src/components/artifacts/editable-artifact-ui.tsx +23 -11
- package/src/components/artifacts/editable-artifact-view.tsx +199 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +8 -3
- package/src/components/artifacts/editable-document.tsx +76 -54
- package/src/components/artifacts/editable-presentation.tsx +86 -40
- package/src/components/artifacts/editable-spreadsheet.tsx +581 -121
- package/src/components/artifacts/index.ts +42 -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 +422 -122
- package/src/components/artifacts/published-html-artifact-frame.tsx +79 -265
- package/src/components/artifacts/session-artifact-viewer.tsx +381 -0
- package/src/components/artifacts/site-view.tsx +129 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
- package/src/components/artifacts/spreadsheet-command-queue.ts +190 -0
- package/src/components/artifacts/spreadsheet-download.tsx +117 -0
- package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +390 -172
- package/src/components/artifacts/spreadsheet-resize.tsx +432 -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 +320 -0
- package/src/components/browser-viewer.tsx +1102 -505
- package/src/components/chat-composer.tsx +42 -3
- package/src/components/child-session-link.tsx +16 -5
- package/src/components/claude-mark.tsx +11 -0
- package/src/components/code-editor.tsx +38 -27
- package/src/components/command-palette.tsx +4 -1
- package/src/components/composer-transcription-control.tsx +151 -50
- package/src/components/composer.tsx +281 -176
- package/src/components/computer-viewer.tsx +1013 -341
- package/src/components/copy-button.tsx +17 -7
- package/src/components/desktop-viewer.tsx +42 -33
- package/src/components/diff-view.tsx +3 -1
- package/src/components/enrollment-consent.tsx +39 -34
- package/src/components/enrollment-device-flow.tsx +31 -19
- package/src/components/file-browser.tsx +47 -35
- package/src/components/fleet-tile.tsx +8 -4
- package/src/components/generated-video-player.tsx +10 -5
- package/src/components/grok-mark.tsx +34 -0
- package/src/components/human-input-form.tsx +438 -251
- package/src/components/human-input-surface.tsx +8 -0
- package/src/components/interaction-intervention-banner.tsx +15 -13
- package/src/components/linkified-text.tsx +79 -0
- package/src/components/machine-card.tsx +56 -89
- package/src/components/machine-dock-bar.tsx +10 -4
- package/src/components/machine-health-pill.tsx +4 -2
- package/src/components/machine-input-display.ts +309 -34
- package/src/components/machine-metrics.tsx +10 -7
- package/src/components/machine-status-pill.tsx +23 -15
- package/src/components/machines/agent-status-icon.tsx +31 -0
- package/src/components/machines/health.ts +53 -10
- package/src/components/machines/machine-detail.tsx +230 -42
- package/src/components/machines/machine-operation-policy.tsx +36 -29
- package/src/components/machines/machine-status.ts +264 -0
- package/src/components/machines/metric-history-chart.tsx +8 -2
- package/src/components/machines/series.ts +12 -11
- package/src/components/machines-dashboard.tsx +16 -9
- package/src/components/markdown-table-layout.ts +67 -9
- package/src/components/markdown.tsx +470 -133
- package/src/components/message-timeline.tsx +2290 -752
- package/src/components/model-mark.tsx +102 -0
- package/src/components/model-picker.tsx +27 -9
- package/src/components/model-policy-picker-menu.tsx +204 -100
- package/src/components/model-policy-picker.tsx +215 -152
- package/src/components/new-conversation.tsx +223 -0
- package/src/components/open-geni-chat.tsx +311 -0
- package/src/components/open-geni-links.tsx +183 -0
- package/src/components/openrouter-mark.tsx +13 -0
- package/src/components/opper-mark.tsx +18 -0
- package/src/components/pierre-diff.tsx +47 -19
- package/src/components/pierre-file.tsx +38 -11
- package/src/components/preview-loading.tsx +111 -0
- package/src/components/provider-recovery-notice.tsx +51 -0
- package/src/components/queue-item-content.ts +16 -0
- package/src/components/queue-surface-implementation.tsx +185 -420
- package/src/components/queue-surface-state.tsx +13 -8
- package/src/components/queue-surface.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 +75 -44
- package/src/components/sandbox-terminal.tsx +103 -22
- package/src/components/sandbox-workspace.tsx +168 -78
- package/src/components/secret-question-field.tsx +326 -0
- package/src/components/secret-ref-chip.tsx +187 -0
- package/src/components/session-capability-frame.tsx +203 -0
- package/src/components/session-chrome.tsx +559 -328
- package/src/components/session-commands-panel.tsx +34 -17
- package/src/components/session-commands.tsx +18 -0
- package/src/components/session-connection-request.tsx +99 -0
- package/src/components/session-conversation.tsx +853 -118
- package/src/components/session-list.tsx +259 -0
- package/src/components/session-mcp-capability-card.tsx +681 -0
- package/src/components/session-proxy-scope.tsx +160 -0
- package/src/components/session-status.tsx +35 -21
- package/src/components/session-usage-limit-notice.tsx +176 -0
- package/src/components/this-computer/illustrations.tsx +164 -0
- package/src/components/this-computer/labels.ts +234 -0
- package/src/components/this-computer/this-computer-card.tsx +203 -0
- package/src/components/this-computer/this-computer-setup.tsx +433 -0
- package/src/components/this-computer/this-computer-status.tsx +329 -0
- package/src/components/this-computer/use-this-computer.ts +183 -0
- package/src/components/timeline-anchor.tsx +43 -15
- package/src/components/timeline-annotation-chrome.tsx +33 -9
- package/src/components/timeline-annotation-markers.tsx +4 -2
- package/src/components/timeline-annotation-selection.tsx +11 -2
- package/src/components/timeline-annotation-shared.ts +9 -8
- package/src/components/timeline-annotations-dialog.tsx +30 -9
- package/src/components/timeline-annotations.tsx +24 -7
- 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/tool-action-review.tsx +670 -0
- package/src/components/tool-review-history.tsx +88 -0
- package/src/components/usage-limit-notice.tsx +183 -0
- package/src/components/usage-member-list.tsx +797 -0
- package/src/components/usage-meter.tsx +386 -0
- package/src/components/use-viewer-menu-dismiss.ts +33 -0
- package/src/components/user-message-body.tsx +33 -2
- package/src/components/workbench-changes.tsx +28 -16
- package/src/components/workspace-dock.tsx +45 -13
- package/src/composer-messages.ts +153 -0
- package/src/composer-voice-events.ts +12 -0
- package/src/composer.ts +4 -0
- package/src/connect-account-identity.tsx +38 -0
- package/src/connect-accounts.tsx +233 -0
- package/src/connect-chooser.tsx +339 -0
- package/src/connect-panel.tsx +104 -0
- package/src/connect-setup.tsx +354 -0
- package/src/connect.ts +60 -0
- package/src/connection-assets.d.ts +4 -0
- package/src/connection-catalog.tsx +175 -0
- package/src/connection-discovery.tsx +251 -0
- package/src/connection-installed.tsx +56 -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 +38 -0
- package/src/conversation-timeline.ts +11 -2
- package/src/desktop.ts +24 -0
- package/src/device-authorization.tsx +111 -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 +93 -10
- package/src/hooks/latest-question.ts +168 -0
- package/src/hooks/session-view-cache.ts +167 -0
- package/src/hooks/shared-machines-list.ts +34 -1
- package/src/hooks/shared-query.ts +744 -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 +20 -10
- package/src/hooks/use-browser-frame-stream.ts +23 -4
- package/src/hooks/use-browser-session.ts +684 -206
- package/src/hooks/use-browser-sessions.ts +32 -1
- package/src/hooks/use-client-config-flags.ts +102 -0
- package/src/hooks/use-codex-accounts.ts +216 -43
- package/src/hooks/use-composer.ts +240 -59
- package/src/hooks/use-computer-frame-stream.ts +29 -9
- package/src/hooks/use-computer-input-posture.ts +96 -0
- package/src/hooks/use-computer-session.ts +419 -100
- package/src/hooks/use-connect.ts +23 -0
- package/src/hooks/use-desktop-stream.ts +19 -28
- package/src/hooks/use-file-attachments.ts +19 -3
- package/src/hooks/use-goal.ts +172 -21
- package/src/hooks/use-human-input.ts +16 -2
- package/src/hooks/use-last-started-turn-policy.ts +37 -11
- package/src/hooks/use-machine-chip.ts +13 -8
- package/src/hooks/use-machines.ts +24 -10
- package/src/hooks/use-new-conversation.ts +377 -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 +22 -16
- package/src/hooks/use-session-background-commands.ts +2 -2
- 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 +403 -64
- package/src/hooks/use-session-lineage.ts +47 -9
- 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 +19 -3
- 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 +45 -19
- package/src/hooks/use-turn-queue.ts +25 -5
- 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-sessions.ts +74 -7
- package/src/human-input-model.ts +374 -0
- package/src/identity-link-accounts.tsx +149 -0
- package/src/identity-link-consent.tsx +193 -0
- package/src/index.ts +282 -16
- package/src/interaction.ts +1 -0
- package/src/lib/client-config-read.ts +76 -0
- package/src/lib/clipboard.ts +29 -0
- package/src/lib/error-message.ts +37 -0
- package/src/lib/format.ts +231 -36
- 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 +255 -0
- package/src/lib/scrollbars.ts +30 -0
- package/src/lib/terminal-input-readiness.ts +51 -0
- package/src/lib/transient-retry.ts +101 -0
- package/src/lib/workbench-peers.ts +62 -0
- package/src/lib/xterm-theme.ts +23 -21
- package/src/mcp-connection-status.ts +39 -0
- package/src/messages/en.ts +3810 -0
- package/src/messages/runtime.tsx +175 -0
- package/src/messages.ts +19 -0
- package/src/model-mark-paths.ts +53 -0
- package/src/model-picker-model.ts +343 -0
- package/src/model-policy.ts +301 -79
- package/src/native-previews.ts +104 -0
- package/src/new-session-draft.ts +22 -0
- package/src/notification-text.ts +81 -0
- package/src/organization-model.ts +123 -0
- package/src/plugin-details.tsx +192 -0
- package/src/plugin-discovery.tsx +209 -0
- package/src/preview-loading-paint.ts +68 -0
- package/src/provider.tsx +105 -21
- package/src/queue-presentation-model.ts +475 -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 +240 -609
- package/src/realtime/session-realtime.ts +582 -0
- package/src/sandbox-label-model.ts +56 -0
- package/src/scrollbars.ts +3 -0
- package/src/secret-reference-label.ts +47 -0
- package/src/secrets-ui.tsx +59 -0
- package/src/session-agents-model.ts +40 -0
- package/src/session-attention-model.ts +62 -0
- package/src/session-auth-recommendation.ts +50 -0
- package/src/session-capability-policy.ts +200 -0
- package/src/session-context.ts +13 -5
- package/src/session-feedback-model.ts +101 -0
- package/src/session-list-model.ts +437 -0
- package/src/session-realtime.ts +18 -0
- package/src/session-status-model.ts +99 -0
- package/src/session-ui.ts +102 -3
- package/src/session.ts +19 -1
- package/src/site-snapshot.ts +74 -0
- package/src/sites-ui.tsx +350 -0
- package/src/sites.ts +3 -0
- package/src/skill-discovery.tsx +221 -0
- package/src/terminal.ts +26 -0
- package/src/testing/session-scenarios.ts +404 -0
- package/src/this-computer.ts +62 -0
- package/src/timeline/activity-rail.tsx +289 -119
- package/src/timeline/agent-identity.tsx +84 -0
- package/src/timeline/agent-row.tsx +235 -0
- package/src/timeline/allowance-exhausted-row.tsx +90 -0
- package/src/timeline/compaction-copy.ts +125 -0
- package/src/timeline/fleet-decision-row.tsx +120 -101
- package/src/timeline/focus-sequence.ts +44 -0
- package/src/timeline/genie-copy.ts +22 -0
- package/src/timeline/genie-loading.tsx +158 -0
- package/src/timeline/index.ts +37 -2
- package/src/timeline/invoked-tool.ts +15 -0
- package/src/timeline/knowledge-receipt.tsx +104 -0
- package/src/timeline/learning-refusal-copy.ts +67 -0
- package/src/timeline/learning-refusal-row.tsx +70 -0
- package/src/timeline/message-sender.tsx +71 -0
- package/src/timeline/notice-presentation.ts +67 -0
- package/src/timeline/parsers.ts +42 -2
- package/src/timeline/patch-apply-command.tsx +139 -0
- package/src/timeline/platform-activity-presentation.ts +219 -0
- package/src/timeline/platform-activity-row.tsx +34 -98
- package/src/timeline/presented-image.ts +63 -0
- package/src/timeline/projection.ts +1556 -71
- package/src/timeline/provider-logo.tsx +53 -0
- package/src/timeline/question-nav-model.ts +28 -0
- package/src/timeline/registry.ts +11 -1
- package/src/timeline/retained-image.ts +102 -0
- package/src/timeline/retained-loaders.ts +91 -0
- package/src/timeline/rolling-activity.tsx +84 -0
- package/src/timeline/screenshot-lightbox.tsx +250 -10
- package/src/timeline/session-usage-limit-row.tsx +44 -0
- package/src/timeline/shared.tsx +76 -29
- package/src/timeline/startup-dispatch-details.tsx +43 -0
- package/src/timeline/startup-preference.ts +33 -0
- package/src/timeline/startup-timings.tsx +164 -0
- package/src/timeline/tool-diff.tsx +3 -1
- package/src/timeline/tool-display-name.ts +38 -6
- package/src/timeline/tool-presentation.ts +1552 -0
- package/src/timeline/tool-renderers.tsx +1023 -1265
- package/src/timeline/turn-summary-model.ts +363 -0
- package/src/timeline/turn-summary.tsx +288 -367
- package/src/timeline/types.ts +191 -7
- package/src/timeline/work-presentation.ts +196 -0
- package/src/timeline-model.ts +143 -0
- package/src/usage/allowance-copy.ts +70 -0
- package/src/usage/session-usage-limit.ts +270 -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 +2010 -651
- package/styles/connect.css +290 -0
- package/styles/connect.d.ts +1 -0
- package/styles/effective-tokens.css +1 -0
- package/styles/index.css +286 -9
- package/styles/responsive.css +98 -6
- package/styles/session-capability.css +44 -0
- package/styles/this-computer.css +1042 -0
- package/styles/this-computer.d.ts +1 -0
- package/styles/tokens.css +132 -64
- package/dist/browser-viewer-NTD6UIPR.js +0 -14
- package/dist/chunk-24M4YBCL.js.map +0 -1
- package/dist/chunk-4MDLEHXL.js.map +0 -1
- package/dist/chunk-5M6VTFJ5.js.map +0 -1
- package/dist/chunk-5PQJOCX5.js +0 -902
- package/dist/chunk-5PQJOCX5.js.map +0 -1
- package/dist/chunk-5YK2ZDIG.js.map +0 -1
- package/dist/chunk-6J56T3MG.js.map +0 -1
- package/dist/chunk-BV5A4OTE.js.map +0 -1
- package/dist/chunk-CQG7YUJB.js +0 -10883
- package/dist/chunk-CQG7YUJB.js.map +0 -1
- package/dist/chunk-H5YGYNXS.js.map +0 -1
- package/dist/chunk-HUIKIDM5.js.map +0 -1
- package/dist/chunk-HUMIRRYI.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-NEXLLTP4.js.map +0 -1
- package/dist/chunk-NLTS7JHI.js.map +0 -1
- package/dist/chunk-NOSYBS2D.js.map +0 -1
- package/dist/chunk-PAJU5KKL.js.map +0 -1
- package/dist/chunk-PEI6RANI.js.map +0 -1
- package/dist/chunk-PLYRL5ER.js +0 -164
- package/dist/chunk-PLYRL5ER.js.map +0 -1
- package/dist/chunk-R4KRSFGA.js +0 -290
- package/dist/chunk-R4KRSFGA.js.map +0 -1
- package/dist/chunk-UMECRJRV.js +0 -223
- package/dist/chunk-UMECRJRV.js.map +0 -1
- package/dist/chunk-VRBL3F5E.js +0 -241
- package/dist/chunk-VRBL3F5E.js.map +0 -1
- package/dist/chunk-YBM6CQRU.js.map +0 -1
- package/dist/chunk-Z7WBDB4E.js.map +0 -1
- package/dist/computer-viewer-7TEZC6Y2.js +0 -16
- package/dist/fleet-decision-row-YZ3ZKWMM.js +0 -352
- package/dist/fleet-decision-row-YZ3ZKWMM.js.map +0 -1
- package/dist/hooks/use-environments.d.ts +0 -41
- package/dist/hooks/use-packs.d.ts +0 -32
- package/dist/markdown-table-layout-3Z3AWBY7.js.map +0 -1
- package/dist/model-policy-picker-menu-3R336DP2.js +0 -13
- package/dist/platform-activity-row-27LKAWZD.js +0 -169
- package/dist/platform-activity-row-27LKAWZD.js.map +0 -1
- package/dist/queue-surface-implementation-LK3S4BIW.js.map +0 -1
- package/dist/timeline-annotation-markers-DRSTLEM6.js.map +0 -1
- package/dist/timeline-annotation-selection-IHLUGVND.js.map +0 -1
- package/dist/timeline-annotations-dialog-6Q53N5FG.js.map +0 -1
- package/src/hooks/use-environments.ts +0 -182
- package/src/hooks/use-packs.ts +0 -157
- /package/dist/{browser-viewer-NTD6UIPR.js.map → browser-viewer-GEHX3KYE.js.map} +0 -0
- /package/dist/{computer-viewer-7TEZC6Y2.js.map → chat-interactive-block-5V3BGLXT.js.map} +0 -0
- /package/dist/{model-policy-picker-menu-3R336DP2.js.map → chunk-M357MHH3.js.map} +0 -0
package/dist/artifacts.js
CHANGED
|
@@ -1,302 +1,183 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
EditableDocumentArtifactSurface
|
|
7
|
-
} from "./chunk-HUIKIDM5.js";
|
|
3
|
+
ArtifactSandbox,
|
|
4
|
+
ChatInteractiveBlock,
|
|
5
|
+
DeferredChatMedia
|
|
6
|
+
} from "./chunk-YNXZRE3F.js";
|
|
8
7
|
import {
|
|
9
8
|
EditableSpreadsheetArtifactSurface,
|
|
10
9
|
EditableSpreadsheetGrid,
|
|
11
10
|
SpreadsheetArtifactSurface,
|
|
12
11
|
SpreadsheetGrid,
|
|
13
12
|
SpreadsheetProjectionGrid
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LNUD3JNI.js";
|
|
14
|
+
import {
|
|
15
|
+
DocumentArtifactSurface,
|
|
16
|
+
DocumentEditor,
|
|
17
|
+
DocumentProjectionArtifactSurface,
|
|
18
|
+
DocumentProjectionEditor,
|
|
19
|
+
EditableDocumentArtifactSurface
|
|
20
|
+
} from "./chunk-QOEWDOFW.js";
|
|
15
21
|
import {
|
|
16
22
|
EditablePresentationArtifactSurface,
|
|
17
23
|
PresentationArtifactSurface,
|
|
18
24
|
PresentationEditor,
|
|
19
25
|
PresentationProjectionArtifactSurface,
|
|
20
26
|
PresentationProjectionEditor
|
|
21
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KYVJMTXL.js";
|
|
28
|
+
import "./chunk-2DDJ6YH6.js";
|
|
22
29
|
import {
|
|
23
30
|
ArtifactSurface,
|
|
24
31
|
EditableArtifactMessage
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
} from "./chunk-CXIGFHVL.js";
|
|
33
|
+
import {
|
|
34
|
+
PatchApplyCommand,
|
|
35
|
+
useRetainedImageObjectUrl
|
|
36
|
+
} from "./chunk-ZO35BAMO.js";
|
|
37
|
+
import {
|
|
38
|
+
ArtifactBadge,
|
|
39
|
+
ArtifactButton,
|
|
40
|
+
ArtifactLabelsProvider,
|
|
41
|
+
ArtifactLoading,
|
|
42
|
+
ArtifactProblem,
|
|
43
|
+
ArtifactSelect,
|
|
44
|
+
ArtifactViewerHeader,
|
|
45
|
+
DEFAULT_ARTIFACT_LABELS,
|
|
46
|
+
artifactKindIcon,
|
|
47
|
+
artifactKindSubtitle,
|
|
48
|
+
artifactLoadErrorMessage,
|
|
49
|
+
artifactLoadErrorView,
|
|
50
|
+
useArtifactLabels
|
|
51
|
+
} from "./chunk-2XKRY4GF.js";
|
|
29
52
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
joinClientConfigRead
|
|
54
|
+
} from "./chunk-IGVL3ELX.js";
|
|
55
|
+
import "./chunk-BQYQU5QW.js";
|
|
56
|
+
import {
|
|
57
|
+
PUBLISHED_HTML_ARTIFACT_IFRAME_SANDBOX,
|
|
58
|
+
PublishedHtmlArtifactFrame,
|
|
59
|
+
openGeniSiteBridgePortFromBootstrap,
|
|
60
|
+
publishedHtmlArtifactDocument
|
|
61
|
+
} from "./chunk-IOD24LGR.js";
|
|
62
|
+
import {
|
|
63
|
+
isPatchFilename,
|
|
64
|
+
isRetainedImageContentType
|
|
65
|
+
} from "./chunk-P4MKPCTC.js";
|
|
66
|
+
import "./chunk-4F4FGCH2.js";
|
|
67
|
+
import {
|
|
68
|
+
inlineHtmlDocument
|
|
69
|
+
} from "./chunk-IGFZFLI2.js";
|
|
70
|
+
import {
|
|
71
|
+
loadSiteSnapshot
|
|
72
|
+
} from "./chunk-IOYHDEP3.js";
|
|
73
|
+
import "./chunk-PEHTX3V7.js";
|
|
74
|
+
import {
|
|
75
|
+
useOpenGeni
|
|
76
|
+
} from "./chunk-ZGFU4LVW.js";
|
|
77
|
+
import {
|
|
78
|
+
cn
|
|
79
|
+
} from "./chunk-TXS65BB2.js";
|
|
80
|
+
import {
|
|
81
|
+
useOpenGeniText
|
|
82
|
+
} from "./chunk-VU4QUISJ.js";
|
|
83
|
+
|
|
84
|
+
// src/components/artifacts/site-view.tsx
|
|
85
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
42
86
|
import { jsx } from "react/jsx-runtime";
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (!html.startsWith("<!--", cursor)) break;
|
|
73
|
-
const commentEnd = html.indexOf("-->", cursor + 4);
|
|
74
|
-
if (commentEnd < 0) return -1;
|
|
75
|
-
cursor = commentEnd + 3;
|
|
76
|
-
}
|
|
77
|
-
if (!lower.startsWith("<!doctype", cursor)) return -1;
|
|
78
|
-
return html.indexOf(">", cursor + 9);
|
|
79
|
-
}
|
|
80
|
-
function PublishedHtmlArtifactFrame(props) {
|
|
81
|
-
const frameRef = useRef(null);
|
|
82
|
-
const bridgeRef = useRef(props.toolBridge);
|
|
83
|
-
const onFrameLoadRef = useRef(() => void 0);
|
|
84
|
-
const frameLoadPendingRef = useRef(false);
|
|
85
|
-
const toolBridgeEnabled = props.toolBridge !== void 0;
|
|
86
|
-
useEffect(() => {
|
|
87
|
-
bridgeRef.current = props.toolBridge;
|
|
88
|
-
}, [props.toolBridge]);
|
|
89
|
-
useEffect(() => {
|
|
90
|
-
if (!toolBridgeEnabled || typeof window === "undefined") return;
|
|
91
|
-
const requests = new SiteBridgeRequestRegistry();
|
|
92
|
-
const attachToolPort = (data, ports) => {
|
|
93
|
-
const port = openGeniSiteBridgePortFromBootstrap(data, ports);
|
|
94
|
-
if (!port) return;
|
|
95
|
-
requests.addPort(port);
|
|
96
|
-
port.addEventListener("message", (portEvent) => {
|
|
97
|
-
const message = portEvent.data;
|
|
98
|
-
if (isOpenGeniSiteBridgeCancelMessage(message)) {
|
|
99
|
-
requests.cancel(port, message.requestId);
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
if (isSiteHttpRequest(message) && portEvent.ports.length === 1) {
|
|
103
|
-
const controller2 = requests.start(port, message.requestId);
|
|
104
|
-
if (!controller2) {
|
|
105
|
-
portEvent.ports[0].close();
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
void serveSiteHttp(
|
|
109
|
-
message,
|
|
110
|
-
portEvent.ports[0],
|
|
111
|
-
async (request, signal) => {
|
|
112
|
-
const fetch = bridgeRef.current?.fetch;
|
|
113
|
-
if (!fetch) throw new Error("This Site host does not support the session SDK");
|
|
114
|
-
return fetch(request, signal);
|
|
115
|
-
},
|
|
116
|
-
controller2.signal
|
|
117
|
-
).finally(() => requests.complete(port, message.requestId, controller2));
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
if (!isOpenGeniSiteBridgeRequestMessage(message)) return;
|
|
121
|
-
const controller = requests.start(port, message.requestId);
|
|
122
|
-
if (!controller) {
|
|
123
|
-
port.postMessage({
|
|
124
|
-
type: OPENGENI_SITE_BRIDGE_RESPONSE,
|
|
125
|
-
version: OPENGENI_SITE_BRIDGE_VERSION,
|
|
126
|
-
requestId: message.requestId,
|
|
127
|
-
ok: false,
|
|
128
|
-
error: {
|
|
129
|
-
code: "duplicate_request_id",
|
|
130
|
-
message: "A Site tool request with this id is already running",
|
|
131
|
-
retryable: false
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
void handleSiteBridgeRequest(bridgeRef.current, message, controller.signal).then((value) => {
|
|
137
|
-
if (!controller.signal.aborted) {
|
|
138
|
-
port.postMessage({
|
|
139
|
-
type: OPENGENI_SITE_BRIDGE_RESPONSE,
|
|
140
|
-
version: OPENGENI_SITE_BRIDGE_VERSION,
|
|
141
|
-
requestId: message.requestId,
|
|
142
|
-
ok: true,
|
|
143
|
-
value
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}).catch((error) => {
|
|
147
|
-
if (!controller.signal.aborted) {
|
|
148
|
-
port.postMessage({
|
|
149
|
-
type: OPENGENI_SITE_BRIDGE_RESPONSE,
|
|
150
|
-
version: OPENGENI_SITE_BRIDGE_VERSION,
|
|
151
|
-
requestId: message.requestId,
|
|
152
|
-
ok: false,
|
|
153
|
-
error: siteBridgeError(error)
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
}).finally(() => requests.complete(port, message.requestId, controller));
|
|
157
|
-
});
|
|
158
|
-
port.addEventListener("messageerror", () => requests.closePort(port));
|
|
159
|
-
port.start();
|
|
160
|
-
port.postMessage({
|
|
161
|
-
type: OPENGENI_SITE_BRIDGE_READY,
|
|
162
|
-
version: OPENGENI_SITE_BRIDGE_VERSION
|
|
87
|
+
function SiteView({
|
|
88
|
+
client,
|
|
89
|
+
workspaceId,
|
|
90
|
+
siteId,
|
|
91
|
+
toolBridge,
|
|
92
|
+
viewer,
|
|
93
|
+
theme,
|
|
94
|
+
archivedMessage,
|
|
95
|
+
showTitle = true,
|
|
96
|
+
loadingLabel,
|
|
97
|
+
onTitle,
|
|
98
|
+
className
|
|
99
|
+
}) {
|
|
100
|
+
const t = useOpenGeniText();
|
|
101
|
+
const labels = useArtifactLabels();
|
|
102
|
+
const [snapshot, setSnapshot] = useState(null);
|
|
103
|
+
const [error, setError] = useState(null);
|
|
104
|
+
const readAbort = useRef(null);
|
|
105
|
+
const onTitleRef = useRef(onTitle);
|
|
106
|
+
onTitleRef.current = onTitle;
|
|
107
|
+
const load = useCallback(async () => {
|
|
108
|
+
readAbort.current?.abort();
|
|
109
|
+
const abort = new AbortController();
|
|
110
|
+
readAbort.current = abort;
|
|
111
|
+
try {
|
|
112
|
+
setError(null);
|
|
113
|
+
const next = await loadSiteSnapshot(client, workspaceId, siteId, {
|
|
114
|
+
signal: abort.signal,
|
|
115
|
+
includeArchivedContent: true
|
|
163
116
|
});
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
};
|
|
172
|
-
onFrameLoadRef.current = onFrameLoad;
|
|
173
|
-
if (frameLoadPendingRef.current) {
|
|
174
|
-
frameLoadPendingRef.current = false;
|
|
175
|
-
onFrameLoad();
|
|
117
|
+
if (abort.signal.aborted) return;
|
|
118
|
+
setSnapshot(next);
|
|
119
|
+
onTitleRef.current?.(next.detail.artifact.title);
|
|
120
|
+
} catch (nextError) {
|
|
121
|
+
if (abort.signal.aborted) return;
|
|
122
|
+
setSnapshot(null);
|
|
123
|
+
setError(nextError);
|
|
176
124
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
125
|
+
}, [client, siteId, workspaceId]);
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
setSnapshot(null);
|
|
128
|
+
void load();
|
|
129
|
+
return () => readAbort.current?.abort();
|
|
130
|
+
}, [load]);
|
|
131
|
+
const content = snapshot?.content;
|
|
132
|
+
const bridge = useMemo(
|
|
133
|
+
() => content ? toolBridge?.({
|
|
134
|
+
artifactId: siteId,
|
|
135
|
+
siteVersionId: content.versionId,
|
|
136
|
+
requestedTools: content.requestedTools
|
|
137
|
+
}) : void 0,
|
|
138
|
+
[content, siteId, toolBridge]
|
|
139
|
+
);
|
|
140
|
+
if (error)
|
|
141
|
+
return /* @__PURE__ */ jsx(
|
|
142
|
+
ArtifactProblem,
|
|
143
|
+
{
|
|
144
|
+
view: artifactLoadErrorView(t, error, "site", labels),
|
|
145
|
+
onRetry: () => void load()
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
if (!snapshot || !content) return /* @__PURE__ */ jsx(ArtifactLoading, { label: loadingLabel ?? labels.loadingSite });
|
|
149
|
+
if (snapshot.detail.artifact.status === "archived")
|
|
150
|
+
return /* @__PURE__ */ jsx("div", { className: "p-4 text-sm text-fg-muted", children: archivedMessage ?? labels.siteArchived });
|
|
182
151
|
return /* @__PURE__ */ jsx(
|
|
183
|
-
|
|
152
|
+
ArtifactSandbox,
|
|
184
153
|
{
|
|
185
|
-
|
|
186
|
-
title:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
154
|
+
html: content.html,
|
|
155
|
+
title: snapshot.detail.artifact.title,
|
|
156
|
+
showTitle,
|
|
157
|
+
versionLabel: snapshot.detail.artifact.currentVersion ? t("artifacts.siteView.vRevision", {
|
|
158
|
+
revision: snapshot.detail.artifact.currentVersion.revision
|
|
159
|
+
}) : void 0,
|
|
160
|
+
toolBridge: bridge,
|
|
161
|
+
viewer,
|
|
162
|
+
connectedToolCount: content.requestedTools.length,
|
|
163
|
+
theme,
|
|
164
|
+
fill: true,
|
|
165
|
+
className: className ?? "h-full rounded-none border-0"
|
|
196
166
|
}
|
|
197
167
|
);
|
|
198
168
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
const controllers = this.controllersByPort.get(port);
|
|
206
|
-
if (!controllers || controllers.has(requestId)) return null;
|
|
207
|
-
const controller = new AbortController();
|
|
208
|
-
controllers.set(requestId, controller);
|
|
209
|
-
return controller;
|
|
210
|
-
}
|
|
211
|
-
cancel(port, requestId) {
|
|
212
|
-
const controllers = this.controllersByPort.get(port);
|
|
213
|
-
const controller = controllers?.get(requestId);
|
|
214
|
-
if (!controller) return;
|
|
215
|
-
controller.abort(new Error("Site tool request cancelled"));
|
|
216
|
-
controllers.delete(requestId);
|
|
217
|
-
}
|
|
218
|
-
complete(port, requestId, controller) {
|
|
219
|
-
const controllers = this.controllersByPort.get(port);
|
|
220
|
-
if (controllers?.get(requestId) === controller) controllers.delete(requestId);
|
|
221
|
-
}
|
|
222
|
-
closePort(port) {
|
|
223
|
-
const controllers = this.controllersByPort.get(port);
|
|
224
|
-
if (!controllers) return;
|
|
225
|
-
for (const controller of controllers.values()) {
|
|
226
|
-
controller.abort(new Error("Site tool bridge port closed"));
|
|
227
|
-
}
|
|
228
|
-
controllers.clear();
|
|
229
|
-
this.controllersByPort.delete(port);
|
|
230
|
-
port.close();
|
|
231
|
-
}
|
|
232
|
-
closeAll() {
|
|
233
|
-
for (const port of [...this.controllersByPort.keys()]) this.closePort(port);
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
var SiteBridgeDocumentLease = class {
|
|
237
|
-
constructor(attachToolPort, closeActivePorts, createMessageChannel = () => new MessageChannel()) {
|
|
238
|
-
this.attachToolPort = attachToolPort;
|
|
239
|
-
this.closeActivePorts = closeActivePorts;
|
|
240
|
-
this.createMessageChannel = createMessageChannel;
|
|
241
|
-
}
|
|
242
|
-
loaded = false;
|
|
243
|
-
bootstrapPort = null;
|
|
244
|
-
load(frameWindow) {
|
|
245
|
-
if (this.loaded) {
|
|
246
|
-
this.close();
|
|
247
|
-
return false;
|
|
248
|
-
}
|
|
249
|
-
this.loaded = true;
|
|
250
|
-
const channel = this.createMessageChannel();
|
|
251
|
-
this.bootstrapPort = channel.port1;
|
|
252
|
-
channel.port1.addEventListener("message", (event) => {
|
|
253
|
-
this.attachToolPort(event.data, event.ports);
|
|
254
|
-
});
|
|
255
|
-
channel.port1.start();
|
|
256
|
-
frameWindow.postMessage(
|
|
257
|
-
{
|
|
258
|
-
type: OPENGENI_SITE_BRIDGE_READY,
|
|
259
|
-
version: OPENGENI_SITE_BRIDGE_VERSION
|
|
260
|
-
},
|
|
261
|
-
"*",
|
|
262
|
-
[channel.port2]
|
|
263
|
-
);
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
close() {
|
|
267
|
-
this.bootstrapPort?.close();
|
|
268
|
-
this.bootstrapPort = null;
|
|
269
|
-
this.closeActivePorts();
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
function openGeniSiteBridgePortFromBootstrap(data, ports) {
|
|
273
|
-
if (!isOpenGeniSiteBridgeConnectMessage(data)) return null;
|
|
274
|
-
return ports.length === 1 ? ports[0] : null;
|
|
275
|
-
}
|
|
276
|
-
async function handleSiteBridgeRequest(bridge, message, signal) {
|
|
277
|
-
if (!bridge) throw new Error("Site tool bridge is unavailable");
|
|
278
|
-
if (message.method === "catalog") return await bridge.catalog({ signal });
|
|
279
|
-
if (message.method === "declarations") {
|
|
280
|
-
if (!bridge.declarations) throw new Error("Site tool declarations are unavailable");
|
|
281
|
-
return await bridge.declarations({ signal });
|
|
282
|
-
}
|
|
283
|
-
return await bridge.call(sanitizeOpenGeniSiteToolCallRequest(message.payload), { signal });
|
|
284
|
-
}
|
|
285
|
-
function siteBridgeError(error) {
|
|
286
|
-
const candidate = error;
|
|
287
|
-
return {
|
|
288
|
-
code: typeof candidate?.code === "string" ? candidate.code : "site_tool_call_failed",
|
|
289
|
-
message: typeof candidate?.message === "string" ? candidate.message : "Site tool request failed",
|
|
290
|
-
retryable: candidate?.retryable === true,
|
|
291
|
-
outcomeUnknown: candidate?.outcomeUnknown === true
|
|
292
|
-
};
|
|
293
|
-
}
|
|
169
|
+
|
|
170
|
+
// src/components/artifacts/editable-artifact-view.tsx
|
|
171
|
+
import {
|
|
172
|
+
createBrowserEditableArtifactSession as createBrowserEditableArtifactSession2
|
|
173
|
+
} from "@opengeni/sdk/editable-artifacts";
|
|
174
|
+
import { useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
|
|
294
175
|
|
|
295
176
|
// src/components/artifacts/editable-artifact-workbench.tsx
|
|
296
177
|
import {
|
|
297
178
|
createBrowserEditableArtifactSession
|
|
298
179
|
} from "@opengeni/sdk/editable-artifacts";
|
|
299
|
-
import { useCallback, useEffect as useEffect2, useRef as useRef2, useState } from "react";
|
|
180
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
|
|
300
181
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
301
182
|
function EditableArtifactWorkbench({
|
|
302
183
|
session,
|
|
@@ -304,6 +185,7 @@ function EditableArtifactWorkbench({
|
|
|
304
185
|
spreadsheet,
|
|
305
186
|
presentation
|
|
306
187
|
}) {
|
|
188
|
+
const t = useOpenGeniText();
|
|
307
189
|
switch (session.modality) {
|
|
308
190
|
case "document":
|
|
309
191
|
return /* @__PURE__ */ jsx2(
|
|
@@ -311,7 +193,7 @@ function EditableArtifactWorkbench({
|
|
|
311
193
|
{
|
|
312
194
|
...document,
|
|
313
195
|
session,
|
|
314
|
-
title: document?.title ?? "
|
|
196
|
+
title: document?.title ?? t("artifacts.editableArtifactWorkbench.document")
|
|
315
197
|
}
|
|
316
198
|
);
|
|
317
199
|
case "spreadsheet":
|
|
@@ -328,8 +210,8 @@ function EditableArtifactWorkbenchHost({
|
|
|
328
210
|
presentation
|
|
329
211
|
}) {
|
|
330
212
|
const createSessionRef = useRef2(createSession);
|
|
331
|
-
const [retryEpoch, setRetryEpoch] =
|
|
332
|
-
const [state, setState] =
|
|
213
|
+
const [retryEpoch, setRetryEpoch] = useState2(0);
|
|
214
|
+
const [state, setState] = useState2({ key: null, session: null, error: null });
|
|
333
215
|
useEffect2(() => {
|
|
334
216
|
createSessionRef.current = createSession;
|
|
335
217
|
}, [createSession]);
|
|
@@ -352,7 +234,8 @@ function EditableArtifactWorkbenchHost({
|
|
|
352
234
|
if (closing) void closing.close().catch(() => void 0);
|
|
353
235
|
};
|
|
354
236
|
}, [retryEpoch, sessionKey]);
|
|
355
|
-
const retry =
|
|
237
|
+
const retry = useCallback2(() => setRetryEpoch((value) => value + 1), []);
|
|
238
|
+
const labels = useArtifactLabels();
|
|
356
239
|
const currentError = state.key === sessionKey ? state.error : null;
|
|
357
240
|
if (state.key === sessionKey && state.session) {
|
|
358
241
|
return /* @__PURE__ */ jsx2(
|
|
@@ -368,9 +251,10 @@ function EditableArtifactWorkbenchHost({
|
|
|
368
251
|
return /* @__PURE__ */ jsx2(
|
|
369
252
|
EditableArtifactMessage,
|
|
370
253
|
{
|
|
371
|
-
title: currentError ?
|
|
372
|
-
detail: currentError?.message ??
|
|
373
|
-
retry: currentError ? retry : void 0
|
|
254
|
+
title: currentError ? labels.editableErrors.transient.title : labels.opening,
|
|
255
|
+
detail: currentError?.message ?? labels.startingEditor,
|
|
256
|
+
retry: currentError ? retry : void 0,
|
|
257
|
+
retryLabel: labels.retry
|
|
374
258
|
}
|
|
375
259
|
);
|
|
376
260
|
}
|
|
@@ -381,7 +265,7 @@ function BrowserEditableArtifactWorkbench({
|
|
|
381
265
|
presentation
|
|
382
266
|
}) {
|
|
383
267
|
const sessionKey = browserSessionKey(options);
|
|
384
|
-
const createSession =
|
|
268
|
+
const createSession = useCallback2(() => createBrowserEditableArtifactSession(options), [options]);
|
|
385
269
|
return /* @__PURE__ */ jsx2(
|
|
386
270
|
EditableArtifactWorkbenchHost,
|
|
387
271
|
{
|
|
@@ -413,13 +297,381 @@ function browserSessionKey(options) {
|
|
|
413
297
|
(_key, value) => value instanceof URL ? value.href : value
|
|
414
298
|
);
|
|
415
299
|
}
|
|
300
|
+
|
|
301
|
+
// src/components/artifacts/editable-artifact-view.tsx
|
|
302
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
303
|
+
function EditableArtifactView({
|
|
304
|
+
baseUrl,
|
|
305
|
+
workspaceId,
|
|
306
|
+
artifactId,
|
|
307
|
+
open,
|
|
308
|
+
runtimes,
|
|
309
|
+
transport,
|
|
310
|
+
showHeader = true,
|
|
311
|
+
authorityKey,
|
|
312
|
+
describeError,
|
|
313
|
+
onTitle,
|
|
314
|
+
loadingLabel,
|
|
315
|
+
downloadSpreadsheet
|
|
316
|
+
}) {
|
|
317
|
+
const t = useOpenGeniText();
|
|
318
|
+
const [loadEpoch, setLoadEpoch] = useState3(0);
|
|
319
|
+
const labels = useArtifactLabels();
|
|
320
|
+
const loadKey = JSON.stringify([artifactId, authorityKey, baseUrl.href, workspaceId, loadEpoch]);
|
|
321
|
+
const [state, setState] = useState3({ key: null, kind: "loading" });
|
|
322
|
+
const current = state.key === loadKey ? state : null;
|
|
323
|
+
const openRef = useRef3(open);
|
|
324
|
+
openRef.current = open;
|
|
325
|
+
const onTitleRef = useRef3(onTitle);
|
|
326
|
+
onTitleRef.current = onTitle;
|
|
327
|
+
useEffect3(() => {
|
|
328
|
+
const abort = new AbortController();
|
|
329
|
+
setState({ key: loadKey, kind: "loading" });
|
|
330
|
+
void openRef.current(abort.signal).then((value) => {
|
|
331
|
+
if (abort.signal.aborted) return;
|
|
332
|
+
setState({ key: loadKey, kind: "ready", value });
|
|
333
|
+
onTitleRef.current?.(value.artifact.title);
|
|
334
|
+
}).catch((error) => {
|
|
335
|
+
if (!abort.signal.aborted) setState({ key: loadKey, kind: "error", error });
|
|
336
|
+
});
|
|
337
|
+
return () => abort.abort();
|
|
338
|
+
}, [loadKey]);
|
|
339
|
+
const ready = current?.kind === "ready" ? current.value : null;
|
|
340
|
+
const transportRef = useRef3(transport);
|
|
341
|
+
transportRef.current = transport;
|
|
342
|
+
const sessionKey = useMemo2(
|
|
343
|
+
() => ready ? JSON.stringify({
|
|
344
|
+
baseUrl: baseUrl.href,
|
|
345
|
+
authorityKey,
|
|
346
|
+
workspaceId,
|
|
347
|
+
artifact: { id: ready.artifact.id, modality: ready.artifact.modality },
|
|
348
|
+
authority: ready.authority,
|
|
349
|
+
replicaId: ready.replicaId,
|
|
350
|
+
workerUrl: runtimes.workerUrl
|
|
351
|
+
}) : "",
|
|
352
|
+
[authorityKey, baseUrl.href, ready, runtimes.workerUrl, workspaceId]
|
|
353
|
+
);
|
|
354
|
+
const createSession = useCallback3(() => {
|
|
355
|
+
if (!ready) throw new Error("Artifact is not open");
|
|
356
|
+
return createBrowserEditableArtifactSession2({
|
|
357
|
+
baseUrl,
|
|
358
|
+
workspaceId,
|
|
359
|
+
artifact: ready.artifact,
|
|
360
|
+
storageAuthority: ready.authority,
|
|
361
|
+
replicaId: ready.replicaId,
|
|
362
|
+
runtime: {
|
|
363
|
+
...runtimeFor(runtimes, ready.artifact.modality),
|
|
364
|
+
workerUrl: runtimes.workerUrl,
|
|
365
|
+
...runtimes.applicationOrigin ? { applicationOrigin: runtimes.applicationOrigin } : {},
|
|
366
|
+
...runtimes.allowInsecureDevelopmentAssets ? { allowInsecureDevelopmentAssets: true } : {}
|
|
367
|
+
},
|
|
368
|
+
...transportRef.current ? { transport: transportRef.current } : {}
|
|
369
|
+
});
|
|
370
|
+
}, [baseUrl, ready, runtimes, workspaceId]);
|
|
371
|
+
if (!current || current.kind === "loading")
|
|
372
|
+
return /* @__PURE__ */ jsx3(ArtifactLoading, { label: loadingLabel ?? labels.opening });
|
|
373
|
+
if (current.kind === "error") {
|
|
374
|
+
return /* @__PURE__ */ jsx3(
|
|
375
|
+
ArtifactProblem,
|
|
376
|
+
{
|
|
377
|
+
view: describeError ? describeError(current.error) : artifactLoadErrorView(t, current.error, "editable", labels),
|
|
378
|
+
onRetry: () => setLoadEpoch((value) => value + 1)
|
|
379
|
+
}
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
const { artifact } = current.value;
|
|
383
|
+
const surface = { title: artifact.title, showHeader };
|
|
384
|
+
return /* @__PURE__ */ jsx3("div", { className: "h-full min-h-0 bg-og-bg text-og-fg", children: /* @__PURE__ */ jsx3(
|
|
385
|
+
EditableArtifactWorkbenchHost,
|
|
386
|
+
{
|
|
387
|
+
sessionKey,
|
|
388
|
+
createSession,
|
|
389
|
+
document: surface,
|
|
390
|
+
spreadsheet: {
|
|
391
|
+
...surface,
|
|
392
|
+
download: downloadSpreadsheet ? (signal) => downloadSpreadsheet(current.value, signal) : void 0
|
|
393
|
+
},
|
|
394
|
+
presentation: surface
|
|
395
|
+
}
|
|
396
|
+
) });
|
|
397
|
+
}
|
|
398
|
+
function runtimeFor(runtimes, modality) {
|
|
399
|
+
switch (modality) {
|
|
400
|
+
case "document":
|
|
401
|
+
return runtimes.document;
|
|
402
|
+
case "spreadsheet":
|
|
403
|
+
return runtimes.spreadsheet;
|
|
404
|
+
case "presentation":
|
|
405
|
+
return runtimes.presentation;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// src/components/artifacts/session-artifact-viewer.tsx
|
|
410
|
+
import { SESSION_SCOPE_HEADER } from "@opengeni/sdk";
|
|
411
|
+
import { createEditableArtifactReplicaId } from "@opengeni/sdk/editable-artifacts";
|
|
412
|
+
import { useCallback as useCallback4, useEffect as useEffect4, useMemo as useMemo3, useRef as useRef4, useState as useState4 } from "react";
|
|
413
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
414
|
+
var viewerClientKeys = /* @__PURE__ */ new WeakMap();
|
|
415
|
+
function viewerClientKey(client) {
|
|
416
|
+
let key = viewerClientKeys.get(client);
|
|
417
|
+
if (!key) {
|
|
418
|
+
key = crypto.randomUUID();
|
|
419
|
+
viewerClientKeys.set(client, key);
|
|
420
|
+
}
|
|
421
|
+
return key;
|
|
422
|
+
}
|
|
423
|
+
function SessionArtifactViewer({ labels, ...props }) {
|
|
424
|
+
return /* @__PURE__ */ jsx4(ArtifactLabelsProvider, { labels, children: /* @__PURE__ */ jsx4(Viewer, { ...props }) });
|
|
425
|
+
}
|
|
426
|
+
function Viewer({
|
|
427
|
+
client: clientOverride,
|
|
428
|
+
workspaceId: workspaceOverride,
|
|
429
|
+
sessionId,
|
|
430
|
+
target,
|
|
431
|
+
onClose,
|
|
432
|
+
onBack,
|
|
433
|
+
editableRuntimes,
|
|
434
|
+
theme,
|
|
435
|
+
siteToolBridge,
|
|
436
|
+
className
|
|
437
|
+
}) {
|
|
438
|
+
const labels = useArtifactLabels();
|
|
439
|
+
const context = useOpenGeni({ client: clientOverride, workspaceId: workspaceOverride });
|
|
440
|
+
const base = context.client;
|
|
441
|
+
const workspaceId = context.workspaceId;
|
|
442
|
+
const client = useMemo3(
|
|
443
|
+
() => base.withHeaders({ [SESSION_SCOPE_HEADER]: sessionId }),
|
|
444
|
+
[base, sessionId]
|
|
445
|
+
);
|
|
446
|
+
const [loaded, setLoaded] = useState4(null);
|
|
447
|
+
const targetKey = `${target.kind}:${target.artifactId}`;
|
|
448
|
+
const current = loaded?.key === targetKey && loaded.client === client && loaded.workspaceId === workspaceId ? loaded : null;
|
|
449
|
+
const kind = target.kind === "site" ? "site" : current?.kind ?? null;
|
|
450
|
+
const [unavailable, setUnavailable] = useState4(null);
|
|
451
|
+
const markUnavailable = useCallback4(
|
|
452
|
+
() => setUnavailable({ key: targetKey, client, workspaceId }),
|
|
453
|
+
[client, targetKey, workspaceId]
|
|
454
|
+
);
|
|
455
|
+
const title = current?.title ?? target.title ?? (unavailable?.key === targetKey && unavailable.client === client && unavailable.workspaceId === workspaceId ? labels.artifact : labels.opening);
|
|
456
|
+
return /* @__PURE__ */ jsxs(
|
|
457
|
+
"section",
|
|
458
|
+
{
|
|
459
|
+
"aria-label": title,
|
|
460
|
+
"data-og-artifact-viewer": target.kind,
|
|
461
|
+
className: cn("og-root flex h-full min-h-0 w-full min-w-0 flex-col bg-bg text-fg", className),
|
|
462
|
+
children: [
|
|
463
|
+
/* @__PURE__ */ jsx4(
|
|
464
|
+
ArtifactViewerHeader,
|
|
465
|
+
{
|
|
466
|
+
kind,
|
|
467
|
+
title,
|
|
468
|
+
onBack,
|
|
469
|
+
backLabel: labels.back,
|
|
470
|
+
onClose,
|
|
471
|
+
closeLabel: labels.close
|
|
472
|
+
}
|
|
473
|
+
),
|
|
474
|
+
/* @__PURE__ */ jsx4("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", children: target.kind === "site" ? /* @__PURE__ */ jsx4(
|
|
475
|
+
SiteView,
|
|
476
|
+
{
|
|
477
|
+
client,
|
|
478
|
+
workspaceId,
|
|
479
|
+
siteId: target.artifactId,
|
|
480
|
+
theme,
|
|
481
|
+
toolBridge: siteToolBridge,
|
|
482
|
+
showTitle: false,
|
|
483
|
+
onTitle: (next) => setLoaded({ key: targetKey, client, workspaceId, title: next, kind: "site" })
|
|
484
|
+
},
|
|
485
|
+
targetKey
|
|
486
|
+
) : /* @__PURE__ */ jsx4(
|
|
487
|
+
EditableBody,
|
|
488
|
+
{
|
|
489
|
+
client,
|
|
490
|
+
workspaceId,
|
|
491
|
+
sessionId,
|
|
492
|
+
artifactId: target.artifactId,
|
|
493
|
+
runtimes: editableRuntimes,
|
|
494
|
+
onOpened: (next, modality) => setLoaded({ key: targetKey, client, workspaceId, title: next, kind: modality }),
|
|
495
|
+
onUnavailable: markUnavailable
|
|
496
|
+
},
|
|
497
|
+
targetKey
|
|
498
|
+
) })
|
|
499
|
+
]
|
|
500
|
+
}
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
function EditableBody({
|
|
504
|
+
client,
|
|
505
|
+
workspaceId,
|
|
506
|
+
sessionId,
|
|
507
|
+
artifactId,
|
|
508
|
+
runtimes,
|
|
509
|
+
onOpened,
|
|
510
|
+
onUnavailable
|
|
511
|
+
}) {
|
|
512
|
+
const t = useOpenGeniText();
|
|
513
|
+
const labels = useArtifactLabels();
|
|
514
|
+
const clientKey = viewerClientKey(client);
|
|
515
|
+
const [retryEpoch, setRetryEpoch] = useState4(0);
|
|
516
|
+
const [configState, setConfigState] = useState4(null);
|
|
517
|
+
const current = configState?.client === client && configState.workspaceId === workspaceId && configState.sessionId === sessionId ? configState.result : null;
|
|
518
|
+
const config = current?.kind === "ready" ? current.config : null;
|
|
519
|
+
const scopeRef = useRef4({ client, workspaceId, sessionId });
|
|
520
|
+
scopeRef.current = { client, workspaceId, sessionId };
|
|
521
|
+
useEffect4(() => {
|
|
522
|
+
let live = true;
|
|
523
|
+
setConfigState(null);
|
|
524
|
+
joinClientConfigRead(client).then(
|
|
525
|
+
(value) => live && setConfigState({
|
|
526
|
+
client,
|
|
527
|
+
workspaceId,
|
|
528
|
+
sessionId,
|
|
529
|
+
result: value.artifacts ? { kind: "ready", config: value.artifacts } : { kind: "unavailable" }
|
|
530
|
+
}),
|
|
531
|
+
(error) => live && setConfigState({ client, workspaceId, sessionId, result: { kind: "error", error } })
|
|
532
|
+
);
|
|
533
|
+
return () => {
|
|
534
|
+
live = false;
|
|
535
|
+
};
|
|
536
|
+
}, [client, retryEpoch, sessionId, workspaceId]);
|
|
537
|
+
const baseUrl = useMemo3(
|
|
538
|
+
() => new URL(client.apiUrl("/"), globalThis.location?.href ?? "http://localhost/"),
|
|
539
|
+
[client]
|
|
540
|
+
);
|
|
541
|
+
const transport = useMemo3(() => {
|
|
542
|
+
if (!config) return void 0;
|
|
543
|
+
const socket = new URL(config.editableLiveUrl);
|
|
544
|
+
let scope = new AbortController();
|
|
545
|
+
const checkCurrent = (signal) => {
|
|
546
|
+
signal.throwIfAborted();
|
|
547
|
+
if (scopeRef.current.client !== client || scopeRef.current.workspaceId !== workspaceId || scopeRef.current.sessionId !== sessionId) {
|
|
548
|
+
throw new DOMException("Artifact viewer scope changed", "AbortError");
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
return {
|
|
552
|
+
activate: () => {
|
|
553
|
+
if (scope.signal.aborted) scope = new AbortController();
|
|
554
|
+
},
|
|
555
|
+
abort: () => scope.abort(),
|
|
556
|
+
fetch: async (input, init) => {
|
|
557
|
+
const signal = AbortSignal.any([scope.signal, ...init?.signal ? [init.signal] : []]);
|
|
558
|
+
checkCurrent(signal);
|
|
559
|
+
const url = new URL(input instanceof Request ? input.url : input, baseUrl);
|
|
560
|
+
if (init?.method === "POST" && url.pathname === new URL(
|
|
561
|
+
`v1/workspaces/${encodeURIComponent(workspaceId)}/editable-artifacts/${encodeURIComponent(artifactId)}/live-ticket`,
|
|
562
|
+
baseUrl
|
|
563
|
+
).pathname) {
|
|
564
|
+
const next = (await client.getClientConfig({ signal })).artifacts;
|
|
565
|
+
checkCurrent(signal);
|
|
566
|
+
if (!next || artifactCapabilityKey(next) !== artifactCapabilityKey(config)) {
|
|
567
|
+
setConfigState({
|
|
568
|
+
client,
|
|
569
|
+
workspaceId,
|
|
570
|
+
sessionId,
|
|
571
|
+
result: next ? { kind: "ready", config: next } : { kind: "unavailable" }
|
|
572
|
+
});
|
|
573
|
+
scope.abort();
|
|
574
|
+
signal.throwIfAborted();
|
|
575
|
+
}
|
|
576
|
+
const { replicaId } = await new Request(input, init).json();
|
|
577
|
+
if (typeof replicaId !== "string") throw new TypeError("Artifact replica is required");
|
|
578
|
+
await client.getEditableArtifact(workspaceId, artifactId, { replicaId, signal });
|
|
579
|
+
checkCurrent(signal);
|
|
580
|
+
}
|
|
581
|
+
return client.fetchApi(url, { ...init, signal });
|
|
582
|
+
},
|
|
583
|
+
webSocketUrl: socket,
|
|
584
|
+
...isLoopback(baseUrl) && isLoopback(socket) ? { allowInsecureDevelopmentTransport: true } : {}
|
|
585
|
+
};
|
|
586
|
+
}, [artifactId, baseUrl, client, config, sessionId, workspaceId]);
|
|
587
|
+
useEffect4(() => {
|
|
588
|
+
transport?.activate();
|
|
589
|
+
return () => transport?.abort();
|
|
590
|
+
}, [transport]);
|
|
591
|
+
const blocked = current !== null && (current.kind !== "ready" || !runtimes);
|
|
592
|
+
useEffect4(() => {
|
|
593
|
+
if (blocked) onUnavailable();
|
|
594
|
+
}, [blocked, onUnavailable]);
|
|
595
|
+
if (!current) return /* @__PURE__ */ jsx4(ArtifactLoading, { label: labels.opening });
|
|
596
|
+
if (current.kind === "error") {
|
|
597
|
+
return /* @__PURE__ */ jsx4(
|
|
598
|
+
ArtifactProblem,
|
|
599
|
+
{
|
|
600
|
+
view: artifactLoadErrorView(t, current.error, "editable", labels),
|
|
601
|
+
onRetry: () => setRetryEpoch((value) => value + 1)
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
if (!config || !transport) {
|
|
606
|
+
return /* @__PURE__ */ jsx4(ArtifactProblem, { view: { ...labels.viewingDisabled, retryable: false } });
|
|
607
|
+
}
|
|
608
|
+
if (!runtimes) {
|
|
609
|
+
return /* @__PURE__ */ jsx4(ArtifactProblem, { view: { ...labels.editorsMissing, retryable: false } });
|
|
610
|
+
}
|
|
611
|
+
return /* @__PURE__ */ jsx4(
|
|
612
|
+
EditableArtifactView,
|
|
613
|
+
{
|
|
614
|
+
baseUrl,
|
|
615
|
+
workspaceId,
|
|
616
|
+
artifactId,
|
|
617
|
+
authorityKey: JSON.stringify([clientKey, sessionId, artifactCapabilityKey(config)]),
|
|
618
|
+
runtimes: {
|
|
619
|
+
...runtimes,
|
|
620
|
+
...isLoopback(baseUrl) ? { allowInsecureDevelopmentAssets: true } : {}
|
|
621
|
+
},
|
|
622
|
+
transport,
|
|
623
|
+
showHeader: false,
|
|
624
|
+
open: async (signal) => {
|
|
625
|
+
const replicaId = createEditableArtifactReplicaId();
|
|
626
|
+
const artifact = await client.getEditableArtifact(workspaceId, artifactId, {
|
|
627
|
+
replicaId,
|
|
628
|
+
signal
|
|
629
|
+
});
|
|
630
|
+
signal.throwIfAborted();
|
|
631
|
+
onOpened(artifact.title, artifact.modality);
|
|
632
|
+
return {
|
|
633
|
+
artifact,
|
|
634
|
+
replicaId,
|
|
635
|
+
authority: {
|
|
636
|
+
deploymentOrigin: baseUrl.origin,
|
|
637
|
+
workspaceId,
|
|
638
|
+
...config.cachePartition
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
);
|
|
644
|
+
}
|
|
645
|
+
function artifactCapabilityKey(config) {
|
|
646
|
+
return JSON.stringify([
|
|
647
|
+
config.editableLiveUrl,
|
|
648
|
+
config.cachePartition.accountId,
|
|
649
|
+
config.cachePartition.principalId,
|
|
650
|
+
config.cachePartition.authorizationEpoch
|
|
651
|
+
]);
|
|
652
|
+
}
|
|
653
|
+
function isLoopback(url) {
|
|
654
|
+
return (url.protocol === "http:" || url.protocol === "ws:") && (url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "[::1]");
|
|
655
|
+
}
|
|
416
656
|
export {
|
|
657
|
+
ArtifactBadge,
|
|
658
|
+
ArtifactButton,
|
|
659
|
+
ArtifactLabelsProvider,
|
|
660
|
+
ArtifactLoading,
|
|
661
|
+
ArtifactProblem,
|
|
662
|
+
ArtifactSandbox,
|
|
663
|
+
ArtifactSelect,
|
|
417
664
|
ArtifactSurface,
|
|
665
|
+
ArtifactViewerHeader,
|
|
418
666
|
BrowserEditableArtifactWorkbench,
|
|
667
|
+
ChatInteractiveBlock,
|
|
668
|
+
DEFAULT_ARTIFACT_LABELS,
|
|
669
|
+
DeferredChatMedia,
|
|
419
670
|
DocumentArtifactSurface,
|
|
420
671
|
DocumentEditor,
|
|
421
672
|
DocumentProjectionArtifactSurface,
|
|
422
673
|
DocumentProjectionEditor,
|
|
674
|
+
EditableArtifactView,
|
|
423
675
|
EditableArtifactWorkbench,
|
|
424
676
|
EditableArtifactWorkbenchHost,
|
|
425
677
|
EditableDocumentArtifactSurface,
|
|
@@ -427,15 +679,27 @@ export {
|
|
|
427
679
|
EditableSpreadsheetArtifactSurface,
|
|
428
680
|
EditableSpreadsheetGrid,
|
|
429
681
|
PUBLISHED_HTML_ARTIFACT_IFRAME_SANDBOX,
|
|
682
|
+
PatchApplyCommand,
|
|
430
683
|
PresentationArtifactSurface,
|
|
431
684
|
PresentationEditor,
|
|
432
685
|
PresentationProjectionArtifactSurface,
|
|
433
686
|
PresentationProjectionEditor,
|
|
434
687
|
PublishedHtmlArtifactFrame,
|
|
688
|
+
SessionArtifactViewer,
|
|
689
|
+
SiteView,
|
|
435
690
|
SpreadsheetArtifactSurface,
|
|
436
691
|
SpreadsheetGrid,
|
|
437
692
|
SpreadsheetProjectionGrid,
|
|
693
|
+
artifactKindIcon,
|
|
694
|
+
artifactKindSubtitle,
|
|
695
|
+
artifactLoadErrorMessage,
|
|
696
|
+
artifactLoadErrorView,
|
|
697
|
+
inlineHtmlDocument,
|
|
698
|
+
isPatchFilename,
|
|
699
|
+
isRetainedImageContentType,
|
|
438
700
|
openGeniSiteBridgePortFromBootstrap,
|
|
439
|
-
publishedHtmlArtifactDocument
|
|
701
|
+
publishedHtmlArtifactDocument,
|
|
702
|
+
useArtifactLabels,
|
|
703
|
+
useRetainedImageObjectUrl
|
|
440
704
|
};
|
|
441
705
|
//# sourceMappingURL=artifacts.js.map
|