@databrainhq/mcp-server 0.3.0-rc.1 → 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 +158 -7
- package/dist/apps/server.d.ts +82 -44
- package/dist/apps/server.js +5 -2
- package/dist/apps/stdio.js +6 -3
- package/dist/apps/stdio.js.map +1 -1
- package/dist/bundle-TDQXWIPM.js +24 -0
- package/dist/bundle-TDQXWIPM.js.map +1 -0
- package/dist/{chunk-RF3HTNO7.js → chunk-DM7S4R57.js} +2 -2
- package/dist/{chunk-7DS7OLWP.js → chunk-ES2LUP4U.js} +2030 -1214
- package/dist/chunk-ES2LUP4U.js.map +1 -0
- package/dist/chunk-IBYBK5ZE.js +34 -0
- package/dist/chunk-IBYBK5ZE.js.map +1 -0
- package/dist/chunk-NBFUKVWP.js +603 -0
- package/dist/chunk-NBFUKVWP.js.map +1 -0
- package/dist/chunk-Q5EYDKSA.js +1224 -0
- package/dist/chunk-Q5EYDKSA.js.map +1 -0
- package/dist/chunk-RHK62ZJ6.js +884 -0
- package/dist/chunk-RHK62ZJ6.js.map +1 -0
- package/dist/{chunk-JCXUZ3QZ.js → chunk-Z3ZHN4UW.js} +34 -6
- package/dist/chunk-Z3ZHN4UW.js.map +1 -0
- package/dist/cli.d.ts +15 -0
- package/dist/cli.js +497 -0
- package/dist/cli.js.map +1 -0
- package/dist/custom-chart/custom-runtime.js +63 -0
- package/dist/custom-chart/runtime-shim.js +146 -0
- package/dist/custom-chart/template/AGENTS.md +374 -0
- package/dist/custom-chart/template/README.md +374 -0
- package/dist/custom-chart/template/chart.css +28 -0
- package/dist/custom-chart/template/chart.ts +192 -0
- package/dist/custom-chart/template/custom-chart.d.ts +78 -0
- package/dist/custom-chart/template/icon.svg +1 -0
- package/dist/custom-chart/template/manifest.json +23 -0
- package/dist/custom-chart/template/package.json +14 -0
- package/dist/custom-chart/template/sample-data.json +18 -0
- package/dist/custom-chart/template/tsconfig.json +12 -0
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/main-JEYYFGJM.js +872 -0
- package/dist/main-JEYYFGJM.js.map +1 -0
- package/dist/{test-only-EJ5O4WN5.js → test-only-K7QTSVO4.js} +7 -6
- package/dist/test-only-K7QTSVO4.js.map +1 -0
- package/package.json +9 -4
- package/dist/chunk-7DS7OLWP.js.map +0 -1
- package/dist/chunk-JCXUZ3QZ.js.map +0 -1
- package/dist/chunk-NDVW3ZSJ.js +0 -310
- package/dist/chunk-NDVW3ZSJ.js.map +0 -1
- package/dist/main-7QNRH6X4.js +0 -438
- package/dist/main-7QNRH6X4.js.map +0 -1
- package/dist/test-only-EJ5O4WN5.js.map +0 -1
- /package/dist/{chunk-RF3HTNO7.js.map → chunk-DM7S4R57.js.map} +0 -0
package/README.md
CHANGED
|
@@ -13,13 +13,81 @@ Works with Codex, Claude, Cursor, Windsurf, and any MCP-compatible client.
|
|
|
13
13
|
|
|
14
14
|
## Setup (2 minutes)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
There are two ways in. Pick one.
|
|
17
|
+
|
|
18
|
+
| | Best for | You need |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| **A. Hosted connector** | Claude, ChatGPT, Cursor, VS Code, Claude Code | Your Databrain sign-in. Nothing to install. |
|
|
21
|
+
| **B. Local server + service token** | Codex, Windsurf, any stdio client, self-hosted Databrain, CI | A service token in the MCP config |
|
|
22
|
+
|
|
23
|
+
With A you act as yourself: calls run in the workspaces you approve, with your role in each, and the audit log shows your name. With B calls run as the organization (`actor=system`).
|
|
24
|
+
|
|
25
|
+
### A. Hosted connector
|
|
26
|
+
|
|
27
|
+
Server URL: **`https://mcp.usedatabrain.com/mcp`** (beta: `https://mcp.beta.usedatabrain.com/mcp`).
|
|
28
|
+
Your AI app opens a Databrain sign-in page, you pick one or more workspaces (or "All workspaces I can access") and click Allow. No token to copy.
|
|
29
|
+
|
|
30
|
+
When you approve more than one workspace, the AI names the workspace on each call (`workspace` or `workspaceName`); `whoami` lists the ones you approved. With "All workspaces I can access", workspaces you get later are included, and `create_workspace` can make a new one if your role allows it.
|
|
31
|
+
|
|
32
|
+
The hosted connector includes chart and KPI MCP Apps. `ask_question` returns an inline tile, and `list_widgets` opens a chart chooser in compatible hosts. Both current `_meta.ui.resourceUri` and legacy `_meta['ui/resourceUri']` pointers are included; other hosts retain the text summary and structured data. Tile controls retain the answer's granted workspace. Saving requires `mcp:dashboards:write`, `mcp:query`, the live workspace role, and `APPLY_TO_PRODUCTION` confirmation. No new environment variable is needed, including on self-hosted installs.
|
|
33
|
+
|
|
34
|
+
<details>
|
|
35
|
+
<summary><b>Claude (claude.ai and Claude Desktop)</b></summary>
|
|
36
|
+
|
|
37
|
+
Settings > Connectors > **Add custom connector**. Name `Databrain`, URL `https://mcp.usedatabrain.com/mcp`. Click **Connect** and sign in. Custom connectors need a paid Claude plan.
|
|
38
|
+
</details>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><b>Claude Code</b></summary>
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
claude mcp add --transport http databrain https://mcp.usedatabrain.com/mcp
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then run `/mcp` in Claude Code, pick `databrain` and sign in.
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
<details>
|
|
51
|
+
<summary><b>Cursor</b></summary>
|
|
52
|
+
|
|
53
|
+
[](https://cursor.com/install-mcp?name=databrain&config=eyJ1cmwiOiJodHRwczovL21jcC51c2VkYXRhYnJhaW4uY29tL21jcCJ9)
|
|
54
|
+
|
|
55
|
+
Or add to `~/.cursor/mcp.json`:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{ "mcpServers": { "databrain": { "url": "https://mcp.usedatabrain.com/mcp" } } }
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Cursor signs you in with OAuth the first time a tool runs.
|
|
62
|
+
</details>
|
|
63
|
+
|
|
64
|
+
<details>
|
|
65
|
+
<summary><b>VS Code (GitHub Copilot agent mode)</b></summary>
|
|
66
|
+
|
|
67
|
+
[Install in VS Code](https://insiders.vscode.dev/redirect/mcp/install?name=databrain&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.usedatabrain.com%2Fmcp%22%7D), or:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
code --add-mcp '{"name":"databrain","type":"http","url":"https://mcp.usedatabrain.com/mcp"}'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
VS Code asks you to sign in to Databrain when the server starts.
|
|
74
|
+
</details>
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary><b>ChatGPT</b></summary>
|
|
78
|
+
|
|
79
|
+
Once Databrain is in the ChatGPT directory, search for **Databrain** and connect. Until then, a workspace admin can add it as a custom MCP connection with the URL `https://mcp.usedatabrain.com/mcp` and OAuth ([OpenAI guide](https://developers.openai.com/api/docs/guides/custom-mcp-server)).
|
|
80
|
+
</details>
|
|
81
|
+
|
|
82
|
+
### B. Local server with a service token
|
|
83
|
+
|
|
84
|
+
#### 1. Get your Service Token
|
|
17
85
|
|
|
18
86
|
1. Log in to your Databrain instance (cloud or self-hosted)
|
|
19
87
|
2. Go to **Settings → Service Tokens**
|
|
20
88
|
3. Create a new token and copy it
|
|
21
89
|
|
|
22
|
-
|
|
90
|
+
#### 2. Add to your AI client
|
|
23
91
|
|
|
24
92
|
> **Self-hosted?** Also set `DATABRAIN_API_URL` in the `env` block — see [Self-hosted Databrain](#self-hosted-databrain) below.
|
|
25
93
|
|
|
@@ -280,6 +348,27 @@ At least one of `DATABRAIN_SERVICE_TOKEN` or `DATABRAIN_API_TOKEN` must be set.
|
|
|
280
348
|
|
|
281
349
|
---
|
|
282
350
|
|
|
351
|
+
## Hosted (HTTPS) deployment
|
|
352
|
+
|
|
353
|
+
`node dist/index.js --http` starts the same server as a hosted Streamable HTTP endpoint at `/mcp`. Callers authenticate with an OAuth bearer token on every request; the server never reads `DATABRAIN_SERVICE_TOKEN` or `DATABRAIN_API_TOKEN` in this mode. Full design notes are in [`specs/hosted-http.md`](specs/hosted-http.md).
|
|
354
|
+
|
|
355
|
+
| Variable | Required | Default | Description |
|
|
356
|
+
|----------|----------|---------|-------------|
|
|
357
|
+
| `DATABRAIN_HOSTED_PUBLIC_URL` | Yes | — | Exact public HTTPS URL of the endpoint, ending in `/mcp` (e.g. `https://mcp.usedatabrain.com/mcp`). Used for discovery metadata and audience checks. |
|
|
358
|
+
| `DATABRAIN_HOSTED_ISSUER` | Yes | — | HTTPS origin of the trusted authorization server. Bearer tokens are verified against `<issuer>/oauth/principal`. |
|
|
359
|
+
| `DATABRAIN_HOSTED_BIND` | No | `127.0.0.1` | Listener address. Set `0.0.0.0` in a container so the load balancer can reach it. |
|
|
360
|
+
| `DATABRAIN_HOSTED_PORT` | No | `3144` | Listener port. |
|
|
361
|
+
|
|
362
|
+
`GET /health` (or `HEAD`) returns `200 {"status":"ok"}` with no authentication. It is the only route that skips the Host check, so an ALB health check with the target IP:port as Host succeeds. Point the target group health check at `/health`.
|
|
363
|
+
|
|
364
|
+
The `Dockerfile` at the repo root builds the hosted server from source: `docker build -t databrain-mcp-hosted .` then run it with the two required variables and `-p 3144:3144`.
|
|
365
|
+
|
|
366
|
+
The load balancer **must forward the original `Host` header unchanged**. Requests to `/mcp` and the `/.well-known/oauth-protected-resource` metadata are answered only when Host matches the host of `DATABRAIN_HOSTED_PUBLIC_URL`; anything else gets `403 invalid_host`.
|
|
367
|
+
|
|
368
|
+
**Current limits.** Without `DATABRAIN_HOSTED_ADAPTER_MODULE` (an absolute path to a trusted delegated adapter, see the spec), the default adapter verifies identity only. `whoami`, tool/resource/prompt discovery and OAuth verification work today; every data tool answers `503 delegated_backend_adapter_required` until that adapter is configured.
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
283
372
|
## Available Prompts
|
|
284
373
|
|
|
285
374
|
Prompts are guided workflows your AI assistant can follow. Ask for them by name or describe what you want.
|
|
@@ -298,9 +387,9 @@ Prompts are guided workflows your AI assistant can follow. Ask for them by name
|
|
|
298
387
|
|
|
299
388
|
## Tools Reference
|
|
300
389
|
|
|
301
|
-
|
|
390
|
+
50 tools organized by category (plus 6 chart App tools on the hosted connector and the opt-in `databrain-mcp-chart-apps` entry, and `create_workspace` on the hosted connector: 57 hosted tools total). Your AI assistant picks the right tools automatically. You do not need to call them directly.
|
|
302
391
|
|
|
303
|
-
> **Note:** Datasource
|
|
392
|
+
> **Note:** Datasource creation happens outside MCP. Workspace creation does too, except on the hosted connector: `create_workspace` works there when you granted "All workspaces I can access" and your role may create workspaces. Datamarts can be planned with `create_datamart` in `dry_run` mode and created only with `confirm: "APPLY_TO_PRODUCTION"`. The semantic layer is managed via MCP tools (`get_semantic_layer`, `update_semantic_layer`, `start_semantic_layer_generation`, `get_semantic_layer_generation_status`).
|
|
304
393
|
|
|
305
394
|
<details>
|
|
306
395
|
<summary><b>Infrastructure — Exploration and setup</b> (6)</summary>
|
|
@@ -310,7 +399,8 @@ Prompts are guided workflows your AI assistant can follow. Ask for them by name
|
|
|
310
399
|
| `list_datasources` | List connected datasources |
|
|
311
400
|
| `discover_datasource_schema` | Inspect a datasource to see available tables and columns |
|
|
312
401
|
| `list_datamarts` | List datamarts |
|
|
313
|
-
| `list_workspaces` | List all workspaces (shows datamart/datasource connections) |
|
|
402
|
+
| `list_workspaces` | List all workspaces (shows datamart/datasource connections). Hosted: only the workspaces you granted |
|
|
403
|
+
| `create_workspace` | Hosted connector only: create a workspace (needs an "All workspaces" grant and a role that may create one) |
|
|
314
404
|
| `sync_datasource` | Trigger datasource schema sync |
|
|
315
405
|
| `create_datamart` | Dry-run or create a datamart from selected tables and relationships |
|
|
316
406
|
</details>
|
|
@@ -351,7 +441,7 @@ Prompts are guided workflows your AI assistant can follow. Ask for them by name
|
|
|
351
441
|
</details>
|
|
352
442
|
|
|
353
443
|
<details>
|
|
354
|
-
<summary><b>Query & Semantic Layer</b> (
|
|
444
|
+
<summary><b>Query & Semantic Layer</b> (11): Ask questions and manage data documentation</summary>
|
|
355
445
|
|
|
356
446
|
| Tool | Description |
|
|
357
447
|
|------|-------------|
|
|
@@ -360,14 +450,37 @@ Prompts are guided workflows your AI assistant can follow. Ask for them by name
|
|
|
360
450
|
| `update_semantic_layer` | Improve semantic layer quality (add descriptions, synonyms, example questions) |
|
|
361
451
|
| `start_semantic_layer_generation` | Start semantic-layer generation for a datamart |
|
|
362
452
|
| `get_semantic_layer_generation_status` | Check semantic-layer generation progress |
|
|
453
|
+
| `search_semantic_model` | Find relevant v2 entities and their related entities |
|
|
454
|
+
| `get_semantic_entity` | Read one v2 entity by kind and name with the current content hash |
|
|
455
|
+
| `propose_semantic_change` | Validate candidate YAML or a patch and return its plan without writing |
|
|
456
|
+
| `apply_semantic_change` | Preview by default, or apply live with a reviewed hash and production confirmation |
|
|
457
|
+
| `eval_semantic_model` | Run saved queries and optional questions and return pass rate and verdicts |
|
|
458
|
+
|
|
459
|
+
Semantic-layer generation uses the datamart ID returned by `list_datamarts` and calls the service-token API. Pass `datamartId` directly when the ID is already known.
|
|
460
|
+
|
|
461
|
+
For a v2 model, the five model tools use `datamartId` and the configured service credential. They never request a token from the user or mint a guest token. Hosted eval also requires `mcp:query`; hosted apply requires `mcp:datamarts:write` even for its dry run.
|
|
462
|
+
|
|
463
|
+
1. Use `search_semantic_model` with `question` and optional `k` (default 10, maximum 100). If the server has no retrieval route, the tool pulls the model and ranks name, alias, synonyms and description, then includes adjacent entities. Hidden tables and columns are excluded from local search.
|
|
464
|
+
2. Use `get_semantic_entity` with `kind` and an exact `name`. Column names use `table.column`. Kinds are `table`, `column`, `measure`, `metric`, `join`, `entity`, `glossary`, `saved_query`, `instruction` and `access_rule`.
|
|
465
|
+
3. Use `propose_semantic_change` with exactly one of `source` (complete YAML), `yaml_patch`, or `change`. It returns the candidate source, validation errors, the server plan and `expected_content_hash`. Invalid source returns errors and no plan.
|
|
466
|
+
4. Use `eval_semantic_model` with the proposed `source` and optional `questions`. Omitting source evaluates the stored model. The server returns pass rate and individual verdicts.
|
|
467
|
+
5. Review the plan. Call `apply_semantic_change` with the exact returned `source` and `expected_content_hash`. Its `dry_run` defaults to true. A live apply requires `dry_run: false` and user supplied `confirm: "APPLY_TO_PRODUCTION"`. The assistant must never supply confirmation on its own. Explicit `expected_content_hash: null` selects the first apply only when no layer is stored. Apply changes the live model for all consumers.
|
|
468
|
+
|
|
469
|
+
A YAML patch merges mappings and named lists by name, including tables and columns. Other lists replace the original list. An empty list clears a list. Null removes a field. For example, `yaml_patch: "tables:\n - name: orders\n description: Customer purchases\n"` changes that description and preserves other tables and fields. Patch output normalizes YAML formatting and does not preserve comments. Review the returned source.
|
|
470
|
+
|
|
471
|
+
A structured change uses `{ "operation": "upsert", "kind": "column", "table": "orders", "name": "amount", "value": { "description": "Order total" } }`. Upsert merges fields. Use `operation: "remove"` without `value` to remove one named entity. The backend validates all resulting references.
|
|
472
|
+
|
|
473
|
+
HTTP 409 conflicts and 422 validation or projection refusals return tool errors with the backend reason and details. A conflict requires a fresh proposal and review. Plan, eval and readiness need the corresponding backend routes; these tools return backend errors if those routes are absent.
|
|
474
|
+
|
|
363
475
|
</details>
|
|
364
476
|
|
|
365
477
|
<details>
|
|
366
|
-
<summary><b>Dashboards & Widgets</b> (
|
|
478
|
+
<summary><b>Dashboards & Widgets</b> (9) — Discover dashboards, picture them, and CRUD widgets on customer embeds</summary>
|
|
367
479
|
|
|
368
480
|
| Tool | Description |
|
|
369
481
|
|------|-------------|
|
|
370
482
|
| `list_dashboards` | List dashboards (by data app, workspace, or globally) |
|
|
483
|
+
| `dashboard_snapshot` | A PNG of a dashboard or one chart, light or dark, as the signed-in user sees it. Needs a Databrain sign-in (OAuth), not a service token |
|
|
371
484
|
| `list_widgets` | List widgets on an embed for a specific client |
|
|
372
485
|
| `validate_metric_spec` | Validate a SQL-backed metric target without saving |
|
|
373
486
|
| `create_or_update_metric_from_query` | Dry-run or apply a SQL-backed metric create/update |
|
|
@@ -388,6 +501,44 @@ Production writes through `create_or_update_metric_from_query` default to `dry_r
|
|
|
388
501
|
| `list_scheduled_reports` | List configured scheduled reports for a dashboard/client scope |
|
|
389
502
|
</details>
|
|
390
503
|
|
|
504
|
+
<details>
|
|
505
|
+
<summary><b>Custom chart types</b> (5)</summary>
|
|
506
|
+
|
|
507
|
+
| Tool | Description |
|
|
508
|
+
|------|-------------|
|
|
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 |
|
|
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 |
|
|
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 |
|
|
514
|
+
| `list_custom_charts` | List the company's custom chart types with status and version ids |
|
|
515
|
+
| `publish_custom_chart` | Dry-run or publish a version so every builder can use chart type `custom:<key>` |
|
|
516
|
+
|
|
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.
|
|
522
|
+
</details>
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Custom chart CLI
|
|
527
|
+
|
|
528
|
+
The package also installs a `databrain` binary for chart authors:
|
|
529
|
+
|
|
530
|
+
```bash
|
|
531
|
+
npx -p @databrainhq/mcp-server databrain custom-chart init my-chart
|
|
532
|
+
cd my-chart # read AGENTS.md, edit chart.ts
|
|
533
|
+
databrain custom-chart validate # manifest, icon, css
|
|
534
|
+
databrain custom-chart build # writes dist/index.js, manifest.json, icon.svg, index.css, bundle.zip
|
|
535
|
+
databrain custom-chart dev # local sandbox page on http://127.0.0.1:4174
|
|
536
|
+
DATABRAIN_SERVICE_TOKEN=... databrain custom-chart upload # build, server validate, plan, confirm, upload
|
|
537
|
+
DATABRAIN_SERVICE_TOKEN=... databrain custom-chart upload --publish --yes
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
Problems print as `path code message` and the exit code is 1 when there is any. `upload` needs `DATABRAIN_SERVICE_TOKEN` and, on self-hosted instances, `DATABRAIN_API_URL`. The template's `AGENTS.md` is the full author guide: manifest reference, data shape, theme, interactions, troubleshooting.
|
|
541
|
+
|
|
391
542
|
---
|
|
392
543
|
|
|
393
544
|
## Built-in Knowledge
|
package/dist/apps/server.d.ts
CHANGED
|
@@ -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<{
|
|
@@ -198,115 +212,139 @@ declare const pageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
198
212
|
}, "strict", z.ZodTypeAny, {
|
|
199
213
|
value: string | number | boolean | null;
|
|
200
214
|
label: string;
|
|
201
|
-
key: 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
223
|
label: string;
|
|
210
|
-
key: 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
241
|
label: string;
|
|
232
|
-
key: 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
270
|
label: string;
|
|
255
|
-
key: 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
299
|
label: string;
|
|
278
|
-
key: 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
328
|
label: string;
|
|
301
|
-
key: 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>;
|
package/dist/apps/server.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createChartAppServer
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
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";
|
|
6
9
|
export {
|
|
7
10
|
createChartAppServer
|
|
8
11
|
};
|
package/dist/apps/stdio.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
loadConfig
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-DM7S4R57.js";
|
|
5
5
|
import {
|
|
6
6
|
createChartAppServer
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
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";
|
|
9
12
|
|
|
10
13
|
// src/apps/stdio.ts
|
|
11
14
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
package/dist/apps/stdio.js.map
CHANGED
|
@@ -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":"
|
|
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-
|
|
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-
|
|
75
|
+
//# sourceMappingURL=chunk-DM7S4R57.js.map
|