@ggui-ai/protocol 0.7.0 → 0.9.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/gadgets/stdlib-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/integrations/epoch-uri.d.ts +42 -0
- package/dist/integrations/epoch-uri.d.ts.map +1 -0
- package/dist/integrations/epoch-uri.js +48 -0
- package/dist/integrations/mcp-apps.d.ts +140 -10
- package/dist/integrations/mcp-apps.d.ts.map +1 -1
- package/dist/integrations/mcp-apps.js +94 -6
- package/dist/schemas/data-contract.d.ts +4 -2
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +4 -2
- package/dist/schemas/invoke.d.ts +1 -1
- package/dist/schemas/invoke.js +1 -1
- package/dist/schemas/mcp.d.ts +222 -6
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +285 -13
- package/dist/types/data-contract.d.ts +8 -4
- package/dist/types/data-contract.d.ts.map +1 -1
- package/dist/types/ggui-session-event.d.ts +42 -1
- package/dist/types/ggui-session-event.d.ts.map +1 -1
- package/dist/types/ggui-session-event.js +16 -1
- package/dist/types/live-channel.d.ts +8 -0
- package/dist/types/live-channel.d.ts.map +1 -1
- package/dist/types/llm-route.d.ts +2 -2
- package/dist/types/llm-route.d.ts.map +1 -1
- package/dist/types/llm-route.js +26 -8
- package/dist/types/mcp.d.ts +51 -1
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/render.d.ts +12 -0
- package/dist/types/render.d.ts.map +1 -1
- package/dist/types/ui-generator.d.ts +20 -3
- package/dist/types/ui-generator.d.ts.map +1 -1
- package/dist/validation/contract-validator.d.ts +2 -2
- package/dist/validation/contract-validator.d.ts.map +1 -1
- package/dist/validation/resolve-stream-channel.d.ts +2 -2
- package/dist/validation/resolve-stream-channel.js +2 -2
- package/dist/validation/ui-security.d.ts +2 -2
- package/dist/validation/ui-security.js +2 -2
- package/dist/version.d.ts +245 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +245 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ export declare const STDLIB_GADGETS_PACKAGE = "@ggui-ai/gadgets";
|
|
|
12
12
|
* in `@ggui-ai/gadgets` asserts the two stay in sync, so a release-time
|
|
13
13
|
* bump to the runtime package without updating this constant fails CI.
|
|
14
14
|
*/
|
|
15
|
-
export declare const STDLIB_GADGETS_VERSION = "0.
|
|
15
|
+
export declare const STDLIB_GADGETS_VERSION = "0.9.0";
|
|
16
16
|
/**
|
|
17
17
|
* v1 catalog of stdlib gadget descriptors. Every entry's
|
|
18
18
|
* `package` defaults to {@link STDLIB_GADGETS_PACKAGE}; the
|
|
@@ -39,7 +39,7 @@ export const STDLIB_GADGETS_PACKAGE = '@ggui-ai/gadgets';
|
|
|
39
39
|
* in `@ggui-ai/gadgets` asserts the two stay in sync, so a release-time
|
|
40
40
|
* bump to the runtime package without updating this constant fails CI.
|
|
41
41
|
*/
|
|
42
|
-
export const STDLIB_GADGETS_VERSION = '0.
|
|
42
|
+
export const STDLIB_GADGETS_VERSION = '0.9.0';
|
|
43
43
|
/**
|
|
44
44
|
* v1 catalog of stdlib gadget descriptors. Every entry's
|
|
45
45
|
* `package` defaults to {@link STDLIB_GADGETS_PACKAGE}; the
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Epoch-pinned resource URIs (#483).
|
|
3
|
+
*
|
|
4
|
+
* A session's history is a linear chain of epoch-numbered render
|
|
5
|
+
* records: `ggui_render` mints epoch 0; every `ggui_update` advances
|
|
6
|
+
* the head by one (`ggui_amend` never does). The epoch rides the
|
|
7
|
+
* resource URI:
|
|
8
|
+
*
|
|
9
|
+
* - **Bare URI** (`ui://ggui/render/<sessionId>[/<contractKey>]`) —
|
|
10
|
+
* the LIVE HEAD. Reads track the session's current state.
|
|
11
|
+
* - **Pinned URI** (`…#N`) — the immutable epoch-N record. Reads
|
|
12
|
+
* MUST serve identical content forever (conformance-pinned).
|
|
13
|
+
*
|
|
14
|
+
* This module is the ONE encoding seam: every producer (result-meta
|
|
15
|
+
* stamping, resource templates) and consumer (iframe-runtime latch,
|
|
16
|
+
* pinned reads) routes through these two functions, so the encoding
|
|
17
|
+
* (URI fragment today) can flip to a path segment after the
|
|
18
|
+
* host-transport probe without touching call sites. Do not hand-roll
|
|
19
|
+
* `#${n}` anywhere else.
|
|
20
|
+
*/
|
|
21
|
+
export declare const EPOCH_URI_SEPARATOR = "#";
|
|
22
|
+
/**
|
|
23
|
+
* Compose the pinned URI for an epoch. Throws on non-integer or
|
|
24
|
+
* negative epochs — a producer stamping a bogus epoch is a bug that
|
|
25
|
+
* must be loud, not a tolerable wire variant.
|
|
26
|
+
*/
|
|
27
|
+
export declare function composeEpochUri(baseUri: string, epoch: number): string;
|
|
28
|
+
export interface ParsedEpochUri {
|
|
29
|
+
/** The URI with any epoch pin removed — the live-head address. */
|
|
30
|
+
readonly baseUri: string;
|
|
31
|
+
/** Present iff the URI carried a well-formed epoch pin. */
|
|
32
|
+
readonly epoch?: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Tolerant read — never throws. A malformed suffix (non-canonical
|
|
36
|
+
* number, leading zeros, empty) is NOT an epoch: the whole input
|
|
37
|
+
* passes through as `baseUri` so an exotic-but-legal URI is never
|
|
38
|
+
* mangled by mis-parsing. Canonical epochs only: `0` or a digit
|
|
39
|
+
* string with no leading zero.
|
|
40
|
+
*/
|
|
41
|
+
export declare function parseEpochUri(uri: string): ParsedEpochUri;
|
|
42
|
+
//# sourceMappingURL=epoch-uri.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epoch-uri.d.ts","sourceRoot":"","sources":["../../src/integrations/epoch-uri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKtE;AAED,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAMzD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Epoch-pinned resource URIs (#483).
|
|
3
|
+
*
|
|
4
|
+
* A session's history is a linear chain of epoch-numbered render
|
|
5
|
+
* records: `ggui_render` mints epoch 0; every `ggui_update` advances
|
|
6
|
+
* the head by one (`ggui_amend` never does). The epoch rides the
|
|
7
|
+
* resource URI:
|
|
8
|
+
*
|
|
9
|
+
* - **Bare URI** (`ui://ggui/render/<sessionId>[/<contractKey>]`) —
|
|
10
|
+
* the LIVE HEAD. Reads track the session's current state.
|
|
11
|
+
* - **Pinned URI** (`…#N`) — the immutable epoch-N record. Reads
|
|
12
|
+
* MUST serve identical content forever (conformance-pinned).
|
|
13
|
+
*
|
|
14
|
+
* This module is the ONE encoding seam: every producer (result-meta
|
|
15
|
+
* stamping, resource templates) and consumer (iframe-runtime latch,
|
|
16
|
+
* pinned reads) routes through these two functions, so the encoding
|
|
17
|
+
* (URI fragment today) can flip to a path segment after the
|
|
18
|
+
* host-transport probe without touching call sites. Do not hand-roll
|
|
19
|
+
* `#${n}` anywhere else.
|
|
20
|
+
*/
|
|
21
|
+
export const EPOCH_URI_SEPARATOR = '#';
|
|
22
|
+
/**
|
|
23
|
+
* Compose the pinned URI for an epoch. Throws on non-integer or
|
|
24
|
+
* negative epochs — a producer stamping a bogus epoch is a bug that
|
|
25
|
+
* must be loud, not a tolerable wire variant.
|
|
26
|
+
*/
|
|
27
|
+
export function composeEpochUri(baseUri, epoch) {
|
|
28
|
+
if (!Number.isInteger(epoch) || epoch < 0) {
|
|
29
|
+
throw new Error(`epoch must be a non-negative integer, got ${epoch}`);
|
|
30
|
+
}
|
|
31
|
+
return `${baseUri}${EPOCH_URI_SEPARATOR}${epoch}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Tolerant read — never throws. A malformed suffix (non-canonical
|
|
35
|
+
* number, leading zeros, empty) is NOT an epoch: the whole input
|
|
36
|
+
* passes through as `baseUri` so an exotic-but-legal URI is never
|
|
37
|
+
* mangled by mis-parsing. Canonical epochs only: `0` or a digit
|
|
38
|
+
* string with no leading zero.
|
|
39
|
+
*/
|
|
40
|
+
export function parseEpochUri(uri) {
|
|
41
|
+
const idx = uri.lastIndexOf(EPOCH_URI_SEPARATOR);
|
|
42
|
+
if (idx < 0)
|
|
43
|
+
return { baseUri: uri };
|
|
44
|
+
const suffix = uri.slice(idx + 1);
|
|
45
|
+
if (!/^(0|[1-9][0-9]*)$/.test(suffix))
|
|
46
|
+
return { baseUri: uri };
|
|
47
|
+
return { baseUri: uri.slice(0, idx), epoch: Number(suffix) };
|
|
48
|
+
}
|
|
@@ -49,6 +49,7 @@ export declare const GGUI_RENDER_RESOURCE_URI: "ui://ggui/render";
|
|
|
49
49
|
* render them as plain HTML.
|
|
50
50
|
*/
|
|
51
51
|
export declare const GGUI_RENDER_RESOURCE_MIME: "text/html;profile=mcp-app";
|
|
52
|
+
export { composeEpochUri, parseEpochUri, EPOCH_URI_SEPARATOR, type ParsedEpochUri, } from './epoch-uri.js';
|
|
52
53
|
/**
|
|
53
54
|
* The single `_meta.ui.resourceUri` value ggui uses across every MCP Apps
|
|
54
55
|
* host surface. Exposed as a named constant so tool-declaration code,
|
|
@@ -192,16 +193,50 @@ export interface McpAppContextSlot {
|
|
|
192
193
|
* WS auth credential the iframe threads on the WebSocket upgrade as
|
|
193
194
|
* `?wsToken=<encoded>` and inside `SubscribePayload.wsToken`.
|
|
194
195
|
*
|
|
195
|
-
* **
|
|
196
|
-
* the
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
196
|
+
* **Failover ladder (WS → SSE → polling).** `sseUrl` and `pollingUrl`
|
|
197
|
+
* are the two HTTP fallback rungs the iframe-runtime descends when the
|
|
198
|
+
* WS rung fails (host CSP block, proxy, network policy). Both are
|
|
199
|
+
* stamped by the SERVER via {@link composeSessionApiUrls} — one
|
|
200
|
+
* composer for every stamping surface — and consumed by the
|
|
201
|
+
* IFRAME-RUNTIME. Auth for both is the embedded `wsToken` query
|
|
202
|
+
* credential (`EventSource` cannot set request headers, so the query
|
|
203
|
+
* string is the only channel — same posture on both rungs), which is
|
|
204
|
+
* why each URL is stamped ONLY when the live trio was minted.
|
|
205
|
+
* Absence semantics: `sseUrl` absent ⇒ no SSE rung (ladder is
|
|
206
|
+
* WS → polling); `pollingUrl` absent ⇒ no polling rung.
|
|
207
|
+
*
|
|
208
|
+
* `pollingUrl` (server-stamped
|
|
209
|
+
* `/api/sessions/<sessionId>/events?wsToken=<token>`): the
|
|
210
|
+
* iframe-runtime composes per-tick `&sinceSequence=<cursor>&limit=<N>`
|
|
211
|
+
* against this base; companion to `lastSequence` which seeds the
|
|
212
|
+
* initial cursor.
|
|
213
|
+
*
|
|
214
|
+
* `sseUrl` (server-stamped
|
|
215
|
+
* `/api/sessions/<sessionId>/stream?wsToken=<token>`): consumed via
|
|
216
|
+
* `EventSource`. Server obligations — the endpoint serves
|
|
217
|
+
* `text/event-stream` where each SSE message's `data:` is EXACTLY one
|
|
218
|
+
* ChannelFrame JSON (`{type, payload}` — byte-same shape as the WS
|
|
219
|
+
* push); a message's `id:` is the decimal event-ledger `seq` (the SAME
|
|
220
|
+
* cursor space as `lastSequence`/`sinceSequence`), stamped ONLY on
|
|
221
|
+
* ledger-backed `render_event` replay frames — live frames are id-less
|
|
222
|
+
* (same ephemeral posture as WS) — so the browser's automatic
|
|
223
|
+
* `Last-Event-ID` reconnect header IS the existing cursor replay; the
|
|
224
|
+
* server emits a comment heartbeat (`: hb`, no `id:`) at least every
|
|
225
|
+
* ~25s (proxy/ALB idle-timeout floor) and `retry: 3000` as the first
|
|
226
|
+
* write after headers. Client obligations — append
|
|
227
|
+
* `&sinceSequence=<lastSequence>` on FIRST connect (before any
|
|
228
|
+
* `Last-Event-ID` exists); on reconnect the header WINS over the
|
|
229
|
+
* query. Failure modes mirror `/events`: 401 invalid token; 404
|
|
230
|
+
* evicted → stop; 410 expired / `REPLAY_HORIZON_PASSED` →
|
|
231
|
+
* re-bootstrap (the horizon violation is an in-band error frame
|
|
232
|
+
* carrying `resumeId: String(lastSequence)`, so the browser cursor
|
|
233
|
+
* advances and the ack snapshot re-mounts state).
|
|
234
|
+
*
|
|
235
|
+
* **Mode discriminator.** At least one of `{ codeUrl, codeB64, kind,
|
|
236
|
+
* wsUrl-with-token }` MUST be present for the iframe to mount. `kind` is
|
|
237
|
+
* mutually exclusive with `codeUrl`/`codeB64` (kind = system-card mode;
|
|
238
|
+
* codeUrl/codeB64 = static-component mode, fetched vs inline;
|
|
239
|
+
* live-channel = absent all).
|
|
205
240
|
*
|
|
206
241
|
* @public
|
|
207
242
|
*/
|
|
@@ -213,6 +248,7 @@ export interface McpAppAiGguiRenderMeta {
|
|
|
213
248
|
readonly wsToken?: string;
|
|
214
249
|
readonly expiresAt?: string;
|
|
215
250
|
readonly pollingUrl?: string;
|
|
251
|
+
readonly sseUrl?: string;
|
|
216
252
|
readonly themeId?: string;
|
|
217
253
|
readonly themeMode?: 'light' | 'dark';
|
|
218
254
|
/**
|
|
@@ -238,12 +274,34 @@ export interface McpAppAiGguiRenderMeta {
|
|
|
238
274
|
* from a cursor.
|
|
239
275
|
*/
|
|
240
276
|
readonly lastSequence?: number;
|
|
277
|
+
/**
|
|
278
|
+
* History head epoch this mount belongs to (#483, SPEC §7.1.2.2).
|
|
279
|
+
* `ggui_render` mints epoch 0; each `ggui_update` result carries its
|
|
280
|
+
* new epoch; a pinned `#N` read carries N. The iframe reads it at
|
|
281
|
+
* boot as its OWN epoch: when a later `props_update` frame carries a
|
|
282
|
+
* HIGHER epoch, this mount has been superseded and freezes (the
|
|
283
|
+
* freeze latch). Absent ⇒ 0.
|
|
284
|
+
*/
|
|
285
|
+
readonly epoch?: number;
|
|
241
286
|
readonly propsJson?: string;
|
|
242
287
|
readonly contextSlots?: ReadonlyArray<McpAppContextSlot>;
|
|
243
288
|
readonly contractHash?: string;
|
|
244
289
|
readonly validatorsUrl?: string;
|
|
245
290
|
readonly codeUrl?: string;
|
|
246
291
|
readonly codeHash?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Base64-encoded compiled ES-module source of the component — the
|
|
294
|
+
* fetch-free twin of {@link codeUrl}. Produced by servers whose
|
|
295
|
+
* renders must mount inside hosts that forbid cross-origin fetches
|
|
296
|
+
* at the iframe CSP layer (no `connect-src`, no external
|
|
297
|
+
* `script-src`); consumed by the iframe-runtime's seed builder,
|
|
298
|
+
* which decodes it instead of fetching. MAY coexist with `codeUrl`
|
|
299
|
+
* (a consumer prefers the inline bytes; the URL remains for
|
|
300
|
+
* cache-addressable consumers); mutually exclusive with `kind`.
|
|
301
|
+
* Malformed base64 fails at decode time as a boot failure — the
|
|
302
|
+
* parser here validates shape only (non-empty string).
|
|
303
|
+
*/
|
|
304
|
+
readonly codeB64?: string;
|
|
247
305
|
readonly kind?: string;
|
|
248
306
|
}
|
|
249
307
|
/**
|
|
@@ -282,6 +340,39 @@ export declare function parseMcpAppAiGguiRenderMeta(meta: unknown): ParseMcpAppA
|
|
|
282
340
|
* @public
|
|
283
341
|
*/
|
|
284
342
|
export declare function toMcpAppEnvelope(render: McpAppAiGguiRenderMeta): Record<string, unknown>;
|
|
343
|
+
/**
|
|
344
|
+
* Token-bearing session-API URL pair — the return shape of
|
|
345
|
+
* {@link composeSessionApiUrls}. Field names deliberately match the
|
|
346
|
+
* {@link McpAppAiGguiRenderMeta} slice fields they stamp, so callers
|
|
347
|
+
* spread the pair straight into a slice literal.
|
|
348
|
+
*
|
|
349
|
+
* @public
|
|
350
|
+
*/
|
|
351
|
+
export interface SessionApiUrls {
|
|
352
|
+
/** `${base}/api/sessions/<sessionId>/events?wsToken=<token>` */
|
|
353
|
+
readonly pollingUrl: string;
|
|
354
|
+
/** `${base}/api/sessions/<sessionId>/stream?wsToken=<token>` */
|
|
355
|
+
readonly sseUrl: string;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Compose the token-bearing session-API URL pair — ONE composer for
|
|
359
|
+
* every stamping surface (render resultMeta, update resultMeta, the
|
|
360
|
+
* self-contained shell, the `/api/sessions/:id/state` bootstrap). Same
|
|
361
|
+
* move as `deriveRenderMeta`: because every surface routes through this
|
|
362
|
+
* function, cross-transport drift in the URL shapes is structurally
|
|
363
|
+
* impossible.
|
|
364
|
+
*
|
|
365
|
+
* Pure string composition, no I/O. `base` is the absolute public
|
|
366
|
+
* origin the session API is served on (a trailing `/` is tolerated and
|
|
367
|
+
* stripped); `sessionId` and `wsToken` are URL-encoded into path and
|
|
368
|
+
* query. Callers MUST invoke this only when the live trio was minted —
|
|
369
|
+
* both URLs embed the token, and a token-less URL can only 401 through
|
|
370
|
+
* the fallback composers; omission of both fields is the honest
|
|
371
|
+
* no-HTTP-fallback signal the slice contract defines.
|
|
372
|
+
*
|
|
373
|
+
* @public
|
|
374
|
+
*/
|
|
375
|
+
export declare function composeSessionApiUrls(base: string, sessionId: string, wsToken: string): SessionApiUrls;
|
|
285
376
|
/**
|
|
286
377
|
* `_meta` key carrying host-supplied conversation-grouping metadata on
|
|
287
378
|
* every inbound `tools/call` request. Captured ONCE on the first call
|
|
@@ -451,6 +542,13 @@ export interface McpAppsGguiSession {
|
|
|
451
542
|
readonly type: 'mcpApps';
|
|
452
543
|
readonly id: string;
|
|
453
544
|
readonly createdAt: string;
|
|
545
|
+
/**
|
|
546
|
+
* History head epoch (#483) — same semantics as
|
|
547
|
+
* `GguiSessionBase.epoch` (absent ⇒ 0; advanced only by
|
|
548
|
+
* `ggui_update`). Declared here too because this variant does not
|
|
549
|
+
* extend the base.
|
|
550
|
+
*/
|
|
551
|
+
readonly epoch?: number;
|
|
454
552
|
readonly prompt?: string;
|
|
455
553
|
readonly description?: string;
|
|
456
554
|
readonly message?: string;
|
|
@@ -982,7 +1080,39 @@ export interface GguiShellHtmlOptions {
|
|
|
982
1080
|
* iframe and accept the Safari canvas-color trade-off.
|
|
983
1081
|
*/
|
|
984
1082
|
readonly background?: 'surface' | 'transparent';
|
|
1083
|
+
/**
|
|
1084
|
+
* Full source text of the iframe-runtime bundle to embed as an
|
|
1085
|
+
* inline `<script type="module">` in place of the external
|
|
1086
|
+
* `src={runtimeUrl}` tag. For hosts whose iframe CSP forbids
|
|
1087
|
+
* external `script-src` while permitting inline scripts — the
|
|
1088
|
+
* external tag can never load there, so the shell carries the
|
|
1089
|
+
* runtime in its own bytes.
|
|
1090
|
+
*
|
|
1091
|
+
* The source is embedded via {@link escapeInlineScript}; see its
|
|
1092
|
+
* contract for the (esbuild-bundle-safe) escaping guarantee. The
|
|
1093
|
+
* bootstrap's `runtimeUrl` stays REQUIRED and stays on the inlined
|
|
1094
|
+
* meta — the runtime's boot validator requires it across all modes;
|
|
1095
|
+
* with this option set it is informational rather than fetched.
|
|
1096
|
+
*/
|
|
1097
|
+
readonly runtimeInlineSource?: string;
|
|
985
1098
|
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Make raw JS source safe to embed as the text content of an HTML
|
|
1101
|
+
* `<script>` element.
|
|
1102
|
+
*
|
|
1103
|
+
* The HTML parser terminates script data at the first
|
|
1104
|
+
* case-insensitive `</script` and shifts parse state on `<!--`; both
|
|
1105
|
+
* sequences are rewritten with a backslash (`<\/script`, `<\!--`).
|
|
1106
|
+
* Inside JS string, template, and regex literals — the only positions
|
|
1107
|
+
* these byte sequences occur in a well-formed bundled module (a bare
|
|
1108
|
+
* `<!--` outside a literal is a SyntaxError in module code; a bare
|
|
1109
|
+
* `</` cannot follow an expression) — `\/` and `\!` are identity
|
|
1110
|
+
* escapes, so the escaped source evaluates identically to the
|
|
1111
|
+
* original.
|
|
1112
|
+
*
|
|
1113
|
+
* @public
|
|
1114
|
+
*/
|
|
1115
|
+
export declare function escapeInlineScript(source: string): string;
|
|
986
1116
|
/**
|
|
987
1117
|
* Build the ggui **self-contained shell** for a render bootstrap.
|
|
988
1118
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-apps.d.ts","sourceRoot":"","sources":["../../src/integrations/mcp-apps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAG,4BAAqC,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAG,kBAA2B,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAG,2BAAoC,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAC9B,kFAAkF;;IAElF,kEAAkE;;CAE1D,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,KAAK,CAAC;AAEpD;;;;;;;;;GASG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,0BAA0B;IACzC,sEAAsE;IACtE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,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M,yBAAyB,uCAAuC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IAChD;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,mBAAmB,EAC9B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,MAAM,CAyCR"}
|
|
@@ -49,6 +49,11 @@ export const GGUI_RENDER_RESOURCE_URI = 'ui://ggui/render';
|
|
|
49
49
|
* render them as plain HTML.
|
|
50
50
|
*/
|
|
51
51
|
export const GGUI_RENDER_RESOURCE_MIME = 'text/html;profile=mcp-app';
|
|
52
|
+
// Epoch-pinned resource URIs (#483) — bare URI = live head, `#N` =
|
|
53
|
+
// immutable history record. Re-exported here because this module is
|
|
54
|
+
// the package's MCP-Apps export surface; the seam itself lives in
|
|
55
|
+
// epoch-uri.ts (ONE place to flip the encoding).
|
|
56
|
+
export { composeEpochUri, parseEpochUri, EPOCH_URI_SEPARATOR, } from './epoch-uri.js';
|
|
52
57
|
/**
|
|
53
58
|
* The single `_meta.ui.resourceUri` value ggui uses across every MCP Apps
|
|
54
59
|
* host surface. Exposed as a named constant so tool-declaration code,
|
|
@@ -96,7 +101,7 @@ export function deriveContextName(slotKey) {
|
|
|
96
101
|
// "ai.ggui/render": {
|
|
97
102
|
// sessionId, appId, runtimeUrl,
|
|
98
103
|
// wsUrl?, wsToken?, expiresAt?,
|
|
99
|
-
// pollingUrl?,
|
|
104
|
+
// pollingUrl?, sseUrl?,
|
|
100
105
|
// themeId?, themeMode?, theme?,
|
|
101
106
|
// gadgets?, publicEnv?, streamWebSocketLocalTools?,
|
|
102
107
|
// permissionsPolicy?,
|
|
@@ -177,10 +182,24 @@ export function parseMcpAppAiGguiRenderMeta(meta) {
|
|
|
177
182
|
(typeof ls !== 'number' || !Number.isInteger(ls) || ls < 0)) {
|
|
178
183
|
return { ok: false, reason: 'MALFORMED_RENDER' };
|
|
179
184
|
}
|
|
180
|
-
//
|
|
185
|
+
// `epoch` (#483) mirrors lastSequence's invariant: the freeze-latch
|
|
186
|
+
// self-epoch is a non-negative integer when present. This parser
|
|
187
|
+
// REBUILDS the slice field-by-field, so a field missing from the
|
|
188
|
+
// constructor below is silently deleted from every downstream
|
|
189
|
+
// consumer — epoch was exactly such a drop (probe 18 round 3: the
|
|
190
|
+
// head card booted believing epoch 0 and froze on its own amend).
|
|
191
|
+
const ep = s.epoch;
|
|
192
|
+
if (ep !== undefined &&
|
|
193
|
+
(typeof ep !== 'number' || !Number.isInteger(ep) || ep < 0)) {
|
|
194
|
+
return { ok: false, reason: 'MALFORMED_RENDER' };
|
|
195
|
+
}
|
|
196
|
+
// Component-mode discriminator: kind mutually exclusive with
|
|
197
|
+
// codeUrl/codeB64 (the two static-component carriers may coexist —
|
|
198
|
+
// consumers prefer the inline bytes).
|
|
181
199
|
const cu = s.codeUrl;
|
|
182
200
|
const ck = s.kind;
|
|
183
201
|
const ch = s.codeHash;
|
|
202
|
+
const cb = s.codeB64;
|
|
184
203
|
if (cu !== undefined && (typeof cu !== 'string' || cu.length === 0)) {
|
|
185
204
|
return { ok: false, reason: 'MALFORMED_RENDER' };
|
|
186
205
|
}
|
|
@@ -190,7 +209,12 @@ export function parseMcpAppAiGguiRenderMeta(meta) {
|
|
|
190
209
|
if (ch !== undefined && (typeof ch !== 'string' || ch.length === 0)) {
|
|
191
210
|
return { ok: false, reason: 'MALFORMED_RENDER' };
|
|
192
211
|
}
|
|
193
|
-
if (
|
|
212
|
+
if (cb !== undefined && (typeof cb !== 'string' || cb.length === 0)) {
|
|
213
|
+
return { ok: false, reason: 'MALFORMED_RENDER' };
|
|
214
|
+
}
|
|
215
|
+
const hasStaticComponent = (typeof cu === 'string' && cu.length > 0) ||
|
|
216
|
+
(typeof cb === 'string' && cb.length > 0);
|
|
217
|
+
if (hasStaticComponent && typeof ck === 'string' && ck.length > 0) {
|
|
194
218
|
return { ok: false, reason: 'MALFORMED_RENDER' };
|
|
195
219
|
}
|
|
196
220
|
// Contract pair — both present or both absent (or both effectively
|
|
@@ -214,6 +238,11 @@ export function parseMcpAppAiGguiRenderMeta(meta) {
|
|
|
214
238
|
...(hasW && hasT ? { wsUrl: aw, wsToken: at } : {}),
|
|
215
239
|
...(ae !== undefined ? { expiresAt: ae } : {}),
|
|
216
240
|
...(s.pollingUrl !== undefined ? { pollingUrl: s.pollingUrl } : {}),
|
|
241
|
+
// Same tolerant scalar posture as pollingUrl; deliberately NO
|
|
242
|
+
// wsToken-pairing invariant — the URL is self-authorizing via its
|
|
243
|
+
// embedded token; field-level defense lives downstream in the
|
|
244
|
+
// iframe-runtime's `validateMeta`.
|
|
245
|
+
...(s.sseUrl !== undefined ? { sseUrl: s.sseUrl } : {}),
|
|
217
246
|
...(s.themeId !== undefined ? { themeId: s.themeId } : {}),
|
|
218
247
|
...(s.themeMode !== undefined
|
|
219
248
|
? { themeMode: s.themeMode }
|
|
@@ -239,6 +268,7 @@ export function parseMcpAppAiGguiRenderMeta(meta) {
|
|
|
239
268
|
? { permissionsPolicy: s.permissionsPolicy }
|
|
240
269
|
: {}),
|
|
241
270
|
...(ls !== undefined ? { lastSequence: ls } : {}),
|
|
271
|
+
...(ep !== undefined ? { epoch: ep } : {}),
|
|
242
272
|
...(s.propsJson !== undefined ? { propsJson: s.propsJson } : {}),
|
|
243
273
|
...(s.contextSlots !== undefined
|
|
244
274
|
? {
|
|
@@ -253,6 +283,7 @@ export function parseMcpAppAiGguiRenderMeta(meta) {
|
|
|
253
283
|
: {}),
|
|
254
284
|
...(typeof cu === 'string' && cu.length > 0 ? { codeUrl: cu } : {}),
|
|
255
285
|
...(typeof ch === 'string' && ch.length > 0 ? { codeHash: ch } : {}),
|
|
286
|
+
...(typeof cb === 'string' && cb.length > 0 ? { codeB64: cb } : {}),
|
|
256
287
|
...(typeof ck === 'string' && ck.length > 0 ? { kind: ck } : {}),
|
|
257
288
|
};
|
|
258
289
|
return { ok: true, meta: slice };
|
|
@@ -268,6 +299,33 @@ export function toMcpAppEnvelope(render) {
|
|
|
268
299
|
[MCP_APP_AI_GGUI_RENDER_META_KEY]: render,
|
|
269
300
|
};
|
|
270
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Compose the token-bearing session-API URL pair — ONE composer for
|
|
304
|
+
* every stamping surface (render resultMeta, update resultMeta, the
|
|
305
|
+
* self-contained shell, the `/api/sessions/:id/state` bootstrap). Same
|
|
306
|
+
* move as `deriveRenderMeta`: because every surface routes through this
|
|
307
|
+
* function, cross-transport drift in the URL shapes is structurally
|
|
308
|
+
* impossible.
|
|
309
|
+
*
|
|
310
|
+
* Pure string composition, no I/O. `base` is the absolute public
|
|
311
|
+
* origin the session API is served on (a trailing `/` is tolerated and
|
|
312
|
+
* stripped); `sessionId` and `wsToken` are URL-encoded into path and
|
|
313
|
+
* query. Callers MUST invoke this only when the live trio was minted —
|
|
314
|
+
* both URLs embed the token, and a token-less URL can only 401 through
|
|
315
|
+
* the fallback composers; omission of both fields is the honest
|
|
316
|
+
* no-HTTP-fallback signal the slice contract defines.
|
|
317
|
+
*
|
|
318
|
+
* @public
|
|
319
|
+
*/
|
|
320
|
+
export function composeSessionApiUrls(base, sessionId, wsToken) {
|
|
321
|
+
const b = base.replace(/\/$/, '');
|
|
322
|
+
const sid = encodeURIComponent(sessionId);
|
|
323
|
+
const tok = encodeURIComponent(wsToken);
|
|
324
|
+
return {
|
|
325
|
+
pollingUrl: `${b}/api/sessions/${sid}/events?wsToken=${tok}`,
|
|
326
|
+
sseUrl: `${b}/api/sessions/${sid}/stream?wsToken=${tok}`,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
271
329
|
// =============================================================================
|
|
272
330
|
// Request-side `_meta` — host-supplied metadata on inbound `tools/call`.
|
|
273
331
|
//
|
|
@@ -533,8 +591,8 @@ export function isGguiSubmitActionInput(value) {
|
|
|
533
591
|
* Does this slice carry at least one MOUNT MODE discriminator?
|
|
534
592
|
* Mirrors the iframe-runtime's `validateMeta`: the runtime needs
|
|
535
593
|
* `runtimeUrl` PLUS one of live mode (`wsUrl` + `wsToken` together),
|
|
536
|
-
* `codeUrl`, or `kind` — without one of those
|
|
537
|
-
* nothing to mount.
|
|
594
|
+
* `codeUrl`, `codeB64`, or `kind` — without one of those the iframe
|
|
595
|
+
* has nothing to mount.
|
|
538
596
|
*/
|
|
539
597
|
function hasMountModeDiscriminator(slice) {
|
|
540
598
|
const nonEmpty = (v) => typeof v === 'string' && v.length > 0;
|
|
@@ -542,6 +600,8 @@ function hasMountModeDiscriminator(slice) {
|
|
|
542
600
|
return true;
|
|
543
601
|
if (nonEmpty(slice.codeUrl))
|
|
544
602
|
return true;
|
|
603
|
+
if (nonEmpty(slice.codeB64))
|
|
604
|
+
return true;
|
|
545
605
|
if (nonEmpty(slice.kind))
|
|
546
606
|
return true;
|
|
547
607
|
return false;
|
|
@@ -602,6 +662,27 @@ export function toolResultGguiRender(result) {
|
|
|
602
662
|
* @public
|
|
603
663
|
*/
|
|
604
664
|
export const GGUI_RENDER_SHELL_SURFACE = 'var(--ggui-color-surface, #1e293b)';
|
|
665
|
+
/**
|
|
666
|
+
* Make raw JS source safe to embed as the text content of an HTML
|
|
667
|
+
* `<script>` element.
|
|
668
|
+
*
|
|
669
|
+
* The HTML parser terminates script data at the first
|
|
670
|
+
* case-insensitive `</script` and shifts parse state on `<!--`; both
|
|
671
|
+
* sequences are rewritten with a backslash (`<\/script`, `<\!--`).
|
|
672
|
+
* Inside JS string, template, and regex literals — the only positions
|
|
673
|
+
* these byte sequences occur in a well-formed bundled module (a bare
|
|
674
|
+
* `<!--` outside a literal is a SyntaxError in module code; a bare
|
|
675
|
+
* `</` cannot follow an expression) — `\/` and `\!` are identity
|
|
676
|
+
* escapes, so the escaped source evaluates identically to the
|
|
677
|
+
* original.
|
|
678
|
+
*
|
|
679
|
+
* @public
|
|
680
|
+
*/
|
|
681
|
+
export function escapeInlineScript(source) {
|
|
682
|
+
return source
|
|
683
|
+
.replace(/<\/(script)/gi, '<\\/$1')
|
|
684
|
+
.replace(/<!--/g, '<\\!--');
|
|
685
|
+
}
|
|
605
686
|
/**
|
|
606
687
|
* Build the ggui **self-contained shell** for a render bootstrap.
|
|
607
688
|
*
|
|
@@ -658,10 +739,17 @@ export function gguiShellHtml(bootstrap, options) {
|
|
|
658
739
|
const background = options?.background === 'transparent'
|
|
659
740
|
? 'background:transparent'
|
|
660
741
|
: `background-color:${GGUI_RENDER_SHELL_SURFACE}`;
|
|
742
|
+
// Inline vs external runtime: same document shape either way — the
|
|
743
|
+
// classic meta script always runs first (parse order + module
|
|
744
|
+
// deferral), so `__GGUI_META__` is populated before the runtime
|
|
745
|
+
// evaluates in both variants.
|
|
746
|
+
const runtimeTag = options?.runtimeInlineSource !== undefined
|
|
747
|
+
? `<script type="module" data-ggui-runtime="inline">${escapeInlineScript(options.runtimeInlineSource)}</script>`
|
|
748
|
+
: `<script type="module" crossorigin="anonymous" src="${safeRuntimeUrl}"></script>`;
|
|
661
749
|
return `<!doctype html>
|
|
662
750
|
<html lang="en" style="${background}"><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>
|
|
663
751
|
<body style="margin:0;${background}">
|
|
664
752
|
<script>globalThis.__GGUI_META__ = ${json};</script>
|
|
665
|
-
|
|
753
|
+
${runtimeTag}
|
|
666
754
|
</body></html>`;
|
|
667
755
|
}
|
|
@@ -309,8 +309,10 @@ export declare const SEMVER_PIN_RE: RegExp;
|
|
|
309
309
|
/**
|
|
310
310
|
* Hostname-only regex for `bundleHost` — the registry hostname (no
|
|
311
311
|
* scheme, no path) that the server prepends `https://` to and
|
|
312
|
-
* appends the canonical
|
|
313
|
-
*
|
|
312
|
+
* appends the canonical
|
|
313
|
+
* `/bundles/public/<scope>/<name>/<version>/{bundle.js,style.css}`
|
|
314
|
+
* suffix to when resolving a gadget's URLs at render time (the PUBLIC
|
|
315
|
+
* prefix of the registry's visibility-split bundle layout).
|
|
314
316
|
*
|
|
315
317
|
* Examples that pass:
|
|
316
318
|
* - `registry.ggui.ai` (spec default)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-contract.d.ts","sourceRoot":"","sources":["../../src/schemas/data-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACX,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAYhD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CA2BlD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;kBASjB,CAAC;AAEZ,sFAAsF;AACtF,eAAO,MAAM,eAAe;;;;;;;;;;kBAKjB,CAAC;AAEZ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;kBAUnB,CAAC;AAEZ,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB;;;;;;;;mBAA0C,CAAC;AAExE,iFAAiF;AACjF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;kBAgB1B,CAAC;AAEZ,uEAAuE;AACvE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;mBAAiD,CAAC;AAE/E,yEAAyE;AACzE,eAAO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BAAiB,EAAE,MAAM,uBAAuB,CAAC;AAwExE;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;oBAa7B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAanC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKxB,CAAC;AAEZ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAK9B,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAU1C,CAAC;AAQJ;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB;;;kBAKvB,CAAC;AAEZ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;mBAa/B,CAAC;AAEL;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4BAA4B;;;;;kBAO9B,CAAC;AAEZ;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,sDAElB,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CASZ,CAAC"}
|
|
@@ -304,8 +304,10 @@ export const SEMVER_PIN_RE = /^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/;
|
|
|
304
304
|
/**
|
|
305
305
|
* Hostname-only regex for `bundleHost` — the registry hostname (no
|
|
306
306
|
* scheme, no path) that the server prepends `https://` to and
|
|
307
|
-
* appends the canonical
|
|
308
|
-
*
|
|
307
|
+
* appends the canonical
|
|
308
|
+
* `/bundles/public/<scope>/<name>/<version>/{bundle.js,style.css}`
|
|
309
|
+
* suffix to when resolving a gadget's URLs at render time (the PUBLIC
|
|
310
|
+
* prefix of the registry's visibility-split bundle layout).
|
|
309
311
|
*
|
|
310
312
|
* Examples that pass:
|
|
311
313
|
* - `registry.ggui.ai` (spec default)
|
package/dist/schemas/invoke.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* client tools — no ggui-specific block type.
|
|
9
9
|
*
|
|
10
10
|
* TS types in types/invoke.ts are derived from these via z.infer. Consumers
|
|
11
|
-
* (@ggui-ai/server, @ggui-ai/react) import schemas for runtime validation
|
|
11
|
+
* (@ggui-ai/server, @ggui-ai/mcp-apps-react) import schemas for runtime validation
|
|
12
12
|
* and types for authoring.
|
|
13
13
|
*/
|
|
14
14
|
import { z } from 'zod';
|
package/dist/schemas/invoke.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* client tools — no ggui-specific block type.
|
|
9
9
|
*
|
|
10
10
|
* TS types in types/invoke.ts are derived from these via z.infer. Consumers
|
|
11
|
-
* (@ggui-ai/server, @ggui-ai/react) import schemas for runtime validation
|
|
11
|
+
* (@ggui-ai/server, @ggui-ai/mcp-apps-react) import schemas for runtime validation
|
|
12
12
|
* and types for authoring.
|
|
13
13
|
*/
|
|
14
14
|
import { z } from 'zod';
|