@ggui-ai/protocol 0.15.0 → 0.16.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.
Files changed (75) hide show
  1. package/dist/errors/domain-error.d.ts +70 -0
  2. package/dist/errors/domain-error.d.ts.map +1 -0
  3. package/dist/errors/domain-error.js +118 -0
  4. package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
  5. package/dist/gadgets/stdlib-gadgets.js +1 -1
  6. package/dist/index.d.ts +3 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +4 -2
  9. package/dist/integrations/mcp-apps.d.ts +33 -7
  10. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  11. package/dist/integrations/mcp-apps.js +13 -13
  12. package/dist/integrations/overlay-hash.d.ts +19 -0
  13. package/dist/integrations/overlay-hash.d.ts.map +1 -0
  14. package/dist/integrations/overlay-hash.js +29 -0
  15. package/dist/integrations/theme-binding.d.ts +14 -12
  16. package/dist/integrations/theme-binding.d.ts.map +1 -1
  17. package/dist/integrations/theme-binding.js +10 -6
  18. package/dist/registry/blueprint-key.d.ts.map +1 -1
  19. package/dist/registry/blueprint-key.js +4 -3
  20. package/dist/schemas/app-theme.d.ts +46 -10
  21. package/dist/schemas/app-theme.d.ts.map +1 -1
  22. package/dist/schemas/app-theme.js +108 -40
  23. package/dist/schemas/blueprint.d.ts +2 -1
  24. package/dist/schemas/blueprint.d.ts.map +1 -1
  25. package/dist/schemas/blueprint.js +15 -3
  26. package/dist/schemas/data-contract.d.ts +1 -1
  27. package/dist/schemas/data-contract.js +1 -1
  28. package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
  29. package/dist/schemas/handshake-suggestion.js +8 -1
  30. package/dist/schemas/mcp.d.ts +48 -22
  31. package/dist/schemas/mcp.d.ts.map +1 -1
  32. package/dist/schemas/mcp.js +44 -15
  33. package/dist/schemas/ops-blueprint.d.ts +4 -4
  34. package/dist/schemas/ops-blueprint.d.ts.map +1 -1
  35. package/dist/schemas/ops-blueprint.js +13 -8
  36. package/dist/schemas/render-input-envelope.js +1 -1
  37. package/dist/types/blueprint-source.d.ts +27 -7
  38. package/dist/types/blueprint-source.d.ts.map +1 -1
  39. package/dist/types/blueprint-source.js +19 -3
  40. package/dist/types/blueprint.d.ts +2 -2
  41. package/dist/types/blueprint.d.ts.map +1 -1
  42. package/dist/types/data-contract.d.ts +3 -3
  43. package/dist/types/domain-error-codes.d.ts +167 -0
  44. package/dist/types/domain-error-codes.d.ts.map +1 -0
  45. package/dist/types/domain-error-codes.js +170 -0
  46. package/dist/types/handshake-suggestion.d.ts +2 -2
  47. package/dist/types/live-channel.d.ts +1 -1
  48. package/dist/types/llm-route.d.ts +59 -2
  49. package/dist/types/llm-route.d.ts.map +1 -1
  50. package/dist/types/llm-route.js +62 -16
  51. package/dist/types/llm.d.ts +22 -2
  52. package/dist/types/llm.d.ts.map +1 -1
  53. package/dist/types/llm.js +29 -2
  54. package/dist/types/mcp.d.ts +31 -39
  55. package/dist/types/mcp.d.ts.map +1 -1
  56. package/dist/types/mcp.js +22 -10
  57. package/dist/types/refusal-codes.d.ts +31 -93
  58. package/dist/types/refusal-codes.d.ts.map +1 -1
  59. package/dist/types/refusal-codes.js +41 -96
  60. package/dist/types/render.d.ts +3 -3
  61. package/dist/types/render.d.ts.map +1 -1
  62. package/dist/validation/contract-validator.d.ts +8 -2
  63. package/dist/validation/contract-validator.d.ts.map +1 -1
  64. package/dist/validation/contract-validator.js +12 -4
  65. package/dist/validation/lint-contract.d.ts +2 -2
  66. package/dist/validation/lint-contract.d.ts.map +1 -1
  67. package/dist/validation/lint-contract.js +6 -4
  68. package/dist/validation/schema-subset.d.ts +3 -3
  69. package/dist/version.d.ts +357 -6
  70. package/dist/version.d.ts.map +1 -1
  71. package/dist/version.js +356 -5
  72. package/package.json +1 -1
  73. package/dist/envelope-adapters.d.ts +0 -12
  74. package/dist/envelope-adapters.d.ts.map +0 -1
  75. package/dist/envelope-adapters.js +0 -30
