gloomberb 0.11.3 → 0.13.1
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 +8 -4
- package/README.zh-CN.md +4 -2
- package/package.json +28 -2
- package/src/api-client/auth.ts +12 -1
- package/src/api-client/data.ts +103 -1
- package/src/api-client/index.test.ts +127 -0
- package/src/api-client/index.ts +139 -3
- package/src/api-client/normalizers.ts +39 -0
- package/src/api-client/paths.ts +85 -1
- package/src/api-client/research-activity.ts +61 -0
- package/src/api-client/types.ts +197 -0
- package/src/app/pane-runtime/index.tsx +15 -12
- package/src/app/pane-runtime/layout-placement.test.ts +27 -0
- package/src/app/pane-runtime/layout-placement.ts +13 -0
- package/src/app/pane-runtime/plugin-bindings.ts +62 -0
- package/src/app.tsx +60 -18
- package/src/architecture/browser-entry-graph.test.ts +96 -0
- package/src/brokers/profile-form.test.ts +25 -27
- package/src/brokers/test-broker.ts +68 -0
- package/src/cli/commands/plugins.ts +43 -14
- package/src/cli/desktop-pane-shot.ts +362 -24
- package/src/cli/index.ts +1 -1
- package/src/cli/pane-functions/capabilities.ts +126 -43
- package/src/cli/pane-functions/catalog.ts +16 -4
- package/src/cli/pane-functions/discovery.ts +1 -0
- package/src/cli/pane-functions/dom.test.ts +41 -0
- package/src/cli/pane-functions/dom.ts +199 -0
- package/src/cli/pane-functions/headless.test.ts +247 -0
- package/src/cli/pane-functions/headless.ts +423 -0
- package/src/cli/pane-functions/index.test.ts +20 -0
- package/src/cli/pane-functions/index.ts +10 -6
- package/src/cli/pane-functions/intraday-shot.test.ts +307 -0
- package/src/cli/pane-functions/intraday-shot.ts +334 -0
- package/src/cli/pane-functions/options.ts +27 -2
- package/src/cli/pane-functions/report.test.ts +29 -1
- package/src/cli/pane-functions/report.ts +69 -4
- package/src/cli/pane-functions/resolver.ts +26 -8
- package/src/cli/pane-functions/screenshot.test.ts +76 -0
- package/src/cli/pane-functions/screenshot.ts +428 -42
- package/src/cli/restore-plugins.ts +41 -0
- package/src/components/chart/{static/chart → composite}/axis-overlays.test.tsx +3 -3
- package/src/components/chart/{static/chart → composite}/axis-overlays.tsx +6 -11
- package/src/components/chart/{static/chart → composite}/bitmap.ts +17 -3
- package/src/components/chart/composite/composite-chart.test.tsx +136 -21
- package/src/components/chart/composite/composite-chart.tsx +378 -215
- package/src/components/chart/composite/format.ts +8 -2
- package/src/components/chart/composite/interactions.test.ts +68 -102
- package/src/components/chart/composite/interactions.ts +214 -264
- package/src/components/chart/composite/price-axis-labels.test.ts +21 -0
- package/src/components/chart/{price-axis-labels.tsx → composite/price-axis-labels.tsx} +9 -4
- package/src/components/chart/composite/rasterizer.ts +33 -0
- package/src/components/chart/composite/renderers.test.ts +51 -4
- package/src/components/chart/composite/scene.test.ts +128 -2
- package/src/components/chart/composite/scene.ts +149 -19
- package/src/components/chart/composite/text-renderer.ts +16 -2
- package/src/components/chart/composite/time-scale.ts +163 -62
- package/src/components/chart/composite/types.ts +51 -1
- package/src/components/chart/core/data.ts +9 -13
- package/src/components/chart/core/date-window.ts +7 -1
- package/src/components/chart/core/pointer.ts +3 -0
- package/src/components/chart/core/types.ts +0 -45
- package/src/components/chart/native/chart-rasterizer.ts +0 -1
- package/src/components/chart/native/kitty/index.test.ts +0 -188
- package/src/components/chart/native/raster/crosshair.ts +6 -5
- package/src/components/chart/native/raster/primitives.ts +0 -23
- package/src/components/chart/native/renderer-selection.ts +81 -31
- package/src/components/chart/static/{chart/surface.test.tsx → chart-surface.test.tsx} +28 -80
- package/src/components/chart/static/chart-surface.tsx +150 -0
- package/src/components/chart/static/index.ts +8 -0
- package/src/components/chart/static/multi-line-chart-surface.tsx +51 -166
- package/src/components/chart/static/scatter-chart-surface.test.ts +30 -0
- package/src/components/chart/static/scatter-chart-surface.tsx +135 -34
- package/src/components/chart/static/series.ts +49 -0
- package/src/components/command-bar/action-runtime.ts +1 -3
- package/src/components/command-bar/assist/model.test.ts +17 -2
- package/src/components/command-bar/assist/model.ts +40 -9
- package/src/components/command-bar/commands/direct/index.ts +1 -1
- package/src/components/command-bar/commands/direct/runtime.ts +1 -1
- package/src/components/command-bar/commands/registry.ts +0 -11
- package/src/components/command-bar/helpers.test.ts +2 -2
- package/src/components/command-bar/helpers.ts +2 -6
- package/src/components/command-bar/keyboard-shortcuts.ts +0 -11
- package/src/components/command-bar/list/badge.test.ts +54 -0
- package/src/components/command-bar/list/badge.ts +62 -0
- package/src/components/command-bar/list/model.test.ts +103 -0
- package/src/components/command-bar/list/model.ts +61 -4
- package/src/components/command-bar/list/view.test.tsx +113 -0
- package/src/components/command-bar/list/view.tsx +147 -131
- package/src/components/command-bar/pane-templates/workflow.ts +1 -1
- package/src/components/command-bar/panel/body.tsx +51 -65
- package/src/components/command-bar/panel/index.tsx +48 -13
- package/src/components/command-bar/panel/layout.test.ts +139 -0
- package/src/components/command-bar/panel/layout.ts +65 -28
- package/src/components/command-bar/panel/native-surface.ts +24 -0
- package/src/components/command-bar/panel/prompt-binding.ts +54 -0
- package/src/components/command-bar/panel/runtime.ts +6 -3
- package/src/components/command-bar/panel/state.ts +41 -7
- package/src/components/command-bar/panel/types.ts +7 -1
- package/src/components/command-bar/routes/root/provider-search.ts +34 -15
- package/src/components/command-bar/routes/root/results.test.ts +161 -0
- package/src/components/command-bar/routes/root/results.ts +30 -28
- package/src/components/command-bar/routes/root/runtime.ts +37 -20
- package/src/components/command-bar/routes/root/search-providers.test.tsx +224 -0
- package/src/components/command-bar/routes/root/search-providers.ts +205 -0
- package/src/components/command-bar/routes/root/selection.ts +1 -12
- package/src/components/command-bar/routes/root/shortcuts.test.ts +8 -8
- package/src/components/command-bar/routes/ticker-search/actions.ts +10 -9
- package/src/components/command-bar/routes/ticker-search/results.test.ts +54 -1
- package/src/components/command-bar/routes/ticker-search/results.ts +60 -19
- package/src/components/command-bar/routes/ticker-search/route.ts +1 -0
- package/src/components/command-bar/routing/actions.ts +1 -81
- package/src/components/command-bar/routing/launch-request.ts +1 -1
- package/src/components/command-bar/routing/list-state.ts +6 -21
- package/src/components/command-bar/selection-runtime.ts +1 -1
- package/src/components/command-bar/surface/assist.test.tsx +34 -19
- package/src/components/command-bar/surface/environment.ts +8 -1
- package/src/components/command-bar/surface/index.test.tsx +84 -68
- package/src/components/command-bar/surface/index.tsx +33 -36
- package/src/components/command-bar/surface/test-harness.tsx +38 -7
- package/src/components/command-bar/theme-picker.tsx +43 -15
- package/src/components/command-bar/view-model.test.ts +53 -8
- package/src/components/command-bar/view-model.ts +43 -14
- package/src/components/command-bar/workflow/tickers.ts +1 -0
- package/src/components/command-bar/workflow/types.ts +1 -1
- package/src/components/data-table/view.test.tsx +45 -6
- package/src/components/data-table/view.tsx +55 -9
- package/src/components/index.ts +10 -2
- package/src/components/input-search-bar.test.tsx +36 -2
- package/src/components/input-search-bar.tsx +18 -1
- package/src/components/layout/header.test.tsx +57 -10
- package/src/components/layout/header.tsx +292 -149
- package/src/components/layout/market-summary.test.ts +81 -0
- package/src/components/layout/market-summary.ts +109 -0
- package/src/components/layout/shell/chrome.ts +96 -1
- package/src/components/layout/shell/index.tsx +11 -3
- package/src/components/layout/shell/menu.ts +9 -0
- package/src/components/layout/shell/pane/actions.ts +29 -0
- package/src/components/layout/shell/pane/management-shortcuts.ts +5 -0
- package/src/components/layout/shell/shortcuts.ts +3 -0
- package/src/components/layout/status-bar.test.tsx +9 -8
- package/src/components/layout/status-bar.tsx +85 -54
- package/src/components/onboarding/account-step/chooser-panel.tsx +2 -2
- package/src/components/onboarding/account-step/qr-panel.tsx +2 -10
- package/src/components/onboarding/onboarding-frame.tsx +2 -26
- package/src/components/onboarding/onboarding-wizard.test.tsx +38 -12
- package/src/components/onboarding/onboarding-wizard.tsx +49 -14
- package/src/components/price-sparkline/index.ts +61 -34
- package/src/components/price-sparkline/view.tsx +1 -1
- package/src/components/sign-in-gate.test.tsx +128 -0
- package/src/components/sign-in-gate.tsx +149 -0
- package/src/components/speedometer-gauge/desktop.tsx +2 -12
- package/src/components/ticker/badge/list.tsx +17 -3
- package/src/components/ticker/list-table-view.tsx +6 -3
- package/src/components/ui/data-table/index.tsx +3 -2
- package/src/components/ui/data-table/opentui/index.tsx +165 -120
- package/src/components/ui/frame.tsx +28 -0
- package/src/components/ui/index.ts +3 -0
- package/src/components/ui/native-select.tsx +20 -10
- package/src/components/ui/select-button.tsx +138 -0
- package/src/components/ui/status.tsx +2 -2
- package/src/components/ui/table-layout.ts +1 -1
- package/src/components/use-double-click-activation.ts +7 -3
- package/src/core/app-services.ts +3 -3
- package/src/data/config/layout.ts +12 -6
- package/src/data/config/store/index.test.ts +120 -0
- package/src/data/config/store/migrations.ts +41 -0
- package/src/data/config/store/node.ts +7 -1
- package/src/data/config/store/normalize.ts +9 -3
- package/src/i18n/es.ts +6 -2
- package/src/i18n/ja.ts +6 -2
- package/src/i18n/ko.ts +6 -2
- package/src/i18n/zh-cn.ts +6 -2
- package/src/i18n/zh-tw.ts +6 -2
- package/src/layout-marketplace/pane-imagery.ts +1 -0
- package/src/layout-marketplace/payload.test.ts +17 -0
- package/src/layout-marketplace/payload.ts +40 -5
- package/src/market-data/coordinator/index.ts +3 -2
- package/src/market-data/coordinator/quotes.ts +173 -66
- package/src/market-data/coordinator/subscriptions.test.ts +215 -37
- package/src/pane-settings.ts +1 -1
- package/src/plugins/builtin/analytics/pane-model.ts +1 -1
- package/src/plugins/builtin/analytics/view.tsx +1 -1
- package/src/plugins/builtin/broker-manager/index.test.tsx +3 -2
- package/src/plugins/builtin/broker-manager/model.test.ts +2 -2
- package/src/plugins/builtin/cds/client.test.ts +20 -0
- package/src/plugins/builtin/cds/client.ts +13 -3
- package/src/plugins/builtin/cds/headless.test.ts +30 -0
- package/src/plugins/builtin/cds/headless.ts +113 -0
- package/src/plugins/builtin/cds/index.tsx +4 -0
- package/src/plugins/builtin/chart-composer/catalog-inventory.ts +16 -2
- package/src/plugins/builtin/chart-composer/cli-options.ts +4 -1
- package/src/plugins/builtin/chart-composer/index.tsx +1 -1
- package/src/plugins/builtin/chart-composer/pane.tsx +22 -8
- package/src/plugins/builtin/chat/content/composer.tsx +8 -4
- package/src/plugins/builtin/cloud/askg/protocol.test.ts +189 -0
- package/src/plugins/builtin/cloud/askg/protocol.ts +274 -0
- package/src/plugins/builtin/cloud/auth-dialog.tsx +19 -227
- package/src/plugins/builtin/cloud/auth-form.tsx +277 -0
- package/src/plugins/builtin/cloud/device-signin-dialog.tsx +21 -8
- package/src/plugins/builtin/cloud/plugin.tsx +1 -0
- package/src/plugins/builtin/cloud/verification-panel.tsx +56 -0
- package/src/plugins/builtin/composite-plugins.ts +14 -1
- package/src/plugins/builtin/correlation/relationship/model.ts +1 -1
- package/src/plugins/builtin/correlation/relationship/pane.tsx +2 -6
- package/src/plugins/builtin/correlation/relationship/view-model.ts +2 -2
- package/src/plugins/builtin/credit-conditions/client.ts +1 -1
- package/src/plugins/builtin/credit-conditions/headless.test.ts +31 -0
- package/src/plugins/builtin/credit-conditions/headless.ts +55 -0
- package/src/plugins/builtin/credit-conditions/index.test.tsx +12 -6
- package/src/plugins/builtin/credit-conditions/index.tsx +6 -21
- package/src/plugins/builtin/dividend-yield/index.tsx +1 -0
- package/src/plugins/builtin/dividend-yield/pane.tsx +1 -1
- package/src/plugins/builtin/earnings-calls/data.ts +223 -0
- package/src/plugins/builtin/earnings-calls/format.ts +49 -0
- package/src/plugins/builtin/earnings-calls/index.tsx +69 -0
- package/src/plugins/builtin/earnings-calls/pane.tsx +760 -0
- package/src/plugins/builtin/earnings-calls/prose.test.ts +36 -0
- package/src/plugins/builtin/earnings-calls/prose.ts +59 -0
- package/src/plugins/builtin/earnings-calls/transcript-view.tsx +337 -0
- package/src/plugins/builtin/econ/detail-view.tsx +1 -2
- package/src/plugins/builtin/econ/fred-series-map.ts +16 -1
- package/src/plugins/builtin/econ/index.tsx +2 -1
- package/src/plugins/builtin/econ-statistics/cache.ts +4 -0
- package/src/plugins/builtin/econ-statistics/client.ts +92 -0
- package/src/plugins/builtin/econ-statistics/defs.ts +66 -0
- package/src/plugins/builtin/econ-statistics/detail.tsx +154 -0
- package/src/plugins/builtin/econ-statistics/headless.test.ts +54 -0
- package/src/plugins/builtin/econ-statistics/headless.ts +171 -0
- package/src/plugins/builtin/econ-statistics/index.tsx +54 -0
- package/src/plugins/builtin/econ-statistics/pane.tsx +356 -0
- package/src/plugins/builtin/econ-statistics/stats.ts +522 -0
- package/src/plugins/builtin/econ-statistics/transform.test.ts +86 -0
- package/src/plugins/builtin/econ-statistics/transform.ts +85 -0
- package/src/plugins/builtin/econ-statistics/trend.ts +57 -0
- package/src/plugins/builtin/econ-statistics/view.ts +90 -0
- package/src/plugins/builtin/fear-greed/charts.tsx +7 -18
- package/src/plugins/builtin/fear-greed/data.ts +6 -1
- package/src/plugins/builtin/fear-greed/headless.test.ts +53 -0
- package/src/plugins/builtin/fear-greed/headless.ts +84 -0
- package/src/plugins/builtin/fear-greed/index.tsx +4 -0
- package/src/plugins/builtin/help/index.tsx +4 -0
- package/src/plugins/builtin/holders/index.tsx +1 -0
- package/src/plugins/builtin/insider/index.tsx +1 -0
- package/src/plugins/builtin/kelly-sizer/pane.tsx +1 -1
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -3
- package/src/plugins/builtin/market-movers/client.ts +76 -0
- package/src/plugins/builtin/market-movers/headless.test.ts +34 -0
- package/src/plugins/builtin/market-movers/headless.ts +73 -0
- package/src/plugins/builtin/market-movers/index.tsx +11 -51
- package/src/plugins/builtin/market-valuation/align.ts +122 -0
- package/src/plugins/builtin/market-valuation/cache.ts +32 -0
- package/src/plugins/builtin/market-valuation/chart-projection.ts +217 -0
- package/src/plugins/builtin/market-valuation/chart-series.ts +89 -0
- package/src/plugins/builtin/market-valuation/client.test.ts +141 -0
- package/src/plugins/builtin/market-valuation/client.ts +116 -0
- package/src/plugins/builtin/market-valuation/defs.ts +251 -0
- package/src/plugins/builtin/market-valuation/detail.tsx +159 -0
- package/src/plugins/builtin/market-valuation/headless.test.ts +58 -0
- package/src/plugins/builtin/market-valuation/headless.ts +170 -0
- package/src/plugins/builtin/market-valuation/index.tsx +64 -0
- package/src/plugins/builtin/market-valuation/indicators.ts +422 -0
- package/src/plugins/builtin/market-valuation/model.test.ts +350 -0
- package/src/plugins/builtin/market-valuation/model.ts +8 -0
- package/src/plugins/builtin/market-valuation/pane.test.tsx +247 -0
- package/src/plugins/builtin/market-valuation/pane.tsx +344 -0
- package/src/plugins/builtin/market-valuation/series.ts +12 -0
- package/src/plugins/builtin/market-valuation/settings.ts +38 -0
- package/src/plugins/builtin/market-valuation/sources.ts +130 -0
- package/src/plugins/builtin/market-valuation/trend.ts +89 -0
- package/src/plugins/builtin/market-valuation/view.ts +137 -0
- package/src/plugins/builtin/market-valuation/zone-scale/desktop.tsx +123 -0
- package/src/plugins/builtin/market-valuation/zone-scale/index.tsx +12 -0
- package/src/plugins/builtin/market-valuation/zone-scale/model.ts +60 -0
- package/src/plugins/builtin/market-valuation/zone-scale/terminal.tsx +94 -0
- package/src/plugins/builtin/news/wire/breaking/filters.test.ts +99 -0
- package/src/plugins/builtin/news/wire/breaking/filters.ts +110 -0
- package/src/plugins/builtin/news/wire/breaking/notifications.test.ts +157 -53
- package/src/plugins/builtin/news/wire/breaking/notifications.ts +91 -25
- package/src/plugins/builtin/news/wire/index.tsx +31 -44
- package/src/plugins/builtin/options/index.tsx +1 -0
- package/src/plugins/builtin/options/view.test.tsx +29 -1
- package/src/plugins/builtin/options/view.tsx +1 -22
- package/src/plugins/builtin/plugin-marketplace/feed.ts +80 -0
- package/src/plugins/builtin/plugin-marketplace/index.tsx +31 -0
- package/src/plugins/builtin/plugin-marketplace/model.test.ts +200 -0
- package/src/plugins/builtin/plugin-marketplace/model.ts +204 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +385 -0
- package/src/plugins/builtin/plugin-marketplace/store.ts +46 -0
- package/src/plugins/builtin/plugin-module.ts +9 -1
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +3 -237
- package/src/plugins/builtin/research/event-model.ts +245 -0
- package/src/plugins/builtin/research/events-headless.test.ts +32 -0
- package/src/plugins/builtin/research/events-headless.ts +87 -0
- package/src/plugins/builtin/research/index.tsx +8 -0
- package/src/plugins/builtin/research-search/command-bar-search.test.ts +81 -0
- package/src/plugins/builtin/research-search/command-bar-search.ts +175 -0
- package/src/plugins/builtin/research-search/data.ts +109 -0
- package/src/plugins/builtin/research-search/document-view.test.tsx +75 -0
- package/src/plugins/builtin/research-search/document-view.tsx +254 -0
- package/src/plugins/builtin/research-search/filter-bar.tsx +62 -0
- package/src/plugins/builtin/research-search/focus-handoff.ts +47 -0
- package/src/plugins/builtin/research-search/index.tsx +85 -0
- package/src/plugins/builtin/research-search/model.test.ts +40 -0
- package/src/plugins/builtin/research-search/model.ts +291 -0
- package/src/plugins/builtin/research-search/pane.test.tsx +241 -0
- package/src/plugins/builtin/research-search/pane.tsx +682 -0
- package/src/plugins/builtin/research-search/saved-view.tsx +171 -0
- package/src/plugins/builtin/research-search/snippet-text.tsx +35 -0
- package/src/plugins/builtin/research-search/snippet.test.ts +78 -0
- package/src/plugins/builtin/research-search/snippet.ts +134 -0
- package/src/plugins/builtin/scanner/flow-model.test.ts +11 -1
- package/src/plugins/builtin/scanner/flow-model.ts +29 -1
- package/src/plugins/builtin/scanner/flow-pane.tsx +78 -22
- package/src/plugins/builtin/scanner/headless.test.ts +59 -0
- package/src/plugins/builtin/scanner/headless.ts +125 -0
- package/src/plugins/builtin/scanner/index.ts +4 -0
- package/src/plugins/builtin/sec/index.tsx +1 -0
- package/src/plugins/builtin/sectors/client.ts +54 -0
- package/src/plugins/builtin/sectors/headless.test.ts +28 -0
- package/src/plugins/builtin/sectors/headless.ts +80 -0
- package/src/plugins/builtin/sectors/index.tsx +6 -51
- package/src/plugins/builtin/shared/cloud-upgrade.ts +8 -4
- package/src/plugins/builtin/shared/series-cache.ts +93 -0
- package/src/plugins/builtin/short-interest/index.tsx +1 -0
- package/src/plugins/builtin/short-interest/pane.tsx +1 -1
- package/src/plugins/builtin/thirteenf/index.tsx +1 -0
- package/src/plugins/builtin/ticker-detail/index.tsx +0 -14
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/pane.tsx +14 -0
- package/src/plugins/builtin/treasury-auctions/headless.test.ts +34 -0
- package/src/plugins/builtin/treasury-auctions/headless.ts +95 -0
- package/src/plugins/builtin/treasury-auctions/index.tsx +4 -0
- package/src/plugins/builtin/volatility/client.ts +16 -3
- package/src/plugins/builtin/volatility/headless.test.ts +35 -0
- package/src/plugins/builtin/volatility/headless.ts +75 -0
- package/src/plugins/builtin/volatility/index.tsx +5 -1
- package/src/plugins/builtin/world-indices/client.ts +43 -0
- package/src/plugins/builtin/world-indices/headless.test.ts +32 -0
- package/src/plugins/builtin/world-indices/headless.ts +109 -0
- package/src/plugins/builtin/world-indices/index.tsx +4 -0
- package/src/plugins/builtin/world-venue-map/map.desktop.test.tsx +106 -0
- package/src/plugins/builtin/world-venue-map/map.tsx +213 -69
- package/src/plugins/builtin/world-venue-map/model.test.ts +32 -0
- package/src/plugins/builtin/world-venue-map/model.ts +134 -13
- package/src/plugins/builtin/yield-curve/headless.test.ts +24 -0
- package/src/plugins/builtin/yield-curve/headless.ts +67 -0
- package/src/plugins/builtin/yield-curve/index.tsx +7 -9
- package/src/plugins/builtin/yield-curve/treasury-data.ts +16 -6
- package/src/plugins/bundle.test.ts +166 -0
- package/src/plugins/bundle.ts +141 -0
- package/src/plugins/catalog-backend.test.ts +26 -0
- package/src/plugins/catalog-backend.ts +9 -2
- package/src/plugins/catalog-browser.test.ts +1 -13
- package/src/plugins/catalog-browser.ts +14 -0
- package/src/plugins/catalog-manifest.test.ts +58 -0
- package/src/plugins/catalog-manifest.ts +99 -0
- package/src/plugins/catalog-ui.ts +20 -10
- package/src/plugins/catalog.ts +9 -2
- package/src/plugins/current-target.ts +28 -0
- package/src/plugins/host-contract.ts +46 -0
- package/src/plugins/host-link.ts +158 -0
- package/src/plugins/host-modules.ts +73 -0
- package/src/plugins/loader.ts +90 -23
- package/src/plugins/ownership.ts +1 -0
- package/src/plugins/prediction-markets/index.tsx +1 -0
- package/src/plugins/registry/context.ts +3 -0
- package/src/plugins/registry/contributions.ts +27 -0
- package/src/plugins/registry/index.test.ts +25 -0
- package/src/plugins/registry/index.ts +8 -0
- package/src/plugins/registry/pane-settings.ts +6 -13
- package/src/plugins/seed.test.ts +83 -0
- package/src/plugins/seed.ts +83 -0
- package/src/public/broker.ts +37 -0
- package/src/public/market-data.ts +9 -0
- package/src/public/pane-hooks.ts +57 -0
- package/src/public/public-api.test.ts +285 -0
- package/src/public/react.ts +62 -0
- package/src/public/test-support.ts +23 -0
- package/src/public/time-series.ts +8 -0
- package/src/public/utils.ts +77 -0
- package/src/remote/layout-helpers.ts +6 -8
- package/src/remote/resources.ts +2 -0
- package/src/remote/schema.test.ts +65 -0
- package/src/remote/schema.ts +323 -39
- package/src/remote/semantic-tree.test.tsx +105 -0
- package/src/remote/semantic-tree.tsx +53 -35
- package/src/remote/types.ts +49 -2
- package/src/renderers/browser/app-services.ts +3 -0
- package/src/renderers/browser/config-host.ts +24 -8
- package/src/renderers/browser/deeplink-bridge.test.ts +11 -0
- package/src/renderers/browser/deeplink-bridge.ts +15 -3
- package/src/renderers/browser/main.tsx +8 -0
- package/src/renderers/browser/research-entry.test.ts +8 -0
- package/src/renderers/browser/research-entry.ts +7 -0
- package/src/renderers/cloudflare/worker.test.ts +19 -0
- package/src/renderers/cloudflare/worker.ts +1 -1
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +2 -2
- package/src/renderers/electrobun/bun/desktop/initialization.ts +10 -3
- package/src/renderers/electrobun/bun/external-plugins.ts +156 -0
- package/src/renderers/electrobun/bun/index.ts +5 -2
- package/src/renderers/electrobun/shared/protocol.ts +21 -0
- package/src/renderers/electrobun/view/build-assets.ts +0 -3
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +114 -11
- package/src/renderers/electrobun/view/external-plugins.test.ts +45 -0
- package/src/renderers/electrobun/view/external-plugins.ts +63 -0
- package/src/renderers/electrobun/view/host/ascii-text.test.ts +48 -0
- package/src/renderers/electrobun/view/host/ascii-text.ts +11 -1
- package/src/renderers/electrobun/view/host/chart-surface.tsx +38 -32
- package/src/renderers/electrobun/view/host/mouse.ts +16 -2
- package/src/renderers/electrobun/view/main.tsx +27 -2
- package/src/renderers/electrobun/view/styles.css +5 -0
- package/src/renderers/electrobun/view/toast-host.tsx +18 -0
- package/src/renderers/opentui/chart-surface.tsx +5 -1
- package/src/renderers/opentui/host.tsx +16 -2
- package/src/renderers/opentui/interaction-performance.test.ts +79 -0
- package/src/renderers/opentui/interaction-performance.ts +188 -0
- package/src/renderers/opentui/start.tsx +26 -1
- package/src/renderers/opentui/test-utils.tsx +13 -0
- package/src/renderers/opentui/toast-host.tsx +26 -2
- package/src/renderers/opentui/ui-host.tsx +1 -0
- package/src/sources/provider-router/search.test.ts +191 -0
- package/src/sources/provider-router/search.ts +92 -39
- package/src/state/app/context/index.tsx +2 -0
- package/src/state/app/context/selector.test.tsx +33 -1
- package/src/state/hooks/quote-streaming.test.tsx +93 -0
- package/src/state/hooks/quote-streaming.ts +106 -30
- package/src/state/pane-table-export-registry.ts +19 -0
- package/src/sync/core-contributors.test.ts +111 -0
- package/src/sync/core-contributors.ts +155 -1
- package/src/theme/color-utils.ts +1 -1
- package/src/theme/colors.ts +50 -0
- package/src/theme/themes.test.ts +15 -2
- package/src/theme/themes.ts +19 -1
- package/src/tickers/search/index.test.ts +26 -0
- package/src/tickers/search/index.ts +42 -17
- package/src/tickers/search/ranking.ts +14 -0
- package/src/time-series/chart-data.test.ts +216 -0
- package/src/time-series/resolution.test.ts +25 -26
- package/src/time-series/resolution.ts +41 -10
- package/src/time-series/resolve.test.ts +118 -1
- package/src/time-series/resolve.ts +21 -16
- package/src/time-series/types.ts +3 -1
- package/src/time-series/use-chart-resolution.ts +5 -0
- package/src/types/config.ts +125 -3
- package/src/types/data-provider.ts +11 -0
- package/src/types/headless.ts +161 -0
- package/src/types/plugin.ts +102 -0
- package/src/ui/host.tsx +12 -1
- package/src/ui/index.tsx +1 -0
- package/src/ui/toast.tsx +8 -4
- package/src/utils/format.ts +35 -0
- package/src/utils/fuzzy-search.test.ts +94 -0
- package/src/utils/fuzzy-search.ts +81 -22
- package/src/utils/shortcut-labels.ts +14 -0
- package/src/components/chart/core/axis-format.ts +0 -157
- package/src/components/chart/core/index.test.ts +0 -1075
- package/src/components/chart/core/projection.ts +0 -357
- package/src/components/chart/core/render-utils.ts +0 -4
- package/src/components/chart/core/renderer.ts +0 -244
- package/src/components/chart/core/scene.ts +0 -180
- package/src/components/chart/core/time-axis.ts +0 -330
- package/src/components/chart/cursor-motion.ts +0 -47
- package/src/components/chart/indicators/types.ts +0 -26
- package/src/components/chart/market-session.ts +0 -176
- package/src/components/chart/multi-line/renderer.test.ts +0 -83
- package/src/components/chart/multi-line/renderer.ts +0 -161
- package/src/components/chart/multi-line/scene.ts +0 -188
- package/src/components/chart/native/raster/layout.ts +0 -129
- package/src/components/chart/native/raster/price-chart.ts +0 -244
- package/src/components/chart/rendering/chart-draw.ts +0 -270
- package/src/components/chart/rendering/geometry.ts +0 -95
- package/src/components/chart/rendering/pixel-buffer.ts +0 -267
- package/src/components/chart/scatter-chart-renderer.test.ts +0 -31
- package/src/components/chart/scatter-chart-renderer.ts +0 -223
- package/src/components/chart/static/chart/surface.tsx +0 -358
- package/src/components/command-bar/routes/root/article-results.test.ts +0 -83
- package/src/components/command-bar/routes/root/article-results.ts +0 -55
- package/src/plugins/broker-sync/broker-sync.test.ts +0 -188
- package/src/plugins/broker-sync/native-loader.ts +0 -10
- package/src/plugins/broker-sync/normalize.ts +0 -308
- package/src/plugins/broker-sync/public.ts +0 -122
- package/src/plugins/broker-sync/robinhood-native.ts +0 -367
- package/src/plugins/broker-sync/robinhood.ts +0 -114
- package/src/plugins/broker-sync/simplefin-native.ts +0 -201
- package/src/plugins/broker-sync/simplefin.ts +0 -70
- package/src/plugins/builtin/news/wire/article-search.test.ts +0 -72
- package/src/plugins/builtin/news/wire/article-search.ts +0 -140
- package/src/plugins/builtin/substack/api/auth.ts +0 -185
- package/src/plugins/builtin/substack/api/cache.ts +0 -82
- package/src/plugins/builtin/substack/api/loaders.ts +0 -170
- package/src/plugins/builtin/substack/api/store.ts +0 -186
- package/src/plugins/builtin/substack/api/types.ts +0 -42
- package/src/plugins/builtin/substack/api.test.ts +0 -298
- package/src/plugins/builtin/substack/article-detail.tsx +0 -397
- package/src/plugins/builtin/substack/article-stack.tsx +0 -133
- package/src/plugins/builtin/substack/content.ts +0 -478
- package/src/plugins/builtin/substack/feed-tabs.tsx +0 -44
- package/src/plugins/builtin/substack/index.tsx +0 -49
- package/src/plugins/builtin/substack/login-view.tsx +0 -126
- package/src/plugins/builtin/substack/model.test.ts +0 -155
- package/src/plugins/builtin/substack/normalize.ts +0 -343
- package/src/plugins/builtin/substack/pane-footer.ts +0 -52
- package/src/plugins/builtin/substack/pane-state.ts +0 -170
- package/src/plugins/builtin/substack/pane.tsx +0 -547
- package/src/plugins/builtin/substack/read-state.ts +0 -30
- package/src/plugins/builtin/substack/table.ts +0 -111
- package/src/plugins/builtin/substack/types.ts +0 -71
- package/src/plugins/builtin/substack/utils.ts +0 -131
- package/src/plugins/builtin/ticker-detail/data-panes/provider-search.tsx +0 -229
- package/src/plugins/ibkr/account-cache.test.ts +0 -102
- package/src/plugins/ibkr/account-cache.ts +0 -24
- package/src/plugins/ibkr/broker-adapter.ts +0 -286
- package/src/plugins/ibkr/config.test.ts +0 -79
- package/src/plugins/ibkr/config.ts +0 -250
- package/src/plugins/ibkr/dialogs.tsx +0 -40
- package/src/plugins/ibkr/flex/index.test.ts +0 -264
- package/src/plugins/ibkr/flex/index.ts +0 -367
- package/src/plugins/ibkr/flex/statement-client.ts +0 -235
- package/src/plugins/ibkr/fundamental-parser.ts +0 -149
- package/src/plugins/ibkr/gateway/account-loaders.ts +0 -266
- package/src/plugins/ibkr/gateway/account-summary.ts +0 -164
- package/src/plugins/ibkr/gateway/client-lock.ts +0 -154
- package/src/plugins/ibkr/gateway/connection-events.ts +0 -114
- package/src/plugins/ibkr/gateway/connection.ts +0 -152
- package/src/plugins/ibkr/gateway/contracts.ts +0 -132
- package/src/plugins/ibkr/gateway/fundamentals.ts +0 -83
- package/src/plugins/ibkr/gateway/helpers.ts +0 -33
- package/src/plugins/ibkr/gateway/history-requests.ts +0 -158
- package/src/plugins/ibkr/gateway/history.ts +0 -120
- package/src/plugins/ibkr/gateway/instrument-lookup.ts +0 -117
- package/src/plugins/ibkr/gateway/market-data.ts +0 -345
- package/src/plugins/ibkr/gateway/order-execution.ts +0 -218
- package/src/plugins/ibkr/gateway/orders.ts +0 -63
- package/src/plugins/ibkr/gateway/price-normalization.test.ts +0 -44
- package/src/plugins/ibkr/gateway/price-normalization.ts +0 -50
- package/src/plugins/ibkr/gateway/quote-stream-controller.ts +0 -203
- package/src/plugins/ibkr/gateway/quote-stream.ts +0 -171
- package/src/plugins/ibkr/gateway/selection.ts +0 -51
- package/src/plugins/ibkr/gateway/service/index.test.ts +0 -675
- package/src/plugins/ibkr/gateway/service/index.ts +0 -429
- package/src/plugins/ibkr/gateway/service/lifecycle.ts +0 -191
- package/src/plugins/ibkr/gateway/service/manager.ts +0 -52
- package/src/plugins/ibkr/gateway/service/market-data.ts +0 -48
- package/src/plugins/ibkr/gateway/service/native-loader.ts +0 -12
- package/src/plugins/ibkr/gateway/service/native.ts +0 -543
- package/src/plugins/ibkr/gateway/timeouts.ts +0 -13
- package/src/plugins/ibkr/gateway/types.ts +0 -27
- package/src/plugins/ibkr/index.test.tsx +0 -162
- package/src/plugins/ibkr/index.tsx +0 -159
- package/src/plugins/ibkr/instance-selection.test.ts +0 -120
- package/src/plugins/ibkr/instance-selection.ts +0 -36
- package/src/plugins/ibkr/portfolio-performance.test.ts +0 -32
- package/src/plugins/ibkr/portfolio-performance.ts +0 -129
- package/src/plugins/ibkr/trade/badge.tsx +0 -28
- package/src/plugins/ibkr/trade/dialogs.tsx +0 -44
- package/src/plugins/ibkr/trade/preview-panel.tsx +0 -130
- package/src/plugins/ibkr/trade/tab/actions.tsx +0 -443
- package/src/plugins/ibkr/trade/tab/field-editors.tsx +0 -79
- package/src/plugins/ibkr/trade/tab/footer.ts +0 -53
- package/src/plugins/ibkr/trade/tab/header.tsx +0 -167
- package/src/plugins/ibkr/trade/tab/index.test.tsx +0 -178
- package/src/plugins/ibkr/trade/tab/index.tsx +0 -298
- package/src/plugins/ibkr/trade/tab/model.ts +0 -159
- package/src/plugins/ibkr/trade/tab/order-request.ts +0 -64
- package/src/plugins/ibkr/trade/tab/shortcuts.ts +0 -89
- package/src/plugins/ibkr/trade/tab/state-sync.ts +0 -86
- package/src/plugins/ibkr/trade/ticket-panel.tsx +0 -301
- package/src/plugins/ibkr/trade/utils.test.ts +0 -175
- package/src/plugins/ibkr/trade/utils.ts +0 -144
- package/src/plugins/ibkr/trading/pane-view.tsx +0 -237
- package/src/plugins/ibkr/trading/pane.tsx +0 -332
- package/src/plugins/ibkr/trading/state.test.ts +0 -109
- package/src/plugins/ibkr/trading/state.ts +0 -335
- package/src/renderers/electrobun/view/native-stubs/broker-sync-native-loader.ts +0 -7
package/src/remote/types.ts
CHANGED
|
@@ -100,19 +100,66 @@ export interface RemoteResourceSchema {
|
|
|
100
100
|
patchable?: boolean;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
export type RemoteSideEffectLevel =
|
|
104
|
+
| "none"
|
|
105
|
+
| "local-write"
|
|
106
|
+
| "network-write"
|
|
107
|
+
| "external-side-effect"
|
|
108
|
+
| "external-trade";
|
|
109
|
+
|
|
110
|
+
export type RemoteWriteTier = "read" | "ui-write" | "user-data" | "broker";
|
|
111
|
+
|
|
112
|
+
export type RemoteJsonSchemaType =
|
|
113
|
+
| "object"
|
|
114
|
+
| "array"
|
|
115
|
+
| "string"
|
|
116
|
+
| "number"
|
|
117
|
+
| "integer"
|
|
118
|
+
| "boolean"
|
|
119
|
+
| "null";
|
|
120
|
+
|
|
121
|
+
/** Serializable subset of JSON Schema used for remote operation inputs. */
|
|
122
|
+
export interface RemoteJsonSchema {
|
|
123
|
+
type?: RemoteJsonSchemaType | RemoteJsonSchemaType[];
|
|
124
|
+
description?: string;
|
|
125
|
+
properties?: Record<string, RemoteJsonSchema>;
|
|
126
|
+
required?: string[];
|
|
127
|
+
additionalProperties?: boolean;
|
|
128
|
+
items?: RemoteJsonSchema;
|
|
129
|
+
enum?: Array<string | number | boolean | null>;
|
|
130
|
+
minimum?: number;
|
|
131
|
+
maximum?: number;
|
|
132
|
+
minItems?: number;
|
|
133
|
+
maxItems?: number;
|
|
134
|
+
minLength?: number;
|
|
135
|
+
maxLength?: number;
|
|
136
|
+
}
|
|
137
|
+
|
|
103
138
|
export interface RemoteOperationSchema {
|
|
104
139
|
id: string;
|
|
140
|
+
title: string;
|
|
105
141
|
description: string;
|
|
106
|
-
inputShape
|
|
142
|
+
inputShape: string;
|
|
143
|
+
inputSchema: RemoteJsonSchema;
|
|
107
144
|
outputShape?: string;
|
|
108
145
|
returns?: string;
|
|
109
146
|
recommendedNextReads?: string[];
|
|
110
147
|
examples?: unknown[];
|
|
111
|
-
sideEffectLevel:
|
|
148
|
+
sideEffectLevel: RemoteSideEffectLevel;
|
|
149
|
+
writeTier: RemoteWriteTier;
|
|
112
150
|
requiresConfirmation?: boolean;
|
|
113
151
|
dryRun?: boolean;
|
|
114
152
|
}
|
|
115
153
|
|
|
154
|
+
/** Stable operation metadata suitable for advertising outside the process. */
|
|
155
|
+
export interface RemoteOperationDescriptor {
|
|
156
|
+
name: string;
|
|
157
|
+
title: string;
|
|
158
|
+
description: string;
|
|
159
|
+
writeTier: RemoteWriteTier;
|
|
160
|
+
inputSchema: RemoteJsonSchema;
|
|
161
|
+
}
|
|
162
|
+
|
|
116
163
|
export interface RemoteControlSchema {
|
|
117
164
|
protocolVersion: number;
|
|
118
165
|
resources: RemoteResourceSchema[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { recordResearchActivity } from "../../api-client/research-activity";
|
|
1
2
|
import { newsProvider, type NewsCapability } from "../../capabilities";
|
|
2
3
|
import type { AppRuntimeServices, AppServicesFactoryOptions } from "../../core/app-service-ports";
|
|
3
4
|
import { MarketDataCoordinator, setSharedMarketDataCoordinator } from "../../market-data/coordinator";
|
|
@@ -23,6 +24,7 @@ export function createBrowserAppServices({
|
|
|
23
24
|
);
|
|
24
25
|
const pluginRegistry = new PluginRegistry(dataProvider, tickerRepository, persistence);
|
|
25
26
|
dataProvider.attachRegistry(pluginRegistry);
|
|
27
|
+
const stopSavedActivity = pluginRegistry.events.on("command-bar:portfolio-membership-persisted", () => recordResearchActivity("ticker_saved"));
|
|
26
28
|
const newsService = new NewsService({
|
|
27
29
|
pollIntervalMs: () => Math.max(1, config.refreshIntervalMinutes) * 60_000,
|
|
28
30
|
});
|
|
@@ -51,6 +53,7 @@ export function createBrowserAppServices({
|
|
|
51
53
|
pluginRegistry,
|
|
52
54
|
ready,
|
|
53
55
|
destroy() {
|
|
56
|
+
stopSavedActivity();
|
|
54
57
|
setSharedMarketDataCoordinator(null);
|
|
55
58
|
setSharedNewsService(null);
|
|
56
59
|
newsService.stop();
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
normalizeConfigForSave,
|
|
7
7
|
normalizeLoadedConfig,
|
|
8
8
|
} from "../../data/config/store/normalize";
|
|
9
|
-
import { createDefaultConfig, type AppConfig } from "../../types/config";
|
|
9
|
+
import { createDefaultConfig, TICKER_RESEARCH_PANE_ID, type AppConfig } from "../../types/config";
|
|
10
|
+
import { researchEntryFromSearch } from "./research-entry";
|
|
10
11
|
import { BROWSER_STORAGE_KEYS, SafeJsonStorage, type StorageLike } from "./storage";
|
|
11
12
|
|
|
12
13
|
export const BROWSER_DATA_DIR = "browser://local";
|
|
@@ -15,18 +16,33 @@ function browserReady(config: AppConfig): AppConfig {
|
|
|
15
16
|
return { ...config, onboardingComplete: true, onboardingProgress: undefined };
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
function createBrowserDefaultConfig(dataDir: string): AppConfig {
|
|
19
|
-
|
|
19
|
+
function createBrowserDefaultConfig(dataDir: string, search = ""): AppConfig {
|
|
20
|
+
const config = createDefaultConfig(dataDir);
|
|
21
|
+
const entry = researchEntryFromSearch(search) ?? { symbol: "NVDA", tab: "overview" };
|
|
22
|
+
// A first visit starts with one useful research pane. Saved layouts retain
|
|
23
|
+
// their existing panes and bindings when a visitor returns.
|
|
24
|
+
config.layouts[0] = {
|
|
25
|
+
name: "Research",
|
|
26
|
+
layout: {
|
|
27
|
+
dockRoot: { kind: "pane", instanceId: "ticker-detail:main" },
|
|
28
|
+
instances: [{ instanceId: "ticker-detail:main", paneId: TICKER_RESEARCH_PANE_ID,
|
|
29
|
+
binding: { kind: "fixed", symbol: entry.symbol }, settings: { hideTabs: false } }],
|
|
30
|
+
floating: [], detached: [],
|
|
31
|
+
},
|
|
32
|
+
paneState: { "ticker-detail:main": { activeTabId: entry.tab } },
|
|
33
|
+
};
|
|
34
|
+
config.layout = config.layouts[0].layout;
|
|
35
|
+
return browserReady(config);
|
|
20
36
|
}
|
|
21
37
|
|
|
22
|
-
export function createBrowserConfigStore(storage: StorageLike): ConfigStoreHost {
|
|
38
|
+
export function createBrowserConfigStore(storage: StorageLike, search = ""): ConfigStoreHost {
|
|
23
39
|
const data = new SafeJsonStorage<unknown>(storage, BROWSER_STORAGE_KEYS.config, null);
|
|
24
40
|
return {
|
|
25
41
|
async getDataDir() { return BROWSER_DATA_DIR; },
|
|
26
42
|
async loadConfig(dataDir) {
|
|
27
43
|
const saved = data.get();
|
|
28
44
|
if (!saved || typeof saved !== "object" || Array.isArray(saved)) {
|
|
29
|
-
return createBrowserDefaultConfig(dataDir);
|
|
45
|
+
return createBrowserDefaultConfig(dataDir, search);
|
|
30
46
|
}
|
|
31
47
|
return browserReady(normalizeLoadedConfig(saved as Record<string, unknown>, dataDir).config);
|
|
32
48
|
},
|
|
@@ -34,7 +50,7 @@ export function createBrowserConfigStore(storage: StorageLike): ConfigStoreHost
|
|
|
34
50
|
data.set(normalizeConfigForSave(browserReady({ ...config, dataDir: BROWSER_DATA_DIR })));
|
|
35
51
|
},
|
|
36
52
|
async initDataDir(dataDir) {
|
|
37
|
-
const config = createBrowserDefaultConfig(dataDir);
|
|
53
|
+
const config = createBrowserDefaultConfig(dataDir, search);
|
|
38
54
|
data.set(config);
|
|
39
55
|
return config;
|
|
40
56
|
},
|
|
@@ -42,7 +58,7 @@ export function createBrowserConfigStore(storage: StorageLike): ConfigStoreHost
|
|
|
42
58
|
for (const key of Object.values(BROWSER_STORAGE_KEYS)) {
|
|
43
59
|
try { storage.removeItem(key); } catch {}
|
|
44
60
|
}
|
|
45
|
-
data.set(createBrowserDefaultConfig(dataDir));
|
|
61
|
+
data.set(createBrowserDefaultConfig(dataDir, search));
|
|
46
62
|
},
|
|
47
63
|
async exportConfig() {
|
|
48
64
|
throw new Error("Config file export is unavailable in the browser.");
|
|
@@ -54,5 +70,5 @@ export function createBrowserConfigStore(storage: StorageLike): ConfigStoreHost
|
|
|
54
70
|
}
|
|
55
71
|
|
|
56
72
|
export function installBrowserConfigStore(storage: StorageLike = localStorage): void {
|
|
57
|
-
setConfigStoreHost(createBrowserConfigStore(storage));
|
|
73
|
+
setConfigStoreHost(createBrowserConfigStore(storage, typeof location !== "undefined" ? location.search : ""));
|
|
58
74
|
}
|
|
@@ -9,6 +9,17 @@ afterEach(() => {
|
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
describe("browser social share handoff", () => {
|
|
12
|
+
test("preserves the incoming ticker while the previous workspace restores", () => {
|
|
13
|
+
const location = { search: "?ticker=NVDA&tab=earnings-calls" };
|
|
14
|
+
Object.defineProperty(globalThis, "window", { configurable: true, value: {
|
|
15
|
+
location, addEventListener() {}, removeEventListener() {},
|
|
16
|
+
} });
|
|
17
|
+
const bridge = createBrowserDeepLinkBridge();
|
|
18
|
+
location.search = "?ticker=AAPL&tab=overview";
|
|
19
|
+
const seen: string[] = [];
|
|
20
|
+
bridge.subscribe(({ url }) => seen.push(url));
|
|
21
|
+
expect(seen).toEqual(["gloomberb://ticker/NVDA?tab=earnings-calls"]);
|
|
22
|
+
});
|
|
12
23
|
test("maps a valid pane share query to the common deep-link runtime", () => {
|
|
13
24
|
const id = "0123456789abcdef0123456789abcdef";
|
|
14
25
|
Object.defineProperty(globalThis, "window", {
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
import { marketplaceLayoutIdFromSearch } from "../../layout-marketplace/api";
|
|
2
2
|
import { paneShareIdFromSearch } from "../../shares/location";
|
|
3
3
|
import type { DesktopDeepLinkBridge } from "../../types/desktop-deeplink";
|
|
4
|
+
import { researchEntryFromSearch } from "./research-entry";
|
|
4
5
|
|
|
5
6
|
export function createBrowserDeepLinkBridge(): DesktopDeepLinkBridge {
|
|
7
|
+
// Restoring a saved pane can update the address before App subscribes.
|
|
8
|
+
// Keep the incoming link intact until it has been delivered once.
|
|
9
|
+
const initialSearch = window.location.search;
|
|
6
10
|
return {
|
|
7
11
|
subscribe(listener) {
|
|
12
|
+
let initial = true;
|
|
8
13
|
const emit = () => {
|
|
9
|
-
const
|
|
14
|
+
const search = initial ? initialSearch : window.location.search;
|
|
15
|
+
initial = false;
|
|
16
|
+
const layoutId = marketplaceLayoutIdFromSearch(search);
|
|
10
17
|
if (layoutId) {
|
|
11
18
|
listener({ url: `gloomberb://layout/${layoutId}` });
|
|
12
19
|
return;
|
|
13
20
|
}
|
|
14
|
-
const shareId = paneShareIdFromSearch(
|
|
15
|
-
if (shareId)
|
|
21
|
+
const shareId = paneShareIdFromSearch(search);
|
|
22
|
+
if (shareId) {
|
|
23
|
+
listener({ url: `gloomberb://share/${shareId}` });
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const entry = researchEntryFromSearch(search);
|
|
27
|
+
if (entry) listener({ url: `gloomberb://ticker/${encodeURIComponent(entry.symbol)}?tab=${entry.tab}` });
|
|
16
28
|
};
|
|
17
29
|
emit();
|
|
18
30
|
window.addEventListener("popstate", emit);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource react */
|
|
2
|
+
import { setCurrentPluginTarget } from "../../plugins/current-target";
|
|
2
3
|
import "../electrobun/view/styles.css";
|
|
3
4
|
import { createRoot } from "react-dom/client";
|
|
4
5
|
import { App } from "../../app";
|
|
@@ -20,6 +21,11 @@ import {
|
|
|
20
21
|
import { BROWSER_DATA_DIR, installBrowserConfigStore } from "./config-host";
|
|
21
22
|
import { browserRendererHost, browserUiHost } from "./ui-host";
|
|
22
23
|
import { createBrowserDeepLinkBridge } from "./deeplink-bridge";
|
|
24
|
+
import { initializeBrowserResearchActivity, recordResearchActivity } from "../../api-client/research-activity";
|
|
25
|
+
|
|
26
|
+
// Declared here rather than sniffed: the desktop view and the hosted browser
|
|
27
|
+
// app are both browser contexts but differ in what plugins may do.
|
|
28
|
+
setCurrentPluginTarget("web");
|
|
23
29
|
|
|
24
30
|
const rootElement = document.getElementById("root");
|
|
25
31
|
if (!rootElement) throw new Error("Missing root element");
|
|
@@ -31,8 +37,10 @@ root.render(<div className="gloom-loading">Starting Gloomberb...</div>);
|
|
|
31
37
|
async function boot(): Promise<void> {
|
|
32
38
|
installBrowserConfigStore();
|
|
33
39
|
installBrowserFetchTransports();
|
|
40
|
+
initializeBrowserResearchActivity();
|
|
34
41
|
installFocusScopeRelease();
|
|
35
42
|
await restoreBrowserCloudSession();
|
|
43
|
+
recordResearchActivity("workspace_opened");
|
|
36
44
|
const config = await loadConfig(BROWSER_DATA_DIR);
|
|
37
45
|
applyLanguageFromConfig(config);
|
|
38
46
|
const deepLinkBridge = createBrowserDeepLinkBridge();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { expect, test } from "bun:test";
|
|
2
|
+
import { researchEntryFromSearch } from "./research-entry";
|
|
3
|
+
|
|
4
|
+
test("normalizes ticker links while rejecting commands and invalid tab paths", () => {
|
|
5
|
+
expect(researchEntryFromSearch("?ticker=brk.b&tab=earnings-calls")).toEqual({ symbol: "BRK.B", tab: "earnings-calls" });
|
|
6
|
+
expect(researchEntryFromSearch("?ticker=NVDA&tab=../../bad")).toEqual({ symbol: "NVDA", tab: "overview" });
|
|
7
|
+
for (const search of ["", "?ticker=", "?ticker=NVDA%20%3B%20rm", "?ticker=%3Cscript%3E"]) expect(researchEntryFromSearch(search)).toBeNull();
|
|
8
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function researchEntryFromSearch(search: string): { symbol: string; tab: string } | null {
|
|
2
|
+
const params = new URLSearchParams(search);
|
|
3
|
+
const symbol = params.get("ticker")?.trim().toUpperCase();
|
|
4
|
+
if (!symbol || !/^[A-Z0-9.^=:_-]{1,24}$/.test(symbol)) return null;
|
|
5
|
+
const tab = params.get("tab") ?? "overview";
|
|
6
|
+
return { symbol, tab: /^[a-z-]{1,40}$/.test(tab) ? tab : "overview" };
|
|
7
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import { handleRequest, SECURITY_HEADERS, type WorkerEnv } from "./worker";
|
|
3
|
+
import { REGISTRY_ORIGIN } from "../../plugins/builtin/plugin-marketplace/feed";
|
|
3
4
|
|
|
4
5
|
function fixture() {
|
|
5
6
|
const requests: Request[] = [];
|
|
@@ -134,3 +135,21 @@ describe("static Cloudflare host", () => {
|
|
|
134
135
|
expect(requests).toHaveLength(0);
|
|
135
136
|
});
|
|
136
137
|
});
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The hosted build can only reach origins listed in `connect-src`. A blocked
|
|
141
|
+
* fetch is not an error the user can act on: the plugin marketplace just shows
|
|
142
|
+
* an empty catalog. This shipped that way once, because the pane was verified
|
|
143
|
+
* on the terminal and desktop but not on the web build, so the two values are
|
|
144
|
+
* pinned to each other here.
|
|
145
|
+
*/
|
|
146
|
+
describe("content security policy", () => {
|
|
147
|
+
test("allows the plugin registry the marketplace fetches", () => {
|
|
148
|
+
const connectSrc = SECURITY_HEADERS["content-security-policy"]
|
|
149
|
+
.split(";")
|
|
150
|
+
.map((directive) => directive.trim())
|
|
151
|
+
.find((directive) => directive.startsWith("connect-src"));
|
|
152
|
+
|
|
153
|
+
expect(connectSrc).toContain(REGISTRY_ORIGIN);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
@@ -39,7 +39,7 @@ const API_METHODS = new Set(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "O
|
|
|
39
39
|
type ApiFetch = (request: Request) => Promise<Response>;
|
|
40
40
|
|
|
41
41
|
export const SECURITY_HEADERS = {
|
|
42
|
-
"content-security-policy": "default-src 'self'; base-uri 'none'; object-src 'none'; frame-ancestors 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; media-src 'self' https:; connect-src 'self' https://api.github.com https://api.fiscaldata.treasury.gov; form-action 'self'; upgrade-insecure-requests",
|
|
42
|
+
"content-security-policy": "default-src 'self'; base-uri 'none'; object-src 'none'; frame-ancestors 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; media-src 'self' https:; connect-src 'self' https://api.github.com https://api.fiscaldata.treasury.gov https://plugins.gloom.sh; form-action 'self'; upgrade-insecure-requests",
|
|
43
43
|
"cross-origin-opener-policy": "same-origin",
|
|
44
44
|
"cross-origin-resource-policy": "same-origin",
|
|
45
45
|
"permissions-policy": "camera=(), geolocation=(), microphone=(), payment=(), usb=()",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createAppServices, type AppServices } from "../../../../core/app-services";
|
|
2
|
-
import {
|
|
2
|
+
import { loadDesktopBackendPlugins } from "../../../../plugins/catalog-backend";
|
|
3
3
|
import type { AppSessionSnapshot } from "../../../../core/state/session-persistence";
|
|
4
4
|
import {
|
|
5
5
|
exportConfig,
|
|
@@ -63,7 +63,7 @@ async function importDesktopConfig({
|
|
|
63
63
|
setCurrentConfig(await importConfig(payload.dataDir, payload.srcPath));
|
|
64
64
|
setServices(createAppServices({
|
|
65
65
|
config: getConfig(),
|
|
66
|
-
plugins:
|
|
66
|
+
plugins: await loadDesktopBackendPlugins(),
|
|
67
67
|
}));
|
|
68
68
|
syncConfigAccessors();
|
|
69
69
|
registerCoreCapabilities();
|
|
@@ -2,7 +2,8 @@ import { existsSync, mkdirSync } from "fs";
|
|
|
2
2
|
import { homedir } from "os";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
import { createAppServices, type AppServices } from "../../../../core/app-services";
|
|
5
|
-
import {
|
|
5
|
+
import { loadDesktopBackendPlugins } from "../../../../plugins/catalog-backend";
|
|
6
|
+
import { restoreExtractedPlugins } from "../../../../cli/restore-plugins";
|
|
6
7
|
import type { AppSessionSnapshot } from "../../../../core/state/session-persistence";
|
|
7
8
|
import {
|
|
8
9
|
getDataDir,
|
|
@@ -133,13 +134,19 @@ export async function initializeDesktopBackend<TRpc>(
|
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
const initialConfig = await initDataDir(await resolveDesktopDataDir());
|
|
138
|
+
// Restore plugins that moved into their own repositories before the catalog
|
|
139
|
+
// is read, the same as the terminal does at startup. Without it a
|
|
140
|
+
// desktop-only user silently loses a feature the day it is extracted, since
|
|
141
|
+
// nothing else installs it for them.
|
|
142
|
+
const seededPlugins = await restoreExtractedPlugins();
|
|
143
|
+
options.setCurrentConfig(seededPlugins ? { ...initialConfig, seededPlugins } : initialConfig);
|
|
137
144
|
const config = options.getCurrentConfig();
|
|
138
145
|
if (!config) throw new Error("Desktop config failed to initialize.");
|
|
139
146
|
|
|
140
147
|
const services = createAppServices({
|
|
141
148
|
config,
|
|
142
|
-
plugins:
|
|
149
|
+
plugins: await loadDesktopBackendPlugins(),
|
|
143
150
|
});
|
|
144
151
|
options.setServices(services);
|
|
145
152
|
await services.ready;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { readdir, rm, stat } from "fs/promises";
|
|
2
|
+
import { existsSync } from "fs";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
|
|
5
|
+
import type { DesktopExternalPluginBundle } from "../shared/protocol";
|
|
6
|
+
import { bundleExternalPlugin, pluginBundleCacheDir } from "../../../plugins/bundle";
|
|
7
|
+
import { linkHostPackages } from "../../../plugins/host-link";
|
|
8
|
+
import { getPluginCacheDir, getPluginsDir, isPluginDirectory, resolvePluginEntry } from "../../../plugins/loader";
|
|
9
|
+
import type { GloomPlugin } from "../../../types/plugin";
|
|
10
|
+
import { debugLog } from "../../../utils/debug-log";
|
|
11
|
+
|
|
12
|
+
const log = debugLog.createLogger("desktop-plugins");
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Prepares external plugins for the desktop view.
|
|
16
|
+
*
|
|
17
|
+
* The view is a browser context and cannot read `~/.gloomberb/plugins`, so the
|
|
18
|
+
* Bun process does both halves here: it imports each plugin natively to read
|
|
19
|
+
* its metadata, and compiles it to an ES module the view can evaluate.
|
|
20
|
+
*
|
|
21
|
+
* Bundling is cached against the newest mtime in the plugin directory. Without
|
|
22
|
+
* that, every window open would recompile every plugin, which is slow enough to
|
|
23
|
+
* be visible at startup.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
interface CacheEntry {
|
|
27
|
+
mtimeMs: number;
|
|
28
|
+
code: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const bundleCache = new Map<string, CacheEntry>();
|
|
32
|
+
|
|
33
|
+
async function newestMtime(dir: string): Promise<number> {
|
|
34
|
+
let newest = 0;
|
|
35
|
+
const walk = async (current: string, depth: number): Promise<void> => {
|
|
36
|
+
if (depth > 6) return;
|
|
37
|
+
for (const entry of await readdir(current, { withFileTypes: true })) {
|
|
38
|
+
if (entry.name === "node_modules" || entry.name === ".git") continue;
|
|
39
|
+
const full = join(current, entry.name);
|
|
40
|
+
if (entry.isDirectory()) {
|
|
41
|
+
await walk(full, depth + 1);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const info = await stat(full);
|
|
45
|
+
if (info.mtimeMs > newest) newest = info.mtimeMs;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
await walk(dir, 0);
|
|
49
|
+
return newest;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function readPluginMetadata(entryFile: string): Promise<GloomPlugin | null> {
|
|
53
|
+
try {
|
|
54
|
+
const mod = await import(entryFile);
|
|
55
|
+
const plugin: GloomPlugin = mod.default ?? mod.plugin;
|
|
56
|
+
return plugin?.id && plugin?.name ? plugin : null;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
log.error(`Metadata read failed for ${entryFile}: ${error}`);
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Bundles used to be cached inside the plugins folder, where the CLI listed
|
|
65
|
+
* `.cache` as an installed plugin and tried to `git pull` it. It is only a
|
|
66
|
+
* cache, so the old copy is dropped rather than migrated.
|
|
67
|
+
*/
|
|
68
|
+
async function removeLegacyBundleCache(pluginsDir: string): Promise<void> {
|
|
69
|
+
const legacy = join(pluginsDir, ".cache");
|
|
70
|
+
if (!existsSync(legacy)) return;
|
|
71
|
+
try {
|
|
72
|
+
await rm(legacy, { recursive: true, force: true });
|
|
73
|
+
} catch (error) {
|
|
74
|
+
log.error(`Could not remove the legacy bundle cache: ${error}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export async function collectExternalPluginBundles(): Promise<DesktopExternalPluginBundle[]> {
|
|
79
|
+
const pluginsDir = getPluginsDir();
|
|
80
|
+
if (!existsSync(pluginsDir)) return [];
|
|
81
|
+
|
|
82
|
+
await removeLegacyBundleCache(pluginsDir);
|
|
83
|
+
const outDir = pluginBundleCacheDir(getPluginCacheDir());
|
|
84
|
+
const bundles: DesktopExternalPluginBundle[] = [];
|
|
85
|
+
|
|
86
|
+
for (const entry of await readdir(pluginsDir, { withFileTypes: true })) {
|
|
87
|
+
if (!entry.isDirectory() || !isPluginDirectory(entry.name)) continue;
|
|
88
|
+
const pluginDir = join(pluginsDir, entry.name);
|
|
89
|
+
|
|
90
|
+
const entryFile = await resolvePluginEntry(pluginDir);
|
|
91
|
+
if (!entryFile) continue;
|
|
92
|
+
|
|
93
|
+
linkHostPackages(pluginDir);
|
|
94
|
+
|
|
95
|
+
const plugin = await readPluginMetadata(entryFile);
|
|
96
|
+
const base = {
|
|
97
|
+
id: plugin?.id ?? entry.name,
|
|
98
|
+
name: plugin?.name ?? entry.name,
|
|
99
|
+
version: plugin?.version ?? "0.0.0",
|
|
100
|
+
path: pluginDir,
|
|
101
|
+
...(plugin?.targets ? { targets: plugin.targets } : {}),
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
if (!plugin) {
|
|
105
|
+
bundles.push({ ...base, error: "Plugin did not export a valid GloomPlugin." });
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Skip compiling something the desktop cannot run anyway; the marketplace
|
|
110
|
+
// still lists it, explaining why it is inert.
|
|
111
|
+
if (plugin.targets && !plugin.targets.includes("desktop")) {
|
|
112
|
+
bundles.push({ ...base, error: `${plugin.name} does not support the desktop app.` });
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
try {
|
|
117
|
+
const mtimeMs = await newestMtime(pluginDir);
|
|
118
|
+
const cached = bundleCache.get(pluginDir);
|
|
119
|
+
if (cached && cached.mtimeMs === mtimeMs) {
|
|
120
|
+
bundles.push({ ...base, code: cached.code });
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const result = await bundleExternalPlugin(pluginDir, join(outDir, entry.name));
|
|
125
|
+
const code = await Bun.file(result.outputPath).text();
|
|
126
|
+
bundleCache.set(pluginDir, { mtimeMs, code });
|
|
127
|
+
log.info(`Bundled ${plugin.id} (${Math.round(code.length / 1024)}KB, shared: ${result.shared.join(", ")})`);
|
|
128
|
+
bundles.push({ ...base, code });
|
|
129
|
+
} catch (error) {
|
|
130
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
131
|
+
log.error(`Bundling ${plugin.id} failed: ${message}`);
|
|
132
|
+
bundles.push({ ...base, error: message });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return bundles;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Installs a plugin on behalf of the desktop view, which cannot run git or bun
|
|
141
|
+
* itself. Errors are returned rather than thrown so the marketplace can show
|
|
142
|
+
* them next to the plugin instead of surfacing an RPC failure.
|
|
143
|
+
*
|
|
144
|
+
* The bundle cache is cleared so the next `plugins.listExternal` compiles the
|
|
145
|
+
* newly installed plugin rather than serving a stale set.
|
|
146
|
+
*/
|
|
147
|
+
export async function installExternalPlugin(ref: string): Promise<{ ok: boolean; error?: string }> {
|
|
148
|
+
try {
|
|
149
|
+
const { installPlugin } = await import("../../../cli/commands/plugins");
|
|
150
|
+
await installPlugin(ref, { quiet: true });
|
|
151
|
+
bundleCache.clear();
|
|
152
|
+
return { ok: true };
|
|
153
|
+
} catch (error) {
|
|
154
|
+
return { ok: false, error: error instanceof Error ? error.message : String(error) };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -25,7 +25,6 @@ import type { DesktopWorkspace } from "./desktop/workspace";
|
|
|
25
25
|
import { buildDesktopApplicationMenu } from "./application-menu";
|
|
26
26
|
import { applicationMenuCommand } from "./application-menu/click";
|
|
27
27
|
import { registerElectrobunCoreCapabilities } from "./core-capabilities";
|
|
28
|
-
import { setNativeIbkrGatewayModuleLoader } from "../../../plugins/ibkr/gateway/service";
|
|
29
28
|
import {
|
|
30
29
|
runElectrobunDesktopUpdate,
|
|
31
30
|
} from "./desktop/update";
|
|
@@ -37,6 +36,7 @@ import {
|
|
|
37
36
|
} from "./window/frame";
|
|
38
37
|
import { MAIN_WINDOW_RPC_KEY } from "./window/focus";
|
|
39
38
|
import { handleHttpFetch } from "./desktop/http-fetch";
|
|
39
|
+
import { collectExternalPluginBundles, installExternalPlugin } from "./external-plugins";
|
|
40
40
|
import { handleDesktopPluginStateRequest } from "./desktop/plugin-state";
|
|
41
41
|
import { scheduleDesktopRelaunch } from "./desktop/relaunch";
|
|
42
42
|
import {
|
|
@@ -72,7 +72,6 @@ console.info = (...args) => console.error(...args);
|
|
|
72
72
|
console.warn = (...args) => console.error(...args);
|
|
73
73
|
|
|
74
74
|
setConfigStoreHost(nodeConfigStoreHost);
|
|
75
|
-
setNativeIbkrGatewayModuleLoader(() => import("../../../plugins/ibkr/gateway/service/native"));
|
|
76
75
|
|
|
77
76
|
let currentConfig: AppConfig | null = null;
|
|
78
77
|
let services: AppServices | null = null;
|
|
@@ -468,6 +467,10 @@ async function handleBackendRequest(
|
|
|
468
467
|
case "pluginState.setMany":
|
|
469
468
|
case "pluginState.delete":
|
|
470
469
|
return handleDesktopPluginStateRequest(requireServices().persistence.pluginState, request);
|
|
470
|
+
case "plugins.listExternal":
|
|
471
|
+
return collectExternalPluginBundles();
|
|
472
|
+
case "plugins.install":
|
|
473
|
+
return installExternalPlugin(request.payload.ref);
|
|
471
474
|
case "host.restart":
|
|
472
475
|
case "host.exit":
|
|
473
476
|
case "host.windowControl":
|
|
@@ -83,6 +83,25 @@ export interface DesktopCapabilitySubscribeRequest extends DesktopCapabilityInvo
|
|
|
83
83
|
subscriptionId: string;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* One external plugin, compiled for the view.
|
|
88
|
+
*
|
|
89
|
+
* The Bun process owns the filesystem, so it reads and bundles the plugin and
|
|
90
|
+
* hands the view executable module text. `error` is carried rather than thrown
|
|
91
|
+
* so a single broken plugin surfaces in the marketplace instead of taking down
|
|
92
|
+
* the renderer.
|
|
93
|
+
*/
|
|
94
|
+
export interface DesktopExternalPluginBundle {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
version: string;
|
|
98
|
+
path: string;
|
|
99
|
+
/** ES module source, absent when `error` is set. */
|
|
100
|
+
code?: string;
|
|
101
|
+
targets?: readonly ("cli" | "tui" | "desktop" | "web")[];
|
|
102
|
+
error?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
86
105
|
export interface DesktopBackendRequestMap {
|
|
87
106
|
init: {
|
|
88
107
|
request: { kind?: "main" | "detached"; paneId?: string };
|
|
@@ -111,6 +130,8 @@ export interface DesktopBackendRequestMap {
|
|
|
111
130
|
"pluginState.set": { request: DesktopPluginStateSetEntry; response: null };
|
|
112
131
|
"pluginState.setMany": { request: { entries: DesktopPluginStateSetEntry[] }; response: null };
|
|
113
132
|
"pluginState.delete": { request: { pluginId: string; key: string }; response: null };
|
|
133
|
+
"plugins.listExternal": { request: null; response: DesktopExternalPluginBundle[] };
|
|
134
|
+
"plugins.install": { request: { ref: string }; response: { ok: boolean; error?: string } };
|
|
114
135
|
"host.restart": { request: DesktopRestartMessage; response: null };
|
|
115
136
|
"host.exit": { request: null; response: null };
|
|
116
137
|
"host.windowControl": { request: { action: DesktopWindowControlAction }; response: null };
|
|
@@ -23,9 +23,6 @@ const COMMON_ALIAS_RULES: AliasRule[] = [
|
|
|
23
23
|
["./kitty/support", "components/chart/native/renderer-selection.ts", "native-stubs/chart/kitty-support.ts"],
|
|
24
24
|
["native/surface/manager", "native-stubs/chart/surface-manager.ts"],
|
|
25
25
|
["native/surface/sync", "native-stubs/chart/surface-sync.ts"],
|
|
26
|
-
["./native-loader", "plugins/ibkr/gateway/service/index.ts", "native-stubs/ibkr-native-loader.ts"],
|
|
27
|
-
["./native-loader", "plugins/broker-sync/robinhood.ts", "native-stubs/broker-sync-native-loader.ts"],
|
|
28
|
-
["./native-loader", "plugins/broker-sync/simplefin.ts", "native-stubs/broker-sync-native-loader.ts"],
|
|
29
26
|
];
|
|
30
27
|
|
|
31
28
|
export function electrobunViewPath(...parts: string[]): string {
|