@ggui-ai/protocol 0.3.0-rc.0 → 0.5.0-rc.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.
@@ -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.3.0";
15
+ export declare const STDLIB_GADGETS_VERSION = "0.5.0-rc.0";
16
16
  /**
17
17
  * v1 catalog of stdlib gadget descriptors. Every entry's
18
18
  * `package` defaults to {@link STDLIB_GADGETS_PACKAGE}; the
@@ -1 +1 @@
1
- {"version":3,"file":"stdlib-gadgets.d.ts","sourceRoot":"","sources":["../../src/gadgets/stdlib-gadgets.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAE9C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,QAAQ,CAAC,gBAAgB,CAAC,EAkH/D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAUnD,CAAC"}
1
+ {"version":3,"file":"stdlib-gadgets.d.ts","sourceRoot":"","sources":["../../src/gadgets/stdlib-gadgets.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,eAAe,CAAC;AAEnD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,QAAQ,CAAC,gBAAgB,CAAC,EAkH/D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAUnD,CAAC"}
@@ -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.3.0';
42
+ export const STDLIB_GADGETS_VERSION = '0.5.0-rc.0';
43
43
  /**
44
44
  * v1 catalog of stdlib gadget descriptors. Every entry's
45
45
  * `package` defaults to {@link STDLIB_GADGETS_PACKAGE}; the
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from "./version";
2
2
  export * from "./types/auth";
3
- export * from "./types/capabilities";
4
3
  export * from "./types/events";
5
4
  export * from "./types/render";
6
5
  export * from "./types/ggui-session-event";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAI/B,cAAc,sBAAsB,CAAC;AAOrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AAIxC,cAAc,qBAAqB,CAAC;AAIpC,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAK5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAMlE,YAAY,EAEV,SAAS,EACT,Y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;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AAKnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from "./version.js";
2
2
  export * from "./types/auth.js";
3
- export * from "./types/capabilities.js";
4
3
  export * from "./types/events.js";
5
4
  export * from "./types/render.js";
6
5
  export * from "./types/ggui-session-event.js";
@@ -13,6 +13,13 @@ export interface PortableBlueprintSource {
13
13
  readonly variance: BlueprintVariance;
14
14
  /** Provenance of `componentCode` — travels with the artifact. */
15
15
  readonly source: BlueprintSource;
16
+ /**
17
+ * Intent prose for semantic (Tier-2) matching at the import side.
18
+ * Optional: artifacts exported before this field existed (and rows
19
+ * without one) still import — importers fall back to their own
20
+ * intent derivation.
21
+ */
22
+ readonly intent?: string;
16
23
  }
17
24
  /**
18
25
  * Rejection message for schemaVersion-1 artifacts. v1 records predate
@@ -1 +1 @@
1
- {"version":3,"file":"portable-blueprint.d.ts","sourceRoot":"","sources":["../../src/registry/portable-blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAMpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI7D,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAClC,OAAO,EAAE,iCAAiC,EAAE,CAAC;AAE7C,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;CAClC;AAED;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,uFAC0C,CAAC;AAEvF;;;;;;;;GAQG;AACH,MAAM,MAAM,6BAA6B,GACrC;IACE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EA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eAAe,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,uFAC0C,CAAC;AAEvF;;;;;;;;GAQG;AACH,MAAM,MAAM,6BAA6B,GACrC;IACE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B,GACD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD,+CAA+C;AAC/C,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;OAQG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,uBAAuB,EAC5B,IAAI,CAAC,EAAE,uBAAuB,GAC7B,iBAAiB,CAiBnB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,6BAA6B,CAyFpF"}
@@ -24,6 +24,9 @@ export function toPortableBlueprint(src, opts) {
24
24
  variantKey: variantKey(src.variance),
25
25
  source: src.source,
26
26
  generatorProtocolVersion: PROTOCOL_VERSION,
27
+ ...(src.intent !== undefined && src.intent.length > 0
28
+ ? { intent: src.intent }
29
+ : {}),
27
30
  ...(opts?.catalog !== undefined
28
31
  ? { toolIdentityCatalogHash: computeToolCatalogHash(opts.catalog) }
29
32
  : {}),
@@ -75,6 +78,10 @@ export function fromPortableBlueprint(record) {
75
78
  typeof toolIdentityCatalogHash !== 'string') {
76
79
  return { ok: false, reason: 'malformed `toolIdentityCatalogHash` (expected string)' };
77
80
  }
81
+ const intent = r['intent'];
82
+ if (intent !== undefined && (typeof intent !== 'string' || intent.length === 0)) {
83
+ return { ok: false, reason: 'malformed `intent` (expected non-empty string when present)' };
84
+ }
78
85
  const contract = dataContractSchema.safeParse(r['contract']);
79
86
  if (!contract.success) {
80
87
  return { ok: false, reason: `malformed \`contract\`: ${contract.error.message}` };
@@ -96,6 +103,7 @@ export function fromPortableBlueprint(record) {
96
103
  variantKey: shippedVariantKey,
97
104
  source,
98
105
  generatorProtocolVersion,
106
+ ...(intent !== undefined ? { intent } : {}),
99
107
  ...(toolIdentityCatalogHash !== undefined ? { toolIdentityCatalogHash } : {}),
100
108
  },
101
109
  keyMismatch,
@@ -320,9 +320,46 @@ export declare const renderCacheMarkerSchema: z.ZodObject<{
320
320
  reason: z.ZodOptional<z.ZodString>;
321
321
  }, z.core.$strip>;
322
322
  /**
323
- * Wire-output shape — `{sessionId, resourceUri, action, contractHash,
324
- * cache, nextStep?}`. `contractHash` (data-contract identity) and `cache`
325
- * (reuse outcome) are required wire fields on this schema.
323
+ * Canonical failure codes for the in-result `ggui_render` failure
324
+ * envelope (SPEC §7.9 Plane 3). Closed enum — a failed render's
325
+ * `error.code` is always one of these four; finer-grained diagnostics
326
+ * ride on `error.message`.
327
+ *
328
+ * - `PRODUCTION_FAILED` — generation ran but did not produce a
329
+ * component (LLM/compile/commit failure).
330
+ * - `VALIDATION_ERROR` — a server-side precondition rejected the
331
+ * render before generation could run (misconfigured generation
332
+ * route, unusable stored config).
333
+ * - `NO_PLATFORM_KEY` — the server's managed provider-key
334
+ * configuration has no key for the resolved route.
335
+ * - `NO_CREDENTIALS` — no generation credentials are configured on
336
+ * the server at all.
337
+ */
338
+ export declare const renderErrorCodeSchema: z.ZodEnum<{
339
+ PRODUCTION_FAILED: "PRODUCTION_FAILED";
340
+ VALIDATION_ERROR: "VALIDATION_ERROR";
341
+ NO_PLATFORM_KEY: "NO_PLATFORM_KEY";
342
+ NO_CREDENTIALS: "NO_CREDENTIALS";
343
+ }>;
344
+ /**
345
+ * In-result failure marker for `ggui_render`. Present on the wire
346
+ * output iff the tool result is `isError: true` — the structuredContent
347
+ * stays schema-conformant on failures, and this field carries the
348
+ * canonical failure classification.
349
+ */
350
+ export declare const renderErrorSchema: z.ZodObject<{
351
+ code: z.ZodEnum<{
352
+ PRODUCTION_FAILED: "PRODUCTION_FAILED";
353
+ VALIDATION_ERROR: "VALIDATION_ERROR";
354
+ NO_PLATFORM_KEY: "NO_PLATFORM_KEY";
355
+ NO_CREDENTIALS: "NO_CREDENTIALS";
356
+ }>;
357
+ message: z.ZodString;
358
+ }, z.core.$strip>;
359
+ /**
360
+ * Wire-output shape — `{sessionId, resourceUri?, action, contractHash,
361
+ * cache, error?, nextStep?}`. `contractHash` (data-contract identity)
362
+ * and `cache` (reuse outcome) are required wire fields on this schema.
326
363
  * The handler carries `shortCode`, `codeReady`, `handshakeId`,
327
364
  * `decision`, `contract`, `codeUrl`, `codeHash`
328
365
  * on its internal `RenderOutput` TS shape for telemetry / post-classify
@@ -336,12 +373,18 @@ export declare const renderCacheMarkerSchema: z.ZodObject<{
336
373
  * `render-resource/...`). Leaving a dead URL on the wire had the model
337
374
  * hallucinating links that resolve nowhere.
338
375
  *
376
+ * Failure envelope (SPEC §7.1): a failed/rejected generation returns
377
+ * this same schema-conformant shape on an `isError: true` tool result —
378
+ * `error` present, `resourceUri` absent (nothing mountable), no
379
+ * `_meta` on the result. The error GguiSession is still committed, so
380
+ * `sessionId` remains a live handle into the session channel.
381
+ *
339
382
  * Post-Phase-B the `'compose'` action enum value is gone — there is no
340
383
  * stack of N renders to compose against.
341
384
  */
