@bicharts/chart-mcp 0.6.100 → 0.6.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/chart-mcp",
3
- "version": "0.6.100",
3
+ "version": "0.6.103",
4
4
  "description": "AI Data Components for Power BI, Excel, Fabric Apps and the web, over MCP: bivariate maps, what-if projections and about 90 everyday chart types, with selection and cross-filtering already wired. It profiles your table locally; the code it writes is yours and runs with no license.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -47,10 +47,10 @@
47
47
  },
48
48
  "// dependencies": "NONE, deliberately. dist/ bundles every module the server uses, so a runtime dependency installs nothing it needs - it only makes npx fetch that package (and its tree) before the first start. Everything the bundle carries is a devDependency; scripts/verify-package.mjs fails the release if a dependency appears or a shipped file imports anything but Node's built-ins.",
49
49
  "devDependencies": {
50
- "@bicharts/chart-host": "^0.6.99",
51
- "@bicharts/shape-core": "^0.6.99",
52
- "@modelcontextprotocol/sdk": "^1.0.0",
53
- "@types/node": "^20.0.0",
50
+ "@bicharts/chart-host": "^0.6.103",
51
+ "@bicharts/shape-core": "^0.6.103",
52
+ "@modelcontextprotocol/sdk": "^1.32.1",
53
+ "@types/node": "^26.6.5",
54
54
  "@types/papaparse": "^5.3.14",
55
55
  "d3": "^7.9.0",
56
56
  "d3-hexbin": "^0.2.2",
@@ -59,7 +59,8 @@
59
59
  "esbuild": "^0.28.1",
60
60
  "happy-dom": "^20.14.5",
61
61
  "papaparse": "^5.4.1",
62
- "typescript": "^5.4.0",
63
- "zod": "^3.23.0"
62
+ "typescript": "^7.0.2",
63
+ "typescript5": "npm:typescript@^5.9.3",
64
+ "zod": "^4.6.7"
64
65
  }
65
66
  }
@@ -180,6 +180,12 @@ disqualifies it; leave it unset when they only asked for a chart, and the engine
180
180
  `@bicharts/chart-host` draws), `width`/`height`, and
181
181
  `reasoning_mode: "1P"` when you want the cheapest, fastest pass.
182
182
 
183
+ **Check a named request before generating it.** When the person's request names a chart type or something
184
+ specific (a date grain, a limit, an overlay, a column that must show), pass the same arguments to
185
+ `check_request` first. It says, in the service's own words, which asks this data can't honor and why,
186
+ with chart types that fit when the type itself is denied; tell the person what it denies and why rather
187
+ than generating around it. It spends no generation credits and is metered like `list_eligible_charts`.
188
+
183
189
  **Settings are the user's to answer, not yours to guess.** Every `generate_chart` result carries a
184
190
  `structuredContent.settings` block: `applied` lists each setting that took effect and whose choice it
185
191
  was (`user`, `app`, `default`, `server-roll`, `from-prompt`), `askable` names the ones still open to
@@ -590,13 +596,15 @@ without naming:
590
596
  | every place drawn at the same size, because which are high or low matters more than where | World tile-grid cartogram (or US hex-tile cartogram for states) |
591
597
  | actual against a budget, plan or target, with the gap shown for each period or unit | Variance chart (budget vs actual) |
592
598
  | that same actual-against-target comparison across many accounts or nested groups, read as a table with subtotals | Variance grid (a preview type) - it needs a category to group by; a date series alone is the Variance chart |
593
- | a table with one row per item and each value DRAWN (bars, dots or icons in the cells), so a reader can scan down a column | Table with embedded |
594
- | a table a reader sorts, hides columns in and opens a row's detail from, with plain values, chips or links | Interactive table (a preview type) |
599
+ | a table with one row per item and each value DRAWN (bars, dots or icons in the cells), compact, for scanning down a column and nothing more | Table with embedded |
600
+ | a table a reader WORKS with: sorts, drags column widths, copies cells out, hides columns, scrolls a wide table sideways with frozen columns or rows, opens a row's detail; plain values by default, and where the request asks, data bars, chips, icons, or one value compared with several others as bars (this week against its averages) | Interactive table (a preview type) - name the cells to draw in `prompt`; widths, sort and hidden columns are the reader's, kept through the host's view state |
595
601
  | circling a group of points to see what sets them apart from the rest | Selection explainer (a preview type) - the lasso and the comparison are drawn inside the chart; put the other fields to compare in the same table (which ones: below); on a page, give it `selects` so a circled group filters the page (step 6) |
596
602
 
597
603
  If the list doesn't offer what you expected, read its notes: it names a type refused on a count
598
604
  when your table is small, and it says when `name_filter` hid description matches.
599
605
 
606
+ The Interactive table and the Variance grid are preview types too, so either may be missing from the list. When the person asked for one and it isn't listed, say so and ask how to go on; don't build a table by hand in its place.
607
+
600
608
  The Selection explainer is a preview type: the server offers it only where it's switched on, so it may be missing from the
601
609
  list even when the data fits. When `list_eligible_charts` doesn't list it for your data, tell the person it isn't available
602
610
  for this data right now, and ask how they want to go on. Don't silently draw a plain scatter in its place, and don't write the
@@ -637,6 +645,11 @@ const country = useBicFilter("CountryIso3", { label: "Country", display: "Countr
637
645
  </BicChartPanel>
638
646
  ```
639
647
 
648
+ **A reader's view outlives the page only if you keep it.** What a reader sets inside a chart - an Interactive table's sort,
649
+ column widths and hidden columns, a 3D camera, an expanded row - lives while the chart is mounted and is gone on reload.
650
+ Pass `rememberAs="<a key per chart>"` to keep it in that browser, or `viewState={{ load, save }}` to keep it per signed-in
651
+ person on your server (a plain JSON bag). Hand-hosting `BicChart`, pass the same `viewState` prop.
652
+
640
653
  It is rewritten with the chart on every generation, so keep app logic outside it. What it does, if you
641
654
  host by hand instead - `generate_chart` returns `binding`; pass all three:
642
655
 
@@ -818,8 +831,9 @@ never rewrites them:
818
831
  chart's card (a card has a fixed height and `overflow-hidden`, and clips it). The reader's text is cleared only once
819
832
  the save succeeds; a failure is shown with the text kept.
820
833
 
821
- *d. Badges on the marks: pass `annotations`, never measure the chart.* The host draws each badge on its key's mark
822
- after every render and keeps it there through filters, re-queries and zooms; it never reads a row position. A route is
834
+ *d. Badges on the marks: pass `annotations`, never measure the chart.* The host draws each badge on its key's mark (on a
835
+ table row, just after the row's label; on a chart type that asks for it, such as a tile map, a small dot inside the
836
+ tile's top-right corner with the `label` and `title` in its tooltip) after every render and keeps it there through filters, re-queries and zooms; it never reads a row position. A route is
823
837
  keyed by BOTH of its ends with `where` - no key column to add, no query to change and no chart to regenerate:
824
838
 
825
839
  ```tsx