@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,62 @@
|
|
|
1
|
+
import type { DesktopRfbFactory } from "@opengeni/sdk";
|
|
2
|
+
|
|
3
|
+
/** Host-owned imports keep optional peers outside the root's bundler graph. */
|
|
4
|
+
export type WorkbenchPeerLoader<T = unknown> = () => Promise<T>;
|
|
5
|
+
export type CodeEditorLanguage = "javascript" | "json" | "python" | "markdown" | "css" | "html";
|
|
6
|
+
export type CodeEditorLanguages = Partial<Record<CodeEditorLanguage, WorkbenchPeerLoader>>;
|
|
7
|
+
export type CodeEditorPeers = { module: unknown; languages?: CodeEditorLanguages | undefined };
|
|
8
|
+
export type SandboxTerminalPeers = {
|
|
9
|
+
Terminal: unknown;
|
|
10
|
+
FitAddon: unknown;
|
|
11
|
+
WebLinksAddon: unknown;
|
|
12
|
+
loadWebgl?: WorkbenchPeerLoader | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function optionalPeer<T>(setup: string) {
|
|
16
|
+
let loader: WorkbenchPeerLoader<T> | null = null;
|
|
17
|
+
let loaded: Promise<T> | null = null;
|
|
18
|
+
let version = 0;
|
|
19
|
+
const listeners = new Set<() => void>();
|
|
20
|
+
return {
|
|
21
|
+
register(next: WorkbenchPeerLoader<T> | null): void {
|
|
22
|
+
if (next === loader) return;
|
|
23
|
+
loader = next;
|
|
24
|
+
loaded = null;
|
|
25
|
+
version += 1;
|
|
26
|
+
for (const listener of listeners) listener();
|
|
27
|
+
},
|
|
28
|
+
revision: () => version,
|
|
29
|
+
subscribe(listener: () => void): () => void {
|
|
30
|
+
listeners.add(listener);
|
|
31
|
+
return () => listeners.delete(listener);
|
|
32
|
+
},
|
|
33
|
+
load(): Promise<T> {
|
|
34
|
+
if (!loader) return Promise.reject(new Error(`Call ${setup} to enable this surface`));
|
|
35
|
+
if (!loaded) {
|
|
36
|
+
// A synchronous host-loader failure is also a rejected, retryable load.
|
|
37
|
+
const pending = Promise.resolve()
|
|
38
|
+
.then(loader)
|
|
39
|
+
.catch((error: unknown) => {
|
|
40
|
+
if (loaded === pending) loaded = null;
|
|
41
|
+
throw error;
|
|
42
|
+
});
|
|
43
|
+
loaded = pending;
|
|
44
|
+
}
|
|
45
|
+
return loaded;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const sandboxTerminalPeers = optionalPeer<SandboxTerminalPeers>(
|
|
51
|
+
"enableSandboxTerminal() from @opengeni/react/terminal",
|
|
52
|
+
);
|
|
53
|
+
export const codeEditorPeers = optionalPeer<CodeEditorPeers>(
|
|
54
|
+
"enableCodeEditor() from @opengeni/react/editor",
|
|
55
|
+
);
|
|
56
|
+
export const desktopViewerPeers = optionalPeer<DesktopRfbFactory>(
|
|
57
|
+
"enableDesktopViewer() from @opengeni/react/desktop",
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
export const registerSandboxTerminal = sandboxTerminalPeers.register;
|
|
61
|
+
export const registerCodeEditor = codeEditorPeers.register;
|
|
62
|
+
export const registerDesktopViewer = desktopViewerPeers.register;
|
package/src/lib/xterm-theme.ts
CHANGED
|
@@ -24,11 +24,13 @@ export type TokenReader = (name: string) => string | undefined;
|
|
|
24
24
|
* The 16 ANSI colors + selection/cursor treatment, designed against the og
|
|
25
25
|
* OKLCH palette. Hues are borrowed from the og status ramp so terminal color
|
|
26
26
|
* reads as part of the same system: red≈status-failed(22), green≈status-idle
|
|
27
|
-
* (155), yellow≈status-running(80),
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
27
|
+
* (155), yellow≈status-running(80), magenta(305), cyan≈200. The ANSI blue and
|
|
28
|
+
* magenta slots stay chromatic because program output means them; the app
|
|
29
|
+
* chrome around the terminal is neutral. Dark uses lifted lightness on the
|
|
30
|
+
* dark neutral ground; light uses deeper, more saturated inks on the
|
|
31
|
+
* near-white ground. Bright variants add lightness + a touch of chroma.
|
|
32
|
+
* `black`/`white` and the selection are neutral grey ramp stops (never pure
|
|
33
|
+
* #000/#fff — that clashes with the calm neutral ground).
|
|
32
34
|
*/
|
|
33
35
|
export type AnsiPalette = {
|
|
34
36
|
black: string;
|
|
@@ -54,47 +56,47 @@ export type AnsiPalette = {
|
|
|
54
56
|
};
|
|
55
57
|
|
|
56
58
|
const DARK_ANSI: AnsiPalette = {
|
|
57
|
-
black: "oklch(0.3 0
|
|
59
|
+
black: "oklch(0.3 0 0)",
|
|
58
60
|
red: "oklch(0.68 0.17 22)",
|
|
59
61
|
green: "oklch(0.75 0.13 155)",
|
|
60
62
|
yellow: "oklch(0.8 0.11 80)",
|
|
61
63
|
blue: "oklch(0.7 0.14 255)",
|
|
62
64
|
magenta: "oklch(0.72 0.13 305)",
|
|
63
65
|
cyan: "oklch(0.75 0.1 210)",
|
|
64
|
-
white: "oklch(0.8 0
|
|
65
|
-
brightBlack: "oklch(0.45 0
|
|
66
|
+
white: "oklch(0.8 0 0)",
|
|
67
|
+
brightBlack: "oklch(0.45 0 0)",
|
|
66
68
|
brightRed: "oklch(0.76 0.17 22)",
|
|
67
69
|
brightGreen: "oklch(0.82 0.14 155)",
|
|
68
70
|
brightYellow: "oklch(0.86 0.12 85)",
|
|
69
71
|
brightBlue: "oklch(0.78 0.13 255)",
|
|
70
72
|
brightMagenta: "oklch(0.8 0.13 305)",
|
|
71
73
|
brightCyan: "oklch(0.83 0.1 200)",
|
|
72
|
-
brightWhite: "oklch(0.97 0
|
|
73
|
-
selectionBackground: "oklch(0.
|
|
74
|
-
selectionForeground: "oklch(0.985 0
|
|
75
|
-
selectionInactiveBackground: "oklch(0.72 0
|
|
74
|
+
brightWhite: "oklch(0.97 0 0)",
|
|
75
|
+
selectionBackground: "oklch(0.8 0 0 / 0.3)",
|
|
76
|
+
selectionForeground: "oklch(0.985 0 0)",
|
|
77
|
+
selectionInactiveBackground: "oklch(0.72 0 0 / 0.2)",
|
|
76
78
|
};
|
|
77
79
|
|
|
78
80
|
const LIGHT_ANSI: AnsiPalette = {
|
|
79
|
-
black: "oklch(0.35 0
|
|
81
|
+
black: "oklch(0.35 0 0)",
|
|
80
82
|
red: "oklch(0.52 0.19 22)",
|
|
81
83
|
green: "oklch(0.5 0.13 155)",
|
|
82
84
|
yellow: "oklch(0.56 0.13 80)",
|
|
83
85
|
blue: "oklch(0.52 0.18 255)",
|
|
84
86
|
magenta: "oklch(0.52 0.16 305)",
|
|
85
87
|
cyan: "oklch(0.52 0.1 210)",
|
|
86
|
-
white: "oklch(0.7 0
|
|
87
|
-
brightBlack: "oklch(0.5 0
|
|
88
|
+
white: "oklch(0.7 0 0)",
|
|
89
|
+
brightBlack: "oklch(0.5 0 0)",
|
|
88
90
|
brightRed: "oklch(0.55 0.2 22)",
|
|
89
91
|
brightGreen: "oklch(0.54 0.14 155)",
|
|
90
92
|
brightYellow: "oklch(0.6 0.14 80)",
|
|
91
93
|
brightBlue: "oklch(0.48 0.19 255)",
|
|
92
94
|
brightMagenta: "oklch(0.54 0.17 305)",
|
|
93
95
|
brightCyan: "oklch(0.54 0.11 210)",
|
|
94
|
-
brightWhite: "oklch(0.3 0
|
|
95
|
-
selectionBackground: "oklch(0.
|
|
96
|
-
selectionForeground: "oklch(0.21 0
|
|
97
|
-
selectionInactiveBackground: "oklch(0.6 0
|
|
96
|
+
brightWhite: "oklch(0.3 0 0)",
|
|
97
|
+
selectionBackground: "oklch(0.45 0 0 / 0.2)",
|
|
98
|
+
selectionForeground: "oklch(0.21 0 0)",
|
|
99
|
+
selectionInactiveBackground: "oklch(0.6 0 0 / 0.14)",
|
|
98
100
|
};
|
|
99
101
|
|
|
100
102
|
/** The designed ANSI-16 palette for a theme mode. Pure. */
|
|
@@ -110,8 +112,8 @@ export function ogAnsiPalette(mode: ThemeMode): AnsiPalette {
|
|
|
110
112
|
*/
|
|
111
113
|
export function buildXtermTheme(read: TokenReader, mode: ThemeMode): XtermTheme {
|
|
112
114
|
const ansi = ogAnsiPalette(mode);
|
|
113
|
-
const bgFallback = mode === "light" ? "
|
|
114
|
-
const fgFallback = mode === "light" ? "
|
|
115
|
+
const bgFallback = mode === "light" ? "#ffffff" : "#202020";
|
|
116
|
+
const fgFallback = mode === "light" ? "#242424" : "#e6e6e6";
|
|
115
117
|
const bg = read("--og-color-bg") ?? bgFallback;
|
|
116
118
|
const fg = read("--og-color-fg") ?? fgFallback;
|
|
117
119
|
const accent = read("--og-color-accent") ?? ansi.brightBlue;
|
package/src/machines.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
export type {
|
|
10
10
|
ConnectionStatus,
|
|
11
11
|
MachineKind,
|
|
12
|
+
MachineOperationPolicy,
|
|
12
13
|
MachineMetricsSeriesResponse,
|
|
13
14
|
MachineState,
|
|
14
15
|
MachineView,
|
|
@@ -48,6 +49,8 @@ export type {
|
|
|
48
49
|
} from "./components/machines/metric-history-chart";
|
|
49
50
|
export { MachineDetail } from "./components/machines/machine-detail";
|
|
50
51
|
export type { MachineDetailProps } from "./components/machines/machine-detail";
|
|
52
|
+
export { MachineOperationPolicyEditor } from "./components/machines/machine-operation-policy";
|
|
53
|
+
export type { MachineOperationPolicyEditorProps } from "./components/machines/machine-operation-policy";
|
|
51
54
|
export { METRICS, METRIC_WINDOWS, WINDOW_LABEL, pointsFor } from "./components/machines/series";
|
|
52
55
|
export type { MetricDef, MetricKey, MetricWindow } from "./components/machines/series";
|
|
53
56
|
export { MachinesDashboard } from "./components/machines-dashboard";
|
|
@@ -68,7 +71,12 @@ export type {
|
|
|
68
71
|
EnrollmentConsentPhase,
|
|
69
72
|
EnrollmentConsentProps,
|
|
70
73
|
} from "./components/enrollment-consent";
|
|
71
|
-
export {
|
|
74
|
+
export {
|
|
75
|
+
useMachines,
|
|
76
|
+
MACHINES_COMPOSER_POLL_MS,
|
|
77
|
+
MACHINES_DASHBOARD_POLL_MS,
|
|
78
|
+
MACHINES_SESSION_POLL_MS,
|
|
79
|
+
} from "./hooks/use-machines";
|
|
72
80
|
export type {
|
|
73
81
|
MachinesClientLike,
|
|
74
82
|
UseMachinesOptions,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CapabilityCatalogItem, ConnectionMetadata } from "@opengeni/sdk";
|
|
2
|
+
|
|
3
|
+
/** Status only; runtime use is authorized for the authenticated initiating user. */
|
|
4
|
+
export function matchingActiveMcpConnections(
|
|
5
|
+
item: CapabilityCatalogItem,
|
|
6
|
+
connections: ConnectionMetadata[],
|
|
7
|
+
) {
|
|
8
|
+
return matchingMcpConnections(item, connections).filter((entry) => entry.status === "active");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function matchingMcpConnections(item: CapabilityCatalogItem, connections: ConnectionMetadata[]) {
|
|
12
|
+
const ref = item.connectionRef;
|
|
13
|
+
if (!item.enabled || !ref) return [];
|
|
14
|
+
return connections.filter(
|
|
15
|
+
(entry) =>
|
|
16
|
+
entry.status !== "revoked" &&
|
|
17
|
+
entry.kind === "oauth2" &&
|
|
18
|
+
entry.metadata.mcpUrl === (item.mcpUrl ?? item.endpointUrl) &&
|
|
19
|
+
(ref.subjectScope !== "subject"
|
|
20
|
+
? entry.id === ref.connectionId && entry.subjectId === null
|
|
21
|
+
: entry.subjectId !== null),
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Installation availability is not account readiness. Revoked history is not actionable. */
|
|
26
|
+
export function mcpConnectionDiscoveryState(
|
|
27
|
+
item: CapabilityCatalogItem,
|
|
28
|
+
connections: ConnectionMetadata[],
|
|
29
|
+
) {
|
|
30
|
+
const matching = matchingMcpConnections(item, connections);
|
|
31
|
+
const active = matching.filter((entry) => entry.status === "active");
|
|
32
|
+
if (active.length === 1) return { status: "added", label: "Connected" } as const;
|
|
33
|
+
if (matching.length > 0) return { status: "attention", label: "Review connection" } as const;
|
|
34
|
+
return { status: "available", label: "Connect" } as const;
|
|
35
|
+
}
|
package/src/model-policy.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compareModelPickerOrder,
|
|
3
|
+
modelPickerBillingClassFor,
|
|
4
|
+
type ModelPickerBillingClass,
|
|
5
|
+
} from "@opengeni/sdk/model-picker-order";
|
|
6
|
+
import { modelDisplayName } from "@opengeni/sdk/model-display";
|
|
1
7
|
import type { ClientModel, ReasoningEffort, WorkspaceModelCatalogModel } from "@opengeni/sdk";
|
|
2
8
|
|
|
3
|
-
export type PickerBillingClass =
|
|
4
|
-
| "opengeni_credits"
|
|
5
|
-
| "codex_subscription"
|
|
6
|
-
| "supergrok_subscription"
|
|
7
|
-
| "byok";
|
|
9
|
+
export type PickerBillingClass = ModelPickerBillingClass;
|
|
8
10
|
|
|
9
11
|
export type PickerModelRow<TCatalog extends ClientModel = WorkspaceModelCatalogModel> = {
|
|
10
12
|
id: string;
|
|
@@ -22,18 +24,23 @@ export type PickerModelRow<TCatalog extends ClientModel = WorkspaceModelCatalogM
|
|
|
22
24
|
|
|
23
25
|
export type LatencyModeId = "standard" | "priority" | "fast";
|
|
24
26
|
|
|
25
|
-
const BILLING_CLASS_ORDER: PickerBillingClass[] = [
|
|
26
|
-
"opengeni_credits",
|
|
27
|
-
"codex_subscription",
|
|
28
|
-
"supergrok_subscription",
|
|
29
|
-
"byok",
|
|
30
|
-
];
|
|
31
|
-
|
|
32
27
|
const BILLING_CLASS_LABELS: Record<PickerBillingClass, string> = {
|
|
33
|
-
opengeni_credits: "
|
|
28
|
+
opengeni_credits: "Models",
|
|
29
|
+
external: "External",
|
|
34
30
|
codex_subscription: "Codex",
|
|
35
31
|
supergrok_subscription: "SuperGrok",
|
|
36
|
-
|
|
32
|
+
claude_subscription: "Claude subscription",
|
|
33
|
+
// Who connected the key (organization or workspace) is a settings fact, not
|
|
34
|
+
// a model choice: both scopes share one label and one picker group.
|
|
35
|
+
byok: "API keys",
|
|
36
|
+
organization_byok: "API keys",
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** Models settings keeps naming who connected the key. */
|
|
40
|
+
const SCOPED_BILLING_CLASS_LABELS: Record<PickerBillingClass, string> = {
|
|
41
|
+
...BILLING_CLASS_LABELS,
|
|
42
|
+
byok: "Workspace providers",
|
|
43
|
+
organization_byok: "Organization providers",
|
|
37
44
|
};
|
|
38
45
|
|
|
39
46
|
const AVAILABILITY_REASON_LABELS: Record<string, string> = {
|
|
@@ -47,36 +54,29 @@ const AVAILABILITY_REASON_LABELS: Record<string, string> = {
|
|
|
47
54
|
};
|
|
48
55
|
|
|
49
56
|
export function billingClassForModel(model: ClientModel): PickerBillingClass {
|
|
50
|
-
if (model.
|
|
51
|
-
return "
|
|
52
|
-
}
|
|
53
|
-
if (model.source === "codex") {
|
|
54
|
-
return "codex_subscription";
|
|
55
|
-
}
|
|
56
|
-
if (model.source === "workspace_gateway") {
|
|
57
|
-
return "byok";
|
|
57
|
+
if (model.provider === "organization-gateway" || model.provider === "organization-openrouter") {
|
|
58
|
+
return "organization_byok";
|
|
58
59
|
}
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
if (model.credentialSource?.kind === "workspace_connection") {
|
|
60
|
+
if (
|
|
61
|
+
model.provider?.startsWith("workspace-openai-") ||
|
|
62
|
+
model.provider?.startsWith("workspace-azure-openai-")
|
|
63
|
+
)
|
|
65
64
|
return "byok";
|
|
66
|
-
|
|
67
|
-
if (model.billing?.upstreamPayer === "connected_subscription") {
|
|
68
|
-
return "codex_subscription";
|
|
69
|
-
}
|
|
70
|
-
if (model.billing?.upstreamPayer === "workspace") {
|
|
65
|
+
if (model.provider === "workspace-gateway" || model.provider === "workspace-openrouter") {
|
|
71
66
|
return "byok";
|
|
72
67
|
}
|
|
73
|
-
return
|
|
68
|
+
return modelPickerBillingClassFor(model);
|
|
74
69
|
}
|
|
75
70
|
|
|
76
71
|
export function billingClassLabel(billingClass: PickerBillingClass): string {
|
|
77
72
|
return BILLING_CLASS_LABELS[billingClass];
|
|
78
73
|
}
|
|
79
74
|
|
|
75
|
+
/** The group label that names the connection scope, for Models settings only. */
|
|
76
|
+
export function scopedBillingClassLabel(billingClass: PickerBillingClass): string {
|
|
77
|
+
return SCOPED_BILLING_CLASS_LABELS[billingClass];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
80
|
export function availabilityReasonLabel(
|
|
81
81
|
reason: WorkspaceModelCatalogModel["availability"]["reason"],
|
|
82
82
|
): string | null {
|
|
@@ -137,37 +137,84 @@ export function labelReasoningEffort(effort: ReasoningEffort): string {
|
|
|
137
137
|
return effort.slice(0, 1).toUpperCase() + effort.slice(1);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
/** Payment prompts must use cost policy, never the presentation group. */
|
|
141
|
+
export function modelUsesCredits(model: ClientModel | undefined): boolean {
|
|
142
|
+
if (model?.cost !== undefined) return model.cost === "credits";
|
|
143
|
+
return model?.billing?.metering === "opengeni_credits";
|
|
144
|
+
}
|
|
145
|
+
|
|
140
146
|
export function payerSummaryForModel(model: ClientModel): string {
|
|
147
|
+
if (model.cost === "free") {
|
|
148
|
+
return "Free in this deployment";
|
|
149
|
+
}
|
|
150
|
+
if (model.cost === "credits") {
|
|
151
|
+
return "Opengeni credits";
|
|
152
|
+
}
|
|
153
|
+
if (model.cost === "subscription") {
|
|
154
|
+
return model.credentialSource?.kind === "connected_subscription" &&
|
|
155
|
+
model.credentialSource.provider === "claude"
|
|
156
|
+
? "Claude subscription · external billing"
|
|
157
|
+
: model.source === "supergrok"
|
|
158
|
+
? "SuperGrok subscription · external billing"
|
|
159
|
+
: "Codex subscription · external billing";
|
|
160
|
+
}
|
|
161
|
+
if (model.cost === "workspace") {
|
|
162
|
+
return workspaceProviderPayerSummary(model);
|
|
163
|
+
}
|
|
164
|
+
if (model.cost === "organization") {
|
|
165
|
+
return organizationProviderPayerSummary(model);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Older client-config payloads do not carry `cost`; preserve their existing
|
|
169
|
+
// settlement-derived label until every deployment has rolled forward.
|
|
141
170
|
const billing = model.billing;
|
|
142
171
|
if (!billing) {
|
|
143
172
|
return "Route unknown";
|
|
144
173
|
}
|
|
145
174
|
if (billing.metering === "opengeni_credits") {
|
|
146
|
-
return "
|
|
175
|
+
return "Opengeni credits · automatic managed route";
|
|
147
176
|
}
|
|
148
177
|
if (billing.upstreamPayer === "connected_subscription") {
|
|
149
|
-
return model.
|
|
150
|
-
|
|
151
|
-
|
|
178
|
+
return model.credentialSource?.kind === "connected_subscription" &&
|
|
179
|
+
model.credentialSource.provider === "claude"
|
|
180
|
+
? "Claude subscription · external billing"
|
|
181
|
+
: model.source === "supergrok"
|
|
182
|
+
? "SuperGrok subscription · external billing"
|
|
183
|
+
: "Codex subscription · external billing";
|
|
152
184
|
}
|
|
153
185
|
if (billing.upstreamPayer === "workspace") {
|
|
154
|
-
return
|
|
186
|
+
return workspaceProviderPayerSummary(model);
|
|
187
|
+
}
|
|
188
|
+
if (billing.upstreamPayer === "organization") {
|
|
189
|
+
return organizationProviderPayerSummary(model);
|
|
155
190
|
}
|
|
156
|
-
return
|
|
191
|
+
return billing.upstreamPayer === "deployment"
|
|
192
|
+
? "Opengeni · no model credits"
|
|
193
|
+
: "External provider · no Opengeni credits";
|
|
157
194
|
}
|
|
158
195
|
|
|
159
196
|
export function advancedSourceSummary(model: ClientModel): string | null {
|
|
160
197
|
const source = model.credentialSource;
|
|
161
198
|
if (!source) {
|
|
162
|
-
return
|
|
199
|
+
return model.billing?.metering === "external" && model.billing.upstreamPayer === "deployment"
|
|
200
|
+
? "Deployment-provided connection"
|
|
201
|
+
: null;
|
|
163
202
|
}
|
|
164
203
|
if (source.kind === "connected_subscription") {
|
|
165
|
-
return source.provider === "
|
|
166
|
-
? "Connected
|
|
167
|
-
:
|
|
204
|
+
return source.provider === "claude"
|
|
205
|
+
? "Connected Claude subscription"
|
|
206
|
+
: source.provider === "xai"
|
|
207
|
+
? "Connected SuperGrok subscription"
|
|
208
|
+
: "Connected Codex subscription";
|
|
168
209
|
}
|
|
169
210
|
if (source.kind === "workspace_connection") {
|
|
170
|
-
|
|
211
|
+
if (model.provider === "workspace-openrouter") {
|
|
212
|
+
return "Workspace OpenRouter connection";
|
|
213
|
+
}
|
|
214
|
+
if (model.provider === "workspace-gateway" || model.source === "workspace_gateway") {
|
|
215
|
+
return "Workspace Vercel AI Gateway";
|
|
216
|
+
}
|
|
217
|
+
return "Workspace provider connection";
|
|
171
218
|
}
|
|
172
219
|
if (source.kind === "deployment") {
|
|
173
220
|
return source.mechanism === "azure_ad_bearer"
|
|
@@ -177,18 +224,53 @@ export function advancedSourceSummary(model: ClientModel): string | null {
|
|
|
177
224
|
return null;
|
|
178
225
|
}
|
|
179
226
|
|
|
227
|
+
function workspaceProviderPayerSummary(model: ClientModel): string {
|
|
228
|
+
if (model.provider === "workspace-anthropic")
|
|
229
|
+
return "Billed to the workspace Anthropic API account";
|
|
230
|
+
if (model.provider === "workspace-claude-subscription")
|
|
231
|
+
return "Uses the workspace Claude subscription · no OpenGeni credits";
|
|
232
|
+
if (model.provider === "workspace-openrouter") {
|
|
233
|
+
return "Billed to the workspace OpenRouter account";
|
|
234
|
+
}
|
|
235
|
+
if (model.provider === "workspace-gateway" || model.source === "workspace_gateway") {
|
|
236
|
+
return "Billed to the workspace Vercel account";
|
|
237
|
+
}
|
|
238
|
+
return "Billed to the workspace provider account";
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function organizationProviderPayerSummary(model: ClientModel): string {
|
|
242
|
+
if (model.provider === "organization-anthropic")
|
|
243
|
+
return "Billed to the organization Anthropic API account";
|
|
244
|
+
if (model.provider === "organization-claude-subscription")
|
|
245
|
+
return "Uses the connected Claude subscription · no OpenGeni credits";
|
|
246
|
+
if (model.provider === "organization-openrouter") {
|
|
247
|
+
return "Billed to the organization OpenRouter account";
|
|
248
|
+
}
|
|
249
|
+
if (model.provider === "organization-gateway") {
|
|
250
|
+
return "Billed to the organization Vercel account";
|
|
251
|
+
}
|
|
252
|
+
return "Billed to the organization provider account";
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The curated compact label, else the family-free name for Claude models
|
|
257
|
+
* ("Opus 5.5"): the maker's mark beside it already says Claude.
|
|
258
|
+
*/
|
|
259
|
+
function compactLabel(catalog: ClientModel): { shortLabel?: string } {
|
|
260
|
+
if (catalog.shortLabel) return { shortLabel: catalog.shortLabel };
|
|
261
|
+
const name = modelDisplayName(catalog);
|
|
262
|
+
return name.startsWith("Claude ") ? { shortLabel: name.slice("Claude ".length) } : {};
|
|
263
|
+
}
|
|
264
|
+
|
|
180
265
|
export function projectPickerRows(models: WorkspaceModelCatalogModel[]): PickerModelRow[] {
|
|
181
266
|
return models
|
|
182
|
-
.filter((catalog) =>
|
|
183
|
-
const billingClass = billingClassForModel(catalog);
|
|
184
|
-
return billingClass === "opengeni_credits" || catalog.credentialReadiness.status === "ready";
|
|
185
|
-
})
|
|
267
|
+
.filter((catalog) => catalog.credentialReadiness.status === "ready")
|
|
186
268
|
.map((catalog) => {
|
|
187
269
|
const billingClass = billingClassForModel(catalog);
|
|
188
270
|
return {
|
|
189
271
|
id: catalog.id,
|
|
190
|
-
label: catalog
|
|
191
|
-
...(catalog
|
|
272
|
+
label: modelDisplayName(catalog),
|
|
273
|
+
...compactLabel(catalog),
|
|
192
274
|
billingClass,
|
|
193
275
|
billingClassLabel: billingClassLabel(billingClass),
|
|
194
276
|
selectable: catalog.availability.selectable,
|
|
@@ -208,8 +290,8 @@ export function projectClientModelRows(models: ClientModel[]): PickerModelRow<Cl
|
|
|
208
290
|
const billingClass = billingClassForModel(catalog);
|
|
209
291
|
return {
|
|
210
292
|
id: catalog.id,
|
|
211
|
-
label: catalog
|
|
212
|
-
...(catalog
|
|
293
|
+
label: modelDisplayName(catalog),
|
|
294
|
+
...compactLabel(catalog),
|
|
213
295
|
billingClass,
|
|
214
296
|
billingClassLabel: billingClassLabel(billingClass),
|
|
215
297
|
selectable: true,
|
|
@@ -224,18 +306,7 @@ export function projectClientModelRows(models: ClientModel[]): PickerModelRow<Cl
|
|
|
224
306
|
export function sortPickerRows<TCatalog extends ClientModel>(
|
|
225
307
|
rows: PickerModelRow<TCatalog>[],
|
|
226
308
|
): PickerModelRow<TCatalog>[] {
|
|
227
|
-
return [...rows].sort(
|
|
228
|
-
const classDelta =
|
|
229
|
-
BILLING_CLASS_ORDER.indexOf(left.billingClass) -
|
|
230
|
-
BILLING_CLASS_ORDER.indexOf(right.billingClass);
|
|
231
|
-
if (classDelta !== 0) {
|
|
232
|
-
return classDelta;
|
|
233
|
-
}
|
|
234
|
-
if (left.selectable !== right.selectable) {
|
|
235
|
-
return left.selectable ? -1 : 1;
|
|
236
|
-
}
|
|
237
|
-
return left.label.localeCompare(right.label);
|
|
238
|
-
});
|
|
309
|
+
return [...rows].sort(compareModelPickerOrder);
|
|
239
310
|
}
|
|
240
311
|
|
|
241
312
|
export function findPickerRow<TCatalog extends ClientModel>(
|
|
@@ -245,11 +316,62 @@ export function findPickerRow<TCatalog extends ClientModel>(
|
|
|
245
316
|
return rows.find((row) => row.id === modelId) ?? null;
|
|
246
317
|
}
|
|
247
318
|
|
|
319
|
+
export type GroupPickerRowsOptions = {
|
|
320
|
+
codexOnly?: boolean;
|
|
321
|
+
/**
|
|
322
|
+
* Default true: organization- and workspace-connected keys share one group
|
|
323
|
+
* and identical copies show once. Models settings passes false.
|
|
324
|
+
*/
|
|
325
|
+
collapseScopes?: boolean | undefined;
|
|
326
|
+
/** Kept visible when it has an identical twin (see below). */
|
|
327
|
+
selectedId?: string | undefined;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Organization- and workspace-connected API keys are one choice for the person
|
|
332
|
+
* picking a model, so they share one group.
|
|
333
|
+
*/
|
|
334
|
+
function displayGroupFor(billingClass: PickerBillingClass): PickerBillingClass {
|
|
335
|
+
return billingClass === "organization_byok" ? "byok" : billingClass;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The same model through the same provider kind, whichever scope connected it:
|
|
340
|
+
* `organization-anthropic/claude-opus-5-5` and `workspace-anthropic/claude-opus-5-5`
|
|
341
|
+
* share a key, while OpenRouter and the Anthropic API never do (different
|
|
342
|
+
* accounts and bills).
|
|
343
|
+
*/
|
|
344
|
+
function scopeFreeIdentity(row: PickerModelRow<ClientModel>): string | null {
|
|
345
|
+
const provider = row.provider.replace(/^(?:organization|workspace)-/, "");
|
|
346
|
+
if (provider === row.provider) return null;
|
|
347
|
+
const upstream =
|
|
348
|
+
row.catalog.deployment?.upstreamModelId ??
|
|
349
|
+
(row.id.startsWith(`${row.provider}/`) ? row.id.slice(row.provider.length + 1) : row.id);
|
|
350
|
+
return `${provider}\u0000${upstream}`;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Two rows that are the same model through the same provider kind, connected
|
|
355
|
+
* by the organization and by the workspace, are one choice: show one. Keep the
|
|
356
|
+
* current selection, else a selectable row, else the first in picker order.
|
|
357
|
+
*/
|
|
358
|
+
function prefersTwin<TCatalog extends ClientModel>(
|
|
359
|
+
candidate: PickerModelRow<TCatalog>,
|
|
360
|
+
current: PickerModelRow<TCatalog>,
|
|
361
|
+
selectedId: string | undefined,
|
|
362
|
+
): boolean {
|
|
363
|
+
if (selectedId !== undefined && current.id === selectedId) return false;
|
|
364
|
+
if (selectedId !== undefined && candidate.id === selectedId) return true;
|
|
365
|
+
return candidate.selectable && !current.selectable;
|
|
366
|
+
}
|
|
367
|
+
|
|
248
368
|
export function groupPickerRowsByBillingClass(
|
|
249
369
|
rows: PickerModelRow[],
|
|
370
|
+
options?: GroupPickerRowsOptions,
|
|
250
371
|
): Array<{ billingClass: PickerBillingClass; label: string; rows: PickerModelRow[] }>;
|
|
251
372
|
export function groupPickerRowsByBillingClass<TCatalog extends ClientModel>(
|
|
252
373
|
rows: PickerModelRow<TCatalog>[],
|
|
374
|
+
options?: GroupPickerRowsOptions,
|
|
253
375
|
): Array<{
|
|
254
376
|
billingClass: PickerBillingClass;
|
|
255
377
|
label: string;
|
|
@@ -257,6 +379,7 @@ export function groupPickerRowsByBillingClass<TCatalog extends ClientModel>(
|
|
|
257
379
|
}>;
|
|
258
380
|
export function groupPickerRowsByBillingClass<TCatalog extends ClientModel>(
|
|
259
381
|
rows: PickerModelRow<TCatalog>[],
|
|
382
|
+
options?: GroupPickerRowsOptions,
|
|
260
383
|
): Array<{
|
|
261
384
|
billingClass: PickerBillingClass;
|
|
262
385
|
label: string;
|
|
@@ -269,16 +392,47 @@ export function groupPickerRowsByBillingClass<TCatalog extends ClientModel>(
|
|
|
269
392
|
rows: PickerModelRow<TCatalog>[];
|
|
270
393
|
}> = [];
|
|
271
394
|
for (const row of sorted) {
|
|
272
|
-
const
|
|
395
|
+
const collapse = options?.collapseScopes !== false;
|
|
396
|
+
const billingClass = collapse ? displayGroupFor(row.billingClass) : row.billingClass;
|
|
397
|
+
const existing = groups.find((group) => group.billingClass === billingClass);
|
|
273
398
|
if (existing) {
|
|
274
|
-
|
|
399
|
+
const identity = collapse ? scopeFreeIdentity(row) : null;
|
|
400
|
+
const twin =
|
|
401
|
+
identity === null
|
|
402
|
+
? -1
|
|
403
|
+
: existing.rows.findIndex((candidate) => scopeFreeIdentity(candidate) === identity);
|
|
404
|
+
if (twin < 0) {
|
|
405
|
+
existing.rows.push(row);
|
|
406
|
+
} else if (prefersTwin(row, existing.rows[twin]!, options?.selectedId)) {
|
|
407
|
+
existing.rows[twin] = row;
|
|
408
|
+
}
|
|
275
409
|
continue;
|
|
276
410
|
}
|
|
277
411
|
groups.push({
|
|
278
|
-
billingClass
|
|
279
|
-
label:
|
|
412
|
+
billingClass,
|
|
413
|
+
label:
|
|
414
|
+
billingClass === row.billingClass ? row.billingClassLabel : billingClassLabel(billingClass),
|
|
280
415
|
rows: [row],
|
|
281
416
|
});
|
|
282
417
|
}
|
|
418
|
+
const codexIndex = groups.findIndex((group) => group.billingClass === "codex_subscription");
|
|
419
|
+
const codex = groups[codexIndex];
|
|
420
|
+
const selectableOpenGeni = groups
|
|
421
|
+
.find((group) => group.billingClass === "opengeni_credits")
|
|
422
|
+
?.rows.filter((row) => row.selectable);
|
|
423
|
+
// Presentation only: never change the catalog/default model ordering or selection.
|
|
424
|
+
const onlyFreeOpenGeni =
|
|
425
|
+
selectableOpenGeni !== undefined &&
|
|
426
|
+
selectableOpenGeni.length > 0 &&
|
|
427
|
+
selectableOpenGeni.every((row) => row.catalog.cost === "free");
|
|
428
|
+
if (
|
|
429
|
+
codex &&
|
|
430
|
+
codex.rows.some((row) => row.selectable) &&
|
|
431
|
+
(options?.codexOnly || onlyFreeOpenGeni)
|
|
432
|
+
) {
|
|
433
|
+
groups.splice(codexIndex, 1);
|
|
434
|
+
groups.unshift(codex);
|
|
435
|
+
}
|
|
283
436
|
return groups;
|
|
284
437
|
}
|
|
438
|
+
export { modelDisplayName, modelVendor } from "@opengeni/sdk/model-display";
|