basalt-ui 2.4.0 → 2.6.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 (59) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/MIGRATING.md +51 -12
  3. package/agent/rules/basalt-batteries.md +1 -1
  4. package/agent/rules/basalt-charts.md +1 -1
  5. package/agent/rules/basalt-mantine.md +1 -1
  6. package/agent/rules/basalt-state.md +2 -2
  7. package/agent/skills/basalt-app/SKILL.md +5 -5
  8. package/configs/oxlint-plugin.js +6 -3
  9. package/configs/oxlint-plugin.test.ts +8 -0
  10. package/dist/agent/ai-sdk-transport.d.ts.map +1 -1
  11. package/dist/agent/ai-sdk-transport.js +4 -1
  12. package/dist/agent/index.d.ts +1 -1
  13. package/dist/agent/index.d.ts.map +1 -1
  14. package/dist/agent/run-records.d.ts +12 -3
  15. package/dist/agent/run-records.d.ts.map +1 -1
  16. package/dist/agent/run-records.js +16 -3
  17. package/dist/agent/transport.d.ts +10 -3
  18. package/dist/agent/transport.d.ts.map +1 -1
  19. package/dist/agent/use-agent-thread-runs.d.ts.map +1 -1
  20. package/dist/agent/use-agent-thread-runs.js +23 -7
  21. package/dist/charts/DualPanel.d.ts.map +1 -1
  22. package/dist/charts/DualPanel.js +14 -5
  23. package/dist/charts/MirroredBars.d.ts.map +1 -1
  24. package/dist/charts/MirroredBars.js +6 -4
  25. package/dist/charts/compile.d.ts +4 -0
  26. package/dist/charts/compile.d.ts.map +1 -1
  27. package/dist/charts/compile.js +40 -11
  28. package/dist/charts/panel.d.ts +6 -0
  29. package/dist/charts/panel.d.ts.map +1 -1
  30. package/dist/charts/panel.js +10 -1
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/provider/index.d.ts.map +1 -1
  34. package/dist/provider/index.js +8 -2
  35. package/dist/state/fields.d.ts +52 -15
  36. package/dist/state/fields.d.ts.map +1 -1
  37. package/dist/state/fields.js +49 -3
  38. package/dist/state.d.ts +2 -1
  39. package/dist/state.d.ts.map +1 -1
  40. package/dist/state.js +2 -0
  41. package/dist/telemetry.d.ts +58 -4
  42. package/dist/telemetry.d.ts.map +1 -1
  43. package/dist/telemetry.js +13 -5
  44. package/llms.txt +2 -2
  45. package/package.json +1 -1
  46. package/src/agent/ai-sdk-transport.ts +5 -2
  47. package/src/agent/index.ts +1 -1
  48. package/src/agent/run-records.ts +27 -3
  49. package/src/agent/transport.ts +11 -5
  50. package/src/agent/use-agent-thread-runs.ts +35 -8
  51. package/src/charts/DualPanel.tsx +13 -4
  52. package/src/charts/MirroredBars.tsx +5 -3
  53. package/src/charts/compile.ts +59 -12
  54. package/src/charts/panel.tsx +16 -1
  55. package/src/index.ts +1 -1
  56. package/src/provider/index.tsx +8 -2
  57. package/src/state/fields.ts +112 -21
  58. package/src/state.ts +2 -0
  59. package/src/telemetry.ts +70 -7
