@ggui-ai/protocol 0.15.0 → 0.17.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 (81) 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 +5 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +11 -4
  9. package/dist/integrations/mcp-apps.d.ts +48 -8
  10. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  11. package/dist/integrations/mcp-apps.js +29 -23
  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-generation-profile.d.ts +139 -0
  21. package/dist/schemas/app-generation-profile.d.ts.map +1 -0
  22. package/dist/schemas/app-generation-profile.js +121 -0
  23. package/dist/schemas/app-theme.d.ts +235 -9
  24. package/dist/schemas/app-theme.d.ts.map +1 -1
  25. package/dist/schemas/app-theme.js +218 -40
  26. package/dist/schemas/blueprint.d.ts +2 -1
  27. package/dist/schemas/blueprint.d.ts.map +1 -1
  28. package/dist/schemas/blueprint.js +15 -3
  29. package/dist/schemas/data-contract.d.ts +1 -1
  30. package/dist/schemas/data-contract.js +1 -1
  31. package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
  32. package/dist/schemas/handshake-suggestion.js +8 -1
  33. package/dist/schemas/mcp.d.ts +62 -27
  34. package/dist/schemas/mcp.d.ts.map +1 -1
  35. package/dist/schemas/mcp.js +59 -21
  36. package/dist/schemas/ops-blueprint.d.ts +11 -4
  37. package/dist/schemas/ops-blueprint.d.ts.map +1 -1
  38. package/dist/schemas/ops-blueprint.js +25 -8
  39. package/dist/schemas/render-input-envelope.js +1 -1
  40. package/dist/schemas/rendering-context.d.ts +48 -0
  41. package/dist/schemas/rendering-context.d.ts.map +1 -0
  42. package/dist/schemas/rendering-context.js +39 -0
  43. package/dist/types/blueprint-source.d.ts +27 -7
  44. package/dist/types/blueprint-source.d.ts.map +1 -1
  45. package/dist/types/blueprint-source.js +19 -3
  46. package/dist/types/blueprint.d.ts +2 -2
  47. package/dist/types/blueprint.d.ts.map +1 -1
  48. package/dist/types/data-contract.d.ts +3 -3
  49. package/dist/types/domain-error-codes.d.ts +167 -0
  50. package/dist/types/domain-error-codes.d.ts.map +1 -0
  51. package/dist/types/domain-error-codes.js +170 -0
  52. package/dist/types/handshake-suggestion.d.ts +2 -2
  53. package/dist/types/live-channel.d.ts +1 -1
  54. package/dist/types/llm-route.d.ts +59 -2
  55. package/dist/types/llm-route.d.ts.map +1 -1
  56. package/dist/types/llm-route.js +62 -16
  57. package/dist/types/llm.d.ts +22 -2
  58. package/dist/types/llm.d.ts.map +1 -1
  59. package/dist/types/llm.js +29 -2
  60. package/dist/types/mcp.d.ts +31 -39
  61. package/dist/types/mcp.d.ts.map +1 -1
  62. package/dist/types/mcp.js +22 -10
  63. package/dist/types/refusal-codes.d.ts +31 -93
  64. package/dist/types/refusal-codes.d.ts.map +1 -1
  65. package/dist/types/refusal-codes.js +41 -96
  66. package/dist/types/render.d.ts +6 -5
  67. package/dist/types/render.d.ts.map +1 -1
  68. package/dist/validation/contract-validator.d.ts +8 -2
  69. package/dist/validation/contract-validator.d.ts.map +1 -1
  70. package/dist/validation/contract-validator.js +12 -4
  71. package/dist/validation/lint-contract.d.ts +2 -2
  72. package/dist/validation/lint-contract.d.ts.map +1 -1
  73. package/dist/validation/lint-contract.js +6 -4
  74. package/dist/validation/schema-subset.d.ts +3 -3
  75. package/dist/version.d.ts +445 -6
  76. package/dist/version.d.ts.map +1 -1
  77. package/dist/version.js +444 -5
  78. package/package.json +1 -1
  79. package/dist/envelope-adapters.d.ts +0 -12
  80. package/dist/envelope-adapters.d.ts.map +0 -1
  81. package/dist/envelope-adapters.js +0 -30
@@ -35,54 +35,232 @@ const cssValue = z
35
35
  const cssVariableMap = z
36
36
  .record(z.string().regex(GGUI_CSS_VAR_KEY_RE, 'css var key must be --ggui-*'), cssValue)
37
37
  .refine((m) => Object.keys(m).length <= 200, 'too many css variables (max 200)');
