@opengeni/react 0.57.0 → 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 +654 -22
- 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 +10 -3
- package/dist/realtime.js +229 -83
- 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 +274 -60
- 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,307 @@
|
|
|
1
|
+
import { useState, type FormEvent } from "react";
|
|
2
|
+
import type { ConnectAttempt, ConnectController } from "@opengeni/connect";
|
|
3
|
+
import { useConnect } from "./hooks/use-connect";
|
|
4
|
+
|
|
5
|
+
const setupStatus: Record<ConnectAttempt["state"], string> = {
|
|
6
|
+
ready: "Ready to connect",
|
|
7
|
+
requires_user_action: "Authorize your account",
|
|
8
|
+
credential_input: "Enter connection details",
|
|
9
|
+
provider_wait: "Waiting for authorization",
|
|
10
|
+
account_selection: "Choose an account",
|
|
11
|
+
resource_selection: "Choose resources",
|
|
12
|
+
preview: "Choose tools",
|
|
13
|
+
installing: "Adding selected tools…",
|
|
14
|
+
connected_but_incomplete: "Choose which tools to add",
|
|
15
|
+
complete: "Connection ready",
|
|
16
|
+
cancelled: "Setup cancelled",
|
|
17
|
+
expired: "Setup expired",
|
|
18
|
+
failed: "Setup could not finish",
|
|
19
|
+
uncertain: "Setup outcome needs checking",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function deviceVerificationUrl(action: ConnectAttempt["nextAction"]): string | null {
|
|
23
|
+
if (action.type !== "wait" || !action.verificationUrl) return null;
|
|
24
|
+
try {
|
|
25
|
+
const url = new URL(action.verificationUrl);
|
|
26
|
+
return url.protocol === "https:" && !url.username && !url.password
|
|
27
|
+
? action.verificationUrl
|
|
28
|
+
: null;
|
|
29
|
+
} catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ConnectSetupProps = {
|
|
35
|
+
controller: ConnectController;
|
|
36
|
+
/** Called synchronously in the click handler so a host can open a popup. */
|
|
37
|
+
onAuthorize: (attempt: ConnectAttempt) => void | Promise<unknown>;
|
|
38
|
+
/** Called synchronously on Continue; hosts can reserve a popup before advancing. */
|
|
39
|
+
onSelectAccount?: (accountId: string) => void | Promise<unknown>;
|
|
40
|
+
/** Host pagination must retain selections across pages and submit the final set. */
|
|
41
|
+
onBrowseResources?: (attempt: ConnectAttempt) => void | Promise<unknown>;
|
|
42
|
+
className?: string;
|
|
43
|
+
/** Provider-specific label supplied by the embedding host. */
|
|
44
|
+
authorizeLabel?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** Controller-backed setup surface, styled by opt-in connect.css. No provider secrets enter React state. Host owns
|
|
48
|
+
* chooser, controller lifetime, navigation and recovery after full redirect. */
|
|
49
|
+
export function ConnectSetup(props: ConnectSetupProps) {
|
|
50
|
+
// Attempt IDs/revisions are not a substitute for actor scope. A host can
|
|
51
|
+
// recover the same attempt through a replacement controller; never preserve
|
|
52
|
+
// a previous actor's unsent credential DOM or local errors across that swap.
|
|
53
|
+
const [scope, setScope] = useState(props.controller);
|
|
54
|
+
const [generation, setGeneration] = useState(0);
|
|
55
|
+
if (scope !== props.controller) {
|
|
56
|
+
setScope(props.controller);
|
|
57
|
+
setGeneration(generation + 1);
|
|
58
|
+
}
|
|
59
|
+
return <ScopedSetup key={generation} {...props} />;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function ScopedSetup({
|
|
63
|
+
controller,
|
|
64
|
+
onAuthorize,
|
|
65
|
+
onBrowseResources,
|
|
66
|
+
onSelectAccount,
|
|
67
|
+
className,
|
|
68
|
+
authorizeLabel = "Authorize connection",
|
|
69
|
+
}: ConnectSetupProps) {
|
|
70
|
+
const view = useConnect(controller);
|
|
71
|
+
const [localError, setLocalError] = useState(false);
|
|
72
|
+
const [navigating, setNavigating] = useState(false);
|
|
73
|
+
const invoke = (operation: () => unknown | Promise<unknown>) => {
|
|
74
|
+
setLocalError(false);
|
|
75
|
+
try {
|
|
76
|
+
void Promise.resolve(operation()).catch(() => setLocalError(true));
|
|
77
|
+
} catch {
|
|
78
|
+
setLocalError(true);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const attempt = view.attempt;
|
|
82
|
+
if (!attempt)
|
|
83
|
+
return (
|
|
84
|
+
<section
|
|
85
|
+
className={["og-connect-setup", className].filter(Boolean).join(" ")}
|
|
86
|
+
aria-label="Connection setup"
|
|
87
|
+
>
|
|
88
|
+
<p role="status">Choose a connection to begin.</p>
|
|
89
|
+
</section>
|
|
90
|
+
);
|
|
91
|
+
const action = attempt.nextAction;
|
|
92
|
+
const verificationUrl = deviceVerificationUrl(action);
|
|
93
|
+
const terminal = ["complete", "cancelled", "expired"].includes(attempt.state);
|
|
94
|
+
const submit = (event: FormEvent<HTMLFormElement>) => {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
const form = event.currentTarget;
|
|
97
|
+
const data = new FormData(form);
|
|
98
|
+
if (view.busy || navigating) return;
|
|
99
|
+
const key = crypto.randomUUID();
|
|
100
|
+
if (action.type === "credentials") {
|
|
101
|
+
const values = Object.fromEntries(
|
|
102
|
+
action.fields.map((field, i) => [field.name, String(data.get(`field-${i}`) ?? "")]),
|
|
103
|
+
);
|
|
104
|
+
// Clear the DOM before awaiting remote work; controller never retains values.
|
|
105
|
+
form.reset();
|
|
106
|
+
invoke(() => view.advance({ type: "credentials", values }, key));
|
|
107
|
+
} else if (action.type === "select_account") {
|
|
108
|
+
const accountId = String(data.get("account") ?? "");
|
|
109
|
+
if (
|
|
110
|
+
action.accounts.some((account) => account.id === accountId && account.status !== "disabled")
|
|
111
|
+
)
|
|
112
|
+
invoke(async () => {
|
|
113
|
+
if (!onSelectAccount) return view.advance({ type: "account", accountId }, key);
|
|
114
|
+
setNavigating(true);
|
|
115
|
+
try {
|
|
116
|
+
await onSelectAccount(accountId);
|
|
117
|
+
} finally {
|
|
118
|
+
setNavigating(false);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
} else if (action.type === "select_resources") {
|
|
122
|
+
if (action.cursor) return;
|
|
123
|
+
const resourceIds = data.getAll("resource").map(String);
|
|
124
|
+
invoke(() => view.advance({ type: "resources", resourceIds }, key));
|
|
125
|
+
} else if (action.type === "preview") {
|
|
126
|
+
const operationIds = data.getAll("operation").map(String);
|
|
127
|
+
invoke(() =>
|
|
128
|
+
view.advance(
|
|
129
|
+
{
|
|
130
|
+
type: "install",
|
|
131
|
+
previewId: action.previewId,
|
|
132
|
+
contentHash: action.contentHash,
|
|
133
|
+
operationIds,
|
|
134
|
+
},
|
|
135
|
+
key,
|
|
136
|
+
),
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
return (
|
|
141
|
+
<section
|
|
142
|
+
className={["og-connect-setup", className].filter(Boolean).join(" ")}
|
|
143
|
+
aria-label="Connection setup"
|
|
144
|
+
aria-busy={view.busy || navigating}
|
|
145
|
+
>
|
|
146
|
+
<div className="og-connect-setup-summary">
|
|
147
|
+
<p className="og-connect-setup-scope">
|
|
148
|
+
{attempt.ownership === "personal" ? "Personal connection" : "Workspace connection"}
|
|
149
|
+
</p>
|
|
150
|
+
<p role="status" className="og-connect-setup-status">
|
|
151
|
+
{setupStatus[attempt.state]}
|
|
152
|
+
</p>
|
|
153
|
+
<p className="og-connect-setup-description">
|
|
154
|
+
{attempt.ownership === "personal"
|
|
155
|
+
? "Only your work can use this connection."
|
|
156
|
+
: "Work in this workspace can use this connection."}
|
|
157
|
+
</p>
|
|
158
|
+
</div>
|
|
159
|
+
{attempt.account && <p>Account: {attempt.account.label}</p>}
|
|
160
|
+
{(localError || view.error || attempt.error) && (
|
|
161
|
+
<p role="alert">
|
|
162
|
+
{attempt.error?.code === "source_changed"
|
|
163
|
+
? "The integration source changed. Review the updated tools before adding them."
|
|
164
|
+
: "Connection setup could not continue. Refresh its status before trying again."}
|
|
165
|
+
</p>
|
|
166
|
+
)}
|
|
167
|
+
{!terminal && (
|
|
168
|
+
<form key={`${attempt.id}:${attempt.revision}`} onSubmit={submit} autoComplete="off">
|
|
169
|
+
<fieldset disabled={view.busy || navigating}>
|
|
170
|
+
{["credentials", "select_account", "select_resources", "preview"].includes(
|
|
171
|
+
action.type,
|
|
172
|
+
) ? (
|
|
173
|
+
<legend>Connection details</legend>
|
|
174
|
+
) : null}
|
|
175
|
+
{attempt.state === "connected_but_incomplete" && action.type === "none" && (
|
|
176
|
+
<button
|
|
177
|
+
type="button"
|
|
178
|
+
className="og-connect-setup-primary"
|
|
179
|
+
onClick={() => invoke(() => view.advance({ type: "retry" }, crypto.randomUUID()))}
|
|
180
|
+
>
|
|
181
|
+
Choose tools
|
|
182
|
+
</button>
|
|
183
|
+
)}
|
|
184
|
+
{action.type === "credentials" &&
|
|
185
|
+
action.fields.map((field, i) => (
|
|
186
|
+
<label key={field.name}>
|
|
187
|
+
{field.label}
|
|
188
|
+
{field.options ? (
|
|
189
|
+
<select name={`field-${i}`} required={field.required} defaultValue="">
|
|
190
|
+
<option value="">
|
|
191
|
+
{field.required ? "Choose an option" : "No account (public service)"}
|
|
192
|
+
</option>
|
|
193
|
+
{field.options.map((option) => (
|
|
194
|
+
<option key={option.value} value={option.value}>
|
|
195
|
+
{option.label}
|
|
196
|
+
</option>
|
|
197
|
+
))}
|
|
198
|
+
</select>
|
|
199
|
+
) : (
|
|
200
|
+
<input
|
|
201
|
+
name={`field-${i}`}
|
|
202
|
+
type={field.secret ? "password" : "text"}
|
|
203
|
+
required={field.required}
|
|
204
|
+
autoComplete="off"
|
|
205
|
+
/>
|
|
206
|
+
)}
|
|
207
|
+
</label>
|
|
208
|
+
))}
|
|
209
|
+
{action.type === "select_account" && (
|
|
210
|
+
<label>
|
|
211
|
+
Account
|
|
212
|
+
<select name="account" required defaultValue="">
|
|
213
|
+
<option value="" disabled>
|
|
214
|
+
Choose an account
|
|
215
|
+
</option>
|
|
216
|
+
{action.accounts.map((account) => (
|
|
217
|
+
<option
|
|
218
|
+
key={account.id}
|
|
219
|
+
value={account.id}
|
|
220
|
+
disabled={account.status === "disabled"}
|
|
221
|
+
>
|
|
222
|
+
{account.label} — {account.id} ({account.ownership})
|
|
223
|
+
</option>
|
|
224
|
+
))}
|
|
225
|
+
</select>
|
|
226
|
+
</label>
|
|
227
|
+
)}
|
|
228
|
+
{action.type === "select_resources" &&
|
|
229
|
+
action.resources.map((resource) => (
|
|
230
|
+
<label key={resource.id}>
|
|
231
|
+
<input type="checkbox" name="resource" value={resource.id} />
|
|
232
|
+
{resource.label} ({resource.kind})
|
|
233
|
+
</label>
|
|
234
|
+
))}
|
|
235
|
+
{action.type === "select_resources" && action.cursor && (
|
|
236
|
+
<>
|
|
237
|
+
<p>More resources are available. Review all pages before submitting a selection.</p>
|
|
238
|
+
{onBrowseResources && (
|
|
239
|
+
<button
|
|
240
|
+
type="button"
|
|
241
|
+
onClick={() => invoke(() => onBrowseResources(structuredClone(attempt)))}
|
|
242
|
+
>
|
|
243
|
+
Browse all resources
|
|
244
|
+
</button>
|
|
245
|
+
)}
|
|
246
|
+
</>
|
|
247
|
+
)}
|
|
248
|
+
{action.type === "preview" && (
|
|
249
|
+
<>
|
|
250
|
+
<p>Choose the tools agents can use with this account.</p>
|
|
251
|
+
{action.operations.map((operation) => (
|
|
252
|
+
<label key={operation.id}>
|
|
253
|
+
<input type="checkbox" name="operation" value={operation.id} />
|
|
254
|
+
{operation.label} ({operation.kind})
|
|
255
|
+
</label>
|
|
256
|
+
))}
|
|
257
|
+
</>
|
|
258
|
+
)}
|
|
259
|
+
{["credentials", "select_account", "select_resources", "preview"].includes(
|
|
260
|
+
action.type,
|
|
261
|
+
) && (
|
|
262
|
+
<button
|
|
263
|
+
type="submit"
|
|
264
|
+
className="og-connect-setup-primary"
|
|
265
|
+
disabled={action.type === "select_resources" && Boolean(action.cursor)}
|
|
266
|
+
>
|
|
267
|
+
{action.type === "preview" ? "Add selected tools" : "Continue"}
|
|
268
|
+
</button>
|
|
269
|
+
)}
|
|
270
|
+
{action.type === "authorize" && (
|
|
271
|
+
<button
|
|
272
|
+
type="button"
|
|
273
|
+
className="og-connect-setup-primary"
|
|
274
|
+
onClick={() => invoke(() => onAuthorize(structuredClone(attempt)))}
|
|
275
|
+
>
|
|
276
|
+
{navigating ? "Waiting for authorization…" : authorizeLabel}
|
|
277
|
+
</button>
|
|
278
|
+
)}
|
|
279
|
+
{action.type === "wait" && (
|
|
280
|
+
<>
|
|
281
|
+
{action.userCode && (
|
|
282
|
+
<p>
|
|
283
|
+
Verification code: <code>{action.userCode}</code>
|
|
284
|
+
</p>
|
|
285
|
+
)}
|
|
286
|
+
<p>Complete provider authorization, then check the connection status.</p>
|
|
287
|
+
{verificationUrl && (
|
|
288
|
+
<a href={verificationUrl} target="_blank" rel="noopener noreferrer">
|
|
289
|
+
Open provider verification page (new tab)
|
|
290
|
+
</a>
|
|
291
|
+
)}
|
|
292
|
+
</>
|
|
293
|
+
)}
|
|
294
|
+
<div className="og-connect-setup-secondary">
|
|
295
|
+
<button type="button" onClick={() => invoke(() => view.refresh())}>
|
|
296
|
+
Check status
|
|
297
|
+
</button>
|
|
298
|
+
<button type="button" onClick={() => invoke(() => view.cancel(crypto.randomUUID()))}>
|
|
299
|
+
Cancel setup
|
|
300
|
+
</button>
|
|
301
|
+
</div>
|
|
302
|
+
</fieldset>
|
|
303
|
+
</form>
|
|
304
|
+
)}
|
|
305
|
+
</section>
|
|
306
|
+
);
|
|
307
|
+
}
|
package/src/connect.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Optional, unstyled React adapter over the shared headless controller.
|
|
2
|
+
// The host owns controller lifetime; unmounting one observer does not cancel an
|
|
3
|
+
// attempt another observer is displaying or a durable backend operation.
|
|
4
|
+
export { useConnect } from "./hooks/use-connect";
|
|
5
|
+
export {
|
|
6
|
+
CapabilityCatalogRow,
|
|
7
|
+
CapabilityCatalogIndicator,
|
|
8
|
+
type CapabilityCatalogRowProps,
|
|
9
|
+
type CapabilityCatalogStatus,
|
|
10
|
+
} from "./capability-catalog-row";
|
|
11
|
+
export {
|
|
12
|
+
SkillDiscovery,
|
|
13
|
+
type SkillDiscoveryProps,
|
|
14
|
+
type SkillDiscoveryClient,
|
|
15
|
+
type SkillDiscoveryItem,
|
|
16
|
+
type SkillDiscoveryPage,
|
|
17
|
+
} from "./skill-discovery";
|
|
18
|
+
export { ConnectSetup, type ConnectSetupProps } from "./connect-setup";
|
|
19
|
+
export { ConnectChooser, type ConnectChooserProps } from "./connect-chooser";
|
|
20
|
+
export { ConnectAccounts, type ConnectAccountsProps } from "./connect-accounts";
|
|
21
|
+
export { ConnectPanel, type ConnectPanelProps } from "./connect-panel";
|
|
22
|
+
export { ConnectionDiscovery, type ConnectionDiscoveryProps } from "./connection-discovery";
|
|
23
|
+
export {
|
|
24
|
+
McpConnectionCard,
|
|
25
|
+
type McpConnectionCardProps,
|
|
26
|
+
} from "./components/session-mcp-capability-card";
|
|
27
|
+
export { DeviceAuthorization, type DeviceAuthorizationProps } from "./device-authorization";
|
|
28
|
+
export {
|
|
29
|
+
IdentityLinkConsent,
|
|
30
|
+
type IdentityLinkClient,
|
|
31
|
+
type IdentityLinkConsentProps,
|
|
32
|
+
} from "./identity-link-consent";
|
|
33
|
+
export { IdentityLinkAccounts, type IdentityLinkAccountsClient } from "./identity-link-accounts";
|
|
34
|
+
|
|
35
|
+
export type { ConnectSnapshot } from "@opengeni/connect";
|
|
36
|
+
export type {
|
|
37
|
+
ConnectAccount,
|
|
38
|
+
ConnectAdvance,
|
|
39
|
+
ConnectAttempt,
|
|
40
|
+
ConnectNextAction,
|
|
41
|
+
ConnectOwnership,
|
|
42
|
+
ConnectProvider,
|
|
43
|
+
ConnectResource,
|
|
44
|
+
ConnectTransport,
|
|
45
|
+
} from "@opengeni/connect";
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
ConnectionCatalog,
|
|
49
|
+
ConnectionServiceRow,
|
|
50
|
+
ConnectionOptionRow,
|
|
51
|
+
type ConnectionCatalogProps,
|
|
52
|
+
type ConnectionCatalogService,
|
|
53
|
+
type ConnectionCatalogOption,
|
|
54
|
+
} from "./connection-catalog";
|
|
55
|
+
export { ConnectionInstalled, type ConnectionInstalledItem } from "./connection-installed";
|
|
56
|
+
export { ConnectionTypePicker, type ConnectionType } from "./connection-type-picker";
|
|
57
|
+
export { ConnectionLogo } from "./connection-logo";
|
|
58
|
+
export { capabilityLogoFallback } from "./capability-logo-fallback";
|
|
59
|
+
export { PluginDiscovery, type PluginDiscoveryProps } from "./plugin-discovery";
|
|
60
|
+
export { PluginDetails } from "./plugin-details";
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import {
|
|
3
|
+
CapabilityCatalogIndicator,
|
|
4
|
+
CapabilityCatalogRow,
|
|
5
|
+
type CapabilityCatalogStatus,
|
|
6
|
+
} from "./capability-catalog-row";
|
|
7
|
+
|
|
8
|
+
/** Status comes from the host/controller, never inferred from a display label. */
|
|
9
|
+
export type ConnectionCatalogOption = {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
status: string;
|
|
14
|
+
connected: boolean;
|
|
15
|
+
/** Explicit health/availability. Omit to retain visible legacy status text. */
|
|
16
|
+
state?: CapabilityCatalogStatus;
|
|
17
|
+
onOpen: () => void;
|
|
18
|
+
action?: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
export type ConnectionCatalogService = {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
logo?: ReactNode;
|
|
24
|
+
options: ConnectionCatalogOption[];
|
|
25
|
+
};
|
|
26
|
+
export type ConnectionCatalogProps = {
|
|
27
|
+
services: ConnectionCatalogService[];
|
|
28
|
+
query?: string;
|
|
29
|
+
columns?: 1 | 2;
|
|
30
|
+
resultLimit?: number;
|
|
31
|
+
onShowMore?: () => void;
|
|
32
|
+
/** Group capabilities by service, or show every capability independently. */
|
|
33
|
+
grouped?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
emptyMessage?: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export function ConnectionOptionRow({ option }: { option: ConnectionCatalogOption }) {
|
|
39
|
+
return (
|
|
40
|
+
<div className="og-connection-catalog-action-row og-connection-option">
|
|
41
|
+
<CapabilityCatalogRow
|
|
42
|
+
name={option.name}
|
|
43
|
+
description={option.description}
|
|
44
|
+
status={option.state ?? (option.connected ? "added" : "available")}
|
|
45
|
+
statusLabel={option.status}
|
|
46
|
+
showStatusLabel={option.state === undefined}
|
|
47
|
+
onOpen={option.onOpen}
|
|
48
|
+
/>
|
|
49
|
+
{option.action ? <span className="og-connection-option-action">{option.action}</span> : null}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function ConnectionServiceRow({ service }: { service: ConnectionCatalogService }) {
|
|
55
|
+
if (!service.options.length) return null;
|
|
56
|
+
const connected = service.options.filter((option) => option.connected).length;
|
|
57
|
+
const attention = service.options.find(
|
|
58
|
+
(option) => option.state === "attention" || option.state === "unavailable",
|
|
59
|
+
);
|
|
60
|
+
const groupState =
|
|
61
|
+
attention?.state ??
|
|
62
|
+
(service.options.some((option) => option.state === "loading")
|
|
63
|
+
? "loading"
|
|
64
|
+
: connected === service.options.length
|
|
65
|
+
? "added"
|
|
66
|
+
: "available");
|
|
67
|
+
const identity = (
|
|
68
|
+
<>
|
|
69
|
+
<span className="og-capability-catalog-icon">{service.logo}</span>
|
|
70
|
+
<span className="og-capability-catalog-copy">
|
|
71
|
+
<strong>{service.name}</strong>
|
|
72
|
+
<span>
|
|
73
|
+
{service.options.length === 1
|
|
74
|
+
? service.options[0]?.description
|
|
75
|
+
: service.options.map((option) => option.name).join(" · ")}
|
|
76
|
+
</span>
|
|
77
|
+
</span>
|
|
78
|
+
<CapabilityCatalogIndicator
|
|
79
|
+
status={groupState}
|
|
80
|
+
label={attention?.status ?? `${connected} of ${service.options.length} added`}
|
|
81
|
+
/>
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
return service.options.length === 1 ? (
|
|
85
|
+
<div className="og-connection-catalog-action-row">
|
|
86
|
+
<CapabilityCatalogRow
|
|
87
|
+
name={service.name}
|
|
88
|
+
description={service.options[0]!.description}
|
|
89
|
+
icon={service.logo}
|
|
90
|
+
status={service.options[0]!.state ?? (connected ? "added" : "available")}
|
|
91
|
+
statusLabel={service.options[0]!.status}
|
|
92
|
+
showStatusLabel={service.options[0]!.state === undefined}
|
|
93
|
+
onOpen={service.options[0]!.onOpen}
|
|
94
|
+
/>
|
|
95
|
+
{service.options[0]?.action}
|
|
96
|
+
</div>
|
|
97
|
+
) : (
|
|
98
|
+
<details className="og-connection-catalog-service">
|
|
99
|
+
<summary className="og-capability-catalog-row">
|
|
100
|
+
{identity}
|
|
101
|
+
<span aria-hidden className="og-connection-group-chevron">
|
|
102
|
+
⌄
|
|
103
|
+
</span>
|
|
104
|
+
</summary>
|
|
105
|
+
<div className="og-connection-catalog-options">
|
|
106
|
+
{service.options.map((option) => (
|
|
107
|
+
<ConnectionOptionRow key={option.id} option={option} />
|
|
108
|
+
))}
|
|
109
|
+
</div>
|
|
110
|
+
</details>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function ConnectionCatalog({
|
|
115
|
+
services,
|
|
116
|
+
query = "",
|
|
117
|
+
columns = 1,
|
|
118
|
+
grouped = true,
|
|
119
|
+
resultLimit,
|
|
120
|
+
onShowMore,
|
|
121
|
+
className = "",
|
|
122
|
+
emptyMessage = "No connections match your search.",
|
|
123
|
+
}: ConnectionCatalogProps) {
|
|
124
|
+
const search = query.trim().toLowerCase();
|
|
125
|
+
const entries = grouped
|
|
126
|
+
? services
|
|
127
|
+
: services.flatMap((service) =>
|
|
128
|
+
service.options.map((option) => ({
|
|
129
|
+
...service,
|
|
130
|
+
id: `${service.id}/${option.id}`,
|
|
131
|
+
name:
|
|
132
|
+
service.options.length > 1 && option.name !== service.name
|
|
133
|
+
? `${service.name} · ${option.name}`
|
|
134
|
+
: service.name,
|
|
135
|
+
options: [option],
|
|
136
|
+
})),
|
|
137
|
+
);
|
|
138
|
+
const visible = entries.filter((service) =>
|
|
139
|
+
[service.name, ...service.options.flatMap((option) => [option.name, option.description ?? ""])]
|
|
140
|
+
.join(" ")
|
|
141
|
+
.toLowerCase()
|
|
142
|
+
.includes(search),
|
|
143
|
+
);
|
|
144
|
+
return (
|
|
145
|
+
<>
|
|
146
|
+
<div className={`og-connection-catalog ${className}`} data-columns={columns}>
|
|
147
|
+
{visible.length ? (
|
|
148
|
+
visible
|
|
149
|
+
.slice(0, resultLimit)
|
|
150
|
+
.map((service) => <ConnectionServiceRow key={service.id} service={service} />)
|
|
151
|
+
) : (
|
|
152
|
+
<p role="status">{emptyMessage}</p>
|
|
153
|
+
)}
|
|
154
|
+
</div>
|
|
155
|
+
{resultLimit && visible.length > resultLimit ? (
|
|
156
|
+
<button className="og-catalog-more" type="button" onClick={onShowMore}>
|
|
157
|
+
View all connections
|
|
158
|
+
</button>
|
|
159
|
+
) : null}
|
|
160
|
+
</>
|
|
161
|
+
);
|
|
162
|
+
}
|