@smallwebco/tinypivot-mcp 0.2.7 → 0.2.9

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.
@@ -7347,6 +7347,28 @@ var require_pgsql_ast_parser = __commonJS({
7347
7347
  }
7348
7348
  });
7349
7349
 
7350
+ // ../core/dist/utils/index.js
7351
+ function formatNumber(value2, format = "us", options) {
7352
+ if (value2 === null)
7353
+ return "-";
7354
+ const maxDigits = options?.maximumFractionDigits ?? (Math.abs(value2) >= 1e3 ? 2 : 4);
7355
+ switch (format) {
7356
+ case "eu":
7357
+ return value2.toLocaleString("de-DE", { maximumFractionDigits: maxDigits });
7358
+ case "plain":
7359
+ return Number.isInteger(value2) ? String(value2) : value2.toFixed(Math.min(maxDigits, 20));
7360
+ case "us":
7361
+ default:
7362
+ return value2.toLocaleString("en-US", { maximumFractionDigits: maxDigits });
7363
+ }
7364
+ }
7365
+ function makeKey(row, fields) {
7366
+ return fields.map((f) => String(row[f] ?? "(blank)")).join("|||");
7367
+ }
7368
+ function parseKey(key) {
7369
+ return key.split("|||");
7370
+ }
7371
+
7350
7372
  // ../core/dist/chart/index.js
