gloomberb 0.19.5 → 0.20.0

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.
Files changed (318) hide show
  1. package/LICENSE +0 -4
  2. package/package.json +6 -5
  3. package/patches/@opentui%2Fcore@0.3.2.patch +86 -25
  4. package/patches/electrobun-devkit@2.0.5.patch +148 -0
  5. package/src/api-client/bond-trades.ts +59 -0
  6. package/src/api-client/data.ts +21 -0
  7. package/src/api-client/equity-screener.ts +23 -0
  8. package/src/api-client/index.ts +2 -0
  9. package/src/api-client/types/account.ts +86 -0
  10. package/src/api-client/types/assist.ts +32 -0
  11. package/src/api-client/types/auth.ts +63 -0
  12. package/src/api-client/types/billing.ts +54 -0
  13. package/src/api-client/types/chat.ts +180 -0
  14. package/src/api-client/types/congress.ts +107 -0
  15. package/src/api-client/types/credit.ts +110 -0
  16. package/src/api-client/types/econ.ts +158 -0
  17. package/src/api-client/types/equity-diagnostic.ts +73 -0
  18. package/src/api-client/types/filings-and-calls.ts +350 -0
  19. package/src/api-client/types/index.ts +25 -0
  20. package/src/api-client/types/jobs.ts +147 -0
  21. package/src/api-client/types/market.ts +122 -0
  22. package/src/api-client/types/news.ts +91 -0
  23. package/src/api-client/types/notes-and-theses.ts +172 -0
  24. package/src/api-client/types/quotes.ts +28 -0
  25. package/src/api-client/types/scanners.ts +125 -0
  26. package/src/api-client/types/screener.ts +65 -0
  27. package/src/api-client/types/search.ts +107 -0
  28. package/src/api-client/types/sync.ts +14 -0
  29. package/src/api-client/types/team-collections.ts +43 -0
  30. package/src/api-client/types/team-views.ts +32 -0
  31. package/src/api-client/types/teams.ts +135 -0
  32. package/src/api-client/types/ticker-data.ts +57 -0
  33. package/src/api-client/types/tweets.ts +59 -0
  34. package/src/api-client/types/world-venues.ts +23 -0
  35. package/src/app/pane-runtime/index.tsx +2 -0
  36. package/src/app/pane-runtime/plugin-bindings.ts +10 -1
  37. package/src/app/runtime/desktop-deeplink.ts +41 -6
  38. package/src/app/star-prompt/status-line.tsx +1 -1
  39. package/src/app.tsx +64 -23
  40. package/src/architecture/ui-tokens-allowlist.json +0 -8
  41. package/src/cli/commands/market.ts +149 -10
  42. package/src/cli/commands/search.ts +21 -3
  43. package/src/cli/commands/ticker.ts +90 -36
  44. package/src/cli/desktop-pane-shot-browser.ts +69 -3
  45. package/src/cli/glossary.ts +3 -3
  46. package/src/cli/known-gaps.ts +8 -0
  47. package/src/cli/listing-arg.ts +12 -0
  48. package/src/cli/pane-functions/capabilities.ts +2 -0
  49. package/src/cli/pane-functions/catalog.ts +25 -5
  50. package/src/cli/pane-functions/function-help.ts +8 -5
  51. package/src/cli/pane-functions/headless.ts +4 -3
  52. package/src/cli/pane-functions/resolver.ts +75 -2
  53. package/src/cli/quote-answer.ts +9 -0
  54. package/src/cli/symbol-list.ts +54 -2
  55. package/src/cli/symbol-rows.ts +14 -2
  56. package/src/cli/ticker-resolution.ts +89 -20
  57. package/src/components/chart/composite/axis-overlays.tsx +60 -27
  58. package/src/components/chart/composite/composite-chart.tsx +118 -63
  59. package/src/components/chart/composite/cursor-source.ts +111 -0
  60. package/src/components/chart/composite/format.ts +168 -6
  61. package/src/components/chart/composite/legend.tsx +8 -4
  62. package/src/components/chart/composite/panel-labels.ts +20 -1
  63. package/src/components/chart/composite/panel-surface.tsx +201 -92
  64. package/src/components/chart/composite/price-axis-labels.tsx +92 -46
  65. package/src/components/chart/composite/price-series.ts +31 -8
  66. package/src/components/chart/composite/scene.ts +154 -59
  67. package/src/components/chart/composite/series-axis-tags.tsx +4 -2
  68. package/src/components/chart/composite/time-axis.ts +13 -5
  69. package/src/components/chart/composite/time-scale.ts +211 -56
  70. package/src/components/chart/composite/types.ts +11 -1
  71. package/src/components/chart/composite/use-composite-chart-keyboard.ts +43 -14
  72. package/src/components/chart/curve/curve-surface.tsx +5 -2
  73. package/src/components/chart/curve/model.ts +4 -1
  74. package/src/components/chart/native/use-bitmap-metrics.ts +81 -0
  75. package/src/components/chart/static/series.ts +3 -0
  76. package/src/components/command-bar/commands/collection-list.ts +81 -0
  77. package/src/components/command-bar/commands/direct/index.ts +6 -0
  78. package/src/components/command-bar/commands/registry.ts +8 -0
  79. package/src/components/command-bar/layout-items/current-layout.ts +22 -1
  80. package/src/components/command-bar/layout-items/focused-pane.ts +22 -1
  81. package/src/components/command-bar/pane-templates/items.ts +19 -3
  82. package/src/components/command-bar/pane-templates/workflow.ts +5 -0
  83. package/src/components/command-bar/routes/root/results.ts +23 -3
  84. package/src/components/command-bar/routes/root/selection.ts +4 -2
  85. package/src/components/command-bar/routes/root/shortcut-feedback.ts +1 -1
  86. package/src/components/command-bar/routes/root/shortcut-items.ts +3 -4
  87. package/src/components/command-bar/routes/root/shortcuts.ts +58 -14
  88. package/src/components/command-bar/routes/root/ticker-first.ts +32 -0
  89. package/src/components/command-bar/surface/environment.ts +2 -0
  90. package/src/components/command-bar/view-model.ts +7 -0
  91. package/src/components/command-bar/workflow/ops.ts +2 -1
  92. package/src/components/command-bar/workflow/tickers.ts +20 -0
  93. package/src/components/data-table/export.ts +4 -1
  94. package/src/components/layout/detached-pane-shell.tsx +10 -37
  95. package/src/components/layout/double-escape-close.ts +90 -0
  96. package/src/components/layout/header.tsx +3 -2
  97. package/src/components/layout/market-summary.ts +6 -3
  98. package/src/components/layout/pane/footer/index.tsx +2 -6
  99. package/src/components/layout/pane/footer/model.ts +6 -12
  100. package/src/components/layout/shell/active-drag.ts +53 -11
  101. package/src/components/layout/shell/drag/magnets.ts +128 -19
  102. package/src/components/layout/shell/menu.ts +15 -1
  103. package/src/components/layout/shell/pane/actions.ts +10 -2
  104. package/src/components/layout/shell/pane/management-shortcuts.ts +13 -51
  105. package/src/components/layout/shell/ticker-link-menu.ts +12 -3
  106. package/src/components/layout/status-bar.tsx +24 -78
  107. package/src/components/layout/status-widget-space.ts +5 -5
  108. package/src/components/onboarding/onboarding-keyboard.ts +5 -1
  109. package/src/components/onboarding/onboarding-wizard.tsx +15 -4
  110. package/src/components/onboarding/portfolio-step/positions-panel.tsx +9 -6
  111. package/src/components/onboarding/use-onboarding-progress.ts +20 -1
  112. package/src/components/price-sparkline/view.tsx +14 -6
  113. package/src/components/ticker/badge/index.tsx +8 -4
  114. package/src/components/ticker/badge/list.tsx +23 -7
  115. package/src/components/ui/column-grid.tsx +8 -2
  116. package/src/components/ui/data-table/index.tsx +5 -1
  117. package/src/components/ui/data-table/opentui/model.ts +4 -1
  118. package/src/components/ui/data-table/render-cell.ts +19 -0
  119. package/src/components/ui/delayed-mark.tsx +59 -7
  120. package/src/components/ui/icon.tsx +1 -8
  121. package/src/components/ui/menu.tsx +6 -1
  122. package/src/components/ui/tabs.tsx +5 -2
  123. package/src/core/state/app/layout.ts +18 -3
  124. package/src/core/state/app/state.ts +2 -0
  125. package/src/core/state/app/types.ts +5 -0
  126. package/src/data/config/layout.ts +3 -0
  127. package/src/data/config/store/normalize.ts +39 -4
  128. package/src/i18n/es.ts +13 -3
  129. package/src/i18n/ja.ts +13 -3
  130. package/src/i18n/ko.ts +13 -3
  131. package/src/i18n/zh-cn.ts +13 -3
  132. package/src/i18n/zh-tw.ts +13 -3
  133. package/src/layout/pane-manager/floating-placement.ts +7 -4
  134. package/src/layout/pane-manager/floating.ts +5 -2
  135. package/src/market-data/bond-funds.ts +19 -0
  136. package/src/market-data/futures-contract.ts +14 -3
  137. package/src/market-data/market/freshness.ts +18 -0
  138. package/src/market-data/market/status.ts +15 -2
  139. package/src/plugins/builtin/bond-calculator/headless.ts +2 -1
  140. package/src/plugins/builtin/bond-calculator/index.tsx +1 -1
  141. package/src/plugins/builtin/bond-calculator/model.ts +14 -5
  142. package/src/plugins/builtin/bond-calculator/pane.tsx +1 -1
  143. package/src/plugins/builtin/buildout/cells.tsx +25 -45
  144. package/src/plugins/builtin/buildout/detail/company.tsx +3 -3
  145. package/src/plugins/builtin/buildout/detail/index.tsx +1 -1
  146. package/src/plugins/builtin/buildout/detail/intel.tsx +4 -7
  147. package/src/plugins/builtin/buildout/detail/site.tsx +4 -4
  148. package/src/plugins/builtin/buildout/detail/ui.tsx +39 -38
  149. package/src/plugins/builtin/buildout/format.ts +23 -1
  150. package/src/plugins/builtin/buildout/model/types.ts +1 -0
  151. package/src/plugins/builtin/buildout/pane/index.tsx +2 -8
  152. package/src/plugins/builtin/buildout/table-model.ts +12 -4
  153. package/src/plugins/builtin/cds/headless.ts +1 -0
  154. package/src/plugins/builtin/cds/index.tsx +1 -1
  155. package/src/plugins/builtin/chat/content/composer.tsx +21 -27
  156. package/src/plugins/builtin/chat/content/index.tsx +31 -3
  157. package/src/plugins/builtin/chat/content/shortcuts.ts +4 -2
  158. package/src/plugins/builtin/chat/content/snapshot.ts +0 -3
  159. package/src/plugins/builtin/cloud/auth-actions.tsx +51 -23
  160. package/src/plugins/builtin/cloud/plugin.tsx +2 -0
  161. package/src/plugins/builtin/cloud/trial-offer-status-widget.tsx +3 -3
  162. package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +44 -12
  163. package/src/plugins/builtin/congress-trades/model.ts +2 -1
  164. package/src/plugins/builtin/congress-trades/pane.tsx +3 -0
  165. package/src/plugins/builtin/correlation/headless.ts +3 -2
  166. package/src/plugins/builtin/crypto-board/pane.tsx +5 -4
  167. package/src/plugins/builtin/custom-view/index.tsx +1 -1
  168. package/src/plugins/builtin/custom-view/loader.ts +85 -8
  169. package/src/plugins/builtin/custom-view/view-spec.ts +28 -0
  170. package/src/plugins/builtin/debt-maturities/headless.ts +11 -2
  171. package/src/plugins/builtin/debt-maturities/model.ts +66 -0
  172. package/src/plugins/builtin/debt-maturities/pane.tsx +23 -4
  173. package/src/plugins/builtin/earnings-ripple/pane.tsx +1 -1
  174. package/src/plugins/builtin/econ/calendar-model.ts +28 -6
  175. package/src/plugins/builtin/equity-screener/client.ts +1 -1
  176. package/src/plugins/builtin/equity-screener/criterion-editor.tsx +16 -19
  177. package/src/plugins/builtin/equity-screener/headless.ts +37 -3
  178. package/src/plugins/builtin/equity-screener/ideas.ts +67 -3
  179. package/src/plugins/builtin/equity-screener/model.ts +238 -27
  180. package/src/plugins/builtin/equity-screener/pane.tsx +88 -18
  181. package/src/plugins/builtin/equity-screener/screen-check.ts +7 -4
  182. package/src/plugins/builtin/equity-screener/watchlist.ts +33 -0
  183. package/src/plugins/builtin/executives/format.ts +5 -4
  184. package/src/plugins/builtin/executives/pane.tsx +1 -1
  185. package/src/plugins/builtin/futures-curve/client.ts +19 -0
  186. package/src/plugins/builtin/futures-curve/headless.ts +52 -13
  187. package/src/plugins/builtin/futures-curve/index.tsx +1 -1
  188. package/src/plugins/builtin/futures-curve/model.ts +77 -6
  189. package/src/plugins/builtin/futures-curve/pane.tsx +19 -3
  190. package/src/plugins/builtin/help/index.tsx +55 -1
  191. package/src/plugins/builtin/insider/model.ts +30 -2
  192. package/src/plugins/builtin/jobs/model.ts +2 -2
  193. package/src/plugins/builtin/macro-day/client.ts +41 -0
  194. package/src/plugins/builtin/macro-day/headless.ts +19 -9
  195. package/src/plugins/builtin/macro-day/model.ts +3 -1
  196. package/src/plugins/builtin/market-movers/index.tsx +4 -3
  197. package/src/plugins/builtin/mna/distress/headless.ts +1 -0
  198. package/src/plugins/builtin/mna/model.ts +2 -2
  199. package/src/plugins/builtin/notes/files.ts +2 -0
  200. package/src/plugins/builtin/notes/owner.tsx +20 -1
  201. package/src/plugins/builtin/notes/quick-notes-pane.tsx +22 -4
  202. package/src/plugins/builtin/notes/store.ts +6 -1
  203. package/src/plugins/builtin/perps/pane.tsx +3 -1
  204. package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +17 -0
  205. package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +2 -1
  206. package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +2 -1
  207. package/src/plugins/builtin/portfolio-list/header.tsx +1 -1
  208. package/src/plugins/builtin/rate-path/headless.ts +24 -10
  209. package/src/plugins/builtin/research/corporate-actions-pane.tsx +29 -25
  210. package/src/plugins/builtin/research/event-model.ts +10 -3
  211. package/src/plugins/builtin/research/events-headless.ts +20 -2
  212. package/src/plugins/builtin/sec/fund-facts.ts +17 -1
  213. package/src/plugins/builtin/sec/index.tsx +1 -1
  214. package/src/plugins/builtin/series-inventory.ts +1 -0
  215. package/src/plugins/builtin/shared/earnings-report.ts +7 -2
  216. package/src/plugins/builtin/shared/members-menu.tsx +103 -38
  217. package/src/plugins/builtin/shared/use-quote-board.ts +85 -46
  218. package/src/plugins/builtin/short-interest/headless.ts +1 -1
  219. package/src/plugins/builtin/short-interest/model.ts +15 -6
  220. package/src/plugins/builtin/short-interest/publications-model.ts +22 -1
  221. package/src/plugins/builtin/short-interest/publications-pane.tsx +13 -4
  222. package/src/plugins/builtin/short-interest/types.ts +2 -0
  223. package/src/plugins/builtin/short-interest/watch-model.ts +1 -1
  224. package/src/plugins/builtin/thirteenf/overlap-pane.tsx +3 -0
  225. package/src/plugins/builtin/thirteenf/pane.tsx +3 -0
  226. package/src/plugins/builtin/ticker-detail/overview/model.ts +5 -3
  227. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +4 -4
  228. package/src/plugins/builtin/time-sales/pane.tsx +3 -2
  229. package/src/plugins/builtin/trace-bonds/client.ts +7 -4
  230. package/src/plugins/builtin/trace-bonds/detail.tsx +198 -0
  231. package/src/plugins/builtin/trace-bonds/headless.ts +62 -4
  232. package/src/plugins/builtin/trace-bonds/history.ts +155 -0
  233. package/src/plugins/builtin/trace-bonds/index.tsx +1 -1
  234. package/src/plugins/builtin/trace-bonds/pane.tsx +64 -5
  235. package/src/plugins/builtin/volatility/client.ts +6 -1
  236. package/src/plugins/builtin/volatility/headless.ts +0 -1
  237. package/src/plugins/builtin/yield-curve/curves.ts +15 -0
  238. package/src/plugins/builtin/yield-curve/headless.ts +6 -1
  239. package/src/plugins/builtin/yield-curve/index.tsx +5 -8
  240. package/src/plugins/host-modules.ts +22 -3
  241. package/src/plugins/host-smoke.ts +6 -3
  242. package/src/plugins/installer.ts +16 -3
  243. package/src/plugins/plugin-names.ts +11 -2
  244. package/src/portfolio/collection-name.ts +19 -0
  245. package/src/remote/controller.ts +9 -2
  246. package/src/remote/schema.ts +2 -1
  247. package/src/renderers/browser/http-proxy-transport.ts +78 -8
  248. package/src/renderers/cloudflare/http-proxy.ts +73 -3
  249. package/src/renderers/cloudflare/proxy-session.ts +47 -24
  250. package/src/renderers/cloudflare/worker.ts +44 -4
  251. package/src/renderers/desktop/geometry.ts +279 -0
  252. package/src/renderers/desktop/screen-setup.ts +246 -0
  253. package/src/renderers/desktop/sequential-window-host.ts +179 -0
  254. package/src/renderers/desktop/test-utils.ts +71 -0
  255. package/src/renderers/desktop/window-controller.ts +433 -0
  256. package/src/renderers/desktop/window-host.ts +70 -0
  257. package/src/renderers/desktop/window-layouts.ts +630 -0
  258. package/src/renderers/dom/data-frames.ts +15 -4
  259. package/src/renderers/dom/desktop/icons.tsx +0 -2
  260. package/src/renderers/dom/styles.css +0 -3
  261. package/src/renderers/electrobun/bun/application-menu/click.ts +1 -0
  262. package/src/renderers/electrobun/bun/application-menu/index.ts +4 -1
  263. package/src/renderers/electrobun/bun/desktop/backend-requests.ts +19 -8
  264. package/src/renderers/electrobun/bun/desktop/backend.ts +320 -19
  265. package/src/renderers/electrobun/bun/desktop/detached-windows.ts +83 -61
  266. package/src/renderers/electrobun/bun/desktop/host-requests.ts +4 -14
  267. package/src/renderers/electrobun/bun/desktop/initialization.ts +30 -11
  268. package/src/renderers/electrobun/bun/desktop/install-records.ts +59 -0
  269. package/src/renderers/electrobun/bun/desktop/installer-folder.ts +208 -592
  270. package/src/renderers/electrobun/bun/desktop/macos-objc.ts +14 -0
  271. package/src/renderers/electrobun/bun/desktop/screen-setup-file.ts +55 -0
  272. package/src/renderers/electrobun/bun/desktop/state-broadcaster.ts +44 -8
  273. package/src/renderers/electrobun/bun/desktop/update.ts +1 -1
  274. package/src/renderers/electrobun/bun/desktop/workspace/index.ts +298 -97
  275. package/src/renderers/electrobun/bun/desktop/workspace/requests.ts +44 -6
  276. package/src/renderers/electrobun/bun/index.ts +22 -109
  277. package/src/renderers/electrobun/bun/window/create.ts +23 -3
  278. package/src/renderers/electrobun/bun/window/electrobun-window-host.ts +306 -0
  279. package/src/renderers/electrobun/bun/window/events.ts +4 -4
  280. package/src/renderers/electrobun/bun/window/focus.ts +0 -25
  281. package/src/renderers/electrobun/bun/window/frame.ts +2 -1
  282. package/src/renderers/electrobun/bun/window/native-min-size.ts +322 -0
  283. package/src/renderers/electrobun/bun/window/remembered-frame.ts +4 -82
  284. package/src/renderers/electrobun/shared/protocol.ts +44 -2
  285. package/src/renderers/electrobun/view/backend-rpc.ts +16 -1
  286. package/src/renderers/electrobun/view/desktop/window/bridge.ts +63 -3
  287. package/src/renderers/electrobun/view/main.tsx +13 -7
  288. package/src/series/fred-argument.ts +17 -0
  289. package/src/sources/gloomberb-cloud/index.ts +5 -7
  290. package/src/sources/provider-router/batches.ts +18 -3
  291. package/src/sources/provider-router/financial-routes.ts +7 -1
  292. package/src/sources/provider-router/financials.ts +18 -4
  293. package/src/state/app/context/index.tsx +16 -2
  294. package/src/state/desktop-windows.ts +63 -0
  295. package/src/sync/other-window-tabs.ts +62 -0
  296. package/src/tickers/company-name-listing.ts +23 -3
  297. package/src/tickers/listing-fate.ts +147 -1
  298. package/src/tickers/terminal-codes.ts +5 -0
  299. package/src/time-series/types.ts +6 -0
  300. package/src/types/config.ts +10 -1
  301. package/src/types/data-provider.ts +14 -0
  302. package/src/types/desktop-window.ts +71 -2
  303. package/src/types/financials.ts +19 -3
  304. package/src/types/headless.ts +21 -0
  305. package/src/types/plugin.ts +6 -0
  306. package/src/ui/index.tsx +14 -13
  307. package/src/ui/same-props.ts +58 -0
  308. package/src/utils/cli-output.ts +33 -4
  309. package/src/utils/double-escape-close.ts +38 -16
  310. package/src/utils/format.ts +30 -5
  311. package/src/utils/futures-generic.ts +12 -0
  312. package/src/utils/http-proxy-upstream.ts +6 -2
  313. package/src/utils/plugin-proxy-hosts.json +0 -4
  314. package/src/utils/plugin-proxy-hosts.ts +22 -0
  315. package/src/utils/price-earnings.ts +18 -0
  316. package/src/utils/sec-filings.ts +7 -1
  317. package/patches/electrobun@1.18.1.patch +0 -633
  318. package/src/api-client/types.ts +0 -2441
