@ggui-ai/protocol 0.14.0 → 0.15.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/envelope-adapters.d.ts +1 -14
- package/dist/envelope-adapters.d.ts.map +1 -1
- package/dist/envelope-adapters.js +17 -1
- package/dist/envelopes/render-refusal.d.ts +49 -0
- package/dist/envelopes/render-refusal.d.ts.map +1 -0
- package/dist/envelopes/render-refusal.js +12 -0
- package/dist/gadgets/resolve-app-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.d.ts +2 -2
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/index.d.ts +67 -63
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/integrations/mcp-apps.d.ts +2 -2
- package/dist/schemas/blueprint.d.ts +2 -2
- package/dist/schemas/data-contract.d.ts +10 -30
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +4 -27
- package/dist/schemas/interface-context.d.ts +44 -0
- package/dist/schemas/interface-context.d.ts.map +1 -0
- package/dist/schemas/interface-context.js +22 -0
- package/dist/schemas/invoke.d.ts +3 -3
- package/dist/schemas/invoke.js +1 -1
- package/dist/schemas/mcp.d.ts +203 -94
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +110 -32
- package/dist/schemas/public-env-key.d.ts +26 -0
- package/dist/schemas/public-env-key.d.ts.map +1 -0
- package/dist/schemas/public-env-key.js +25 -0
- package/dist/schemas/render-input-envelope.d.ts +2 -2
- package/dist/schemas/runtime-telemetry-limits.d.ts +11 -0
- package/dist/schemas/runtime-telemetry-limits.d.ts.map +1 -0
- package/dist/schemas/runtime-telemetry-limits.js +10 -0
- package/dist/transport/websocket.d.ts +5 -5
- package/dist/types/auth.d.ts +1 -1
- package/dist/types/contract-inference.d.ts +1 -1
- package/dist/types/events.d.ts +1 -1
- package/dist/types/ggui-session-event.d.ts +2 -2
- package/dist/types/host-context.d.ts +3 -3
- package/dist/types/interface-context.d.ts +1 -1
- package/dist/types/invoke.d.ts +1 -1
- package/dist/types/lifecycle.d.ts +1 -1
- package/dist/types/live-channel.d.ts +2 -2
- package/dist/types/mcp.d.ts +20 -63
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +7 -0
- package/dist/types/refusal-codes.d.ts +23 -2
- package/dist/types/refusal-codes.d.ts.map +1 -1
- package/dist/types/refusal-codes.js +26 -9
- package/dist/types/render.d.ts +9 -8
- package/dist/types/render.d.ts.map +1 -1
- package/dist/types/ui-generator.d.ts +1 -1
- package/dist/validation/ajv-runtime.d.ts +2 -2
- package/dist/validation/contract-validator.d.ts +6 -6
- package/dist/validation/cross-references.d.ts +2 -2
- package/dist/validation/hygiene-rules.d.ts +1 -1
- package/dist/validation/name-invariants.d.ts +2 -2
- package/dist/validation/reserved-channels.d.ts +1 -1
- package/dist/validation/schema-compat-invariants.d.ts +2 -2
- package/dist/validation/schema-meta-validation.d.ts +1 -1
- package/dist/version.d.ts +132 -10
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +132 -10
- package/dist/wire.d.ts +45 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +44 -0
- package/package.json +7 -1
package/dist/schemas/mcp.js
CHANGED
|
@@ -25,25 +25,10 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import { z } from 'zod';
|
|
27
27
|
import { blueprintDraftSchema, handshakeSuggestionSchema, } from './handshake-suggestion.js';
|
|
28
|
-
import { dataContractSchema, jsonObjectSchema } from './data-contract.js';
|
|
28
|
+
import { dataContractSchema, jsonObjectSchema, jsonValueSchema } from './data-contract.js';
|
|
29
29
|
import { blueprintVarianceSchema, blueprintSourceSchema } from './blueprint.js';
|
|
30
|
-
import { REFUSAL_RETRIES, RENDER_GATE_REFUSAL_CODES, } from '../types/refusal-codes.js';
|
|
31
|
-
|
|
32
|
-
export const viewportSchema = z.object({
|
|
33
|
-
width: z.number(),
|
|
34
|
-
height: z.number(),
|
|
35
|
-
});
|
|
36
|
-
export const interfaceContextSchema = z.object({
|
|
37
|
-
viewport: viewportSchema,
|
|
38
|
-
platform: z.enum(['web', 'mobile', 'desktop']),
|
|
39
|
-
deviceType: z.enum(['phone', 'tablet', 'desktop']),
|
|
40
|
-
orientation: z.enum(['portrait', 'landscape']),
|
|
41
|
-
devicePixelRatio: z.number().optional(),
|
|
42
|
-
touchPrimary: z.boolean().optional(),
|
|
43
|
-
shellType: z.enum(['chat', 'fullscreen', 'spatial']).optional(),
|
|
44
|
-
colorScheme: z.enum(['light', 'dark']).optional(),
|
|
45
|
-
reducedMotion: z.boolean().optional(),
|
|
46
|
-
}).passthrough();
|
|
30
|
+
import { MCP_ENDPOINT_REFUSAL_CODES, REFUSAL_RETRIES, RENDER_GATE_REFUSAL_CODES, } from '../types/refusal-codes.js';
|
|
31
|
+
import { RUNTIME_TELEMETRY_MAX_EVENTS } from './runtime-telemetry-limits.js';
|
|
47
32
|
// ── Wired Tool Input Shapes ──
|
|
48
33
|
//
|
|
49
34
|
// Raw zod shapes for the non-lifecycle tools. The SHAPE is the canonical
|
|
@@ -489,10 +474,16 @@ export const renderOutcomeSchema = z.enum(['rendered', 'failed', 'refused']);
|
|
|
489
474
|
* row names a `fixBy` other than `caller`: the fix belongs to the app's
|
|
490
475
|
* owner, the tenant, or the operator, and retrying does not perform it.
|
|
491
476
|
*/
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
477
|
+
/**
|
|
478
|
+
* The refusal projection every surface shares — what a client acts on:
|
|
479
|
+
* the diagnostic, the one recovery step, and how the call becomes
|
|
480
|
+
* possible again. Defined ONCE and spread into each surface's envelope
|
|
481
|
+
* (the render gate's {@link renderRefusalSchema}, the per-app endpoint's
|
|
482
|
+
* {@link transportRefusalSchema}); the `code` enum is per surface,
|
|
483
|
+
* derived from the registry. `fixBy` never travels — it is a registry
|
|
484
|
+
* attribute a client reads by `code`.
|
|
485
|
+
*/
|
|
486
|
+
const refusalProjectionFields = {
|
|
496
487
|
message: z
|
|
497
488
|
.string()
|
|
498
489
|
.describe('Precise diagnostic — what was checked, and against what. Surface it to the operator; do not parse it.'),
|
|
@@ -502,6 +493,12 @@ export const renderRefusalSchema = z.object({
|
|
|
502
493
|
retry: z
|
|
503
494
|
.enum(REFUSAL_RETRIES)
|
|
504
495
|
.describe("How the call becomes possible again. 'after-fix': a named party acts and the same call then succeeds. 'next-period': time restores it at the next period boundary. 'later': transient — retry after a short delay. 'never': no caller action restores it under this identity."),
|
|
496
|
+
};
|
|
497
|
+
export const renderRefusalSchema = z.object({
|
|
498
|
+
code: z
|
|
499
|
+
.enum(RENDER_GATE_REFUSAL_CODES)
|
|
500
|
+
.describe("Registered refusal state. Look the code up in the protocol's refusal registry for its retry class and which party can act; the accompanying `fix` names the one recovery step."),
|
|
501
|
+
...refusalProjectionFields,
|
|
505
502
|
handshake: z
|
|
506
503
|
.literal('intact')
|
|
507
504
|
.describe('The handshake was NOT consumed — nothing was read. The same handshakeId is valid on a retry.'),
|
|
@@ -511,6 +508,41 @@ export const renderRefusalSchema = z.object({
|
|
|
511
508
|
.optional()
|
|
512
509
|
.describe('Present only when the refusing check read a balance: its value at the moment of the check.'),
|
|
513
510
|
});
|
|
511
|
+
/**
|
|
512
|
+
* A refusal typed on the per-app MCP endpoint's authorization
|
|
513
|
+
* (ggui#825) — the registry projection WITHOUT the render-only fields:
|
|
514
|
+
* no `handshake` (nothing was handed), no `balanceCentsAtCheck`. Strict:
|
|
515
|
+
* a render-only field here is a bug, never a wire state. `code` draws
|
|
516
|
+
* from {@link MCP_ENDPOINT_REFUSAL_CODES} — today exactly
|
|
517
|
+
* `app_deprovisioned`, the one refusal with a tenant-side fix and
|
|
518
|
+
* therefore the one that MUST be legible where a deleted app and a bad
|
|
519
|
+
* credential would otherwise look alike.
|
|
520
|
+
*/
|
|
521
|
+
export const transportRefusalSchema = z.strictObject({
|
|
522
|
+
code: z
|
|
523
|
+
.enum(MCP_ENDPOINT_REFUSAL_CODES)
|
|
524
|
+
.describe("Registered refusal state on the per-app endpoint. Look the code up in the protocol's refusal registry for its retry class and which party can act."),
|
|
525
|
+
...refusalProjectionFields,
|
|
526
|
+
});
|
|
527
|
+
/**
|
|
528
|
+
* The JSON-RPC error object a per-app MCP endpoint answers with when it
|
|
529
|
+
* refuses a request for a typed reason (ggui#825, codes ruled in
|
|
530
|
+
* ggui#836): HTTP 403, `code` `-32003` (`APP_NOT_FOUND` — the endpoint
|
|
531
|
+
* no longer serves this app, the same reading ggui's embed host gives a
|
|
532
|
+
* proxy 403) and `message` `App not found`, plus `data.refusal`, which
|
|
533
|
+
* makes it legible. `data` is strict: it carries the refusal and nothing
|
|
534
|
+
* else. An authorization failure that is not a registry state answers
|
|
535
|
+
* HTTP 403 with `-32001` (`UNAUTHORIZED`) and NO `data` — the three
|
|
536
|
+
* untyped arms stay indistinguishable among themselves by contract:
|
|
537
|
+
* naming any of them would say which is true. A first-party server
|
|
538
|
+
* never chooses `-32000`: it is the SDK client's `ConnectionClosed`, so
|
|
539
|
+
* a bare 403 and a dropped socket would share a number.
|
|
540
|
+
*/
|
|
541
|
+
export const transportRefusalErrorSchema = z.strictObject({
|
|
542
|
+
code: z.literal(-32003),
|
|
543
|
+
message: z.literal('App not found'),
|
|
544
|
+
data: z.strictObject({ refusal: transportRefusalSchema }),
|
|
545
|
+
});
|
|
514
546
|
/**
|
|
515
547
|
* The COMPLETE structuredContent of a refused tool result — the whole
|
|
516
548
|
* payload, not a slice of it. Strict on purpose: a refusal commits
|
|
@@ -1174,11 +1206,6 @@ export const runtimePullOutputSchema = z.union([
|
|
|
1174
1206
|
runtimePullEventsPageSchema,
|
|
1175
1207
|
runtimePullHorizonSchema,
|
|
1176
1208
|
]);
|
|
1177
|
-
/**
|
|
1178
|
-
* Per-batch event cap on `ggui_runtime_telemetry` — a bounded
|
|
1179
|
-
* fire-and-forget diagnostic channel, never a data plane.
|
|
1180
|
-
*/
|
|
1181
|
-
export const RUNTIME_TELEMETRY_MAX_EVENTS = 40;
|
|
1182
1209
|
/**
|
|
1183
1210
|
* `ggui_runtime_telemetry` input — the iframe runtime's transport
|
|
1184
1211
|
* self-report (`_meta.ui.visibility: ['app']`, view-callable only).
|
|
@@ -1255,10 +1282,6 @@ export function isRefusedRenderOutput(output) {
|
|
|
1255
1282
|
// mutable JSON; readonly is applied at the seam (`DeepReadonly` on the
|
|
1256
1283
|
// derived types). Every shape is closed: the transport strip-parses against
|
|
1257
1284
|
// `.shape`, so the shape IS the wire.
|
|
1258
|
-
// Honest exception, pre-existing: three `.readonly()` calls in
|
|
1259
|
-
// `schemas/data-contract.ts` (gadget requires/connect, app public env) reach
|
|
1260
|
-
// the registered render + handshake inputs through `dataContractSchema` and
|
|
1261
|
-
// advertise `readOnly` on tools/list today — ggui#824 removes them.
|
|
1262
1285
|
// ============================================================================
|
|
1263
1286
|
/** Display modes an MCP Apps host can render a view in (ext-apps vocabulary). */
|
|
1264
1287
|
export const mcpUiDisplayModeSchema = z.enum(['inline', 'fullscreen', 'pip']);
|
|
@@ -1300,6 +1323,58 @@ export const gguiSessionSummaryWireSchema = z.object({
|
|
|
1300
1323
|
wsToken: z.string().optional(),
|
|
1301
1324
|
wsTokenExpiresAt: z.string().optional(),
|
|
1302
1325
|
});
|
|
1326
|
+
/**
|
|
1327
|
+
* The two states a GguiSession is in on the wire — the pair the consume
|
|
1328
|
+
* loop exits on (`expired`). Owned here (ggui#817 part C2); the type is
|
|
1329
|
+
* derived, never a second list.
|
|
1330
|
+
*/
|
|
1331
|
+
export const gguiSessionStatusSchema = z.enum(['active', 'expired']);
|
|
1332
|
+
/**
|
|
1333
|
+
* One drained row of `ggui_consume` — a user action that reached the
|
|
1334
|
+
* pipe (ggui#817 part C2). Closed on the wire: an unknown key is
|
|
1335
|
+
* stripped at the transport, a missing key refuses the row at the seam
|
|
1336
|
+
* (`parsePendingEnvelope`), so a malformed pipe entry never ships to an
|
|
1337
|
+
* agent typed as a good one.
|
|
1338
|
+
*/
|
|
1339
|
+
export const consumeEventEntrySchema = z.object({
|
|
1340
|
+
type: z.literal('action'),
|
|
1341
|
+
sessionId: z.string().min(1),
|
|
1342
|
+
intent: z.string(),
|
|
1343
|
+
actionData: jsonValueSchema.nullable(),
|
|
1344
|
+
uiContext: jsonObjectSchema,
|
|
1345
|
+
actionId: z.string(),
|
|
1346
|
+
firedAt: z.string(),
|
|
1347
|
+
});
|
|
1348
|
+
/**
|
|
1349
|
+
* `ggui_consume`'s output — the drained rows, the session's state, and the
|
|
1350
|
+
* client's observations when the host sent any (ggui#817 part C2). The
|
|
1351
|
+
* handler registers `.shape`; `tools/list` therefore advertises the entry
|
|
1352
|
+
* vocabulary and the status enum instead of a free-form record and a free
|
|
1353
|
+
* string.
|
|
1354
|
+
*/
|
|
1355
|
+
export const gguiConsumeOutputSchema = z.object({
|
|
1356
|
+
events: z.array(consumeEventEntrySchema),
|
|
1357
|
+
status: gguiSessionStatusSchema,
|
|
1358
|
+
client: clientObservationsSchema.optional(),
|
|
1359
|
+
});
|
|
1360
|
+
/** `ggui_list_sessions`' output — the closed summary rows (ggui#817 part C2). */
|
|
1361
|
+
export const gguiListSessionsOutputSchema = z.object({
|
|
1362
|
+
sessions: z.array(gguiSessionSummaryWireSchema),
|
|
1363
|
+
});
|
|
1364
|
+
/**
|
|
1365
|
+
* `ggui_emit`'s output (ggui#817 part C2): `accepted` at the boundary, and
|
|
1366
|
+
* `seq` when the server keeps a stream buffer — seq-aware implementations
|
|
1367
|
+
* stamp and return it so replay cursors can be built from the ack.
|
|
1368
|
+
*/
|
|
1369
|
+
export const gguiEmitOutputSchema = z.object({
|
|
1370
|
+
accepted: z.boolean(),
|
|
1371
|
+
seq: z
|
|
1372
|
+
.number()
|
|
1373
|
+
.int()
|
|
1374
|
+
.nonnegative()
|
|
1375
|
+
.optional()
|
|
1376
|
+
.describe('Session-scoped monotonic outbound sequence assigned to this delivery. Present when the server keeps a stream buffer.'),
|
|
1377
|
+
});
|
|
1303
1378
|
/**
|
|
1304
1379
|
* `ggui_get_session`'s wire: the store row's six base fields plus the mount
|
|
1305
1380
|
* variant — for EVERY session. An MCP-Apps mount is locator-only on the
|
|
@@ -1307,6 +1382,8 @@ export const gguiSessionSummaryWireSchema = z.object({
|
|
|
1307
1382
|
* projection reads them from the row and the wire never fails on that
|
|
1308
1383
|
* variant. The locator itself is not on this wire (MCP-Apps resources have
|
|
1309
1384
|
* their own paths).
|
|
1385
|
+
* `contextSnapshot` rides when a component (`render`) mount's row has one —
|
|
1386
|
+
* never on an mcpApps mount.
|
|
1310
1387
|
*/
|
|
1311
1388
|
export const gguiGetSessionOutputSchema = z.object({
|
|
1312
1389
|
variant: z.enum(['render', 'mcpApps']),
|
|
@@ -1320,7 +1397,8 @@ export const gguiGetSessionOutputSchema = z.object({
|
|
|
1320
1397
|
* The last-known value of every declared contextSpec slot, as
|
|
1321
1398
|
* `ggui_runtime_sync_context` wrote it onto the row — the read path a
|
|
1322
1399
|
* raw MCP client (no widget-context mirror) has for contextSpec values.
|
|
1323
|
-
* Present iff the row carries one
|
|
1400
|
+
* Present iff the row carries one — component (`render`) mounts only; an
|
|
1401
|
+
* mcpApps mount never carries one; never an empty placeholder.
|
|
1324
1402
|
*/
|
|
1325
1403
|
contextSnapshot: jsonObjectSchema.optional(),
|
|
1326
1404
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `GGUI_PUBLIC_APP_*` key grammar — its own module (ggui#819) so the
|
|
3
|
+
* browser entry can carry the regex without the contract schema that
|
|
4
|
+
* embeds it.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* `App.publicEnv` key regex.
|
|
8
|
+
*
|
|
9
|
+
* Each key in `App.publicEnv` MUST match this pattern. The prefix is
|
|
10
|
+
* the **security boundary** — operators can't accidentally stash
|
|
11
|
+
* sensitive credentials under arbitrary names, and downstream consumers
|
|
12
|
+
* (render gate, bootstrap projection, iframe shim) can rely on the
|
|
13
|
+
* naming convention to mean "public-by-design".
|
|
14
|
+
*
|
|
15
|
+
* Rule: `GGUI_PUBLIC_APP_` prefix, then uppercase letters / digits /
|
|
16
|
+
* underscores, at least one char after the prefix.
|
|
17
|
+
*
|
|
18
|
+
* `GGUI_PUBLIC_USER_*` keys are RESERVED for a future per-user
|
|
19
|
+
* channel. The current regex rejects them so App-side config can't
|
|
20
|
+
* pre-emptively use the namespace.
|
|
21
|
+
*
|
|
22
|
+
* Hoisted above `gadgetDescriptorSchema` so the wrapper's `requires`
|
|
23
|
+
* array can reference it at schema-construction time (TDZ-safe).
|
|
24
|
+
*/
|
|
25
|
+
export declare const PUBLIC_ENV_APP_KEY_RE: RegExp;
|
|
26
|
+
//# sourceMappingURL=public-env-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-env-key.d.ts","sourceRoot":"","sources":["../../src/schemas/public-env-key.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,QAAiC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `GGUI_PUBLIC_APP_*` key grammar — its own module (ggui#819) so the
|
|
3
|
+
* browser entry can carry the regex without the contract schema that
|
|
4
|
+
* embeds it.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* `App.publicEnv` key regex.
|
|
8
|
+
*
|
|
9
|
+
* Each key in `App.publicEnv` MUST match this pattern. The prefix is
|
|
10
|
+
* the **security boundary** — operators can't accidentally stash
|
|
11
|
+
* sensitive credentials under arbitrary names, and downstream consumers
|
|
12
|
+
* (render gate, bootstrap projection, iframe shim) can rely on the
|
|
13
|
+
* naming convention to mean "public-by-design".
|
|
14
|
+
*
|
|
15
|
+
* Rule: `GGUI_PUBLIC_APP_` prefix, then uppercase letters / digits /
|
|
16
|
+
* underscores, at least one char after the prefix.
|
|
17
|
+
*
|
|
18
|
+
* `GGUI_PUBLIC_USER_*` keys are RESERVED for a future per-user
|
|
19
|
+
* channel. The current regex rejects them so App-side config can't
|
|
20
|
+
* pre-emptively use the namespace.
|
|
21
|
+
*
|
|
22
|
+
* Hoisted above `gadgetDescriptorSchema` so the wrapper's `requires`
|
|
23
|
+
* array can reference it at schema-construction time (TDZ-safe).
|
|
24
|
+
*/
|
|
25
|
+
export const PUBLIC_ENV_APP_KEY_RE = /^GGUI_PUBLIC_APP_[A-Z0-9_]+$/;
|
|
@@ -7,8 +7,8 @@ export declare const renderInputEnvelopeSchema: z.ZodObject<{
|
|
|
7
7
|
model: z.ZodOptional<z.ZodString>;
|
|
8
8
|
}, z.core.$strict>>;
|
|
9
9
|
override: z.ZodOptional<z.ZodObject<{
|
|
10
|
-
contract: z.ZodOptional<z.ZodType<import("
|
|
11
|
-
variance: z.ZodOptional<z.ZodType<import("
|
|
10
|
+
contract: z.ZodOptional<z.ZodType<import("../index.js").DataContract, unknown, z.core.$ZodTypeInternals<import("../index.js").DataContract, unknown>>>;
|
|
11
|
+
variance: z.ZodOptional<z.ZodType<import("../index.js").BlueprintVariance, unknown, z.core.$ZodTypeInternals<import("../index.js").BlueprintVariance, unknown>>>;
|
|
12
12
|
}, z.core.$strict>>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
export declare const renderInputRouteGuardSchema: z.ZodObject<{
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounds the browser runtime shares with the server — its own module
|
|
3
|
+
* (ggui#819) so `@ggui-ai/protocol/wire` carries the number, not the tool
|
|
4
|
+
* schemas that enforce it.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Per-batch event cap on `ggui_runtime_telemetry` — a bounded
|
|
8
|
+
* fire-and-forget diagnostic channel, never a data plane.
|
|
9
|
+
*/
|
|
10
|
+
export declare const RUNTIME_TELEMETRY_MAX_EVENTS = 40;
|
|
11
|
+
//# sourceMappingURL=runtime-telemetry-limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-telemetry-limits.d.ts","sourceRoot":"","sources":["../../src/schemas/runtime-telemetry-limits.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;;GAGG;AACH,eAAO,MAAM,4BAA4B,KAAK,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounds the browser runtime shares with the server — its own module
|
|
3
|
+
* (ggui#819) so `@ggui-ai/protocol/wire` carries the number, not the tool
|
|
4
|
+
* schemas that enforce it.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Per-batch event cap on `ggui_runtime_telemetry` — a bounded
|
|
8
|
+
* fire-and-forget diagnostic channel, never a data plane.
|
|
9
|
+
*/
|
|
10
|
+
export const RUNTIME_TELEMETRY_MAX_EVENTS = 40;
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
* pay its type/build cost. Consumers that only need contract payloads
|
|
21
21
|
* stay on the root import.
|
|
22
22
|
*/
|
|
23
|
-
import type { ActionEnvelope } from '../types/events';
|
|
24
|
-
import type { JsonObject } from '../types/data-contract';
|
|
25
|
-
import type { SubscribePayload, AckPayload, ErrorPayload, RenderPayload, StreamEnvelope, PropsUpdatePayload, ChannelSubscribePayload, ChannelUnsubscribePayload, ChannelPayloadFrame, ChannelErrorPayload, DrainAckPayload } from '../types/live-channel';
|
|
26
|
-
import type { HostContextObservedPayload } from '../types/host-context';
|
|
27
|
-
import type { GguiSessionEvent } from '../types/ggui-session-event';
|
|
23
|
+
import type { ActionEnvelope } from '../types/events.js';
|
|
24
|
+
import type { JsonObject } from '../types/data-contract.js';
|
|
25
|
+
import type { SubscribePayload, AckPayload, ErrorPayload, RenderPayload, StreamEnvelope, PropsUpdatePayload, ChannelSubscribePayload, ChannelUnsubscribePayload, ChannelPayloadFrame, ChannelErrorPayload, DrainAckPayload } from '../types/live-channel.js';
|
|
26
|
+
import type { HostContextObservedPayload } from '../types/host-context.js';
|
|
27
|
+
import type { GguiSessionEvent } from '../types/ggui-session-event.js';
|
|
28
28
|
/**
|
|
29
29
|
* WebSocket message types for client-server communication.
|
|
30
30
|
* Each type maps to a specific payload shape in the {@link WebSocketMessage} discriminated union.
|
package/dist/types/auth.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataContract, JsonObject, JsonSchemaTypeName, JsonValue } from './data-contract';
|
|
1
|
+
import type { DataContract, JsonObject, JsonSchemaTypeName, JsonValue } from './data-contract.js';
|
|
2
2
|
/**
|
|
3
3
|
* Extract the JSON Schema `required` array from a schema literal as a
|
|
4
4
|
* string union. Resolves to `never` when `required` is absent, empty,
|
package/dist/types/events.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { runtimePullEventsPageSchema } from '../schemas/mcp';
|
|
3
|
-
import type { DeepReadonly } from './readonly';
|
|
2
|
+
import type { runtimePullEventsPageSchema } from '../schemas/mcp.js';
|
|
3
|
+
import type { DeepReadonly } from './readonly.js';
|
|
4
4
|
/**
|
|
5
5
|
* GguiSessionEvent ledger — wire-frame replay primitives (R7).
|
|
6
6
|
*
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
* projection widenings can be detected; this module is the canonical
|
|
41
41
|
* shape for the current schema major.
|
|
42
42
|
*/
|
|
43
|
-
import type { JsonValue } from './data-contract';
|
|
43
|
+
import type { JsonValue } from './data-contract.js';
|
|
44
44
|
export type { McpUiDisplayMode, McpUiHostContext, McpUiHostCapabilities, } from '@modelcontextprotocol/ext-apps';
|
|
45
45
|
import type { McpUiDisplayMode } from '@modelcontextprotocol/ext-apps';
|
|
46
46
|
import type { z } from 'zod';
|
|
47
|
-
import type { hostContextProjectionSchema, mcpUiDisplayModeSchema } from '../schemas/mcp';
|
|
48
|
-
import type { DeepReadonly } from './readonly';
|
|
47
|
+
import type { hostContextProjectionSchema, mcpUiDisplayModeSchema } from '../schemas/mcp.js';
|
|
48
|
+
import type { DeepReadonly } from './readonly.js';
|
|
49
49
|
/**
|
|
50
50
|
* The wire enum is assignable to ext-apps' `McpUiDisplayMode` — checked at
|
|
51
51
|
* compile time, so a display mode the host SDK adds is a protocol change
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Allows Claude to generate UIs adapted to the user's device/viewport.
|
|
8
8
|
*/
|
|
9
|
-
import type { JsonObject } from './data-contract';
|
|
9
|
+
import type { JsonObject } from './data-contract.js';
|
|
10
10
|
export type PlatformType = 'web' | 'mobile' | 'desktop';
|
|
11
11
|
export type DeviceType = 'phone' | 'tablet' | 'desktop';
|
|
12
12
|
export type Orientation = 'portrait' | 'landscape';
|
package/dist/types/invoke.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* of truth. Do not hand-author parallel types here.
|
|
6
6
|
*/
|
|
7
7
|
import type { z } from 'zod';
|
|
8
|
-
import type { textBlockSchema, toolUseBlockSchema, toolResultBlockSchema, contentBlockSchema, invokeEventSchema, invokeErrorCodeSchema, invokeTurnSchema } from '../schemas/invoke';
|
|
8
|
+
import type { textBlockSchema, toolUseBlockSchema, toolResultBlockSchema, contentBlockSchema, invokeEventSchema, invokeErrorCodeSchema, invokeTurnSchema } from '../schemas/invoke.js';
|
|
9
9
|
export type TextBlock = z.infer<typeof textBlockSchema>;
|
|
10
10
|
export type ToolUseBlock = z.infer<typeof toolUseBlockSchema>;
|
|
11
11
|
export type ToolResultBlock = z.infer<typeof toolResultBlockSchema>;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* - This module is `data` only — no functions, no reducers. Pure
|
|
34
34
|
* types so the protocol bundle stays tiny.
|
|
35
35
|
*/
|
|
36
|
-
import type { JsonObject } from './data-contract';
|
|
36
|
+
import type { JsonObject } from './data-contract.js';
|
|
37
37
|
/**
|
|
38
38
|
* Emitted when the server starts processing a `ggui_handshake` call.
|
|
39
39
|
* Progress UIs transition from their current state into a
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* The corresponding inbound user-action envelope ({@link ActionEnvelope})
|
|
16
16
|
* lives in `types/events.ts` alongside the event-type enum.
|
|
17
17
|
*/
|
|
18
|
-
import type { GguiSession } from './render';
|
|
19
|
-
import type { JsonObject, JsonValue, StreamChannelMode } from './data-contract';
|
|
18
|
+
import type { GguiSession } from './render.js';
|
|
19
|
+
import type { JsonObject, JsonValue, StreamChannelMode } from './data-contract.js';
|
|
20
20
|
/**
|
|
21
21
|
* Payload for subscribe message
|
|
22
22
|
*/
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { DataContract, JsonObject, JsonSchema, JsonValue } from './data-contract';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
export type { GguiSessionStatus } from './render';
|
|
2
|
+
import type { DataContract, JsonObject, JsonSchema, JsonValue } from './data-contract.js';
|
|
3
|
+
import type { DeepReadonly } from './readonly.js';
|
|
4
|
+
import type { consumeInputSchema, getRenderSourceInputSchema, getSessionInputSchema, handshakeInputSchema, handshakeOutputSchema, renderBlueprintInputSchema, renderCacheMarkerSchema, renderErrorSchema, renderInputSchema, renderOutputSchema, resourceReadErrorCodeSchema, resourceReadErrorSchema, runtimePullInputSchema, runtimeTelemetryInputSchema, runtimeTelemetryOutputSchema, searchBlueprintsInputSchema, updateInputSchema, updateOutputSchema, amendInputSchema, amendOutputSchema, declareToolCatalogOutputSchema, gguiGetSessionOutputSchema, gguiSearchBlueprintsOutputSchema, consumeEventEntrySchema, gguiConsumeOutputSchema, gguiEmitOutputSchema, gguiListSessionsOutputSchema } from '../schemas/mcp.js';
|
|
5
|
+
import type { EventsResponse, ReplayHorizonPassedError } from './ggui-session-event.js';
|
|
6
|
+
export type { GguiSessionStatus } from './render.js';
|
|
8
7
|
/** Target screen size category for responsive layout */
|
|
9
8
|
export type Screen = 'mobile' | 'tablet' | 'desktop' | 'universal';
|
|
10
9
|
/**
|
|
@@ -107,17 +106,9 @@ export interface GguiEmitInput<TPayload = JsonValue> {
|
|
|
107
106
|
* any subscriber is currently connected is a separate concern and does
|
|
108
107
|
* NOT affect this flag. No-subscriber is not an error.
|
|
109
108
|
*/
|
|
110
|
-
export
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* GguiSession-scoped monotonic outbound sequence assigned to this
|
|
115
|
-
* delivery. Omitted on implementations without a
|
|
116
|
-
* `GguiSessionStreamBuffer` (hosted cloud today); required on OSS
|
|
117
|
-
* `@ggui-ai/mcp-server`.
|
|
118
|
-
*/
|
|
119
|
-
seq?: number;
|
|
120
|
-
}
|
|
109
|
+
export type GguiEmitOutput = DeepReadonly<z.infer<typeof gguiEmitOutputSchema>>;
|
|
110
|
+
/** `ggui_list_sessions`' wire, derived from {@link gguiListSessionsOutputSchema} (ggui#817 part C2). */
|
|
111
|
+
export type GguiListSessionsOutput = DeepReadonly<z.infer<typeof gguiListSessionsOutputSchema>>;
|
|
121
112
|
/**
|
|
122
113
|
* Input for ggui_get_session tool — retrieves render state.
|
|
123
114
|
* Derived from `getSessionInputSchema`.
|
|
@@ -128,7 +119,7 @@ export type GguiGetSessionInput = z.infer<typeof getSessionInputSchema>;
|
|
|
128
119
|
* + the store row's six base fields, plus `contextSnapshot` when the row has
|
|
129
120
|
* one. Nothing else on the row travels (the transport strip-parses to this).
|
|
130
121
|
*/
|
|
131
|
-
export type GguiGetSessionOutput =
|
|
122
|
+
export type GguiGetSessionOutput = DeepReadonly<z.infer<typeof gguiGetSessionOutputSchema>>;
|
|
132
123
|
/**
|
|
133
124
|
* Input for ggui_get_render_source tool — read the generated source of
|
|
134
125
|
* the calling app's own render. Derived from `getRenderSourceInputSchema`.
|
|
@@ -167,32 +158,7 @@ export interface GguiGetRenderSourceOutput {
|
|
|
167
158
|
* seam) — consume reads from a separate render-scoped pipe whose entries
|
|
168
159
|
* originate at `submit_action`.
|
|
169
160
|
*/
|
|
170
|
-
export
|
|
171
|
-
/** Stable discriminator — always the literal `'action'`. */
|
|
172
|
-
readonly type: 'action';
|
|
173
|
-
/** GguiSession the gesture targeted. */
|
|
174
|
-
readonly sessionId: string;
|
|
175
|
-
/** Which `actionSpec[*]` entry the iframe dispatched against. */
|
|
176
|
-
readonly intent: string;
|
|
177
|
-
/**
|
|
178
|
-
* Typed payload satisfying `actionSpec[intent].schema`. `null` for
|
|
179
|
-
* no-payload gestures (bare button click).
|
|
180
|
-
*/
|
|
181
|
-
readonly actionData: JsonValue | null;
|
|
182
|
-
/**
|
|
183
|
-
* Snapshot of the contract's `contextSpec` slot values at the moment
|
|
184
|
-
* the user fired the gesture. Empty object `{}` when the contract
|
|
185
|
-
* has no `contextSpec` or no slots have been mirrored yet.
|
|
186
|
-
*/
|
|
187
|
-
readonly uiContext: JsonObject;
|
|
188
|
-
/**
|
|
189
|
-
* 8-hex FNV-1a correlation id of the gesture — matches the iframe-
|
|
190
|
-
* runtime's outstanding-toast key and the server's `drain_ack` frame.
|
|
191
|
-
*/
|
|
192
|
-
readonly actionId: string;
|
|
193
|
-
/** ISO 8601 UTC timestamp of the gesture (iframe-local clock). */
|
|
194
|
-
readonly firedAt: string;
|
|
195
|
-
}
|
|
161
|
+
export type ConsumeEventEntry = Readonly<z.infer<typeof consumeEventEntrySchema>>;
|
|
196
162
|
/**
|
|
197
163
|
* Output from `ggui_consume` — buffered consume-entries.
|
|
198
164
|
*
|
|
@@ -202,23 +168,7 @@ export interface ConsumeEventEntry {
|
|
|
202
168
|
* single source of truth — both the action and the local UI state are
|
|
203
169
|
* atomic on a single entry.
|
|
204
170
|
*/
|
|
205
|
-
export
|
|
206
|
-
/** Buffered consume-entries (cleared after return). */
|
|
207
|
-
events: ConsumeEventEntry[];
|
|
208
|
-
/** GguiSession status — `'expired'` means the GguiSession's TTL elapsed and
|
|
209
|
-
* no more events will arrive; the agent's long-poll loop terminates. */
|
|
210
|
-
status: GguiSessionStatus;
|
|
211
|
-
/**
|
|
212
|
-
* Client-side observations echoed back to the agent. Same shape
|
|
213
|
-
* `ggui_handshake` exposes. Lets the agent pick up mid-render
|
|
214
|
-
* changes (window resize, fullscreen toggle, etc.) without waiting
|
|
215
|
-
* for the next handshake. Absent ⇒ no client observations yet.
|
|
216
|
-
*
|
|
217
|
-
*/
|
|
218
|
-
client?: {
|
|
219
|
-
readonly hostContext?: import('./host-context.js').HostContextProjection;
|
|
220
|
-
};
|
|
221
|
-
}
|
|
171
|
+
export type GguiConsumeOutput = DeepReadonly<z.infer<typeof gguiConsumeOutputSchema>>;
|
|
222
172
|
/**
|
|
223
173
|
* Input for ggui_search_blueprints tool — semantic search over
|
|
224
174
|
* blueprints. Derived from `searchBlueprintsInputSchema`.
|
|
@@ -372,7 +322,7 @@ export type RenderCacheMarker = z.infer<typeof renderCacheMarkerSchema>;
|
|
|
372
322
|
* Canonical declaration lives beside the schema in `schemas/mcp.ts`;
|
|
373
323
|
* re-exported here so existing importers keep their path.
|
|
374
324
|
*/
|
|
375
|
-
export type { RenderErrorCode } from '../schemas/mcp';
|
|
325
|
+
export type { RenderErrorCode } from '../schemas/mcp.js';
|
|
376
326
|
/**
|
|
377
327
|
* In-result failure marker on `GguiRenderOutput.error` — present iff the
|
|
378
328
|
* tool result is `isError: true`. Derived from {@link renderErrorSchema}.
|
|
@@ -385,7 +335,7 @@ export type RenderError = z.infer<typeof renderErrorSchema>;
|
|
|
385
335
|
* schemas in `schemas/mcp.ts`; re-exported here so importers of the
|
|
386
336
|
* output types find them on the same path.
|
|
387
337
|
*/
|
|
388
|
-
export type { PreGenerationRefusal, RenderOutcome } from '../schemas/mcp';
|
|
338
|
+
export type { PreGenerationRefusal, RenderOutcome } from '../schemas/mcp.js';
|
|
389
339
|
/**
|
|
390
340
|
* Canonical failure code for a `resources/read` on a render locator
|
|
391
341
|
* (SPEC §7.9 Plane 1). Derived from
|
|
@@ -483,6 +433,13 @@ export declare const PLATFORM_ERROR_CODES: {
|
|
|
483
433
|
readonly APP_LIMIT_EXCEEDED: -32011;
|
|
484
434
|
readonly CONCURRENT_SESSION_LIMIT: -32012;
|
|
485
435
|
readonly RATE_LIMIT_EXCEEDED: -32013;
|
|
436
|
+
/**
|
|
437
|
+
* The generation queue is saturated — the server, not the caller, is
|
|
438
|
+
* the limit (contrast `RATE_LIMIT_EXCEEDED`: the caller slows down). HTTP
|
|
439
|
+
* 503 with `Retry-After`, which governs the retry; a parsed request's
|
|
440
|
+
* refusal, so it speaks this table (ggui#836 follow-up).
|
|
441
|
+
*/
|
|
442
|
+
readonly GENERATION_OVERLOADED: -32014;
|
|
486
443
|
readonly CONTRACT_VIOLATION: -32020;
|
|
487
444
|
};
|
|
488
445
|
//# sourceMappingURL=mcp.d.ts.map
|
package/dist/types/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EAC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12 @@ export const PLATFORM_ERROR_CODES = {
|
|
|
50
50
|
APP_LIMIT_EXCEEDED: -32011,
|
|
51
51
|
CONCURRENT_SESSION_LIMIT: -32012,
|
|
52
52
|
RATE_LIMIT_EXCEEDED: -32013,
|
|
53
|
+
/**
|
|
54
|
+
* The generation queue is saturated — the server, not the caller, is
|
|
55
|
+
* the limit (contrast `RATE_LIMIT_EXCEEDED`: the caller slows down). HTTP
|
|
56
|
+
* 503 with `Retry-After`, which governs the retry; a parsed request's
|
|
57
|
+
* refusal, so it speaks this table (ggui#836 follow-up).
|
|
58
|
+
*/
|
|
59
|
+
GENERATION_OVERLOADED: -32014,
|
|
53
60
|
CONTRACT_VIOLATION: -32020,
|
|
54
61
|
};
|