@opengeni/react 1.0.1 → 1.0.2-canary.37191796234001
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 +651 -21
- package/dist/accounts.d.ts +64 -0
- package/dist/accounts.js +822 -0
- package/dist/accounts.js.map +1 -0
- package/dist/approvals.d.ts +2 -1
- package/dist/artifacts-document.js +3 -2
- package/dist/artifacts-presentation.js +3 -2
- package/dist/artifacts-spreadsheet.js +2 -2
- package/dist/artifacts.d.ts +4 -1
- package/dist/artifacts.js +518 -42
- package/dist/artifacts.js.map +1 -1
- package/dist/browser-viewer-GTR5XQ7X.js +16 -0
- package/dist/capability-catalog-row.d.ts +20 -0
- package/dist/capability-logo-fallback.d.ts +3 -0
- package/dist/chat-interactive-block-UGBTNB3L.js +11 -0
- package/dist/chat-interactive-block-UGBTNB3L.js.map +1 -0
- package/dist/{chunk-5UQPNLIO.js → chunk-23J2ZNXT.js} +4117 -3896
- package/dist/chunk-23J2ZNXT.js.map +1 -0
- package/dist/chunk-447JLCBU.js +209 -0
- package/dist/chunk-447JLCBU.js.map +1 -0
- package/dist/chunk-4RVYOY4O.js +379 -0
- package/dist/chunk-4RVYOY4O.js.map +1 -0
- package/dist/chunk-5CVXZA3Y.js +292 -0
- package/dist/chunk-5CVXZA3Y.js.map +1 -0
- package/dist/chunk-5J4FOW6Q.js +108 -0
- package/dist/chunk-5J4FOW6Q.js.map +1 -0
- package/dist/chunk-A2PI6UMY.js +41 -0
- package/dist/chunk-A2PI6UMY.js.map +1 -0
- package/dist/{chunk-7WCLAEFV.js → chunk-A4UJB2MM.js} +37 -27
- package/dist/chunk-A4UJB2MM.js.map +1 -0
- package/dist/chunk-B3V6TG77.js +41 -0
- package/dist/chunk-B3V6TG77.js.map +1 -0
- package/dist/chunk-BRM6FVZA.js +302 -0
- package/dist/chunk-BRM6FVZA.js.map +1 -0
- package/dist/chunk-C5X5AJXK.js +182 -0
- package/dist/chunk-C5X5AJXK.js.map +1 -0
- package/dist/chunk-CR7U7HAR.js +453 -0
- package/dist/chunk-CR7U7HAR.js.map +1 -0
- package/dist/{chunk-R3AZOAB5.js → chunk-DYWBUX5Q.js} +29 -123
- package/dist/chunk-DYWBUX5Q.js.map +1 -0
- package/dist/chunk-E3G7SAYZ.js +3124 -0
- package/dist/chunk-E3G7SAYZ.js.map +1 -0
- package/dist/chunk-ELCE5SXV.js +359 -0
- package/dist/chunk-ELCE5SXV.js.map +1 -0
- package/dist/chunk-ERGYJIBB.js +21 -0
- package/dist/chunk-ERGYJIBB.js.map +1 -0
- package/dist/chunk-FFA2OVOV.js +319 -0
- package/dist/chunk-FFA2OVOV.js.map +1 -0
- package/dist/chunk-FZCP527Y.js +116 -0
- package/dist/chunk-FZCP527Y.js.map +1 -0
- package/dist/chunk-GIMRELBW.js +14 -0
- package/dist/chunk-GIMRELBW.js.map +1 -0
- package/dist/{chunk-6KLX2RH5.js → chunk-H2NJQORO.js} +1069 -79
- package/dist/chunk-H2NJQORO.js.map +1 -0
- package/dist/chunk-I7IWRQLN.js +1608 -0
- package/dist/chunk-I7IWRQLN.js.map +1 -0
- package/dist/{chunk-HA46CYQK.js → chunk-IQUCRAT7.js} +792 -537
- package/dist/chunk-IQUCRAT7.js.map +1 -0
- package/dist/chunk-IWIDV7SB.js +1 -0
- package/dist/chunk-IWIDV7SB.js.map +1 -0
- package/dist/chunk-J2QWVSQY.js +312 -0
- package/dist/chunk-J2QWVSQY.js.map +1 -0
- package/dist/chunk-JFNEV4LU.js +2733 -0
- package/dist/chunk-JFNEV4LU.js.map +1 -0
- package/dist/chunk-JT4JW7BC.js +54 -0
- package/dist/chunk-JT4JW7BC.js.map +1 -0
- package/dist/chunk-K3HQAKQX.js +24 -0
- package/dist/chunk-K3HQAKQX.js.map +1 -0
- package/dist/{chunk-C5ZPSSS5.js → chunk-NEXLLTP4.js} +2 -1
- package/dist/{chunk-C5ZPSSS5.js.map → chunk-NEXLLTP4.js.map} +1 -1
- package/dist/chunk-NZUI76EM.js +371 -0
- package/dist/chunk-NZUI76EM.js.map +1 -0
- package/dist/{chunk-PEI6RANI.js → chunk-PNY3JKBJ.js} +309 -74
- package/dist/chunk-PNY3JKBJ.js.map +1 -0
- package/dist/{chunk-IGC6A2ZI.js → chunk-Q5QBEZIQ.js} +777 -246
- package/dist/chunk-Q5QBEZIQ.js.map +1 -0
- package/dist/chunk-RHREZ7BO.js +11 -0
- package/dist/chunk-RHREZ7BO.js.map +1 -0
- package/dist/chunk-SCOTPE2I.js +589 -0
- package/dist/chunk-SCOTPE2I.js.map +1 -0
- package/dist/{chunk-B6WPZSTT.js → chunk-SJZDKVW2.js} +1331 -1163
- package/dist/chunk-SJZDKVW2.js.map +1 -0
- package/dist/chunk-TMJRG4YC.js +12803 -0
- package/dist/chunk-TMJRG4YC.js.map +1 -0
- package/dist/chunk-TMYGL6X5.js +742 -0
- package/dist/chunk-TMYGL6X5.js.map +1 -0
- package/dist/chunk-UGLEYEMP.js +33 -0
- package/dist/chunk-UGLEYEMP.js.map +1 -0
- package/dist/chunk-UK4TINKT.js +27 -0
- package/dist/chunk-UK4TINKT.js.map +1 -0
- package/dist/chunk-UTRTG6LH.js +220 -0
- package/dist/chunk-UTRTG6LH.js.map +1 -0
- package/dist/chunk-WEHMPOXK.js +39 -0
- package/dist/chunk-WEHMPOXK.js.map +1 -0
- package/dist/chunk-WRHIZYZF.js +988 -0
- package/dist/chunk-WRHIZYZF.js.map +1 -0
- package/dist/{chunk-HUIKIDM5.js → chunk-WUISZ3WU.js} +223 -115
- package/dist/chunk-WUISZ3WU.js.map +1 -0
- package/dist/chunk-XCHWDJ22.js +107 -0
- package/dist/chunk-XCHWDJ22.js.map +1 -0
- package/dist/chunk-XOAMRDDK.js +481 -0
- package/dist/chunk-XOAMRDDK.js.map +1 -0
- package/dist/chunk-XUW2UWQM.js +299 -0
- package/dist/chunk-XUW2UWQM.js.map +1 -0
- package/dist/{chunk-KCGXPP5V.js → chunk-Y2PRMYLC.js} +11 -6
- package/dist/chunk-Y2PRMYLC.js.map +1 -0
- package/dist/chunk-YBXQDQFX.js +1772 -0
- package/dist/chunk-YBXQDQFX.js.map +1 -0
- package/dist/{chunk-KZ73RL76.js → chunk-YQEAA6LT.js} +7 -3
- package/dist/chunk-YQEAA6LT.js.map +1 -0
- package/dist/chunk-YV4L3ILF.js +9 -0
- package/dist/chunk-YV4L3ILF.js.map +1 -0
- package/dist/{chunk-LLOLUHVG.js → chunk-YWFG7ZX7.js} +1358 -2746
- package/dist/chunk-YWFG7ZX7.js.map +1 -0
- package/dist/chunk-ZYRGEKWS.js +216 -0
- package/dist/chunk-ZYRGEKWS.js.map +1 -0
- package/dist/client.d.ts +7 -4
- package/dist/clipboard.js +1 -0
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/anthropic-mark.d.ts +3 -0
- package/dist/components/approval-surface.d.ts +15 -0
- package/dist/components/artifacts/artifact-chrome.d.ts +120 -0
- package/dist/components/artifacts/artifact-sandbox.d.ts +27 -0
- package/dist/components/artifacts/artifact-surface.d.ts +3 -1
- 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 +46 -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 +2 -1
- 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 +48 -3
- package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
- package/dist/components/artifacts/site-view.d.ts +23 -0
- package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -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 +10 -1
- package/dist/components/chat-composer.d.ts +21 -3
- package/dist/components/child-session-link.d.ts +5 -0
- package/dist/components/claude-mark.d.ts +3 -0
- package/dist/components/code-editor.d.ts +1 -4
- package/dist/components/composer.d.ts +45 -4
- package/dist/components/computer-viewer.d.ts +4 -1
- package/dist/components/copy-button.d.ts +3 -1
- package/dist/components/desktop-viewer.d.ts +1 -1
- package/dist/components/enrollment-consent.d.ts +6 -3
- package/dist/components/file-browser.d.ts +10 -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 +21 -2
- package/dist/components/human-input-surface.d.ts +6 -3
- package/dist/components/machine-card.d.ts +4 -1
- package/dist/components/machines/machine-detail.d.ts +4 -1
- package/dist/components/machines/machine-operation-policy.d.ts +11 -0
- package/dist/components/machines-dashboard.d.ts +3 -1
- package/dist/components/markdown-table-layout.d.ts +12 -0
- package/dist/components/markdown.d.ts +47 -3
- package/dist/components/message-timeline.d.ts +72 -9
- 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 +62 -13
- package/dist/components/open-geni-chat.d.ts +55 -0
- package/dist/components/open-geni-links.d.ts +68 -0
- package/dist/components/openrouter-mark.d.ts +6 -0
- package/dist/components/pierre-file.d.ts +1 -1
- package/dist/components/preview-loading.d.ts +2 -0
- package/dist/components/queue-item-content.d.ts +9 -0
- package/dist/components/sandbox-files.d.ts +13 -2
- package/dist/components/sandbox-workspace.d.ts +43 -3
- package/dist/components/session-capability-frame.d.ts +35 -0
- package/dist/components/session-chrome.d.ts +66 -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 +86 -0
- package/dist/components/session-list.d.ts +36 -0
- package/dist/components/session-mcp-capability-card.d.ts +41 -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/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/components/workspace-dock.d.ts +6 -2
- package/dist/composer.d.ts +5 -4
- package/dist/composer.js +15 -9
- package/dist/computer-viewer-ENHVAZ2Q.js +19 -0
- package/dist/computer-viewer-ENHVAZ2Q.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 +16 -0
- package/dist/connect.d.ts +21 -0
- package/dist/connect.js +2129 -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 +26 -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 +14 -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 +21 -0
- package/dist/editor.js.map +1 -0
- package/dist/embedded-session-client.d.ts +23 -0
- package/dist/file-node-visibility.d.ts +15 -0
- package/dist/{fleet-decision-row-GGCAT4E4.js → fleet-decision-row-YZ3ZKWMM.js} +2 -1
- package/dist/fleet-decision-row-YZ3ZKWMM.js.map +1 -0
- package/dist/hooks/channel-cache.d.ts +23 -0
- package/dist/hooks/latest-question.d.ts +25 -0
- package/dist/hooks/shared-machines-list.d.ts +14 -0
- package/dist/hooks/use-attached-browsers.d.ts +2 -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-channels.d.ts +1 -0
- package/dist/hooks/use-codex-accounts.d.ts +25 -7
- package/dist/hooks/use-composer.d.ts +45 -9
- 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 +2 -0
- package/dist/hooks/use-connect.d.ts +22 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-file-attachments.d.ts +21 -2
- package/dist/hooks/use-machine-chip.d.ts +3 -3
- package/dist/hooks/use-machines.d.ts +19 -1
- package/dist/hooks/use-sandbox-files.d.ts +5 -1
- package/dist/hooks/use-session-background-commands.d.ts +14 -0
- package/dist/hooks/use-session-events.d.ts +30 -8
- package/dist/hooks/use-session-lineage.d.ts +4 -0
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session.d.ts +6 -0
- package/dist/hooks/use-turn-queue.d.ts +12 -0
- package/dist/hooks/use-usage.d.ts +40 -0
- package/dist/hooks/use-workspace-edit.d.ts +4 -0
- package/dist/hooks/use-workspace-sessions.d.ts +27 -5
- package/dist/human-input.d.ts +3 -1
- package/dist/identity-link-accounts.d.ts +11 -0
- package/dist/identity-link-consent.d.ts +18 -0
- package/dist/index.d.ts +60 -17
- package/dist/index.js +2237 -6200
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +1 -1
- package/dist/interaction.js +35 -184
- package/dist/interaction.js.map +1 -1
- package/dist/latest-question-755OW5DS.js +117 -0
- package/dist/latest-question-755OW5DS.js.map +1 -0
- package/dist/lib/error-message.d.ts +7 -0
- package/dist/lib/format.d.ts +36 -2
- package/dist/lib/host-theme.d.ts +70 -0
- package/dist/lib/interaction-errors.d.ts +6 -0
- package/dist/lib/menu-styles.d.ts +22 -0
- package/dist/lib/pierre-diffs-loader.d.ts +20 -0
- package/dist/lib/workbench-peers.d.ts +36 -0
- package/dist/lib/xterm-theme.d.ts +7 -5
- package/dist/machines.d.ts +4 -2
- package/dist/machines.js +14 -4
- package/dist/markdown-table-layout-QXSLK4BY.js +106 -0
- package/dist/markdown-table-layout-QXSLK4BY.js.map +1 -0
- package/dist/mcp-connection-status.d.ts +14 -0
- package/dist/model-policy-picker-menu-PWRI7R2X.js +14 -0
- package/dist/model-policy-picker-menu-PWRI7R2X.js.map +1 -0
- package/dist/model-policy.d.ts +19 -3
- package/dist/model-policy.js +9 -1
- package/dist/older-history.d.ts +30 -0
- package/dist/platform-activity-row-627BFZ46.js +182 -0
- package/dist/platform-activity-row-627BFZ46.js.map +1 -0
- package/dist/plugin-details.d.ts +14 -0
- package/dist/plugin-discovery.d.ts +25 -0
- package/dist/provider.d.ts +13 -1
- package/dist/{queue-surface-implementation-2KVJTYXH.js → queue-surface-implementation-ZHFI5JBP.js} +131 -44
- package/dist/queue-surface-implementation-ZHFI5JBP.js.map +1 -0
- package/dist/realtime/realtime-control.d.ts +6 -3
- package/dist/realtime.js +133 -74
- package/dist/realtime.js.map +1 -1
- package/dist/sandbox-files-BBC47SLD.js +20 -0
- package/dist/sandbox-files-BBC47SLD.js.map +1 -0
- package/dist/session-auth-recommendation.d.ts +5 -0
- package/dist/session-capability-policy.d.ts +12 -0
- package/dist/session-ui.d.ts +30 -2
- package/dist/session-ui.js +85 -7
- package/dist/session-ui.js.map +1 -1
- package/dist/session.d.ts +8 -2
- package/dist/session.js +30 -19
- package/dist/sites-ui.d.ts +34 -0
- package/dist/sites.d.ts +3 -0
- package/dist/sites.js +11 -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 +31 -0
- package/dist/terminal.js.map +1 -0
- package/dist/timeline/activity-rail.d.ts +11 -2
- package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
- package/dist/timeline/compaction-copy.d.ts +10 -0
- package/dist/timeline/entrance.d.ts +13 -1
- package/dist/timeline/genie-loading.d.ts +34 -0
- package/dist/timeline/index.d.ts +6 -2
- package/dist/timeline/knowledge-receipt.d.ts +17 -0
- package/dist/timeline/platform-activity-row.d.ts +14 -0
- package/dist/timeline/presented-image.d.ts +6 -0
- package/dist/timeline/projection.d.ts +31 -2
- package/dist/timeline/registry.d.ts +2 -0
- package/dist/timeline/retained-image.d.ts +18 -0
- package/dist/timeline/rolling-activity.d.ts +11 -0
- package/dist/timeline/screenshot-lightbox.d.ts +16 -1
- package/dist/timeline/shared.d.ts +8 -3
- 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 +2 -1
- package/dist/timeline/turn-summary.d.ts +32 -3
- package/dist/timeline/types.d.ts +141 -7
- package/dist/timeline-annotation-markers-GNDHTGBD.js +165 -0
- package/dist/timeline-annotation-markers-GNDHTGBD.js.map +1 -0
- package/dist/timeline-annotation-selection-DMLMM2TX.js +241 -0
- package/dist/timeline-annotation-selection-DMLMM2TX.js.map +1 -0
- package/dist/timeline-annotations-dialog-ELRDBHTS.js +273 -0
- package/dist/timeline-annotations-dialog-ELRDBHTS.js.map +1 -0
- package/dist/types/machines.d.ts +2 -2
- package/dist/usage/allowance-copy.d.ts +25 -0
- package/dist/usage/summary.d.ts +35 -0
- package/dist/usage.d.ts +13 -0
- package/dist/usage.js +1074 -0
- package/dist/usage.js.map +1 -0
- package/package.json +44 -4
- package/src/accounts.tsx +1072 -0
- package/src/approvals.ts +8 -1
- package/src/artifacts.ts +42 -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 +22 -13
- 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 +171 -37
- package/src/components/artifacts/artifact-chrome.tsx +413 -0
- package/src/components/artifacts/artifact-sandbox.tsx +185 -0
- package/src/components/artifacts/artifact-surface.tsx +39 -19
- 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 +187 -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 +5 -2
- package/src/components/artifacts/index.ts +44 -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 +338 -5
- package/src/components/artifacts/session-artifact-viewer.tsx +376 -0
- package/src/components/artifacts/site-view.tsx +116 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
- package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +12 -13
- 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 +1054 -314
- package/src/components/chat-composer.tsx +131 -85
- package/src/components/child-session-link.tsx +27 -0
- package/src/components/claude-mark.tsx +10 -0
- package/src/components/code-editor.tsx +13 -16
- package/src/components/composer-transcription-control.tsx +7 -5
- package/src/components/composer.tsx +376 -49
- package/src/components/computer-viewer.tsx +1041 -329
- package/src/components/copy-button.tsx +13 -5
- package/src/components/desktop-viewer.tsx +1 -1
- package/src/components/enrollment-consent.tsx +65 -7
- package/src/components/enrollment-device-flow.tsx +1 -1
- package/src/components/file-browser.tsx +158 -34
- package/src/components/fleet-tile.tsx +8 -16
- package/src/components/generated-video-player.tsx +4 -2
- package/src/components/grok-mark.tsx +33 -0
- package/src/components/human-input-form.tsx +455 -114
- package/src/components/human-input-surface.tsx +18 -7
- package/src/components/interaction-intervention-banner.tsx +2 -2
- package/src/components/machine-card.tsx +119 -4
- package/src/components/machine-dock-bar.tsx +1 -1
- package/src/components/machine-input-display.ts +23 -2
- package/src/components/machines/machine-detail.tsx +52 -2
- package/src/components/machines/machine-operation-policy.tsx +179 -0
- package/src/components/machines-dashboard.tsx +8 -17
- package/src/components/markdown-table-layout.ts +132 -0
- package/src/components/markdown.tsx +473 -44
- package/src/components/message-timeline.tsx +2498 -663
- package/src/components/model-mark.tsx +90 -0
- package/src/components/model-picker.tsx +15 -4
- package/src/components/model-policy-picker-menu.tsx +424 -0
- package/src/components/model-policy-picker.tsx +337 -381
- package/src/components/open-geni-chat.tsx +319 -0
- package/src/components/open-geni-links.tsx +179 -0
- package/src/components/openrouter-mark.tsx +13 -0
- package/src/components/pierre-diff.tsx +41 -16
- package/src/components/pierre-file.tsx +36 -11
- package/src/components/preview-loading.tsx +154 -0
- package/src/components/queue-item-content.ts +14 -0
- package/src/components/queue-surface-implementation.tsx +132 -42
- package/src/components/queue-surface-state.tsx +3 -1
- package/src/components/sandbox-files.tsx +267 -35
- package/src/components/sandbox-terminal.tsx +48 -11
- package/src/components/sandbox-workspace.tsx +337 -135
- package/src/components/session-capability-frame.tsx +192 -0
- package/src/components/session-chrome.tsx +1027 -328
- 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 +512 -0
- package/src/components/session-list.tsx +250 -0
- package/src/components/session-mcp-capability-card.tsx +680 -0
- package/src/components/session-status.tsx +1 -1
- 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 +70 -7
- 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 +194 -49
- package/src/components/workspace-dock.tsx +141 -175
- 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 +307 -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 +235 -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/embedded-session-client.ts +104 -0
- package/src/file-node-visibility.ts +66 -0
- package/src/hooks/channel-cache.ts +104 -0
- package/src/hooks/internal.ts +3 -2
- package/src/hooks/latest-question.ts +164 -0
- package/src/hooks/shared-machines-list.ts +239 -0
- package/src/hooks/use-attached-browsers.ts +5 -1
- package/src/hooks/use-available-models.ts +20 -14
- package/src/hooks/use-browser-frame-stream.ts +25 -3
- package/src/hooks/use-browser-session.ts +271 -71
- package/src/hooks/use-browser-sessions.ts +7 -1
- package/src/hooks/use-channels.ts +32 -10
- package/src/hooks/use-codex-accounts.ts +78 -21
- package/src/hooks/use-composer.ts +1034 -320
- package/src/hooks/use-computer-frame-stream.ts +39 -16
- package/src/hooks/use-computer-input-posture.ts +94 -0
- package/src/hooks/use-computer-session.ts +110 -32
- package/src/hooks/use-computer-sessions.ts +8 -1
- package/src/hooks/use-connect.ts +23 -0
- package/src/hooks/use-desktop-stream.ts +19 -28
- package/src/hooks/use-file-attachments.ts +118 -10
- package/src/hooks/use-goal.ts +36 -9
- package/src/hooks/use-human-input.ts +31 -4
- package/src/hooks/use-last-started-turn-policy.ts +15 -13
- package/src/hooks/use-machine-chip.ts +23 -6
- package/src/hooks/use-machines.ts +104 -6
- package/src/hooks/use-sandbox-files.ts +253 -150
- package/src/hooks/use-sandbox-git.ts +58 -29
- package/src/hooks/use-session-background-commands.ts +67 -0
- package/src/hooks/use-session-capabilities.ts +21 -2
- package/src/hooks/use-session-events.ts +759 -433
- package/src/hooks/use-session-lineage.ts +28 -6
- package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
- package/src/hooks/use-session.ts +75 -16
- package/src/hooks/use-slash-commands.ts +6 -11
- package/src/hooks/use-turn-queue.ts +113 -13
- package/src/hooks/use-usage.ts +100 -0
- package/src/hooks/use-voice-input.ts +12 -1
- 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 +99 -11
- package/src/human-input.ts +12 -1
- package/src/identity-link-accounts.tsx +148 -0
- package/src/identity-link-consent.tsx +192 -0
- package/src/index.ts +157 -12
- package/src/interaction.ts +1 -0
- package/src/lib/error-message.ts +37 -0
- package/src/lib/format.ts +150 -14
- package/src/lib/host-theme.ts +511 -0
- package/src/lib/interaction-errors.ts +33 -0
- package/src/lib/menu-styles.ts +44 -0
- package/src/lib/pierre-diffs-loader.ts +53 -0
- package/src/lib/workbench-peers.ts +62 -0
- package/src/lib/xterm-theme.ts +23 -21
- package/src/machines.ts +9 -1
- package/src/mcp-connection-status.ts +35 -0
- package/src/model-policy.ts +223 -69
- package/src/older-history.ts +87 -0
- package/src/plugin-details.tsx +185 -0
- package/src/plugin-discovery.tsx +196 -0
- package/src/provider.tsx +55 -14
- package/src/realtime/dropdown-menu.tsx +19 -12
- package/src/realtime/realtime-control.tsx +133 -46
- package/src/session-auth-recommendation.ts +48 -0
- package/src/session-capability-policy.ts +83 -0
- package/src/session-context.ts +1 -0
- package/src/session-ui.ts +66 -2
- package/src/session.ts +18 -1
- package/src/sites-ui.tsx +402 -0
- package/src/sites.ts +3 -0
- package/src/skill-discovery.tsx +208 -0
- package/src/terminal.ts +26 -0
- package/src/timeline/activity-rail.tsx +171 -80
- package/src/timeline/allowance-exhausted-row.tsx +86 -0
- package/src/timeline/compaction-copy.ts +42 -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/genie-loading.tsx +136 -0
- package/src/timeline/index.ts +11 -0
- package/src/timeline/knowledge-receipt.tsx +100 -0
- package/src/timeline/parsers.ts +2 -2
- package/src/timeline/platform-activity-row.tsx +216 -0
- package/src/timeline/presented-image.ts +49 -0
- package/src/timeline/projection.ts +1600 -84
- package/src/timeline/registry.ts +15 -3
- package/src/timeline/retained-image.ts +97 -0
- package/src/timeline/rolling-activity.tsx +92 -0
- package/src/timeline/screenshot-lightbox.tsx +115 -17
- package/src/timeline/shared.tsx +47 -15
- package/src/timeline/startup-preference.ts +33 -0
- package/src/timeline/startup-timings.tsx +145 -0
- package/src/timeline/tool-display-name.ts +8 -6
- package/src/timeline/tool-renderers.tsx +497 -128
- package/src/timeline/turn-summary.tsx +208 -44
- package/src/timeline/types.ts +186 -7
- package/src/types/machines.ts +10 -0
- package/src/usage/allowance-copy.ts +64 -0
- package/src/usage/summary.ts +93 -0
- package/src/usage.ts +50 -0
- package/styles/compiled.css +2098 -757
- package/styles/connect.css +284 -0
- package/styles/connect.d.ts +1 -0
- package/styles/effective-tokens.css +1 -0
- package/styles/index.css +201 -9
- package/styles/responsive.css +27 -1
- package/styles/session-capability.css +44 -0
- package/styles/tokens.css +135 -65
- package/dist/chunk-5UQPNLIO.js.map +0 -1
- package/dist/chunk-6KLX2RH5.js.map +0 -1
- package/dist/chunk-7WCLAEFV.js.map +0 -1
- package/dist/chunk-B6WPZSTT.js.map +0 -1
- package/dist/chunk-FK6VG4LL.js +0 -90
- package/dist/chunk-FK6VG4LL.js.map +0 -1
- package/dist/chunk-HA46CYQK.js.map +0 -1
- package/dist/chunk-HUIKIDM5.js.map +0 -1
- package/dist/chunk-IGC6A2ZI.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-LLOLUHVG.js.map +0 -1
- package/dist/chunk-MKPIAGVL.js +0 -465
- package/dist/chunk-MKPIAGVL.js.map +0 -1
- package/dist/chunk-PEI6RANI.js.map +0 -1
- package/dist/chunk-R3AZOAB5.js.map +0 -1
- package/dist/chunk-WSK7G5LE.js +0 -170
- package/dist/chunk-WSK7G5LE.js.map +0 -1
- package/dist/chunk-XBZWOM2K.js +0 -218
- package/dist/chunk-XBZWOM2K.js.map +0 -1
- package/dist/chunk-Y7OEDUJ5.js +0 -8810
- package/dist/chunk-Y7OEDUJ5.js.map +0 -1
- package/dist/fleet-decision-row-GGCAT4E4.js.map +0 -1
- package/dist/hooks/use-packs.d.ts +0 -32
- package/dist/interactive-workbench-viewers-TOHBXJEE.js +0 -15
- package/dist/queue-surface-implementation-2KVJTYXH.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-packs.ts +0 -157
- /package/dist/{interactive-workbench-viewers-TOHBXJEE.js.map → browser-viewer-GTR5XQ7X.js.map} +0 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
// src/components/timeline-annotation-layout.ts
|
|
2
|
+
var ANNOTATION_BADGE_GAP_PX = 32;
|
|
3
|
+
var ANNOTATION_BADGE_MIN_GAP_PX = 12;
|
|
4
|
+
var ANNOTATION_REVIEW_DIALOG_WIDTH_PX = 400;
|
|
5
|
+
var ANNOTATION_REVIEW_DIALOG_MAX_HEIGHT_PX = 32 * 16;
|
|
6
|
+
var ANNOTATION_REVIEW_DIALOG_MIN_HEIGHT_PX = 160;
|
|
7
|
+
var ANNOTATION_REVIEW_DIALOG_FLOOR_HEIGHT_PX = 80;
|
|
8
|
+
var ANNOTATION_REVIEW_MARGIN_PX = 12;
|
|
9
|
+
var ANNOTATION_NOTE_PREVIEW_CHARS = 280;
|
|
10
|
+
var ANNOTATION_CARD_STACK_SCROLL_AT = 4;
|
|
11
|
+
function clampAnnotationAxis(value, min, max) {
|
|
12
|
+
return Math.min(Math.max(value, min), Math.max(min, max));
|
|
13
|
+
}
|
|
14
|
+
function annotationBoxIntersects(a, b) {
|
|
15
|
+
return a.left <= b.right && a.right >= b.left && a.top <= b.bottom && a.bottom >= b.top;
|
|
16
|
+
}
|
|
17
|
+
function annotationViewportBox(viewportWidth, viewportHeight, scroller) {
|
|
18
|
+
const viewport = {
|
|
19
|
+
left: 0,
|
|
20
|
+
top: 0,
|
|
21
|
+
right: Math.max(1, viewportWidth),
|
|
22
|
+
bottom: Math.max(1, viewportHeight)
|
|
23
|
+
};
|
|
24
|
+
if (!scroller || scroller.right - scroller.left <= 0 || scroller.bottom - scroller.top <= 0) {
|
|
25
|
+
return viewport;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
left: Math.max(viewport.left, scroller.left),
|
|
29
|
+
top: Math.max(viewport.top, scroller.top),
|
|
30
|
+
right: Math.min(viewport.right, scroller.right),
|
|
31
|
+
bottom: Math.min(viewport.bottom, scroller.bottom)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function annotationNoteNeedsDisclosure(note) {
|
|
35
|
+
const trimmed = note.trim();
|
|
36
|
+
if (trimmed.length === 0) return false;
|
|
37
|
+
return trimmed.length > ANNOTATION_NOTE_PREVIEW_CHARS || trimmed.split("\n").length > 4;
|
|
38
|
+
}
|
|
39
|
+
function annotationAxisStops(min, max, gap) {
|
|
40
|
+
if (max <= min) return [min];
|
|
41
|
+
const stops = [];
|
|
42
|
+
for (let value = min; value <= max + 1e-6; value += gap) {
|
|
43
|
+
stops.push(value);
|
|
44
|
+
}
|
|
45
|
+
return stops;
|
|
46
|
+
}
|
|
47
|
+
function annotationPointKey(left, top) {
|
|
48
|
+
return `${Math.round(left * 100) / 100},${Math.round(top * 100) / 100}`;
|
|
49
|
+
}
|
|
50
|
+
function annotationPointFree(left, top, placed, gap) {
|
|
51
|
+
return placed.every((other) => Math.hypot(left - other.left, top - other.top) >= gap);
|
|
52
|
+
}
|
|
53
|
+
function annotationBadgePackGap(viewport, count, preferred = ANNOTATION_BADGE_GAP_PX) {
|
|
54
|
+
if (count <= 1) return preferred;
|
|
55
|
+
const width = Math.max(
|
|
56
|
+
1,
|
|
57
|
+
viewport.right - ANNOTATION_REVIEW_MARGIN_PX - (viewport.left + ANNOTATION_REVIEW_MARGIN_PX)
|
|
58
|
+
);
|
|
59
|
+
const height = Math.max(1, viewport.bottom - ANNOTATION_REVIEW_MARGIN_PX - (viewport.top + 8));
|
|
60
|
+
let gap = preferred;
|
|
61
|
+
const capacity = (step) => (Math.floor(width / step) + 1) * (Math.floor(height / step) + 1);
|
|
62
|
+
while (gap > ANNOTATION_BADGE_MIN_GAP_PX && capacity(gap) < count) {
|
|
63
|
+
gap -= 1;
|
|
64
|
+
}
|
|
65
|
+
return gap;
|
|
66
|
+
}
|
|
67
|
+
var ANNOTATION_BADGE_SHIFT_DIRS = [
|
|
68
|
+
[1, 0],
|
|
69
|
+
[1, 1],
|
|
70
|
+
[0, 1],
|
|
71
|
+
[-1, 1],
|
|
72
|
+
[-1, 0],
|
|
73
|
+
[-1, -1],
|
|
74
|
+
[0, -1],
|
|
75
|
+
[1, -1]
|
|
76
|
+
];
|
|
77
|
+
function layoutAnnotationBadges(anchors, viewport, preferredGap = ANNOTATION_BADGE_GAP_PX) {
|
|
78
|
+
const minLeft = viewport.left + ANNOTATION_REVIEW_MARGIN_PX;
|
|
79
|
+
const maxLeft = viewport.right - ANNOTATION_REVIEW_MARGIN_PX;
|
|
80
|
+
const minTop = viewport.top + 8;
|
|
81
|
+
const maxTop = viewport.bottom - ANNOTATION_REVIEW_MARGIN_PX;
|
|
82
|
+
const gap = annotationBadgePackGap(viewport, anchors.length, preferredGap);
|
|
83
|
+
const cells = annotationAxisStops(minLeft, maxLeft, gap).flatMap(
|
|
84
|
+
(left) => annotationAxisStops(minTop, maxTop, gap).map((top) => ({ left, top }))
|
|
85
|
+
);
|
|
86
|
+
const placed = [];
|
|
87
|
+
for (const anchor of [...anchors].sort((left, right) => left.ordinal - right.ordinal)) {
|
|
88
|
+
const originLeft = clampAnnotationAxis(anchor.left, minLeft, maxLeft);
|
|
89
|
+
const originTop = clampAnnotationAxis(anchor.top, minTop, maxTop);
|
|
90
|
+
const seen = /* @__PURE__ */ new Set();
|
|
91
|
+
const candidates = [];
|
|
92
|
+
const pushCandidate = (left, top) => {
|
|
93
|
+
if (left < minLeft || left > maxLeft || top < minTop || top > maxTop) return;
|
|
94
|
+
const key = annotationPointKey(left, top);
|
|
95
|
+
if (seen.has(key)) return;
|
|
96
|
+
seen.add(key);
|
|
97
|
+
candidates.push({ left, top });
|
|
98
|
+
};
|
|
99
|
+
pushCandidate(originLeft, originTop);
|
|
100
|
+
for (const [dx, dy] of ANNOTATION_BADGE_SHIFT_DIRS) {
|
|
101
|
+
const colliders = [...placed].sort(
|
|
102
|
+
(left, right) => right.left * dx + right.top * dy - (left.left * dx + left.top * dy)
|
|
103
|
+
);
|
|
104
|
+
for (const collider of colliders) {
|
|
105
|
+
pushCandidate(collider.left + dx * gap, collider.top + dy * gap);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const maxRadius = Math.ceil(Math.max(maxLeft - minLeft, maxTop - minTop) / Math.max(gap, 1)) + 1;
|
|
109
|
+
for (let radius = 1; radius <= maxRadius; radius++) {
|
|
110
|
+
const ring = [];
|
|
111
|
+
for (let dx = -radius; dx <= radius; dx++) {
|
|
112
|
+
for (let dy = -radius; dy <= radius; dy++) {
|
|
113
|
+
if (Math.max(Math.abs(dx), Math.abs(dy)) !== radius) continue;
|
|
114
|
+
ring.push([dx, dy]);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
ring.sort((left, right) => {
|
|
118
|
+
const leftDir = (left[0] < 0 ? 2 : 0) + (left[1] < 0 ? 1 : 0);
|
|
119
|
+
const rightDir = (right[0] < 0 ? 2 : 0) + (right[1] < 0 ? 1 : 0);
|
|
120
|
+
if (leftDir !== rightDir) return leftDir - rightDir;
|
|
121
|
+
const hypot = Math.hypot(left[0], left[1]) - Math.hypot(right[0], right[1]);
|
|
122
|
+
if (hypot !== 0) return hypot;
|
|
123
|
+
if (left[0] !== right[0]) return right[0] - left[0];
|
|
124
|
+
return left[1] - right[1];
|
|
125
|
+
});
|
|
126
|
+
for (const [dx, dy] of ring) {
|
|
127
|
+
pushCandidate(originLeft + dx * gap, originTop + dy * gap);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
for (const cell of cells) {
|
|
131
|
+
pushCandidate(cell.left, cell.top);
|
|
132
|
+
}
|
|
133
|
+
const free = candidates.find(
|
|
134
|
+
(point) => annotationPointFree(point.left, point.top, placed, gap)
|
|
135
|
+
);
|
|
136
|
+
let chosen = free ?? candidates[0];
|
|
137
|
+
if (!free && placed.length > 0) {
|
|
138
|
+
let bestMin = Number.NEGATIVE_INFINITY;
|
|
139
|
+
for (const point of candidates) {
|
|
140
|
+
const minDist = placed.reduce(
|
|
141
|
+
(current, other) => Math.min(current, Math.hypot(point.left - other.left, point.top - other.top)),
|
|
142
|
+
Number.POSITIVE_INFINITY
|
|
143
|
+
);
|
|
144
|
+
if (minDist > bestMin) {
|
|
145
|
+
bestMin = minDist;
|
|
146
|
+
chosen = point;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
placed.push({ ...anchor, left: chosen.left, top: chosen.top });
|
|
151
|
+
}
|
|
152
|
+
return placed;
|
|
153
|
+
}
|
|
154
|
+
function scrollAnnotationRowIntoList(list, row) {
|
|
155
|
+
if (!list || !row || !list.contains(row)) return;
|
|
156
|
+
const listRect = list.getBoundingClientRect();
|
|
157
|
+
const rowRect = row.getBoundingClientRect();
|
|
158
|
+
if (rowRect.top < listRect.top) {
|
|
159
|
+
list.scrollTop -= listRect.top - rowRect.top;
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (rowRect.bottom > listRect.bottom) {
|
|
163
|
+
list.scrollTop += rowRect.bottom - listRect.bottom;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function clampAnnotationDialogPlacement(input) {
|
|
167
|
+
const margin = ANNOTATION_REVIEW_MARGIN_PX;
|
|
168
|
+
const panelWidth = Math.min(
|
|
169
|
+
input.panelWidth ?? ANNOTATION_REVIEW_DIALOG_WIDTH_PX,
|
|
170
|
+
Math.max(1, input.viewportWidth - margin * 2)
|
|
171
|
+
);
|
|
172
|
+
const left = Math.min(
|
|
173
|
+
Math.max(margin, input.triggerLeft),
|
|
174
|
+
Math.max(margin, input.viewportWidth - panelWidth - margin)
|
|
175
|
+
);
|
|
176
|
+
const spaceBelow = input.viewportHeight - input.triggerBottom - margin;
|
|
177
|
+
const spaceAbove = input.triggerTop - margin;
|
|
178
|
+
const above = spaceBelow < Math.min(input.contentHeight, 200) && spaceAbove > spaceBelow;
|
|
179
|
+
const viewportBudget = Math.max(
|
|
180
|
+
ANNOTATION_REVIEW_DIALOG_FLOOR_HEIGHT_PX,
|
|
181
|
+
input.viewportHeight - margin * 2
|
|
182
|
+
);
|
|
183
|
+
const available = Math.max(
|
|
184
|
+
Math.min(ANNOTATION_REVIEW_DIALOG_MIN_HEIGHT_PX, viewportBudget),
|
|
185
|
+
above ? spaceAbove : spaceBelow
|
|
186
|
+
);
|
|
187
|
+
let maxHeight = Math.min(
|
|
188
|
+
Math.max(input.contentHeight, Math.min(ANNOTATION_REVIEW_DIALOG_MIN_HEIGHT_PX, viewportBudget)),
|
|
189
|
+
available,
|
|
190
|
+
Math.floor(input.viewportHeight * 0.7) || viewportBudget,
|
|
191
|
+
ANNOTATION_REVIEW_DIALOG_MAX_HEIGHT_PX,
|
|
192
|
+
viewportBudget
|
|
193
|
+
);
|
|
194
|
+
let top = above ? Math.max(margin, input.triggerTop - 8 - maxHeight) : Math.min(
|
|
195
|
+
input.triggerBottom + 8,
|
|
196
|
+
Math.max(margin, input.viewportHeight - margin - maxHeight)
|
|
197
|
+
);
|
|
198
|
+
top = Math.max(margin, top);
|
|
199
|
+
maxHeight = Math.min(
|
|
200
|
+
maxHeight,
|
|
201
|
+
Math.max(ANNOTATION_REVIEW_DIALOG_FLOOR_HEIGHT_PX, input.viewportHeight - margin - top)
|
|
202
|
+
);
|
|
203
|
+
return { left, top, maxHeight, above };
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
ANNOTATION_REVIEW_DIALOG_WIDTH_PX,
|
|
208
|
+
ANNOTATION_CARD_STACK_SCROLL_AT,
|
|
209
|
+
annotationBoxIntersects,
|
|
210
|
+
annotationViewportBox,
|
|
211
|
+
annotationNoteNeedsDisclosure,
|
|
212
|
+
layoutAnnotationBadges,
|
|
213
|
+
scrollAnnotationRowIntoList,
|
|
214
|
+
clampAnnotationDialogPlacement
|
|
215
|
+
};
|
|
216
|
+
//# sourceMappingURL=chunk-ZYRGEKWS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/timeline-annotation-layout.ts"],"sourcesContent":["export type AnnotationBox = {\n left: number;\n right: number;\n top: number;\n bottom: number;\n};\n\nexport type AnnotationBadgeAnchor = {\n id: string;\n ordinal: number;\n left: number;\n top: number;\n incomplete: boolean;\n};\n\nexport const ANNOTATION_BADGE_GAP_PX = 32;\nexport const ANNOTATION_BADGE_MIN_GAP_PX = 12;\nexport const ANNOTATION_REVIEW_DIALOG_WIDTH_PX = 400;\nexport const ANNOTATION_REVIEW_DIALOG_MAX_HEIGHT_PX = 32 * 16;\nexport const ANNOTATION_REVIEW_DIALOG_MIN_HEIGHT_PX = 160;\nexport const ANNOTATION_REVIEW_DIALOG_FLOOR_HEIGHT_PX = 80;\nexport const ANNOTATION_REVIEW_MARGIN_PX = 12;\nexport const ANNOTATION_NOTE_PREVIEW_CHARS = 280;\nexport const ANNOTATION_CARD_STACK_SCROLL_AT = 4;\n\nfunction clampAnnotationAxis(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), Math.max(min, max));\n}\n\nexport function annotationBoxIntersects(a: AnnotationBox, b: AnnotationBox): boolean {\n return a.left <= b.right && a.right >= b.left && a.top <= b.bottom && a.bottom >= b.top;\n}\n\nexport function annotationViewportBox(\n viewportWidth: number,\n viewportHeight: number,\n scroller?: AnnotationBox | null,\n): AnnotationBox {\n const viewport: AnnotationBox = {\n left: 0,\n top: 0,\n right: Math.max(1, viewportWidth),\n bottom: Math.max(1, viewportHeight),\n };\n if (!scroller || scroller.right - scroller.left <= 0 || scroller.bottom - scroller.top <= 0) {\n return viewport;\n }\n return {\n left: Math.max(viewport.left, scroller.left),\n top: Math.max(viewport.top, scroller.top),\n right: Math.min(viewport.right, scroller.right),\n bottom: Math.min(viewport.bottom, scroller.bottom),\n };\n}\n\nexport function annotationNoteNeedsDisclosure(note: string): boolean {\n const trimmed = note.trim();\n if (trimmed.length === 0) return false;\n return trimmed.length > ANNOTATION_NOTE_PREVIEW_CHARS || trimmed.split(\"\\n\").length > 4;\n}\n\nfunction annotationAxisStops(min: number, max: number, gap: number): number[] {\n if (max <= min) return [min];\n const stops: number[] = [];\n for (let value = min; value <= max + 1e-6; value += gap) {\n stops.push(value);\n }\n return stops;\n}\n\nfunction annotationPointKey(left: number, top: number): string {\n return `${Math.round(left * 100) / 100},${Math.round(top * 100) / 100}`;\n}\n\nfunction annotationPointFree(\n left: number,\n top: number,\n placed: readonly AnnotationBadgeAnchor[],\n gap: number,\n): boolean {\n return placed.every((other) => Math.hypot(left - other.left, top - other.top) >= gap);\n}\n\nexport function annotationBadgePackGap(\n viewport: AnnotationBox,\n count: number,\n preferred = ANNOTATION_BADGE_GAP_PX,\n): number {\n if (count <= 1) return preferred;\n const width = Math.max(\n 1,\n viewport.right - ANNOTATION_REVIEW_MARGIN_PX - (viewport.left + ANNOTATION_REVIEW_MARGIN_PX),\n );\n const height = Math.max(1, viewport.bottom - ANNOTATION_REVIEW_MARGIN_PX - (viewport.top + 8));\n let gap = preferred;\n const capacity = (step: number) =>\n (Math.floor(width / step) + 1) * (Math.floor(height / step) + 1);\n while (gap > ANNOTATION_BADGE_MIN_GAP_PX && capacity(gap) < count) {\n gap -= 1;\n }\n return gap;\n}\n\nconst ANNOTATION_BADGE_SHIFT_DIRS: Array<[number, number]> = [\n [1, 0],\n [1, 1],\n [0, 1],\n [-1, 1],\n [-1, 0],\n [-1, -1],\n [0, -1],\n [1, -1],\n];\n\nexport function layoutAnnotationBadges(\n anchors: readonly AnnotationBadgeAnchor[],\n viewport: AnnotationBox,\n preferredGap = ANNOTATION_BADGE_GAP_PX,\n): AnnotationBadgeAnchor[] {\n const minLeft = viewport.left + ANNOTATION_REVIEW_MARGIN_PX;\n const maxLeft = viewport.right - ANNOTATION_REVIEW_MARGIN_PX;\n const minTop = viewport.top + 8;\n const maxTop = viewport.bottom - ANNOTATION_REVIEW_MARGIN_PX;\n const gap = annotationBadgePackGap(viewport, anchors.length, preferredGap);\n const cells = annotationAxisStops(minLeft, maxLeft, gap).flatMap((left) =>\n annotationAxisStops(minTop, maxTop, gap).map((top) => ({ left, top })),\n );\n const placed: AnnotationBadgeAnchor[] = [];\n for (const anchor of [...anchors].sort((left, right) => left.ordinal - right.ordinal)) {\n const originLeft = clampAnnotationAxis(anchor.left, minLeft, maxLeft);\n const originTop = clampAnnotationAxis(anchor.top, minTop, maxTop);\n const seen = new Set<string>();\n const candidates: Array<{ left: number; top: number }> = [];\n const pushCandidate = (left: number, top: number) => {\n if (left < minLeft || left > maxLeft || top < minTop || top > maxTop) return;\n const key = annotationPointKey(left, top);\n if (seen.has(key)) return;\n seen.add(key);\n candidates.push({ left, top });\n };\n pushCandidate(originLeft, originTop);\n for (const [dx, dy] of ANNOTATION_BADGE_SHIFT_DIRS) {\n const colliders = [...placed].sort(\n (left, right) => right.left * dx + right.top * dy - (left.left * dx + left.top * dy),\n );\n for (const collider of colliders) {\n pushCandidate(collider.left + dx * gap, collider.top + dy * gap);\n }\n }\n const maxRadius =\n Math.ceil(Math.max(maxLeft - minLeft, maxTop - minTop) / Math.max(gap, 1)) + 1;\n for (let radius = 1; radius <= maxRadius; radius++) {\n const ring: Array<[number, number]> = [];\n for (let dx = -radius; dx <= radius; dx++) {\n for (let dy = -radius; dy <= radius; dy++) {\n if (Math.max(Math.abs(dx), Math.abs(dy)) !== radius) continue;\n ring.push([dx, dy]);\n }\n }\n ring.sort((left, right) => {\n const leftDir = (left[0] < 0 ? 2 : 0) + (left[1] < 0 ? 1 : 0);\n const rightDir = (right[0] < 0 ? 2 : 0) + (right[1] < 0 ? 1 : 0);\n if (leftDir !== rightDir) return leftDir - rightDir;\n const hypot = Math.hypot(left[0], left[1]) - Math.hypot(right[0], right[1]);\n if (hypot !== 0) return hypot;\n if (left[0] !== right[0]) return right[0] - left[0];\n return left[1] - right[1];\n });\n for (const [dx, dy] of ring) {\n pushCandidate(originLeft + dx * gap, originTop + dy * gap);\n }\n }\n for (const cell of cells) {\n pushCandidate(cell.left, cell.top);\n }\n const free = candidates.find((point) =>\n annotationPointFree(point.left, point.top, placed, gap),\n );\n let chosen = free ?? candidates[0]!;\n if (!free && placed.length > 0) {\n let bestMin = Number.NEGATIVE_INFINITY;\n for (const point of candidates) {\n const minDist = placed.reduce(\n (current, other) =>\n Math.min(current, Math.hypot(point.left - other.left, point.top - other.top)),\n Number.POSITIVE_INFINITY,\n );\n if (minDist > bestMin) {\n bestMin = minDist;\n chosen = point;\n }\n }\n }\n placed.push({ ...anchor, left: chosen.left, top: chosen.top });\n }\n return placed;\n}\n\nexport function scrollAnnotationRowIntoList(\n list: HTMLElement | null | undefined,\n row: HTMLElement | null | undefined,\n): void {\n if (!list || !row || !list.contains(row)) return;\n const listRect = list.getBoundingClientRect();\n const rowRect = row.getBoundingClientRect();\n if (rowRect.top < listRect.top) {\n list.scrollTop -= listRect.top - rowRect.top;\n return;\n }\n if (rowRect.bottom > listRect.bottom) {\n list.scrollTop += rowRect.bottom - listRect.bottom;\n }\n}\n\nexport function clampAnnotationDialogPlacement(input: {\n triggerLeft: number;\n triggerTop: number;\n triggerBottom: number;\n contentHeight: number;\n viewportWidth: number;\n viewportHeight: number;\n panelWidth?: number;\n}): {\n left: number;\n top: number;\n maxHeight: number;\n above: boolean;\n} {\n const margin = ANNOTATION_REVIEW_MARGIN_PX;\n const panelWidth = Math.min(\n input.panelWidth ?? ANNOTATION_REVIEW_DIALOG_WIDTH_PX,\n Math.max(1, input.viewportWidth - margin * 2),\n );\n const left = Math.min(\n Math.max(margin, input.triggerLeft),\n Math.max(margin, input.viewportWidth - panelWidth - margin),\n );\n const spaceBelow = input.viewportHeight - input.triggerBottom - margin;\n const spaceAbove = input.triggerTop - margin;\n const above = spaceBelow < Math.min(input.contentHeight, 200) && spaceAbove > spaceBelow;\n const viewportBudget = Math.max(\n ANNOTATION_REVIEW_DIALOG_FLOOR_HEIGHT_PX,\n input.viewportHeight - margin * 2,\n );\n const available = Math.max(\n Math.min(ANNOTATION_REVIEW_DIALOG_MIN_HEIGHT_PX, viewportBudget),\n above ? spaceAbove : spaceBelow,\n );\n let maxHeight = Math.min(\n Math.max(input.contentHeight, Math.min(ANNOTATION_REVIEW_DIALOG_MIN_HEIGHT_PX, viewportBudget)),\n available,\n Math.floor(input.viewportHeight * 0.7) || viewportBudget,\n ANNOTATION_REVIEW_DIALOG_MAX_HEIGHT_PX,\n viewportBudget,\n );\n let top = above\n ? Math.max(margin, input.triggerTop - 8 - maxHeight)\n : Math.min(\n input.triggerBottom + 8,\n Math.max(margin, input.viewportHeight - margin - maxHeight),\n );\n top = Math.max(margin, top);\n maxHeight = Math.min(\n maxHeight,\n Math.max(ANNOTATION_REVIEW_DIALOG_FLOOR_HEIGHT_PX, input.viewportHeight - margin - top),\n );\n return { left, top, maxHeight, above };\n}\n"],"mappings":";AAeO,IAAM,0BAA0B;AAChC,IAAM,8BAA8B;AACpC,IAAM,oCAAoC;AAC1C,IAAM,yCAAyC,KAAK;AACpD,IAAM,yCAAyC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AAA,IACrB,KAAK,IAAI,wCAAwC,cAAc;AAAA,IAC/D,QAAQ,aAAa;AAAA,EACvB;AACA,MAAI,YAAY,KAAK;AAAA,IACnB,KAAK,IAAI,MAAM,eAAe,KAAK,IAAI,wCAAwC,cAAc,CAAC;AAAA,IAC9F;AAAA,IACA,KAAK,MAAM,MAAM,iBAAiB,GAAG,KAAK;AAAA,IAC1C;AAAA,IACA;AAAA,EACF;AACA,MAAI,MAAM,QACN,KAAK,IAAI,QAAQ,MAAM,aAAa,IAAI,SAAS,IACjD,KAAK;AAAA,IACH,MAAM,gBAAgB;AAAA,IACtB,KAAK,IAAI,QAAQ,MAAM,iBAAiB,SAAS,SAAS;AAAA,EAC5D;AACJ,QAAM,KAAK,IAAI,QAAQ,GAAG;AAC1B,cAAY,KAAK;AAAA,IACf;AAAA,IACA,KAAK,IAAI,0CAA0C,MAAM,iBAAiB,SAAS,GAAG;AAAA,EACxF;AACA,SAAO,EAAE,MAAM,KAAK,WAAW,MAAM;AACvC;","names":[]}
|
package/dist/client.d.ts
CHANGED
|
@@ -4,7 +4,9 @@ import type { OpenGeniClient } from "@opengeni/sdk";
|
|
|
4
4
|
* pass the real SDK client, a proxy-backed client that routes through their
|
|
5
5
|
* own API, or a scripted client in tests/demos.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
type SessionClientMethods = Pick<OpenGeniClient, "getClientConfig" | "getSession" | "getSessionLineage" | "updateSession" | "updateSessionPin" | "listSessions" | "listSessionPage" | "sendMessage" | "steerMessage" | "pauseSession" | "resumeSession" | "sendApprovalDecision" | "listHumanInputRequests" | "getHumanInputRequest" | "submitHumanInputResponse" | "listEvents" | "streamEvents" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "getComposerDraft" | "saveComposerDraft" | "submitComposerDraft" | "listTurns" | "getGoal" | "updateGoal" | "deleteGoal" | "clearSessionContext" | "compactSessionContext" | "listScheduledTasks" | "uploadFile" | "getFile" | "createFileDownloadUrl" | "listVariableSets" | "getVariableSetVariable" | "createVariableSet" | "updateVariableSet" | "deleteVariableSet" | "setVariableSetVariable" | "deleteVariableSetVariable" | "listEnvironments" | "createEnvironment" | "updateEnvironment" | "deleteEnvironment" | "setEnvironmentVariable" | "deleteEnvironmentVariable" | "listChannels" | "createChannel" | "updateChannel" | "reorderChannels" | "deleteChannel" | "updateSessionChannel" | "listRigs" | "createRig" | "getRig" | "updateRig" | "deleteRig" | "listRigVersions" | "activateRigVersion" | "listRigChanges" | "proposeRigChange" | "getRigChange" | "verifyRigChange" | "promoteRigChange" | "verifyRig" | "listWorkspaces" | "createWorkspace" | "updateWorkspace" | "setWorkspaceInferenceState" | "getWorkspace" | "getWorkspaceModelCatalog" | "listWorkspaceControlEvents" | "streamWorkspaceControlEvents" | "streamWorkspaceInteractionRevisions" | "getBillingUsage" | "getClientConfig" | "getStreamCapabilities" | "acknowledgeStream" | "attachViewer" | "heartbeatViewer" | "detachViewer" | "listNetworkRoutes" | "getNetworkRoute" | "createNetworkRoute" | "updateNetworkRoute" | "listSiteAuthConnections" | "getSiteAuthConnection" | "createSiteAuthConnection" | "updateSiteAuthConnection" | "listAuthRuns" | "getAuthRun" | "startBrowserAuthRun" | "reportBrowserAuthRun" | "protectedBrowserAuthFill" | "verifyBrowserAuthRun" | "listInteractionInterventions" | "getInteractionIntervention" | "createInteractionIntervention" | "resolveInteractionIntervention" | "listAttachedBrowsers" | "getAttachedBrowser" | "listBrowserIdentities" | "getBrowserIdentity" | "createBrowserIdentity" | "updateBrowserIdentity" | "listBrowserRevisions" | "listBrowserSessions" | "getBrowserSession" | "readBrowserClipboard" | "listBrowserDownloads" | "getBrowserDownload" | "saveBrowserDownload" | "createBrowserSession" | "listBrowserTargets" | "openBrowserTarget" | "selectBrowserTarget" | "closeBrowserTarget" | "observeBrowserTarget" | "actInBrowser" | "getBrowserActionReceipt" | "listBrowserDiagnostics" | "attachBrowserSession" | "heartbeatBrowserSession" | "publishBrowserRevision" | "suspendBrowserSession" | "resumeBrowserSession" | "endBrowserSession" | "listComputerSessions" | "getComputerSession" | "readComputerClipboard" | "createComputerSession" | "listComputerTargets" | "observeComputerTarget" | "actInComputer" | "getComputerActionReceipt" | "attachComputerSession" | "heartbeatComputerSession" | "endComputerSession" | "fsList" | "fsListBatch" | "fsRead" | "fsWrite" | "fsDelete" | "fsMove" | "fsMkdir" | "gitStatus" | "gitDiff" | "gitReadBatch" | "getWorkspaceCapture" | "getWorkspaceCaptureFile" | "terminalExec" | "terminalPtyOpen" | "terminalPtyWrite" | "terminalPtyResize" | "terminalPtyClose"> & Partial<Pick<OpenGeniClient, "createVideoArtifactPlaybackSource" | "streamWorkspaceLiveEvents" | "listSessionBackgroundCommands" | "cancelSessionBackgroundCommand" | "getComputerInputPosture">>;
|
|
8
|
+
/** Compact list transport is optional for scripted and older clients. */
|
|
9
|
+
export type SessionClientLike = SessionClientMethods & Partial<Pick<OpenGeniClient, "listSessionSummaryPage">>;
|
|
8
10
|
/**
|
|
9
11
|
* Tenant-safe client surface required by the session-only React entry.
|
|
10
12
|
*
|
|
@@ -14,7 +16,7 @@ export type SessionClientLike = Pick<OpenGeniClient, "getClientConfig" | "getSes
|
|
|
14
16
|
* host that does not expose that authority still supports every session-local
|
|
15
17
|
* composer/control path.
|
|
16
18
|
*/
|
|
17
|
-
export type EmbeddedSessionClientLike = Pick<OpenGeniClient, "getSession" | "listEvents" | "streamEvents" | "getComposerDraft" | "saveComposerDraft" | "sendMessage" | "steerMessage" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "pauseSession" | "resumeSession" | "sendApprovalDecision"> & {
|
|
19
|
+
export type EmbeddedSessionClientLike = Pick<OpenGeniClient, "getSession" | "listEvents" | "streamEvents" | "getComposerDraft" | "saveComposerDraft" | "submitComposerDraft" | "sendMessage" | "steerMessage" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "pauseSession" | "resumeSession" | "sendApprovalDecision"> & {
|
|
18
20
|
setWorkspaceInferenceState?: OpenGeniClient["setWorkspaceInferenceState"] | undefined;
|
|
19
21
|
};
|
|
20
22
|
/** Event-read surface shared by hooks that optionally tail a session. */
|
|
@@ -26,7 +28,7 @@ export type EmbeddedGoalClientLike = EmbeddedSessionEventClientLike & Pick<OpenG
|
|
|
26
28
|
/** Exact client surface required by {@link useSessionLineage}. */
|
|
27
29
|
export type EmbeddedSessionLineageClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSessionLineage">;
|
|
28
30
|
/** Exact client surface required by {@link useFileAttachments}. */
|
|
29
|
-
export type EmbeddedFileAttachmentClientLike = Pick<OpenGeniClient, "uploadFile"
|
|
31
|
+
export type EmbeddedFileAttachmentClientLike = Pick<OpenGeniClient, "uploadFile"> & Partial<Pick<OpenGeniClient, "createFileDownloadUrl">>;
|
|
30
32
|
/** Exact client surface required by structured human-input hooks. */
|
|
31
33
|
export type EmbeddedHumanInputSessionClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "listHumanInputRequests" | "submitHumanInputResponse">;
|
|
32
34
|
/** Exact client surface required by MCP approval-policy hooks. */
|
|
@@ -38,6 +40,7 @@ export type EmbeddedInterventionClientLike = Pick<OpenGeniClient, "streamWorkspa
|
|
|
38
40
|
/** Exact public SDK surface required by BrowserSession hooks and components. */
|
|
39
41
|
export type EmbeddedBrowserInteractionClientLike = Pick<OpenGeniClient, "streamWorkspaceInteractionRevisions" | "listNetworkRoutes" | "getNetworkRoute" | "createNetworkRoute" | "updateNetworkRoute" | "listSiteAuthConnections" | "getSiteAuthConnection" | "createSiteAuthConnection" | "updateSiteAuthConnection" | "listAuthRuns" | "getAuthRun" | "startBrowserAuthRun" | "reportBrowserAuthRun" | "protectedBrowserAuthFill" | "verifyBrowserAuthRun" | "listInteractionInterventions" | "getInteractionIntervention" | "createInteractionIntervention" | "resolveInteractionIntervention" | "listAttachedBrowsers" | "getAttachedBrowser" | "listBrowserIdentities" | "getBrowserIdentity" | "createBrowserIdentity" | "updateBrowserIdentity" | "listBrowserRevisions" | "listBrowserSessions" | "getBrowserSession" | "readBrowserClipboard" | "listBrowserDownloads" | "getBrowserDownload" | "saveBrowserDownload" | "createBrowserSession" | "listBrowserTargets" | "openBrowserTarget" | "selectBrowserTarget" | "closeBrowserTarget" | "observeBrowserTarget" | "actInBrowser" | "getBrowserActionReceipt" | "listBrowserDiagnostics" | "attachBrowserSession" | "heartbeatBrowserSession" | "publishBrowserRevision" | "suspendBrowserSession" | "resumeBrowserSession" | "endBrowserSession"> & EmbeddedInterventionClientLike;
|
|
40
42
|
/** Exact public SDK surface required by ComputerSession hooks and components. */
|
|
41
|
-
export type EmbeddedComputerInteractionClientLike = Pick<OpenGeniClient, "streamWorkspaceInteractionRevisions" | "listComputerSessions" | "getComputerSession" | "readComputerClipboard" | "createComputerSession" | "listComputerTargets" | "observeComputerTarget" | "actInComputer" | "getComputerActionReceipt" | "attachComputerSession" | "heartbeatComputerSession" | "endComputerSession"> & EmbeddedInterventionClientLike
|
|
43
|
+
export type EmbeddedComputerInteractionClientLike = Pick<OpenGeniClient, "streamWorkspaceInteractionRevisions" | "listComputerSessions" | "getComputerSession" | "readComputerClipboard" | "createComputerSession" | "listComputerTargets" | "observeComputerTarget" | "actInComputer" | "getComputerActionReceipt" | "attachComputerSession" | "heartbeatComputerSession" | "endComputerSession"> & EmbeddedInterventionClientLike & Partial<Pick<OpenGeniClient, "getComputerInputPosture">>;
|
|
42
44
|
/** Complete public Browser + Computer interaction surface. */
|
|
43
45
|
export type EmbeddedInteractionClientLike = EmbeddedBrowserInteractionClientLike & EmbeddedComputerInteractionClientLike;
|
|
46
|
+
export {};
|
package/dist/clipboard.js
CHANGED
package/dist/commands/types.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export type CommandContext = {
|
|
|
40
40
|
permissions: Permission[];
|
|
41
41
|
/** Surface a transient ok/error notice in the composer. */
|
|
42
42
|
notice: (notice: Notice) => void;
|
|
43
|
+
/** Optional presentation hook for native command failures; never rewrites command content. */
|
|
44
|
+
formatError?: ((error: unknown, defaultMessage: string) => string) | undefined;
|
|
43
45
|
/** Open the in-composer /help panel (rendered from the registry). */
|
|
44
46
|
openHelp: () => void;
|
|
45
47
|
/**
|
|
@@ -2,12 +2,16 @@ import { type ReactNode } from "react";
|
|
|
2
2
|
import type { PendingApproval } from "../approvals.js";
|
|
3
3
|
export type ApprovalSurfaceMessages = {
|
|
4
4
|
title: string;
|
|
5
|
+
/** Screen-reader context for the decision; not shown visually. */
|
|
5
6
|
description: string;
|
|
6
7
|
approve: string;
|
|
7
8
|
reject: string;
|
|
8
9
|
approving: string;
|
|
9
10
|
rejecting: string;
|
|
10
11
|
formatToolName: (name: string) => string;
|
|
12
|
+
/** Toggle for the exact arguments when they are shown as readable fields. */
|
|
13
|
+
showDetails?: string | undefined;
|
|
14
|
+
hideDetails?: string | undefined;
|
|
11
15
|
};
|
|
12
16
|
export declare const defaultApprovalSurfaceMessages: ApprovalSurfaceMessages;
|
|
13
17
|
export type ApprovalSurfaceProps = {
|
|
@@ -20,6 +24,17 @@ export type ApprovalSurfaceProps = {
|
|
|
20
24
|
renderApproval?: ((approval: PendingApproval) => ReactNode) | undefined;
|
|
21
25
|
className?: string | undefined;
|
|
22
26
|
};
|
|
27
|
+
export type ApprovalField = {
|
|
28
|
+
key: string;
|
|
29
|
+
label: string;
|
|
30
|
+
value: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Readable fields for a flat argument object (scalars and short scalar lists).
|
|
34
|
+
* Returns null when the arguments are nested, large, or not an object, so the
|
|
35
|
+
* caller shows the exact JSON instead of a lossy summary.
|
|
36
|
+
*/
|
|
37
|
+
export declare function approvalArgumentFields(value: unknown): ApprovalField[] | null;
|
|
23
38
|
/**
|
|
24
39
|
* Host-neutral approval presentation backed by the native pending-approval
|
|
25
40
|
* projection and control callbacks. It owns only presentation and duplicate
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Shared chrome for artifact surfaces: the OpenGeni console and embedding hosts
|
|
4
|
+
* render the same header, controls, and load states. Class names use the
|
|
5
|
+
* package theme aliases, so the console's own Tailwind build and the compiled
|
|
6
|
+
* `.og-root` stylesheet resolve them identically.
|
|
7
|
+
*/
|
|
8
|
+
export type ArtifactKind = "document" | "spreadsheet" | "presentation" | "site" | "image" | "file";
|
|
9
|
+
declare const BUTTON_VARIANT: {
|
|
10
|
+
readonly ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50";
|
|
11
|
+
readonly outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-border dark:bg-input/30 dark:hover:bg-input/50";
|
|
12
|
+
};
|
|
13
|
+
declare const BUTTON_SIZE: {
|
|
14
|
+
readonly sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5";
|
|
15
|
+
readonly icon: "size-9";
|
|
16
|
+
readonly "icon-sm": "size-8";
|
|
17
|
+
};
|
|
18
|
+
export declare function ArtifactButton({ variant, size, className, type, ...props }: ComponentProps<"button"> & {
|
|
19
|
+
variant?: keyof typeof BUTTON_VARIANT;
|
|
20
|
+
size?: keyof typeof BUTTON_SIZE;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
export declare function ArtifactBadge({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
23
|
+
export declare const ArtifactSelect: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
24
|
+
export declare function artifactKindIcon(kind: ArtifactKind): ReactNode;
|
|
25
|
+
export declare function artifactKindSubtitle(kind: ArtifactKind): string;
|
|
26
|
+
type LoadErrorCopy = Readonly<Record<"unavailable" | "invalid" | "transient", {
|
|
27
|
+
title: string;
|
|
28
|
+
message: string;
|
|
29
|
+
}>>;
|
|
30
|
+
/**
|
|
31
|
+
* Every user-facing string in the artifact surfaces (inline Site preview, Site
|
|
32
|
+
* frame, viewer header and states). Hosts translate by passing a partial
|
|
33
|
+
* `labels` object; unspecified keys keep the English defaults.
|
|
34
|
+
*/
|
|
35
|
+
export type ArtifactLabels = Readonly<{
|
|
36
|
+
back: string;
|
|
37
|
+
close: string;
|
|
38
|
+
/** Header title and loading copy until an artifact's title is known. */
|
|
39
|
+
opening: string;
|
|
40
|
+
/** Header title when an artifact cannot be opened. */
|
|
41
|
+
artifact: string;
|
|
42
|
+
startingEditor: string;
|
|
43
|
+
kindSubtitle: (kind: ArtifactKind) => string;
|
|
44
|
+
live: string;
|
|
45
|
+
reloadSite: string;
|
|
46
|
+
openFullScreen: string;
|
|
47
|
+
editWithAgent: string;
|
|
48
|
+
editShort: string;
|
|
49
|
+
preview: string;
|
|
50
|
+
loadPreview: string;
|
|
51
|
+
loadSitePreview: string;
|
|
52
|
+
siteVersion: string;
|
|
53
|
+
savedVersion: string;
|
|
54
|
+
version: (revision: number) => string;
|
|
55
|
+
openSite: string;
|
|
56
|
+
loadingSite: string;
|
|
57
|
+
siteArchived: string;
|
|
58
|
+
siteUnpublished: string;
|
|
59
|
+
siteReferenceInvalid: string;
|
|
60
|
+
siteLoadFailed: string;
|
|
61
|
+
retry: string;
|
|
62
|
+
tryAgain: string;
|
|
63
|
+
toolCount: (count: number) => string;
|
|
64
|
+
toolsAvailable: (count: number) => string;
|
|
65
|
+
sourceFileCount: (count: number) => string;
|
|
66
|
+
viewingDisabled: {
|
|
67
|
+
title: string;
|
|
68
|
+
message: string;
|
|
69
|
+
};
|
|
70
|
+
editorsMissing: {
|
|
71
|
+
title: string;
|
|
72
|
+
message: string;
|
|
73
|
+
};
|
|
74
|
+
siteErrors: LoadErrorCopy;
|
|
75
|
+
editableErrors: LoadErrorCopy;
|
|
76
|
+
reference: (id: string) => string;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const DEFAULT_ARTIFACT_LABELS: ArtifactLabels;
|
|
79
|
+
/** Translate every artifact surface below; nested providers override outer ones. */
|
|
80
|
+
export declare function ArtifactLabelsProvider({ labels, children, }: {
|
|
81
|
+
labels: Partial<ArtifactLabels> | undefined;
|
|
82
|
+
children: ReactNode;
|
|
83
|
+
}): import("react").JSX.Element;
|
|
84
|
+
export declare function useArtifactLabels(): ArtifactLabels;
|
|
85
|
+
/**
|
|
86
|
+
* One artifact header: optional Back, the kind tile, title (or a host-supplied
|
|
87
|
+
* title control), trailing actions, and optional Close. The console dock and
|
|
88
|
+
* embedded viewers share it.
|
|
89
|
+
*/
|
|
90
|
+
export declare function ArtifactViewerHeader({ kind, title, subtitle, titleSlot, onBack, backLabel, actions, onClose, closeLabel, }: Readonly<{
|
|
91
|
+
/** `null` while the host does not know the modality yet. */
|
|
92
|
+
kind: ArtifactKind | null;
|
|
93
|
+
title: string;
|
|
94
|
+
subtitle?: string | undefined;
|
|
95
|
+
/** Replaces the title text, for example with a picker. */
|
|
96
|
+
titleSlot?: ReactNode;
|
|
97
|
+
onBack?: (() => void) | undefined;
|
|
98
|
+
backLabel?: string | undefined;
|
|
99
|
+
actions?: ReactNode;
|
|
100
|
+
onClose?: (() => void) | undefined;
|
|
101
|
+
closeLabel?: string | undefined;
|
|
102
|
+
}>): import("react").JSX.Element;
|
|
103
|
+
export declare function ArtifactLoading({ label }: {
|
|
104
|
+
label: string;
|
|
105
|
+
}): import("react").JSX.Element;
|
|
106
|
+
export declare function ArtifactProblem({ view, onRetry, }: {
|
|
107
|
+
view: ArtifactLoadErrorView;
|
|
108
|
+
onRetry?: (() => void) | undefined;
|
|
109
|
+
}): import("react").JSX.Element;
|
|
110
|
+
export type ArtifactLoadErrorKind = "site" | "editable";
|
|
111
|
+
export type ArtifactLoadErrorView = Readonly<{
|
|
112
|
+
title: string;
|
|
113
|
+
message: string;
|
|
114
|
+
retryable: boolean;
|
|
115
|
+
correlationId?: string;
|
|
116
|
+
}>;
|
|
117
|
+
/** Site/editor load copy. Never surfaces raw OpenGeni API status text. */
|
|
118
|
+
export declare function artifactLoadErrorView(error: unknown, kind: ArtifactLoadErrorKind, labels?: ArtifactLabels): ArtifactLoadErrorView;
|
|
119
|
+
export declare function artifactLoadErrorMessage(view: ArtifactLoadErrorView, labels?: ArtifactLabels): string;
|
|
120
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type PublishedHtmlArtifactToolBridge } from "./published-html-artifact-frame.js";
|
|
3
|
+
export type ArtifactSandboxProps = {
|
|
4
|
+
html: string;
|
|
5
|
+
height?: number | undefined;
|
|
6
|
+
autoHeight?: boolean | undefined;
|
|
7
|
+
theme?: "light" | "dark" | undefined;
|
|
8
|
+
headerControls?: ReactNode | undefined;
|
|
9
|
+
title: string;
|
|
10
|
+
/** Hide the visible title/icon while retaining the accessible iframe title. */
|
|
11
|
+
showTitle?: boolean | undefined;
|
|
12
|
+
showLiveStatus?: boolean | undefined;
|
|
13
|
+
versionLabel?: string | undefined;
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
editDisabled?: boolean | undefined;
|
|
16
|
+
onEdit?: (() => void) | undefined;
|
|
17
|
+
toolBridge?: PublishedHtmlArtifactToolBridge | undefined;
|
|
18
|
+
connectedToolCount?: number | undefined;
|
|
19
|
+
sourceFileCount?: number | undefined;
|
|
20
|
+
fill?: boolean | undefined;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The Site/preview frame chrome shared by the console and embedding hosts:
|
|
24
|
+
* title, version and tool badges, live status, reload, and a full-screen mode
|
|
25
|
+
* that escapes the host's scroll containers through the modal top layer.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ArtifactSandbox(props: ArtifactSandboxProps): import("react").JSX.Element;
|
|
@@ -3,6 +3,8 @@ export type ArtifactModality = "spreadsheet" | "document" | "presentation";
|
|
|
3
3
|
export type ArtifactSurfaceProps = {
|
|
4
4
|
modality: ArtifactModality;
|
|
5
5
|
title: string;
|
|
6
|
+
/** An embedding host may already provide the artifact title and navigation. */
|
|
7
|
+
showHeader?: boolean | undefined;
|
|
6
8
|
subtitle?: ReactNode | undefined;
|
|
7
9
|
actions?: ReactNode | undefined;
|
|
8
10
|
children: ReactNode;
|
|
@@ -15,4 +17,4 @@ export type ArtifactSurfaceProps = {
|
|
|
15
17
|
* persistence state: hosts can use the same surface for a local draft, a
|
|
16
18
|
* durable OpenGeni artifact, or a collaborative projection.
|
|
17
19
|
*/
|
|
18
|
-
export declare function ArtifactSurface({ modality, title, subtitle, actions, children, footer, busy, className, }: ArtifactSurfaceProps): import("react").JSX.Element;
|
|
20
|
+
export declare function ArtifactSurface({ modality, title, showHeader, subtitle, actions, children, footer, busy, className, }: ArtifactSurfaceProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { OpenGeniClient, ToolGatewayIdentity } from "@opengeni/sdk";
|
|
2
|
+
import { type ArtifactLabels } from "./artifact-chrome.js";
|
|
3
|
+
import type { PublishedHtmlArtifactToolBridge } from "./published-html-artifact-frame.js";
|
|
4
|
+
/** Reads a Site needs to render; the console client, the SDK client, or a proxy. */
|
|
5
|
+
export type SiteSnapshotClient = Pick<OpenGeniClient, "getWorkspaceArtifact" | "getWorkspaceArtifactHtml"> & Partial<Pick<OpenGeniClient, "getWorkspaceArtifactContent">>;
|
|
6
|
+
/** The exact saved Site a tool bridge is pinned to (absent for inline HTML). */
|
|
7
|
+
export type SiteToolScope = {
|
|
8
|
+
artifactId: string;
|
|
9
|
+
siteVersionId: string;
|
|
10
|
+
requestedTools: readonly ToolGatewayIdentity[];
|
|
11
|
+
};
|
|
12
|
+
/** Host-owned Site API access. Omit it and Sites render without workspace tools. */
|
|
13
|
+
export type SiteToolBridgeFactory = (site?: SiteToolScope) => PublishedHtmlArtifactToolBridge | undefined;
|
|
14
|
+
export type ChatInteractiveBlockProps = {
|
|
15
|
+
workspaceId: string;
|
|
16
|
+
kind: "html" | "site";
|
|
17
|
+
content: string;
|
|
18
|
+
client: SiteSnapshotClient;
|
|
19
|
+
toolBridge?: SiteToolBridgeFactory | undefined;
|
|
20
|
+
theme?: "light" | "dark" | undefined;
|
|
21
|
+
/** Translations for the preview's copy; defaults to English. */
|
|
22
|
+
labels?: Partial<ArtifactLabels> | undefined;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Inline preview for an assistant `opengeni-html` or `opengeni-site` fence, as
|
|
26
|
+
* the OpenGeni console renders it. "Open Site" goes through the nearest
|
|
27
|
+
* `resolveLink`, so a host decides where a Site opens.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ChatInteractiveBlock({ labels, ...props }: ChatInteractiveBlockProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Reserve the chat slot before starting expensive media work. Activation is
|
|
4
|
+
* one-way: scrolling away must not discard an interactive preview's state.
|
|
5
|
+
* The timeline parks at its initial tip in layout effects before this observer
|
|
6
|
+
* is attached, so historical previews above the entry viewport stay dormant.
|
|
7
|
+
*/
|
|
8
|
+
export declare function DeferredChatMedia({ children, height, label, actionLabel, }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
height: number;
|
|
11
|
+
/** What is loading, as in "Load {label}". */
|
|
12
|
+
label?: string | undefined;
|
|
13
|
+
/** The complete (translated) activation label; overrides `label`. */
|
|
14
|
+
actionLabel?: string | undefined;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
@@ -150,6 +150,7 @@ export type DocumentProjectionEditorProps = Omit<DocumentEditorProps, "document"
|
|
|
150
150
|
};
|
|
151
151
|
export type DocumentProjectionArtifactSurfaceProps = Omit<DocumentProjectionEditorProps, "ariaLabel" | "className"> & {
|
|
152
152
|
title: string;
|
|
153
|
+
showHeader?: boolean | undefined;
|
|
153
154
|
subtitle?: ReactNode | undefined;
|
|
154
155
|
busy?: boolean | undefined;
|
|
155
156
|
className?: string | undefined;
|
|
@@ -157,6 +158,7 @@ export type DocumentProjectionArtifactSurfaceProps = Omit<DocumentProjectionEdit
|
|
|
157
158
|
};
|
|
158
159
|
export type DocumentArtifactSurfaceProps = Omit<DocumentEditorProps, "ariaLabel" | "className"> & {
|
|
159
160
|
title: string;
|
|
161
|
+
showHeader?: boolean | undefined;
|
|
160
162
|
subtitle?: ReactNode | undefined;
|
|
161
163
|
busy?: boolean | undefined;
|
|
162
164
|
className?: string | undefined;
|
|
@@ -167,6 +169,6 @@ export declare function DocumentEditor(props: DocumentEditorProps): import("reac
|
|
|
167
169
|
/** Projection-first document editor with one async command boundary. */
|
|
168
170
|
export declare function DocumentProjectionEditor({ projection, commit, onCommandError, onSelectionChange, readOnly, ...props }: DocumentProjectionEditorProps): import("react").JSX.Element;
|
|
169
171
|
/** Artifact chrome plus the reusable document editor. */
|
|
170
|
-
export declare function DocumentArtifactSurface({ document, title, subtitle, busy, className, editorClassName, ...editorProps }: DocumentArtifactSurfaceProps): import("react").JSX.Element;
|
|
172
|
+
export declare function DocumentArtifactSurface({ document, title, showHeader, subtitle, busy, className, editorClassName, ...editorProps }: DocumentArtifactSurfaceProps): import("react").JSX.Element;
|
|
171
173
|
/** Artifact chrome over the projection-first document editor. */
|
|
172
|
-
export declare function DocumentProjectionArtifactSurface({ projection, title, subtitle, busy, className, editorClassName, ...editorProps }: DocumentProjectionArtifactSurfaceProps): import("react").JSX.Element;
|
|
174
|
+
export declare function DocumentProjectionArtifactSurface({ projection, title, showHeader, subtitle, busy, className, editorClassName, ...editorProps }: DocumentProjectionArtifactSurfaceProps): import("react").JSX.Element;
|
|
@@ -5,9 +5,10 @@ export declare function editableArtifactProjectionKey(view: EditableArtifactSync
|
|
|
5
5
|
export declare function editableArtifactStatusLabel(view: EditableArtifactSyncView): string;
|
|
6
6
|
/** Revoked read authority must hide any projection retained before invalidation. */
|
|
7
7
|
export declare function editableArtifactAccessRevoked(view: EditableArtifactSyncView): boolean;
|
|
8
|
-
export declare function EditableArtifactMessage({ title, detail, retry, }: {
|
|
8
|
+
export declare function EditableArtifactMessage({ title, detail, retry, retryLabel, }: {
|
|
9
9
|
title: string;
|
|
10
10
|
detail: string;
|
|
11
11
|
retry?: (() => void) | undefined;
|
|
12
|
+
retryLabel?: string | undefined;
|
|
12
13
|
}): import("react").JSX.Element;
|
|
13
14
|
export declare function asEditableArtifactError(cause: unknown, fallback: string): Error;
|