package/LICENSE CHANGED
@@ -12,10 +12,6 @@ furnished to do so, subject to the following conditions:
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
- When using this software in a product or service, attribution to the Gloomberb
16
- project (https://github.com/gloom-sh/gloomberb) is appreciated and encouraged,
17
- though not legally required beyond preserving the above copyright notice.
18
-
19
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gloomberb",
3
- "version": "0.19.5",
3
+ "version": "0.20.0",
4
4
  "packageManager": "bun@1.3.14",
5
5
  "description": "Market research and portfolio tracker for the terminal",
6
6
  "module": "src/public/index.ts",
@@ -61,12 +61,14 @@
61
61
  "cloudflare:dry-run": "bun run web:build && wrangler deploy --dry-run --env production",
62
62
  "desktop:dev": "bun run scripts/electrobun-dev.ts",
63
63
  "desktop:build": "electrobun build",
64
- "desktop:release": "electrobun build --env=stable",
65
- "desktop:release:windows": "electrobun build --env=stable --targets=win-x64",
64
+ "desktop:release": "electrobun build --env=stable && bun scripts/name-desktop-artifacts.ts artifacts stable",
65
+ "desktop:release:windows": "electrobun build --env=stable && bun scripts/name-desktop-artifacts.ts artifacts stable",
66
+ "desktop:sync": "electrobun sync && bun run scripts/patch-electrobun-devkit.ts",
66
67
  "docs:snapshot": "bun run scripts/update-docs-snapshot.ts",
67
68
  "plugins:manifest": "bun run scripts/generate-plugin-manifest.ts",
68
69
  "plugins:manifest:check": "bun run scripts/generate-plugin-manifest.ts --check",
69
70
  "plugins:registry:check": "bun run scripts/check-registry-plugins.ts",
71
+ "plugins:registry:packaged": "bun run scripts/check-packaged-registry-plugins.ts",
70
72
  "web:proxy-hosts": "bun run scripts/generate-web-proxy-hosts.ts",
71
73
  "map:data": "bun run scripts/generate-world-map-data.ts",
72
74
  "glyphs:terminal": "bun run scripts/generate-terminal-glyphs.ts",
@@ -119,7 +121,7 @@
119
121
  "@types/bun": "^1.3.14",
120
122
  "@types/react-dom": "^19.2.3",
121
123
  "@types/three": "0.165.0",
122
- "electrobun": "^1.18.1",
124
+ "electrobun": "2.0.5",
123
125
  "gloom-polls": "github:gloom-sh/gloom-polls",
124
126
  "gloom-prediction-markets": "github:gloom-sh/gloom-prediction-markets",
125
127
  "happy-dom": "^20.11.1",
@@ -143,7 +145,6 @@
143
145
  },