@@ -0,0 +1,70 @@
1
+ /**
2
+ * `DomainError` — the ONE composer of a Plane-2 error's wire text (ggui#880).
3
+ *
4
+ * SPEC §7.9 Plane 2. The MCP SDK converts every error a tool handler throws
5
+ * into `{content: [{type: 'text', text: error.message}], isError: true}` —
6
+ * no `structuredContent`, no `_meta`, no field for a code. So `message` IS
7
+ * the wire, and this base is the only place that composes it:
8
+ *
9
+ * <code> ": " <detail>
10
+ *
11
+ * with `code` a member of {@link DOMAIN_ERROR_CODES}. A reader branches on
12
+ * `text.startsWith(code + ': ')` for a REGISTERED code and on nothing else
13
+ * — a tool-name prefix inside the detail (`ggui_render: …`) is prose. The
14
+ * one thing the base refuses at construction is a detail that itself
15
+ * begins with a registered domain or refusal code followed by `': '`: the
16
+ * leading slug would then lie to the reader, and the emitter's own suite
17
+ * sees the `TypeError` instead of the wire.
18
+ *
19
+ * Parties (the contract): the EMITTER is any data-plane handler that throws
20
+ * for a caller-fixable, nothing-committed condition; the TRANSPORT is the
21
+ * server's `tools/call` dispatch and the SDK's catch it hands to; the
22
+ * CONSUMER is a raw MCP agent reading the result text. Observable violation:
23
+ * the conformance kit's `domain-error` catalog grades the raw result.
24
+ */
25
+ import { type DomainErrorCode } from '../types/domain-error-codes.js';
26
+ /**
27
+ * Marks a {@link DomainError} across bundle copies and realms: an instance
28
+ * from another copy of `@ggui-ai/protocol` is still a domain error to
29
+ * {@link isDomainError}, which never uses `instanceof`.
30
+ */
31
+ export declare const DOMAIN_ERROR_MARKER: unique symbol;
32
+ /**
33
+ * Thrown at construction when a detail begins with a registered code —
34
+ * an emitter bug, surfaced in the emitter's own suite, never on the wire.
35
+ */
36
+ export declare class DomainErrorDetailCollisionError extends TypeError {
37
+ readonly code: DomainErrorCode;
38
+ readonly collidingCode: string;
39
+ readonly detail: string;
40
+ constructor(code: DomainErrorCode, collidingCode: string, detail: string);
41
+ }
42
+ /**
43
+ * Base of every Plane-2 error. Subclass it per state; the subclass owns the
44
+ * detail text and any typed fields, the base owns the wire grammar.
45
+ */
46
+ export declare class DomainError<C extends DomainErrorCode = DomainErrorCode> extends Error {
47
+ readonly [DOMAIN_ERROR_MARKER]: true;
48
+ readonly code: C;
49
+ readonly detail: string;
50
+ constructor(code: C, detail: string, options?: ErrorOptions);
51
+ }
52
+ /**
53
+ * Whether `err` is a domain error — by marker and shape, never by
54
+ * `instanceof` (not even `instanceof Error`, which is realm-bound), so an
55
+ * instance from another bundle copy or realm still qualifies and a plain
56
+ * `Error` that merely carries a `code` does not.
57
+ */
58
+ export declare function isDomainError(err: unknown): err is DomainError;
59
+ /** A parsed Plane-2 wire text. */
60
+ export interface ParsedDomainErrorText {
61
+ readonly code: DomainErrorCode;
62
+ readonly detail: string;
63
+ }
64
+ /**
65
+ * The reader side of the grammar: `<code>: <detail>` for a REGISTERED code,
66
+ * else `null` — a Plane-1 text (`MCP error -32602: …`), a tool-name prefix
67
+ * (`ggui_render: …`) or an unregistered slug is not a domain error.
68
+ */
69
+ export declare function parseDomainErrorText(text: string): ParsedDomainErrorText | null;
70
+ //# sourceMappingURL=domain-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-error.d.ts","sourceRoot":"","sources":["../../src/errors/domain-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AAGrC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,MAA0C,CAAC;AAapF;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,SAAS;IAE1D,QAAQ,CAAC,IAAI,EAAE,eAAe;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM;gBAFd,IAAI,EAAE,eAAe,EACrB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM;CAO1B;AAED;;;GAGG;AACH,qBAAa,WAAW,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,CAAE,SAAQ,KAAK;IACjF,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAG,IAAI,CAAU;IAC/C,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAa5D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,WAAW,CAc9D;AAED,kCAAkC;AAClC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CAO/E"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * `DomainError` — the ONE composer of a Plane-2 error's wire text (ggui#880).
3
+ *
4
+ * SPEC §7.9 Plane 2. The MCP SDK converts every error a tool handler throws
5
+ * into `{content: [{type: 'text', text: error.message}], isError: true}` —
6
+ * no `structuredContent`, no `_meta`, no field for a code. So `message` IS
7
+ * the wire, and this base is the only place that composes it:
8
+ *
9
+ * <code> ": " <detail>
10
+ *
11
+ * with `code` a member of {@link DOMAIN_ERROR_CODES}. A reader branches on
12
+ * `text.startsWith(code + ': ')` for a REGISTERED code and on nothing else
13
+ * — a tool-name prefix inside the detail (`ggui_render: …`) is prose. The
14
+ * one thing the base refuses at construction is a detail that itself
15
+ * begins with a registered domain or refusal code followed by `': '`: the
16
+ * leading slug would then lie to the reader, and the emitter's own suite
17
+ * sees the `TypeError` instead of the wire.
18
+ *
19
+ * Parties (the contract): the EMITTER is any data-plane handler that throws
20
+ * for a caller-fixable, nothing-committed condition; the TRANSPORT is the
21
+ * server's `tools/call` dispatch and the SDK's catch it hands to; the
22
+ * CONSUMER is a raw MCP agent reading the result text. Observable violation:
23
+ * the conformance kit's `domain-error` catalog grades the raw result.
24
+ */
25
+ import { DOMAIN_ERROR_CODES, isDomainErrorCode, } from '../types/domain-error-codes.js';
26
+ import { PRE_GENERATION_REFUSAL_CODES } from '../types/refusal-codes.js';
27
+ /**
28
+ * Marks a {@link DomainError} across bundle copies and realms: an instance
29
+ * from another copy of `@ggui-ai/protocol` is still a domain error to
30
+ * {@link isDomainError}, which never uses `instanceof`.
31
+ */
32
+ export const DOMAIN_ERROR_MARKER = Symbol.for('ai.ggui.domainError');
33
+ /** The leading `"<code>: "` a detail must not carry — either registry. */
34
+ function leadingRegisteredCode(detail) {
35
+ for (const code of DOMAIN_ERROR_CODES) {
36
+ if (detail.startsWith(`${code}: `))
37
+ return code;
38
+ }
39
+ for (const code of Object.keys(PRE_GENERATION_REFUSAL_CODES)) {
40
+ if (detail.startsWith(`${code}: `))
41
+ return code;
42
+ }
43
+ return undefined;
44
+ }
45
+ /**
46
+ * Thrown at construction when a detail begins with a registered code —
47
+ * an emitter bug, surfaced in the emitter's own suite, never on the wire.
48
+ */
49
+ export class DomainErrorDetailCollisionError extends TypeError {
50
+ code;
51
+ collidingCode;
52
+ detail;
53
+ constructor(code, collidingCode, detail) {
54
+ super(`DomainError(${code}): the detail begins with the registered code "${collidingCode}: " — a reader branches on the leading slug, so a nested code would lie to it; say the cause in words instead`);
55
+ this.code = code;
56
+ this.collidingCode = collidingCode;
57
+ this.detail = detail;
58
+ this.name = 'DomainErrorDetailCollisionError';
59
+ }
60
+ }
61
+ /**
62
+ * Base of every Plane-2 error. Subclass it per state; the subclass owns the
63
+ * detail text and any typed fields, the base owns the wire grammar.
64
+ */
65
+ export class DomainError extends Error {
66
+ [DOMAIN_ERROR_MARKER] = true;
67
+ code;
68
+ detail;
69
+ constructor(code, detail, options) {
70
+ if (detail.trim().length === 0) {
71
+ throw new TypeError(`DomainError(${code}): the detail must be non-empty — the wire text is "${code}: <detail>"`);
72
+ }
73
+ const collision = leadingRegisteredCode(detail);
74
+ if (collision !== undefined) {
75
+ throw new DomainErrorDetailCollisionError(code, collision, detail);
76
+ }
77
+ super(`${code}: ${detail}`, options);
78
+ this.code = code;
79
+ this.detail = detail;
80
+ this.name = new.target.name;
81
+ }
82
+ }
83
+ /**
84
+ * Whether `err` is a domain error — by marker and shape, never by
85
+ * `instanceof` (not even `instanceof Error`, which is realm-bound), so an
86
+ * instance from another bundle copy or realm still qualifies and a plain
87
+ * `Error` that merely carries a `code` does not.
88
+ */
89
+ export function isDomainError(err) {
90
+ // Structural on purpose: `instanceof Error` is realm-bound, and an
91
+ // error thrown in another realm or bundle copy is still a domain error.
92
+ if (typeof err !== 'object' || err === null)
93
+ return false;
94
+ if (Reflect.get(err, DOMAIN_ERROR_MARKER) !== true)
95
+ return false;
96
+ const code = Reflect.get(err, 'code');
97
+ const detail = Reflect.get(err, 'detail');
98
+ const message = Reflect.get(err, 'message');
99
+ return (typeof code === 'string' &&
100
+ isDomainErrorCode(code) &&
101
+ typeof detail === 'string' &&
102
+ typeof message === 'string');
103
+ }
104
+ /**
105
+ * The reader side of the grammar: `<code>: <detail>` for a REGISTERED code,
106
+ * else `null` — a Plane-1 text (`MCP error -32602: …`), a tool-name prefix
107
+ * (`ggui_render: …`) or an unregistered slug is not a domain error.
108
+ */
109
+ export function parseDomainErrorText(text) {
110
+ const separator = text.indexOf(': ');
111
+ if (separator <= 0)
112
+ return null;
113
+ const code = text.slice(0, separator);
114
+ const detail = text.slice(separator + 2);
115
+ if (!isDomainErrorCode(code) || detail.trim().length === 0)
116
+ return null;
117
+ return { code, detail };
118
+ }
@@ -12,7 +12,7 @@ export declare const STDLIB_GADGETS_PACKAGE = "@ggui-ai/gadgets";
12
12
  * in `@ggui-ai/gadgets` asserts the two stay in sync, so a release-time
