@gloom-sh/terminal 0.20.12 → 0.20.14

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 (616) hide show
  1. package/package.json +2 -1
  2. package/patches/@opentui%2Fcore@0.3.2.patch +22 -4
  3. package/src/account/auth-dialog.tsx +22 -4
  4. package/src/account/auth-form.tsx +6 -1
  5. package/src/account/billing.ts +3 -2
  6. package/src/account/checkout-handoff.tsx +7 -14
  7. package/src/account/device-signin-dialog.tsx +35 -24
  8. package/src/account/upgrade-dialog.tsx +8 -8
  9. package/src/api-client/crypto-markets.ts +10 -0
  10. package/src/api-client/errors.ts +3 -1
  11. package/src/api-client/index.ts +10 -2
  12. package/src/api-client/install-experiments.ts +146 -0
  13. package/src/api-client/money-markets.ts +7 -0
  14. package/src/api-client/request.ts +12 -2
  15. package/src/api-client/telemetry.ts +47 -0
  16. package/src/api-client/types/market.ts +4 -0
  17. package/src/api-client/types/news.ts +16 -0
  18. package/src/architecture/floating-promise-allowlist.json +17 -34
  19. package/src/brokers/signed-in/adapter.ts +2 -2
  20. package/src/brokers/signed-in/catalog.ts +13 -4
  21. package/src/brokers/signed-in/sign-in-dialog.tsx +38 -38
  22. package/src/cli/commands/market.ts +146 -55
  23. package/src/cli/commands/overview.ts +21 -7
  24. package/src/cli/commands/search.ts +103 -9
  25. package/src/cli/commands/ticker.ts +22 -13
  26. package/src/cli/earnings-calendar.ts +33 -53
  27. package/src/cli/errors.ts +3 -1
  28. package/src/cli/freshness.ts +7 -2
  29. package/src/cli/glossary.ts +10 -5
  30. package/src/cli/helpers.ts +8 -16
  31. package/src/cli/history-export.ts +4 -0
  32. package/src/cli/history-rows.ts +18 -1
  33. package/src/cli/known-gaps.ts +11 -2
  34. package/src/cli/listing-arg.ts +183 -28
  35. package/src/cli/not-a-ticker.ts +4 -0
  36. package/src/cli/pane-functions/catalog.ts +81 -12
  37. package/src/cli/pane-functions/dom.ts +8 -1
  38. package/src/cli/pane-functions/freshness.ts +2 -2
  39. package/src/cli/pane-functions/headless.ts +13 -10
  40. package/src/cli/pane-functions/index.ts +1 -1
  41. package/src/cli/pane-functions/options.ts +7 -0
  42. package/src/cli/pane-functions/report.ts +4 -1
  43. package/src/cli/pane-functions/resolver.ts +61 -15
  44. package/src/cli/perpetual-contract.ts +4 -4
  45. package/src/cli/quote-answer.ts +6 -2
  46. package/src/cli/result.ts +24 -5
  47. package/src/cli/symbol-args.ts +5 -3
  48. package/src/cli/symbol-list.ts +23 -10
  49. package/src/cli/symbol-rows.ts +135 -3
  50. package/src/cli/treasury-yields.ts +15 -1
  51. package/src/components/chart/composite/axis-overlays.tsx +5 -2
  52. package/src/components/chart/composite/composite-chart.tsx +1 -0
  53. package/src/components/chart/composite/format.ts +103 -16
  54. package/src/components/chart/composite/legend.tsx +60 -25
  55. package/src/components/chart/composite/panel-surface/axis-markers.ts +133 -0
  56. package/src/components/chart/composite/panel-surface/level-labels.tsx +78 -0
  57. package/src/components/chart/composite/panel-surface/overlays.ts +108 -0
  58. package/src/components/chart/composite/panel-surface/pan-coast.ts +54 -0
  59. package/src/components/chart/composite/panel-surface/panel-cursor.tsx +138 -0
  60. package/src/components/chart/composite/panel-surface/panel-levels.ts +47 -0
  61. package/src/components/chart/composite/panel-surface/plot-gestures.ts +403 -0
  62. package/src/components/chart/composite/panel-surface/plot-pointer.ts +65 -0
  63. package/src/components/chart/composite/panel-surface/plot-wheel.ts +102 -0
  64. package/src/components/chart/composite/panel-surface/pointer.ts +12 -0
  65. package/src/components/chart/composite/panel-surface/props.ts +79 -0
  66. package/src/components/chart/composite/panel-surface/tool-readout.ts +151 -0
  67. package/src/components/chart/composite/panel-surface/value-axis-gestures.ts +152 -0
  68. package/src/components/chart/composite/panel-surface.tsx +81 -1177
  69. package/src/components/chart/composite/time-axis.ts +51 -29
  70. package/src/components/chart/composite/toolbar.tsx +42 -6
  71. package/src/components/chart/curve/curve-surface.tsx +5 -5
  72. package/src/components/command-bar/commands/collection-list.ts +1 -0
  73. package/src/components/command-bar/list/badge.ts +8 -5
  74. package/src/components/command-bar/list/model.ts +0 -5
  75. package/src/components/command-bar/list/view.tsx +39 -2
  76. package/src/components/command-bar/routes/root/plugin-install.ts +4 -2
  77. package/src/components/command-bar/routes/root/provider-search.ts +23 -3
  78. package/src/components/command-bar/routes/root/results.ts +23 -11
  79. package/src/components/command-bar/routes/root/runtime.ts +3 -2
  80. package/src/components/command-bar/routes/root/selection.ts +3 -2
  81. package/src/components/command-bar/routes/root/shortcuts.ts +15 -0
  82. package/src/components/command-bar/routes/root/start-here.ts +1 -2
  83. package/src/components/command-bar/routes/ticker-search/actions.ts +2 -3
  84. package/src/components/command-bar/routes/ticker-search/results.ts +23 -4
  85. package/src/components/data-table/view.tsx +29 -6
  86. package/src/components/form-modal/host.tsx +1 -1
  87. package/src/components/layout/header.tsx +3 -2
  88. package/src/components/layout/market-summary.ts +3 -3
  89. package/src/components/layout/pane/error-boundary.tsx +2 -1
  90. package/src/components/layout/pane/title.ts +10 -4
  91. package/src/components/markdown-text.tsx +36 -0
  92. package/src/components/market-board/index.tsx +4 -3
  93. package/src/components/onboarding/first-run-workspace.ts +46 -11
  94. package/src/components/onboarding/onboarding-keyboard.ts +57 -5
  95. package/src/components/onboarding/onboarding-wizard.tsx +91 -24
  96. package/src/components/onboarding/portfolio-step/index.tsx +1 -0
  97. package/src/components/onboarding/portfolio-step/positions-panel.tsx +36 -9
  98. package/src/components/onboarding/portfolio-step/types.ts +2 -0
  99. package/src/components/onboarding/tickers-step-model.ts +140 -0
  100. package/src/components/onboarding/tickers-step.tsx +116 -0
  101. package/src/components/onboarding/use-onboarding-broker-form.ts +1 -1
  102. package/src/components/onboarding/use-onboarding-progress.ts +100 -11
  103. package/src/components/onboarding/use-onboarding-upgrade.ts +3 -2
  104. package/src/components/onboarding/wizard-model.ts +3 -1
  105. package/src/components/onboarding/wizard-tickers.ts +139 -0
  106. package/src/components/pane-settings-dialog/tui.tsx +6 -3
  107. package/src/components/pane-settings-dialog.tsx +2 -1
  108. package/src/components/pane-template-wizard.tsx +2 -0
  109. package/src/components/price-performance.tsx +2 -2
  110. package/src/components/speedometer-gauge/model.ts +2 -1
  111. package/src/components/speedometer-gauge/terminal.tsx +13 -8
  112. package/src/components/ui/choice-dialog.tsx +102 -33
  113. package/src/components/ui/confirm-dialog.tsx +3 -2
  114. package/src/components/ui/frame.tsx +7 -3
  115. package/src/components/ui/icon.tsx +4 -2
  116. package/src/components/ui/list-view.tsx +8 -0
  117. package/src/components/ui/multi-select/dialog.tsx +1 -7
  118. package/src/components/ui/not-meaningful.ts +16 -0
  119. package/src/components/ui/number-prompt-dialog.tsx +2 -1
  120. package/src/components/ui/query-bar.tsx +16 -4
  121. package/src/components/ui/stat-grid.tsx +27 -6
  122. package/src/components/use-pane-notice-footer.tsx +3 -1
  123. package/src/data/config/store/normalize.ts +2 -0
  124. package/src/docs/snapshot.json +3 -3
  125. package/src/i18n/es.ts +6 -2
  126. package/src/i18n/ja.ts +6 -2
  127. package/src/i18n/ko.ts +6 -2
  128. package/src/i18n/zh-cn.ts +6 -2
  129. package/src/i18n/zh-tw.ts +6 -2
  130. package/src/layout-marketplace/model.ts +2 -1
  131. package/src/market-data/futures-contract.ts +2 -1
  132. package/src/market-data/hooks.tsx +1 -1
  133. package/src/market-data/market/change-basis.ts +27 -5
  134. package/src/market-data/market/format.ts +48 -14
  135. package/src/market-data/quotes/contributions.ts +13 -0
  136. package/src/market-data/quotes/export-identity.ts +36 -1
  137. package/src/market-data/quotes/listing-enterprise-value.ts +3 -3
  138. package/src/market-data/quotes/resolution.ts +16 -0
  139. package/src/market-data/quotes/time.ts +17 -10
  140. package/src/market-data/tax-equivalent.ts +3 -2
  141. package/src/news/aggregator.ts +19 -8
  142. package/src/news/hooks.ts +1 -1
  143. package/src/news/news-model.ts +49 -0
  144. package/src/news/types.ts +9 -0
  145. package/src/plugins/builtin/account-management/calendar-tab.tsx +8 -3
  146. package/src/plugins/builtin/account-management/pane.tsx +9 -8
  147. package/src/plugins/builtin/account-management/password-dialog.tsx +2 -2
  148. package/src/plugins/builtin/alerts/calendar-events.ts +4 -5
  149. package/src/plugins/builtin/alerts/format.ts +6 -5
  150. package/src/plugins/builtin/alerts/headless.ts +3 -2
  151. package/src/plugins/builtin/alerts/history.ts +2 -1
  152. package/src/plugins/builtin/alerts/pane.tsx +2 -1
  153. package/src/plugins/builtin/alerts/price-text.ts +2 -1
  154. package/src/plugins/builtin/alerts/scheduled.ts +6 -5
  155. package/src/plugins/builtin/analytics/account-returns.ts +6 -7
  156. package/src/plugins/builtin/analytics/display.ts +2 -1
  157. package/src/plugins/builtin/analytics/pane-model.ts +5 -9
  158. package/src/plugins/builtin/analytics/risk-client.ts +12 -2
  159. package/src/plugins/builtin/analytics/risk-headless.ts +66 -6
  160. package/src/plugins/builtin/analytics/risk-math.ts +23 -6
  161. package/src/plugins/builtin/analytics/risk-model.ts +26 -15
  162. package/src/plugins/builtin/analytics/risk-pane.tsx +8 -7
  163. package/src/plugins/builtin/analytics/view.tsx +5 -5
  164. package/src/plugins/builtin/attention/model.ts +6 -5
  165. package/src/plugins/builtin/attention/pane.tsx +5 -4
  166. package/src/plugins/builtin/awards/detail.tsx +5 -4
  167. package/src/plugins/builtin/awards/headless.ts +8 -7
  168. package/src/plugins/builtin/awards/model.ts +4 -3
  169. package/src/plugins/builtin/awards/pane.tsx +4 -4
  170. package/src/plugins/builtin/backtest/format.ts +3 -2
  171. package/src/plugins/builtin/backtest/report.ts +3 -2
  172. package/src/plugins/builtin/bond-calculator/headless.ts +2 -1
  173. package/src/plugins/builtin/bond-calculator/pane.tsx +2 -1
  174. package/src/plugins/builtin/broker-manager/add-flow.tsx +1 -1
  175. package/src/plugins/builtin/broker-trading/orders-data.ts +3 -3
  176. package/src/plugins/builtin/broker-trading/orders.tsx +3 -2
  177. package/src/plugins/builtin/broker-trading/ticket.tsx +2 -2
  178. package/src/plugins/builtin/buildout/cells.tsx +2 -1
  179. package/src/plugins/builtin/buildout/company/pane.tsx +4 -3
  180. package/src/plugins/builtin/buildout/data-runtime.ts +21 -23
  181. package/src/plugins/builtin/buildout/detail/values.ts +2 -1
  182. package/src/plugins/builtin/buildout/format.ts +4 -3
  183. package/src/plugins/builtin/buildout/pane/index.tsx +3 -3
  184. package/src/plugins/builtin/catalysts/detail.tsx +2 -1
  185. package/src/plugins/builtin/catalysts/model.ts +6 -5
  186. package/src/plugins/builtin/catalysts/pane.tsx +2 -1
  187. package/src/plugins/builtin/cds/headless.ts +3 -2
  188. package/src/plugins/builtin/cds/model.ts +8 -8
  189. package/src/plugins/builtin/cds/pane.tsx +3 -2
  190. package/src/plugins/builtin/central-bank-rates/headless.ts +2 -1
  191. package/src/plugins/builtin/central-bank-rates/model.ts +3 -2
  192. package/src/plugins/builtin/central-bank-rates/pane.tsx +5 -5
  193. package/src/plugins/builtin/changelog/index.tsx +2 -2
  194. package/src/plugins/builtin/chart-composer/catalog-inventory.ts +5 -2
  195. package/src/plugins/builtin/chart-composer/editor.tsx +1 -0
  196. package/src/plugins/builtin/chart-composer/index.tsx +4 -2
  197. package/src/plugins/builtin/chart-composer/pane.tsx +8 -4
  198. package/src/plugins/builtin/chart-composer/quick-add.tsx +4 -1
  199. package/src/plugins/builtin/chart-composer/series-catalog.ts +17 -1
  200. package/src/plugins/builtin/chart-composer/use-series-catalog.ts +3 -1
  201. package/src/plugins/builtin/chart-composer/user-series.ts +3 -1
  202. package/src/plugins/builtin/chat/attachments/desktop.tsx +2 -1
  203. package/src/plugins/builtin/chat/controller/utils.ts +2 -1
  204. package/src/plugins/builtin/clinical-trials/model.ts +4 -3
  205. package/src/plugins/builtin/clinical-trials/sponsor-tickers.ts +4 -2
  206. package/src/plugins/builtin/cloud/askg/lock-note.ts +16 -4
  207. package/src/plugins/builtin/cloud/askg/model.ts +2 -1
  208. package/src/plugins/builtin/cloud/askg/pane.tsx +35 -1
  209. package/src/plugins/builtin/cloud/company-picker.tsx +1 -3
  210. package/src/plugins/builtin/cloud/plugin.tsx +2 -0
  211. package/src/plugins/builtin/cloud/team/pane.tsx +12 -12
  212. package/src/plugins/builtin/cloud/thesis/detail.tsx +13 -8
  213. package/src/plugins/builtin/cloud/thesis/module.tsx +2 -0
  214. package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +6 -2
  215. package/src/plugins/builtin/cloud-tweets/model.ts +2 -2
  216. package/src/plugins/builtin/comment-letters/pane.tsx +2 -1
  217. package/src/plugins/builtin/commodity-balances/headless.ts +3 -2
  218. package/src/plugins/builtin/company-attention/app-rank.tsx +5 -4
  219. package/src/plugins/builtin/company-attention/building-model.ts +7 -7
  220. package/src/plugins/builtin/company-attention/headless.ts +6 -5
  221. package/src/plugins/builtin/company-attention/model.ts +4 -4
  222. package/src/plugins/builtin/company-attention/moves-model.ts +9 -9
  223. package/src/plugins/builtin/company-attention/signals-model.ts +9 -9
  224. package/src/plugins/builtin/company-kpis/headless.ts +2 -1
  225. package/src/plugins/builtin/company-kpis/model.ts +15 -10
  226. package/src/plugins/builtin/company-kpis/pane.tsx +2 -2
  227. package/src/plugins/builtin/congress-trades/detail.tsx +6 -5
  228. package/src/plugins/builtin/congress-trades/headless.ts +2 -1
  229. package/src/plugins/builtin/congress-trades/model.ts +6 -6
  230. package/src/plugins/builtin/congress-trades/table.tsx +7 -6
  231. package/src/plugins/builtin/connections/pane.tsx +5 -5
  232. package/src/plugins/builtin/correlation/headless.ts +2 -2
  233. package/src/plugins/builtin/correlation/index.tsx +4 -1
  234. package/src/plugins/builtin/correlation/matrix/selection.ts +2 -1
  235. package/src/plugins/builtin/correlation/relationship/view-model.ts +3 -3
  236. package/src/plugins/builtin/cot/headless.ts +3 -2
  237. package/src/plugins/builtin/cot/model.ts +2 -1
  238. package/src/plugins/builtin/cot/pane.tsx +4 -3
  239. package/src/plugins/builtin/cpi/headless.ts +10 -4
  240. package/src/plugins/builtin/cpi/model.ts +25 -7
  241. package/src/plugins/builtin/cpi/pane.tsx +3 -1
  242. package/src/plugins/builtin/credit-boards/cdx-pane.tsx +5 -4
  243. package/src/plugins/builtin/credit-boards/headless.ts +2 -1
  244. package/src/plugins/builtin/credit-boards/model.ts +5 -5
  245. package/src/plugins/builtin/credit-conditions/headless.ts +2 -1
  246. package/src/plugins/builtin/credit-conditions/index.tsx +2 -2
  247. package/src/plugins/builtin/credit-documents/model.ts +2 -2
  248. package/src/plugins/builtin/crypto-board/client.ts +6 -1
  249. package/src/plugins/builtin/crypto-board/defi-view.tsx +7 -7
  250. package/src/plugins/builtin/crypto-board/defi.ts +2 -2
  251. package/src/plugins/builtin/crypto-board/headless.ts +10 -2
  252. package/src/plugins/builtin/crypto-board/model.ts +93 -14
  253. package/src/plugins/builtin/crypto-board/pane.tsx +28 -13
  254. package/src/plugins/builtin/crypto-board/supply.ts +2 -2
  255. package/src/plugins/builtin/crypto-etf-flows/model.ts +4 -4
  256. package/src/plugins/builtin/custom-view/index.tsx +3 -1
  257. package/src/plugins/builtin/custom-view/pane.tsx +5 -1
  258. package/src/plugins/builtin/custom-view/view-spec.ts +11 -0
  259. package/src/plugins/builtin/debt-maturities/model.ts +3 -3
  260. package/src/plugins/builtin/debt-maturities/pane.tsx +2 -2
  261. package/src/plugins/builtin/dividend-yield/client.ts +31 -5
  262. package/src/plugins/builtin/dividend-yield/headless.ts +20 -13
  263. package/src/plugins/builtin/dividend-yield/pane.tsx +12 -10
  264. package/src/plugins/builtin/dividend-yield/ranking-view.tsx +4 -1
  265. package/src/plugins/builtin/dividend-yield/ranking.ts +21 -12
  266. package/src/plugins/builtin/dividend-yield/types.ts +4 -0
  267. package/src/plugins/builtin/dividend-yield/view.ts +8 -4
  268. package/src/plugins/builtin/docs/use-docs.ts +4 -2
  269. package/src/plugins/builtin/doe/headless.ts +2 -1
  270. package/src/plugins/builtin/doe/model.ts +12 -11
  271. package/src/plugins/builtin/earnings/board-model.ts +14 -8
  272. package/src/plugins/builtin/earnings/board-table.ts +13 -8
  273. package/src/plugins/builtin/earnings/calendar-model.ts +5 -5
  274. package/src/plugins/builtin/earnings/calendar.tsx +2 -1
  275. package/src/plugins/builtin/earnings/format.ts +16 -14
  276. package/src/plugins/builtin/earnings/headless.ts +57 -19
  277. package/src/plugins/builtin/earnings/history-model.ts +11 -7
  278. package/src/plugins/builtin/earnings/history-table.ts +22 -9
  279. package/src/plugins/builtin/earnings/history.tsx +4 -3
  280. package/src/plugins/builtin/earnings-calls/calendar.tsx +2 -1
  281. package/src/plugins/builtin/earnings-calls/format.ts +6 -5
  282. package/src/plugins/builtin/earnings-calls/upcoming.ts +5 -5
  283. package/src/plugins/builtin/earnings-ripple/headless.ts +2 -1
  284. package/src/plugins/builtin/earnings-ripple/index.tsx +2 -0
  285. package/src/plugins/builtin/earnings-ripple/model.ts +3 -2
  286. package/src/plugins/builtin/earnings-ripple/pane.tsx +6 -6
  287. package/src/plugins/builtin/econ/calendar-model.ts +19 -3
  288. package/src/plugins/builtin/econ/detail-view.tsx +2 -2
  289. package/src/plugins/builtin/econ/fred-catalog.ts +33 -4
  290. package/src/plugins/builtin/econ/index.tsx +7 -6
  291. package/src/plugins/builtin/econ-statistics/detail.tsx +2 -1
  292. package/src/plugins/builtin/econ-statistics/headless.ts +25 -4
  293. package/src/plugins/builtin/econ-statistics/pane.tsx +2 -2
  294. package/src/plugins/builtin/equity-screener/headless.ts +5 -5
  295. package/src/plugins/builtin/equity-screener/model.ts +6 -4
  296. package/src/plugins/builtin/equity-screener/pane.tsx +7 -7
  297. package/src/plugins/builtin/equity-screener/screen-check.ts +2 -1
  298. package/src/plugins/builtin/equity-screener/ticker-check.tsx +2 -1
  299. package/src/plugins/builtin/estimate-revisions/model.ts +3 -2
  300. package/src/plugins/builtin/estimate-revisions/pane.tsx +8 -8
  301. package/src/plugins/builtin/executives/format.ts +4 -4
  302. package/src/plugins/builtin/exposure/headless.ts +8 -8
  303. package/src/plugins/builtin/exposure/model.ts +4 -3
  304. package/src/plugins/builtin/exposure/pane.tsx +6 -5
  305. package/src/plugins/builtin/fear-greed/format.ts +7 -7
  306. package/src/plugins/builtin/fear-greed/headless.ts +2 -1
  307. package/src/plugins/builtin/filing-events/feed.ts +2 -1
  308. package/src/plugins/builtin/futures/table.tsx +8 -8
  309. package/src/plugins/builtin/futures-curve/headless.ts +18 -18
  310. package/src/plugins/builtin/futures-curve/model.ts +5 -5
  311. package/src/plugins/builtin/futures-curve/pane.tsx +8 -8
  312. package/src/plugins/builtin/fx-matrix/index.tsx +2 -2
  313. package/src/plugins/builtin/fx-matrix/pairs.ts +2 -1
  314. package/src/plugins/builtin/gpu/board.tsx +6 -5
  315. package/src/plugins/builtin/gpu/changes.tsx +2 -1
  316. package/src/plugins/builtin/gpu/equities.tsx +2 -2
  317. package/src/plugins/builtin/gpu/headless.ts +4 -3
  318. package/src/plugins/builtin/gpu/model.ts +8 -7
  319. package/src/plugins/builtin/help/functions-table.tsx +41 -9
  320. package/src/plugins/builtin/help/index.tsx +6 -3
  321. package/src/plugins/builtin/help/keybindings-editor.tsx +35 -7
  322. package/src/plugins/builtin/help/shortcut-table.tsx +19 -7
  323. package/src/plugins/builtin/help/table-cells.tsx +51 -0
  324. package/src/plugins/builtin/holders/pane.tsx +4 -1
  325. package/src/plugins/builtin/insider/base-values.ts +2 -2
  326. package/src/plugins/builtin/insider/display.ts +2 -1
  327. package/src/plugins/builtin/insider/headless.ts +16 -16
  328. package/src/plugins/builtin/insider/insider-data.ts +2 -1
  329. package/src/plugins/builtin/insider/signals-model.ts +3 -3
  330. package/src/plugins/builtin/insider/table-model.ts +27 -13
  331. package/src/plugins/builtin/insider/table.tsx +1 -1
  332. package/src/plugins/builtin/ipo-calendar/model.ts +4 -4
  333. package/src/plugins/builtin/iv-history/format.ts +8 -7
  334. package/src/plugins/builtin/iv-history/headless.ts +9 -8
  335. package/src/plugins/builtin/iv-history/pane.tsx +3 -2
  336. package/src/plugins/builtin/iv-history/screen-pane.tsx +5 -4
  337. package/src/plugins/builtin/jobs/headless.ts +11 -11
  338. package/src/plugins/builtin/jobs/model.ts +2 -2
  339. package/src/plugins/builtin/jobs/pane.tsx +5 -5
  340. package/src/plugins/builtin/jodi/model.ts +2 -2
  341. package/src/plugins/builtin/jodi/pane.tsx +2 -1
  342. package/src/plugins/builtin/kelly-sizer/headless.ts +4 -4
  343. package/src/plugins/builtin/kelly-sizer/model.ts +2 -1
  344. package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -2
  345. package/src/plugins/builtin/macro-day/headless.ts +27 -15
  346. package/src/plugins/builtin/macro-day/model.ts +42 -4
  347. package/src/plugins/builtin/macro-day/pane.tsx +30 -12
  348. package/src/plugins/builtin/macro-day/releases.ts +24 -1
  349. package/src/plugins/builtin/market-halts/model.ts +11 -10
  350. package/src/plugins/builtin/market-halts/pane.tsx +2 -1
  351. package/src/plugins/builtin/market-heatmap/index.tsx +4 -4
  352. package/src/plugins/builtin/market-movers/session-table.ts +3 -3
  353. package/src/plugins/builtin/market-movers/session.ts +2 -1
  354. package/src/plugins/builtin/market-movers/table.ts +5 -5
  355. package/src/plugins/builtin/market-valuation/detail.tsx +2 -2
  356. package/src/plugins/builtin/market-valuation/headless.ts +7 -7
  357. package/src/plugins/builtin/market-valuation/pane.tsx +7 -7
  358. package/src/plugins/builtin/members/breadth-pane.tsx +5 -4
  359. package/src/plugins/builtin/members/headless.ts +2 -1
  360. package/src/plugins/builtin/members/model.ts +3 -2
  361. package/src/plugins/builtin/members/pane.tsx +10 -9
  362. package/src/plugins/builtin/mna/distress/model.ts +2 -1
  363. package/src/plugins/builtin/mna/model.ts +5 -5
  364. package/src/plugins/builtin/money-markets/client.ts +4 -1
  365. package/src/plugins/builtin/money-markets/headless.ts +17 -5
  366. package/src/plugins/builtin/money-markets/index.tsx +1 -1
  367. package/src/plugins/builtin/money-markets/model.ts +3 -2
  368. package/src/plugins/builtin/money-markets/pane.tsx +11 -5
  369. package/src/plugins/builtin/news/headless.ts +5 -2
  370. package/src/plugins/builtin/news/wire/breaking/notifications.ts +21 -19
  371. package/src/plugins/builtin/news/wire/news/row.ts +3 -1
  372. package/src/plugins/builtin/news/wire/news/table.tsx +3 -2
  373. package/src/plugins/builtin/news/wire/persisted-articles.ts +28 -3
  374. package/src/plugins/builtin/notes/headless.ts +2 -1
  375. package/src/plugins/builtin/notes/model.ts +2 -1
  376. package/src/plugins/builtin/openfda/pane.tsx +4 -3
  377. package/src/plugins/builtin/options/carry.ts +3 -2
  378. package/src/plugins/builtin/options/market-reference.ts +2 -1
  379. package/src/plugins/builtin/options/table.ts +48 -9
  380. package/src/plugins/builtin/options/view.tsx +47 -17
  381. package/src/plugins/builtin/options-calculator/headless.ts +3 -2
  382. package/src/plugins/builtin/options-calculator/pane.tsx +7 -7
  383. package/src/plugins/builtin/options-positioning/headless.ts +8 -7
  384. package/src/plugins/builtin/options-positioning/model.ts +10 -10
  385. package/src/plugins/builtin/options-positioning/pane.tsx +5 -5
  386. package/src/plugins/builtin/options-scenario/collar.ts +5 -4
  387. package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +11 -10
  388. package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +15 -14
  389. package/src/plugins/builtin/options-scenario/csp-screen.ts +2 -1
  390. package/src/plugins/builtin/options-scenario/csp.ts +6 -5
  391. package/src/plugins/builtin/options-scenario/headless.ts +6 -5
  392. package/src/plugins/builtin/options-scenario/hedge.ts +3 -3
  393. package/src/plugins/builtin/options-scenario/pane.tsx +7 -6
  394. package/src/plugins/builtin/options-scenario/strategy-screen.ts +1 -1
  395. package/src/plugins/builtin/pe-band/headless.ts +9 -8
  396. package/src/plugins/builtin/pe-band/pane.tsx +7 -7
  397. package/src/plugins/builtin/perps/cascade.ts +3 -2
  398. package/src/plugins/builtin/perps/headless.ts +10 -9
  399. package/src/plugins/builtin/perps/model.ts +14 -14
  400. package/src/plugins/builtin/perps/pane.tsx +3 -2
  401. package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +4 -2
  402. package/src/plugins/builtin/portfolio-list/cli/period-report.ts +61 -11
  403. package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +11 -3
  404. package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +2 -0
  405. package/src/plugins/builtin/portfolio-list/header.tsx +2 -2
  406. package/src/plugins/builtin/portfolio-list/headless.ts +33 -6
  407. package/src/plugins/builtin/portfolio-list/index.tsx +3 -2
  408. package/src/plugins/builtin/portfolio-list/pane/futures-terms.ts +4 -2
  409. package/src/plugins/builtin/portfolio-list/pane/index.tsx +5 -3
  410. package/src/plugins/builtin/portfolio-list/pane/period-pnl.ts +26 -7
  411. package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +4 -2
  412. package/src/plugins/builtin/portfolio-list/period-pnl.ts +16 -1
  413. package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +2 -2
  414. package/src/plugins/builtin/portfolio-list/settings.ts +4 -1
  415. package/src/plugins/builtin/portfolio-list/summary/index.tsx +8 -5
  416. package/src/plugins/builtin/portfolio-list/summary/totals.ts +6 -4
  417. package/src/plugins/builtin/portfolio-list/table.tsx +25 -15
  418. package/src/plugins/builtin/power/detail.tsx +6 -5
  419. package/src/plugins/builtin/power/gas-model.ts +8 -7
  420. package/src/plugins/builtin/power/gas.tsx +2 -1
  421. package/src/plugins/builtin/power/headless.ts +7 -6
  422. package/src/plugins/builtin/power/model.ts +3 -2
  423. package/src/plugins/builtin/power/prices-headless.ts +10 -9
  424. package/src/plugins/builtin/power/prices-model.ts +3 -2
  425. package/src/plugins/builtin/power/prices.tsx +2 -1
  426. package/src/plugins/builtin/primary-dealers/model.ts +3 -3
  427. package/src/plugins/builtin/primary-dealers/pane.tsx +2 -2
  428. package/src/plugins/builtin/rate-path/headless.ts +8 -7
  429. package/src/plugins/builtin/rate-path/model.ts +6 -5
  430. package/src/plugins/builtin/rate-path/pane.tsx +6 -5
  431. package/src/plugins/builtin/realized-vol/fx-proxy.ts +2 -1
  432. package/src/plugins/builtin/realized-vol/headless.ts +11 -10
  433. package/src/plugins/builtin/realized-vol/pane.tsx +5 -4
  434. package/src/plugins/builtin/relative-rotation/headless.ts +2 -1
  435. package/src/plugins/builtin/relative-rotation/pane.tsx +6 -6
  436. package/src/plugins/builtin/research/analyst-headless.ts +5 -5
  437. package/src/plugins/builtin/research/analyst-model.ts +7 -7
  438. package/src/plugins/builtin/research/analyst-pane.tsx +7 -7
  439. package/src/plugins/builtin/research/client.ts +14 -0
  440. package/src/plugins/builtin/research/corporate-actions-pane.tsx +40 -30
  441. package/src/plugins/builtin/research/event-model.ts +55 -22
  442. package/src/plugins/builtin/research/event-sources.ts +26 -8
  443. package/src/plugins/builtin/research/relative-valuation-columns.ts +20 -12
  444. package/src/plugins/builtin/research/relative-valuation-currency.ts +16 -0
  445. package/src/plugins/builtin/research/relative-valuation-headless.ts +33 -21
  446. package/src/plugins/builtin/research/relative-valuation-model.ts +31 -17
  447. package/src/plugins/builtin/research/relative-valuation-pane.tsx +29 -14
  448. package/src/plugins/builtin/research-search/model.ts +2 -1
  449. package/src/plugins/builtin/research-search/saved-view.tsx +4 -3
  450. package/src/plugins/builtin/revenue-breakdown/model.ts +4 -4
  451. package/src/plugins/builtin/reverse-dcf/headless.ts +7 -7
  452. package/src/plugins/builtin/reverse-dcf/model.ts +4 -4
  453. package/src/plugins/builtin/reverse-dcf/pane.tsx +2 -2
  454. package/src/plugins/builtin/scanner/flow-model.ts +7 -4
  455. package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
  456. package/src/plugins/builtin/scanner/headless.ts +3 -2
  457. package/src/plugins/builtin/scanner/hilo-model.ts +2 -1
  458. package/src/plugins/builtin/scanner/live-headless.ts +2 -2
  459. package/src/plugins/builtin/scanner/live-model.ts +3 -2
  460. package/src/plugins/builtin/scanner/live-pane.tsx +5 -5
  461. package/src/plugins/builtin/seasonality/headless.ts +2 -1
  462. package/src/plugins/builtin/seasonality/pane.tsx +4 -3
  463. package/src/plugins/builtin/sec/filing-display.tsx +12 -15
  464. package/src/plugins/builtin/sec/fund-facts.ts +2 -2
  465. package/src/plugins/builtin/sec/headless.ts +2 -1
  466. package/src/plugins/builtin/sec/index.tsx +6 -2
  467. package/src/plugins/builtin/sectors/headless.ts +4 -4
  468. package/src/plugins/builtin/sectors/index.tsx +7 -7
  469. package/src/plugins/builtin/shared/cloud-upgrade.ts +4 -2
  470. package/src/plugins/builtin/shared/cpi-year-gap.ts +67 -0
  471. package/src/plugins/builtin/shared/earnings-calendar.ts +90 -6
  472. package/src/plugins/builtin/shared/earnings-report.ts +13 -6
  473. package/src/plugins/builtin/shared/research-cells.tsx +2 -2
  474. package/src/plugins/builtin/shared/source-footer.ts +2 -1
  475. package/src/plugins/builtin/shared/trend.ts +2 -2
  476. package/src/plugins/builtin/shared/use-quote-board.ts +9 -8
  477. package/src/plugins/builtin/short-interest/headless.ts +6 -6
  478. package/src/plugins/builtin/short-interest/model.ts +9 -9
  479. package/src/plugins/builtin/short-interest/publications-model.ts +5 -5
  480. package/src/plugins/builtin/short-interest/publications-pane.tsx +3 -2
  481. package/src/plugins/builtin/short-interest/watch-headless.ts +5 -5
  482. package/src/plugins/builtin/short-interest/watch-pane.tsx +6 -6
  483. package/src/plugins/builtin/short-volume/model.ts +5 -5
  484. package/src/plugins/builtin/short-volume/pane.tsx +4 -4
  485. package/src/plugins/builtin/social-mentions/headless.ts +2 -1
  486. package/src/plugins/builtin/social-mentions/model.ts +4 -4
  487. package/src/plugins/builtin/supply-chain/graph-model.ts +2 -1
  488. package/src/plugins/builtin/supply-chain/graph-pane.tsx +2 -2
  489. package/src/plugins/builtin/supply-chain/headless.ts +3 -2
  490. package/src/plugins/builtin/supply-chain/model.ts +4 -4
  491. package/src/plugins/builtin/supply-chain/pane.tsx +2 -2
  492. package/src/plugins/builtin/supply-chain/row-evidence.tsx +2 -1
  493. package/src/plugins/builtin/themes/headless.ts +2 -1
  494. package/src/plugins/builtin/themes/model.ts +3 -2
  495. package/src/plugins/builtin/themes/pane.tsx +3 -2
  496. package/src/plugins/builtin/thirteenf/format.ts +9 -9
  497. package/src/plugins/builtin/thirteenf/headless.ts +3 -2
  498. package/src/plugins/builtin/thirteenf/model.ts +2 -1
  499. package/src/plugins/builtin/thirteenf/overlap-pane.tsx +2 -1
  500. package/src/plugins/builtin/thirteenf/pane.tsx +5 -4
  501. package/src/plugins/builtin/thirteenf/report-notes.ts +2 -1
  502. package/src/plugins/builtin/thirteenf/signals-pane.tsx +3 -2
  503. package/src/plugins/builtin/thirteenf/table.ts +6 -5
  504. package/src/plugins/builtin/ticker-detail/adr-pair/headless.ts +45 -2
  505. package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -3
  506. package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +4 -4
  507. package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +3 -3
  508. package/src/plugins/builtin/ticker-detail/financials/model.ts +83 -35
  509. package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +3 -1
  510. package/src/plugins/builtin/ticker-detail/financials/ratios.ts +2 -2
  511. package/src/plugins/builtin/ticker-detail/financials/schema.ts +14 -18
  512. package/src/plugins/builtin/ticker-detail/financials/tab.tsx +8 -13
  513. package/src/plugins/builtin/ticker-detail/headless.ts +33 -6
  514. package/src/plugins/builtin/ticker-detail/overview/chart-scale.ts +52 -0
  515. package/src/plugins/builtin/ticker-detail/overview/components.tsx +8 -9
  516. package/src/plugins/builtin/ticker-detail/overview/model.ts +28 -14
  517. package/src/plugins/builtin/ticker-detail/overview/pane.tsx +6 -0
  518. package/src/plugins/builtin/ticker-detail/overview/tax-equivalent.ts +2 -1
  519. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +43 -9
  520. package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +7 -5
  521. package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +4 -4
  522. package/src/plugins/builtin/ticker-detail/settings.ts +17 -0
  523. package/src/plugins/builtin/time-sales/headless.ts +3 -2
  524. package/src/plugins/builtin/time-sales/model.ts +7 -5
  525. package/src/plugins/builtin/time-sales/pane.tsx +7 -6
  526. package/src/plugins/builtin/trace-bonds/model.ts +3 -2
  527. package/src/plugins/builtin/trace-bonds/pane.tsx +3 -2
  528. package/src/plugins/builtin/treasury-auctions/client.ts +2 -1
  529. package/src/plugins/builtin/treasury-auctions/headless.ts +6 -6
  530. package/src/plugins/builtin/treasury-auctions/hk-headless.ts +3 -2
  531. package/src/plugins/builtin/treasury-auctions/hk-view.tsx +10 -9
  532. package/src/plugins/builtin/treasury-auctions/hk.ts +5 -5
  533. package/src/plugins/builtin/treasury-auctions/model.ts +4 -4
  534. package/src/plugins/builtin/treasury-auctions/pane.tsx +18 -18
  535. package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +2 -1
  536. package/src/plugins/builtin/treasury-daily/model.ts +2 -2
  537. package/src/plugins/builtin/vol-surface/events.ts +5 -4
  538. package/src/plugins/builtin/vol-surface/headless.ts +19 -18
  539. package/src/plugins/builtin/vol-surface/heat-grid.tsx +2 -1
  540. package/src/plugins/builtin/vol-surface/pane.tsx +8 -7
  541. package/src/plugins/builtin/vol-surface/stored.ts +2 -1
  542. package/src/plugins/builtin/vol-surface/tables.ts +4 -3
  543. package/src/plugins/builtin/volatility/headless.ts +5 -4
  544. package/src/plugins/builtin/volatility/pane.tsx +6 -6
  545. package/src/plugins/builtin/world-indices/headless.ts +7 -7
  546. package/src/plugins/builtin/world-indices/index.tsx +3 -1
  547. package/src/plugins/builtin/world-venue-map/headless.ts +2 -1
  548. package/src/plugins/builtin/world-venue-map/layered-pane.tsx +2 -1
  549. package/src/plugins/builtin/world-venue-map/layers.ts +3 -2
  550. package/src/plugins/builtin/world-venue-map/use-geo.ts +4 -2
  551. package/src/plugins/builtin/yield-curve/curves.ts +3 -3
  552. package/src/plugins/builtin/yield-curve/headless.ts +7 -6
  553. package/src/plugins/builtin/yield-curve/index.tsx +5 -4
  554. package/src/plugins/builtin/yield-curve/swaps.tsx +2 -1
  555. package/src/portfolio/allocation.ts +5 -5
  556. package/src/portfolio/collection-name.ts +2 -1
  557. package/src/portfolio/column-values.ts +61 -45
  558. package/src/portfolio/futures-positions.ts +2 -1
  559. package/src/portfolio/listed-symbol.ts +4 -2
  560. package/src/portfolio/period-pnl.ts +51 -1
  561. package/src/renderers/dom/dialog-host.tsx +5 -5
  562. package/src/renderers/electrobun/bun/desktop/backend-requests.ts +7 -1
  563. package/src/renderers/electrobun/view/remote/capability-invoker.ts +1 -1
  564. package/src/renderers/opentui/dialog-host.tsx +3 -4
  565. package/src/renderers/opentui/ui-host.tsx +32 -2
  566. package/src/renderers/share/layout-view.tsx +2 -1
  567. package/src/sources/gloomberb-cloud/news.ts +9 -0
  568. package/src/sources/gloomberb-cloud/normalizers.ts +7 -0
  569. package/src/sources/provider-router/history.ts +5 -2
  570. package/src/sources/provider-router/search.ts +15 -10
  571. package/src/state/hooks/inline-tickers.ts +3 -2
  572. package/src/state/hooks/quote-streaming.ts +9 -10
  573. package/src/team/collections-sync.ts +8 -3
  574. package/src/telemetry/usage-counts.ts +26 -0
  575. package/src/test-support/plugin-persistence.ts +12 -0
  576. package/src/tickers/company-name-listing.ts +6 -5
  577. package/src/tickers/company-name.ts +36 -2
  578. package/src/tickers/instrument-coverage.ts +27 -0
  579. package/src/tickers/listing-venues.ts +26 -1
  580. package/src/tickers/renamed-listings.ts +2 -1
  581. package/src/tickers/search/home-listing.ts +38 -1
  582. package/src/tickers/search/index.ts +22 -2
  583. package/src/tickers/search/ranking.ts +21 -2
  584. package/src/tickers/starter-symbols.ts +7 -0
  585. package/src/time-series/base-series.ts +4 -0
  586. package/src/time-series/fundamentals/statement-fields.ts +11 -14
  587. package/src/time-series/history-acquisition.ts +1 -1
  588. package/src/time-series/log-scale.ts +9 -0
  589. package/src/time-series/reporting.ts +3 -3
  590. package/src/time-series/resolve.ts +6 -4
  591. package/src/time-series/transforms.ts +10 -5
  592. package/src/time-series/types.ts +5 -2
  593. package/src/types/config.ts +9 -0
  594. package/src/types/data-provider.ts +3 -2
  595. package/src/types/financials.ts +28 -0
  596. package/src/types/headless.ts +2 -0
  597. package/src/types/instrument.ts +6 -0
  598. package/src/types/plugin-panes.ts +1 -1
  599. package/src/types/plugin-reports.ts +8 -0
  600. package/src/ui/dialog-stack.ts +17 -0
  601. package/src/ui/dialog.tsx +6 -2
  602. package/src/utils/crypto-pair.ts +9 -0
  603. package/src/utils/datetime-format.ts +74 -33
  604. package/src/utils/exchanges.ts +13 -0
  605. package/src/utils/financial-statements.ts +98 -17
  606. package/src/utils/format.ts +4 -9
  607. package/src/utils/fundamentals.ts +38 -16
  608. package/src/utils/futures-generic.ts +14 -0
  609. package/src/utils/growth.ts +67 -0
  610. package/src/utils/keyboard.ts +6 -0
  611. package/src/utils/options.ts +1 -1
  612. package/src/utils/report-timing.ts +2 -2
  613. package/src/utils/served-rates.ts +45 -0
  614. package/src/utils/text-wrap.ts +84 -3
  615. package/src/utils/trailing-dividend.ts +13 -3
  616. package/src/utils/zoned-date-time.ts +47 -22
