@ggui-ai/mcp-server 0.7.0 → 0.8.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.
@@ -8,11 +8,16 @@
8
8
  *
9
9
  * GET /ggui/console/session-resource?session=<sessionId>
10
10
  * — production thin-shell HTML, wrapped as a ResourceContents
11
- * blob (`text` IS `GGUI_RENDER_SHELL_HTML`, byte-identical to
12
- * what Claude Desktop fetches via MCP `resources/read
13
- * ui://ggui/render`). NO inlined bootstrap — console fetches
14
- * the bootstrap separately (meta route below) and replies to
15
- * the iframe's `ui/initialize` postMessage with it.
11
+ * blob (`text` IS the `GGUI_RENDER_SHELL_HTML` constant). On a
12
+ * default mount this matches what a host fetches via MCP
13
+ * `resources/read ui://ggui/render`; a mount opted into
14
+ * `mcpApps.inlineRuntimeShell` (or a custom `shellHtml`) serves
15
+ * a different body on the MCP path while THIS route keeps the
16
+ * thin shell — its first-party srcdoc/WebView consumers load
17
+ * external scripts fine and rely on the pinned CSP hash. NO
18
+ * inlined bootstrap — console fetches the bootstrap separately
19
+ * (meta route below) and replies to the iframe's
20
+ * `ui/initialize` postMessage with it.
16
21
  *
17
22
  * GET /ggui/console/sessions/:sessionId/meta
