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
@@ -0,0 +1,86 @@
1
+ export interface AccountProfile {
2
+ id: string;
3
+ email: string;
4
+ emailVerified: boolean;
5
+ plan: "free" | "pro";
6
+ /** ISO timestamp when the free Pro trial ends; null once it has lapsed or was never started. */
7
+ trialEndsAt?: string | null;
8
+ /** Plan the server actually entitles right now, i.e. `plan` upgraded to "pro" while a trial is running. */
9
+ effectivePlan?: "free" | "pro";
10
+ username: string | null;
11
+ name: string;
12
+ company: string | null;
13
+ title: string | null;
14
+ bio: string | null;
15
+ profilePublic: boolean;
16
+ publicEmail: string | null;
17
+ xAccount: string | null;
18
+ sharedPortfolioId: string | null;
19
+ acceptUnknownDms: boolean;
20
+ chatEmailNotificationsEnabled: boolean;
21
+ portfolioAnalytics?: PublicPortfolioAnalytics | null;
22
+ /** Chat shows your local time on your card. A server that predates the setting leaves it out. */
23
+ showLocalTime?: boolean;
24
+ /** The desks chat shows beside your name; empty shows none. */
25
+ chatDesks?: string[];
26
+ /** Your answer to "What do you trade most?" at the first run: private, it pre-fills `chatDesks`. */
27
+ onboardingDesks?: string[];
28
+ syncEnabled: boolean;
29
+ weeklyRoundupEnabled: boolean;
30
+ positionAlertsEnabled: boolean;
31
+ lastSyncAt: string | null;
32
+ lastRoundupEmailAt: string | null;
33
+ updatedAt: string | null;
34
+ }
35
+
36
+ export interface PublicPortfolioAnalytics {
37
+ oneYearReturn?: number | null;
38
+ spyBeta?: number | null;
39
+ /** "account": the broker's own returns. "holdings": estimated from today's holdings. */
40
+ basis?: "account" | "holdings" | null;
41
+ }
42
+
43
+ /**
44
+ * What an MCP key reaches beyond market data: `data` is market and filing
45
+ * tools only, `read` adds notes, teams and collections, `write` lets the agent
46
+ * save notes and change collection items.
47
+ */
48
+ export type McpKeyScope = "data" | "read" | "write";
49
+
50
+ /**
51
+ * A key just created with `POST /account/mcp/keys`. `token` is the secret,
52
+ * which the server never returns again: show it once, never store it.
53
+ */
54
+ export interface CreatedMcpKey {
55
+ token: string;
56
+ apiKey: { id: string; name: string; scope: McpKeyScope };
57
+ }
58
+
59
+ /** The account's private calendar feed link (`/account/calendar-feed`). */
60
+ export interface CalendarFeed {
61
+ url: string;
62
+ createdAt: string;
63
+ /** The last time a calendar app read it, to the hour. */
64
+ lastFetchedAt: string | null;
65
+ }
66
+
67
+ export type AccountProfileUpdate = Partial<{
68
+ username: string;
69
+ name: string;
70
+ company: string | null;
71
+ title: string | null;
72
+ bio: string | null;
73
+ profilePublic: boolean;
74
+ publicEmail: string | null;
75
+ xAccount: string | null;
76
+ sharedPortfolioId: string | null;
77
+ acceptUnknownDms: boolean;
78
+ chatEmailNotificationsEnabled: boolean;
79
+ portfolioAnalytics: PublicPortfolioAnalytics | null;
80
+ syncEnabled: boolean;
81
+ weeklyRoundupEnabled: boolean;
82
+ positionAlertsEnabled: boolean;
83
+ showLocalTime: boolean;
84
+ /** Null or empty shows no desks. */
85
+ chatDesks: string[] | null;
86
+ }>;
@@ -0,0 +1,32 @@
1
+ /** One command-bar prefix described for `/assist/command`. */
2
+ export interface AssistCommandDescriptor {
3
+ prefix: string;
4
+ name: string;
5
+ description?: string;
6
+ arg?: {
7
+ placeholder?: string;
8
+ kind: "text" | "ticker" | "ticker-list";
9
+ /** The command also runs with no argument at all. */
10
+ optional?: boolean;
11
+ /** Named values the argument accepts; a command may take others too (COT takes any CFTC code). */
12
+ options?: { value: string; label: string }[];
13
+ };
14
+ }
15
+
16
+ /** A command-bar line the assistant believes answers the query. */
17
+ export interface AssistCommandCandidate {
18
+ /** Exact command-bar text to run, e.g. "G NVDA AMD". */
19
+ input: string;
20
+ title: string;
21
+ prefix: string;
22
+ confidence: number;
23
+ }
24
+
25
+ export interface AssistCommandResponse {
26
+ candidates: AssistCommandCandidate[];
27
+ /**
28
+ * The server's record of this ask, for the command-search report to point
29
+ * at. Only present when the ask was sent with `log: true`.
30
+ */
31
+ searchId?: string;
32
+ }
@@ -0,0 +1,63 @@
1
+ import type { PublicPortfolioAnalytics } from "./account";
2
+
3
+ export interface AuthUser {
4
+ id: string;
5
+ name: string;
6
+ email: string;
7
+ username: string | null;
8
+ emailVerified: boolean;
9
+ image: string | null;
10
+ plan?: "free" | "pro";
11
+ /** ISO timestamp when the free Pro trial ends; null once it has lapsed or was never started. */
12
+ trialEndsAt?: string | null;
13
+ /** Plan the server actually entitles right now, i.e. `plan` upgraded to "pro" while a trial is running. */
14
+ effectivePlan?: "free" | "pro";
15
+ company?: string | null;
16
+ title?: string | null;
17
+ bio?: string | null;
18
+ profilePublic?: boolean;
19
+ publicEmail?: string | null;
20
+ xAccount?: string | null;
21
+ sharedPortfolioId?: string | null;
22
+ acceptUnknownDms?: boolean;
23
+ chatEmailNotificationsEnabled?: boolean;
24
+ portfolioAnalytics?: PublicPortfolioAnalytics | null;
25
+ syncEnabled?: boolean;
26
+ weeklyRoundupEnabled?: boolean;
27
+ positionAlertsEnabled?: boolean;
28
+ lastSyncAt?: string | null;
29
+ lastRoundupEmailAt?: string | null;
30
+ createdAt: string;
31
+ updatedAt: string;
32
+ }
33
+
34
+ export type PersistedAuthUser = Pick<AuthUser, "id" | "emailVerified"> &
35
+ Partial<AuthUser>;
36
+
37
+ export interface CloudVerificationResponse {
38
+ sent: boolean;
39
+ email?: string;
40
+ alreadyVerified?: boolean;
41
+ }
42
+
43
+ /** A short-lived, single-use browser URL that establishes the existing desktop session. */
44
+ export interface CloudBrowserHandoffResponse {
45
+ url: string;
46
+ }
47
+
48
+ export interface DeviceAuthStartResponse {
49
+ deviceCode: string;
50
+ /** 8 characters formatted "XXXX-XXXX", shown so a user without the app can type it. */
51
+ userCode: string;
52
+ expiresAt: string;
53
+ /** Like https://gloom.sh/link/<userCode>; this is what the QR code encodes. */
54
+ verificationUri: string;
55
+ pollIntervalMs: number;
56
+ }
57
+
58
+ /** The approved response is single-use; polling again returns a non-approved status. */
59
+ export type DeviceAuthTokenResponse =
60
+ | { status: "pending" }
61
+ | { status: "denied" }
62
+ | { status: "expired" }
63
+ | { status: "approved"; sessionToken: string; user: AuthUser };
@@ -0,0 +1,54 @@
1
+ export interface BuildoutAccountResponse {
2
+ user: {
3
+ id: string;
4
+ email: string;
5
+ emailVerified: boolean;
6
+ };
7
+ subscription: {
8
+ product: "buildout";
9
+ plan: "free" | "pro";
10
+ active: boolean;
11
+ billingInterval: "month" | "year" | null;
12
+ stripeSubscriptionId: string | null;
13
+ stripeSubscriptionStatus: string | null;
14
+ };
15
+ prices: {
16
+ monthly: {
17
+ priceId: string;
18
+ amountUsd: number;
19
+ interval: "month";
20
+ };
21
+ yearly: {
22
+ priceId: string;
23
+ amountUsd: number;
24
+ interval: "year";
25
+ };
26
+ };
27
+ }
28
+
29
+ export interface BuildoutTokenResponse {
30
+ token: string;
31
+ expiresAt: string;
32
+ }
33
+
34
+ interface CloudPricingTier {
35
+ /** Charged amount, in integer cents. */
36
+ amount: number;
37
+ }
38
+
39
+ /** `/account/cloud`, reduced to the plan fields the apps read. */
40
+ export interface CloudAccountPlan {
41
+ effectivePlan?: "free" | "pro";
42
+ /** Whether a checkout started now comes with the free trial attached. */
43
+ trialAvailable?: boolean;
44
+ /** The last charge failed; checkout opens the unpaid invoice instead. */
45
+ paymentFailed?: boolean;
46
+ }
47
+
48
+ /** Public `/pricing` payload; no session required. */
49
+ export interface CloudPricing {
50
+ currency: "usd";
51
+ trialDays: number;
52
+ monthly: CloudPricingTier;
53
+ yearly: CloudPricingTier;
54
+ }
@@ -0,0 +1,180 @@
1
+ import type { ChatPaneLink } from "../chat-pane-link";
2
+ import type { PublicPortfolioAnalytics } from "./account";
3
+
4
+ /**
5
+ * What stands behind a chat account. `discord` is a person on the Gloom
6
+ * Discord who has not linked a Gloom account: a ghost with no profile, no DMs.
7
+ * A server that predates the field leaves it out, which reads as a human.
8
+ */
9
+ export type ChatAccountType = "human" | "managed_llm" | "discord";
10
+
11
+ /** Where a message was written. A message without one came from the app. */
12
+ export type ChatMessageOrigin = "app" | "discord";
13
+
14
+ /** A badge an account earns in chat: `team` for Gloom staff, `pro` with Pro access. */
15
+ export type ChatUserBadge = "team" | "pro";
16
+
17
+ export interface ChatUserSummary {
18
+ id: string;
19
+ /** A person, a managed assistant (Gloombot), or a Discord user bridged into public channels. */
20
+ accountType?: ChatAccountType;
21
+ username: string | null;
22
+ displayName: string;
23
+ bio?: string | null;
24
+ company?: string | null;
25
+ title?: string | null;
26
+ profilePublic?: boolean;
27
+ acceptUnknownDms?: boolean;
28
+ portfolioAnalytics?: PublicPortfolioAnalytics | null;
29
+ /** Badges the account earns. A server that predates them, or a person with none, leaves this out. */
30
+ badges?: ChatUserBadge[];
31
+ /**
32
+ * The person's current offset from UTC in minutes, as their app last
33
+ * reported it: left out while they keep their local time hidden.
34
+ */
35
+ utcOffsetMinutes?: number;
36
+ /** The desks (equities, options, ...) the person chose to show; left out unless they did. */
37
+ desks?: string[];
38
+ }
39
+
40
+ /**
41
+ * An image in a chat message, as the server stored it: `width`, `height`,
42
+ * `size` and `mime` describe the stored copy, not the upload. `url` opens in an
43
+ * <img> without headers; signed links last one to two hours, and a fresh copy
44
+ * of the message carries a fresh one.
45
+ */
46
+ export interface ChatAttachment {
47
+ id: string;
48
+ mime: string;
49
+ width: number;
50
+ height: number;
51
+ size: number;
52
+ url: string;
53
+ }
54
+
55
+ /** Someone who reacted, as a reaction lists the first few. */
56
+ export interface ChatReactionUser {
57
+ id: string;
58
+ username: string | null;
59
+ displayName: string;
60
+ accountType?: ChatAccountType | null;
61
+ }
62
+
63
+ /**
64
+ * One emoji on a message: how many reacted, whether you did, and the first
65
+ * few who did, oldest first. `emoji` is the character, or `:name:` for a
66
+ * custom Discord server emoji.
67
+ */
68
+ export interface ChatReaction {
69
+ emoji: string;
70
+ count: number;
71
+ me: boolean;
72
+ users?: ChatReactionUser[];
73
+ }
74
+
75
+ /** A message's reactions as they stand after a change, from the `chat.reactions` frame or a reaction request. */
76
+ export interface ChatReactionsUpdate {
77
+ channelId: string;
78
+ messageId: string;
79
+ reactions: ChatReaction[];
80
+ }
81
+
82
+ export interface ChatMessage {
83
+ id: string;
84
+ channelId: string;
85
+ content: string;
86
+ replyToId: string | null;
87
+ createdAt: string;
88
+ editedAt?: string | null;
89
+ user: ChatUserSummary;
90
+ origin?: ChatMessageOrigin;
91
+ replyTo?: {
92
+ content: string;
93
+ user: { id?: string; username: string };
94
+ /** Images on the quoted message. */
95
+ attachmentCount?: number;
96
+ } | null;
97
+ /** Images in display order. A server that predates them leaves this out. */
98
+ attachments?: ChatAttachment[];
99
+ /**
100
+ * Emoji reactions in the order they first appeared. Message lists from a
101
+ * server that knows reactions always carry it; a live copy of a message
102
+ * (an edit) leaves it out, and the reactions held stay.
103
+ */
104
+ reactions?: ChatReaction[];
105
+ /**
106
+ * Only on the author's copy of a public message whose images are still being
107
+ * checked ("pending") or could not be checked ("failed"). Nobody else has the
108
+ * message yet.
109
+ */
110
+ attachmentReview?: "pending" | "failed";
111
+ /** What the message opens in the terminal (a Gloom Wire story or calendar). Only the server sets it. */
112
+ paneLink?: ChatPaneLink;
113
+ /**
114
+ * An announcement Gloom posted, drawn as one. Only the server sets it, and
115
+ * only on one that still stands: a retracted announcement is the removal
116
+ * placeholder without it.
117
+ */
118
+ announcement?: true;
119
+ clientStatus?: "sending" | "failed";
120
+ clientError?: string | null;
121
+ /** The idempotency key a local send went out with, so a retry repeats it. */
122
+ clientMessageId?: string;
123
+ }
124
+
125
+ /** Whether this account is tied to a person on the Gloom Discord, and whether its public messages go there. */
126
+ export interface ChatDiscordLink {
127
+ linked: boolean;
128
+ discordUsername?: string;
129
+ mirror: boolean;
130
+ /** False when the server has linking switched off. A server that predates the field is available. */
131
+ available: boolean;
132
+ }
133
+
134
+ export interface ChatChannel {
135
+ id: string;
136
+ name: string;
137
+ kind?: "public" | "direct" | "group" | "team";
138
+ created_at: string;
139
+ teamId?: string;
140
+ dmUser?: ChatUserSummary | null;
141
+ members?: ChatUserSummary[];
142
+ /**
143
+ * When the newest message you can see in a direct or group conversation was
144
+ * sent; null when it has none. Absent from channels of other kinds and from
145
+ * servers that do not report it.
146
+ */
147
+ lastMessageAt?: string | null;
148
+ }
149
+
150
+ /** Minimal identities scoped by the server to this channel and existing DMs. */
151
+ export interface ChatMentionCandidate {
152
+ id: string;
153
+ username: string;
154
+ displayName: string | null;
155
+ channelActivityAt: string | null;
156
+ conversationActivityAt: string | null;
157
+ }
158
+
159
+ export interface ChatChannelState {
160
+ channelId: string;
161
+ notificationsEnabled: boolean;
162
+ lastReadMessageId: string | null;
163
+ unreadCount: number;
164
+ }
165
+
166
+ export interface ChatNotification {
167
+ id: string;
168
+ type: "reply" | "mention" | "channel";
169
+ channelId: string;
170
+ messageId: string;
171
+ createdAt: string;
172
+ message: ChatMessage;
173
+ }
174
+
175
+ export interface ChatStateResponse {
176
+ channels: ChatChannel[];
177
+ onlineCount: number;
178
+ channelStates: ChatChannelState[];
179
+ notifications: ChatNotification[];
180
+ }
@@ -0,0 +1,107 @@
1
+ type CloudCongressTradeSide = "BUY" | "SELL" | "EXCHANGE" | "OTHER";
2
+
3
+ export interface CloudCongressTradePayload {
4
+ id: string;
5
+ chamber: "house" | "senate";
6
+ filingId: string;
7
+ docId: string;
8
+ memberName: string;
9
+ stateDistrict: string;
10
+ filingDate: string;
11
+ transactionDate: string | null;
12
+ notificationDate: string | null;
13
+ lagDays: number | null;
14
+ side: CloudCongressTradeSide;
15
+ transactionType: string;
16
+ ticker: string | null;
17
+ assetName: string;
18
+ assetType: string | null;
19
+ owner: string;
20
+ rawOwner: string;
21
+ amount: string;
22
+ amountLow: number | null;
23
+ amountHigh: number | null;
24
+ capGainsOver200: boolean | null;
25
+ filingStatus: string | null;
26
+ subholdingOf: string | null;
27
+ description: string | null;
28
+ sourceUrl: string;
29
+ returnSinceTx?: number | null;
30
+ returnSinceFiling?: number | null;
31
+ /** SPY's return over the same days as returnSinceTx, percent. */
32
+ spyReturnSinceTx?: number | null;
33
+ spyReturnSinceFiling?: number | null;
34
+ /** returnSinceTx less spyReturnSinceTx, percentage points. */
35
+ excessSinceTx?: number | null;
36
+ excessSinceFiling?: number | null;
37
+ returnAsOf?: string | null;
38
+ party?: string | null;
39
+ committees?: string[];
40
+ }
41
+
42
+ export interface CloudCongressMemberPayload {
43
+ id: string;
44
+ memberName: string;
45
+ stateDistrict: string;
46
+ tradeCount: number;
47
+ buyCount: number;
48
+ sellCount: number;
49
+ exchangeCount: number;
50
+ otherCount: number;
51
+ estimatedLow: number | null;
52
+ estimatedHigh: number | null;
53
+ lastFilingDate: string | null;
54
+ avgLagDays: number | null;
55
+ medianReturn?: number | null;
56
+ /** Median of the trades' excessSinceFiling. */
57
+ medianExcessSinceFiling?: number | null;
58
+ buyHitRate?: number | null;
59
+ pricedTradeCount?: number;
60
+ pricedBuyCount?: number;
61
+ excessTradeCount?: number;
62
+ party?: string | null;
63
+ committees?: string[];
64
+ }
65
+
66
+ export interface CloudCongressTickerPayload {
67
+ ticker: string;
68
+ tradeCount: number;
69
+ buyCount: number;
70
+ sellCount: number;
71
+ exchangeCount: number;
72
+ otherCount: number;
73
+ memberCount: number;
74
+ memberIds: string[];
75
+ estimatedLow: number | null;
76
+ estimatedHigh: number | null;
77
+ lastFilingDate: string | null;
78
+ }
79
+
80
+ export interface CloudCongressHousePayload {
81
+ asOf: string;
82
+ /** "all" pages both chambers' filings as one date-ordered index. */
83
+ chamber: "house" | "senate" | "all";
84
+ source: "house-clerk" | "senate-efd" | "congress";
85
+ year: number;
86
+ indexUpdatedAt: string | null;
87
+ filingsScanned: number;
88
+ /** Filings in the window the server could read. */
89
+ filingsParsed?: number;
90
+ /** Filings the source refused; the server retries them on its own schedule. */
91
+ filingsFailed?: number;
92
+ /** Filings left unread because the server's daily document budget is spent. */
93
+ filingsPending?: number;
94
+ /** Scanned Senate paper filings: listed and linked, not read. */
95
+ filingsPaper?: number;
96
+ /** The merged feed could not reach the Senate source; this window is House only. */
97
+ senateUnavailable?: boolean;
98
+ filingCount: number;
99
+ filingOffset?: number;
100
+ hasMore?: boolean;
101
+ hasMoreFilings?: boolean;
102
+ nextOffset?: number;
103
+ nextFilingOffset?: number;
104
+ trades: CloudCongressTradePayload[];
105
+ members: CloudCongressMemberPayload[];
106
+ tickers?: CloudCongressTickerPayload[];
107
+ }
@@ -0,0 +1,110 @@
1
+ import type { CreditLevelKind } from "../credit-boards";
2
+
3
+ /** One publicly disseminated single-name CDS transaction report. */
4
+ export interface CloudCdsTradePayload {
5
+ disseminationId: string;
6
+ originalDisseminationId: string | null;
7
+ actionType: string;
8
+ eventTimestamp: string;
9
+ executionTimestamp: string | null;
10
+ effectiveDate: string | null;
11
+ expirationDate: string | null;
12
+ maturityDate: string | null;
13
+ issuerName: string | null;
14
+ underlierId: string | null;
15
+ underlierIdSource: string | null;
16
+ upi: string | null;
17
+ upiFisn: string | null;
18
+ upiUnderlierName: string | null;
19
+ notionalAmount: number | null;
20
+ /** Reported notional is a regulatory cap, so the real trade was at least this size. */
21
+ notionalCapped: boolean;
22
+ notionalCurrency: string | null;
23
+ fixedRate: number | null;
24
+ reportedSpread: number | null;
25
+ /** Unit of `reportedSpread`, e.g. basis points or percent. */
26
+ spreadNotation: string | null;
27
+ upfrontAmount: number | null;
28
+ upfrontCurrency: string | null;
29
+ }
30
+
31
+ export interface CloudCdsResponse {
32
+ source: string;
33
+ asOf: string | null;
34
+ trades: CloudCdsTradePayload[];
35
+ }
36
+
37
+ /** One New York trade date of an issuer's on-the-run 5Y spread. */
38
+ export interface CloudCdsHistoryPointPayload {
39
+ date: string;
40
+ /** Median of the day's prints in basis points. */
41
+ spreadBp: number;
42
+ prints: number;
43
+ /** Prints that reported the spread; the rest were converted from their upfront. */
44
+ reported: number;
45
+ /** The contract on the run that day, e.g. "2031-12-20". */
46
+ maturity: string;
47
+ /** For a line quoted upfront: that day's level in points on the line's coupon. */
48
+ upfrontPts?: number;
49
+ /** The day's trades, or the settlement price on a day without enough of them (`prints` 0). */
50
+ kind?: CreditLevelKind;
51
+ }
52
+
53
+ /**
54
+ * Past 2,000bp a name is quoted in points upfront on its running coupon, the
55
+ * level and its moves alike; `spreadBp` and the bp moves stay beside them.
56
+ * Absent from servers before it, which read as `spread`.
57
+ */
58
+ interface CloudCdsUpfrontQuote {
59
+ quote?: "spread" | "upfront";
60
+ /** The line's running coupon, bp. */
61
+ couponBp?: number | null;
62
+ upfrontPts?: number | null;
63
+ change1WPts?: number | null;
64
+ change1MPts?: number | null;
65
+ }
66
+
67
+ export interface CloudCdsHistoryResponse extends CloudCdsUpfrontQuote {
68
+ source: string;
69
+ /** The matched reference entity, or null when nothing on the tape matched. */
70
+ issuer: string | null;
71
+ tenor: string;
72
+ currency: string | null;
73
+ asOf: string | null;
74
+ points: CloudCdsHistoryPointPayload[];
75
+ /**
76
+ * The last point's move over a week and a month in bp, on one contract and
77
+ * chained through the contract before across a roll, as the index board's.
78
+ * Null without a comparable level, or once the level is more than 5 trading
79
+ * days behind the tape; absent from servers before them.
80
+ */
81
+ change1W?: number | null;
82
+ change1M?: number | null;
83
+ /**
84
+ * Why the line has no level in the month to its newest print, when one
85
+ * cause explains it: `upfront-side-unknown` when the prints carry an
86
+ * upfront without the side that paid it and nothing else places the level.
87
+ */
88
+ noLevelReason?: string | null;
89
+ }
90
+
91
+ /** An issuer's latest 5Y level: the last point of its history over the last month. */
92
+ export interface CloudCdsLevelPayload extends CloudCdsUpfrontQuote {
93
+ /** The reference entity as the history response names it. */
94
+ issuer: string;
95
+ spreadBp: number;
96
+ date: string;
97
+ /** As the history response's last point. */
98
+ kind?: CreditLevelKind;
99
+ /** As the history response's moves for the same name. */
100
+ change1W?: number | null;
101
+ change1M?: number | null;
102
+ }
103
+
104
+ export interface CloudCdsLevelsResponse {
105
+ source: string;
106
+ tenor: string;
107
+ asOf: string | null;
108
+ /** Every issuer traded in the last month whose 5Y line has a level in it. */
109
+ levels: CloudCdsLevelPayload[];
110
+ }