342
385
  export declare const renderOutputSchema: z.ZodObject<{
343
386
  sessionId: z.ZodString;
344
- resourceUri: z.ZodString;
387
+ resourceUri: z.ZodOptional<z.ZodString>;
345
388
  action: z.ZodEnum<{
346
389
  replace: "replace";
347
390
  create: "create";
@@ -363,6 +406,15 @@ export declare const renderOutputSchema: z.ZodObject<{
363
406
  }>>;
364
407
  reason: z.ZodOptional<z.ZodString>;
365
408
  }, z.core.$strip>;
409
+ error: z.ZodOptional<z.ZodObject<{
410
+ code: z.ZodEnum<{
411
+ PRODUCTION_FAILED: "PRODUCTION_FAILED";
412
+ VALIDATION_ERROR: "VALIDATION_ERROR";
413
+ NO_PLATFORM_KEY: "NO_PLATFORM_KEY";
414
+ NO_CREDENTIALS: "NO_CREDENTIALS";
415
+ }>;
416
+ message: z.ZodString;
417
+ }, z.core.$strip>>;
366
418
  nextStep: z.ZodOptional<z.ZodObject<{
367
419
  tool: z.ZodLiteral<"ggui_consume">;
368
420
  description: z.ZodString;
@@ -426,6 +478,7 @@ export declare const updateInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
426
478
  export declare const updateOutputSchema: z.ZodObject<{
427
479
  sessionId: z.ZodString;
428
480
  updated: z.ZodBoolean;
481
+ resourceUri: z.ZodString;
429
482
  }, z.core.$strip>;
430
483
  /**
431
484
  * `ggui_runtime_declare_tool_catalog` — the host runtime declares its
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/schemas/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,cAAc;;;iBAGzB,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUnB,CAAC;AAYjB;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;CAgBpB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;iBAA8B,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;iBAA2B,CAAC;AAExD,eAAO,MAAM,oBAAoB;;CAKvB,CAAC;AAEX,eAAO,MAAM,qBAAqB;;iBAAiC,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,IAAc,CAAC;AAE5D,eAAO,MAAM,iCAAiC,gCAE7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;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,gBAAgB;;IAO3B;;;;;;;;OAQG;;IAEH;;;;;OAKG;;IAQH;;;;;;;;;;OAUG;;;;IAaH;;;;;;;;;;;OAWG;;;;;CAuBK,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;iBAA6B,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;iBAyBlC,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB;;;;;EAKhC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;iBAS5B,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwE7B,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;4BAa5B,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB;;;;iBAW7B,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,6BAA6B;;;;;kBAW/B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;kBAKhC,CAAC"}
@@ -381,9 +381,43 @@ export const renderCacheMarkerSchema = z.object({
381
381
  .describe('Compact human-readable explanation of the cache outcome — why this render reused a stored component or generated cold. Diagnostic; default-available without the verbose env-gated trace.'),
382
382
  });
383
383
  /**
384
- * Wire-output shape — `{sessionId, resourceUri, action, contractHash,
385
- * cache, nextStep?}`. `contractHash` (data-contract identity) and `cache`
386
- * (reuse outcome) are required wire fields on this schema.
384
+ * Canonical failure codes for the in-result `ggui_render` failure
385
+ * envelope (SPEC §7.9 Plane 3). Closed enum — a failed render's
386
+ * `error.code` is always one of these four; finer-grained diagnostics
387
+ * ride on `error.message`.
388
+ *
389
+ * - `PRODUCTION_FAILED` — generation ran but did not produce a
390
+ * component (LLM/compile/commit failure).
391
+ * - `VALIDATION_ERROR` — a server-side precondition rejected the
392
+ * render before generation could run (misconfigured generation
393
+ * route, unusable stored config).
394
+ * - `NO_PLATFORM_KEY` — the server's managed provider-key
395
+ * configuration has no key for the resolved route.
396
+ * - `NO_CREDENTIALS` — no generation credentials are configured on
397
+ * the server at all.
398
+ */
399
+ export const renderErrorCodeSchema = z.enum([
400
+ 'PRODUCTION_FAILED',
401
+ 'VALIDATION_ERROR',
402
+ 'NO_PLATFORM_KEY',
403
+ 'NO_CREDENTIALS',
404
+ ]);
405
+ /**
406
+ * In-result failure marker for `ggui_render`. Present on the wire
407
+ * output iff the tool result is `isError: true` — the structuredContent
408
+ * stays schema-conformant on failures, and this field carries the
409
+ * canonical failure classification.
410
+ */
411
+ export const renderErrorSchema = z.object({
412
+ code: renderErrorCodeSchema.describe('Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server\'s managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server.'),
413
+ message: z
414
+ .string()
415
+ .describe('Human-readable failure detail — fold into the next attempt or surface to the operator.'),
416
+ });
417
+ /**
418
+ * Wire-output shape — `{sessionId, resourceUri?, action, contractHash,
419
+ * cache, error?, nextStep?}`. `contractHash` (data-contract identity)
420
+ * and `cache` (reuse outcome) are required wire fields on this schema.
387
421
  * The handler carries `shortCode`, `codeReady`, `handshakeId`,
388
422
  * `decision`, `contract`, `codeUrl`, `codeHash`
389
423
  * on its internal `RenderOutput` TS shape for telemetry / post-classify
@@ -397,6 +431,12 @@ export const renderCacheMarkerSchema = z.object({
397
431
  * `render-resource/...`). Leaving a dead URL on the wire had the model
398
432
  * hallucinating links that resolve nowhere.
399
433
  *
434
+ * Failure envelope (SPEC §7.1): a failed/rejected generation returns
435
+ * this same schema-conformant shape on an `isError: true` tool result —
436
+ * `error` present, `resourceUri` absent (nothing mountable), no
437
+ * `_meta` on the result. The error GguiSession is still committed, so
438
+ * `sessionId` remains a live handle into the session channel.
439
+ *
400
440
  * Post-Phase-B the `'compose'` action enum value is gone — there is no
401
441
  * stack of N renders to compose against.
402
442
  */
@@ -409,8 +449,15 @@ export const renderOutputSchema = z.object({
409
449
  * tool_results (OpenAI Agents SDK, Google ADK) reach the mount URI;
410
450
  * SDKs that preserve `_meta` see the same value on both fields.
411
451
  * Mirrors the `resourceUri` field on `ggui_update`'s output.
452
+ *
453
+ * OPTIONAL — present iff the render is mountable. Absent on the
454
+ * failure envelope (`error` present): a failed render commits an
455
+ * error GguiSession but exposes no mount affordance.
412
456
  */
413
- resourceUri: z.string(),
457
+ resourceUri: z
458
+ .string()
459
+ .optional()
460
+ .describe('MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render.'),
414
461
  action: z.enum(['create', 'reuse', 'update', 'replace', 'declined']),
415
462
  contractHash: z
416
463
  .string()
@@ -422,6 +469,15 @@ export const renderOutputSchema = z.object({
422
469
  .string()
423
470
  .describe('Canonical hash of the design-time variance (persona, aesthetic, seed prompt, context). With contractHash it forms the reuse key: the same pair reuses one component; a different variant of the same contract gets its own.'),
424
471
  cache: renderCacheMarkerSchema.describe('Reuse outcome for this render: whether a stored component was served, its similarity, the matched component id, and how many generation calls that avoided.'),
472
+ /**
473
+ * In-result failure marker — present iff the tool result is
474
+ * `isError: true`. The structuredContent stays schema-conformant on
475
+ * failures; this field carries the canonical `{code, message}`
476
+ * classification. Absent on every successful render.
477
+ */
478
+ error: renderErrorSchema
479
+ .optional()
480
+ .describe('Present iff the tool result is isError — canonical {code, message} for a failed/rejected generation. Absent on success.'),
425
481
  /**
426
482
  * Wire-shape recovery hint for the next call. Emitted ONLY when the
427
483
  * rendered contract has a non-empty `actionSpec` — i.e. the agent will
@@ -502,6 +558,14 @@ export const updateInputSchema = z.discriminatedUnion('kind', [
502
558
  export const updateOutputSchema = z.object({
503
559
  sessionId: z.string(),
504
560
  updated: z.boolean(),
561
+ /**
562
+ * Unchanged from the initial render — the same `ui://ggui/render/{id}`
563
+ * URI the mount stamped. Mirrored on the LLM-visible structuredContent
564
+ * so SDKs that strip `_meta` from tool_results can still reach the
565
+ * mount URI. Kept in sync with the update handler's wire shape —
566
+ * this export and the handler's inline schema must not drift.
567
+ */
568
+ resourceUri: z.string(),
505
569
  });
506
570
  /**
507
571
  * `ggui_runtime_declare_tool_catalog` — the host runtime declares its
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Zod input + output schemas for the operator-class blueprint tools.
3
- * Four tools, all `audience: 'ops'`, all served on `/ops`:
3
+ * Four tools, all `audience: 'ops'`, all served on `/control`:
4
4
  *
5
5
  * - `ggui_ops_generate_blueprint` — author a new blueprint by
6
6
  * dispatching through the registry's selected generator and
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Zod input + output schemas for the operator-class blueprint tools.
3
- * Four tools, all `audience: 'ops'`, all served on `/ops`:
3
+ * Four tools, all `audience: 'ops'`, all served on `/control`:
4
4
  *
5
5
  * - `ggui_ops_generate_blueprint` — author a new blueprint by
6
6
  * dispatching through the registry's selected generator and
@@ -51,11 +51,11 @@
51
51
  * ready.
52
52
  */
53
53
  export declare const MODELS: {
54
- readonly anthropic: readonly ["claude-haiku-4-5-20251001", "claude-sonnet-4-6", "claude-opus-4-7", "claude-opus-4-6"];
55
- readonly openai: readonly ["gpt-5.5", "gpt-5.5-2026-04-23", "gpt-5.5-pro", "gpt-5.5-pro-2026-04-23", "gpt-5.4", "gpt-5.4-2026-03-05", "gpt-5.4-mini", "gpt-5.4-mini-2026-03-17", "gpt-5.4-nano", "gpt-5.4-nano-2026-03-17", "gpt-5.3-codex"];
56
- readonly google: readonly ["gemini-3.5-flash", "gemini-flash-latest", "gemini-3.1-flash-lite", "gemini-3.1-pro-preview", "gemini-3.1-flash-lite-preview", "gemini-3-flash-preview"];
54
+ readonly anthropic: readonly ["claude-fable-5", "claude-opus-5", "claude-sonnet-5", "claude-haiku-4-5-20251001", "claude-sonnet-4-6", "claude-opus-4-7", "claude-opus-4-6"];
55
+ readonly openai: readonly ["gpt-5.6", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.5-2026-04-23", "gpt-5.5-pro", "gpt-5.5-pro-2026-04-23", "gpt-5.4", "gpt-5.4-2026-03-05", "gpt-5.4-mini", "gpt-5.4-mini-2026-03-17", "gpt-5.4-nano", "gpt-5.4-nano-2026-03-17", "gpt-5.3-codex"];
56
+ readonly google: readonly ["gemini-3.6-flash", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-flash-latest", "gemini-3.1-flash-lite", "gemini-3.1-pro-preview", "gemini-3.1-flash-lite-preview", "gemini-3-flash-preview"];
57
57
  readonly bedrock: readonly ["us.anthropic.claude-haiku-4-5-20251001-v1:0", "eu.anthropic.claude-haiku-4-5-20251001-v1:0", "apac.anthropic.claude-haiku-4-5-20251001-v1:0", "global.anthropic.claude-haiku-4-5-20251001-v1:0", "us.anthropic.claude-sonnet-4-6", "eu.anthropic.claude-sonnet-4-6", "apac.anthropic.claude-sonnet-4-6", "us.anthropic.claude-opus-4-7", "eu.anthropic.claude-opus-4-7", "apac.anthropic.claude-opus-4-7", "global.anthropic.claude-opus-4-7", "us.anthropic.claude-opus-4-6-v1"];
58
- readonly openrouter: readonly ["anthropic/claude-haiku-4.5", "anthropic/claude-sonnet-4.6", "anthropic/claude-opus-4.7", "openai/gpt-5.5", "openai/gpt-5.5-pro", "openai/gpt-5.4-mini", "openai/gpt-5.4-nano", "google/gemini-3.5-flash", "google/gemini-3.1-pro-preview", "google/gemini-3.1-flash-lite", "x-ai/grok-4.3", "meta-llama/llama-4-maverick", "meta-llama/llama-3.3-70b-instruct", "deepseek/deepseek-v4-pro", "deepseek/deepseek-r1-0528", "qwen/qwen3.7-max", "qwen/qwen3-coder", "mistralai/mistral-large-2512", "openai/gpt-oss-120b"];
58
+ readonly openrouter: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-5", "anthropic/claude-sonnet-5", "anthropic/claude-haiku-4.5", "anthropic/claude-sonnet-4.6", "anthropic/claude-opus-4.7", "openai/gpt-5.6-sol", "openai/gpt-5.6-terra", "openai/gpt-5.6-luna", "openai/gpt-5.5", "openai/gpt-5.5-pro", "openai/gpt-5.4-mini", "openai/gpt-5.4-nano", "google/gemini-3.6-flash", "google/gemini-3.5-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-pro-preview", "google/gemini-3.1-flash-lite", "x-ai/grok-4.3", "meta-llama/llama-4-maverick", "meta-llama/llama-3.3-70b-instruct", "deepseek/deepseek-v4-pro", "deepseek/deepseek-r1-0528", "qwen/qwen3.7-max", "qwen/qwen3-coder", "mistralai/mistral-large-2512", "openai/gpt-oss-120b"];
59
59
  };
60
60
  /**
61
61
  * Every supported LLM provider. Adding a new provider = add a key to
@@ -1 +1 @@
1
- {"version":3,"file":"llm-route.d.ts","sourceRoot":"","sources":["../../src/types/llm-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,MAAM;;;;;;CA2GT,CAAC;AAMX;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,MAAM,CAAC;AAE9C;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,SAC1C,YAAY,GACZ,SAAS,GACT,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAC/B,YAAY,CAAC,CAAC,CAAC,CAAC;AA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AG,OAAO,CAMtD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CASxE;AAiBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAEzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAQjE;AA8CD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAgB7D;AAuBD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAKvD;AAmBD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAE3D"}
@@ -57,8 +57,12 @@ export const MODELS = {
57
57
  anthropic: [
58
58
  // Wire-canonical IDs accepted by api.anthropic.com/v1/messages.
59
59
  // Per Anthropic's official models doc (claude.com/docs/about-claude/models/overview):
60
- // 4.6/4.7 generation dropped the date suffix in the wire ID;
61
- // Haiku 4.5 still uses the dated form.
60
+ // the Claude 5 family (2026-07: Opus 5, Sonnet 5, and the
61
+ // Mythos-class Fable 5) and the 4.6/4.7 generation carry undated
62
+ // wire IDs; Haiku 4.5 still uses the dated form.
63
+ 'claude-fable-5',
64
+ 'claude-opus-5',
65
+ 'claude-sonnet-5',
62
66
  'claude-haiku-4-5-20251001',
63
67
  'claude-sonnet-4-6',
64
68
  'claude-opus-4-7',
@@ -68,6 +72,14 @@ export const MODELS = {
68
72
  // Per OpenAI's model registry (developers.openai.com/api/docs/models/all).
69
73
  // Both unversioned aliases AND dated snapshots are valid wire IDs;
70
74
  // we enumerate both because operators reasonably use either.
75
+ // GPT-5.6 family (2026-07): named-suffix tiers — `sol` (deepest
76
+ // reasoning), `terra` (balanced), `luna` (fast/cost). The bare
77
+ // `gpt-5.6` alias routes to Sol on OpenAI's side. No dated
78
+ // siblings registered at adoption time.
79
+ 'gpt-5.6',
80
+ 'gpt-5.6-sol',
81
+ 'gpt-5.6-terra',
82
+ 'gpt-5.6-luna',
71
83
  'gpt-5.5',
72
84
  'gpt-5.5-2026-04-23',
73
85
  'gpt-5.5-pro',
@@ -85,7 +97,9 @@ export const MODELS = {
85
97
  // Stable + the commonly-used previews. The `-preview` suffix is
86
98
  // load-bearing on the wire for preview models — Gemini's API
87
99
  // rejects the bare name for those.
100
+ 'gemini-3.6-flash',
88
101
  'gemini-3.5-flash',
102
+ 'gemini-3.5-flash-lite',
89
103
  'gemini-flash-latest',
90
104
  'gemini-3.1-flash-lite',
91
105
  'gemini-3.1-pro-preview',
@@ -131,16 +145,24 @@ export const MODELS = {
131
145
  // for Anthropic version (`claude-haiku-4.5`) where Anthropic direct
132
146
  // uses dash (`claude-haiku-4-5`) — preserve OpenRouter's wire form.
133
147
  // Anthropic family
148
+ 'anthropic/claude-fable-5',
149
+ 'anthropic/claude-opus-5',
150
+ 'anthropic/claude-sonnet-5',
134
151
  'anthropic/claude-haiku-4.5',
135
152
  'anthropic/claude-sonnet-4.6',
136
153
  'anthropic/claude-opus-4.7',
137
154
  // OpenAI family
155
+ 'openai/gpt-5.6-sol',
156
+ 'openai/gpt-5.6-terra',
157
+ 'openai/gpt-5.6-luna',
138
158
  'openai/gpt-5.5',
139
159
  'openai/gpt-5.5-pro',
140
160
  'openai/gpt-5.4-mini',
141
161
  'openai/gpt-5.4-nano',
142
162
  // Google family
163
+ 'google/gemini-3.6-flash',
143
164
  'google/gemini-3.5-flash',
165
+ 'google/gemini-3.5-flash-lite',
144
166
  'google/gemini-3.1-pro-preview',
145
167
  'google/gemini-3.1-flash-lite',
146
168
  // Frontier alternatives
@@ -1,7 +1,7 @@
1
1
  import type { z } from 'zod';
2
2
  import type { JsonObject, JsonSchema, JsonValue } from './data-contract';
3
3
  import type { GguiSession, GguiSessionStatus } from './render';
4
- import type { consumeInputSchema, getSessionInputSchema, handshakeInputSchema, handshakeOutputSchema, renderBlueprintInputSchema, renderCacheMarkerSchema, renderInputSchema, renderOutputSchema, requestCredentialInputSchema, searchBlueprintsInputSchema, updateInputSchema, updateOutputSchema, declareToolCatalogOutputSchema } from '../schemas/mcp';
4
+ import type { consumeInputSchema, getSessionInputSchema, handshakeInputSchema, handshakeOutputSchema, renderBlueprintInputSchema, renderCacheMarkerSchema, renderErrorCodeSchema, renderErrorSchema, renderInputSchema, renderOutputSchema, requestCredentialInputSchema, searchBlueprintsInputSchema, updateInputSchema, updateOutputSchema, declareToolCatalogOutputSchema } from '../schemas/mcp';
5
5
  export type { GguiSessionStatus } from './render';
6
6
  /** Target screen size category for responsive layout */
7
7
  export type Screen = 'mobile' | 'tablet' | 'desktop' | 'universal';
@@ -387,6 +387,17 @@ export type GguiRenderOutput = z.infer<typeof renderOutputSchema>;
387
387
  * {@link renderCacheMarkerSchema} — the schema is the source of truth.
388
388
  */
389
389
  export type RenderCacheMarker = z.infer<typeof renderCacheMarkerSchema>;
390
+ /**
391
+ * Canonical failure code for the in-result `ggui_render` failure
392
+ * envelope (SPEC §7.9 Plane 3). Derived from
393
+ * {@link renderErrorCodeSchema} — the schema is the source of truth.
394
+ */
395
+ export type RenderErrorCode = z.infer<typeof renderErrorCodeSchema>;
396
+ /**
397
+ * In-result failure marker on `GguiRenderOutput.error` — present iff the
398
+ * tool result is `isError: true`. Derived from {@link renderErrorSchema}.
399
+ */
400
+ export type RenderError = z.infer<typeof renderErrorSchema>;
390
401
  export type GguiUpdateInput = z.infer<typeof updateInputSchema>;
391
402
  export type GguiUpdateOutput = z.infer<typeof updateOutputSchema>;
392
403
  /**
@@ -399,6 +410,14 @@ export type GguiUpdateOutput = z.infer<typeof updateOutputSchema>;
399
410
  export type DeclareToolCatalogOutput = z.infer<typeof declareToolCatalogOutputSchema>;
400
411
  /**
401
412
  * Core protocol error codes (per spec Section 7.9)
413
+ *
414
+ * `-32004` is RETIRED-RESERVED: it was assigned to `PRODUCTION_FAILED`,
415
+ * a phantom code no first-party implementation ever emitted as a
416
+ * JSON-RPC error. `PRODUCTION_FAILED` is now an in-result tool-error
417
+ * code on the `ggui_render` failure envelope (SPEC §7.9 Plane 3 /
418
+ * §7.1; see {@link RenderErrorCode}). The slot stays unassigned so a
419
+ * future canonical code can't silently collide with stale consumers —
420
+ * new canonical codes come at `-32006` onwards.
402
421
  */
403
422
  export declare const MCP_ERROR_CODES: {
404
423
  readonly PARSE_ERROR: -32700;
@@ -409,7 +428,6 @@ export declare const MCP_ERROR_CODES: {
409
428
  readonly UNAUTHORIZED: -32001;
410
429
  readonly SESSION_NOT_FOUND: -32002;
411
430
  readonly APP_NOT_FOUND: -32003;
412
- readonly PRODUCTION_FAILED: -32004;
413
431
  readonly CAPABILITY_DENIED: -32005;
414
432
  };
415
433
  /**
@@ -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,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,EAC/B,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAQlD,wDAAwD;AACxD,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QA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,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAMtF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;CAWlB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC"}
package/dist/types/mcp.js CHANGED
@@ -3,6 +3,14 @@
3
3
  // =============================================================================
4
4
  /**
5
5
  * Core protocol error codes (per spec Section 7.9)
6
+ *
7
+ * `-32004` is RETIRED-RESERVED: it was assigned to `PRODUCTION_FAILED`,
8
+ * a phantom code no first-party implementation ever emitted as a
9
+ * JSON-RPC error. `PRODUCTION_FAILED` is now an in-result tool-error
10
+ * code on the `ggui_render` failure envelope (SPEC §7.9 Plane 3 /
11
+ * §7.1; see {@link RenderErrorCode}). The slot stays unassigned so a
12
+ * future canonical code can't silently collide with stale consumers —
13
+ * new canonical codes come at `-32006` onwards.
6
14
  */
7
15
  export const MCP_ERROR_CODES = {
8
16
  PARSE_ERROR: -32700,
@@ -10,11 +18,10 @@ export const MCP_ERROR_CODES = {
10
18
  METHOD_NOT_FOUND: -32601,
11
19
  INVALID_PARAMS: -32602,
12
20
  INTERNAL_ERROR: -32603,
13
- // Protocol-specific error codes
21
+ // Protocol-specific error codes (-32004 retired-reserved — see above)
14
22
  UNAUTHORIZED: -32001,
15
23
  SESSION_NOT_FOUND: -32002,
16
24
  APP_NOT_FOUND: -32003,
17
- PRODUCTION_FAILED: -32004,
18
25
  CAPABILITY_DENIED: -32005,
19
26
  };
20
27
  /**
@@ -40,6 +40,14 @@ export interface PortableBlueprint {
40
40
  * protocol shape.
41
41
  */
42
42
  readonly generatorProtocolVersion: string;
43
+ /**
44
+ * Intent prose the blueprint was registered under — the semantic
45
+ * (Tier-2) matching input at the import side. Optional: artifacts
46
+ * exported before this field existed still import, with the
47
+ * importer deriving intent from its own fallbacks. When present it
48
+ * MUST be non-empty.
49
+ */
50
+ readonly intent?: string;
43
51
  /**
44
52
  * SHA256(16) of the tool-identity catalog used to canonicalize
45
53
  * `contract` at export. Importers re-canonicalize against their own
@@ -1 +1 @@
1
- {"version":3,"file":"portable-blueprint.d.ts","sourceRoot":"","sources":["../../src/types/portable-blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,aAAa,EAAE,OAAO,iCAAiC,CAAC;IACjE,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,iBAA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ilityPermissions, QualityMetadata } from './capabilities';
2
1
  import type { KNOWN_PERMISSION_NAMES } from '../validation/hygiene-rules';
3
2
  import type { PropsSpec, StreamSpec, ActionSpec, ContextSpec, ClientCapabilitiesSpec, GadgetDescriptor, JsonSchema, JsonObject } from './data-contract';
4
3
  import type { EndUserIdentity } from './auth';
@@ -182,10 +181,6 @@ export interface ComponentGguiSession<TProps = JsonObject> extends GguiSessionBa
182
181
  readonly message?: string;
183
182
  /** JSON Schema for validating user-submitted form data. */
184
183
  readonly schema?: JsonSchema;
185
- /** Capability permissions granted to this component. */
186
- readonly capabilities?: CapabilityPermissions;
187
- /** Quality evaluation metadata. */
188
- readonly quality?: QualityMetadata;
189
184
  /** Generation error message (populated on failure). */
190
185
  readonly error?: string;
191
186
  /** Stream contract — describes what data the component accepts in
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/types/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AA6BnE;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAC7B,gBAAgB,GAChB,gBAAgB,GAEhB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB;;GAEG;AACH,MAAM,MAA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,27 @@ export interface UIGenerationResponse {
48
48
  /**
49
49
  * Error during UI generation.
50
50
  * The `details` field is {@link JsonValue} to carry any JSON-safe diagnostic data.
51
+ *
52
+ * `code` vocabulary:
53
+ *
54
+ * - `PRODUCTION_FAILED` — the generation pipeline ran but did not
55
+ * produce a component.
56
+ * - `COMPILATION_ERROR` — produced code failed to compile. Maps to
57
+ * the canonical `PRODUCTION_FAILED` on the render failure envelope
58
+ * (it is a finer-grained production failure, not a distinct wire
59
+ * class).
60
+ * - `VALIDATION_ERROR` — an input/config precondition rejected the
61
+ * generation before the LLM was called.
62
+ * - `NO_PLATFORM_KEY` — the server's managed provider-key
63
+ * configuration has no key for the resolved route.
64
+ * - `NO_CREDENTIALS` — no generation credentials are configured on
65
+ * the server.
66
+ *
67
+ * The last four map 1:1 onto the render failure envelope's canonical
68
+ * codes (`renderErrorCodeSchema` in `schemas/mcp.ts`).
51
69
  */
52
70
  export interface GenerationError {
53
- code: 'PRODUCTION_FAILED' | 'COMPILATION_ERROR' | 'VALIDATION_ERROR';
71
+ code: 'PRODUCTION_FAILED' | 'COMPILATION_ERROR' | 'VALIDATION_ERROR' | 'NO_PLATFORM_KEY' | 'NO_CREDENTIALS';
54
72
  message: string;
55
73
  /** Additional diagnostic information. Typed as {@link JsonValue} (any JSON-safe value). */
56
74
  details?: JsonValue;
@@ -1 +1 @@
1
- {"version":3,"file":"ui-generator.d.ts","sourceRoot":"","sources":["../../src/types/ui-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAS,EACV,MAAM,iBAAiB,CAAC;AAEzB;;;GAGG;AACH,MAAM,WAAW,mBAAmB,CAAC,QAAQ,GAAG,UAAU;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED;;;;;;;;GAQG;AAC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,CAAC;IAChB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB"}
package/dist/version.d.ts CHANGED
@@ -6,6 +6,123 @@
6
6
  * schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
7
7
  *
8
8
  * --------------------------------------------------------------------
9
+ * Ops-tool console-parity slice (2026-07-29, BREAKING on the ops
10
+ * surface only, pre-launch, ggui#400). Rename ledger — same treatment
11
+ * as the `ggui_ops_register_blueprint` → `ggui_ops_save_library_blueprint`
12
+ * split and the r4.1 `ggui_runtime_refresh_bootstrap` retirement:
13
+ *
14
+ * op1. **`ggui_ops_rename_app` + `ggui_ops_update_app_system_prompt`
15
+ * → consolidated `ggui_ops_update_app`.** One partial-update tool
16
+ * carries `displayName?` + `systemPrompt?` + `rateLimitPerMinute?`
17
+ * (at least one required). Clearing sentinels: `systemPrompt: ''`
18
+ * clears the override (unchanged semantics); `rateLimitPerMinute:
19
+ * 0` clears the limit — the console client's empty/0 → null
20
+ * normalization moves server-side so the stored column keeps ONE
21
+ * "unlimited" representation. Both old wire names are appended to
22
+ * the mcp-server RETIRED_TOOL_NAMES regression lock. No shims,
23
+ * pre-launch delete-in-same-slice.
24
+ *
25
+ * op2. **New ops wire names** (additive): `ggui_ops_set_app_theme`
26
+ * (validates with the protocol's `appThemeSchema` — the same
27
+ * validator every `GguiApp.theme` write surface runs),
28
+ * `ggui_ops_rename_org` (owner-or-admin), `ggui_ops_remove_org_member`
29
+ * (role-matrix enforced; owner never removable),
30
+ * `ggui_ops_get_org_balance` (any-member read, allowlisted in
31
+ * SINGLE_CALL_OPS), and the app-scoped `appId?` argument on
32
+ * `ggui_ops_set_provider_key` / `ggui_ops_remove_provider_key`
33
+ * (optional seam — deployments without app-scoped key storage
34
+ * reject it with `app_scoped_keys_unavailable`).
35
+ *
36
+ * op3. **My-blueprint curation trio** (additive, cloud-deployment
37
+ * tools beside `ggui_ops_list_my_blueprints`):
38
+ * `ggui_ops_update_my_blueprint` (rename + description/tags;
39
+ * canonical kebab-case blueprint-name rule),
40
+ * `ggui_ops_delete_my_blueprint`, and
41
+ * `ggui_ops_get_my_blueprint_source` (returns the stored
42
+ * `{source, contract?, fixtureProps?}` definition envelope;
43
+ * allowlisted in SINGLE_CALL_OPS).
44
+ *
45
+ * Conformance-kit verdict: ops tools are not conformance-kit surface —
46
+ * NO protocol stamp roll. Recorded here because retired wire names are
47
+ * ledgered (retired-tool-names regression lock mirrors this entry).
48
+ *
49
+ * --------------------------------------------------------------------
50
+ * Dead capability/quality vocabulary deleted (2026-07-27, pre-launch,
51
+ * ggui#394). `CapabilityPermissions`, `ComponentCapability`, and
52
+ * `QualityMetadata` are removed from the package's public API, along
53
+ * with the never-populated `capabilities?` / `quality?` fields on
54
+ * `ComponentGguiSession` (types/capabilities.ts deleted).
55
+ *
56
+ * cp1. Census before delete: zero producers, zero consumers — the
57
+ * only reference in the repo was the type-level field
58
+ * declaration itself. The `capabilities` name was ALREADY
59
+ * retired contract vocabulary (RETIRED_CONTRACT_FIELDS,
60
+ * hygiene-rules.ts) and hard-rejected at the render/handshake
61
+ * seams, so the surviving session-layer type contradicted the
62
+ * shipped posture.
63
+ * cp2. Not wired into `_meta.ui.csp` because no lossless mapping
64
+ * exists: the live CSP model is origin LISTS derived from
65
+ * publicBaseUrl + gadget descriptors; a six-verb grant list
66
+ * carries no origin data, and hardware grants already flow
67
+ * through per-gadget `permission` → Permissions-Policy.
68
+ * cp3. Quality evaluation stays internal to @ggui-ai/ui-gen (its own
69
+ * local QualityMetadata in evaluation/types.ts is untouched);
70
+ * the protocol carries no scores because nothing downstream of
71
+ * commit consumes them.
72
+ *
73
+ * Conformance-kit verdict: no wire-shape change (nothing ever emitted
74
+ * these fields) — PROTOCOL_VERSION unchanged. Package-API removal
75
+ * only, licensed by the pre-launch no-backward-compat rule.
76
+ *
77
+ * --------------------------------------------------------------------
78
+ * Render failure envelope — in-result isError tool errors (2026-07-23,
79
+ * BREAKING, pre-launch). Ruling B. A `ggui_render` that fails or is
80
+ * rejected is a `tools/call` RESULT carrying `isError: true` — never a
81
+ * thrown JSON-RPC error. Before this, failures returned a
82
+ * SUCCESS-shaped envelope: an accident of the 2026-05-14 codeReady
83
+ * byte-trim, not a design, which mounted error renders as blank divs
84
+ * and let render meters count failures as billable.
85
+ *
86
+ * rb1. Failures stay SCHEMA-CONFORMANT. MCP SDK clients validate
87
+ * `structuredContent` against `outputSchema` even when
88
+ * `isError` is set, so the failure envelope must satisfy
89
+ * `renderOutputSchema` — it is not a free-form error shape.
90
+ * SPEC §7.1 / §7.9 Plane 3.
91
+ * rb2. `renderOutputSchema` gains optional `error: {code, message}`,
92
+ * present iff `isError`. `code` is the closed enum
93
+ * `RenderErrorCode` = PRODUCTION_FAILED | VALIDATION_ERROR |
94
+ * NO_PLATFORM_KEY | NO_CREDENTIALS; `message` is agent-facing
95
+ * guidance, not a stack.
96
+ * rb3. `resourceUri` becomes OPTIONAL — present iff the render is
97
+ * mountable. A failure carries no resource, so consumers must
98
+ * stop assuming presence. `updateOutputSchema` was synced for
99
+ * the same stripped-field class.
100
+ * rb4. The phantom JSON-RPC error code -32004 (PRODUCTION_FAILED) is
101
+ * RETIRED from `MCP_ERROR_CODES`. It was never emitted; the
102
+ * in-result contract above replaces it.
103
+ * rb5. NO `_meta` on failures (nothing to project), and the error
104
+ * session still COMMITS — the handshakeId is consumed, so
105
+ * recovery is re-handshake, not retry.
106
+ *
107
+ * Conformance-kit verdict: minor-intent while `draft-`, so
108
+ * PROTOCOL_VERSION is unchanged and no migration doc is required (see
109
+ * docs/protocol/VERSION-POLICY.md). Recorded here because the wire
110
+ * shape changed even though the stamp did not.
111
+ *
112
+ * Stamp adjudication (re-examined 2026-07-27, pre-beta audit): the
113
+ * "two failure contracts share one stamp" concern was weighed and the
114
+ * stamp DELIBERATELY not rolled. PROTOCOL_VERSION gates the WS
115
+ * subscribe handshake (versionPolicy default 'reject' — a mismatch
116
+ * CLOSES the connection), and ruling B changed the MCP tools/call
117
+ * result surface while leaving every WS envelope untouched. Rolling
118
+ * the stamp would have forced a lockstep UPGRADE_REQUIRED break on
119
+ * every client pinned to 0.4.0-rc.0 at the next server deploy, to
120
+ * version a layer that did not change. MCP-path failure-contract
121
+ * discovery is by package version (exact pins are the pre-launch
122
+ * consumer contract), not by wire handshake. The stamp next moves
123
+ * when the WS envelope layer itself changes, or at the v1.0 freeze.
124
+ *
125
+ * --------------------------------------------------------------------
9
126
  * Consolidated cleanliness release (2026-06-12, BREAKING, pre-launch).
10
127
  * Four strands from the 2026-06-12 cleanliness + orphan audits, every
11
128
  * finding adversarially re-verified before action: the dv* entries
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAq7EG;AACH,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,uBAAuB,qBAAmB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAErD,CAAC"}
package/dist/version.js CHANGED
@@ -6,6 +6,123 @@
6
6
  * schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
7
7
  *
8
8
  * --------------------------------------------------------------------
9
+ * Ops-tool console-parity slice (2026-07-29, BREAKING on the ops
10
+ * surface only, pre-launch, ggui#400). Rename ledger — same treatment
11
+ * as the `ggui_ops_register_blueprint` → `ggui_ops_save_library_blueprint`
12
+ * split and the r4.1 `ggui_runtime_refresh_bootstrap` retirement:
13
+ *
14
+ * op1. **`ggui_ops_rename_app` + `ggui_ops_update_app_system_prompt`
15
+ * → consolidated `ggui_ops_update_app`.** One partial-update tool
16
+ * carries `displayName?` + `systemPrompt?` + `rateLimitPerMinute?`
17
+ * (at least one required). Clearing sentinels: `systemPrompt: ''`
18
+ * clears the override (unchanged semantics); `rateLimitPerMinute:
19
+ * 0` clears the limit — the console client's empty/0 → null
20
+ * normalization moves server-side so the stored column keeps ONE
21
+ * "unlimited" representation. Both old wire names are appended to
22
+ * the mcp-server RETIRED_TOOL_NAMES regression lock. No shims,
23
+ * pre-launch delete-in-same-slice.
24
+ *
25
+ * op2. **New ops wire names** (additive): `ggui_ops_set_app_theme`
26
+ * (validates with the protocol's `appThemeSchema` — the same
27
+ * validator every `GguiApp.theme` write surface runs),
28
+ * `ggui_ops_rename_org` (owner-or-admin), `ggui_ops_remove_org_member`
29
+ * (role-matrix enforced; owner never removable),
30
+ * `ggui_ops_get_org_balance` (any-member read, allowlisted in
31
+ * SINGLE_CALL_OPS), and the app-scoped `appId?` argument on
32
+ * `ggui_ops_set_provider_key` / `ggui_ops_remove_provider_key`
33
+ * (optional seam — deployments without app-scoped key storage
34
+ * reject it with `app_scoped_keys_unavailable`).
35
+ *
36
+ * op3. **My-blueprint curation trio** (additive, cloud-deployment
37
+ * tools beside `ggui_ops_list_my_blueprints`):
38
+ * `ggui_ops_update_my_blueprint` (rename + description/tags;
39
+ * canonical kebab-case blueprint-name rule),
40
+ * `ggui_ops_delete_my_blueprint`, and
41
+ * `ggui_ops_get_my_blueprint_source` (returns the stored
42
+ * `{source, contract?, fixtureProps?}` definition envelope;
43
+ * allowlisted in SINGLE_CALL_OPS).
44
+ *
45
+ * Conformance-kit verdict: ops tools are not conformance-kit surface —
46
+ * NO protocol stamp roll. Recorded here because retired wire names are
47
+ * ledgered (retired-tool-names regression lock mirrors this entry).
48
+ *
49
+ * --------------------------------------------------------------------
50
+ * Dead capability/quality vocabulary deleted (2026-07-27, pre-launch,
51
+ * ggui#394). `CapabilityPermissions`, `ComponentCapability`, and
52
+ * `QualityMetadata` are removed from the package's public API, along
53
+ * with the never-populated `capabilities?` / `quality?` fields on
54
+ * `ComponentGguiSession` (types/capabilities.ts deleted).
55
+ *
56
+ * cp1. Census before delete: zero producers, zero consumers — the
57
+ * only reference in the repo was the type-level field
58
+ * declaration itself. The `capabilities` name was ALREADY
59
+ * retired contract vocabulary (RETIRED_CONTRACT_FIELDS,
60
+ * hygiene-rules.ts) and hard-rejected at the render/handshake
61
+ * seams, so the surviving session-layer type contradicted the
62
+ * shipped posture.
63
+ * cp2. Not wired into `_meta.ui.csp` because no lossless mapping
64
+ * exists: the live CSP model is origin LISTS derived from
65
+ * publicBaseUrl + gadget descriptors; a six-verb grant list
66
+ * carries no origin data, and hardware grants already flow
67
+ * through per-gadget `permission` → Permissions-Policy.
68
+ * cp3. Quality evaluation stays internal to @ggui-ai/ui-gen (its own
69
+ * local QualityMetadata in evaluation/types.ts is untouched);
70
+ * the protocol carries no scores because nothing downstream of
71
+ * commit consumes them.
72
+ *
73
+ * Conformance-kit verdict: no wire-shape change (nothing ever emitted
74
+ * these fields) — PROTOCOL_VERSION unchanged. Package-API removal
75
+ * only, licensed by the pre-launch no-backward-compat rule.
76
+ *
77
+ * --------------------------------------------------------------------
78
+ * Render failure envelope — in-result isError tool errors (2026-07-23,
79
+ * BREAKING, pre-launch). Ruling B. A `ggui_render` that fails or is
80
+ * rejected is a `tools/call` RESULT carrying `isError: true` — never a
81
+ * thrown JSON-RPC error. Before this, failures returned a
82
+ * SUCCESS-shaped envelope: an accident of the 2026-05-14 codeReady
83
+ * byte-trim, not a design, which mounted error renders as blank divs
84
+ * and let render meters count failures as billable.
85
+ *
86
+ * rb1. Failures stay SCHEMA-CONFORMANT. MCP SDK clients validate
87
+ * `structuredContent` against `outputSchema` even when
88
+ * `isError` is set, so the failure envelope must satisfy
89
+ * `renderOutputSchema` — it is not a free-form error shape.
90
+ * SPEC §7.1 / §7.9 Plane 3.
91
+ * rb2. `renderOutputSchema` gains optional `error: {code, message}`,
92
+ * present iff `isError`. `code` is the closed enum
93
+ * `RenderErrorCode` = PRODUCTION_FAILED | VALIDATION_ERROR |
94
+ * NO_PLATFORM_KEY | NO_CREDENTIALS; `message` is agent-facing
95
+ * guidance, not a stack.
96
+ * rb3. `resourceUri` becomes OPTIONAL — present iff the render is
97
+ * mountable. A failure carries no resource, so consumers must
98
+ * stop assuming presence. `updateOutputSchema` was synced for
99
+ * the same stripped-field class.
100
+ * rb4. The phantom JSON-RPC error code -32004 (PRODUCTION_FAILED) is
101
+ * RETIRED from `MCP_ERROR_CODES`. It was never emitted; the
102
+ * in-result contract above replaces it.
103
+ * rb5. NO `_meta` on failures (nothing to project), and the error
104
+ * session still COMMITS — the handshakeId is consumed, so
105
+ * recovery is re-handshake, not retry.
106
+ *
107
+ * Conformance-kit verdict: minor-intent while `draft-`, so
108
+ * PROTOCOL_VERSION is unchanged and no migration doc is required (see
109
+ * docs/protocol/VERSION-POLICY.md). Recorded here because the wire
110
+ * shape changed even though the stamp did not.
111
+ *
112
+ * Stamp adjudication (re-examined 2026-07-27, pre-beta audit): the
113
+ * "two failure contracts share one stamp" concern was weighed and the
114
+ * stamp DELIBERATELY not rolled. PROTOCOL_VERSION gates the WS
115
+ * subscribe handshake (versionPolicy default 'reject' — a mismatch
116
+ * CLOSES the connection), and ruling B changed the MCP tools/call
117
+ * result surface while leaving every WS envelope untouched. Rolling
118
+ * the stamp would have forced a lockstep UPGRADE_REQUIRED break on
119
+ * every client pinned to 0.4.0-rc.0 at the next server deploy, to
120
+ * version a layer that did not change. MCP-path failure-contract
121
+ * discovery is by package version (exact pins are the pre-launch
122
+ * consumer contract), not by wire handshake. The stamp next moves
123
+ * when the WS envelope layer itself changes, or at the v1.0 freeze.
124
+ *
125
+ * --------------------------------------------------------------------
9
126
  * Consolidated cleanliness release (2026-06-12, BREAKING, pre-launch).
10
127
  * Four strands from the 2026-06-12 cleanliness + orphan audits, every
11
128
  * finding adversarially re-verified before action: the dv* entries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/protocol",
3
- "version": "0.3.0-rc.0",
3
+ "version": "0.5.0-rc.0",
4
4
  "description": "ggui protocol types — events, renders, WebSocket, MCP, LLM models",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -78,7 +78,7 @@
78
78
  "devDependencies": {
79
79
  "@types/node": "^22.0.0",
80
80
  "typescript": "^5.0.0",
81
- "vitest": "^2.1.0"
81
+ "vitest": "^3.2.6"
82
82
  },
83
83
  "repository": {
84
84
  "type": "git",
@@ -1,40 +0,0 @@
1
- /**
2
- * Component capability permissions and quality metadata.
3
- *
4
- * Components run in a sandboxed context with all capabilities denied by default.
5
- * Capabilities can be granted by the app developer (per-app) or by the end-user (per-session).
6
- */
7
- /**
8
- * Software capabilities that can be granted to sandboxed components.
9
- *
10
- * Hardware access flows through gadget hooks (`clientCapabilities.gadgets`)
11
- * — each gadget descriptor declares a `permission` that threads to the
12
- * iframe's `Permissions-Policy` header. There is no separate
13
- * `adapters[]` model.
14
- */
15
- export type ComponentCapability = 'network' | 'storage' | 'dom' | 'eval' | 'navigation' | 'device';
16
- /**
17
- * Capability permissions for a component.
18
- * Default posture: all capabilities denied (granted: []).
19
- */
20
- export interface CapabilityPermissions {
21
- /** Capabilities this component is allowed to use. Default: [] (all denied) */
22
- granted: ComponentCapability[];
23
- }
24
- /**
25
- * Quality evaluation metadata attached to produced components.
26
- * Producers MAY attach quality scores. Renderers MAY display quality indicators.
27
- */
28
- export interface QualityMetadata {
29
- evaluationRounds: number;
30
- finalScore: number;
31
- dimensions: {
32
- completeness: number;
33
- visualPolish: number;
34
- interactivity: number;
35
- accessibility: number;
36
- codeQuality: number;
37
- };
38
- passed: boolean;
39
- }
40
- //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/types/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,SAAS,GACT,KAAK,GACL,MAAM,GACN,YAAY,GACZ,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,8EAA8E;IAC9E,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAMD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE;QACV,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,OAAO,CAAC;CACjB"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Component capability permissions and quality metadata.
3
- *
4
- * Components run in a sandboxed context with all capabilities denied by default.
5
- * Capabilities can be granted by the app developer (per-app) or by the end-user (per-session).
6
- */
7
- export {};
8
- // =============================================================================
9
- // Hardware grant model
10
- // =============================================================================
11
- //
12
- // Hardware-capability hooks (camera, microphone, geolocation, etc.) flow
13
- // through the gadget catalog at `DataContract.clientCapabilities.gadgets`.
14
- // Each gadget descriptor declares a `permission` field whose value is the
15
- // Web Permissions API name (`KNOWN_PERMISSION_NAMES`); the server projects
16
- // every declared permission onto the iframe's `Permissions-Policy` header.
17
- //
18
- // There is no `adapters[]` allow-list (voice / camera / location /
19
- // bluetooth). Per-gadget permission threading IS the grant model.