18
23
  * — slice-envelope JSON (`{ "ai.ggui/render": {...} }`, the same
@@ -1 +1 @@
1
- {"version":3,"file":"console-session-routes.d.ts","sourceRoot":"","sources":["../src/console-session-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQ5F,OAAO,KAAK,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAC;AAQ1D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI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AO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI1C,UAAU,YAAY;IACpB,iCAAiC;IACjC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,4DAA4D;IAC5D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,4DAA4D;IAC5D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IACxC,qEAAqE;IACrE,QAAQ,CAAC,aAAa,CAAC,EAAE,CACvB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,KACV;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IACzD,uEAAuE;IACvE,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,mEAAmE;IACnE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,sEAAsE;IACtE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,YAAY,GAAG,4BAA4B,CA0V1F"}
@@ -8,11 +8,16 @@
8
8
  *
9
9
  * GET /ggui/console/session-resource?session=<sessionId>
10
10
  * — production thin-shell HTML, wrapped as a ResourceContents
11
- * blob (`text` IS `GGUI_RENDER_SHELL_HTML`, byte-identical to
12
- * what Claude Desktop fetches via MCP `resources/read
13
- * ui://ggui/render`). NO inlined bootstrap — console fetches
14
- * the bootstrap separately (meta route below) and replies to
15
- * the iframe's `ui/initialize` postMessage with it.
11
+ * blob (`text` IS the `GGUI_RENDER_SHELL_HTML` constant). On a
12
+ * default mount this matches what a host fetches via MCP
13
+ * `resources/read ui://ggui/render`; a mount opted into
14
+ * `mcpApps.inlineRuntimeShell` (or a custom `shellHtml`) serves
15
+ * a different body on the MCP path while THIS route keeps the
16
+ * thin shell — its first-party srcdoc/WebView consumers load
17
+ * external scripts fine and rely on the pinned CSP hash. NO
18
+ * inlined bootstrap — console fetches the bootstrap separately
19
+ * (meta route below) and replies to the iframe's
20
+ * `ui/initialize` postMessage with it.
16
21
  *
17
22
  * GET /ggui/console/sessions/:sessionId/meta
18
23
  * — slice-envelope JSON (`{ "ai.ggui/render": {...} }`, the same
@@ -78,7 +78,41 @@ export declare const GGUI_RENDER_SHELL_HTML = "<!doctype html>\n<html lang=\"en\
78
78
  * the CSP it inherits.
79
79
  */
80
80
  export declare const GGUI_RENDER_SHELL_SCRIPT_HASH: string;
81
- export declare function registerGguiRenderResource(server: McpServer, shellHtml?: string, publicBaseUrl?: string): void;
81
+ /**
82
+ * Build the INLINE-RUNTIME static shell: a standalone document carrying
83
+ * the iframe-runtime bundle in its own bytes instead of an external
84
+ * `<script src>` tag. For MCP Apps hosts whose iframe CSP forbids
85
+ * external `script-src` while permitting inline scripts — the thin
86
+ * postMessage shell can never load its runtime there, so the shell IS
87
+ * the runtime.
88
+ *
89
+ * Per-render state does NOT live here (same posture as the thin
90
+ * shell): the host delivers it via `ui/notifications/tool-result`,
91
+ * caught either by the buffer script (pre-parse arrivals) or by the
92
+ * runtime's own autostart listener. Live-channel / codeUrl fetches are
93
+ * unavailable under the CSP this shell targets; delivered meta is
94
+ * expected to carry the fetch-free channels (inline `codeB64`, inline
95
+ * `propsJson`).
96
+ *
97
+ * Served per-mount via `installMcpAppsOutbound({ shellHtml })` — the
98
+ * module-level thin-shell constants (and their pinned CSP hash) are
99
+ * deliberately untouched.
100
+ */
101
+ export declare function buildInlineRenderShellHtml(runtimeSource: string): string;
102
+ export declare function registerGguiRenderResource(server: McpServer, shellHtml?: string, publicBaseUrl?: string,
103
+ /**
104
+ * Absolute runtime-bundle URL used as the CSP-declaration fallback
105
+ * when `publicBaseUrl` is absent — same posture as the per-render
106
+ * template registration ({@link buildCspMeta}'s second parameter).
107
+ * Deployments that publish an absolute `runtime.url` but
108
+ * deliberately do NOT set `publicBaseUrl` (it also feeds
109
+ * Origin/Host enforcement and OAuth) still get
110
+ * `_meta.ui.csp.{connectDomains,resourceDomains}` on the static
111
+ * resource read; before this fallback those reads carried no
112
+ * declaration at all and spec-compliant hosts applied the
113
+ * restrictive default (`connect-src 'none'`).
114
+ */
115
+ runtimeUrl?: string): void;
82
116
  /**
83
117
  * Advertise the `io.modelcontextprotocol/ui` extension capability on
84
118
  * an `McpServer`'s underlying `Server`. Idempotent - calling twice on
@@ -116,6 +150,16 @@ export interface SelfContainedShellInputs {
116
150
  * renders without re-parsing.
117
151
  */
118
152
  readonly codeHash?: string;
153
+ /**
154
+ * Base64-encoded compiled component source inlined on the bootstrap
155
+ * — the fetch-free twin of {@link codeUrl}, decoded by the
156
+ * iframe-runtime instead of fetched. May coexist with codeUrl
157
+ * (consumers prefer the inline bytes); mutually exclusive with
158
+ * {@link systemKind}. For hosts whose iframe CSP blocks the codeUrl
159
+ * fetch, and for deployments whose code store is unwired or down —
160
+ * the inline bytes make the shell mountable independently of both.
161
+ */
162
+ readonly codeB64?: string;
119
163
  /**
120
164
  * System-card kind identifier, mapped at runtime against the
121
165
  * built-in `SYSTEM_CARD_REGISTRY`. Mutually exclusive with
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-apps-outbound.d.ts","sourceRoot":"","sources":["../src/mcp-apps-outbound.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAEhB,WAAW,EACZ,MAA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AW,CAAC,EAAE,CACrB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,KACV;QACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,cAAc,GAAG,SAAS,CAAC;IACvD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AA4DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AACH,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,iCAAiC,GACtC,IAAI,CAu1BN;AAiGD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EACjB,IAAI,GAAE;IACJ,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAC3D;;;;;;;;OAQG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CAC5B,GACL,IAAI,CAeN"}
@@ -33,7 +33,7 @@
33
33
  */
34
34
  import { deriveBundleOrigins, deriveContractBundle, derivePublicEnvProjection, deriveRenderMeta, filterDescriptorsToContract, findBlueprintExact, } from "@ggui-ai/mcp-server-handlers/renders";
35
35
  import { RESOURCE_NOT_FOUND_MESSAGE, deriveContextDefault, isRecord, resolveAppGadgets, resourceReadErrorToJsonRpc, } from "@ggui-ai/protocol";
36
- import { GGUI_RENDER_RESOURCE_MIME, GGUI_RENDER_RESOURCE_URI, GGUI_RENDER_SHELL_SURFACE, MCP_APPS_UI_CAPABILITY, MCP_APP_BOOTSTRAP_FAILED_TYPE, asGguiRenderBootstrap, deriveContextName, gguiShellHtml, toMcpAppEnvelope, } from "@ggui-ai/protocol/integrations/mcp-apps";
36
+ import { GGUI_RENDER_RESOURCE_MIME, GGUI_RENDER_RESOURCE_URI, GGUI_RENDER_SHELL_SURFACE, MCP_APPS_UI_CAPABILITY, MCP_APP_BOOTSTRAP_FAILED_TYPE, asGguiRenderBootstrap, deriveContextName, escapeInlineScript, gguiShellHtml, toMcpAppEnvelope, } from "@ggui-ai/protocol/integrations/mcp-apps";
37
37
  import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
38
38
  import { registerAppResource } from "@modelcontextprotocol/ext-apps/server";
39
39
  import { createHash } from "node:crypto";
@@ -373,6 +373,70 @@ export const GGUI_RENDER_SHELL_HTML = `<!doctype html>
373
373
  export const GGUI_RENDER_SHELL_SCRIPT_HASH = `'sha256-${createHash("sha256")
374
374
  .update(GGUI_RENDER_SHELL_SCRIPT_BODY)
375
375
  .digest("base64")}'`;
376
+ /**
377
+ * Bootstrap `<script>` body of the INLINE-RUNTIME shell (see
378
+ * {@link buildInlineRenderShellHtml}). Runs BEFORE the (large) inline
379
+ * runtime module parses and does exactly two things:
380
+ *
381
+ * 1. Installs the `window.__GGUI_PENDING_TOOL_RESULTS__` buffer the
382
+ * iframe-runtime's autostart drains (`readPendingToolResults`
383
+ * contract: an array whose elements are the RAW
384
+ * `ui/notifications/tool-result` JSON-RPC `params` values, arrival
385
+ * order, capped so a long-lived host session cannot grow it
386
+ * unboundedly).
387
+ * 2. Sends the `ui/initialize` → `ui/notifications/initialized`
388
+ * preflight. Load-bearing against a mutual 30s stall: spec hosts
389
+ * gate tool-result delivery BEHIND the handshake, while the
390
+ * runtime's autostart waits for a tool-result before its own
391
+ * handshake runs. The runtime repeats `ui/initialize` when it
392
+ * boots; MCP Apps hosts handle the repeat idempotently (same
393
+ * preflight pattern as the thin shell above).
394
+ *
395
+ * No overlay, no meta inspection, no runtime loading — the runtime is
396
+ * inline in the same document and owns everything else.
397
+ */
398
+ const GGUI_INLINE_SHELL_BUFFER_SCRIPT_BODY = `
399
+ (function(){'use strict';
400
+ var buf=window.__GGUI_PENDING_TOOL_RESULTS__=window.__GGUI_PENDING_TOOL_RESULTS__||[];
401
+ window.addEventListener('message',function(ev){
402
+ var m=ev&&ev.data;
403
+ if(!m||m.jsonrpc!=='2.0'||m.method!=='ui/notifications/tool-result')return;
404
+ buf.push(m.params);
405
+ if(buf.length>8)buf.splice(0,buf.length-8);
406
+ });
407
+ try{
408
+ window.parent.postMessage({jsonrpc:'2.0',id:'ggui-inline-preflight',method:'ui/initialize',params:{appCapabilities:{},appInfo:{name:'ggui-render',version:'1.0.0'},protocolVersion:'2026-01-26'}},'*');
409
+ window.parent.postMessage({jsonrpc:'2.0',method:'ui/notifications/initialized',params:{}},'*');
410
+ }catch(e){}
411
+ })();
412
+ `;
413
+ /**
414
+ * Build the INLINE-RUNTIME static shell: a standalone document carrying
415
+ * the iframe-runtime bundle in its own bytes instead of an external
416
+ * `<script src>` tag. For MCP Apps hosts whose iframe CSP forbids
417
+ * external `script-src` while permitting inline scripts — the thin
418
+ * postMessage shell can never load its runtime there, so the shell IS
419
+ * the runtime.
420
+ *
421
+ * Per-render state does NOT live here (same posture as the thin
422
+ * shell): the host delivers it via `ui/notifications/tool-result`,
423
+ * caught either by the buffer script (pre-parse arrivals) or by the
424
+ * runtime's own autostart listener. Live-channel / codeUrl fetches are
425
+ * unavailable under the CSP this shell targets; delivered meta is
426
+ * expected to carry the fetch-free channels (inline `codeB64`, inline
427
+ * `propsJson`).
428
+ *
429
+ * Served per-mount via `installMcpAppsOutbound({ shellHtml })` — the
430
+ * module-level thin-shell constants (and their pinned CSP hash) are
431
+ * deliberately untouched.
432
+ */
433
+ export function buildInlineRenderShellHtml(runtimeSource) {
434
+ return `<!doctype html>
435
+ <html lang="en" style="height:100%;background-color:${GGUI_RENDER_SHELL_SURFACE}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark"><title>ggui render</title></head>
436
+ <body style="margin:0;height:100%;min-height:480px;background-color:${GGUI_RENDER_SHELL_SURFACE}"><div id="ggui-root" data-ggui-shell="inline" style="height:100%;min-height:480px"></div>
437
+ <script>${GGUI_INLINE_SHELL_BUFFER_SCRIPT_BODY}</script>
438
+ <script type="module" data-ggui-runtime="inline">${escapeInlineScript(runtimeSource)}</script></body></html>`;
439
+ }
376
440
  /**
377
441
  * Register `ui://ggui/render` as a readable resource on an `McpServer`.
378
442
  *
@@ -441,40 +505,21 @@ runtimeUrl) {
441
505
  return undefined;
442
506
  }
443
507
  }
444
- export function registerGguiRenderResource(server, shellHtml = GGUI_RENDER_SHELL_HTML, publicBaseUrl) {
445
- let cspMeta;
446
- if (publicBaseUrl) {
447
- try {
448
- const parsed = new URL(publicBaseUrl);
449
- const origin = parsed.origin;
450
- // CSP `connect-src` does NOT cross-translate between `https://`
451
- // and `wss://` — they're independent URL schemes for the
452
- // browser's URL-match algorithm. Declaring ONLY the HTTPS
453
- // origin will leave WebSocket subscribes (`wss://<same-host>/ws`)
454
- // blocked by hosts that compose strict CSPs from this
455
- // `connectDomains` list (claude.ai's iframe is the live
456
- // diagnosis case). Declare BOTH schemes so the same physical
457
- // origin is reachable via HTTPS (`/api/bootstrap`, `/_ggui/
458
- // iframe-runtime.js`) AND wss (live-channel subscribe).
459
- const wsScheme = parsed.protocol === "https:" ? "wss:" : "ws:";
460
- const wsOrigin = `${wsScheme}//${parsed.host}`;
461
- cspMeta = {
462
- ui: {
463
- csp: {
464
- connectDomains: [origin, wsOrigin],
465
- resourceDomains: [origin],
466
- },
467
- },
468
- };
469
- }
470
- catch {
471
- // Malformed `publicBaseUrl` — leave `_meta.ui.csp` off rather
472
- // than emitting a broken declaration. The host falls back to its
473
- // restrictive default and operators get the same observable
474
- // failure they'd get from any other malformed URL setting.
475
- cspMeta = undefined;
476
- }
477
- }
508
+ export function registerGguiRenderResource(server, shellHtml = GGUI_RENDER_SHELL_HTML, publicBaseUrl,
509
+ /**
510
+ * Absolute runtime-bundle URL used as the CSP-declaration fallback
511
+ * when `publicBaseUrl` is absent — same posture as the per-render
512
+ * template registration ({@link buildCspMeta}'s second parameter).
513
+ * Deployments that publish an absolute `runtime.url` but
514
+ * deliberately do NOT set `publicBaseUrl` (it also feeds
515
+ * Origin/Host enforcement and OAuth) still get
516
+ * `_meta.ui.csp.{connectDomains,resourceDomains}` on the static
517
+ * resource read; before this fallback those reads carried no
518
+ * declaration at all and spec-compliant hosts applied the
519
+ * restrictive default (`connect-src 'none'`).
520
+ */
521
+ runtimeUrl) {
522
+ const cspMeta = buildCspMeta(publicBaseUrl, runtimeUrl);
478
523
  // `registerAppResource` (from `@modelcontextprotocol/ext-apps/server`)
479
524
  // defaults `mimeType` to `RESOURCE_MIME_TYPE` — the same
480
525
  // `text/html;profile=mcp-app` value `GGUI_RENDER_RESOURCE_MIME`
@@ -549,12 +594,13 @@ export function buildSelfContainedShell(opts) {
549
594
  // picks per its priority order.
550
595
  const isSystem = typeof opts.systemKind === "string" && opts.systemKind.length > 0;
551
596
  const hasCodeUrl = typeof opts.codeUrl === "string" && opts.codeUrl.length > 0;
597
+ const hasCodeB64 = typeof opts.codeB64 === "string" && opts.codeB64.length > 0;
552
598
  const hasLive = typeof opts.wsUrl === "string" &&
553
599
  opts.wsUrl.length > 0 &&
554
600
  typeof opts.token === "string" &&
555
601
  opts.token.length > 0;
556
- if (!isSystem && !hasCodeUrl && !hasLive) {
557
- throw new Error("buildSelfContainedShell: at least one of `codeUrl`, `systemKind`, or live-mode (`wsUrl` + `token`) must be set");
602
+ if (!isSystem && !hasCodeUrl && !hasCodeB64 && !hasLive) {
603
+ throw new Error("buildSelfContainedShell: at least one of `codeUrl`, `codeB64`, `systemKind`, or live-mode (`wsUrl` + `token`) must be set");
558
604
  }
559
605
  // Build the single render slice (Phase B: ai.ggui/render collapsed
560
606
  // the prior ai.ggui/session + ai.ggui/stack-item pair into one flat
@@ -615,6 +661,7 @@ export function buildSelfContainedShell(opts) {
615
661
  ...(opts.codeHash !== undefined ? { codeHash: opts.codeHash } : {}),
616
662
  }
617
663
  : {}),
664
+ ...(!isSystem && hasCodeB64 ? { codeB64: opts.codeB64 } : {}),
618
665
  ...(opts.propsJson !== undefined ? { propsJson: opts.propsJson } : {}),
619
666
  ...(opts.contextSlots !== undefined && opts.contextSlots.length > 0
620
667
  ? { contextSlots: opts.contextSlots }
@@ -1448,7 +1495,10 @@ export function registerGguiRenderResourceTemplate(server, opts) {
1448
1495
  // else produced a channel. Anywhere above this line the same fault
1449
1496
  // may have been survivable, and on a deployment wiring both
1450
1497
  // channels it usually is.
1451
- if (!isSystem && codeUrl === undefined && (wsUrl === undefined || wsToken === undefined)) {
1498
+ if (!isSystem &&
1499
+ codeUrl === undefined &&
1500
+ view.codeB64 === undefined &&
1501
+ (wsUrl === undefined || wsToken === undefined)) {
1452
1502
  if (channelFault !== undefined)
1453
1503
  throw channelFault.cause;
1454
1504
  throw new ResourceReadFailure(NO_DELIVERY_CHANNEL_FAILURE);
@@ -1458,15 +1508,20 @@ export function registerGguiRenderResourceTemplate(server, opts) {
1458
1508
  appId: accessibleStored.appId,
1459
1509
  ...(isSystem
1460
1510
  ? { systemKind: picked.kind }
1461
- : codeUrl !== undefined
1462
- ? {
1463
- codeUrl,
1464
- ...(codeHash !== undefined ? { codeHash } : {}),
1465
- }
1466
- : // No static codeUrl → live-mode (wsUrl + token spread below)
1467
- // carries the render; buildSelfContainedShell accepts
1468
- // live-mode without codeUrl.
1469
- {}),
1511
+ : {
1512
+ ...(codeUrl !== undefined
1513
+ ? {
1514
+ codeUrl,
1515
+ ...(codeHash !== undefined ? { codeHash } : {}),
1516
+ }
1517
+ : {}),
1518
+ // Inline fetch-free channel (size-capped, projected by
1519
+ // `deriveRenderMeta`). Independent of the codeStore, so a
1520
+ // dead/unwired store still yields a mountable shell — and
1521
+ // hosts whose iframe CSP blocks the codeUrl fetch decode
1522
+ // this instead.
1523
+ ...(view.codeB64 !== undefined ? { codeB64: view.codeB64 } : {}),
1524
+ }),
1470
1525
  runtimeUrl: opts.runtimeUrl,
1471
1526
  ...(wsUrl !== undefined && wsToken !== undefined
1472
1527
  ? {
@@ -1738,7 +1793,11 @@ function deriveDefaultContextSlots(spec) {
1738
1793
  */
1739
1794
  export function installMcpAppsOutbound(server, opts = {}) {
1740
1795
  advertiseMcpAppsUiCapability(server);
1741
- registerGguiRenderResource(server, opts.shellHtml, opts.publicBaseUrl);
1796
+ // The self-contained template's absolute runtimeUrl doubles as the
1797
+ // static registration's CSP-declaration fallback — deployments that
1798
+ // set no `publicBaseUrl` (it also feeds Origin/Host enforcement +
1799
+ // OAuth) still declare their origin to spec-compliant hosts.
1800
+ registerGguiRenderResource(server, opts.shellHtml, opts.publicBaseUrl, opts.selfContained?.runtimeUrl);
1742
1801
  if (opts.selfContained) {
1743
1802
  registerGguiRenderResourceTemplate(server, opts.selfContained);
1744
1803
  }
@@ -32,6 +32,21 @@ interface MountOptions {
32
32
  readonly runtimeBundleFile: string;
33
33
  /** Structured logger for the missing-bundle boot warning. */
34
34
  readonly logger: Logger;
35
+ /**
36
+ * Content-hashed twin of the mount — the LONG-CACHE production
37
+ * route. When present, `GET <path>` serves `source` with
38
+ * `Cache-Control: public, max-age=31536000, immutable`: the path
39
+ * embeds a hash of these exact bytes, so the response can never go
40
+ * stale under its own name, and a rebuild rolls clients over by
41
+ * changing the STAMPED URL rather than the cached content. Serving
42
+ * the captured bytes (not the file) is load-bearing for that
43
+ * guarantee — an in-place rebuild must not change what the old
44
+ * hash-name returns.
45
+ */
46
+ readonly hashed?: {
47
+ readonly path: string;
48
+ readonly source: Buffer;
49
+ };
35
50
  }
36
51
  /**
37
52
  * Mount `GET <runtimePath>` onto the express app. Returns nothing —
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-bundle-route.d.ts","sourceRoot":"","sources":["../src/runtime-bundle-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;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existsSync } from "node:fs";
29
29
  */
30
30
  export function mountRuntimeBundleRoute(opts) {
31
31
  const { app, runtimePath, runtimeBundleFile, logger } = opts;
32
+ // Content-hashed long-cache route (#472) — registered ahead of the
33
+ // plain path so the two never shadow each other regardless of how a
34
+ // custom `runtimePath` glob might overlap.
35
+ if (opts.hashed !== undefined) {
36
+ const { path: hashedPath, source } = opts.hashed;
37
+ app.get(hashedPath, (_req, res) => {
38
+ res.setHeader("Content-Type", "application/javascript; charset=utf-8");
39
+ // Immutable: the path names these exact bytes (see MountOptions
40
+ // .hashed). One download per client, zero revalidations; deploys
41
+ // roll over via a new stamped URL.
42
+ res.setHeader("Cache-Control", "public, max-age=31536000, immutable");
43
+ // Same CORS rationale as the plain route below.
44
+ res.setHeader("Access-Control-Allow-Origin", "*");
45
+ res.send(source);
46
+ });
47
+ }
32
48
  if (existsSync(runtimeBundleFile)) {
33
49
  app.get(runtimePath, (_req, res) => {
34
50
  res.setHeader("Content-Type", "application/javascript; charset=utf-8");
35
- // Short cache — operators iterating on the renderer want
36
- // fresh copies after rebuild. Production hardening (etag,
37
- // long-term caching with hashed filenames) is a follow-on
38
- // concern; same posture console takes.
51
+ // Short cache — operators iterating on the renderer want fresh
52
+ // copies after rebuild. Production long-term caching lives on
53
+ // the hashed twin above; this name's content changes in place,
54
+ // so it must stay revalidated.
39
55
  res.setHeader("Cache-Control", "no-cache");
40
56
  // CORS: the bundle MUST be loadable from `<script type="module"
41
57
  // src=...>` inside a sandboxed `srcdoc` iframe (the
package/dist/server.d.ts CHANGED
@@ -40,6 +40,7 @@
40
40
  import type { AppMetadataStore, AuditSink, AuthAdapter, AuthResult, BlueprintIndex, BlueprintProvider, BlueprintSearch, BlueprintSelector, BlueprintStore, CodeStore, EmbeddingProvider, GeneratorRegistry, KeyValueStore, PairingService, PendingEventConsumer, ProviderKeyStore, RateLimiter, RenderIdentityStore, GguiSessionStore, GguiSessionStreamBuffer, ShortCodeIndex, TelemetrySink, ThreadStore, VectorStore } from "@ggui-ai/mcp-server-core";
41
41
  import type { SharedHandler } from "@ggui-ai/mcp-server-handlers";
42
42
  import { type ThemeCatalogEntry } from "@ggui-ai/mcp-server-handlers/app-discovery";
43
+ import { type SearchBlueprintsRegistrySource } from "@ggui-ai/mcp-server-handlers/blueprints";
43
44
  import type { BlueprintDurabilityDeps } from "@ggui-ai/mcp-server-handlers/renders";
44
45
  import type { OperatorConfig, ThemeConfig } from "@ggui-ai/project-config";
45
46
  import type { DiscoveredPrimitiveCatalog, LoadedTheme } from "@ggui-ai/project-config/node";
@@ -90,6 +91,15 @@ export declare function defaultHandlers(deps: {
90
91
  * tool.
91
92
  */
92
93
  readonly blueprints?: BlueprintProvider;
94
+ /**
95
+ * Registry-backed discovery source for `ggui_search_blueprints`.
96
+ * OPT-IN: absent = the search tool consults only local sources and
97
+ * never makes an outbound request. Present = the tool queries the
98
+ * configured registry's public `/search` (host defaults to the
99
+ * spec-default registry host) and appends advisory candidates
100
+ * after local results.
101
+ */
102
+ readonly registrySearch?: SearchBlueprintsRegistrySource;
93
103
  /**
94
104
  * UI registry consulted by `ggui_render_blueprint`. When bound,
95
105
  * the render handler is registered and resolves every call through
@@ -291,12 +301,15 @@ export declare function defaultHandlers(deps: {
291
301
  * Optional content-addressable code store. When present together
292
302
  * with {@link codeBaseUrl}, `ggui_render` writes generated
293
303
  * componentCode to the store and surfaces `codeUrl` + `codeHash`
294
- * on the response — the sole static-component delivery channel
295
- * post-T3-1 (2026-05-13).
304
+ * on the response — the CACHE-ADDRESSABLE static-component
305
+ * delivery channel (repeat renders of the same bytes hit HTTP
306
+ * cache). The size-capped inline `codeB64` twin is stamped by the
307
+ * slice projection independently of this store.
296
308
  *
297
- * Absent: `ggui_render.resultMeta` omits `codeUrl`. The iframe boots
298
- * via live-mode (wsUrl+token) and receives the render via the
299
- * live-channel WS subscribe. `/r/<shortCode>` (HTML default; JSON branch on `Accept: application/json`)
309
+ * Absent: `ggui_render.resultMeta` omits `codeUrl`; the slice
310
+ * still carries `codeB64` for under-cap renders, and the live
311
+ * trio (wsUrl+token) delivers over the WS subscribe where minted.
312
+ * `/r/<shortCode>` (HTML default; JSON branch on `Accept: application/json`)
300
313
  * routes ALSO mint `codeUrl` when `codeStore` is set — they derive
301
314
  * the base URL from `req.protocol + req.host` when `codeBaseUrl`
302
315
  * isn't explicit (works for local dev + tunnel deployments).
@@ -654,6 +667,14 @@ export interface CreateGguiServerOptions {
654
667
  * production.
655
668
  */
656
669
  readonly embedding?: EmbeddingProvider;
670
+ /**
671
+ * Registry-backed blueprint discovery for `ggui_search_blueprints`.
672
+ * OPT-IN: omitted = no outbound registry traffic, ever (the
673
+ * zero-config default). Pass `{}` to enable against the default
674
+ * registry host, or set `host` / `timeoutMs` to point at a
675
+ * self-hosted registry and adjust the fetch budget.
676
+ */
677
+ readonly registrySearch?: SearchBlueprintsRegistrySource;
657
678
  /**
658
679
  * Per-app metadata source. When bound, threaded into
659
680
  * `defaultHandlers` so `ggui_list_gadgets`,
@@ -1285,6 +1306,25 @@ export interface CreateGguiServerOptions {
1285
1306
  * their public URL (`wss://mcp.example.com/ws`).
1286
1307
  */
1287
1308
  readonly wsUrl?: string;
1309
+ /**
1310
+ * Serve the static `ui://ggui/render` resource as the
1311
+ * INLINE-RUNTIME shell: the iframe-runtime bundle embedded in
1312
+ * the document's own bytes instead of an external
1313
+ * `<script src>` tag. For MCP Apps hosts whose iframe CSP
1314
+ * forbids external `script-src` while permitting inline
1315
+ * scripts — the thin postMessage shell can never load its
1316
+ * runtime there.
1317
+ *
1318
+ * Trade-off: the resource body grows to the bundle size
1319
+ * (~300 KB compressed on the wire), and hosts that prefetch
1320
+ * the tool's declared resource pay it once per connection.
1321
+ * Default OFF; hosted deployments fronting fetch-blocked
1322
+ * hosts turn it on. An explicit `shellHtml` wins over this
1323
+ * flag. If the runtime bundle file is unreadable at
1324
+ * composition time the server logs a warning and falls back
1325
+ * to the thin shell.
1326
+ */
1327
+ readonly inlineRuntimeShell?: boolean;
1288
1328
  };
1289
1329
  /**
1290
1330
  * Iframe-runtime bundle mount (C8 — plan §C8).
@@ -1317,6 +1357,22 @@ export interface CreateGguiServerOptions {
1317
1357
  readonly path?: string;
1318
1358
  readonly distDir?: string;
1319
1359
  readonly url?: string;
1360
+ /**
1361
+ * Stamp a CONTENT-HASHED runtime URL (and serve its immutable
1362
+ * long-cache route). Default ON when this server serves the
1363
+ * bundle: `runtimeUrl` becomes
1364
+ * `…/iframe-runtime.<sha256[0..12)>.js`, served with
1365
+ * `Cache-Control: public, max-age=31536000, immutable` — one
1366
+ * download per client per content version, zero
1367
+ * revalidations; deploys roll clients over by changing the
1368
+ * stamped URL. The plain path keeps `no-cache` for operator
1369
+ * iteration. A configured `url` is rewritten only when its
1370
+ * filename matches the served route (a CDN fronting THIS
1371
+ * server resolves the hashed name at its origin); set `false`
1372
+ * when `url` points at a foreign copy that serves only the
1373
+ * plain filename.
1374
+ */
1375
+ readonly hashedUrl?: boolean;
1320
1376
  };
1321
1377
  /**
1322
1378
  * HMAC secret used to sign bootstrap + session tokens. When the MCP
@@ -1802,10 +1858,12 @@ export interface CreateGguiServerOptions {
1802
1858
  * slice.
1803
1859
  *
1804
1860
  * Defaults: when omitted the route is NOT mounted and the
1805
- * `ai.ggui/render` slice carries no `codeUrl` — there is no second
1806
- * static channel behind it. Such a deployment delivers renders
1807
- * through the live trio (`wsUrl` + `wsToken`); one that wires
1808
- * neither cannot mount a static component at all.
1861
+ * `ai.ggui/render` slice carries no `codeUrl`. The slice still
1862
+ * carries the size-capped inline `codeB64` twin for under-cap
1863
+ * renders (stamped by the projection independently of this store),
1864
+ * and the live trio (`wsUrl` + `wsToken`) delivers where minted; a
1865
+ * deployment wiring neither store nor live channel loses only the
1866
+ * OVER-CAP static mounts.
1809
1867
  *
1810
1868
  * OSS dev wires `FileSystemCodeStore` (rooted at `~/.ggui/code-cache/`)
1811
1869
  * via `ggui-cli/buildMcpServerBackend`. Tests wire
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts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AAW,CAAC;IAC5B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;CAC3C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,uBAA4B,GAAG,UAAU,CA45E/E"}
package/dist/server.js CHANGED
@@ -51,7 +51,8 @@ import { setLlmTraceSink } from "@ggui-ai/ui-gen/harness/llm-trace-sink";
51
51
  import { setValidatorTraceSink } from "@ggui-ai/ui-gen/harness/validator-trace-sink";
52
52
  import express from "express";
53
53
  import { AsyncLocalStorage } from "node:async_hooks";
54
- import { randomBytes } from "node:crypto";
54
+ import { createHash, randomBytes } from "node:crypto";
55
+ import fs from "node:fs";
55
56
  import path from "node:path";
56
57
  import { BoundedCacheTraceSink, mountConsoleCacheRoutes } from "./console-cache.js";
57
58
  import { applyDevtoolSecurityHeaders } from "./console-headers.js";
@@ -59,6 +60,7 @@ import { BoundedLlmTraceSink, mountConsoleLlmTraceRoutes } from "./console-llm-t
59
60
  import { BoundedPayloadTraceSink, mountConsolePayloadsRoutes } from "./console-payloads.js";
60
61
  import { mountDevtoolThemeRoutes, } from "./console-theme-routes.js";
61
62
  import { mountConsoleTimelineRoutes } from "./console-timeline.js";
63
+ import { buildInlineRenderShellHtml } from "./mcp-apps-outbound.js";
62
64
  import { BoundedValidatorTraceSink, mountConsoleValidatorRoutes } from "./console-validator.js";
63
65
  // Operator-class MCP handlers — twelve `ggui_ops_*` handlers across
64
66
  // four domains (apps / orgs / connector-keys / coupon). Every factory
@@ -204,6 +206,7 @@ export function defaultHandlers(deps) {
204
206
  embedding: deps.embedding,
205
207
  vectors: deps.vectors,
206
208
  ...(deps.blueprints ? { blueprints: deps.blueprints } : {}),
209
+ ...(deps.registrySearch ? { registry: deps.registrySearch } : {}),
207
210
  }),
208
211
  createListFeaturedBlueprintsHandler(deps.blueprints ? { blueprints: deps.blueprints } : {}),
209
212
  // Spec / discovery handlers — zero-deps. These may be tagged
@@ -541,10 +544,11 @@ export function defaultHandlers(deps) {
541
544
  ? { checkRenderContracts: deps.render.checkRenderContracts }
542
545
  : {}),
543
546
  // Content-addressable code store. Both fields are forwarded
544
- // together; the render handler
545
- // requires both to emit `codeUrl`. Absent or partial = no
546
- // static delivery channel, so the bootstrap mounts through the
547
- // live trio instead (see render.ts handler body).
547
+ // together; the render handler requires both to emit
548
+ // `codeUrl`. Absent or partial = no cache-addressable static
549
+ // channel; the bootstrap still carries the inline `codeB64`
550
+ // twin for under-cap renders and mounts through the live trio
551
+ // where minted (see render.ts handler body).
548
552
  ...(deps.render.codeStore && deps.render.codeBaseUrl
549
553
  ? {
550
554
  codeStore: deps.render.codeStore,
@@ -770,7 +774,47 @@ export function createGguiServer(opts = {}) {
770
774
  const runtimeBundleFile = runtimeConfig.distDir !== undefined
771
775
  ? path.join(runtimeConfig.distDir, "iframe-runtime.js")
772
776
  : RUNTIME_BUNDLE_FILE;
773
- const runtimeBootstrapUrl = runtimeConfig.url ?? runtimePath;
777
+ // Bundle bytes, captured ONCE at composition. Feed three consumers:
778
+ // the content hash below, the immutable hashed route (which must
779
+ // serve exactly the bytes its name hashes — see runtime-bundle-
780
+ // route.ts), and the opt-in inline-runtime shell. Unreadable file ⇒
781
+ // undefined ⇒ every consumer falls back to its pre-#472 behavior.
782
+ let runtimeBundleBytes;
783
+ if (runtimeEnabled) {
784
+ try {
785
+ runtimeBundleBytes = fs.readFileSync(runtimeBundleFile);
786
+ }
787
+ catch {
788
+ // The plain route's own existsSync handles the missing-bundle
789
+ // warning; nothing extra to say here.
790
+ }
791
+ }
792
+ // Content-hashed runtime URL (#472). The stamped `runtimeUrl` (and
793
+ // the hashed route it points at) embeds sha256[0..12) of the bytes:
794
+ // clients cache one download per content version with zero
795
+ // revalidations, and a deploy rolls over by changing the URL. The
796
+ // rewrite applies to a configured absolute `runtime.url` ONLY when
797
+ // its filename matches the served bundle's route (a CDN fronting
798
+ // THIS server still resolves the hashed name at its origin); a URL
799
+ // pointing at a foreign copy is left untouched, and
800
+ // `runtime.hashedUrl: false` opts out entirely.
801
+ const runtimeBundleHash = runtimeBundleBytes !== undefined && runtimeConfig.hashedUrl !== false
802
+ ? createHash("sha256").update(runtimeBundleBytes).digest("hex").slice(0, 12)
803
+ : undefined;
804
+ const insertHash = (urlOrPath) => {
805
+ if (runtimeBundleHash === undefined)
806
+ return urlOrPath;
807
+ const plainName = runtimePath.slice(runtimePath.lastIndexOf("/") + 1);
808
+ const dot = plainName.lastIndexOf(".");
809
+ const hashedName = dot === -1
810
+ ? `${plainName}.${runtimeBundleHash}`
811
+ : `${plainName.slice(0, dot)}.${runtimeBundleHash}${plainName.slice(dot)}`;
812
+ if (!urlOrPath.endsWith(`/${plainName}`) && urlOrPath !== plainName)
813
+ return urlOrPath;
814
+ return `${urlOrPath.slice(0, urlOrPath.length - plainName.length)}${hashedName}`;
815
+ };
816
+ const hashedRuntimePath = runtimeBundleHash !== undefined ? insertHash(runtimePath) : undefined;
817
+ const runtimeBootstrapUrl = insertHash(runtimeConfig.url ?? runtimePath);
774
818
  // Lazy resolver: each render/update handler invocation looks up the
775
819
  // request-context-derived absolute base inside the request scope
776
820
  // (via AsyncLocalStorage). Static `publicBaseUrl` wins when set;
@@ -1185,6 +1229,7 @@ export function createGguiServer(opts = {}) {
1185
1229
  // Registers `ggui_runtime_declare_tool_catalog`.
1186
1230
  toolIdentityCatalogStore,
1187
1231
  ...(opts.blueprintProvider ? { blueprints: opts.blueprintProvider } : {}),
1232
+ ...(opts.registrySearch ? { registrySearch: opts.registrySearch } : {}),
1188
1233
  // UI registry for `ggui_render_blueprint`. Absent = render tool
1189
1234
  // is NOT registered on this server (defaultHandlers' own opt-in
1190
1235
  // rule). OSS CLI wires a `LocalUiRegistry` here so manifest
@@ -1782,15 +1827,40 @@ export function createGguiServer(opts = {}) {
1782
1827
  logger,
1783
1828
  corsOrigins: originHostPolicy.allowedOrigins,
1784
1829
  });
1830
+ // Inline-runtime shell (opt-in): embed the runtime bundle's source
1831
+ // into the static-resource shell so fetch-blocked hosts (iframe CSP
1832
+ // without external script-src) can still boot. Resolved ONCE at
1833
+ // composition time from the same bundle file the runtime mount
1834
+ // serves. An explicit `shellHtml` wins; a read failure warns and
1835
+ // falls back to the thin shell (the server still works everywhere
1836
+ // the thin shell worked).
1837
+ let inlineShellHtml;
1838
+ if (mcpAppsEnabled && mcpAppsConfig.inlineRuntimeShell === true) {
1839
+ if (runtimeBundleBytes !== undefined) {
1840
+ inlineShellHtml = buildInlineRenderShellHtml(runtimeBundleBytes.toString("utf8"));
1841
+ }
1842
+ else {
1843
+ // inlineRuntimeShell is on but the runtime bundle could not be
1844
+ // read at composition — serve the thin postMessage shell instead.
1845
+ logger.warn("mcp_apps_inline_shell_bundle_unreadable", {
1846
+ runtimeBundleFile,
1847
+ });
1848
+ }
1849
+ }
1785
1850
  // Per-boot `buildMcpServer` options — every input below is fixed at
1786
1851
  // composition time, so the bundle is assembled once and the MCP
1787
1852
  // endpoint family spreads a fresh copy per request.
1788
1853
  const buildMcpOptions = {
1789
1854
  mcpAppsOutbound: mcpAppsEnabled,
1790
- // Caller-provided `shellHtml` overrides the default;
1791
- // `installMcpAppsOutbound` falls back to its baked
1792
- // `GGUI_RENDER_SHELL_HTML` constant when absent.
1793
- ...(mcpAppsConfig.shellHtml !== undefined ? { shellHtml: mcpAppsConfig.shellHtml } : {}),
1855
+ // Caller-provided `shellHtml` overrides the default (and the
1856
+ // inline-runtime shell); `installMcpAppsOutbound` falls back to
1857
+ // its baked `GGUI_RENDER_SHELL_HTML` constant when both are
1858
+ // absent.
1859
+ ...(mcpAppsConfig.shellHtml !== undefined
1860
+ ? { shellHtml: mcpAppsConfig.shellHtml }
1861
+ : inlineShellHtml !== undefined
1862
+ ? { shellHtml: inlineShellHtml }
1863
+ : {}),
1794
1864
  // Forward the operator-supplied public origin so the static
1795
1865
  // `ui://ggui/render` resource declares `_meta.ui.csp` for
1796
1866
  // spec-compliant hosts (Claude Desktop / claude.ai Connector /
@@ -1964,7 +2034,15 @@ export function createGguiServer(opts = {}) {
1964
2034
  // `runtime.url`. The bootstrap still carries a `runtimeUrl` so
1965
2035
  // the shell knows where to look — just not our HTTP listener.
1966
2036
  if (runtimeEnabled) {
1967
- mountRuntimeBundleRoute({ app, runtimePath, runtimeBundleFile, logger });
2037
+ mountRuntimeBundleRoute({
2038
+ app,
2039
+ runtimePath,
2040
+ runtimeBundleFile,
2041
+ logger,
2042
+ ...(hashedRuntimePath !== undefined && runtimeBundleBytes !== undefined
2043
+ ? { hashed: { path: hashedRuntimePath, source: runtimeBundleBytes } }
2044
+ : {}),
2045
+ });
1968
2046
  }
1969
2047
  // R6 /state snapshot + R7 /events cursor-replay reads — see
1970
2048
  // `./api-renders-routes.ts` for the wsToken auth posture, tenancy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/mcp-server",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Self-hosted MCP server for the ggui protocol. An HTTP/MCP binding layer over @ggui-ai/mcp-server-handlers and the reference adapters from @ggui-ai/mcp-server-core — run it via `ggui serve`.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -32,16 +32,16 @@
32
32
  "resend": "^6.12.2",
33
33
  "ws": "^8.20.1",
34
34
  "zod": "^4.3.6",
35
- "@ggui-ai/console": "0.7.0",
36
- "@ggui-ai/iframe-runtime": "0.7.0",
37
- "@ggui-ai/mcp-server-handlers": "0.7.0",
38
- "@ggui-ai/negotiator": "0.7.0",
39
- "@ggui-ai/mcp-server-core": "0.7.0",
40
- "@ggui-ai/preview-a2ui": "0.7.0",
41
- "@ggui-ai/project-config": "0.7.0",
42
- "@ggui-ai/protocol": "0.7.0",
43
- "@ggui-ai/ui-gen": "0.7.0",
44
- "@ggui-ai/ui-registry": "0.7.0"
35
+ "@ggui-ai/console": "0.8.0",
36
+ "@ggui-ai/mcp-server-handlers": "0.8.0",
37
+ "@ggui-ai/negotiator": "0.8.0",
38
+ "@ggui-ai/mcp-server-core": "0.8.0",
39
+ "@ggui-ai/iframe-runtime": "0.8.0",
40
+ "@ggui-ai/preview-a2ui": "0.8.0",
41
+ "@ggui-ai/protocol": "0.8.0",
42
+ "@ggui-ai/project-config": "0.8.0",
43
+ "@ggui-ai/ui-gen": "0.8.0",
44
+ "@ggui-ai/ui-registry": "0.8.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/express": "^5.0.0",
@@ -50,7 +50,7 @@
50
50
  "@types/ws": "^8.5.10",
51
51
  "typescript": "^5.0.0",
52
52
  "vitest": "^3.2.6",
53
- "@ggui-ai/protocol-conformance": "0.7.0"
53
+ "@ggui-ai/protocol-conformance": "0.8.0"
54
54
  },
55
55
  "repository": {
56
56
  "type": "git",