13
13
  * bump to the runtime package without updating this constant fails CI.
14
14
  */
15
- export declare const STDLIB_GADGETS_VERSION = "0.15.0";
15
+ export declare const STDLIB_GADGETS_VERSION = "0.16.0";
16
16
  /**
17
17
  * v1 catalog of stdlib gadget descriptors. Every entry's
18
18
  * `package` defaults to {@link STDLIB_GADGETS_PACKAGE}; the
@@ -39,7 +39,7 @@ export const STDLIB_GADGETS_PACKAGE = '@ggui-ai/gadgets';
39
39
  * in `@ggui-ai/gadgets` asserts the two stay in sync, so a release-time
40
40
  * bump to the runtime package without updating this constant fails CI.
41
41
  */
42
- export const STDLIB_GADGETS_VERSION = '0.15.0';
42
+ export const STDLIB_GADGETS_VERSION = '0.16.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
@@ -16,12 +16,14 @@ export type { DeepReadonly } from "./types/readonly.js";
16
16
  export * from "./schemas/invoke.js";
17
17
  export * from "./schemas/data-contract.js";
18
18
  export * from "./schemas/app-theme.js";
19
+ export * from "./integrations/overlay-hash.js";
19
20
  export { canonicalizeContracts, canonicalizeValue } from "./registry/canonicalize-contract.js";