144
146
  "patchedDependencies": {
145
147
  "@opentui/core@0.3.2": "patches/@opentui%2Fcore@0.3.2.patch",
146
- "electrobun@1.18.1": "patches/electrobun@1.18.1.patch",
147
148
  "react-reconciler@0.33.0": "patches/react-reconciler@0.33.0.patch"
148
149
  }
149
150
  }
@@ -1,5 +1,5 @@
1
1
  diff --git a/index-218h9p3f.js b/index-218h9p3f.js
2
- index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac6c440d3c 100644
2
+ index b9445d2cca9477dfe06026da451b6d19268fcbdd..1f5795ab76800a64fdb0acf4a1ed018629f3ca17 100644
3
3
  --- a/index-218h9p3f.js
4
4
  +++ b/index-218h9p3f.js
5
5
  @@ -6487,17 +6487,27 @@ class MouseParser {
@@ -166,8 +166,55 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
166
166
  this.events.push({
167
167
  type: "mouse",
168
168
  raw: decodeLatin1(rawBytes),
169
- @@ -17995,6 +18029,8 @@ function isGapType(value) {
169
+ @@ -15733,6 +15767,9 @@ var yogaConfig = src_default.Config.create();
170
+ yogaConfig.setUseWebDefaults(false);
171
+ yogaConfig.setPointScaleFactor(1);
170
172
 
173
+ +/** Counts layout reads that found a node's layout changed (Renderable.updateFromLayout). */
174
+ +var layoutClock = 0;
175
+ +
176
+ class Renderable extends BaseRenderable {
177
+ static renderablesByNumber = new Map;
178
+ _isDestroyed = false;
179
+ @@ -15778,6 +15815,9 @@ class Renderable extends BaseRenderable {
180
+ childrenSortedByPrimaryAxis = [];
181
+ _shouldUpdateBefore = new Set;
182
+ _lastLayoutFrame = -1;
183
+ + _seenLayout = null;
184
+ + _layoutCheckedAt = -1;
185
+ + _layoutChangedAt = -1;
186
+ onLifecyclePass = null;
187
+ renderBefore;
188
+ renderAfter;
189
+ @@ -16452,7 +16492,21 @@ class Renderable extends BaseRenderable {
190
+ if (this._lastLayoutFrame === frameId)
191
+ return;
192
+ this._lastLayoutFrame = frameId;
193
+ - const layout = this.yogaNode.getComputedLayout();
194
+ + // Yoga flags each node whose layout it computed, and computes a node's
195
+ + // layout only while computing its parent's. So once its parent was read
196
+ + // in this frame, a node asks for its flag only if the parent was found
197
+ + // flagged since it last asked, and reads its layout only when its own
198
+ + // flag is set; any other node kept its box.
199
+ + const parent = this.parent;
200
+ + if (this._seenLayout === null || !parent || parent._lastLayoutFrame !== frameId || parent._layoutChangedAt > this._layoutCheckedAt) {
201
+ + this._layoutCheckedAt = layoutClock;
202
+ + if (this._seenLayout === null || this.yogaNode.hasNewLayout()) {
203
+ + this._seenLayout = this.yogaNode.getComputedLayout();
204
+ + this.yogaNode.markLayoutSeen();
205
+ + this._layoutChangedAt = this._layoutCheckedAt = ++layoutClock;
206
+ + }
207
+ + }
208
+ + const layout = this._seenLayout;
209
+ const oldX = this._x;
210
+ const oldY = this._y;
211
+ const oldWidth = this._widthValue;
212
+ @@ -17993,8 +18047,12 @@ function isGapType(value) {
213
+ return isValidPercentage(value);
214
+ }
215
+
216
+ +var hoveredFillBoxes = new Set;
217
+ +
171
218
  class BoxRenderable extends Renderable {
172
219
  _backgroundColor;
173
220
  + _hoverBackgroundColor;
@@ -175,7 +222,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
175
222
  _border;
176
223
  _borderStyle;
177
224
  _borderColor;
178
- @@ -18023,6 +18059,7 @@ class BoxRenderable extends Renderable {
225
+ @@ -18023,6 +18081,7 @@ class BoxRenderable extends Renderable {
179
226
  this._focusable = true;
180
227
  }
181
228
  this._backgroundColor = parseColor(options.backgroundColor || this._defaultOptions.backgroundColor);
@@ -183,7 +230,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
183
230
  this._border = options.border ?? this._defaultOptions.border;
184
231
  if (!options.border && (options.borderStyle || options.borderColor || options.focusedBorderColor || options.customBorderChars)) {
185
232
  this._border = true;
186
- @@ -18064,11 +18101,26 @@ class BoxRenderable extends Renderable {
233
+ @@ -18064,11 +18123,26 @@ class BoxRenderable extends Renderable {
187
234
  }
188
235
  set backgroundColor(value) {
189
236
  const newColor = parseColor(value ?? this._defaultOptions.backgroundColor);
@@ -211,27 +258,41 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
211
258
  get border() {
212
259
  return this._border;
213
260
  }
214
- @@ -18152,9 +18204,39 @@ class BoxRenderable extends Renderable {
261
+ @@ -18152,9 +18226,53 @@ class BoxRenderable extends Renderable {
215
262
  this.requestRender();
216
263
  }
217
264
  }
218
265
  + onMouseEvent(event) {
219
266
  + if (!this._hoverBackgroundColor) {
220
267
  + if (this._isHovered) {
221
- + this._isHovered = false;
268
+ + this.setHovered(false);
222
269
  + this.requestRender();
223
270
  + }
224
271
  + return;
225
272
  + }
226
273
  + if (event.type === "over" && !this._isHovered) {
227
- + this._isHovered = true;
274
+ + this.setHovered(true);
228
275
  + this.requestRender();
229
276
  + } else if (event.type === "out" && this._isHovered) {
230
- + this._isHovered = false;
277
+ + this.setHovered(false);
231
278
  + this.requestRender();
232
279
  + }
233
280
  + }
281
+ + setHovered(hovered) {
282
+ + this._isHovered = hovered;
283
+ + if (hovered)
284
+ + hoveredFillBoxes.add(this);
285
+ + else
286
+ + hoveredFillBoxes.delete(this);
287
+ + }
288
+ + destroySelf() {
289
+ + hoveredFillBoxes.delete(this);
290
+ + super.destroySelf();
291
+ + }
234
292
  + getActiveHoverBackgroundColor() {
293
+ + // Every box asks on every frame; with none hovered there is nothing to find.
294
+ + if (hoveredFillBoxes.size === 0)
295
+ + return undefined;
235
296
  + if (this._isHovered && this._hoverBackgroundColor) {
236
297
  + return this._hoverBackgroundColor;
237
298
  + }
@@ -252,7 +313,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
252
313
  if (!hasBorder && !hasVisibleFill) {
253
314
  return;
254
315
  }
255
- @@ -18171,7 +18253,7 @@ class BoxRenderable extends Renderable {
316
+ @@ -18171,7 +18289,7 @@ class BoxRenderable extends Renderable {
256
317
  customBorderChars: this._customBorderChars,
257
318
  border: this._border,
258
319
  borderColor: currentBorderColor,
@@ -261,7 +322,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
261
322
  shouldFill: this.shouldFill,
262
323
  title: this._title,
263
324
  titleAlignment: this._titleAlignment,
264
- @@ -22288,6 +22370,8 @@ class MouseEvent {
325
+ @@ -22288,6 +22406,8 @@ class MouseEvent {
265
326
  button;
266
327
  x;
267
328
  y;
@@ -270,7 +331,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
270
331
  source;
271
332
  modifiers;
272
333
  scroll;
273
- @@ -22307,6 +22391,8 @@ class MouseEvent {
334
+ @@ -22307,6 +22427,8 @@ class MouseEvent {
274
335
  this.button = attributes.button;
275
336
  this.x = attributes.x;
276
337
  this.y = attributes.y;
@@ -279,7 +340,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
279
340
  this.modifiers = attributes.modifiers;
280
341
  this.scroll = attributes.scroll;
281
342
  this.source = attributes.source;
282
- @@ -22457,6 +22543,10 @@ class CliRenderer extends EventEmitter9 {
343
+ @@ -22457,6 +22579,10 @@ class CliRenderer extends EventEmitter9 {
283
344
  resizeDebounceDelay = 100;
284
345
  enableMouseMovement = false;
285
346
  _useMouse = true;
@@ -290,7 +351,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
290
351
  autoFocus = true;
291
352
  _screenMode = "alternate-screen";
292
353
  _footerHeight = DEFAULT_FOOTER_HEIGHT;
293
- @@ -22491,7 +22581,7 @@ class CliRenderer extends EventEmitter9 {
354
+ @@ -22491,7 +22617,7 @@ class CliRenderer extends EventEmitter9 {
294
355
  this.handleResize(width, height);
295
356
  }).bind(this);
296
357
  _capabilities = null;
@@ -299,7 +360,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
299
360
  _hasPointer = false;
300
361
  _lastPointerModifiers = {
301
362
  shift: false,
302
- @@ -22738,7 +22828,13 @@ Captured external output:
363
+ @@ -22738,7 +22864,13 @@ Captured external output:
303
364
  privateCapabilityRepliesActive: false,
304
365
  pixelResolutionQueryActive: false,
305
366
  explicitWidthCprActive: false,
@@ -314,7 +375,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
314
375
  },
315
376
  clock: this.clock
316
377
  });
317
- @@ -24021,12 +24117,14 @@ Captured external output:
378
+ @@ -24021,12 +24153,14 @@ Captured external output:
318
379
  enableMouse() {
319
380
  this._useMouse = true;
320
381
  this.lib.enableMouse(this.rendererPtr, this.enableMouseMovement);
@@ -329,7 +390,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
329
390
  }
330
391
  enableKittyKeyboard(flags = 3) {
331
392
  this.lib.enableKittyKeyboard(this.rendererPtr, flags);
332
- @@ -24036,6 +24134,52 @@ Captured external output:
393
+ @@ -24036,6 +24170,52 @@ Captured external output:
333
394
  this.lib.disableKittyKeyboard(this.rendererPtr);
334
395
  this.updateStdinParserProtocolContext({ kittyKeyboardEnabled: false }, true);
335
396
  }
@@ -382,7 +443,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
382
443
  set useThread(useThread) {
383
444
  this._useThread = useThread;
384
445
  this.lib.setUseThread(this.rendererPtr, useThread);
385
- @@ -24141,6 +24285,7 @@ Captured external output:
446
+ @@ -24141,6 +24321,7 @@ Captured external output:
386
447
  }
387
448
  this.lib.processCapabilityResponse(this.rendererPtr, sequence);
388
449
  this._capabilities = this.lib.getTerminalCapabilities(this.rendererPtr);
@@ -390,7 +451,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
390
451
  if (this._capabilities?.terminal?.from_xtversion) {
391
452
  this.resolveXtVersionWaiters();
392
453
  }
393
- @@ -24170,6 +24315,7 @@ Captured external output:
454
+ @@ -24170,6 +24351,7 @@ Captured external output:
394
455
  if (sequence === "\x1B[I") {
395
456
  if (this.shouldRestoreModesOnNextFocus) {
396
457
  this.lib.restoreTerminalModes(this.rendererPtr);
@@ -398,7 +459,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
398
459
  this.shouldRestoreModesOnNextFocus = false;
399
460
  }
400
461
  if (this._terminalFocusState !== true) {
401
- @@ -24218,7 +24364,7 @@ Captured external output:
462
+ @@ -24218,7 +24400,7 @@ Captured external output:
402
463
  this._keyHandler.processParsedKey(event.key);
403
464
  return;
404
465
  case "mouse":
@@ -407,7 +468,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
407
468
  return;
408
469
  }
409
470
  this.dispatchSequenceHandlers(event.raw);
410
- @@ -24264,6 +24410,7 @@ Captured external output:
471
+ @@ -24264,6 +24446,7 @@ Captured external output:
411
472
  }
412
473
  this.waitingForPixelResolution = false;
413
474
  this.updateStdinParserProtocolContext({ pixelResolutionQueryActive: false }, true);
@@ -415,7 +476,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
415
476
  return true;
416
477
  }
417
478
  return false;
418
- @@ -24292,15 +24439,62 @@ Captured external output:
479
+ @@ -24292,15 +24475,62 @@ Captured external output:
419
480
  }
420
481
  return event;
421
482
  }
@@ -478,7 +539,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
478
539
  this._hasPointer = true;
479
540
  this._lastPointerModifiers = mouseEvent.modifiers;
480
541
  if (this._console.visible) {
481
- @@ -24437,6 +24631,8 @@ Captured external output:
542
+ @@ -24437,6 +24667,8 @@ Captured external output:
482
543
  return;
483
544
  }
484
545
  const baseEvent = {
@@ -487,7 +548,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
487
548
  type: "move",
488
549
  button: 0,
489
550
  x: this._latestPointer.x,
490
- @@ -24527,6 +24723,7 @@ Captured external output:
551
+ @@ -24527,6 +24759,7 @@ Captured external output:
491
552
  const pendingSplitFooterTransition = this.pendingSplitFooterTransition;
492
553
  const previousGeometry = calculateRenderGeometry(this._screenMode, this._terminalWidth, this._terminalHeight, this._footerHeight);
493
554
  const prevWidth = this._terminalWidth;
@@ -495,7 +556,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
495
556
  const previousTerminalHeight = this._terminalHeight;
496
557
  const visiblePreviousSplitHeight = pendingSplitFooterTransition?.sourceHeight ?? previousGeometry.effectiveFooterHeight;
497
558
  this._terminalWidth = width;
498
- @@ -24832,6 +25029,11 @@ Captured external output:
559
+ @@ -24832,6 +25065,11 @@ Captured external output:
499
560
  this.clock.clearTimeout(this.resizeTimeoutId);
500
561
  this.resizeTimeoutId = null;
501
562
  }
@@ -507,7 +568,7 @@ index b9445d2cca9477dfe06026da451b6d19268fcbdd..8734376ebd706056791f8b59ad0992ac
507
568
  if (this.capabilityTimeoutId !== null) {
508
569
  this.clock.clearTimeout(this.capabilityTimeoutId);
509
570
  this.capabilityTimeoutId = null;
510
- @@ -24847,6 +25049,7 @@ Captured external output:
571
+ @@ -24847,6 +25085,7 @@ Captured external output:
511
572
  }
512
573
  this.themeModeState.cancelRefresh();
513
574
  this._isRunning = false;
@@ -0,0 +1,148 @@
1
+ diff --git a/api/preload/encryption.ts b/api/preload/encryption.ts
2
+ index 8cf3ab6..0f70f21 100644
3
+ --- a/api/preload/encryption.ts
4
+ +++ b/api/preload/encryption.ts
5
+ @@ -3,27 +3,30 @@
6
+
7
+ import "./globals.d.ts";
8
+
9
+ +// Native base64 where the engine has it (WebKit since Safari 18.2, Chromium
10
+ +// since 140); the fallbacks copy bytes in a loop and join strings in chunks.
11
+ +// Splitting the decoded string into an array of characters, or growing a
12
+ +// string one byte at a time, costs tens of milliseconds per megabyte on the
13
+ +// main thread, and every message from the host is decrypted here.
14
+ function base64ToUint8Array(base64: string): Uint8Array {
15
+ + const native = Uint8Array as unknown as { fromBase64?: (value: string) => Uint8Array };
16
+ + if (typeof native.fromBase64 === "function") return native.fromBase64(base64);
17
+ const binary = atob(base64);
18
+ - if (window.__electrobunPlatform === "linux") {
19
+ - // WebKitGTK becomes allocation-bound on large RPC bursts if every byte
20
+ - // is first expanded into a split/map array.
21
+ - const bytes = new Uint8Array(binary.length);
22
+ - for (let i = 0; i < binary.length; i++) {
23
+ - bytes[i] = binary.charCodeAt(i);
24
+ - }
25
+ - return bytes;
26
+ + const bytes = new Uint8Array(binary.length);
27
+ + for (let i = 0; i < binary.length; i++) {
28
+ + bytes[i] = binary.charCodeAt(i);
29
+ }
30
+ -
31
+ - return new Uint8Array(binary.split("").map((char) => char.charCodeAt(0)));
32
+ + return bytes;
33
+ }
34
+
35
+ function uint8ArrayToBase64(uint8Array: Uint8Array): string {
36
+ - let binary = "";
37
+ - for (let i = 0; i < uint8Array.length; i++) {
38
+ - binary += String.fromCharCode(uint8Array[i]!);
39
+ + const native = (uint8Array as unknown as { toBase64?: () => string }).toBase64;
40
+ + if (typeof native === "function") return native.call(uint8Array);
41
+ + const parts: string[] = [];
42
+ + for (let i = 0; i < uint8Array.length; i += 32768) {
43
+ + parts.push(String.fromCharCode.apply(null, uint8Array.subarray(i, i + 32768) as unknown as number[]));
44
+ }
45
+ - return btoa(binary);
46
+ + return btoa(parts.join(""));
47
+ }
48
+
49
+ function toArrayBuffer(bytes: Uint8Array): ArrayBuffer {
50
+ diff --git a/api/sdks/main/core/Updater.ts b/api/sdks/main/core/Updater.ts
51
+ index 4c47ed9..3221b5d 100644
52
+ --- a/api/sdks/main/core/Updater.ts
53
+ +++ b/api/sdks/main/core/Updater.ts
54
+ @@ -323,6 +323,39 @@ let updateInfo: UpdateInfo = {
55
+ error: "",
56
+ };
57
+ let checkedManifest: UpdateManifestV1 | undefined;
58
+ +
59
+ +// Where updates are fetched from when it is not the channel and baseUrl that
60
+ +// version.json names: a release whose files carry another prefix (`nightly-*`)
61
+ +// under its own URL. Only the URLs read it. The manifest is still checked
62
+ +// against the installed build's identity and channel, and the app data
63
+ +// folder and the "dev" check keep that channel too.
64
+ +let updateSource: { channel: string; baseUrl: string } | null = null;
65
+ +
66
+ +function updateSourceBaseUrl(info: LocalUpdateInfo): string {
67
+ + return updateSource?.baseUrl ?? info.baseUrl;
68
+ +}
69
+ +
70
+ +/** The prefix of the source's files: `<channel>-<os>-<arch>`. */
71
+ +function updateSourcePrefix(
72
+ + channel: BuildEnvironment,
73
+ + os: SupportedOS,
74
+ + arch: SupportedArch,
75
+ +): string {
76
+ + if (!updateSource) return getPlatformPrefix(channel, os, arch);
77
+ + return `${updateSource.channel}-${os}-${arch}`;
78
+ +}
79
+ +
80
+ +/**
81
+ + * The manifest names its archive under the channel it was built for; a
82
+ + * source that carries the files under its own prefix has it under that one.
83
+ + */
84
+ +function updateSourceArtifactFile(manifest: UpdateManifestV1): string {
85
+ + const built = `${manifest.channel}-`;
86
+ + if (!updateSource || !manifest.artifact.file.startsWith(built)) {
87
+ + return manifest.artifact.file;
88
+ + }
89
+ + return `${updateSource.channel}-${manifest.artifact.file.slice(built.length)}`;
90
+ +}
91
+ let checkInFlight: Promise<UpdateInfo> | undefined;
92
+ let downloadInFlight: Promise<void> | undefined;
93
+ let applyInFlight: Promise<void> | undefined;
94
+ @@ -1773,8 +1806,8 @@ async function checkForUpdateOperation(): Promise<UpdateInfo> {
95
+ return updateInfo;
96
+ }
97
+
98
+ - const platformPrefix = getPlatformPrefix(info.channel, currentOS, currentArch);
99
+ - const updateInfoUrl = `${info.baseUrl.replace(/\/+$/, "")}/${platformPrefix}-update.json?${randomBytes(8).toString("hex")}`;
100
+ + const platformPrefix = updateSourcePrefix(info.channel, currentOS, currentArch);
101
+ + const updateInfoUrl = `${updateSourceBaseUrl(info).replace(/\/+$/, "")}/${platformPrefix}-update.json?${randomBytes(8).toString("hex")}`;
102
+ try {
103
+ const response = await fetch(updateInfoUrl, {
104
+ signal: AbortSignal.timeout(30_000),
105
+ @@ -1938,7 +1971,7 @@ export async function preparePatchChainForUpdate(
106
+ const bspatchPath =
107
+ dependencies.bspatchPath ??
108
+ join(dirname(process.execPath), currentOS === "win" ? "bspatch.exe" : "bspatch");
109
+ - const platformPrefix = getPlatformPrefix(
110
+ + const platformPrefix = updateSourcePrefix(
111
+ channel,
112
+ manifest.platform,
113
+ manifest.arch,
114
+ @@ -1952,7 +1985,7 @@ export async function preparePatchChainForUpdate(
115
+ try {
116
+ while (currentHash !== manifest.hash) {
117
+ const patchNumber = patchesApplied + 1;
118
+ - patchUrl = getPatchFileUrl(info.baseUrl, platformPrefix, currentHash);
119
+ + patchUrl = getPatchFileUrl(updateSourceBaseUrl(info), platformPrefix, currentHash);
120
+ const pathPrefix = join(
121
+ extractionFolder,
122
+ `.${transactionId}.${patchNumber}.${currentHash}`,
123
+ @@ -2136,8 +2169,8 @@ async function downloadUpdateOperation(): Promise<void> {
124
+ join(extractionFolder, `${manifest.hash}.tar`),
125
+ );
126
+ const artifactUrl = buildUpdateArtifactUrl(
127
+ - info.baseUrl,
128
+ - manifest.artifact.file,
129
+ + updateSourceBaseUrl(info),
130
+ + updateSourceArtifactFile(manifest),
131
+ );
132
+ const artifactRequestUrl = addUpdateArtifactCacheBuster(
133
+ artifactUrl,
134
+ @@ -2388,6 +2421,14 @@ const Updater = {
135
+ onStatusChangeCallback = callback;
136
+ if (callback) scheduleNativeUpdateResultReconciliation();
137
+ },
138
+ + // Checks and downloads from `source` (a file prefix and the URL its files
139
+ + // sit under) until it is set again; null goes back to version.json.
140
+ + setUpdateSource: (source: { channel: string; baseUrl: string } | null): void => {
141
+ + if (source && !/^[a-z0-9][a-z0-9-]*$/.test(source.channel)) {
142
+ + throw new Error(`Invalid update source channel: ${source.channel}`);
143
+ + }
144
+ + updateSource = source;
145
+ + },
146
+ checkForUpdate,
147
+ downloadUpdate,
148
+ applyUpdate,
@@ -0,0 +1,59 @@
1
+ /**
2
+ * `/cloud/bond-trades`: US corporate bond prints Gloom Cloud keeps, read by
3
+ * CUSIP or by company. A bond read here that its store did not keep yet is
4
+ * kept from then on, with the history the source still publishes for it;
5
+ * `keptSince` says from when prints are held, and nothing before it is.
6
+ * Gloom Pro.
7
+ */
8
+
9
+ export interface StoredBondPrint {
10
+ date: string;
11
+ /** New York time, as published. */
12
+ time: string | null;
13
+ status: "trade" | "cancel" | "correction";
14
+ /** A later cancel names this print. */
15
+ cancelled: boolean;
16
+ price: number | null;
17
+ yield: number | null;
18
+ /** Par amount; with `quantityCapped`, published only as at least this much. */
19
+ quantity: number | null;
20
+ quantityCapped: boolean;
21
+ /** Whether the reporting dealer bought or sold. */
22
+ side: "buy" | "sell" | null;
23
+ }
24
+
25
+ /** A day's last trade standing: the history the price chart draws. A zero price is null. */
26
+ export interface StoredBondDay {
27
+ date: string;
28
+ prints: number;
29
+ price: number | null;
30
+ yield: number | null;
31
+ }
32
+
33
+ export interface StoredBondPayload {
34
+ cusip: string;
35
+ issuerName: string;
36
+ coupon: number | null;
37
+ maturity: string | null;
38
+ issuer: { symbol: string; name: string };
39
+ from: string;
40
+ to: string;
41
+ /** Newest first. */
42
+ trades: StoredBondPrint[];
43
+ truncated: boolean;
44
+ /** The first date prints are held from; null before any day was read. */
45
+ keptSince: string | null;
46
+ /** The source's own history of the bond is still to be read: prints are held from the day it was first looked up until then. */
47
+ backfillPending: boolean;
48
+ /** Oldest first. */
49
+ days: StoredBondDay[];
50
+ }
51
+
52
+ export interface StoredIssuerBondsPayload {
53
+ symbol: string;
54
+ name: string;
55
+ keptSince: string | null;
56
+ backfillPending: boolean;
57
+ }
58
+
59
+ export const BOND_HISTORY_MAX_DAYS = 1100;
@@ -17,6 +17,7 @@ import type { EarningsEvent } from "../types/data-provider";
17
17
  import type { MarketDividendsPayload, MarketHeatmapResult, MarketHeatmapUniverseId, MarketMoversPayload } from "./market-discovery";
18
18
  import type { BankFiguresPayload } from "./bank-figures";
19
19
  import type { DebtMaturitiesPayload } from "./debt-maturities";
20
+ import type { StoredBondPayload, StoredIssuerBondsPayload } from "./bond-trades";
20
21
  import type { RevenueBreakdownPayload, RevenueBreakdownView } from "./revenue-breakdown";
21
22
  import type { MnaDealPayload, MnaDealsParams, MnaDealsPayload } from "./mna";
22
23
  import {
@@ -1118,6 +1119,26 @@ export class CloudDataApi {
1118
1119
  return this.request<DebtMaturitiesPayload>(cloudDebtMaturitiesPath(symbol, listing), { signal: AbortSignal.timeout(45_000) });
1119
1120
  }
1120
1121
 
1122
+ /** One bond's kept prints and daily closes over `from` to `to` (at most 1,100 days); reading it keeps the bond from now on. */
1123
+ async getCloudStoredBond(
1124
+ cusip: string,
1125
+ params: { from: string; to: string; limit?: number },
1126
+ options: { signal?: AbortSignal } = {},
1127
+ ): Promise<StoredBondPayload> {
1128
+ const query = new URLSearchParams({ from: params.from, to: params.to, ...(params.limit ? { limit: String(params.limit) } : {}) });
1129
+ return this.request<StoredBondPayload>(`/cloud/bond-trades/bond/${encodeURIComponent(cusip)}?${query}`, {
1130
+ signal: options.signal ?? AbortSignal.timeout(20_000),
1131
+ });
1132
+ }
1133
+
1134
+ /** A company's bonds as kept; reading it keeps them from now on. Only the first page of bonds and prints is asked. */
1135
+ async getCloudStoredIssuerBonds(symbol: string, options: { signal?: AbortSignal } = {}): Promise<StoredIssuerBondsPayload> {
1136
+ const query = new URLSearchParams({ symbol, limit: "1", bondsLimit: "1" });
1137
+ return this.request<StoredIssuerBondsPayload>(`/cloud/bond-trades/issuer?${query}`, {
1138
+ signal: options.signal ?? AbortSignal.timeout(20_000),
1139
+ });
1140
+ }
1141
+
1121
1142
  async getCloudBankFigures(symbol: string): Promise<BankFiguresPayload> {
1122
1143
  return this.request<BankFiguresPayload>(cloudBankFiguresPath(symbol), { signal: AbortSignal.timeout(30_000) });
1123
1144
  }
@@ -32,6 +32,27 @@ export const QUALITY_FIELDS = [
32
32
  "revenueCagr3YPercent", "revenueCagr5YPercent", "epsCagr3YPercent", "epsCagr5YPercent",
33
33
  "forwardRevenueGrowthPercent", "forwardEpsGrowthPercent",
34
34
  ] as const;
35
+ /**
36
+ * Classic scores: Piotroski F, Altman Z, the Graham number and Lynch fair value with their upside, Greenblatt's
37
+ * earnings yield, return on capital and Magic Formula rank, the 1Y total return and its RS rating, years of profit,
38
+ * revenue growth and dividend growth, and S&P 500 and Dow membership; listed only when asked (`include=scores`), and
39
+ * omitted by a server from before them.
40
+ */
41
+ export const SCORE_FIELDS = [
42
+ "piotroskiFScore", "altmanZScore", "grahamNumber", "grahamUpsidePercent", "lynchFairValue", "lynchUpsidePercent",
43
+ "earningsYieldPercent", "returnOnCapitalPercent", "magicFormulaRank", "totalReturn1YPercent", "rsRating",
44
+ "profitableYears", "revenueGrowthYears", "dividendGrowthYears", "sp500Member", "dowMember",
45
+ ] as const;
46
+ /** Index membership, 1 for a member and 0 for a US listing that is not one. */
47
+ export const MEMBERSHIP_FIELDS = ["sp500Member", "dowMember"] as const;
48
+ /** The factor grades, each ranked within the company's sector: 1 is F and 13 is A+. */
49
+ export const LETTER_GRADE_FIELDS = ["valueGrade", "growthGrade", "profitabilityGrade", "momentumGrade", "revisionsGrade"] as const;
50
+ /**
51
+ * The factor grades, their 1-5 composite, and the next fiscal year's EPS and the current year's revenue revisions the
52
+ * Revisions grade reads beside EPS revision 30D; listed only when asked (`include=grades`), and omitted by a server
53
+ * from before them.
54
+ */
55
+ export const GRADE_FIELDS = [...LETTER_GRADE_FIELDS, "gradeComposite", "nextYearEpsRevision30dPercent", "revenueRevision30dPercent"] as const;
35
56
  export const NUMERIC_FIELDS = [
36
57
  ...KPI_FIELDS,
37
58
  "price",
@@ -83,6 +104,8 @@ export const NUMERIC_FIELDS = [
83
104
  ...OPTION_VOLATILITY_FIELDS,
84
105
  ...OWNERSHIP_FIELDS,
85
106
  ...QUALITY_FIELDS,
107
+ ...SCORE_FIELDS,
108
+ ...GRADE_FIELDS,
86
109
  "hiringOpenRoles", "hiringNetAddsWeek", "hiringRemotePercent", "hiringZScore",
87
110
  "appAttentionScore", "appRankVelocity7d", "appRatingDrift7d", "appRatingCountGrowth7d",
88
111
  ] as const;
@@ -992,6 +992,8 @@ class GloomApiClient {
992
992
  optionsPositioning = this.data.optionsPositioning.bind(this.data);
993
993
  getCloudBankFigures = this.data.getCloudBankFigures.bind(this.data);
994
994
  getCloudDebtMaturities = this.data.getCloudDebtMaturities.bind(this.data);
995
+ getCloudStoredBond = this.data.getCloudStoredBond.bind(this.data);
996
+ getCloudStoredIssuerBonds = this.data.getCloudStoredIssuerBonds.bind(this.data);
995
997
  getCloudRevenueBreakdown = this.data.getCloudRevenueBreakdown.bind(this.data);
996
998
  getCloudMnaDeals = this.data.getCloudMnaDeals.bind(this.data);
997
999
  getCloudMnaDeal = this.data.getCloudMnaDeal.bind(this.data);