7351
7373
  var CHART_THEME_PRESETS = {
7352
7374
  "code": {
@@ -7405,6 +7427,7 @@ var CHART_COLORS = CHART_THEME_PRESETS.code.colors;
7405
7427
  function formatFieldLabel(field) {
7406
7428
  return field.replace(/([A-Z])/g, " $1").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().split(" ").map((word2) => word2.charAt(0).toUpperCase() + word2.slice(1).toLowerCase()).join(" ");
7407
7429
  }
7430
+ var GAPPED_CHART_TYPES = /* @__PURE__ */ new Set(["line", "area"]);
7408
7431
  function createMeasureReader(aggregation) {
7409
7432
  if (aggregation === "count")
7410
7433
  return () => 1;
@@ -7584,13 +7607,12 @@ function processChartData(data, config) {
7584
7607
  categories = [...rawCategories].sort((a, b) => compareLabels(a, b) * dir);
7585
7608
  }
7586
7609
  const series = [];
7610
+ const missingValue = GAPPED_CHART_TYPES.has(config.type) ? null : 0;
7587
7611
  for (const seriesName of seriesNames) {
7588
- const seriesData = [];
7589
- for (const category of categories) {
7590
- const xGroup = grouped.get(category);
7591
- const values = xGroup?.get(seriesName) || [];
7592
- seriesData.push(aggregateValues(values, yAggregation));
7593
- }
7612
+ const seriesData = categories.map((category) => {
7613
+ const values = grouped.get(category)?.get(seriesName);
7614
+ return values ? aggregateValues(values, yAggregation) : missingValue;
7615
+ });
7594
7616
  series.push({
7595
7617
  name: seriesName === "_default" ? formatFieldLabel(yField) : seriesName,
7596
7618
  data: seriesData
@@ -7734,28 +7756,6 @@ var TERMINAL_PALETTES = {
7734
7756
  }
7735
7757
  };
7736
7758
 
7737
- // ../core/dist/utils/index.js
7738
- function formatNumber(value2, format = "us", options) {
7739
- if (value2 === null)
7740
- return "-";
7741
- const maxDigits = options?.maximumFractionDigits ?? (Math.abs(value2) >= 1e3 ? 2 : 4);
7742
- switch (format) {
7743
- case "eu":
7744
- return value2.toLocaleString("de-DE", { maximumFractionDigits: maxDigits });
7745
- case "plain":
7746
- return Number.isInteger(value2) ? String(value2) : value2.toFixed(Math.min(maxDigits, 20));
7747
- case "us":
7748
- default:
7749
- return value2.toLocaleString("en-US", { maximumFractionDigits: maxDigits });
7750
- }
7751
- }
7752
- function makeKey(row, fields) {
7753
- return fields.map((f) => String(row[f] ?? "(blank)")).join("|||");
7754
- }
7755
- function parseKey(key) {
7756
- return key.split("|||");
7757
- }
7758
-
7759
7759
  // ../core/dist/pivot/index.js
7760
7760
  var PATH_SEP = "\0";
7761
7761
  function pathKey(values) {
@@ -9183,19 +9183,6 @@ function renderBrailleLineBody(categories, seriesList, filledArea = false, nonAd
9183
9183
  }
9184
9184
  return lines;
9185
9185
  }
9186
- function buildPresentSeriesPairs(rows, xField, seriesField) {
9187
- if (!seriesField)
9188
- return null;
9189
- const present = /* @__PURE__ */ new Set();
9190
- for (const row of rows) {
9191
- const xRaw = row[xField];
9192
- const sRaw = row[seriesField];
9193
- const xKey = xRaw === null || xRaw === void 0 ? "(blank)" : String(xRaw);
9194
- const sKey = sRaw === null || sRaw === void 0 ? "(blank)" : String(sRaw);
9195
- present.add(`${xKey}\0${sKey}`);
9196
- }
9197
- return present;
9198
- }
9199
9186
  function formatTrendDelta(values) {
9200
9187
  if (values.length < 2)
9201
9188
  return "";
@@ -9243,15 +9230,9 @@ function formatTerminalChart(dataset, chartConfig, options = {}) {
9243
9230
  const statsLine = `\u25B2 Peak: ${peakCat} (${formatCompactNumber(totalsPerCat[peakIdx])}) \xB7 \u25BC Low: ${lowCat} (${formatCompactNumber(totalsPerCat[lowIdx])}) \xB7 \u25C6 Avg: ${formatCompactNumber(avgVal)}`;
9244
9231
  if ((fullConfig.type === "line" || fullConfig.type === "area") && processed.categories.length >= 3) {
9245
9232
  const categoriesStr = processed.categories.map(String);
9246
- const presentPairs = processed.series.length > 1 ? buildPresentSeriesPairs(dataset.rows, chartConfig.xAxis.field, chartConfig.seriesField?.field) : null;
9247
9233
  const brailleSeries = processed.series.map((s) => ({
9248
9234
  name: s.name,
9249
- values: categoriesStr.map((cat, idx) => {
9250
- if (presentPairs && !presentPairs.has(`${cat}\0${s.name}`))
9251
- return null;
9252
- const val = Number(s.data[idx]);
9253
- return Number.isFinite(val) ? val : null;
9254
- })
9235
+ values: s.data.map((val) => val !== null && Number.isFinite(val) ? val : null)
9255
9236
  }));
9256
9237
  const body2 = renderBrailleLineBody(categoriesStr, brailleSeries, fullConfig.type === "area", nonAdditive).map((row, rIdx) => {
9257
9238
  if (!pal)
@@ -10106,6 +10087,12 @@ async function runTuiCommand(args) {
10106
10087
  import fs3 from "fs/promises";
10107
10088
  import http from "http";
10108
10089
  import path3 from "path";
10090
+
10091
+ // src/limits.ts
10092
+ var INTERACTIVE_ROW_LIMIT = 1e5;
10093
+ var ROW_PAGE_SIZE = 25e3;
10094
+
10095
+ // src/companion.ts
10109
10096
  function readJsonBody(req) {
10110
10097
  return new Promise((resolve) => {
10111
10098
  const chunks = [];
@@ -10137,7 +10124,7 @@ function buildFullCompanionPayload(store, datasetId, opts) {
10137
10124
  sourceTotalRows: ds.sourceTotalRows,
10138
10125
  truncatedForFreeTier: ds.truncatedForFreeTier,
10139
10126
  tier: isPro2 ? "pro" : "free",
10140
- rows: ds.rows.slice(0, 25e3),
10127
+ rows: ds.rows.slice(0, INTERACTIVE_ROW_LIMIT),
10141
10128
  hasMoreRows: false,
10142
10129
  columns: ds.columns,
10143
10130
  viewMode: ds.viewMode,
@@ -10600,7 +10587,7 @@ Usage:
10600
10587
  Options:
10601
10588
  --local Wire this local build (node <path>/dist/cli.js) instead of npx
10602
10589
  --targets=<list> Comma-separated harnesses to configure:
10603
- claude, claude-desktop, cursor, opencode, antigravity, pi, codex
10590
+ claude, claude-desktop, cursor, opencode, antigravity, antigravity-cli, pi, codex
10604
10591
  --all Configure all supported harnesses even if not yet detected
10605
10592
  --license=<key> Write TINYPIVOT_LICENSE_KEY into each configured server env
10606
10593
  --theme=<id> Set default visual theme (${CHART_THEME_IDS.join(", ")})
@@ -10989,6 +10976,15 @@ TinyPivot MCP Installer (${opts.local ? `local: ${cliPath}` : `npx ${MCP_NPX_SPE
10989
10976
  opts,
10990
10977
  cliPath
10991
10978
  ),
10979
+ // The Antigravity CLI (`agy`) keeps its own MCP list, separate from the IDE's.
10980
+ await upsertStandardMcpJson(
10981
+ "antigravity-cli",
10982
+ "Antigravity CLI",
10983
+ path4.join(home, ".gemini", "config", "mcp_config.json"),
10984
+ path4.join(home, ".gemini", "antigravity-cli"),
10985
+ opts,
10986
+ cliPath
10987
+ ),
10992
10988
  await upsertStandardMcpJson(
10993
10989
  "pi",
10994
10990
  "pi",
@@ -11371,7 +11367,7 @@ import fsSync2 from "fs";
11371
11367
  import os4 from "os";
11372
11368
  import path5 from "path";
11373
11369
  var DEFAULT_TELEMETRY_URL = "https://tiny-pivot.com/api/telemetry";
11374
- var PACKAGE_VERSION = "0.2.7";
11370
+ var PACKAGE_VERSION = "0.2.9";
11375
11371
  function isTelemetryEnabled() {
11376
11372
  if (process.env.TINYPIVOT_TELEMETRY === "0" || process.env.TINYPIVOT_TELEMETRY === "false")
11377
11373
  return false;
@@ -11663,7 +11659,7 @@ function createTinyPivotMcpServer(options = {}) {
11663
11659
  const server = new McpServer(
11664
11660
  {
11665
11661
  name: "tinypivot",
11666
- version: "0.2.7"
11662
+ version: "0.2.9"
11667
11663
  },
11668
11664
  {
11669
11665
  capabilities: {
@@ -12204,7 +12200,7 @@ function createTinyPivotMcpServer(options = {}) {
12204
12200
  inputSchema: {
12205
12201
  datasetId: z.string().optional(),
12206
12202
  offset: z.number().int().min(0).default(0),
12207
- limit: z.number().int().min(1).max(25e3).default(1e4)
12203
+ limit: z.number().int().min(1).max(ROW_PAGE_SIZE).default(1e4)
12208
12204
  },
12209
12205
  _meta: APP_ONLY_META
12210
12206
  },
package/dist/cli.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  runTuiCommand,
19
19
  saveVisualThemePreference,
20
20
  startCompanionServer
21
- } from "./chunk-F2NOTK7R.js";
21
+ } from "./chunk-3JPAVTJZ.js";
22
22
  import "./chunk-2ESYSVXG.js";
23
23
 
24
24
  // src/cli.ts
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  startCompanionServer,
30
30
  tokensToUsd,
31
31
  upsertTinyPivotRuleBlock
32
- } from "./chunk-F2NOTK7R.js";
32
+ } from "./chunk-3JPAVTJZ.js";
33
33
  import "./chunk-2ESYSVXG.js";
34
34
  export {
35
35
  APP_MIME_TYPE,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@smallwebco/tinypivot-mcp",
3
3
  "mcpName": "io.github.Small-Web-Co/tinypivot",
4
4
  "type": "module",
5
- "version": "0.2.7",
5
+ "version": "0.2.9",
6
6
  "description": "TinyPivot MCP Server, Interactive MCP App & Claude Plugin — turn CSV, JSON, API/MCP outputs, and queries from any database into interactive charts, pivot tables, terminal cards, live TUI, drill-through, and Excel exports inside AI agents.",
7
7
  "author": "Small Web, LLC",
8
8
  "license": "MIT",
@@ -79,9 +79,9 @@
79
79
  "typescript": "~5.6.2",
80
80
  "vite": "^6.4.6",
81
81
  "vite-plugin-singlefile": "^2.2.0",
82
- "@smallwebco/tinypivot-server": "1.4.2",
83
- "@smallwebco/tinypivot-core": "1.4.2",
84
- "@smallwebco/tinypivot-react": "1.4.2"
82
+ "@smallwebco/tinypivot-core": "1.4.5",
83
+ "@smallwebco/tinypivot-react": "1.4.5",
84
+ "@smallwebco/tinypivot-server": "1.4.5"
85
85
  },
86
86
  "scripts": {
87
87
  "build": "pnpm run build:server && pnpm run build:app",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.Small-Web-Co/tinypivot",
4
4
  "title": "TinyPivot — Interactive Data IDE for AI Agents",
5
5
  "description": "Interactive charts, pivot tables, terminal cards, live TUI, and Excel export inside AI agents.",
6
- "version": "0.2.7",
6
+ "version": "0.2.9",
7
7
  "websiteUrl": "https://tiny-pivot.com",
8
8
  "repository": {
9
9
  "url": "https://github.com/Small-Web-Co/tinypivot",
@@ -14,7 +14,7 @@
14
14
  {
15
15
  "registryType": "npm",
16
16
  "identifier": "@smallwebco/tinypivot-mcp",
17
- "version": "0.2.7",
17
+ "version": "0.2.9",
18
18
  "transport": {
19
19
  "type": "stdio"
20
20
  },