20
21
  export { summarizeContract } from "./registry/summarize-contract.js";
21
22
  export { buildEnforcedPropsSchema, canonicalPropsSchemaBytes, classifyPropsSchemaProfile, GRAMMAR_SAFE_FORMATS, GRAMMAR_SAFE_KEYWORDS, type PropsSchemaProfile, } from "./validation/enforced-props-schema.js";
22
23
  export type { TextBlock, ToolUseBlock, ToolResultBlock, ContentBlock, InvokeEvent, InvokeErrorCode, InvokeTurn, } from "./types/invoke.js";
23
24
  export * from "./types/llm.js";
24
25
  export * from "./types/refusal-codes.js";
26
+ export * from "./types/domain-error-codes.js";
25
27
  export * from "./types/llm-route.js";
26
28
  export * from "./types/interface-context.js";
27
29
  export * from "./types/host-context.js";
@@ -39,12 +41,12 @@ export * from "./types/gadget.js";
39
41
  export * from "./types/app-config.js";
40
42
  export { composeOAuthUserId } from "./types/oauth-user-id.js";
41
43
  export * from "./iframe-bridge.js";
42
- export * from "./envelope-adapters.js";
43
44
  export * from "./envelopes/builders.js";
44
45
  export * from "./envelopes/render-refusal.js";
45
46
  export * from "./errors/version-mismatch.js";
46
47
  export * from "./errors/unknown-permission-name.js";
47
48
  export * from "./errors/resource-read.js";
49
+ export * from "./errors/domain-error.js";
48
50
  export * from "./validation/contract-validator.js";
49
51
  export * from "./validation/cross-references.js";
50
52
  export * from "./validation/is-record.js";
@@ -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,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,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,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;AAOlE,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,oCAAoC,CAAC;AAM5C,YAAY,EAEV,SAAS,EACT,YAAY,EACZ,eAAe,EACf,YAAY,EAEZ,WAAW,EACX,eAAe,EAEf,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,cAAc,aAAa,CAAC;AAK5B,cAAc,uBAAuB,CAAC;AACtC,cAA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;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
@@ -27,6 +27,7 @@ export * from "./schemas/data-contract.js";
27
27
  // (`--ggui-*` css-var map). Consumed by the deploy/persist path (ggui.json
28
28
  // → managed cloud app) and projected into the rendered iframe's `:root`.
29
29
  export * from "./schemas/app-theme.js";
30
+ export * from "./integrations/overlay-hash.js";
30
31
  // Registry-side helpers — pure utilities for computing the canonical
31
32
  // identity hash of a DataContract shape. Consumed by the Tier 1
32
33
  // exact-match path of the blueprint registry.
@@ -49,6 +50,7 @@ export * from "./types/llm.js";
49
50
  // so it rides the root barrel (unlike ./blueprint-key, which is
50
51
  // subpathed only because it pulls node:crypto).
51
52
  export * from "./types/refusal-codes.js";
53
+ export * from "./types/domain-error-codes.js";
52
54
  export * from "./types/llm-route.js";
