@svgrid/mcp 3.0.16 → 3.0.18

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.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Telling the caller when an answer involves the paid package.
3
+ *
4
+ * A model that finds the export or pivot demo has no way to know it imports a
5
+ * commercial package, so it writes the code, the user installs it, and the
6
+ * first they hear of a license is the watermark. One line in the answer, at the
7
+ * moment the feature comes up, is the information they need to decide.
8
+ *
9
+ * Nothing here is sent anywhere. The trial link carries `?trial=mcp` so a
10
+ * trial started from it is counted apart from the website's buttons; that
11
+ * happens only if the person opens it.
12
+ */
13
+ /** Opens the trial dialog on svgrid.com (website/src/lib/trial-link.ts). */
14
+ export declare const TRIAL_URL = "https://svgrid.com/pricing/?trial=mcp";
15
+ export declare const ENTERPRISE_NOTE: string;
16
+ /** Same note for a single doc, demo or check result. */
17
+ export declare const ENTERPRISE_LINE: string;
18
+ /** True when the code or markdown imports from @svgrid/enterprise. */
19
+ export declare function importsEnterprise(source: string): boolean;
20
+ /** A doc page about the paid package: under enterprise/, or showing its imports. */
21
+ export declare function isEnterpriseDoc(slug: string, markdown: string): boolean;
22
+ /**
23
+ * Whether a ranked answer is about a paid feature: two of the top three in
24
+ * some list are paid. Every hit carries its own mark either way; this decides
25
+ * only whether the note goes on top. Keyed on any hit, the note rode on most
26
+ * free questions ("sort" lists a Studio page, "filter" leads with the
27
+ * advanced filter) and read as an ad.
28
+ */
29
+ export declare function isPaidQuestion(lists: readonly (readonly {
30
+ enterprise?: boolean;
31
+ }[])[]): boolean;
32
+ /** Whether a check result's fixes send the caller to the paid package. */
33
+ export declare function checkNeedsEnterprise(diagnostics: readonly {
34
+ rule: string;
35
+ fix?: string;
36
+ }[]): boolean;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Telling the caller when an answer involves the paid package.
3
+ *
4
+ * A model that finds the export or pivot demo has no way to know it imports a
5
+ * commercial package, so it writes the code, the user installs it, and the
6
+ * first they hear of a license is the watermark. One line in the answer, at the
7
+ * moment the feature comes up, is the information they need to decide.
8
+ *
9
+ * Nothing here is sent anywhere. The trial link carries `?trial=mcp` so a
10
+ * trial started from it is counted apart from the website's buttons; that
11
+ * happens only if the person opens it.
12
+ */
13
+ /** Opens the trial dialog on svgrid.com (website/src/lib/trial-link.ts). */
14
+ export const TRIAL_URL = 'https://svgrid.com/pricing/?trial=mcp';
15
+ export const ENTERPRISE_NOTE = 'Results marked enterprise:true use @svgrid/enterprise, the commercial package. ' +
16
+ 'It runs without a license key and shows a watermark until one is set. ' +
17
+ `30-day trial with email support: ${TRIAL_URL}`;
18
+ /** Same note for a single doc, demo or check result. */
19
+ export const ENTERPRISE_LINE = 'Uses @svgrid/enterprise, the commercial package. It runs without a license key and shows a ' +
20
+ `watermark until one is set. 30-day trial with email support: ${TRIAL_URL}`;
21
+ const IMPORTS_ENTERPRISE = /\bfrom\s+['"]@svgrid\/enterprise(?:\/[\w/-]+)?['"]/;
22
+ /** True when the code or markdown imports from @svgrid/enterprise. */
23
+ export function importsEnterprise(source) {
24
+ return IMPORTS_ENTERPRISE.test(source);
25
+ }
26
+ /** A doc page about the paid package: under enterprise/, or showing its imports. */
27
+ export function isEnterpriseDoc(slug, markdown) {
28
+ return slug.startsWith('enterprise/') || importsEnterprise(markdown);
29
+ }
30
+ /**
31
+ * Whether a ranked answer is about a paid feature: two of the top three in
32
+ * some list are paid. Every hit carries its own mark either way; this decides
33
+ * only whether the note goes on top. Keyed on any hit, the note rode on most
34
+ * free questions ("sort" lists a Studio page, "filter" leads with the
35
+ * advanced filter) and read as an ad.
36
+ */
37
+ export function isPaidQuestion(lists) {
38
+ return lists.some((hits) => hits.slice(0, 3).filter((h) => h.enterprise).length >= 2);
39
+ }
40
+ /** Whether a check result's fixes send the caller to the paid package. */
41
+ export function checkNeedsEnterprise(diagnostics) {
42
+ return diagnostics.some((d) => d.rule === 'svgrid/enterprise-not-installed' || (d.fix ?? '').includes("from '@svgrid/enterprise'"));
43
+ }
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * SvGrid MCP server (stdio).
4
4
  *
5
5
  * Gives an MCP-capable client accurate, version-pinned answers about SvGrid -
6
- * the real exported API, the shipped docs, 400+ runnable demos - and, uniquely,
6
+ * the real exported API, the shipped docs, 500+ runnable demos - and, uniquely,
7
7
  * a way to CHECK generated code against that surface before a user ever sees
8
8
  * it.
9
9
  *
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * SvGrid MCP server (stdio).
4
4
  *
5
5
  * Gives an MCP-capable client accurate, version-pinned answers about SvGrid -
6
- * the real exported API, the shipped docs, 400+ runnable demos - and, uniquely,
6
+ * the real exported API, the shipped docs, 500+ runnable demos - and, uniquely,
7
7
  * a way to CHECK generated code against that surface before a user ever sees
8
8
  * it.
9
9
  *
@@ -31,6 +31,7 @@ import { PROMPTS, getPrompt } from './prompts.js';
31
31
  import { installedGrid, versionNote } from './installed.js';
32
32
  import { applyFixes, checkSvGridCode } from './validate.js';
33
33
  import { compileWithSvelte } from './compile-svelte.js';
34
+ import { ENTERPRISE_LINE, checkNeedsEnterprise } from './enterprise.js';
34
35
  import { checkLicenseKey, introspectDrizzle, introspectJson, scaffold, summarizeVerify, verifyScaffold, } from '@svgrid/enterprise/studio';
35
36
  /**
36
37
  * Soft commercial gate. Uses the SAME classifier as the browser
@@ -147,6 +148,9 @@ async function runCheck(args) {
147
148
  ...result,
148
149
  ...(version ? { version } : {}),
149
150
  ...(applied.length ? { applied, fixed } : {}),
151
+ // The one exception to "no marketing in a work list": a fix that sends the
152
+ // caller to the paid package says so, because installing it is the next step.
153
+ ...(checkNeedsEnterprise(result.diagnostics) ? { enterprise: ENTERPRISE_LINE } : {}),
150
154
  };
151
155
  // No docs footer: this output is a work list, and a marketing line at the end
152
156
  // of it is noise the model has to read past on every iteration.
package/dist/installed.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Which version of SvGrid the person asking actually has installed.
3
3
  *
4
- * This is the thing a proxy-shaped MCP server cannot do. Telerik and Syncfusion
5
- * answer every question from a backend that serves one global "latest" - their
6
- * server has no idea what is in your `node_modules`, so a model can be told
7
- * about an API you do not have, confidently and with a citation.
4
+ * This is the thing a proxy-shaped MCP server cannot do. A server that answers
5
+ * every question from a backend serving one global "latest" has no idea what
6
+ * is in your `node_modules`, so a model can be told about an API you do not
7
+ * have, confidently and with a citation.
8
8
  *
9
9
  * We ship the corpus, so we can do better: read the consumer's installed grid
10
10
  * and say plainly when it disagrees with what this corpus describes. A warning
package/dist/preview.d.ts CHANGED
@@ -8,7 +8,7 @@ export declare const UI_RESOURCE_URI = "ui://svgrid/preview.html";
8
8
  * start failing in a way nobody is watching for. `tools/mcp-tools.test.ts` checks these
9
9
  * against the workspace so they cannot quietly rot either.
10
10
  */
11
- export declare const PREVIEW_GRID_WC_VERSION = "3.0.15";
11
+ export declare const PREVIEW_GRID_WC_VERSION = "3.0.16";
12
12
  export declare function previewResource(): {
13
13
  uri: string;
14
14
  name: string;
package/dist/preview.js CHANGED
@@ -27,7 +27,7 @@ const UI_RESOURCE_META_KEY = 'ui/resourceUri';
27
27
  * start failing in a way nobody is watching for. `tools/mcp-tools.test.ts` checks these
28
28
  * against the workspace so they cannot quietly rot either.
29
29
  */
30
- export const PREVIEW_GRID_WC_VERSION = '3.0.15';
30
+ export const PREVIEW_GRID_WC_VERSION = '3.0.16';
31
31
  const EXT_APPS_VERSION = '1.7.5';
32
32
  const CDN = 'https://cdn.jsdelivr.net/npm';
33
33
  /**
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "commercial",
6
6
  "url": "https://svgrid.com/pricing"
7
7
  },
8
- "version": "3.0.16",
8
+ "version": "3.0.18",
9
9
  "description": "Model Context Protocol server for SvGrid, the Svelte 5 data grid: checks the code your AI writes against the real API surface, plus version-pinned docs, API reference and 373 demo sources.",
10
10
  "license": "MIT",
11
11
  "author": "jQWidgets <sales@jqwidgets.com>",
@@ -33,7 +33,7 @@
33
33
  "@modelcontextprotocol/sdk": "^1.0.4",
34
34
  "svelte": "^5.55.5",
35
35
  "zod": "^3.23.8",
36
- "@svgrid/enterprise": "^3.1.10"
36
+ "@svgrid/enterprise": "^3.1.11"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.10.7",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "com.svgrid/svgrid",
4
4
  "title": "SvGrid",
5
5
  "description": "Checks AI-written SvGrid code against the real API, plus version-pinned Svelte 5 grid docs.",
6
- "version": "3.0.16",
6
+ "version": "3.0.18",
7
7
  "websiteUrl": "https://svgrid.com/docs/help/mcp-server/",
8
8
  "repository": {
9
9
  "url": "https://github.com/sv-grid/sv-grid",
@@ -15,7 +15,7 @@
15
15
  "registryType": "npm",
16
16
  "registryBaseUrl": "https://registry.npmjs.org",
17
17
  "identifier": "@svgrid/mcp",
18
- "version": "3.0.16",
18
+ "version": "3.0.18",
19
19
  "runtimeHint": "npx",
20
20
  "transport": {
21
21
  "type": "stdio"