@@ -9,7 +9,7 @@ import { barCloseSession } from "../../market-data/market/bar-period";
9
9
  import type { EarningsEvent, MarketDataRequestContext, QuoteBatchResult, QuoteSubscriptionTarget, SecFilingItem } from "../../types/data-provider";
10
10
  import { companyDataNotes, type CompanyFrom } from "../../types/company-from";
11
11
  import type { NewsArticle, NewsFeed, NewsQuery } from "../../news/types";
12
- import { newsSummaryLine } from "../../news/news-model";
12
+ import { listedRowHeadline, newsSummaryLine, routineNoticeFields } from "../../news/news-model";
13
13
  import { shortStoryId } from "../../news/story-id";
14
14
  import type {
15
15
  AnalystResearchData,
@@ -33,7 +33,7 @@ import {
33
33
  quoteSessionStateLabel,
34
34
  type ExtendedSession,
35
35
  } from "../../market-data/market/status";
36
- import { formatCompact, formatCurrency, formatDistributionAmount, formatNumber, formatPercent } from "../../utils/format";
36
+ import { MISSING_VALUE, formatCompact, formatCurrency, formatDistributionAmount, formatNumber, formatPercent } from "../../utils/format";
37
37
  import { withCliServices, withMarketData } from "../context";
38
38
  import { isoDate, parsePositiveInt, requireOneArg, takeFlag, takeOption, typedCompanyName } from "./command-utils";
39
39
  import type { BuiltinCliCommandDef } from "../command-options";
@@ -234,7 +234,7 @@ import { DAY_SO_FAR_TEXT, dailyOrLongerBarSize, withSessionBar } from "../../tim
234
234
  import { requestedBarSize } from "../../time-series/bar-spacing";
235
235
  import { isFiniteNumber } from "../../utils/guards";
236
236
  import { exportedFundamentals } from "../../utils/price-earnings";
237
- import { withBankEnterpriseValue } from "../../utils/fundamentals";
237
+ import { withFinancialEnterpriseValue } from "../../utils/fundamentals";
238
238
  import { fundamentalsFreshness, quotesFreshness, rowsFreshness, valuationFreshness } from "../freshness";
239
239
  import { fxPairListing, fxQuoteRateMove, fxQuoteRateObservation, METAL_NAMES, readFxQuoteRate } from "../fx-quote-rate";
240
240
  import { quoteBarNotes } from "../../market-data/quotes/intraday-bar";
@@ -243,6 +243,7 @@ import { isPesoDollarPair, loadPesoDollarRates, pesoDollarRateLines, pesoDollarR
243
243
  import { withBalanceSheetRate } from "../../market-data/quotes/balance-sheet-rate";
244
244
  import { regularSessionValuationPrice } from "../../market-data/quotes/regular-session-valuation";
245
245
  import { atLivePriceEarnings } from "../../market-data/quotes/live-valuation";
246
+ import { quoteSourceName } from "../../market-data/quotes/export-identity";
246
247
  import { viewMarketCapitalization } from "../../utils/market-capitalization";
247
248
  import {
248
249
  barHistoryFreshness,
@@ -265,6 +266,7 @@ import {
265
266
  import {
266
267
  calendarEventOf,
267
268
  calendarStatus,
269
+ listingDay,
268
270
  newYorkDay,
269
271
  resolveListingEvents,
270
272
  withResolvedEarnings,
@@ -308,7 +310,7 @@ import {
308
310
  analyzeTaxEquivalent, distributionBasis, loadTreasuryTenors, noBondFigures, parseTaxRates, TAX_RATE_HELP_OPTIONS, taxEquivalentJson, type TaxRates,
309
311
  } from "../../market-data/tax-equivalent";
310
312
  import { CBOE_YIELD_INDEX_CLOSE } from "../../plugins/builtin/shared/treasury-cutoffs";
311
- import { earningsCalendarFailure, earningsChoiceNote, earningsDateLabel, isListingAbroad, lastReportedDay, noListingCalendarNote, undatedListingsNote } from "../earnings-calendar";
313
+ import { earningsCalendarFailure, earningsChoiceNote, earningsDateLabel, undatedListingNote } from "../earnings-calendar";
312
314
  import { formatBasisPoints, toBasisPoints } from "../../utils/basis-points";
313
315
  import { isUnservedWithoutReason, notATickerSymbol, providerMissReason } from "../../sources/provider-errors";
314
316
  import { isNetworkFailure } from "../../utils/network-failure";
@@ -316,11 +318,11 @@ import { withSavedCopy, type ReportFreshness } from "../pane-functions/freshness
316
318
  import { isNotATickerMessage } from "../not-a-ticker";
317
319
  import { useKnownCoins } from "../board-coins";
318
320
  import { suggestUsTicker, type ListingSuggestion } from "../listing-suggestion";
319
- import { quotedPhrase, splitSymbolArgs, symbolInputKey, uniqueSecuritySymbols } from "../symbol-args";
321
+ import { quotedPhrase, securityInputKey, splitSymbolArgs, symbolInputKey, uniqueSecuritySymbols } from "../symbol-args";
320
322
  import { isCompanyNameInput } from "../../tickers/company-name-listing";
321
323
  import { readNameEntries, readPhraseArgument } from "../name-entries";
322
324
  import { readSymbolList, SymbolListError, type TypedForm } from "../symbol-list";
323
- import { notASymbolError } from "../symbol-cells";
325
+ import { notASymbolError, type NotASymbolError } from "../symbol-cells";
324
326
  import { cliPerpetualContract, perpetualContractStats, type PerpetualContractPayload } from "../perpetual-contract";
325
327
  import { isSubMinuteInterval, knownGapMessage, subMinuteDataMessage } from "../known-gaps";
326
328
  import { phraseSearchReport } from "./search";
@@ -541,7 +543,7 @@ async function readListedSymbols(
541
543
  market: MarketContext,
542
544
  ctx: Parameters<CliCommandDef["execute"]>[1],
543
545
  usage: string,
544
- ): Promise<{ symbols: string[]; notes: string[]; typedForms: TypedForm[] }> {
546
+ ): Promise<{ symbols: string[]; notes: string[]; typedForms: TypedForm[]; byLine: boolean }> {
545
547
  try {
546
548
  const typedForms: TypedForm[] = [];
547
549
  const list = await readSymbolList({
@@ -552,7 +554,11 @@ async function readListedSymbols(
552
554
  const where = file && file !== "-" ? file : args.includes("-") ? "standard input" : "what was given";
553
555
  ctx.fail([`No symbols in ${where}.`, ...list.notes].join(" "), usage);
554
556
  }
555
- return { symbols: uniqueEntries(list.symbols), notes: list.notes, typedForms };
557
+ // A list of one entry a line from a file or standard input has a row for each of its lines (`listRows`), however
558
+ // many entries they read as: AAPL, a blank line and AAPL again are three rows. Typed arguments, a comma list and a
559
+ // table with a header keep a row per entry.
560
+ const byLine = typedForms.filter((form) => form.ownRow).length > 1;
561
+ return { symbols: uniqueEntries(list.symbols), notes: list.notes, typedForms, byLine };
556
562
  } catch (error) {
557
563
  if (error instanceof SymbolListError) ctx.fail(error.message, usage);
558
564
  throw error;
@@ -763,7 +769,9 @@ const FEED_COLUMNS = [
763
769
  header: "Feed",
764
770
  shrink: false,
765
771
  stackPriority: 4,
766
- format: (value: unknown) => value === "stale" || value === "nominal" ? cliStyles.warning(value) : String(value ?? ""),
772
+ // A coin priced by one exchange's own trade names it on its row: `live · Coinbase`.
773
+ format: (value: unknown, row: QuoteRow) => value === "stale" || value === "nominal" ? cliStyles.warning(value)
774
+ : `${String(value ?? "")}${row.priceVenue ? ` · ${row.priceVenue}` : ""}`,
767
775
  },
768
776
  // A nominal price names the session it is from ("6 Nov close"), not the last print; JSON keeps both.
769
777
  { key: "updatedAt", header: "Updated", shrink: false, stackPriority: 5,
@@ -783,9 +791,9 @@ const CHANGE_BP_EXPORT_COLUMN = {
783
791
  * read as one listing (`USDJPY Curncy`, `USDJPY`, `usdjpy`, `USD/JPY` are all USDJPY=X), and marks a row
784
792
  * that repeats an earlier row's listing with that row's entry. After the columns an export already had.
785
793
  */
786
- const LIST_INPUT_EXPORT_COLUMNS = [
787
- { key: "input", header: "input", value: (row: QuoteRow) => row.input || null },
788
- { key: "duplicateOf", header: "duplicate_of", value: (row: QuoteRow) => row.duplicateOf || null },
794
+ const LIST_INPUT_EXPORT_COLUMNS: CliResultColumn<Record<string, unknown>>[] = [
795
+ { key: "input", header: "input", value: (row) => row.input || null },
796
+ { key: "duplicateOf", header: "duplicate_of", value: (row) => row.duplicateOf || null },
789
797
  ];
790
798
 
791
799
  /** The day's low and high as numbers, after the columns an export already had. */
@@ -978,6 +986,7 @@ function quoteRows(results: QuoteCliRecord[], now = Date.now()) {
978
986
  providerId: quote?.providerId ?? "",
979
987
  source: quote?.dataSource ?? quote?.providerId ?? "",
980
988
  feed: quoteFeedState(quote, now),
989
+ ...quote?.priceVenue ? { priceVenue: quote.priceVenue } : {},
981
990
  // When the price Last shows was observed: in a pre-market nothing has traded in, the close it stands at.
982
991
  updatedAt: quote?.lastUpdated ? new Date(quoteHeadlineTime(quote)).toISOString() : "",
983
992
  input: result.input ?? "",
@@ -1022,6 +1031,8 @@ function newsRows(articles: NewsArticle[]) {
1022
1031
  url: article.url,
1023
1032
  importance: article.importance,
1024
1033
  breaking: article.isBreaking,
1034
+ // A row standing for a company's routine notices (a buy-back's daily ones): how many, since when.
1035
+ ...routineNoticeFields(article),
1025
1036
  }));
1026
1037
  }
1027
1038
 
@@ -1059,16 +1070,16 @@ function analystSummary(data: AnalystResearchData, quote: Quote | null): string
1059
1070
  const mix = formatRecommendationMix(data);
1060
1071
  const entries: Array<[string, string]> = [
1061
1072
  ["Average Target", formatAnalystPrice(target?.average, currency)],
1062
- ["Upside", upside == null ? "-" : formatPercent(upside)],
1063
- ["Upside vs", upside == null ? "-" : formatAnalystReference(reference, currency)],
1073
+ ["Upside", upside == null ? MISSING_VALUE : formatPercent(upside)],
1074
+ ["Upside vs", upside == null ? MISSING_VALUE : formatAnalystReference(reference, currency)],
1064
1075
  ["Low / Median / High", target && [target.low, target.median, target.high].some((value) => value != null)
1065
1076
  ? [target.low, target.median, target.high].map((value) => formatAnalystPrice(value, currency)).join(" / ")
1066
- : "-"],
1077
+ : MISSING_VALUE],
1067
1078
  ["Rating", formatRatingLabel(data.recommendationRating)],
1068
- ["Analysts", analysts == null ? "-" : String(analysts)],
1079
+ ["Analysts", analysts == null ? MISSING_VALUE : String(analysts)],
1069
1080
  ["Mix", mix],
1070
1081
  ];
1071
- const populated = entries.filter(([, value]) => value !== "-");
1082
+ const populated = entries.filter(([, value]) => value !== MISSING_VALUE);
1072
1083
  return populated.length > 0 ? renderStats(populated) : "";
1073
1084
  }
1074
1085
 
@@ -1103,7 +1114,7 @@ function corporateActionRows(data: CorporateActionsData) {
1103
1114
  const earningsCurrency = reportedCurrencies.size === 1 ? [...reportedCurrencies][0] : undefined;
1104
1115
  // To the cent, as ERN and EE show it; a consensus average carries more digits.
1105
1116
  const eps = (value: number | undefined, unit: string | undefined) => (
1106
- value == null || !Number.isFinite(value) ? "-"
1117
+ value == null || !Number.isFinite(value) ? MISSING_VALUE
1107
1118
  : !unit ? formatNumber(value, 2)
1108
1119
  : /^[A-Z]{3}$/.test(unit) ? formatCurrency(value, unit, 2) : `${formatNumber(value, 2)} ${unit}`
1109
1120
  );
@@ -1113,7 +1124,7 @@ function corporateActionRows(data: CorporateActionsData) {
1113
1124
  const quarter = quarterLabel(event.fiscalPeriod);
1114
1125
  const basis = earningsEpsBasis(event.epsBasis);
1115
1126
  // History rows are keyed by fiscal quarter end, upcoming ones by announcement date.
1116
- const note = [event.dateType === "fiscal-period-end" ? "period end" : null, quarter === "-" ? null : quarter].filter(Boolean).join(", ");
1127
+ const note = [event.dateType === "fiscal-period-end" ? "period end" : null, quarter === MISSING_VALUE ? null : quarter].filter(Boolean).join(", ");
1117
1128
  return {
1118
1129
  type: "earnings",
1119
1130
  date: event.date,
@@ -1305,7 +1316,7 @@ async function runQuote(rawArgs: string[], ctx: Parameters<CliCommandDef["execut
1305
1316
  }));
1306
1317
  const tickerChanges = symbolChanges.map(({ change }) => change);
1307
1318
  // A list's rows name the entry each is for, and mark one that is the same listing as an earlier row.
1308
- const listInputs = listed && symbols.length > 1 ? quoteListInputs(asked, resolvedListings) : null;
1319
+ const listInputs = listed && (symbols.length > 1 || !!list?.byLine) ? quoteListInputs(asked, resolvedListings) : null;
1309
1320
  const formerIssuers = symbolChanges.map(({ formerIssuer }) => formerIssuer);
1310
1321
  // A symbol with no quote whose bars stopped over a month ago says when it last traded, in place of why no quote
1311
1322
  // came: no longer listed on the service's record (FLAT, a retired ETN), else no trades since. Each costs a history
@@ -1313,7 +1324,9 @@ async function runQuote(rawArgs: string[], ctx: Parameters<CliCommandDef["execut
1313
1324
  // quote can fail where its history still says when it stopped (FRC), and an unreachable service fails it at once.
1314
1325
  // The service's "not a ticker" for a bare symbol says no listing anywhere carries it, so no bars or search row
1315
1326
  // would say it stopped: a symbol it knows from before answers its last quote or no data, never that.
1316
- const lastTraded = await Promise.all(answers.map(async ({ result, listing }) => !result.quote && answers.length <= MAX_CHOICE_LOOKUPS
1327
+ // A symbol several companies list asks which, whatever line of it once stopped (MBG: Mercedes-Benz on Xetra, MB Gold on ASX).
1328
+ const lastTraded = await Promise.all(answers.map(async ({ result, listing, failure }) => !result.quote && !failure?.choose
1329
+ && answers.length <= MAX_CHOICE_LOOKUPS
1317
1330
  && (listing.exchange || !isNotATickerMessage(errorMessage(result.error)))
1318
1331
  ? await loadNoQuoteLastTraded(listing.request, market.dataProvider, now) ?? await searchedDelisting(listing, market)
1319
1332
  : null));
@@ -1434,7 +1447,8 @@ async function runQuote(rawArgs: string[], ctx: Parameters<CliCommandDef["execut
1434
1447
  // An export of a list read from a file or standard input has a row for every line, in its order: one no listing was
1435
1448
  // read for says why in its status, as its line on stderr does. The table keeps a row per listing.
1436
1449
  const rows = listInputs && ctx.cliOptions.format !== "text"
1437
- ? listRows([...data, ...unread.map(unreadRow)], symbols, list?.typedForms ?? [])
1450
+ ? listRows([...data, ...unread.map(unreadRow), ...list?.byLine ? refused.map((error) => unlistedQuoteRow(error.input)) : []],
1451
+ symbols, list?.typedForms ?? [], unlistedQuoteRow)
1438
1452
  : data;
1439
1453
  const basisNotes = changeBasisNotes(data, now);
1440
1454
  const midNotes = extendedMidNotes(data);
@@ -1448,6 +1462,7 @@ async function runQuote(rawArgs: string[], ctx: Parameters<CliCommandDef["execut
1448
1462
  if (ctx.cliOptions.format !== "json") useKnownCoins();
1449
1463
  // Only yield indices: their change is in bp, so the text header drops the percent sign (CSV keeps the percent it holds).
1450
1464
  const yieldsOnly = data.length > 0 && data.every((row) => isYieldIndexSymbol(row.target.symbol));
1465
+ const venued = data.some((row) => row.quote?.priceVenue);
1451
1466
  ctx.printResult({
1452
1467
  data: rows,
1453
1468
  warnings: warnings.length > 0 ? warnings : undefined,
@@ -1469,6 +1484,8 @@ async function runQuote(rawArgs: string[], ctx: Parameters<CliCommandDef["execut
1469
1484
  || row.currency || (row.yieldIndex ? YIELD_INDEX_EXPORT_UNIT : isIndexLevel(row.instrumentType) ? INDEX_POINTS_EXPORT_UNIT : null),
1470
1485
  // Each row as of its own price (^TNX's 19:59 beside ^VIX's 21:15), as Updated says; a row with none is blank.
1471
1486
  asOf: row.updatedAt || null,
1487
+ // Beside a coin priced by one exchange's own trade, which is cited to that exchange, each row names its own.
1488
+ ...venued ? { source: quoteSourceName(row) } : {},
1472
1489
  }),
1473
1490
  // A row with no price or move says why in its status column, as the warnings do.
1474
1491
  exportStatus: quoteExportStatus,
@@ -1500,30 +1517,64 @@ function unreadRow({ symbol, error }: { symbol: string; error: ListingArgError }
1500
1517
  return { target: { symbol }, listing: { symbol, exchange: null, name: null }, quote: null, error: error.message, input: symbol };
1501
1518
  }
1502
1519
 
1520
+ /**
1521
+ * Why a list's line names no listing, before any lookup: "blank line", or what it is
1522
+ * (`N/A` is "not a symbol", `1.899` "a number, not a symbol").
1523
+ */
1524
+ function unlistedLineStatus(typed: string): string {
1525
+ return typed.trim() ? notASymbolError(typed)?.reason ?? "not a symbol" : "blank line";
1526
+ }
1527
+
1528
+ /** The row of a list's line that names no listing (a blank line, `N/A`), its reason in the status column. */
1529
+ function unlistedQuoteRow(typed: string): QuoteCliRecord & { listing: ReturnType<typeof listingMetadata> } {
1530
+ return { target: { symbol: typed }, listing: { symbol: typed, exchange: null, name: null }, quote: null, error: unlistedLineStatus(typed), input: typed };
1531
+ }
1532
+
1503
1533
  type ListRow = Pick<QuoteCliRecord, "input" | "duplicateOf" | "quote"> & { listing: { symbol: string; exchange: string | null } };
1504
1534
 
1505
1535
  /**
1506
1536
  * A list's rows, one for each line of its text as typed where several were read as one entry (`USDJPY` and
1507
- * `usdjpy` are both USDJPY), in the order of the lines, else of the entries; a row that is the same listing as an
1508
- * earlier row names that row's entry in `duplicateOf`.
1537
+ * `usdjpy` are both USDJPY, BRK.B and BRK-B one share class), in the order of the lines, else of the entries; a row
1538
+ * that is the same listing as an earlier row names that row's entry in `duplicateOf`. In a list of one entry a line,
1539
+ * a line no entry was read from (a blank line, `N/A`, a number) has its row too, from `unlisted`, so the rows line
1540
+ * up with the sheet's lines.
1509
1541
  */
1510
- function listRows<Row extends ListRow>(rows: readonly Row[], entries: readonly string[], forms: readonly TypedForm[]): Row[] {
1542
+ function listRows<Row extends ListRow>(
1543
+ rows: readonly Row[],
1544
+ entries: readonly string[],
1545
+ forms: readonly TypedForm[],
1546
+ unlisted: (typed: string) => Row,
1547
+ ): Row[] {
1548
+ // The entry each line reads as: its own, else the entry that is the same security spelled another way (BRK-B, BRK/B
1549
+ // for BRK.B), which the list read once.
1550
+ const keys = new Set(entries.map(symbolInputKey));
1551
+ const bySecurity = new Map<string, string>();
1552
+ for (const key of keys) if (!bySecurity.has(securityInputKey(key))) bySecurity.set(securityInputKey(key), key);
1553
+ const lineKey = (form: TypedForm) => keys.has(form.key) ? form.key : bySecurity.get(securityInputKey(form.key)) ?? form.key;
1511
1554
  // An entry read from no line of its own (a name read as its words) goes after the line before it.
1512
1555
  let last = -1;
1513
1556
  const entryAt = new Map(entries.map((entry, index) => {
1514
- const at = forms.findIndex((form) => form.key === symbolInputKey(entry));
1557
+ const at = forms.findIndex((form) => lineKey(form) === symbolInputKey(entry));
1515
1558
  if (at >= 0) last = at;
1516
1559
  return [entry, { at: at >= 0 ? at : last + 0.5, index }] as const;
1517
1560
  }));
1561
+ const used = new Set<number>();
1518
1562
  const placed = rows.flatMap((row, index) => {
1519
- const typed = forms.flatMap((form, at) => form.key === symbolInputKey(row.input ?? "") ? [{ form, at }] : []);
1563
+ const typed = forms.flatMap((form, at) => lineKey(form) === symbolInputKey(row.input ?? "") ? [{ form, at }] : []);
1564
+ typed.forEach(({ at }) => used.add(at));
1520
1565
  const place = entryAt.get(row.input ?? "") ?? { at: forms.length, index: entries.length + index };
1521
1566
  return typed.length > 1 || (typed.length === 1 && typed[0]!.form.typed !== row.input)
1522
1567
  ? typed.map(({ form, at }) => ({ row: { ...row, input: form.typed }, at, index: place.index }))
1523
1568
  : [{ row, ...place }];
1524
- }).sort((a, b) => a.at - b.at || a.index - b.index);
1569
+ });
1570
+ // A line of words read as several symbols (`AAPL MSFT`) has their rows.
1571
+ const readAsWords = (form: TypedForm) => !!form.typed && form.key.split(/\s+/).every((word) => keys.has(word) || bySecurity.has(securityInputKey(word)));
1572
+ const lines = forms.flatMap((form, at) => form.ownRow && !used.has(at) && !readAsWords(form)
1573
+ ? [{ row: unlisted(form.typed), at, index: -1 }] : []);
1525
1574
  const first = new Map<string, string>();
1526
- return placed.map(({ row }) => {
1575
+ return [...placed, ...lines].sort((a, b) => a.at - b.at || a.index - b.index).map(({ row }) => {
1576
+ // A line that names no listing is no other line's repeat.
1577
+ if (!row.input?.trim() || notASymbolError(row.input)) return row;
1527
1578
  const key = `${(row.quote?.symbol || row.listing.symbol).toUpperCase()}:${row.listing.exchange ?? ""}`;
1528
1579
  const earlier = first.get(key);
1529
1580
  if (earlier === undefined) first.set(key, row.input ?? "");
@@ -2148,7 +2199,9 @@ async function loadListingHistory(
2148
2199
  const dayToDate = fromQuote && interval === "1d" && data.at(-1)?.partial === true;
2149
2200
  // Signed out or free, the bars of a session in progress run as late as the delayed quote they end on, and say how late.
2150
2201
  const sessionTrading = quote?.marketState === "REGULAR" || quote?.marketState === "PRE" || quote?.marketState === "POST";
2151
- const delayedTail = quote?.dataSource === "delayed" && !quote.delisting && (dayToDate || (intraday && sessionTrading));
2202
+ // A coin priced by an exchange's own trade is still a reader without real-time access, whose bars stay held back.
2203
+ const barsHeldBack = quote?.dataSource === "delayed" || (quote?.priceVenue != null && intraday && await cloudRealtimeAccess() === false);
2204
+ const delayedTail = barsHeldBack && !quote?.delisting && (dayToDate || (intraday && sessionTrading));
2152
2205
  // The source that served the bars, a broker or another source when Gloom Cloud could not.
2153
2206
  const source = loaded.sourceName ? { source: loaded.sourceName } : {};
2154
2207
  // A coin's volume unit, or what an index's volume counts (a day's total, an intraday count).
@@ -2297,6 +2350,8 @@ const HISTORY_FLAG_TEXT_COLUMN: CliResultColumn = {
2297
2350
  row.partial ? cliStyles.muted("partial") : "",
2298
2351
  row.filled ? cliStyles.muted("filled") : "",
2299
2352
  row.unsettled ? cliStyles.muted("unsettled") : "",
2353
+ row.sessionClose ? cliStyles.muted("close") : "",
2354
+ row.beforeClose ? cliStyles.muted("before close") : "",
2300
2355
  row.roll && typeof row.contract === "string" ? cliStyles.muted(`roll to ${row.contract}`) : "",
2301
2356
  row.thin ? cliStyles.muted("thin") : "",
2302
2357
  row.settleOnly ? cliStyles.muted("settle only") : "",
@@ -2731,11 +2786,16 @@ async function runHistoryList(
2731
2786
  }
2732
2787
  const served = listed.flatMap((entry) => "history" in entry && entry.history.data.length > 0 ? [entry.history] : []);
2733
2788
  // A symbol with no bars, whether its request failed or came back empty, is one row with the reason.
2734
- const rows: HistoryListRow[] = listed.flatMap((entry) => "history" in entry
2789
+ const entryRows = (entry: ListedHistory): HistoryListRow[] => "history" in entry
2735
2790
  ? entry.history.data.length > 0
2736
2791
  ? entry.history.data.map((row) => ({ symbol: entry.history.listing.key, ...row }))
2737
2792
  : [historyFailureRow(entry.history.listing.key, emptyHistoryNote(entry.history.listing.key, ask))]
2738
- : [historyFailureRow(entry.symbol, entry.error)]);
2793
+ : [historyFailureRow(entry.symbol, entry.error)];
2794
+ // An export of a list read from a file or standard input has rows for every line, in its order, as `quote` has:
2795
+ // each bar names the line it is for and the earlier line that is the same listing, and a line that names no
2796
+ // listing (a blank line, `N/A`) is one row with why.
2797
+ const fromList = (file !== undefined || args.includes("-")) && ctx.cliOptions.format !== "text";
2798
+ const rows: HistoryListRow[] = fromList ? historyListRows(listed, entryRows, refused, list) : listed.flatMap(entryRows);
2739
2799
  const bySymbol = new Map(served.map((history) => [history.listing.key, history] as const));
2740
2800
  const notes = [
2741
2801
  ...list.notes,
@@ -2822,7 +2882,7 @@ async function runHistoryList(
2822
2882
  dateKey: "date",
2823
2883
  textColumns: [{ key: "symbol", header: "Symbol", shrink: false }, ...textColumns,
2824
2884
  { key: "currency", header: "Cur", shrink: false, format: currencyCell }, HISTORY_FLAG_TEXT_COLUMN],
2825
- columns: historyExportColumns(rows),
2885
+ columns: [...historyExportColumns(rows), ...fromList ? LIST_INPUT_EXPORT_COLUMNS : []],
2826
2886
  exportStatus: historyExportStatus,
2827
2887
  // Every row names its symbol, the currency its prices are in, its bar size and the as-of of its own symbol's bars.
2828
2888
  exportIdentity: (row) => {
@@ -2841,6 +2901,24 @@ async function runHistoryList(
2841
2901
  });
2842
2902
  }
2843
2903
 
2904
+ /** `history`'s rows of a list read from a file or standard input, for each line in its order (`listRows`). */
2905
+ function historyListRows(
2906
+ listed: readonly ListedHistory[],
2907
+ entryRows: (entry: ListedHistory) => HistoryListRow[],
2908
+ refused: readonly NotASymbolError[],
2909
+ list: { symbols: string[]; typedForms: TypedForm[]; byLine: boolean },
2910
+ ): HistoryListRow[] {
2911
+ type EntryRow = ListRow & { bars: HistoryListRow[] };
2912
+ const row = (input: string, symbol: string, bars: HistoryListRow[]): EntryRow => ({ input, quote: null, listing: { symbol, exchange: null }, bars });
2913
+ const unlisted = (typed: string) => row(typed, typed, [historyFailureRow(typed, unlistedLineStatus(typed))]);
2914
+ return listRows([
2915
+ ...listed.map((entry) => row(entry.symbol, "history" in entry ? entry.history.listing.key : entry.symbol, entryRows(entry))),
2916
+ // A cell that is no symbol (`N/A`) has a row in a list of one entry a line only, as `quote`'s export has.
2917
+ ...list.byLine ? refused.map((error) => unlisted(error.input)) : [],
2918
+ ], list.symbols, list.typedForms, unlisted)
2919
+ .flatMap(({ bars, input, duplicateOf }) => bars.map((bar) => ({ ...bar, input, ...duplicateOf ? { duplicateOf } : {} })));
2920
+ }
2921
+
2844
2922
  type FinancialsView = "statements" | "fundamentals" | "valuation";
2845
2923
 
2846
2924
  const STATEMENT_COLUMNS: CliResultColumn<ReturnType<typeof financialStatementRows>[number]>[] = [
@@ -2974,7 +3052,7 @@ async function runFinancials(rawArgs: string[], ctx: Parameters<CliCommandDef["e
2974
3052
  } : {},
2975
3053
  // A bank's EV and EV/revenue are null with why: n/m for banks.
2976
3054
  fundamentals: priced.fundamentals && exportedDividendFundamentals(
2977
- exportedFundamentals(withBankEnterpriseValue(priced.fundamentals, priced.profile))!, report.distributions),
3055
+ exportedFundamentals(withFinancialEnterpriseValue(priced.fundamentals, priced.profile))!, report.distributions),
2978
3056
  // A bond fund's sponsor figures; fundamentals.dividendYield is then its distribution yield, not its SEC yield.
2979
3057
  ...bond ? { bondFund: bond } : {},
2980
3058
  ...view === "fundamentals" ? { statementFilings, bank: bank.bank, ...bank.note ? { bankNote: bank.note } : {} } : {},
@@ -3044,13 +3122,21 @@ const NEWS_COLUMNS = [
3044
3122
  format: (value: unknown) => typeof value === "string" ? formatUtcTime(value) : "",
3045
3123
  },
3046
3124
  { key: "source", header: "Source" },
3047
- { key: "title", header: "Title" },
3125
+ // "Transaction in own shares (8 notices since 30 Oct)" for a folded row; exports keep the title and the count apart.
3126
+ { key: "title", header: "Title", format: listedRowHeadline },
3048
3127
  { key: "tickers", header: "Tickers" },
3049
3128
  // The short id `fn news-story-pane` opens the story by; exports keep the whole id.
3050
3129
  { key: "id", header: "ID", format: (value: unknown) => typeof value === "string" ? shortStoryId(value) : "" },
3051
3130
  { key: "url", header: "URL", optional: true },
3052
3131
  ];
3053
3132
 
3133
+ /** CSV's columns: the text table's, and how many routine notices a folded row stands for and since when. */
3134
+ const NEWS_EXPORT_COLUMNS = [
3135
+ ...NEWS_COLUMNS,
3136
+ { key: "routineNotices", header: "Routine notices" },
3137
+ { key: "routineSince", header: "Routine since" },
3138
+ ];
3139
+
3054
3140
  /**
3055
3141
  * A story's summary under its row, on one line, cut to the width (`rowNote`): the figure a headline leaves out.
3056
3142
  * None for a summary that only repeats the headline; exports keep the summary whole.
@@ -3096,7 +3182,8 @@ async function printNewsSearch(
3096
3182
  }, {
3097
3183
  heading: newsSearchHeading(text, [reason, closestReason].filter(Boolean).join(" · ") || undefined),
3098
3184
  rows: newsRows,
3099
- columns: NEWS_COLUMNS,
3185
+ columns: NEWS_EXPORT_COLUMNS,
3186
+ textColumns: NEWS_COLUMNS,
3100
3187
  rowNote: newsRowNote,
3101
3188
  empty: named ? noStoriesMessage(text, route) : empty ?? (searched ? noStoriesMessage(text, null) : "No stories to show."),
3102
3189
  ...(listing ? { footnote: listing.note } : {}),
@@ -3141,7 +3228,8 @@ async function printMetalNews(route: MetalNewsRoute, limit: number, ctx: Paramet
3141
3228
  }, {
3142
3229
  heading: metalNewsHeading(route),
3143
3230
  rows: newsRows,
3144
- columns: NEWS_COLUMNS,
3231
+ columns: NEWS_EXPORT_COLUMNS,
3232
+ textColumns: NEWS_COLUMNS,
3145
3233
  rowNote: newsRowNote,
3146
3234
  empty: failure === undefined ? noMetalStoriesMessage(route) : "No stories to show.",
3147
3235
  ...(ticker ? { footnote: `${word} ${cliArrow("→")} ${route.metal}'s market news. For ${ticker.name ?? ticker.symbol} (ticker ${ticker.symbol}), try: ${companyNews}` } : {}),
@@ -3289,7 +3377,8 @@ async function runNews(rawArgs: string[], ctx: Parameters<CliCommandDef["execute
3289
3377
  }, {
3290
3378
  ...(identity ? { heading: listingHeading(identity) } : {}),
3291
3379
  rows: newsRows,
3292
- columns: NEWS_COLUMNS,
3380
+ columns: NEWS_EXPORT_COLUMNS,
3381
+ textColumns: NEWS_COLUMNS,
3293
3382
  rowNote: newsRowNote,
3294
3383
  ...(empty ? { empty } : {}),
3295
3384
  ...(wordHint ? { footnote: wordHint } : {}),
@@ -4628,35 +4717,36 @@ async function runEarnings(rawArgs: string[], ctx: Parameters<CliCommandDef["exe
4628
4717
  }
4629
4718
  // Each date is resolved as events, EE, ERN and OSA resolve it: one that has come is read against the
4630
4719
  // company's quarters on record, for its actual and the next report on record (shared/earnings-calendar).
4631
- const today = newYorkDay();
4720
+ // A date is read on its listing's own day: SIE:XETRA's 12 Nov report has passed on Berlin's Friday.
4721
+ const now = Date.now();
4722
+ const today = newYorkDay(now);
4723
+ const dayOf = (listing: CliListing) => listingDay(listing.request.exchange || listing.exchange, now);
4632
4724
  const resolved = await resolveListingEvents(services.dataProvider, listings.map((listing) => ({
4633
- key: listing.key, symbol: listing.request.symbol, exchange: listing.request.exchange,
4725
+ key: listing.key, symbol: listing.request.symbol, exchange: listing.request.exchange, today: dayOf(listing),
4634
4726
  })), calendar, today);
4635
4727
  const events: ResolvedEarningsEvent[] = calendar
4636
- .map((event) => resolved.get(event.symbol.toUpperCase()) ?? { ...event, dateStatus: calendarStatus(event, today) })
4728
+ .map((event) => {
4729
+ const listing = listings.find((entry) => entry.key.toUpperCase() === event.symbol.toUpperCase());
4730
+ return resolved.get(event.symbol.toUpperCase()) ?? { ...event, dateStatus: calendarStatus(event, listing ? dayOf(listing) : today) };
4731
+ })
4637
4732
  .sort((left, right) => left.earningsDate.getTime() - right.earningsDate.getTime());
4638
4733
  const eventOf = (listing: CliListing) => events.find((event) => event.symbol.toUpperCase() === listing.key.toUpperCase());
4639
- const [abroadNotes, choiceNotes] = await Promise.all([
4640
- // A listing abroad with no date of its own says so, with its US line's date when that line is the same company.
4641
- Promise.all(listings.filter((listing) => isListingAbroad(listing) && !eventOf(listing))
4642
- .map((listing) => noListingCalendarNote(listing, services))),
4734
+ // A listing the calendar has no date for is named, with when it last reported and where its headlines are: a
4735
+ // list never drops a symbol unsaid. Each costs reads, so a long list names the rest without them.
4736
+ const undatedListings = listings.filter((listing) => !eventOf(listing));
4737
+ const [undatedNotes, choiceNotes] = await Promise.all([
4738
+ Promise.all(undatedListings.map((listing, index) => undatedListingNote(listing, services, { now, lookup: index < MAX_CHOICE_LOOKUPS }))),
4643
4739
  Promise.all(listings.map(async (listing) => {
4644
4740
  const listed = venues.get(listing);
4645
4741
  return listed ? earningsChoiceNote(listing, eventOf(listing), await listed) : null;
4646
4742
  })),
4647
4743
  ]);
4648
- // A listing at home the calendar has no date for is named as well, with when it last reported: a list never
4649
- // drops a symbol unsaid.
4650
- const homeUndated = listings.filter((listing) => !isListingAbroad(listing) && !eventOf(listing));
4651
- const lastReported = new Map(await Promise.all(homeUndated.slice(0, MAX_CHOICE_LOOKUPS)
4652
- .map(async (listing) => [listing.key, await lastReportedDay(services.dataProvider, listing, today)] as const)));
4653
- const undated = undatedListingsNote(homeUndated, lastReported);
4654
- const noCalendar = [...abroadNotes, ...undated ? [undated] : []].join("\n");
4744
+ const noCalendar = undatedNotes.join("\n");
4655
4745
  // Text prints the listings without a calendar under the table; other formats carry them as warnings.
4656
4746
  const warnings = [
4657
4747
  ...listings.flatMap(listingReadNotes),
4658
4748
  ...choiceNotes.filter((note): note is string => !!note),
4659
- ...ctx.cliOptions.format === "text" ? [] : [...abroadNotes, ...undated ? undated.split("\n") : []],
4749
+ ...ctx.cliOptions.format === "text" ? [] : undatedNotes,
4660
4750
  ];
4661
4751
  ctx.printResult({
4662
4752
  data: events,
@@ -4739,8 +4829,9 @@ export const marketDataCliCommands: BuiltinCliCommandDef[] = [
4739
4829
  }, {
4740
4830
  title: "Several symbols",
4741
4831
  lines: [
4742
- `history AAPL MSFT 000660.KS, or --file with one symbol a line (- reads standard input), writes every symbol's bars in one long table, ${HISTORY_LIST_CONCURRENCY} symbols loading at once. Each row names its symbol, its unit and the as-of of that symbol's bars in symbol_or_series, currency_or_unit and as_of.`,
4743
- "A symbol with no history is one row with its reason in status, and a warning names it; the command fails only when no symbol has any. A word typed on the command line that is no ticker fails the command, and a bar size typed in a symbol's place (1s, 30s, 1m) says where the finest bars are; a list from --file keeps a row for a line that is no ticker. --tail 5 keeps each symbol's newest five bars.",
4832
+ `history AAPL MSFT 000660.KS writes every symbol's bars in one long table, ${HISTORY_LIST_CONCURRENCY} symbols at a time; --file list.txt (- for standard input) reads one symbol a line. symbol_or_series, currency_or_unit and as_of name each row's symbol, unit and as-of.`,
4833
+ "A symbol with no bars is one row with why in status; the command fails only when none has any. A word typed on the command line that is no ticker fails it, and a bar size in a symbol's place (1s, 30s, 1m) says where the finest bars are. --tail 5 keeps each symbol's newest five bars.",
4834
+ "A --file list of one symbol a line has a row for every line, in its order: a blank line, or one that names no listing, is one row with why in status. A --file list's export adds input, the line as typed, and duplicate_of, the earlier line that is the same listing.",
4744
4835
  "--wide sets the symbols side by side instead: one row per date, one close column per symbol headed with its unit (USDJPY=X close (JPY per USD)), a blank where a symbol has no bar that day. history USDJPY=X USDCHF=X EURCHF=X --csv --wide is a spreadsheet of the three closes; --tail 5 keeps the newest five dates.",
4745
4836
  ],
4746
4837
  }, {
@@ -5,7 +5,7 @@ import type { CliCommandDef } from "../../types/plugin";
5
5
  import { withCliServices, withConfigData, withMarketData } from "../context";
6
6
  import { CLI_ERROR_CODE, failWithFields } from "../errors";
7
7
  import type { CliResultColumn } from "../result";
8
- import { formatCompact } from "../../utils/format";
8
+ import { MISSING_VALUE, formatCompact } from "../../utils/format";
9
9
  import { DATE_OPTION_EXAMPLES, DATE_OPTION_FORMATS, dateOptionError, readCalendarDate } from "../../utils/calendar-date";
10
10
  import {
11
11
  fetchPreferredMarketMovers,
@@ -63,6 +63,8 @@ import {
63
63
  } from "../../plugins/builtin/econ/calendar-model";
64
64
  import { hasNoReleaseTime, hasNoStatedTime, type EconEvent } from "../../plugins/builtin/econ/types";
65
65
  import { econRowFigures, figureWithCurrency } from "../../plugins/builtin/econ/figures";
66
+ import { cpiCalendarYearGapReason } from "../../plugins/builtin/shared/cpi-year-gap";
67
+ import { fredSeriesIdForName } from "../../plugins/builtin/econ/fred-catalog";
66
68
  import { isoDate, rejectExtraArgs, requireArg, requireOneArg, takeFlag, takeOption } from "./command-utils";
67
69
  import { buildCorrelationSeries } from "../../plugins/builtin/correlation/matrix/model";
68
70
  import { alignDailyCloses, correlateDailyCloses } from "../../plugins/builtin/correlation/compute";
@@ -105,6 +107,9 @@ import {
105
107
  import { fredProvenance, fredPublicationTime, notOnFredSource } from "../../sources/gloomberb-cloud/fred-attribution";
106
108
  import { followsUsBondMarket, usBondMarketClosedNote } from "../../market-data/us-bond-market";
107
109
 
110
+ /** The Actual of a release its publisher could not compute; the notes say why. */
111
+ const NOT_PUBLISHED_TEXT = "not published";
112
+
108
113
  // Batch quotes often omit names for indices and ETFs; these baskets are fixed, so name them here.
109
114
  const BASKET_NAMES = new Map<string, string>([
110
115
  ...WORLD_INDICES.map((entry) => [entry.symbol, entry.name] as const),
@@ -664,8 +669,10 @@ async function runEcon(args: string[], ctx: Parameters<CliCommandDef["execute"]>
664
669
  forecastText: event.forecast ?? null,
665
670
  priorText: event.prior ?? null,
666
671
  // A release past its time with no figure yet: "due 07:00 UTC, awaiting figure", then "no figure from the source"
667
- // two hours on or once the release's other rows have theirs; null otherwise.
668
- actualStatus: ((gap) => gap ? figureGapText(event, gap) : null)(figureGap(event, now, inWindow)),
672
+ // two hours on or once the release's other rows have theirs; null otherwise. A US CPI y/y BLS could not publish
673
+ // (no index a year before) says so, and the notes say why.
674
+ actualStatus: cpiCalendarYearGapReason(event) ? NOT_PUBLISHED_TEXT
675
+ : ((gap) => gap ? figureGapText(event, gap) : null)(figureGap(event, now, inWindow)),
669
676
  // The publisher's own clock, for rows Gloom Cloud adds from a bank's or a statistics office's calendar.
670
677
  localTime: event.localTime ?? null,
671
678
  timeZone: event.timeZone ?? null,
@@ -696,7 +703,12 @@ async function runEcon(args: string[], ctx: Parameters<CliCommandDef["execute"]>
696
703
  // where the end is said.
697
704
  const pastRows = pastListingRows(listed);
698
705
  const listedPast = pastRows ? `No releases listed after ${listedThrough}; the rows after it are ${pastRows}` : null;
699
- const notes = [listedBefore, listedPast ?? listedAfter, ...(rows.length > 0 ? blankTimeNotes(rows) : []),
706
+ // Why a US CPI y/y row has no actual: "2026-11-10 Inflation Rate YoY: BLS published no October 2025 index, so no October 2026 y/y."
707
+ const unpublished = listed.flatMap((event) => {
708
+ const reason = cpiCalendarYearGapReason(event);
709
+ return reason ? [`${isoDate(event.date).slice(0, 10)} ${econEventName(event)}: ${reason}.`] : [];
710
+ });
711
+ const notes = [listedBefore, listedPast ?? listedAfter, ...(rows.length > 0 ? blankTimeNotes(rows) : []), ...unpublished,
700
712
  rows.length > 0 && coverage ? coverage : null,
701
713
  // A dash under Forecast on a release still to come is a consensus not in yet, not a missing figure.
702
714
  listed.some(awaitsConsensus) ? NO_CONSENSUS_NOTE : null]
@@ -832,7 +844,9 @@ async function runFred(rawArgs: string[], ctx: Parameters<CliCommandDef["execute
832
844
  if (changeGiven && !horizon) {
833
845
  ctx.fail(change ? `Unknown change "${change}".` : "--change needs 1D or 1W.", "Use 1D (from the previous observation) or 1W (from a week before).");
834
846
  }
835
- const seriesId = requireOneArg(args, FRED_USAGE, "series", ctx).toUpperCase();
847
+ const asked = requireOneArg(args, FRED_USAGE, "series", ctx);
848
+ // A series by its name (`3 month t-bill` is DTB3) when one alone fits it.
849
+ const seriesId = (/\s/.test(asked.trim()) ? fredSeriesIdForName(asked) : null) ?? asked.toUpperCase();
836
850
  await withSavedFredSeries(ctx, () => printFredSeries(ctx, { seriesId, start, startDate, sortOrder, horizon }));
837
851
  }
838
852
 
@@ -997,12 +1011,12 @@ async function runYieldCurve(rawArgs: string[], ctx: Parameters<CliCommandDef["e
997
1011
  ...(closedDay ? { footnote: closedDay, exportNotes: [closedDay] } : {}),
998
1012
  textColumns: [
999
1013
  { key: "tenor", header: "Tenor", value: (row) => YIELD_TENORS[String(row.seriesId)] ?? row.seriesId },
1000
- { key: "value", header: "Yield %", align: "right", format: (value) => typeof value === "number" ? value.toFixed(2) : "-" },
1014
+ { key: "value", header: "Yield %", align: "right", format: (value) => typeof value === "number" ? value.toFixed(2) : MISSING_VALUE },
1001
1015
  {
1002
1016
  key: "changeBasisPoints",
1003
1017
  header: "1D bp",
1004
1018
  align: "right",
1005
- format: (value) => typeof value === "number" ? formatBasisPoints(value / 100, 1) : "-",
1019
+ format: (value) => typeof value === "number" ? formatBasisPoints(value / 100, 1) : MISSING_VALUE,
1006
1020
  },
1007
1021
  { key: "date", header: "Date" },
1008
1022
  { key: "seriesId", header: "Series" },