@nifrajs/mcp 1.9.0 → 1.10.0

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/dist/bridge.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * Theming follows the shadcn/Tailwind semantic-token convention (`--background`, `--foreground`,
11
11
  * `--primary`, `--card`, `--border`, `--radius`, …). The host pushes its resolved tokens; the bridge
12
12
  * applies them to the document root, so a widget that styles with `var(--primary)` etc. matches the host
13
- * app (e.g. a ShipNow-generated app injecting its theme preset) with zero per-widget work.
13
+ * app with zero per-widget work.
14
14
  *
15
15
  * It exposes a small global the widget author scripts against, so authoring a widget is just
16
16
  * `mcpApp.onData(render)` + (optionally) `mcpApp.callTool(name, args)` — no postMessage plumbing.
package/dist/bridge.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * Theming follows the shadcn/Tailwind semantic-token convention (`--background`, `--foreground`,
11
11
  * `--primary`, `--card`, `--border`, `--radius`, …). The host pushes its resolved tokens; the bridge
12
12
  * applies them to the document root, so a widget that styles with `var(--primary)` etc. matches the host
13
- * app (e.g. a ShipNow-generated app injecting its theme preset) with zero per-widget work.
13
+ * app with zero per-widget work.
14
14
  *
15
15
  * It exposes a small global the widget author scripts against, so authoring a widget is just
16
16
  * `mcpApp.onData(render)` + (optionally) `mcpApp.callTool(name, args)` — no postMessage plumbing.
package/dist/tool.d.ts CHANGED
@@ -20,7 +20,7 @@ export type McpToolHandlerResult = string | {
20
20
  readonly isError?: boolean;
21
21
  };
22
22
  /**
23
- * A render-intent hint for GENERATIVE hosts (e.g. the ShipNow builder): how to present the result's
23
+ * A render-intent hint for GENERATIVE hosts: how to present the result's
24
24
  * `structuredContent` when the host renders its OWN themed UI rather than an iframe widget. The host maps
25
25
  * the intent to a component in its design system (a shadcn/Tailwind table, form, metric card, …). Open
26
26
  * union — pick a known tag or a custom one.
@@ -35,7 +35,7 @@ export interface DefineMcpToolOptions {
35
35
  readonly widget?: McpWidget;
36
36
  /** Render-intent for generative hosts that build their own themed UI from `structuredContent`. Lands
37
37
  * in `_meta.ui.intent`. Independent of `widget` — a tool can offer both (widget for MCP Apps hosts,
38
- * intent for builders like ShipNow). */
38
+ * intent for generative builders). */
39
39
  readonly intent?: McpUiIntent;
40
40
  readonly handler: (args: Record<string, unknown>, context: McpToolContext) => McpToolHandlerResult | Promise<McpToolHandlerResult>;
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAiB,MAAM,eAAe,CAAA;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,6GAA6G;AAC7G,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN;IACE,yFAAyF;IACzF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,kDAAkD;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAA;IAC7C,gFAAgF;IAChF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAEL;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,yEAAyE;IACzE,QAAQ,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AM,GAAG,EAAE,CAAC,CAAA;AAEjB,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9C,+FAA+F;IAC/F,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;IAC3B;;0CAEsC;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;IAC7B,QAAQ,CAAC,OAAO,EAAE,CAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,cAAc,KACpB,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;CAC1D;AAmCD,wBAAgB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CASjE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nifrajs/mcp",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Build MCP servers — and MCP Apps (interactive `ui://` widgets, SEP-1865) — for a nifra app. The transport-agnostic JSON-RPC core (also used by `@nifrajs/cli`'s dev MCP), a Streamable-HTTP handler you mount at `POST /mcp`, and `defineMcpWidget`/`defineMcpTool` for tool results that render real UI in MCP hosts.",
5
5
  "keywords": [
6
6
  "bun",
package/src/bridge.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * Theming follows the shadcn/Tailwind semantic-token convention (`--background`, `--foreground`,
11
11
  * `--primary`, `--card`, `--border`, `--radius`, …). The host pushes its resolved tokens; the bridge
12
12
  * applies them to the document root, so a widget that styles with `var(--primary)` etc. matches the host
13
- * app (e.g. a ShipNow-generated app injecting its theme preset) with zero per-widget work.
13
+ * app with zero per-widget work.
14
14
  *
15
15
  * It exposes a small global the widget author scripts against, so authoring a widget is just
16
16
  * `mcpApp.onData(render)` + (optionally) `mcpApp.callTool(name, args)` — no postMessage plumbing.
package/src/tool.ts CHANGED
@@ -25,7 +25,7 @@ export type McpToolHandlerResult =
25
25
  }
26
26
 
27
27
  /**
28
- * A render-intent hint for GENERATIVE hosts (e.g. the ShipNow builder): how to present the result's
28
+ * A render-intent hint for GENERATIVE hosts: how to present the result's
29
29
  * `structuredContent` when the host renders its OWN themed UI rather than an iframe widget. The host maps
30
30
  * the intent to a component in its design system (a shadcn/Tailwind table, form, metric card, …). Open
31
31
  * union — pick a known tag or a custom one.
@@ -49,7 +49,7 @@ export interface DefineMcpToolOptions {
49
49
  readonly widget?: McpWidget
50
50
  /** Render-intent for generative hosts that build their own themed UI from `structuredContent`. Lands
51
51
  * in `_meta.ui.intent`. Independent of `widget` — a tool can offer both (widget for MCP Apps hosts,
52
- * intent for builders like ShipNow). */
52
+ * intent for generative builders). */
53
53
  readonly intent?: McpUiIntent
54
54
  readonly handler: (
55
55
  args: Record<string, unknown>,