@databrainhq/mcp-server 0.3.0-rc.10 → 0.3.0-rc.11

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/README.md CHANGED
@@ -507,12 +507,18 @@ Production writes through `create_or_update_metric_from_query` default to `dry_r
507
507
  | Tool | Description |
508
508
  |------|-------------|
509
509
  | `custom_chart_scaffold` | Return the files of a new chart project (manifest, chart.ts, css, icon, sample data, author guide). Nothing is written or persisted |
510
+ | `custom_chart_edit` | Iterate a hosted draft through Chart studio Bryn when installed; never saves or publishes |
511
+ | `custom_chart_preview` | Compile a draft in memory and preview real sample rows as a sandboxed MCP App tile |
510
512
  | `custom_chart_validate` | Validate a manifest and bundle with the local rules and, when a service token is configured, the server rules. Never persists |
511
513
  | `custom_chart_upload` | Dry-run or upload a built bundle as a private chart (version 1) or a preview version; `publish: true` publishes in the same apply |
512
514
  | `list_custom_charts` | List the company's custom chart types with status and version ids |
513
515
  | `publish_custom_chart` | Dry-run or publish a version so every builder can use chart type `custom:<key>` |
514
516
 
515
- `custom_chart_upload` and `publish_custom_chart` default to `dry_run` and apply only with `confirm: "APPLY_TO_PRODUCTION"`. Hosted scopes: `mcp:custom-charts:read` and `mcp:custom-charts:write`. Build the bundle with the CLI below.
517
+ `custom_chart_upload` and `publish_custom_chart` default to `dry_run` and apply only with `confirm: "APPLY_TO_PRODUCTION"`. Hosted scopes: `mcp:custom-charts:read` and `mcp:custom-charts:write`. Hosted agents can pass `chartTs`, `manifest`, `bundleCss` and `iconSvg` to compile in memory, without local files or imports. `custom_chart_edit` feature-detects the Chart studio Bryn route (#4469); a missing route returns the draft for the calling agent to edit, while an authorization failure stays a failure. `custom_chart_preview` uses sample query rows and slot bindings without saving. Save a version with upload, then ask the user before publishing. Local projects can use the CLI below.
518
+
519
+ Custom tiles load the trusted sandbox runtime through the app-only `load_custom_chart_runtime` tool only when needed, preserving the built-in tile budget. Bundle chunks check live access and the current published pointer/hash on every call; validated immutable artifacts have a bounded content-hash cache. Calculations use the current bounded row page. Stdio credentials use source authoring directly, since Chart studio Bryn requires a hosted sign-in.
520
+
521
+ Published custom metric tiles load their company bundle through the same live grant as the chart result. Code runs in the app/embed runtime inside two opaque sandbox frames, with no network, credentials or privileged host actions. A missing/unpublished type or a host that blocks nested sandbox frames shows a fallback and the rows. Bundles are app-only metadata, outside the model context.
516
522
  </details>
517
523
 
518
524
  ---
@@ -157,15 +157,15 @@ declare const viewSchema: z.ZodObject<{
157
157
  }>>;
158
158
  drillId: z.ZodOptional<z.ZodString>;
159
159
  }, "strict", z.ZodTypeAny, {
160
- cursor?: string | undefined;
161
160
  drillId?: string | undefined;
161
+ cursor?: string | undefined;
162
162
  dateRange?: {
163
163
  from: string;
164
164
  to: string;
165
165
  } | undefined;
166
166
  }, {
167
- cursor?: string | undefined;
168
167
  drillId?: string | undefined;
168
+ cursor?: string | undefined;
169
169
  dateRange?: {
170
170
  from: string;
171
171
  to: string;
@@ -184,6 +184,20 @@ declare const pageSchema: z.ZodEffects<z.ZodObject<{
184
184
  rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, "many">;
185
185
  columns: z.ZodArray<z.ZodString, "many">;
186
186
  svg: z.ZodOptional<z.ZodString>;
187
+ customChart: z.ZodOptional<z.ZodObject<{
188
+ key: z.ZodString;
189
+ bindings: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
190
+ options: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
191
+ }, "strict", z.ZodTypeAny, {
192
+ options: Record<string, string | number | boolean>;
193
+ key: string;
194
+ bindings: Record<string, string[]>;
195
+ }, {
196
+ options: Record<string, string | number | boolean>;
197
+ key: string;
198
+ bindings: Record<string, string[]>;
199
+ }>>;
200
+ fallback: z.ZodOptional<z.ZodString>;
187
201
  width: z.ZodNumber;
188
202
  height: z.ZodNumber;
189
203
  points: z.ZodArray<z.ZodObject<{
@@ -197,116 +211,140 @@ declare const pageSchema: z.ZodEffects<z.ZodObject<{
197
211
  drillId: z.ZodOptional<z.ZodString>;
198
212
  }, "strict", z.ZodTypeAny, {
199
213
  value: string | number | boolean | null;
200
- key: string;
201
214
  label: string;
202
- x: number;
203
- y: number;
204
215
  width: number;
205
216
  height: number;
217
+ x: number;
218
+ y: number;
219
+ key: string;
206
220
  drillId?: string | undefined;
207
221
  }, {
208
222
  value: string | number | boolean | null;
209
- key: string;
210
223
  label: string;
211
- x: number;
212
- y: number;
213
224
  width: number;
214
225
  height: number;
226
+ x: number;
227
+ y: number;
228
+ key: string;
215
229
  drillId?: string | undefined;
216
230
  }>, "many">;
217
231
  value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
218
232
  nextCursor: z.ZodOptional<z.ZodString>;
219
233
  }, "strict", z.ZodTypeAny, {
220
- kind: "chart" | "kpi";
221
- title: string;
222
234
  columns: string[];
235
+ rows: Record<string, string | number | boolean | null>[];
236
+ title: string;
223
237
  width: number;
224
238
  height: number;
225
- chartSpec: {
226
- type: string;
227
- };
228
- rows: Record<string, string | number | boolean | null>[];
229
239
  points: {
230
240
  value: string | number | boolean | null;
231
- key: string;
232
241
  label: string;
233
- x: number;
234
- y: number;
235
242
  width: number;
236
243
  height: number;
244
+ x: number;
245
+ y: number;
246
+ key: string;
237
247
  drillId?: string | undefined;
238
248
  }[];
249
+ kind: "chart" | "kpi";
250
+ chartSpec: {
251
+ type: string;
252
+ };
239
253
  value?: string | number | boolean | null | undefined;
240
254
  svg?: string | undefined;
255
+ customChart?: {
256
+ options: Record<string, string | number | boolean>;
257
+ key: string;
258
+ bindings: Record<string, string[]>;
259
+ } | undefined;
260
+ fallback?: string | undefined;
241
261
  nextCursor?: string | undefined;
242
262
  }, {
243
- kind: "chart" | "kpi";
244
- title: string;
245
263
  columns: string[];
264
+ rows: Record<string, string | number | boolean | null>[];
265
+ title: string;
246
266
  width: number;
247
267
  height: number;
248
- chartSpec: {
249
- type: string;
250
- };
251
- rows: Record<string, string | number | boolean | null>[];
252
268
  points: {
253
269
  value: string | number | boolean | null;
254
- key: string;
255
270
  label: string;
256
- x: number;
257
- y: number;
258
271
  width: number;
259
272
  height: number;
273
+ x: number;
274
+ y: number;
275
+ key: string;
260
276
  drillId?: string | undefined;
261
277
  }[];
278
+ kind: "chart" | "kpi";
279
+ chartSpec: {
280
+ type: string;
281
+ };
262
282
  value?: string | number | boolean | null | undefined;
263
283
  svg?: string | undefined;
284
+ customChart?: {
285
+ options: Record<string, string | number | boolean>;
286
+ key: string;
287
+ bindings: Record<string, string[]>;
288
+ } | undefined;
289
+ fallback?: string | undefined;
264
290
  nextCursor?: string | undefined;
265
291
  }>, {
266
- kind: "chart" | "kpi";
267
- title: string;
268
292
  columns: string[];
293
+ rows: Record<string, string | number | boolean | null>[];
294
+ title: string;
269
295
  width: number;
270
296
  height: number;
271
- chartSpec: {
272
- type: string;
273
- };
274
- rows: Record<string, string | number | boolean | null>[];
275
297
  points: {
276
298
  value: string | number | boolean | null;
277
- key: string;
278
299
  label: string;
279
- x: number;
280
- y: number;
281
300
  width: number;
282
301
  height: number;
302
+ x: number;
303
+ y: number;
304
+ key: string;
283
305
  drillId?: string | undefined;
284
306
  }[];
307
+ kind: "chart" | "kpi";
308
+ chartSpec: {
309
+ type: string;
310
+ };
285
311
  value?: string | number | boolean | null | undefined;
286
312
  svg?: string | undefined;
313
+ customChart?: {
314
+ options: Record<string, string | number | boolean>;
315
+ key: string;
316
+ bindings: Record<string, string[]>;
317
+ } | undefined;
318
+ fallback?: string | undefined;
287
319
  nextCursor?: string | undefined;
288
320
  }, {
289
- kind: "chart" | "kpi";
290
- title: string;
291
321
  columns: string[];
322
+ rows: Record<string, string | number | boolean | null>[];
323
+ title: string;
292
324
  width: number;
293
325
  height: number;
294
- chartSpec: {
295
- type: string;
296
- };
297
- rows: Record<string, string | number | boolean | null>[];
298
326
  points: {
299
327
  value: string | number | boolean | null;
300
- key: string;
301
328
  label: string;
302
- x: number;
303
- y: number;
304
329
  width: number;
305
330
  height: number;
331
+ x: number;
332
+ y: number;
333
+ key: string;
306
334
  drillId?: string | undefined;
307
335
  }[];
336
+ kind: "chart" | "kpi";
337
+ chartSpec: {
338
+ type: string;
339
+ };
308
340
  value?: string | number | boolean | null | undefined;
309
341
  svg?: string | undefined;
342
+ customChart?: {
343
+ options: Record<string, string | number | boolean>;
344
+ key: string;
345
+ bindings: Record<string, string[]>;
346
+ } | undefined;
347
+ fallback?: string | undefined;
310
348
  nextCursor?: string | undefined;
311
349
  }>;
312
350
  type ChartPage = z.infer<typeof pageSchema>;
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createChartAppServer
4
- } from "../chunk-N7X762VU.js";
5
- import "../chunk-5IGP6A6T.js";
6
- import "../chunk-ERTAKB2H.js";
7
- import "../chunk-OCBTNAAO.js";
4
+ } from "../chunk-IBYBK5ZE.js";
5
+ import "../chunk-NBFUKVWP.js";
6
+ import "../chunk-ES2LUP4U.js";
7
+ import "../chunk-RHK62ZJ6.js";
8
+ import "../chunk-Q5EYDKSA.js";
8
9
  export {
9
10
  createChartAppServer
10
11
  };
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadConfig
4
- } from "../chunk-CUPL7CAN.js";
4
+ } from "../chunk-DM7S4R57.js";
5
5
  import {
6
6
  createChartAppServer
7
- } from "../chunk-N7X762VU.js";
8
- import "../chunk-5IGP6A6T.js";
9
- import "../chunk-ERTAKB2H.js";
10
- import "../chunk-OCBTNAAO.js";
7
+ } from "../chunk-IBYBK5ZE.js";
8
+ import "../chunk-NBFUKVWP.js";
9
+ import "../chunk-ES2LUP4U.js";
10
+ import "../chunk-RHK62ZJ6.js";
11
+ import "../chunk-Q5EYDKSA.js";
11
12
 
12
13
  // src/apps/stdio.ts
13
14
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/apps/stdio.ts"],"sourcesContent":["import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { loadConfig } from '../utils/config.js';\nimport { createChartAppServer } from './server.js';\n\n// Separate opt-in command until the owners integrate both shared entrypoints.\nconst server = createChartAppServer(loadConfig());\nawait server.connect(new StdioServerTransport());\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,4BAA4B;AAKrC,IAAM,SAAS,qBAAqB,WAAW,CAAC;AAChD,MAAM,OAAO,QAAQ,IAAI,qBAAqB,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/apps/stdio.ts"],"sourcesContent":["import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { loadConfig } from '../utils/config.js';\nimport { createChartAppServer } from './server.js';\n\n// Separate opt-in command until the owners integrate both shared entrypoints.\nconst server = createChartAppServer(loadConfig());\nawait server.connect(new StdioServerTransport());\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,4BAA4B;AAKrC,IAAM,SAAS,qBAAqB,WAAW,CAAC;AAChD,MAAM,OAAO,QAAQ,IAAI,qBAAqB,CAAC;","names":[]}
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ DIST_FILES,
4
+ buildProject,
5
+ buildSource,
6
+ bundleSizeBytes,
7
+ contentHash,
8
+ readDist,
9
+ readProject,
10
+ validateBundle,
11
+ validateProject
12
+ } from "./chunk-Q5EYDKSA.js";
13
+ export {
14
+ DIST_FILES,
15
+ buildProject,
16
+ buildSource,
17
+ bundleSizeBytes,
18
+ contentHash,
19
+ readDist,
20
+ readProject,
21
+ validateBundle,
22
+ validateProject
23
+ };
24
+ //# sourceMappingURL=bundle-TDQXWIPM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  oauthConfigSchema,
4
4
  oauthHttpsUrl
5
- } from "./chunk-OCBTNAAO.js";
5
+ } from "./chunk-RHK62ZJ6.js";
6
6
 
7
7
  // src/utils/config.ts
8
8
  import { z, ZodError } from "zod";
@@ -72,4 +72,4 @@ export {
72
72
  DEFAULT_POSTHOG_HOST,
73
73
  loadConfig
74
74
  };
75
- //# sourceMappingURL=chunk-CUPL7CAN.js.map
75
+ //# sourceMappingURL=chunk-DM7S4R57.js.map