53
55
  export * from "./types/interface-context.js";
54
56
  export * from "./types/host-context.js";
@@ -61,7 +63,7 @@ export * from "./schemas/blueprint.js";
61
63
  export * from "./types/handshake-suggestion.js";
62
64
  export * from "./schemas/handshake-suggestion.js";
63
65
  // Operator-class blueprint tool schemas. Lives alongside the blueprint
64
- // type schemas so handlers + cloud pod + console + fixtures all import
66
+ // type schemas so handlers + a hosted deployment + console + fixtures all import
65
67
  // the wire shape from one place.
66
68
  export * from "./schemas/ops-blueprint.js";
67
69
  export * from "./types/contract-inference.js";
@@ -73,7 +75,6 @@ export * from "./types/app-config.js";
73
75
  // same id from one definition.
74
76
  export { composeOAuthUserId } from "./types/oauth-user-id.js";
75
77
  export * from "./iframe-bridge.js";
76
- export * from "./envelope-adapters.js";
77
78
  export * from "./envelopes/builders.js";
78
79
  export * from "./envelopes/render-refusal.js";
79
80
  export * from "./errors/version-mismatch.js";
@@ -81,6 +82,7 @@ export * from "./errors/unknown-permission-name.js";
81
82
  // Typed `resources/read` failures → JSON-RPC. The single exit for every
82
83
  // non-mount outcome of a render-locator read.
83
84
  export * from "./errors/resource-read.js";
85
+ export * from "./errors/domain-error.js";
84
86
  export * from "./validation/contract-validator.js";
85
87
  export * from "./validation/cross-references.js";
86
88
  export * from "./validation/is-record.js";