package/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ # [2.6.0](https://github.com/jkrumm/basalt-ui/compare/v2.5.0...v2.6.0) (2026-10-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * answer the DX trial's page-shape and queryFn questions in the shipped layer ([a84293a](https://github.com/jkrumm/basalt-ui/commit/a84293a2c7b2e0549f86cca4e4eb0ce38d56e3de))
7
+
8
+
9
+ ### Features
10
+
11
+ * bind a basalt control to a field backed by an external store ([d5f0674](https://github.com/jkrumm/basalt-ui/commit/d5f06740aeec4841da83980b49f50c05e24dbca5))
12
+ * write an externalField from its store, not a render ([5853413](https://github.com/jkrumm/basalt-ui/commit/5853413973d8e83c08567933d40a340e676d09d0))
13
+
14
+ # [2.5.0](https://github.com/jkrumm/basalt-ui/compare/v2.4.0...v2.5.0) (2026-10-14)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * keep short-chart y labels inside only and lift ref swatch contrast ([480ca90](https://github.com/jkrumm/basalt-ui/commit/480ca90ae9ed3d7c4b9d057051bbf5308e7a871b))
20
+ * thread the short-chart label rule through composed panes ([7d56a17](https://github.com/jkrumm/basalt-ui/commit/7d56a17e6de2942a4ad7ceb385d59e40d6a4b1ff))
21
+
22
+
23
+ ### Features
24
+
25
+ * carry a call-site fallback from a store field into its control ([cb8819b](https://github.com/jkrumm/basalt-ui/commit/cb8819bd36a832258616915778ab84786291fcb7))
26
+ * make withFallback the only call-site fallback ([f946e67](https://github.com/jkrumm/basalt-ui/commit/f946e6750b52543389aea55bbf44fc11b6f2368d))
27
+ * propagate the chat turn's trace context to the chat endpoint ([c321b55](https://github.com/jkrumm/basalt-ui/commit/c321b555f4f443046ec00c1eec10d2cd124c8390))
28
+ * settle a superseded turn's trace and export the trace-context types ([7aa3781](https://github.com/jkrumm/basalt-ui/commit/7aa3781e807b0c89fc0e5dd6853240596ab000ff))
29
+
1
30
  # [2.4.0](https://github.com/jkrumm/basalt-ui/compare/v2.3.0...v2.4.0) (2026-10-14)
2
31
 
3
32
 
package/MIGRATING.md CHANGED
@@ -66,18 +66,18 @@ There is one row per SURFACE, not per export, and a surface earns a row once any
66
66
  shipped lefthook preset both changed in 1.30.0 with no row that owned them — which is how a
67
67
  consumer read this index, found nothing, and diffed a KPI row that had silently gone 4-up → 2-up.
68
68
 
69
- | Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | Unreleased |
70
- | ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
- | **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
72
- | **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
73
- | **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
74
- | **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
75
- | **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
76
- | **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
77
- | **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
78
- | **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
79
- | **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — |
80
- | **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
69
+ | Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | Unreleased |
70
+ | ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
+ | **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
72
+ | **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
73
+ | **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
74
+ | **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
75
+ | **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
76
+ | **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
77
+ | **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
78
+ | **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
79
+ | **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — |
80
+ | **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
81
81
 
82
82
  ---
83
83
 
@@ -992,6 +992,45 @@ optional, subpath-required peers.
992
992
  _Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
993
993
  release renames it and opens a new one here._
994
994
 
995
+ ## 2.6.0 — external-store fields, a live query-fn-unwrap, page shape
996
+
997
+ - `externalField({ values, fallback, labels, store })` (`basalt-ui/state`) returns a `FieldHandle`
998
+ over a value a foreign store owns (a zustand slice): `ViewTabs`, `SelectFilter` and `EnumFilter`
999
+ take it as `field=` like any store field. No URL, localStorage or memory lane; `store` is the
1000
+ non-hook API (`{ get, set, subscribe }` — zustand's `getState`/`setState`/`subscribe`), read at
1001
+ definition so `clear()` writes `set(fallback)` mounted or not; `fallback` must be one of `values`. Replaces a raw `SegmentedControl` behind
1002
+ `theme-allow control-outside-home, raw-selection-control` (argo `timer-card.tsx`). Rule: `basalt-state`.
1003
+ - A card BODY is still not a control home. Mount the bound control in the card's header slot
1004
+ (`<WidgetHeader actions={<ViewTabs field={timerMode} label="Timer mode" />} />`); no lint change.
1005
+ - **Lint, may surface new errors:** `basalt/query-fn-unwrap` was dead since 1.29.0 (it only saw the
1006
+ removed `basalt-ui/query` import). It now also fires in files importing `basalt-ui`: an inline
1007
+ `queryFn` calling `fetch(` must wrap the response in `unwrap()`. A mock `queryFn` returning plain
1008
+ data is exempt.
1009
+ - The `basalt-app` skill's page example is the canonical shell page (`PageBar` only to fill a slot);
1010
+ inside a `ChartCard` the card owns `state`, a bare chart kind owns its own.
1011
+
1012
+ ## 2.5.0 — call-site fallbacks for controls, chat trace headers, axis labels
1013
+
1014
+ - `createLocalStore` fields take `withFallback(value)`: the same field (key, setter, `clear()`)
1015
+ with a call-site unset value, for `use()` and any filter control as `field=`
1016
+ (`<SelectFilter field={store.field.exercise.withFallback(leader)} />`). Never persisted; a reset
1017
+ returns to it; `fallback` and `isDefault` on the derived handle report it. Rule: `basalt-state`.
1018
+ `createSearchStore` fields do not take it: the URL lane drops a value equal to the definition's
1019
+ fallback, so a second default would make one URL mean two things.
1020
+ - `use({ fallback })` is removed — replaced by `field.withFallback(value).use()`. It existed in
1021
+ 2.4.0 only and has no known consumers. argo `strength-composite-chart.tsx`: bind
1022
+ `store.field.exercise.withFallback(leader)` instead of rebuilding the store per leader.
1023
+ - A `telemetry` sink may define `startChatTurn(turn)` returning `{ headers?: { traceparent,
1024
+ tracestate? }, settle?(end) }`: `aiSdkTransport` sends those headers with that turn's chat
1025
+ request (so the API span joins the dashboard trace) and `settle` runs once when the turn ends
1026
+ (also on a superseded or failed turn). `Telemetry`, `ChatTurnTrace`, `ChatTurnEnd`,
1027
+ `TraceHeaders` are exported. Optional: without the hook nothing changes. A cross-origin chat API
1028
+ must allow `traceparent` in CORS.
1029
+ - Y-axis tick labels sit inside the plot only for a compact chart under the box's short height
1030
+ (180 px), across every kind including `DualPanel` and `MirroredBars`; a regular-height chart
1031
+ keeps them in the left gutter. Reference-line legend swatches meet the series-swatch contrast in
1032
+ light and dark.
1033
+
995
1034
  ## 2.4.0 — chart gaps and legends, local-store fallbacks, the pre-commit hook
996
1035
 
997
1036
  All additive; no call site changes. Named consumers are argo `apps/dashboard/src/features/…`.
@@ -18,7 +18,7 @@ paths:
18
18
 
19
19
  ## Query
20
20
 
21
- - Wrap every `queryFn` response in `unwrap()`; it throws on the error branch and on `null` data. [basalt/query-fn-unwrap]
21
+ - Wrap every API-client `queryFn` response in `unwrap()` (it throws on the error branch and on `null` data); a mock returning plain data needs none, and the lint sees only an inline `queryFn` calling `fetch(`. [basalt/query-fn-unwrap]
22
22
  - The client comes from `createBasaltRouter`; extend it via its `query:` option. [type createBasaltRouter]
23
23
 
24
24
  ## Forms
@@ -24,7 +24,7 @@ Every cartesian chart is `CartesianChart` or a kind built on it; props are in th
24
24
  - Draw `plot.rows(key)` and `plot.visible`, never the `series` prop, so a legend toggle hides the mark. [type PlotContext]
25
25
  - A second axis is `y2` with a series `axis: 'right'`; there is no margin prop. [type CartesianChartProps]
26
26
  - Size is `height` (a number or per container class); the host measures the width. [type ResponsiveChartHeight]
27
- - A pending, failed or empty query is `state={{ pending, error, empty }}`, never `data ?? []`; a streamed chart's `<Suspense>` fallback is the same chart with `state={{ pending: true }}`, which fills the final box. [type ChartState]
27
+ - A pending, failed or empty query is `state={{ pending, error, empty }}`, never `data ?? []`; a streamed chart's `<Suspense>` fallback is the same chart with `state={{ pending: true }}`, which fills the final box; inside a `ChartCard` the card owns `state` (header kept, body swapped), the kind only when bare. [type ChartState] [type ChartCardProps]
28
28
  - Zones, thresholds and reference lines are `zones`, `xZones` and `refLines` data. [type ZoneSpec]
29
29
  - Extra tooltip rows are `tooltip.rows` data, never markup. [type ChartTooltipConfig]
30
30
  - Charts share one cursor by default; `cursorGroup` isolates one, `chartCursor(group?)` reads it. [type chartCursor]
@@ -27,7 +27,7 @@ paths:
27
27
  - One `BasaltShell nav={NAV}` in `__root.tsx` wraps `<Outlet />`; never build `AppShell.*` parts or a `Burger`, and never wrap `<Outlet />` in `<ViewTransition>` (the router animates route changes in nav order). [basalt/hand-rolled-shell] [basalt/route-view-transition]
28
28
  - Shell extensions are typed data props (`globalActions`, `sidebarBlocks`, `brand`, `search`, `settingsMenuItems`, `account`), never `ReactNode` slots. [type BasaltShell]
29
29
  - Pass no `renderNavLink`, `renderBreadcrumbLink` or `withBorder`; the shell resolves links against the router and draws region edges. [type BasaltShell]
30
- - A page is named once, by its nav item's `label` (the breadcrumb), `PageBar.title` (no shell) or `PageTitle` (shell-less screen); no in-body `<Title order={1|2}>`. [basalt/in-body-page-title] [check-theme in-body-page-title]
30
+ - A page is named once, by its nav item's `label` (the breadcrumb), `PageBar.title` (no shell) or `PageTitle` (shell-less screen); no in-body `<Title order={1|2}>`. [basalt/in-body-page-title] [check-theme in-body-page-title]; a shell page renders `<PageBar />` only to fill a slot (`actions`, `sync`, `tabs`, `filters`) and its `title` is ignored there. [type PageBar]
31
31
  - A nav item's mobile placement is its `mobile` field: `'tab'`, `'more'` or `'hidden'`. [type defineNav]
32
32
 
33
33
  ## Surfaces
@@ -19,12 +19,12 @@ State a control reads or writes is a field on a store; the URL wins over localSt
19
19
  ## Stores
20
20
 
21
21
  - Define filters, tabs, ranges and pagination as fields of `createSearchStore` (URL) or `createLocalStore` (no router), with `field.range|multi|enum|boolean`. [type createSearchStore]
22
- - Never `useState` for a filter, tab, range or view; a basalt control takes a `field` and has no `value` or `onChange`. [check-theme raw-selection-control]
22
+ - Never `useState` for a filter, tab, range or view; a basalt control takes a `field` and has no `value` or `onChange`. A value another store owns (a zustand slice) binds as `externalField({ values, fallback, labels, store: { get, set, subscribe } })`, no lane, `clear()` writes the fallback. [check-theme raw-selection-control]
23
23
  - Declare lanes once at definition: `{ url, persist, history }`; `url: false` is local-only, `persist: false` is URL-only. [type field]
24
24
  - Option labels come from `.labels()` at definition, never a control prop. [type createSearchStore]
25
25
  - Route `validateSearch` is `store.validateSearch`; a wider search shape spreads `...store.validateSearch(raw)`. [type createSearchStore]
26
26
  - Read with `store.useValues()` or take the value as a prop; never `useSearch({ from: '<literal>' })`. [basalt/use-search-from-literal]
27
- - A handle's `use()` returns `[value, setValue]`; the setter owns the navigate and the persist; on a `createLocalStore` field a prop-derived default is `use({ fallback })` (unset only, never persisted; search stores lack it), never a store rebuilt per prop. [type field]
27
+ - A handle's `use()` returns `[value, setValue]`; the setter owns the navigate and the persist; on a `createLocalStore` field a prop-derived default is `store.field.x.withFallback(value)`, passed to `use()` and to any control as `field=` (unset only, never persisted, a reset returns to it, `isDefault` follows it; search stores lack it, a derived handle does not derive again), never a store rebuilt per prop. [type field]
28
28
  - Count active filters and reset them with the store's `useActiveCount()` and `useReset()`; a reset unsets, it does not write the fallback. [type createSearchStore]
29
29
  - A color scheme is `useMantineColorScheme()`, never a store or `localStorage['theme']`. [check-theme localstorage-theme]
30
30
  - A preference that must survive navigation but is not URL-worthy uses `createPersistedState`, called once at module scope. [type createPersistedState]
@@ -36,11 +36,12 @@ createRoot(document.getElementById('root')!).render(<BasaltProvider router={rout
36
36
  ```tsx
37
37
  // @check
38
38
  import { Link, createFileRoute, linkOptions } from '@tanstack/react-router'
39
- import { defineNav, navGroup, navTarget } from 'basalt-ui'
40
- // src/routes/dashboard.tsx — the breadcrumb and page title come from the nav item's `label`; export the component too (react/only-export-components)
39
+ import { PageBar, defineNav, navGroup, navTarget } from 'basalt-ui'
40
+ // src/routes/dashboard.tsx — the nav item's `label` is the page name (breadcrumb); export the component too (react/only-export-components)
41
41
  export const Route = createFileRoute('/dashboard')({ component: Dashboard })
42
42
  export function Dashboard() {
43
- return <h2>Dashboard</h2>
43
+ // a PageBar only fills slots (actions, sync, tabs, filters); the body has no title
44
+ return <PageBar actions={[{ key: 'export', label: 'Export', primary: true }]} />
44
45
  }
45
46
  // src/lib/nav.tsx
46
47
  export const NAV = defineNav({
@@ -241,8 +242,7 @@ export function Chat() {
241
242
 
242
243
  ## Refresh after any upgrade
243
244
 
244
- 1. `./node_modules/.bin/basalt-ui sync` (`--check` in CI, `--force` overwrites local edits).
245
- 2. Read its output: edited files are skipped, retired files are deleted, the AGENTS.md block is rewritten.
245
+ 1. `./node_modules/.bin/basalt-ui sync` (`--check` in CI, `--force` overwrites local edits); read its output: edited files are skipped, retired files are deleted, the AGENTS.md block is rewritten.
246
246
 
247
247
  ## Upgrade 1.x to 2.0
248
248
 
@@ -3135,11 +3135,14 @@ const boundControlOutsideHome = {
3135
3135
 
3136
3136
  /** The `basalt-ui/query` subpath, exactly — kept for `query-fn-unwrap`'s own gate below. */
3137
3137
  const BASALT_QUERY_SOURCE = 'basalt-ui/query'
3138
+ /** `unwrap` ships from the root since 1.29.0; the `./query` subpath is gone, so the root counts too. */
3139
+ const QUERY_UNWRAP_SOURCES = new Set([BASALT_QUERY_SOURCE, 'basalt-ui'])
3138
3140
 
3139
3141
  // ── Rule 28 — query-fn-unwrap ───────────────────────────────────────────────────────────────────
3140
3142
 
3141
3143
  const QUERY_FN_UNWRAP_MESSAGE =
3142
- 'queryFn fetches without unwrap() — `unwrap` throws on the error branch AND on a null data with ' +
3144
+ 'queryFn calls fetch( without unwrap() (scope: an inline queryFn with a literal fetch( call in a ' +
3145
+ 'file importing basalt-ui; a mock queryFn returning plain data is exempt) — `unwrap` throws on the error branch AND on a null data with ' +
3143
3146
  'no error (a 204, a silent transport failure), and both are caller bugs that have to surface as ' +
3144
3147
  'a rejected query rather than as `data: null` rendered through the success branch ' +
3145
3148
  '(agent/rules/basalt-batteries.md). Wrap the call: `queryFn: () => unwrap(client.thing.get())`. ' +
@@ -3165,7 +3168,7 @@ const UNWRAP_CALL = /\bunwrap\s*\(/
3165
3168
  * something else. A stricter version would need the call graph. The narrow version fires on the
3166
3169
  * form a consumer writes by reflex on day one, which is the one the law exists for.
3167
3170
  *
3168
- * Scoped to files importing `basalt-ui/query` literally, for the reason {@link queryDualImport}
3171
+ * Scoped to files importing `basalt-ui` or `basalt-ui/query` literally, for the reason {@link queryDualImport}
3169
3172
  * gives: without that gate it is an opinion about `fetch`, which basalt does not have.
3170
3173
  */
3171
3174
  // Ships: error
@@ -3182,7 +3185,7 @@ const queryFnUnwrap = {
3182
3185
 
3183
3186
  return {
3184
3187
  ImportDeclaration(node) {
3185
- if (node.source?.value === BASALT_QUERY_SOURCE) basaltQuery = true
3188
+ if (QUERY_UNWRAP_SOURCES.has(node.source?.value)) basaltQuery = true
3186
3189
  },
3187
3190
  Property(node) {
3188
3191
  if (propertyKeyName(node) !== 'queryFn') return
@@ -3157,6 +3157,14 @@ describe('basalt/query-fn-unwrap', () => {
3157
3157
  expect(rules).not.toContain('query-fn-unwrap')
3158
3158
  })
3159
3159
 
3160
+ it('flags a fetching queryFn in a file importing the root barrel', () => {
3161
+ const { code, rules } = run(
3162
+ `import { unwrap } from 'basalt-ui'\nexport const o = { queryKey: ['t'], queryFn: () => fetch('/api/t') }\n`,
3163
+ )
3164
+ expect(code).toBe(1)
3165
+ expect(rules).toContain('query-fn-unwrap')
3166
+ })
3167
+
3160
3168
  it('honours a theme-allow naming the rule', () => {
3161
3169
  const { code, rules } = run(
3162
3170
  `${IMPORT}export const o = {\n queryKey: ['t'],\n` +
@@ -1 +1 @@
1
- {"version":3,"file":"ai-sdk-transport.d.ts","sourceRoot":"","sources":["../../src/agent/ai-sdk-transport.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,SAAS,CAAA;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAK1D,OAAO,KAAK,EACV,aAAa,EAGb,SAAS,EAGV,MAAM,IAAI,CAAA;AAOX,MAAM,MAAM,gBAAgB,GAAG;IAC7B,kFAAkF;IAClF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAA;IAC9B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,GAAG,SAAS,CAAA;IAC/D,oFAAoF;IACpF,QAA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AAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,GAAG,SAAS,CAAA;IAC/D,oFAAoF;IACpF,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACrD;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,GAAG,SAAS,CAAA;CACrD,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,kBAAkB,CAAA;AAIzE,MAAM,MAAM,cAAc,CAAC,KAAK,GAAG,SAAS,IAAI,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG;IACvF;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;CAC/E,CAAA;AA8RD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,GAAG,SAAS,EAC9C,OAAO,EAAE,qBAAqB,GAC7B,cAAc,CAAC,KAAK,CAAC,CA+DvB"}
@@ -177,7 +177,10 @@ function aiSdkTransport(options) {
177
177
  messages: [userMessage],
178
178
  trigger: "submit-message",
179
179
  messageId: void 0,
180
- abortSignal: signal
180
+ abortSignal: signal,
181
+ // Per-turn trace context goes to the chat endpoint only (merged over the static headers by
182
+ // AI SDK's HTTP transport); absent, the request is exactly what it was.
183
+ ...ctx?.headers !== void 0 ? { headers: ctx.headers } : {}
181
184
  });
182
185
  yield* diffChunkStream(chatId, chunkStream, readStream, signal);
183
186
  },
@@ -18,7 +18,7 @@ export { toAgentError } from './error.js';
18
18
  export type { ChatMessage } from './history.js';
19
19
  export type { AgentThread, ThreadStatus, ThreadsStore } from './thread.js';
20
20
  export type { AgentOutcome, OutcomeResolver } from './outcome.js';
21
- export type { AgentTransport, ResumableAgentTransport } from './transport.js';
21
+ export type { AgentStreamContext, AgentTransport, ResumableAgentTransport } from './transport.js';
22
22
  export { ThreadFeed } from './chat/thread-feed.js';
23
23
  export { ThreadFeedRow } from './chat/thread-feed-row.js';
24
24
  export type { MessageAffordances } from './chat/message-affordances.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAGzF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC9D,YAAY,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,EA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AAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA"}
@@ -11,12 +11,13 @@
11
11
  * being driven, long before the `setRuns` it queues renders. That window is what the record
12
12
  * covers: it outlives the run only until a render shows the outcome (`sweepFlushed`).
13
13
  */
14
+ import type { ChatTurnEnd, ChatTurnTrace } from '../telemetry.js';
14
15
  /** The part of a rendered `runs` entry this module reads. */
15
16
  type RenderedRun<TPart> = {
16
17
  readonly status: string;
17
18
  readonly parts: TPart[];
18
19
  };
19
- export type RunEnd = 'settled' | 'failed' | 'stopped';
20
+ export type RunEnd = ChatTurnEnd;
20
21
  export type RunRecord<TPart> = {
21
22
  readonly controller: AbortController;
22
23
  /** The unthrottled accumulator; `runs` may lag it by one throttle window. Emptied when the run ends. */
@@ -28,10 +29,18 @@ export type RunRecord<TPart> = {
28
29
  ended: RunEnd | undefined;
29
30
  /** A newer run began on the same thread (set by `beginRun` on the record it replaces). */
30
31
  superseded: boolean;
32
+ /** The turn's telemetry `settle`, run once by `settleTrace`. */
33
+ settle: ChatTurnTrace['settle'];
31
34
  };
32
35
  export type RunRecords<TPart> = Map<string, RunRecord<TPart>>;
33
- /** Registers a live run for `threadId`, replacing whatever record the previous run left. */
34
- export declare function beginRun<TPart>(records: RunRecords<TPart>, threadId: string, controller: AbortController): RunRecord<TPart>;
36
+ /**
37
+ * Registers a live run for `threadId`, replacing whatever record the previous run left. A previous
38
+ * run still being driven is cut short: its trace settles as `stopped`. `settle` is the new turn's
39
+ * telemetry hook (absent for a resume).
40
+ */
41
+ export declare function beginRun<TPart>(records: RunRecords<TPart>, threadId: string, controller: AbortController, settle?: ChatTurnTrace['settle']): RunRecord<TPart>;
42
+ /** Runs the turn's telemetry `settle` once; a throwing consumer hook never breaks the run. */
43
+ export declare function settleTrace<TPart>(record: RunRecord<TPart>, end: RunEnd): void;
35
44
  /** Marks a run as no longer driven and drops the content it held. */
36
45
  export declare function endRun<TPart>(record: RunRecord<TPart>, reason: RunEnd): void;
37
46
  /** True while `controller`'s run is still the thread's live one. */
@@ -1 +1 @@
1
- {"version":3,"file":"run-records.d.ts","sourceRoot":"","sources":["../../src/agent/run-records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,6DAA6D;AAC7D,KAAK,WAAW,CAAC,KAAK,IAAI;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,CAAA;CAAE,CAAA;AAE9E,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAErD,MAAM,MAAM,SAAS,CAAC,KAAK,IAAI;IAC7B,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAA;IACpC,wGAAwG;IACxG,KAAK,EAAE,KAAK,EAAE,CAAA;IACd,8DAA8D;IAC9D,QAAQ,EAAE,OAAO,CAAA;IACjB,gEAAgE;IAChE,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,0FAA0F;IAC1F,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;AAE7D,4FAA4F;AAC5F,wBAAgB,QAAQ,CAAC,KAAK,EAC5B,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAC1B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAAe,GAC1B,SAAS,CAAC,KAAK,CAAC,CAalB;AAED,qEAAqE;AACrE,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAG5E;AAED,oEAAoE;AACpE,wBAAgB,MAAM,CAAC,KAAK,EAC1B,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAC1B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAA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E,WAAW,CAAC,KAAK,CAAC,CAAC,GAC5C,MAAM,EAAE,CAKV;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEpF;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,OAAO,CAEpE;AAED,mGAAmG;AACnG,wBAAgB,YAAY,CAAC,KAAK,EAChC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAC1B,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,GAC5C,IAAI,CAQN"}
@@ -1,17 +1,29 @@
1
- function beginRun(records, threadId, controller) {
1
+ function beginRun(records, threadId, controller, settle) {
2
2
  const record = {
3
3
  controller,
4
4
  parts: [],
5
5
  appended: false,
6
6
  resolving: false,
7
7
  ended: void 0,
8
- superseded: false
8
+ superseded: false,
9
+ settle
9
10
  };
10
11
  const previous = records.get(threadId);
11
- if (previous !== void 0) previous.superseded = true;
12
+ if (previous !== void 0) {
13
+ previous.superseded = true;
14
+ settleTrace(previous, "stopped");
15
+ }
12
16
  records.set(threadId, record);
13
17
  return record;
14
18
  }
19
+ function settleTrace(record, end) {
20
+ const { settle } = record;
21
+ record.settle = void 0;
22
+ try {
23
+ settle?.(end);
24
+ } catch {
25
+ }
26
+ }
15
27
  function endRun(record, reason) {
16
28
  record.ended = reason;
17
29
  record.parts = [];
@@ -65,5 +77,6 @@ export {
65
77
  isLatestRun,
66
78
  isLive,
67
79
  planStopWithTombstone,
80
+ settleTrace,
68
81
  sweepFlushed
69
82
  };
@@ -13,6 +13,15 @@
13
13
  *
14
14
  */
15
15
  import type { AgentPartDraft } from './parts.js';
16
+ /**
17
+ * The third `stream` argument. `headers` are extra request headers for THIS turn's request to the
18
+ * transport's own endpoint — today the W3C trace context a telemetry sink's `startChatTurn`
19
+ * returned. Absent unless a sink contributed; a transport that ignores them keeps working.
20
+ */
21
+ export type AgentStreamContext = {
22
+ readonly messageId: string;
23
+ readonly headers?: Readonly<Record<string, string>> | undefined;
24
+ };
16
25
  /**
17
26
  * The injected transport seam. `stream(input, signal, ctx)` returns an async generator of parts.
18
27
  * Implement this interface for any backend — fetch-based SSE, AI SDK, or a mock.
@@ -40,9 +49,7 @@ import type { AgentPartDraft } from './parts.js';
40
49
  * }
41
50
  */
42
51
  export type AgentTransport<TPart = AgentPartDraft, TInput = string> = {
43
- stream: (input: TInput, signal?: AbortSignal, ctx?: {
44
- readonly messageId: string;
45
- }) => AsyncGenerator<TPart>;
52
+ stream: (input: TInput, signal?: AbortSignal, ctx?: AgentStreamContext) => AsyncGenerator<TPart>;
46
53
  /** Optional: resume a previously-started run from its resumeToken (see StartPart). Transports that don't support resumption simply omit this. */
47
54
  resume?: ((resumeToken: string, signal?: AbortSignal) => AsyncGenerator<TPart>) | undefined;
48
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/agent/transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAI7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,GAAG,cAAc,EAAE,MAAM,GAAG,MAAM,IAAI;IACpE,MAAM,EAAE,CACN,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,WAAW,EACpB,GAAG,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KACjC,cAAc,CAAC,KAAK,CAAC,CAAA;IAC1B,iJAAiJ;IACjJ,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,cAAc,CAAC,KAAK,CAAC,CAAC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M,GAAG,SAAS,CAAA;IACtC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAC3C,CAAA;AAID,MAAM,MAAM,wBAAwB,CAAC,KAAK,GAAG,SAAS,IAAI;IACxD,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,CAAA;IACzD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACzD;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAC7B,CAAA;AAyZD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,SAAS,QAAQ,GAAG,SAAS,EAAE,EACrE,SAAS,EACT,KAAK,EACL,cAAc,EACd,WAAW,EACX,OAAO,EACP,QAAc,EACd,SAAS,GACV,EAAE,sBAAsB,CAAC,KAAK,CAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,CA8UjE"}
@@ -7,6 +7,7 @@ import { createRunCommitter, isContentPart } from "./run-committer.js";
7
7
  import {
8
8
  beginRun,
9
9
  endRun,
10
+ settleTrace,
10
11
  failedThreadIds,
11
12
  dismissRun,
12
13
  hasLiveRun,
@@ -16,7 +17,7 @@ import {
16
17
  sweepFlushed
17
18
  } from "./run-records.js";
18
19
  import { isResumable } from "./transport.js";
19
- import { TelemetryContext, createEmitter, errorName, now } from "../telemetry.js";
20
+ import { TelemetryContext, createLiveEmitter, errorName, now } from "../telemetry.js";
20
21
  function defaultToUserParts(input) {
21
22
  return [{ id: mintThreadId(), type: "text", text: input }];
22
23
  }
@@ -129,6 +130,7 @@ async function consumeAndFinalize(args) {
129
130
  status: outcome.status
130
131
  })
131
132
  );
133
+ settleTrace(record, "settled");
132
134
  } catch (err) {
133
135
  if (!live()) {
134
136
  if (record.ended === "stopped" && record.appended) onError?.({ threadId, error: err });
@@ -154,6 +156,7 @@ async function consumeAndFinalize(args) {
154
156
  failure: { error: err, agentError }
155
157
  })
156
158
  );
159
+ settleTrace(record, "failed");
157
160
  onError?.({ threadId, error: err });
158
161
  } finally {
159
162
  committer.cancel();
@@ -220,6 +223,15 @@ async function finalizeStop(args) {
220
223
  record.resolving = false;
221
224
  }
222
225
  }
226
+ const TRACEPARENT = /^[\da-f]{2}-[\da-f]{32}-[\da-f]{16}-[\da-f]{2}$/;
227
+ const TRACESTATE_MEMBER = /^[\da-z][\w*/@-]{0,255}=[^\s,=]([^,=]{0,254}[^\s,=])?$/;
228
+ function traceRequestHeaders(headers) {
229
+ const { traceparent, tracestate } = headers;
230
+ if (typeof traceparent !== "string" || !TRACEPARENT.test(traceparent)) return void 0;
231
+ const members = typeof tracestate === "string" ? tracestate.split(",") : [];
232
+ const valid = members.length > 0 && members.length <= 32 && members.every((member) => TRACESTATE_MEMBER.test(member.trim()));
233
+ return valid ? { traceparent, tracestate } : { traceparent };
234
+ }
223
235
  function buildTurnEvent(args) {
224
236
  const { threadId, startedAt, firstContentAt, partCount, status, failure } = args;
225
237
  const endedAt = now();
@@ -274,10 +286,7 @@ function useAgentThreadRuns({
274
286
  const resolvedToUserParts = toUserParts ?? defaultToUserParts;
275
287
  const toUserPartsRef = useRef(resolvedToUserParts);
276
288
  toUserPartsRef.current = resolvedToUserParts;
277
- const emitTelemetry = useMemo(
278
- () => createEmitter((event) => telemetryRef.current?.(event)),
279
- []
280
- );
289
+ const emitTelemetry = useMemo(() => createLiveEmitter(() => telemetryRef.current), []);
281
290
  const resolveTransport = (threadId) => {
282
291
  const currentTransport = transportRef.current;
283
292
  if (typeof currentTransport !== "function") return currentTransport;
@@ -294,6 +303,7 @@ function useAgentThreadRuns({
294
303
  if (record.ended !== void 0) continue;
295
304
  abortedThreadIds.push(threadId);
296
305
  record.controller.abort();
306
+ settleTrace(record, "stopped");
297
307
  }
298
308
  recordsRef.current.clear();
299
309
  if (abortedThreadIds.length === 0) return;
@@ -374,8 +384,10 @@ function useAgentThreadRuns({
374
384
  return next;
375
385
  });
376
386
  const controller = new AbortController();
377
- const record = beginRun(recordsRef.current, threadId, controller);
387
+ const trace = emitTelemetry.startChatTurn?.({ threadId, messageId: userMessage.id });
388
+ const record = beginRun(recordsRef.current, threadId, controller, trace?.settle);
378
389
  const resolvedTransport = resolveTransport(threadId);
390
+ const headers = trace?.headers === void 0 ? void 0 : traceRequestHeaders(trace.headers);
379
391
  void consumeAndFinalize({
380
392
  threadId,
381
393
  record,
@@ -385,7 +397,10 @@ function useAgentThreadRuns({
385
397
  // id instead of a second, unrelated one (R1 — see AgentTransport.stream's doc).
386
398
  generator: withPartIds(
387
399
  threadId,
388
- resolvedTransport.stream(input, controller.signal, { messageId: userMessage.id })
400
+ resolvedTransport.stream(input, controller.signal, {
401
+ messageId: userMessage.id,
402
+ ...headers !== void 0 ? { headers } : {}
403
+ })
389
404
  ),
390
405
  userMessage,
391
406
  recordsRef,
@@ -433,6 +448,7 @@ function useAgentThreadRuns({
433
448
  const { appended, resolving } = record;
434
449
  endRun(record, "stopped");
435
450
  record.controller.abort();
451
+ settleTrace(record, "stopped");
436
452
  void finalizeStop({
437
453
  threadId,
438
454
  parts,
@@ -1 +1 @@
1
- {"version":3,"file":"DualPanel.d.ts","sourceRoot":"","sources":["../../src/charts/DualPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AASzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAwB,MAAM,SAAS,CAAA;AAcrF,uBAAuB;AACvB,MAA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,4BAA4B;IAC5B,MAAM,EAAE,SAAS,aAAa,CAAC,CAAC,CAAC,EAAE,CAAA;IACnC;6FACyF;IACzF,GAAG,CAAC,EACA;QACE,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAAA;QACvD,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;QAC5C,uDAAuD;QACvD,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;KACpD,GACD,SAAS,CAAA;IACb;;;OAGG;IACH,WAAW,CAAC,EACR;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAC1E,SAAS,CAAA;IACb,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IACpB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC,CAAA;AAiBD,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,EAClE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,YAAY,CAuOd"}
@@ -9,7 +9,7 @@ import { VX, alpha } from "../tokens/index.js";
9
9
  import { resolveContainerClass } from "../tokens/size-classes.js";
10
10
  import { defaultFormatX, defaultNumberFormat, engineRow, seriesRow, visibleSeries } from "./compile.js";
11
11
  import { barMark, emphasis, lineMark, markersOf, thinFill } from "./marks.js";
12
- import { PanelRung, paneX, paneY, rowsOf } from "./panel.js";
12
+ import { PanelRung, chartHeightOf, paneX, paneY, rowsOf } from "./panel.js";
13
13
  import { xScaleFor } from "./scales.js";
14
14
  import { rowX } from "./types.js";
15
15
  const BAR_KEY = "__bar";
@@ -147,12 +147,20 @@ function DualPanel(props) {
147
147
  ],
148
148
  scales: {
149
149
  x: { scale: xScale(), axis: false },
150
- y: paneY({ scale: topY, domain: topDomain, format: topFormat, ticks: TOP_TICKS, cls })
150
+ y: paneY({
151
+ scale: topY,
152
+ domain: topDomain,
153
+ format: topFormat,
154
+ ticks: TOP_TICKS,
155
+ cls,
156
+ height: chartHeightOf(h, topFraction, PANE_GAP)
157
+ })
151
158
  }
152
159
  };
153
160
  };
154
- const barPane = ({ width }) => {
161
+ const barPane = ({ width, height: h }) => {
155
162
  const cls = resolveContainerClass(width);
163
+ const whole = chartHeightOf(h, 1 - topFraction, PANE_GAP);
156
164
  const barRows = barOn ? rowsOf(data, x, barSeries) : [];
157
165
  const dim = emphasis(highlighted, { key: BAR_KEY });
158
166
  return {
@@ -166,13 +174,14 @@ function DualPanel(props) {
166
174
  })
167
175
  ],
168
176
  scales: {
169
- x: paneX({ scale: xScale(), model, format, cls }),
177
+ x: paneX({ scale: xScale(), model, format, cls, height: whole }),
170
178
  y: paneY({
171
179
  scale: barScale,
172
180
  domain: barDomain,
173
181
  format: bar.format,
174
182
  ticks: BAR_TICKS,
175
- cls
183
+ cls,
184
+ height: whole
176
185
  })
177
186
  }
178
187
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MirroredBars.d.ts","sourceRoot":"","sources":["../../src/charts/MirroredBars.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AASzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,EAAW,MAAM,SAAS,CAAA;AAEhF,4BAA4B;AAC5B,MAAM,MAAM,eAAe,GAAG;IAC5B;8EAC0E;IAC1E,GAAG,EAAE,MAAM,CAAA;IACX,+FAA+F;IAC/F,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACjC,sGAAsG;IACtG,YAAY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