38
+ /**
39
+ * The grammar a per-mode `keyframes` string MUST satisfy (ggui#987 §3.4,
40
+ * follower D). The renderer injects the text verbatim into the card's
41
+ * `<style>` after the variables, so the text is bounded to what that slot
42
+ * is FOR: zero or more `@keyframes <ident> { <frame-selectors> { <declarations> } … }`
43
+ * blocks and nothing else — no other at-rule (`@import`, `@font-face`,
44
+ * `@media`, …), no `<` / `>`, braces balanced and nested exactly one level
45
+ * inside a block. Comments (`/* … *\/`) are stripped before the walk and are
46
+ * therefore allowed, as `cssVariableMap` values allow `url(`; the deny-list
47
+ * on values (`;{}<>@`) cannot apply verbatim here because `;`, `{`, `}` and
48
+ * the one `@` ARE the grammar. Same principal, same slot, one rule.
49
+ */
50
+ export const KEYFRAMES_NAME_RE = /^[A-Za-z_-][A-Za-z0-9_-]*$/;
51
+ export function isKeyframesText(text) {
52
+ const s = text.replace(/\/\*[\s\S]*?\*\//g, ' ');
53
+ if (/[<>]/.test(s))
54
+ return false;
55
+ let i = 0;
56
+ const n = s.length;
57
+ const skipWs = () => {
58
+ while (i < n && /\s/.test(s[i]))
59
+ i += 1;
60
+ };
61
+ for (;;) {
62
+ skipWs();
63
+ if (i >= n)
64
+ return true;
65
+ if (!s.startsWith('@keyframes', i))
66
+ return false;
67
+ i += '@keyframes'.length;
68
+ if (i >= n || !/\s/.test(s[i]))
69
+ return false;
70
+ skipWs();
71
+ const nameStart = i;
72
+ while (i < n && /[A-Za-z0-9_-]/.test(s[i]))
73
+ i += 1;
74
+ if (!KEYFRAMES_NAME_RE.test(s.slice(nameStart, i)))
75
+ return false;
76
+ skipWs();
77
+ if (s[i] !== '{')
78
+ return false;
79
+ i += 1;
80
+ // Inside the block: frame rules only — `selectors { declarations }` at depth 1, no `@`.
81
+ let depth = 1;
82
+ while (i < n && depth > 0) {
83
+ const ch = s[i];
84
+ if (ch === '@')
85
+ return false;
86
+ if (ch === '{') {
87
+ depth += 1;
88
+ if (depth > 2)
89
+ return false;
90
+ }
91
+ else if (ch === '}') {
92
+ depth -= 1;
93
+ }
94
+ i += 1;
95
+ }
96
+ if (depth !== 0)
97
+ return false;
98
+ }
99
+ }
100
+ /** A per-mode keyframes string: `@keyframes` blocks only (see {@link isKeyframesText}), 8 KiB cap unchanged. */
101
+ const keyframesText = z
102
+ .string()
103
+ .max(8192)
104
+ .refine(isKeyframesText, 'keyframes must be `@keyframes <name> { … }` blocks and nothing else');
105
+ /**
106
+ * https-only asset URL with a well-formed host — the theme document's rule
107
+ * for a declared face (ggui#987 §5), now the wire's rule for every asset an
108
+ * AppTheme names. Grammar only: nothing here is fetched.
109
+ */
110
+ function isHttpsAssetUrl(src) {
111
+ let url;
112
+ try {
113
+ url = new URL(src);
114
+ }
115
+ catch {
116
+ return false;
117
+ }
118
+ return url.protocol === 'https:' && /^[a-z0-9.-]+$/i.test(url.hostname) && url.hostname.includes('.');
119
+ }
120
+ const httpsAssetUrl = z.string().min(1).refine(isHttpsAssetUrl, 'src must be an https: URL with a well-formed host');
121
+ /**
122
+ * One declared font face (ggui#987 §5; lifted here for ggui#1093 / #990 so the
123
+ * theme DOCUMENT's `typography.faces` and the AppTheme WIRE's `fonts` share
124
+ * ONE grammar — `@ggui-ai/project-config` imports this schema for the
125
+ * document door). `src` MUST be `https:` with a well-formed host; the face is
126
+ * DECLARED, never fetched by any door: the render host unions the origin into
127
+ * its `font-src`, the shell renders the `@font-face` rule, and a face that
128
+ * fails to load in the browser falls back down the family's stack.
129
+ */
130
+ export const fontFaceDeclarationSchema = z.strictObject({
131
+ family: z.string().min(1).refine((f) => !/[\r\n]/.test(f), 'family must be one line'),
132
+ src: httpsAssetUrl,
133
+ weight: z.union([z.string().min(1), z.number().int().min(1).max(1000)]).optional(),
134
+ style: z.string().min(1).optional(),
135
+ display: z.string().min(1).optional(),
136
+ });
137
+ /** The most faces one theme may declare on the wire — a CSP and a `<style>` block stay bounded. */
138
+ export const APP_THEME_FONTS_MAX = 16;
139
+ /** The imagery slots a theme may fill (ggui#1093): a brand mark, a hero image, a repeating pattern. */
140
+ export const APP_THEME_IMAGERY_KINDS = ['mark', 'hero', 'pattern'];
141
+ /**
142
+ * One image asset: https-only `src` (never fetched by a door), an optional
143
+ * `alt` (≤ 200) and an optional `tone` — the image's own tonality (`light` /
144
+ * `dark`), so a composer can place ink over it without sampling pixels.
145
+ */
146
+ export const appThemeImageAssetSchema = z.strictObject({
147
+ src: httpsAssetUrl,
148
+ alt: z.string().max(200).optional(),
149
+ tone: z.enum(['light', 'dark']).optional(),
150
+ });
151
+ /**
152
+ * The host's imagery, by slot (ggui#1093, #1075 Track C (a)). Parties: a
153
+ * WRITER (an operator's design tooling, or a harvest of the host page) declares; the WRITE door
154
+ * validates this grammar and nothing more; the render host unions every
155
+ * `src` origin into its `img-src`; the composer reads the slots through
156
+ * the design primitives. Absent ⇒ no imagery, today's card.
157
+ */
158
+ export const appThemeImagerySchema = z.strictObject({
159
+ mark: appThemeImageAssetSchema.optional(),
160
+ hero: appThemeImageAssetSchema.optional(),
161
+ pattern: appThemeImageAssetSchema.optional(),
162
+ });
38
163
  export const appThemeSchema = z
39
164
  .object({
40
- mode: z.enum(['light', 'dark']),
41
- cssVariables: cssVariableMap,
165
+ /**
166
+ * Default appearance: the mode painted when NO embedding host announces
167
+ * one. Never a pin — the host owns runtime mode (ggui#987 D4; see
168
+ * `integrations/theme-binding.ts`). Absent ⇒ mode-neutral.
169
+ */
170
+ mode: z.enum(['light', 'dark']).optional(),
171
+ /** A label the author's tooling reads back. Never resolved by a renderer. */
42
172
  name: z.string().min(1).max(64).optional(),
43
173
  /**
44
- * The REGISTERED base ladder, delivered (runtime theme
45
- * registration): both modes' resolved variable sets ride the
46
- * envelope so a mid-session mode switch is a local operation and
47
- * delivery never depends on the iframe being able to fetch. The
48
- * renderer injects the mode-selected set BELOW `cssVariables` (the
49
- * per-app overlay) in the documented precedence. `documentHash` is
50
- * the registration's identity: it joins painted ladders to
51
- * registration records, and a receiver holding the hash may be
52
- * served a future envelope without the variable sets.
174
+ * Delivery attestation: `canonicalOverlayHash({ overlays, cssVariables,
175
+ * keyframes })` (`integrations/overlay-hash.ts`). Every write door
176
+ * recomputes it and refuses a mismatch; read doors pass it through.
53
177
  */
54
- base: z
178
+ overlayHash: z.string().regex(/^[0-9a-f]{64}$/, 'overlayHash must be sha256 lowercase hex'),
179
+ /**
180
+ * The projection, both modes — the derived `--ggui-*` sets a card
181
+ * injects for the effective mode (ggui#987 §2.4: produced by ONE
182
+ * function on every path). REQUIRED, both: an overlay that could not
183
+ * follow the host's mode is not accepted.
184
+ */
185
+ overlays: z.object({ light: cssVariableMap, dark: cssVariableMap }).strict(),
186
+ /** Mode-agnostic per-app overrides, injected above both projections. */
187
+ cssVariables: cssVariableMap.optional(),
188
+ /** Per-mode `@keyframes` blocks, injected verbatim after the variables — bounded to that grammar by {@link isKeyframesText}. */
189
+ keyframes: z
55
190
  .object({
56
- documentHash: z
57
- .string()
58
- .regex(/^[0-9a-f]{64}$/, 'documentHash must be sha256 lowercase hex'),
59
- light: cssVariableMap,
60
- dark: cssVariableMap,
61
- /**
62
- * Per-mode `@keyframes` blocks from the registration document
63
- * (ggui#613 residual 2). A mode key is absent when its
64
- * document declares no motion keyframes; the whole field is
65
- * absent on pre-#613 registrations (additive optional — old
66
- * bases stay valid). Injected verbatim after the variable
67
- * ladder, same position the compiled path gives
68
- * `theme.cssKeyframes`.
69
- */
70
- keyframes: z
71
- .object({
72
- light: z.string().max(8192).optional(),
73
- dark: z.string().max(8192).optional(),
74
- })
75
- .strict()
76
- .optional(),
77
- /**
78
- * `$metadata.frameless` delivered (OR of both modes): the
79
- * embedding host owns the card silhouette, so the renderer
80
- * appends the root-children border-suppression rule — the
81
- * SAME rule the compiled path emits.
82
- */
83
- frameless: z.boolean().optional(),
191
+ light: keyframesText.optional(),
192
+ dark: keyframesText.optional(),
84
193
  })
85
194
  .strict()
86
195
  .optional(),
196
+ /**
197
+ * The embedding host owns the card silhouette: the renderer appends the
198
+ * root-children border-suppression rule.
199
+ */
200
+ frameless: z.boolean().optional(),
201
+ /**
202
+ * Declared font faces (ggui#1093 / #990 — the hosted carrier for the
203
+ * document's `typography.faces`): 1..{@link APP_THEME_FONTS_MAX} faces,
204
+ * each {@link fontFaceDeclarationSchema}. OUTSIDE the attestation:
205
+ * `overlayHash` covers `{ overlays, cssVariables, keyframes }` only
206
+ * (`integrations/overlay-hash.ts`, `OverlayHashInput`) — a face is a
207
+ * declared asset, not a derived projection. A reader on a release that
208
+ * does not name this member strips it at its read door and paints the
209
+ * colours without the faces (`appThemeReadSchema`, VERSION-POLICY §3.6).
210
+ */
211
+ fonts: z.array(fontFaceDeclarationSchema).min(1).max(APP_THEME_FONTS_MAX).optional(),
212
+ /** The host's imagery by slot — {@link appThemeImagerySchema}; outside the attestation, same as `fonts`. */
213
+ imagery: appThemeImagerySchema.optional(),
87
214
  })
88
215
  .strict();
216
+ /**
217
+ * The READ-door posture (ggui#1093 belt, 2026-09-15; VERSION-POLICY §3.6).
218
+ *
219
+ * `appThemeSchema` is the WRITE door: strict, an unknown top-level member is
220
+ * refused (`invalid_app_config`). A READ door — a stored row turned into
221
+ * paint, a carried `_meta["ai.ggui/render"].theme` slice — parses with THIS
222
+ * schema instead: an unknown TOP-LEVEL member is stripped, the overlays are
223
+ * kept, and the caller reports what it stripped (one line per read, keys
224
+ * only, never theme content). Everything below the top level is unchanged —
225
+ * nested objects stay strict, token grammar and value safety still refuse,
226
+ * the v1 shape still refuses — and the attestation is untouched because
227
+ * `overlayHash` covers `{ overlays, cssVariables, keyframes }` only.
228
+ *
229
+ * Why: a reader on release N−1 meeting a member release N added would
230
+ * otherwise drop the WHOLE theme — colours and all — until it rolled
231
+ * (guuey#1266's class). Parties: every read door of an `AppTheme` MUST use
232
+ * this variant (or {@link parseAppThemeAtReadDoor}); every write door MUST
233
+ * stay on `appThemeSchema`. Observable violation: a read door dropping a
234
+ * theme whose overlays are valid because of an unknown top-level member —
235
+ * the kit's `n1-compat` forward case grades it.
236
+ */
237
+ export const appThemeReadSchema = z.object(appThemeSchema.shape);
238
+ /**
239
+ * Parse a stored or carried theme at a READ door: `ok` with the theme and
240
+ * the top-level members that were stripped (payload order, `[]` when none),
241
+ * or the issues in `path: message` form when the theme is refused for a
242
+ * reason the write door would also refuse.
243
+ */
244
+ export function parseAppThemeAtReadDoor(input) {
245
+ const r = appThemeReadSchema.safeParse(input);
246
+ if (!r.success) {
247
+ return { ok: false, issues: r.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`) };
248
+ }
249
+ const known = new Set(Object.keys(appThemeSchema.shape));
250
+ const stripped = typeof input === 'object' && input !== null && !Array.isArray(input)
251
+ ? Object.keys(input).filter((k) => !known.has(k))
252
+ : [];
253
+ return { ok: true, theme: r.data, stripped };
254
+ }
255
+ /**
256
+ * The ONE refusal body every write door returns for an overlay it will not
257
+ * store (ggui#987 §3.4): REST 422 `invalid_app_config`, the AppSync
258
+ * `errorInfo`, the MCP ops door's `{ ok: false }` structured content. A
259
+ * discriminated union by key — exactly one of the four.
260
+ */
261
+ export const appThemeRefusalBodySchema = z.union([
262
+ z.object({ uncovered: z.object({ light: z.array(z.string()), dark: z.array(z.string()) }).strict() }).strict(),
263
+ z.object({ unknown: z.object({ light: z.array(z.string()), dark: z.array(z.string()) }).strict() }).strict(),
264
+ z.object({ overlayHash: z.literal('mismatch') }).strict(),
265
+ z.object({ refused: z.literal('v1 shape') }).strict(),
266
+ ]);
@@ -11,7 +11,8 @@ import type { BlueprintSource, CuratedBlueprintSource, LlmBlueprintSource, UserB
11
11
  * Zod mirror of {@link LlmBlueprintSource} — the engine-generated arm.
12
12
  * Both provenance fields are REQUIRED: every generation mint site has
13
13
  * them in scope, and an engine-generated artifact that cannot name its
14
- * engine + model is not a real state.
14
+ * engine + model is not a real state. Since ggui#924 the identity is
15
+ * de-modeled (`ui-gen-<tier>`) and the model is the run's `ModelRef`.
15
16
  */
16
17
  export declare const llmBlueprintSourceSchema: z.ZodType<LlmBlueprintSource>;
17
18
  /** Zod mirror of {@link UserBlueprintSource} — no engine claim exists. */
@@ -1 +1 @@
1
- {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../src/schemas/blueprint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,wBAAwB,EACxB,SAAS,EACT,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAGnC;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAMvB,CAAC;AAE7C,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAExB,CAAC;AAE9C,oDAAoD;AACpD,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAE3B,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAI7B,CAAC;AAEjC;;;;;;;;;GASG;AACH,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,4DAA6D,CAAC;AAElG,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,iBAA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M7B,CAAC"}
@@ -5,18 +5,30 @@
5
5
  * here is `z.ZodType<Blueprint>` so any drift fails compile.
6
6
  */
7
7
  import { z } from 'zod';
8
+ import { isGeneratorId } from '../types/blueprint-source.js';
9
+ import { MODEL_REF_PREFIXES, isModelRef } from '../types/llm-route.js';
8
10
  import { dataContractSchema, jsonValueSchema } from './data-contract.js';
9
11
  /**
10
12
  * Zod mirror of {@link LlmBlueprintSource} — the engine-generated arm.
11
13
  * Both provenance fields are REQUIRED: every generation mint site has
12
14
  * them in scope, and an engine-generated artifact that cannot name its
13
- * engine + model is not a real state.
15
+ * engine + model is not a real state. Since ggui#924 the identity is
16
+ * de-modeled (`ui-gen-<tier>`) and the model is the run's `ModelRef`.
14
17
  */
15
18
  export const llmBlueprintSourceSchema = z
16
19
  .object({
17
20
  kind: z.literal('llm'),
18
- generator: z.string().min(1),
19
- model: z.string().min(1),
21
+ // ggui#924: the de-modeled identity and the run's `ModelRef` — a
22
+ // modeled id, a bare model name or a second spelling is refused here,
23
+ // naming the field. Template literals (not `z.custom`) so the fields
24
+ // keep their literal types AND render to JSON Schema as `pattern` —
25
+ // this schema is embedded in tool inputs that `tools/list` renders.
26
+ generator: z.templateLiteral(['ui-gen-', z.string()]).refine(isGeneratorId, {
27
+ error: 'generator is the de-modeled identity `ui-gen-<tier>` — one tier token, no model segment (e.g. `ui-gen-default`)',
28
+ }),
29
+ model: z.templateLiteral([z.enum(MODEL_REF_PREFIXES), '/', z.string()]).refine(isModelRef, {
30
+ error: 'model is the run route in the registry spelling `<prefix>/<model>` (e.g. `anthropic/claude-haiku-4-5`)',
31
+ }),
20
32
  })
21
33
  .strict();
22
34
  /** Zod mirror of {@link UserBlueprintSource} — no engine claim exists. */
@@ -7,7 +7,7 @@
7
7
  * Output-side seams that type-narrow contract on the wire —
8
8
  * `renderOutputSchema.contract` and the various `decision` echoes — use
9
9
  * `z.custom<DataContract>()` because they trust the shape (it
10
- * originates from internal pod state).
10
+ * originates from internal server state).
11
11
  *
12
12
  * The input seam is different: agents author contract on
13
13
  * `story.contract` and the handler MUST plumb them to the generator.
@@ -7,7 +7,7 @@
7
7
  * Output-side seams that type-narrow contract on the wire —
8
8
  * `renderOutputSchema.contract` and the various `decision` echoes — use
9
9
  * `z.custom<DataContract>()` because they trust the shape (it
10
- * originates from internal pod state).
10
+ * originates from internal server state).
11
11
  *
12
12
  * The input seam is different: agents author contract on
13
13
  * `story.contract` and the handler MUST plumb them to the generator.
@@ -1 +1 @@
1
- {"version":3,"file":"handshake-suggestion.d.ts","sourceRoot":"","sources":["../../src/schemas/handshake-suggestion.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAI1C,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAI7D,CAAC;AAEH,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAezB,CAAC;AAE7B,8DAA8D;AAC9D,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAsD,CAAC;AAExG;;;;;GAKG;AACH,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,gDAAiD,CAAC;AAEnF,eAAO,MAAM,0BAA0B;;;;kBAkB5B,CAAC;AAEZ,uDAAuD;AACvD,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAA2D,CAAC;AAEvH,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CASlB,CAAC;AAExC,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OA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AAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAKzB,CAAC;AAE/C,2EAA2E;AAC3E,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CASxB,CAAC"}
@@ -8,6 +8,7 @@
8
8
  * `z.ZodType<T>` so any drift fails compile.
9
9
  */
10
10
  import { z } from 'zod';
11
+ import { GENERATOR_ID_PATTERN } from '../types/blueprint-source.js';
11
12
  import { dataContractSchema, jsonValueSchema } from './data-contract.js';
12
13
  import { blueprintSourceSchema, blueprintVarianceSchema } from './blueprint.js';
13
14
  /** Three-mode routing enum on {@link HandshakeSuggestion.origin}. */
@@ -51,7 +52,13 @@ export const blueprintDraftObjectSchema = z
51
52
  // rejection message) that `blueprintMeta.variance` projects on the
52
53
  // way back out (ggui#523 item 1 — the mirror-of-a-mirror is gone).
53
54
  variance: blueprintVarianceSchema.optional(),
54
- generator: z.string().optional(),
55
+ generator: z
56
+ .string()
57
+ .regex(GENERATOR_ID_PATTERN, {
58
+ error: 'generator is an identity `ui-gen-<tier>` — one tier token, no model segment (ggui#924)',
59
+ })
60
+ .optional()
61
+ .describe('Generator identity hint — `ui-gen-default` or `ui-gen-advanced` (one tier token, no model segment). The deployment picks the model and reports it on `source.model`.'),
55
62
  }, {
56
63
  error: (issue) => issue.code === 'unrecognized_keys'
57
64
  ? `blueprintDraft: unknown key(s) ${issue.keys.map((k) => JSON.stringify(k)).join(', ')} — a draft is EXACTLY {${BLUEPRINT_DRAFT_KEYS.join(', ')}}; \`intent\` is a top-level ggui_handshake field, not a draft field, and the four specs live INSIDE \`contract\``
@@ -7,7 +7,7 @@
7
7
  * Two consumption patterns, both anchored here:
8
8
  *
9
9
  * - **Wired raw shapes** (`*InputShape`): handlers in
10
- * `@ggui-ai/mcp-server-handlers` (and the hosted pod's discover
10
+ * `@ggui-ai/mcp-server-handlers` (and a hosted deployment's discover
11
11
  * tool) import the SHAPE directly as their `inputSchema` and
12
12
  * validate with `z.object(shape)` — unknown keys are STRIPPED.
13
13
  * The shape is the one authored copy of the validation rules AND
@@ -396,13 +396,10 @@ export declare const renderRefusalSchema: z.ZodObject<{
396
396
  unsupported_provider: "unsupported_provider";
397
397
  insufficient_credit: "insufficient_credit";
398
398
  hard_cap_exceeded: "hard_cap_exceeded";
399
- model_not_in_tier: "model_not_in_tier";
399
+ model_not_allowed: "model_not_allowed";
400
400
  managed_default_cap_exceeded: "managed_default_cap_exceeded";
401
401
  app_policy_missing: "app_policy_missing";
402
402
  billing_mode_anomaly: "billing_mode_anomaly";
403
- app_canceled: "app_canceled";
404
- trial_exhausted: "trial_exhausted";
405
- trial_expired: "trial_expired";
406
403
  issuer_rate_limited: "issuer_rate_limited";
407
404
  app_rate_limited: "app_rate_limited";
408
405
  app_deprovisioned: "app_deprovisioned";
@@ -419,9 +416,16 @@ export type PreGenerationRefusal = z.infer<typeof renderRefusalSchema>;
419
416
  * from {@link MCP_ENDPOINT_REFUSAL_CODES} — today exactly
420
417
  * `app_deprovisioned`, the one refusal with a tenant-side fix and
421
418
  * therefore the one that MUST be legible where a deleted app and a bad
422
- * credential would otherwise look alike.
419
+ * credential would otherwise look alike. `appId` (ggui#870) is the app
420
+ * the refused endpoint serves, as DATA — equal to the path's `{appId}`
421
+ * — so a tenant's repair loop keys on it and never parses prose; it is
422
+ * the ggui id the bound caller already holds, never the tenant's own
423
+ * `ownerRef`. The typed refusal answers a correctly bound federated
424
+ * identity only (identity first): an anonymous request is refused by the
425
+ * auth adapter before this arm, and learns nothing about the app.
423
426
  */
424
427
  export declare const transportRefusalSchema: z.ZodObject<{
428
+ appId: z.ZodString;
425
429
  message: z.ZodString;
426
430
  fix: z.ZodString;
427
431
  retry: z.ZodEnum<{
@@ -444,7 +448,7 @@ export type TransportRefusal = z.infer<typeof transportRefusalSchema>;
444
448
  * proxy 403) and `message` `App not found`, plus `data.refusal`, which
445
449
  * makes it legible. `data` is strict: it carries the refusal and nothing
446
450
  * else. An authorization failure that is not a registry state answers
447
- * HTTP 403 with `-32001` (`UNAUTHORIZED`) and NO `data` — the three
451
+ * HTTP 403 with `-32007` (`UNAUTHORIZED`) and NO `data` — the three
448
452
  * untyped arms stay indistinguishable among themselves by contract:
449
453
  * naming any of them would say which is true. A first-party server
450
454
  * never chooses `-32000`: it is the SDK client's `ConnectionClosed`, so
@@ -455,6 +459,7 @@ export declare const transportRefusalErrorSchema: z.ZodObject<{
455
459
  message: z.ZodLiteral<"App not found">;
456
460
  data: z.ZodObject<{
457
461
  refusal: z.ZodObject<{
462
+ appId: z.ZodString;
458
463
  message: z.ZodString;
459
464
  fix: z.ZodString;
460
465
  retry: z.ZodEnum<{
@@ -507,13 +512,10 @@ export declare const refusedOutputSchema: z.ZodObject<{
507
512
  unsupported_provider: "unsupported_provider";
508
513
  insufficient_credit: "insufficient_credit";
509
514
  hard_cap_exceeded: "hard_cap_exceeded";
510
- model_not_in_tier: "model_not_in_tier";
515
+ model_not_allowed: "model_not_allowed";
511
516
  managed_default_cap_exceeded: "managed_default_cap_exceeded";
512
517
  app_policy_missing: "app_policy_missing";
513
518
  billing_mode_anomaly: "billing_mode_anomaly";
514
- app_canceled: "app_canceled";
515
- trial_exhausted: "trial_exhausted";
516
- trial_expired: "trial_expired";
517
519
  issuer_rate_limited: "issuer_rate_limited";
518
520
  app_rate_limited: "app_rate_limited";
519
521
  app_deprovisioned: "app_deprovisioned";
@@ -673,13 +675,10 @@ export declare const renderOutputSchema: z.ZodObject<{
673
675
  unsupported_provider: "unsupported_provider";
674
676
  insufficient_credit: "insufficient_credit";
675
677
  hard_cap_exceeded: "hard_cap_exceeded";
676
- model_not_in_tier: "model_not_in_tier";
678
+ model_not_allowed: "model_not_allowed";
677
679
  managed_default_cap_exceeded: "managed_default_cap_exceeded";
678
680
  app_policy_missing: "app_policy_missing";
679
681
  billing_mode_anomaly: "billing_mode_anomaly";
680
- app_canceled: "app_canceled";
681
- trial_exhausted: "trial_exhausted";
682
- trial_expired: "trial_expired";
683
682
  issuer_rate_limited: "issuer_rate_limited";
684
683
  app_rate_limited: "app_rate_limited";
685
684
  app_deprovisioned: "app_deprovisioned";
@@ -711,7 +710,7 @@ export declare const renderOutputSchema: z.ZodObject<{
711
710
  * wise). Use when most props stay the same and the agent only
712
711
  * needs to send a small delta — common after a single domain-tool
713
712
  * mutation. RFC 7396 chosen because it has a published spec and
714
- * wide library support (GitHub API, Kubernetes strategic-merge).
713
+ * wide library support (GitHub API's merge semantics, strategic-merge-patch).
715
714
  *
716
715
  * Anti-patterns (the discriminated union rejects these structurally,
717
716
  * but they're a common author mistake when copy-pasting):
@@ -724,7 +723,7 @@ export declare const renderOutputSchema: z.ZodObject<{
724
723
  * partial patches that would break required fields, type-mismatch
725
724
  * values, etc. all reject pre-persist.
726
725
  *
727
- * `sessionId` is globally unique; the server tenancy-checks via
726
+ * `sessionId` is globally unique; the server checks the app scope via
728
727
  * `ctx.appId`.
729
728
  */
730
729
  export declare const updateInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -847,11 +846,20 @@ export declare const declareToolCatalogOutputSchema: z.ZodObject<{
847
846
  */
848
847
  export declare const RUNTIME_PULL_MAX_LIMIT = 100;
849
848
  /**
850
- * Server-side ceiling on `ggui_runtime_pull`'s `wait` hold, in seconds.
851
- * Chosen under `ggui_consume`'s proven 25-second host tolerance for
852
- * held tool calls — the hold must resolve before any host-side
853
- * `tools/call` timeout fires, or the transport counts a failure the
854
- * server intended as a quiet success.
849
+ * Server-side ceiling on `ggui_runtime_pull`'s `wait` hold, in seconds —
850
+ * the LONGEST hold the server will honour, never a promise that every
851
+ * host tolerates it (ggui#1030).
852
+ *
853
+ * The contract has two sides. SERVER: honour `wait` up to this ceiling,
854
+ * return the empty page as a normal result when the hold elapses, and
855
+ * end the hold when the caller's transport closes. CALLER (the pulling
856
+ * runtime): choose a `wait` that does not exceed the `tools/call`
857
+ * timeout of the host relaying the call, minus a margin; a host that
858
+ * relays a pull clamps the forwarded `wait` to its own timeout minus one
859
+ * second. A host timeout below the hold is a caller-side failure — the
860
+ * server's `success` after the socket closed is not a server fault, and
861
+ * a caller that keeps pulling through such failures must demote to
862
+ * sparse un-held pulls exactly as it does after consecutive empties.
855
863
  */
856
864
  export declare const RUNTIME_PULL_MAX_WAIT_SECONDS = 20;
857
865
  /**
@@ -890,9 +898,9 @@ export declare const gguiSessionEventSchema: z.ZodObject<{
890
898
  * OPTIONAL here (the bridge rung owns its cursor and seeds from 0; the
891
899
  * route requires it because a bare browser GET has no cursor owner),
892
900
  * and `limit` is clamped to {@link RUNTIME_PULL_MAX_LIMIT} instead of
893
- * rejecting above it. Tenancy violations and unknown sessionIds
901
+ * rejecting above it. Cross-app access and unknown sessionIds
894
902
  * surface uniformly as the `session_not_found` error — existence of
895
- * other tenants' renders is never leaked.
903
+ * other apps' renders is never leaked.
896
904
  */
897
905
  export declare const runtimePullInputShape: {
898
906
  readonly sessionId: z.ZodString;
@@ -1119,9 +1127,9 @@ export declare const gguiSessionStatusSchema: z.ZodEnum<{
1119
1127
  /**
1120
1128
  * One drained row of `ggui_consume` — a user action that reached the
1121
1129
  * pipe (ggui#817 part C2). Closed on the wire: an unknown key is
1122
- * stripped at the transport, a missing key refuses the row at the seam
1123
- * (`parsePendingEnvelope`), so a malformed pipe entry never ships to an
1124
- * agent typed as a good one.
1130
+ * stripped at the transport, a missing key refuses the row at the store
1131
+ * boundary (`pendingEventSchema`, ggui#839), so a malformed pipe entry
1132
+ * never ships to an agent typed as a good one.
1125
1133
  */
1126
1134
  export declare const consumeEventEntrySchema: z.ZodObject<{
1127
1135
  type: z.ZodLiteral<"action">;
@@ -1132,6 +1140,33 @@ export declare const consumeEventEntrySchema: z.ZodObject<{
1132
1140
  actionId: z.ZodString;
1133
1141
  firedAt: z.ZodString;
1134
1142
  }, z.core.$strip>;
1143
+ /**
1144
+ * One stored row of the consume pipe — what a producer appends and
1145
+ * `consumeAndClear` drains, the same shape on every store (ggui#839; a
1146
+ * store-boundary contract, never wire — `ggui_consume` returns the
1147
+ * entries, never the wrapper). `id` is the drain_ack key and the
1148
+ * idempotency key per `(sessionId, id)`; `envelope` is the
1149
+ * {@link consumeEventEntrySchema} entry, always the object (every writer
1150
+ * passes one; a store that serializes the row serializes the whole row);
1151
+ * `createdAt` is when the row was appended — a string, never `.datetime()`:
1152
+ * the relay copies the client's `firedAt`, which the ingress accepts as a
1153
+ * diagnostic. `PendingEventConsumer` adapters validate every row through
1154
+ * this schema on append and, when rows come back from a serialization, on
1155
+ * drain — a malformed row never reaches an agent typed as a good entry.
1156
+ */
1157
+ export declare const pendingEventSchema: z.ZodObject<{
1158
+ id: z.ZodString;
1159
+ envelope: z.ZodObject<{
1160
+ type: z.ZodLiteral<"action">;
1161
+ sessionId: z.ZodString;
1162
+ intent: z.ZodString;
1163
+ actionData: z.ZodNullable<z.ZodType<import("../index.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("../index.js").JsonValue, unknown>>>;
1164
+ uiContext: z.ZodType<import("../index.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../index.js").JsonObject, unknown>>;
1165
+ actionId: z.ZodString;
1166
+ firedAt: z.ZodString;
1167
+ }, z.core.$strip>;
1168
+ createdAt: z.ZodString;
1169
+ }, z.core.$strip>;
1135
1170
  /**
1136
1171
  * `ggui_consume`'s output — the drained rows, the session's state, and the
1137
1172
  * client's observations when the host sent any (ggui#817 part C2). The
@@ -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;AAyBxB;;;;;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,M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