@@ -255,11 +255,13 @@ export interface McpAppAiGguiRenderMeta {
255
255
  readonly themeId?: string;
256
256
  readonly themeMode?: 'light' | 'dark';
257
257
  /**
258
- * Resolved per-app theme overlay — mode + the `--ggui-*` CSS-variable
259
- * map snapshotted from `App.theme` and projected by `deriveRenderMeta`.
260
- * Distinct from `themeId` (a registry preset reference) and `themeMode`
261
- * (the bare light/dark discriminator): this carries the concrete
262
- * variable values the iframe applies as a `:root` declaration block.
258
+ * Resolved per-app theme overlay (ggui#987): the projection for BOTH
259
+ * modes (`overlays.light` / `overlays.dark`), the mode-agnostic
260
+ * `cssVariables` on top, per-mode keyframes, the `overlayHash`
261
+ * attestation, and an optional default `mode` — snapshotted from
262
+ * `App.theme`. Distinct from `themeId` (a compiled-theme reference) and
263
+ * `themeMode` (the bare light/dark discriminator): the iframe injects
264
+ * `overlays[effectiveMode]` then `cssVariables` as `:root` declarations.
263
265
  * Absent ⇒ no per-app overlay; the renderer applies its default theme.
264
266
  */
265
267
  readonly theme?: AppTheme;
@@ -348,7 +350,15 @@ export type ParseMcpAppAiGguiRenderMetaResult = {
348
350
  *
349
351
  * @public
350
352
  */
351
- export declare function parseMcpAppAiGguiRenderMeta(meta: unknown): ParseMcpAppAiGguiRenderMetaResult;
353
+ export interface ParseMcpAppAiGguiRenderMetaOptions {
354
+ /**
355
+ * Called when a `theme` is present but fails `appThemeSchema` — the read
356
+ * door drops it (tolerant degrade) but MUST NOT be silent (ggui#987 §3.4):
357
+ * the caller logs or emits its observability event with the issues.
358
+ */
359
+ readonly onInvalidTheme?: ((issues: readonly string[]) => void) | undefined;
360
+ }
361
+ export declare function parseMcpAppAiGguiRenderMeta(meta: unknown, options?: ParseMcpAppAiGguiRenderMetaOptions): ParseMcpAppAiGguiRenderMetaResult;
352
362
  /**
353
363
  * Emitter convenience — wrap a server-built {@link McpAppAiGguiRenderMeta}
354
364
  * slice as the wire `_meta` envelope under the canonical key constant.
@@ -953,6 +963,22 @@ export declare const SUBMIT_ACTION_KINDS: readonly ["dispatch", "openLink", "req
953
963
  * MUST validate shape before consuming.
954
964
  */
955
965
  export declare function isGguiSubmitActionInput(value: unknown): value is GguiSubmitActionInput;
966
+ /**
967
+ * The `dispatch` member of {@link GguiSubmitActionInput} — the one kind
968
+ * whose payload the pipe stores. Derived here, never restated in a
969
+ * consumer (ggui#839): `env.kind === 'dispatch'` alone cannot narrow the
970
+ * union, because the forward-compat extension member (`kind: string` with a
971
+ * `Record<string, unknown>` payload) also admits the literal at the type level.
972
+ */
973
+ export type GguiSubmitDispatchInput = Extract<GguiSubmitActionInput, {
974
+ readonly kind: 'dispatch';
975
+ }>;
976
+ /**
977
+ * Narrow a guarded envelope to its `dispatch` member. Sound because
978
+ * {@link isGguiSubmitActionInput}'s closed-set `switch` validates the
979
+ * `'dispatch'` payload before any extension kind can carry that literal.
980
+ */
981
+ export declare function isGguiSubmitDispatchInput(env: GguiSubmitActionInput): env is GguiSubmitDispatchInput;
956
982
  /**
957
983
  * `content[0]._meta["ai.ggui/userAction"]` — a PURE DOORBELL.
958
984
  *
@@ -1077,7 +1103,7 @@ export declare function toolResultGguiRender(result: unknown): GguiRenderBootstr
1077
1103
  *
1078
1104
  * @public
1079
1105
  */
1080
- export declare const GGUI_RENDER_SHELL_SURFACE = "var(--ggui-shell-background, var(--ggui-color-surface, var(--ggui-shell-scheme-surface, #f9fafb)))";
1106
+ export declare const GGUI_RENDER_SHELL_SURFACE = "var(--ggui-shell-background, var(--ggui-color-ground, var(--ggui-shell-scheme-surface, #f9fafb)))";
1081
1107
  /**
1082
1108
  * Inline `<style>` block that gives the shell's pre-render placeholder
1083
1109
  * a SCHEME-AWARE neutral ground (#662). Before the runtime injects
@@ -1 +1 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;;;GAmBG;AACH,eAAO,MAAM,yBAAyB,sGAC+D,CAAC;AAEtG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iCAAiC,QA0BpC,CAAC;AAEX,eAAO,MAAM,8BAA8B,kPACsM,CAAC;AAElP;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IAChD;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,mBAAmB,EAC9B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,MAAM,CA6CR;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAa3D"}
@@ -131,18 +131,7 @@ export function deriveContextName(slotKey) {
131
131
  * @public
132
132
  */
133
133
  export const MCP_APP_AI_GGUI_RENDER_META_KEY = 'ai.ggui/render';
134
- /**
135
- * Read the `ai.ggui/render` slice off a parsed JSON-RPC `_meta` object.
136
- *
137
- * Structural validation only. Missing key returns `{ok: true, meta: undefined}`
138
- * — not a failure. Required-fields gate (sessionId / appId / runtimeUrl)
139
- * fires only when the key is present. Field-level optional-field
140
- * defensive parsing (e.g. context-slot schema narrowing, expiresAt date
141
- * parse) lives downstream in the iframe-runtime's `validateMeta`.
142
- *
143
- * @public
144
- */
145
- export function parseMcpAppAiGguiRenderMeta(meta) {
134
+ export function parseMcpAppAiGguiRenderMeta(meta, options = {}) {
146
135
  if (!isRecord(meta)) {
147
136
  return { ok: true };
148
137
  }
@@ -241,6 +230,9 @@ export function parseMcpAppAiGguiRenderMeta(meta) {
241
230
  // slice (tolerant degrade, consistent with the other optional fields).
242
231
  const themeParse = s.theme !== undefined ? appThemeSchema.safeParse(s.theme) : undefined;
243
232
  const parsedTheme = themeParse?.success === true ? themeParse.data : undefined;
233
+ if (themeParse !== undefined && !themeParse.success) {
234
+ options.onInvalidTheme?.(themeParse.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`));
235
+ }
244
236
  const slice = {
245
237
  sessionId: s.sessionId,
246
238
  appId: s.appId,
@@ -601,6 +593,14 @@ export function isGguiSubmitActionInput(value) {
601
593
  return true;
602
594
  }
603
595
  }
596
+ /**
597
+ * Narrow a guarded envelope to its `dispatch` member. Sound because
598
+ * {@link isGguiSubmitActionInput}'s closed-set `switch` validates the
599
+ * `'dispatch'` payload before any extension kind can carry that literal.
600
+ */
601
+ export function isGguiSubmitDispatchInput(env) {
602
+ return env.kind === 'dispatch';
603
+ }
604
604
  /**
605
605
  * Does this slice carry at least one MOUNT MODE discriminator?
606
606
  * Mirrors the iframe-runtime's `validateMeta`: the runtime needs
@@ -686,7 +686,7 @@ export function toolResultGguiRender(result) {
686
686
  *
687
687
  * @public
688
688
  */
689
- export const GGUI_RENDER_SHELL_SURFACE = 'var(--ggui-shell-background, var(--ggui-color-surface, var(--ggui-shell-scheme-surface, #f9fafb)))';
689
+ export const GGUI_RENDER_SHELL_SURFACE = 'var(--ggui-shell-background, var(--ggui-color-ground, var(--ggui-shell-scheme-surface, #f9fafb)))';
690
690
  /**
691
691
  * Inline `<style>` block that gives the shell's pre-render placeholder
692
692
  * a SCHEME-AWARE neutral ground (#662). Before the runtime injects
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Overlay attestation (ggui#987 §6.3): ONE canonical serialization and ONE
3
+ * hash for the per-app theme overlay, so every minter (a platform's
4
+ * projector, a console, a CLI) and every write door compute the same bytes.
5
+ *
6
+ * Canonical JSON: object keys sorted recursively, no whitespace, `undefined`
7
+ * members omitted, strings/numbers as JSON emits them. Hash: SHA-256 over the
8
+ * UTF-8 bytes, lowercase hex. Async because it uses Web Crypto
9
+ * (`globalThis.crypto.subtle`), available in every runtime the protocol
10
+ * targets.
11
+ */
12
+ import type { AppTheme } from '../schemas/app-theme.js';
13
+ /** The attested part of an overlay — never `mode`, `name` or `frameless`. */
14
+ export type OverlayHashInput = Pick<AppTheme, 'overlays' | 'cssVariables' | 'keyframes'>;
15
+ /** The canonical JSON the hash is taken over — exported so tests and other minters can pin it. */
16
+ export declare function canonicalOverlayJson(input: OverlayHashInput): string;
17
+ /** `sha256(canonicalOverlayJson(input))` as lowercase hex — the value `AppTheme.overlayHash` carries. */
18
+ export declare function canonicalOverlayHash(input: OverlayHashInput): Promise<string>;
19
+ //# sourceMappingURL=overlay-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay-hash.d.ts","sourceRoot":"","sources":["../../src/integrations/overlay-hash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,cAAc,GAAG,WAAW,CAAC,CAAC;AAczF,kGAAkG;AAClG,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAOpE;AAMD,yGAAyG;AACzG,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAGnF"}
@@ -0,0 +1,29 @@
1
+ function canonicalize(v) {
2
+ if (v === undefined)
3
+ return 'null';
4
+ if (v === null || typeof v !== 'object')
5
+ return JSON.stringify(v);
6
+ if (Array.isArray(v))
7
+ return `[${v.map((x) => canonicalize(x)).join(',')}]`;
8
+ const keys = Object.keys(v)
9
+ .filter((k) => v[k] !== undefined)
10
+ .sort();
11
+ return `{${keys.map((k) => `${JSON.stringify(k)}:${canonicalize(v[k])}`).join(',')}}`;
12
+ }
13
+ /** The canonical JSON the hash is taken over — exported so tests and other minters can pin it. */
14
+ export function canonicalOverlayJson(input) {
15
+ const doc = {
16
+ overlays: input.overlays,
17
+ cssVariables: input.cssVariables,
18
+ keyframes: input.keyframes,
19
+ };
20
+ return canonicalize(doc);
21
+ }
22
+ function toHex(bytes) {
23
+ return Array.from(new Uint8Array(bytes), (b) => b.toString(16).padStart(2, '0')).join('');
24
+ }
25
+ /** `sha256(canonicalOverlayJson(input))` as lowercase hex — the value `AppTheme.overlayHash` carries. */
26
+ export async function canonicalOverlayHash(input) {
27
+ const bytes = new TextEncoder().encode(canonicalOverlayJson(input));
28
+ return toHex(await globalThis.crypto.subtle.digest('SHA-256', bytes));
29
+ }
@@ -7,8 +7,8 @@
7
7
  * ## The normative total order
8
8
  *
9
9
  * ```
10
- * themeMode: consolePick > staticConfig > sessionSidecar > hostAnnounced
11
- * themeId: consolePick > renderOverride > staticConfig > sidecarName
10
+ * themeMode: hostAnnounced > consolePick > staticConfig > sessionSidecar
11
+ * themeId: consolePick > renderOverride > staticConfig
12
12
  * ```
13
13
  *
14
14
  * - `consolePick` — the live operator pick (console theme provider).
@@ -17,8 +17,12 @@
17
17
  * - `sessionSidecar` — the per-app `App.theme` sidecar snapshotted at
18
18
  * render-commit: its `mode` (for `themeMode`) / its `name` (for
19
19
  * `themeId`, the registered-theme base-ladder binding).
20
- * - `hostAnnounced` — the embedding host's `hostContext.theme`
21
- * (mode only; hosts announce no theme id).
20
+ * - `hostAnnounced` — the embedding host's `hostContext.theme` (mode
21
+ * only; hosts announce no theme id). HIGHEST rank since ggui#987 (D4):
22
+ * the embedding host owns runtime mode; every other layer is a default
23
+ * the host's announce overrides. A one-palette sidecar can no longer
24
+ * exist (`appThemeSchema` requires both projections), so following the
25
+ * host never paints the wrong palette.
22
26
  *
23
27
  * An unresolved fact is `undefined` — NEVER defaulted to `'light'`.
24
28
  * Absence is load-bearing: it is the signal that lets the next layer
@@ -72,7 +76,7 @@ export interface ThemeModeEffectiveSources {
72
76
  readonly stamped?: ThemeModeOpinion | undefined;
73
77
  /** The slice theme OBJECT's own `mode` (the sidecar, read directly). */
74
78
  readonly sessionSidecar?: ThemeModeOpinion | undefined;
75
- /** The embedding host's `hostContext.theme` announce — final fallback. */
79
+ /** The embedding host's `hostContext.theme` announce — HIGHEST rank (ggui#987). */
76
80
  readonly hostAnnounced?: ThemeModeOpinion | undefined;
77
81
  }
78
82
  /** Server projection of the `themeMode` total order → the stamped field. */
@@ -88,16 +92,14 @@ export interface ThemeIdStampSources {
88
92
  /** Static `ggui.json#theme` deps. */
89
93
  readonly staticConfig?: string | undefined;
90
94
  }
91
- /** Client-visible `themeId` layers, highest rank first. */
95
+ /**
96
+ * Client-visible `themeId` layers. Since ggui#987 (D2 = B, the registration
97
+ * tier is gone) the sidecar's `name` is a label and never a binding: the
98
+ * only client-visible layer is the stamp.
99
+ */
92
100
  export interface ThemeIdEffectiveSources {
93
101
  /** The slice's stamped top-level `themeId`. */
94
102
  readonly stamped?: string | undefined;
95
- /**
96
- * The slice theme OBJECT's `name` — the registered-theme base-ladder
97
- * binding (ggui#589 ask 3): an unregistered name is harmless by
98
- * construction (renderer falls back to the default ladder).
99
- */
100
- readonly sidecarName?: string | undefined;
101
103
  }
102
104
  /** Server projection of the `themeId` total order → the stamped field. */
103
105
  export declare function stampThemeId(s: ThemeIdStampSources): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"theme-binding.d.ts","sourceRoot":"","sources":["../../src/integrations/theme-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;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GAC3B,gBAAgB,GAAG,SAAS,CAE9B;AAED,2DAA2D;AAC3D,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,kEAAkE;IAClE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,qCAAqC;IACrC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAEvE;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAE/E"}
@@ -7,8 +7,8 @@
7
7
  * ## The normative total order
8
8
  *
9
9
  * ```
10
- * themeMode: consolePick > staticConfig > sessionSidecar > hostAnnounced
11
- * themeId: consolePick > renderOverride > staticConfig > sidecarName
10
+ * themeMode: hostAnnounced > consolePick > staticConfig > sessionSidecar
11
+ * themeId: consolePick > renderOverride > staticConfig
12
12
  * ```
13
13
  *
14
14
  * - `consolePick` — the live operator pick (console theme provider).
@@ -17,8 +17,12 @@
17
17
  * - `sessionSidecar` — the per-app `App.theme` sidecar snapshotted at
18
18
  * render-commit: its `mode` (for `themeMode`) / its `name` (for
19
19
  * `themeId`, the registered-theme base-ladder binding).
20
- * - `hostAnnounced` — the embedding host's `hostContext.theme`
21
- * (mode only; hosts announce no theme id).
20
+ * - `hostAnnounced` — the embedding host's `hostContext.theme` (mode
21
+ * only; hosts announce no theme id). HIGHEST rank since ggui#987 (D4):
22
+ * the embedding host owns runtime mode; every other layer is a default
23
+ * the host's announce overrides. A one-palette sidecar can no longer
24
+ * exist (`appThemeSchema` requires both projections), so following the
25
+ * host never paints the wrong palette.
22
26
  *
23
27
  * An unresolved fact is `undefined` — NEVER defaulted to `'light'`.
24
28
  * Absence is load-bearing: it is the signal that lets the next layer
@@ -61,7 +65,7 @@ export function stampThemeMode(s) {
61
65
  }
62
66
  /** Client projection of the `themeMode` total order → the effective mode. */
63
67
  export function effectiveThemeMode(s) {
64
- return s.stamped ?? s.sessionSidecar ?? s.hostAnnounced;
68
+ return s.hostAnnounced ?? s.stamped ?? s.sessionSidecar;
65
69
  }
66
70
  /** Server projection of the `themeId` total order → the stamped field. */
67
71
  export function stampThemeId(s) {
@@ -69,5 +73,5 @@ export function stampThemeId(s) {
69
73
  }
70
74
  /** Client projection of the `themeId` total order → the effective id. */
71
75
  export function effectiveThemeId(s) {
72
- return s.stamped ?? s.sidecarName;
76
+ return s.stamped;
73
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"blueprint-key.d.ts","sourceRoot":"","sources":["../../src/registry/blueprint-key.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,CAGvE;AAMD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iCAAiC,EACjC,+BAA+B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,MAAM,yBAAyB,CAAC;AAIjC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"blueprint-key.d.ts","sourceRoot":"","sources":["../../src/registry/blueprint-key.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,CAGvE;AAMD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iCAAiC,EACjC,+BAA+B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,MAAM,yBAAyB,CAAC;AAIjC,cAAc,sBAAsB,CAAC"}