@ggui-ai/protocol 0.2.0-alpha.4 → 0.3.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.
Files changed (197) hide show
  1. package/README.md +16 -16
  2. package/dist/envelope-adapters.d.ts +6 -5
  3. package/dist/envelope-adapters.d.ts.map +1 -1
  4. package/dist/envelope-adapters.js +3 -3
  5. package/dist/envelopes/builders.d.ts +6 -32
  6. package/dist/envelopes/builders.d.ts.map +1 -1
  7. package/dist/envelopes/builders.js +3 -25
  8. package/dist/errors/version-mismatch.d.ts +1 -1
  9. package/dist/errors/version-mismatch.js +1 -1
  10. package/dist/gadgets/resolve-app-gadgets.d.ts +10 -0
  11. package/dist/gadgets/resolve-app-gadgets.d.ts.map +1 -0
  12. package/dist/gadgets/resolve-app-gadgets.js +19 -0
  13. package/dist/gadgets/resolve-contract-gadgets.d.ts +6 -6
  14. package/dist/gadgets/resolve-contract-gadgets.js +5 -5
  15. package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
  16. package/dist/gadgets/stdlib-gadgets.d.ts.map +1 -1
  17. package/dist/gadgets/stdlib-gadgets.js +43 -22
  18. package/dist/iframe-bridge.d.ts +4 -43
  19. package/dist/iframe-bridge.d.ts.map +1 -1
  20. package/dist/iframe-bridge.js +4 -141
  21. package/dist/index.d.ts +60 -62
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +66 -61
  24. package/dist/integrations/mcp-apps.d.ts +83 -38
  25. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  26. package/dist/integrations/mcp-apps.js +98 -52
  27. package/dist/recommended-prompts.d.ts +1 -1
  28. package/dist/recommended-prompts.js +1 -1
  29. package/dist/registry/blueprint-key.d.ts +3 -0
  30. package/dist/registry/blueprint-key.d.ts.map +1 -1
  31. package/dist/registry/blueprint-key.js +9 -0
  32. package/dist/registry/blueprint-stamp.d.ts +12 -0
  33. package/dist/registry/blueprint-stamp.d.ts.map +1 -0
  34. package/dist/registry/blueprint-stamp.js +12 -0
  35. package/dist/registry/canonicalize-contract.d.ts +31 -2
  36. package/dist/registry/canonicalize-contract.d.ts.map +1 -1
  37. package/dist/registry/canonicalize-contract.js +125 -13
  38. package/dist/registry/portable-blueprint.d.ts +64 -0
  39. package/dist/registry/portable-blueprint.d.ts.map +1 -0
  40. package/dist/registry/portable-blueprint.js +103 -0
  41. package/dist/registry/summarize-contract.d.ts +7 -2
  42. package/dist/registry/summarize-contract.d.ts.map +1 -1
  43. package/dist/registry/summarize-contract.js +12 -3
  44. package/dist/registry/variant-key.d.ts +17 -0
  45. package/dist/registry/variant-key.d.ts.map +1 -0
  46. package/dist/registry/variant-key.js +22 -0
  47. package/dist/schema-learning/derive-contract.d.ts +2 -2
  48. package/dist/schema-learning/derive-contract.js +2 -2
  49. package/dist/schema-learning/merge.d.ts.map +1 -1
  50. package/dist/schema-learning/merge.js +3 -2
  51. package/dist/schemas/app-theme.d.ts +38 -0
  52. package/dist/schemas/app-theme.d.ts.map +1 -0
  53. package/dist/schemas/app-theme.js +43 -0
  54. package/dist/schemas/blueprint.d.ts +30 -11
  55. package/dist/schemas/blueprint.d.ts.map +1 -1
  56. package/dist/schemas/blueprint.js +62 -26
  57. package/dist/schemas/data-contract.d.ts +28 -30
  58. package/dist/schemas/data-contract.d.ts.map +1 -1
  59. package/dist/schemas/data-contract.js +26 -26
  60. package/dist/schemas/handshake-suggestion.d.ts +2 -4
  61. package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
  62. package/dist/schemas/handshake-suggestion.js +5 -14
  63. package/dist/schemas/mcp.d.ts +240 -58
  64. package/dist/schemas/mcp.d.ts.map +1 -1
  65. package/dist/schemas/mcp.js +285 -93
  66. package/dist/schemas/ops-blueprint.d.ts +12 -12
  67. package/dist/schemas/ops-blueprint.d.ts.map +1 -1
  68. package/dist/schemas/ops-blueprint.js +14 -24
  69. package/dist/screen-blueprints/define.d.ts +2 -2
  70. package/dist/screen-blueprints/match.d.ts +12 -7
  71. package/dist/screen-blueprints/match.d.ts.map +1 -1
  72. package/dist/screen-blueprints/match.js +7 -5
  73. package/dist/screen-blueprints/types.d.ts +14 -18
  74. package/dist/screen-blueprints/types.d.ts.map +1 -1
  75. package/dist/transport/websocket.d.ts +5 -26
  76. package/dist/transport/websocket.d.ts.map +1 -1
  77. package/dist/types/app-config.d.ts +0 -1
  78. package/dist/types/app-config.d.ts.map +1 -1
  79. package/dist/types/auth.d.ts +1 -46
  80. package/dist/types/auth.d.ts.map +1 -1
  81. package/dist/types/blueprint-source.d.ts +123 -0
  82. package/dist/types/blueprint-source.d.ts.map +1 -0
  83. package/dist/types/blueprint-source.js +126 -0
  84. package/dist/types/blueprint.d.ts +25 -18
  85. package/dist/types/blueprint.d.ts.map +1 -1
  86. package/dist/types/contract-inference.d.ts +2 -43
  87. package/dist/types/contract-inference.d.ts.map +1 -1
  88. package/dist/types/data-contract.d.ts +59 -344
  89. package/dist/types/data-contract.d.ts.map +1 -1
  90. package/dist/types/data-contract.js +5 -12
  91. package/dist/types/events.d.ts +31 -69
  92. package/dist/types/events.d.ts.map +1 -1
  93. package/dist/types/{render-event.d.ts → ggui-session-event.d.ts} +15 -15
  94. package/dist/types/ggui-session-event.d.ts.map +1 -0
  95. package/dist/types/{render-event.js → ggui-session-event.js} +5 -5
  96. package/dist/types/handshake-suggestion.d.ts +49 -35
  97. package/dist/types/handshake-suggestion.d.ts.map +1 -1
  98. package/dist/types/host-context.d.ts +8 -8
  99. package/dist/types/host-context.d.ts.map +1 -1
  100. package/dist/types/host-context.js +5 -5
  101. package/dist/types/invoke.d.ts +1 -13
  102. package/dist/types/invoke.d.ts.map +1 -1
  103. package/dist/types/{canvas-lifecycle.d.ts → lifecycle.d.ts} +35 -37
  104. package/dist/types/lifecycle.d.ts.map +1 -0
  105. package/dist/types/{canvas-lifecycle.js → lifecycle.js} +12 -14
  106. package/dist/types/live-channel.d.ts +48 -104
  107. package/dist/types/live-channel.d.ts.map +1 -1
  108. package/dist/types/llm.d.ts +13 -24
  109. package/dist/types/llm.d.ts.map +1 -1
  110. package/dist/types/llm.js +23 -53
  111. package/dist/types/mcp.d.ts +55 -176
  112. package/dist/types/mcp.d.ts.map +1 -1
  113. package/dist/types/mcp.js +2 -2
  114. package/dist/types/oauth-user-id.d.ts +12 -0
  115. package/dist/types/oauth-user-id.d.ts.map +1 -0
  116. package/dist/types/oauth-user-id.js +10 -0
  117. package/dist/types/portable-blueprint.d.ts +53 -0
  118. package/dist/types/portable-blueprint.d.ts.map +1 -0
  119. package/dist/types/portable-blueprint.js +8 -0
  120. package/dist/types/{session.d.ts → render.d.ts} +51 -53
  121. package/dist/types/render.d.ts.map +1 -0
  122. package/dist/types/thread.d.ts.map +1 -1
  123. package/dist/types/thread.js +3 -3
  124. package/dist/types/ui-generator.d.ts +5 -46
  125. package/dist/types/ui-generator.d.ts.map +1 -1
  126. package/dist/types/ui-generator.js +1 -53
  127. package/dist/validation/ajv-runtime.d.ts +3 -3
  128. package/dist/validation/ajv-runtime.d.ts.map +1 -1
  129. package/dist/validation/ajv-runtime.js +6 -5
  130. package/dist/validation/contract-validator.d.ts +23 -22
  131. package/dist/validation/contract-validator.d.ts.map +1 -1
  132. package/dist/validation/contract-validator.js +28 -26
  133. package/dist/validation/cross-references.d.ts +3 -3
  134. package/dist/validation/cross-references.js +3 -3
  135. package/dist/validation/hygiene-rules.d.ts +9 -9
  136. package/dist/validation/hygiene-rules.js +13 -13
  137. package/dist/validation/is-record.d.ts +17 -0
  138. package/dist/validation/is-record.d.ts.map +1 -0
  139. package/dist/validation/is-record.js +18 -0
  140. package/dist/validation/lint-contract.d.ts +1 -1
  141. package/dist/validation/lint-contract.js +3 -3
  142. package/dist/validation/name-invariants.d.ts +4 -4
  143. package/dist/validation/name-invariants.js +4 -4
  144. package/dist/validation/reserved-channels.d.ts +43 -46
  145. package/dist/validation/reserved-channels.d.ts.map +1 -1
  146. package/dist/validation/reserved-channels.js +14 -177
  147. package/dist/validation/resolve-stream-channel.d.ts +3 -9
  148. package/dist/validation/resolve-stream-channel.d.ts.map +1 -1
  149. package/dist/validation/resolve-stream-channel.js +3 -4
  150. package/dist/validation/sanitize-error.d.ts +10 -9
  151. package/dist/validation/sanitize-error.d.ts.map +1 -1
  152. package/dist/validation/sanitize-error.js +19 -18
  153. package/dist/validation/schema-compat-invariants.d.ts +1 -1
  154. package/dist/validation/schema-compat-invariants.js +3 -3
  155. package/dist/validation/schema-meta-validation.d.ts +4 -4
  156. package/dist/validation/schema-meta-validation.d.ts.map +1 -1
  157. package/dist/validation/schema-meta-validation.js +7 -9
  158. package/dist/validation/schema-subset.d.ts +9 -8
  159. package/dist/validation/schema-subset.d.ts.map +1 -1
  160. package/dist/validation/ui-security.d.ts +0 -17
  161. package/dist/validation/ui-security.d.ts.map +1 -1
  162. package/dist/validation/ui-security.js +17 -22
  163. package/dist/validation/zod-to-json-schema.d.ts +1 -1
  164. package/dist/validation/zod-to-json-schema.d.ts.map +1 -1
  165. package/dist/validation/zod-to-json-schema.js +4 -3
  166. package/dist/version.d.ts +783 -9
  167. package/dist/version.d.ts.map +1 -1
  168. package/dist/version.js +782 -8
  169. package/package.json +2 -2
  170. package/dist/bridge/invoke-agent.d.ts +0 -65
  171. package/dist/bridge/invoke-agent.d.ts.map +0 -1
  172. package/dist/bridge/invoke-agent.js +0 -113
  173. package/dist/stream/stream-parser.d.ts +0 -62
  174. package/dist/stream/stream-parser.d.ts.map +0 -1
  175. package/dist/stream/stream-parser.js +0 -199
  176. package/dist/types/canvas-lifecycle.d.ts.map +0 -1
  177. package/dist/types/credential.d.ts +0 -41
  178. package/dist/types/credential.d.ts.map +0 -1
  179. package/dist/types/credential.js +0 -32
  180. package/dist/types/data-bindings.d.ts +0 -322
  181. package/dist/types/data-bindings.d.ts.map +0 -1
  182. package/dist/types/data-bindings.js +0 -29
  183. package/dist/types/feedback.d.ts +0 -22
  184. package/dist/types/feedback.d.ts.map +0 -1
  185. package/dist/types/feedback.js +0 -7
  186. package/dist/types/mcp-proxy.d.ts +0 -67
  187. package/dist/types/mcp-proxy.d.ts.map +0 -1
  188. package/dist/types/mcp-proxy.js +0 -46
  189. package/dist/types/openrouter-models.d.ts +0 -23
  190. package/dist/types/openrouter-models.d.ts.map +0 -1
  191. package/dist/types/openrouter-models.js +0 -4843
  192. package/dist/types/region.d.ts +0 -26
  193. package/dist/types/region.d.ts.map +0 -1
  194. package/dist/types/region.js +0 -36
  195. package/dist/types/render-event.d.ts.map +0 -1
  196. package/dist/types/session.d.ts.map +0 -1
  197. /package/dist/types/{session.js → render.js} +0 -0
@@ -45,7 +45,7 @@
45
45
  * deliberately do NOT enforce JSON Schema's full grammar at this
46
46
  * layer — that work belongs in
47
47
  * `@ggui-ai/protocol/validation/schema-subset` and runs at
48
- * push-time + blueprint-registration-time as the F4 schema
48
+ * render-time + blueprint-registration-time as the F4 schema
49
49
  * compatibility checker. Agents authoring malformed schemas surface
50
50
  * at that pass with a named violation reason; this layer's job is
51
51
  * just to accept the contract and pass it to the generator.
@@ -63,7 +63,7 @@ export declare const jsonValueSchema: z.ZodType<JsonValue>;
63
63
  * fields the TS interface enumerates. `additionalProperties` and
64
64
  * `items` are recursive — kept loose (`z.unknown()`) to avoid
65
65
  * deep `z.lazy` chains; the F4 schema-subset checker validates
66
- * full structural correctness at push time.
66
+ * full structural correctness at render time.
67
67
  */
68
68
  export declare const jsonSchemaSchema: z.ZodType<JsonSchema>;
69
69
  /**
@@ -72,7 +72,7 @@ export declare const jsonSchemaSchema: z.ZodType<JsonSchema>;
72
72
  * Shape: `{schema: {type:'string', ...}, required?, default?, ...}`.
73
73
  * The JSON Schema NEVER sits flat at the entry level — every entry's
74
74
  * schema lives in `.schema`. Authors writing `{type:'string'}` instead
75
- * of `{schema: {type:'string'}}` will hit a shape error at push time.
75
+ * of `{schema: {type:'string'}}` will hit a shape error at render time.
76
76
  */
77
77
  export declare const propEntrySchema: z.ZodObject<{
78
78
  description: z.ZodOptional<z.ZodString>;
@@ -139,7 +139,6 @@ export declare const streamChannelEntrySchema: z.ZodObject<{
139
139
  none: "none";
140
140
  }>>;
141
141
  complete: z.ZodOptional<z.ZodBoolean>;
142
- tool: z.ZodOptional<z.ZodString>;
143
142
  source: z.ZodOptional<z.ZodObject<{
144
143
  tool: z.ZodString;
145
144
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
@@ -160,7 +159,6 @@ export declare const streamSpecSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
160
159
  none: "none";
161
160
  }>>;
162
161
  complete: z.ZodOptional<z.ZodBoolean>;
163
- tool: z.ZodOptional<z.ZodString>;
164
162
  source: z.ZodOptional<z.ZodObject<{
165
163
  tool: z.ZodString;
166
164
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
@@ -184,11 +182,16 @@ export declare const contextSpecSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
184
182
  }, z.core.$strict>>;
185
183
  /** {@link AgentToolEntry} — per-tool metadata in an {@link AgentCapabilitiesSpec}. */
186
184
  export declare const agentToolEntrySchema: z.ZodObject<{
187
- description: z.ZodOptional<z.ZodString>;
185
+ serverInfo: z.ZodOptional<z.ZodObject<{
186
+ name: z.ZodString;
187
+ version: z.ZodOptional<z.ZodString>;
188
+ }, z.core.$strict>>;
189
+ toolInfo: z.ZodObject<{
190
+ inputSchema: z.ZodType<JsonSchema, unknown, z.core.$ZodTypeInternals<JsonSchema, unknown>>;
191
+ description: z.ZodOptional<z.ZodString>;
192
+ outputSchema: z.ZodOptional<z.ZodType<JsonSchema, unknown, z.core.$ZodTypeInternals<JsonSchema, unknown>>>;
193
+ }, z.core.$strict>;
188
194
  usage: z.ZodOptional<z.ZodString>;
189
- inputSchema: z.ZodOptional<z.ZodType<JsonSchema, unknown, z.core.$ZodTypeInternals<JsonSchema, unknown>>>;
190
- outputSchema: z.ZodOptional<z.ZodType<JsonSchema, unknown, z.core.$ZodTypeInternals<JsonSchema, unknown>>>;
191
- required: z.ZodOptional<z.ZodBoolean>;
192
195
  example: z.ZodOptional<z.ZodObject<{
193
196
  input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
194
197
  output: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
@@ -197,11 +200,16 @@ export declare const agentToolEntrySchema: z.ZodObject<{
197
200
  /** {@link AgentCapabilitiesSpec} — wrapper over the per-tool map. */
198
201
  export declare const agentCapabilitiesSpecSchema: z.ZodObject<{
199
202
  tools: z.ZodRecord<z.ZodString, z.ZodObject<{
200
- description: z.ZodOptional<z.ZodString>;
203
+ serverInfo: z.ZodOptional<z.ZodObject<{
204
+ name: z.ZodString;
205
+ version: z.ZodOptional<z.ZodString>;
206
+ }, z.core.$strict>>;
207
+ toolInfo: z.ZodObject<{
208
+ inputSchema: z.ZodType<JsonSchema, unknown, z.core.$ZodTypeInternals<JsonSchema, unknown>>;
209
+ description: z.ZodOptional<z.ZodString>;
210
+ outputSchema: z.ZodOptional<z.ZodType<JsonSchema, unknown, z.core.$ZodTypeInternals<JsonSchema, unknown>>>;
211
+ }, z.core.$strict>;
201
212
  usage: z.ZodOptional<z.ZodString>;
202
- inputSchema: z.ZodOptional<z.ZodType<JsonSchema, unknown, z.core.$ZodTypeInternals<JsonSchema, unknown>>>;
203
- outputSchema: z.ZodOptional<z.ZodType<JsonSchema, unknown, z.core.$ZodTypeInternals<JsonSchema, unknown>>>;
204
- required: z.ZodOptional<z.ZodBoolean>;
205
213
  example: z.ZodOptional<z.ZodObject<{
206
214
  input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
207
215
  output: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
@@ -214,7 +222,7 @@ export declare const agentCapabilitiesSpecSchema: z.ZodObject<{
214
222
  * Each key in `App.publicEnv` MUST match this pattern. The prefix is
215
223
  * the **security boundary** — operators can't accidentally stash
216
224
  * sensitive credentials under arbitrary names, and downstream consumers
217
- * (push gate, bootstrap projection, iframe shim) can rely on the
225
+ * (render gate, bootstrap projection, iframe shim) can rely on the
218
226
  * naming convention to mean "public-by-design".
219
227
  *
220
228
  * Rule: `GGUI_PUBLIC_APP_` prefix, then uppercase letters / digits /
@@ -239,7 +247,7 @@ export declare const PUBLIC_ENV_APP_KEY_RE: RegExp;
239
247
  *
240
248
  * Entries are App.publicEnv key names — `GGUI_PUBLIC_APP_*`. Wrappers
241
249
  * that declare a `requires` key must have a corresponding App-side
242
- * publicEnv value at push time (gate: `assertPublicEnvSatisfied`).
250
+ * publicEnv value at render time (gate: `assertPublicEnvSatisfied`).
243
251
  */
244
252
  export declare const gadgetRequiresSchema: z.ZodReadonly<z.ZodArray<z.ZodString>>;
245
253
  /**
@@ -302,7 +310,7 @@ export declare const SEMVER_PIN_RE: RegExp;
302
310
  * Hostname-only regex for `bundleHost` — the registry hostname (no
303
311
  * scheme, no path) that the server prepends `https://` to and
304
312
  * appends the canonical `/bundles/<scope>/<name>/<version>/{bundle.js,style.css}`
305
- * suffix to when resolving a gadget's URLs at push time.
313
+ * suffix to when resolving a gadget's URLs at render time.
306
314
  *
307
315
  * Examples that pass:
308
316
  * - `registry.ggui.ai` (spec default)
@@ -335,7 +343,7 @@ export declare const DEFAULT_BUNDLE_HOST = "registry.ggui.ai";
335
343
  * Used symmetrically by:
336
344
  * - `buildInstallCommand` (publish CLI) to emit `http://localhost:PORT`
337
345
  * in the printed `ggui gadget install ...` line.
338
- * - `resolveGadgetUrls` (push-time bootstrap derivation) to compute
346
+ * - `resolveGadgetUrls` (render-time bootstrap derivation) to compute
339
347
  * `http://localhost:PORT/bundles/...` so iframe fetches a reachable
340
348
  * URL during local-dev / sandbox-registry workflows.
341
349
  *
@@ -378,7 +386,6 @@ export declare const gadgetExportSchema: z.ZodUnion<readonly [z.ZodObject<{
378
386
  example: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
379
387
  permission: z.ZodOptional<z.ZodString>;
380
388
  gotchas: z.ZodOptional<z.ZodString>;
381
- required: z.ZodOptional<z.ZodBoolean>;
382
389
  hook: z.ZodString;
383
390
  }, z.core.$strict>, z.ZodObject<{
384
391
  description: z.ZodOptional<z.ZodString>;
@@ -386,7 +393,6 @@ export declare const gadgetExportSchema: z.ZodUnion<readonly [z.ZodObject<{
386
393
  example: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
387
394
  permission: z.ZodOptional<z.ZodString>;
388
395
  gotchas: z.ZodOptional<z.ZodString>;
389
- required: z.ZodOptional<z.ZodBoolean>;
390
396
  component: z.ZodString;
391
397
  }, z.core.$strict>]>;
392
398
  /**
@@ -417,7 +423,6 @@ export declare const strictGadgetExportSchema: z.ZodUnion<readonly [z.ZodObject<
417
423
  "screen-wake-lock": "screen-wake-lock";
418
424
  }>>;
419
425
  gotchas: z.ZodOptional<z.ZodString>;
420
- required: z.ZodOptional<z.ZodBoolean>;
421
426
  hook: z.ZodString;
422
427
  }, z.core.$strict>, z.ZodObject<{
423
428
  description: z.ZodString;
@@ -442,7 +447,6 @@ export declare const strictGadgetExportSchema: z.ZodUnion<readonly [z.ZodObject<
442
447
  "screen-wake-lock": "screen-wake-lock";
443
448
  }>>;
444
449
  gotchas: z.ZodOptional<z.ZodString>;
445
- required: z.ZodOptional<z.ZodBoolean>;
446
450
  component: z.ZodString;
447
451
  }, z.core.$strict>]>;
448
452
  /**
@@ -459,7 +463,6 @@ export declare const gadgetDescriptorSchema: z.ZodObject<{
459
463
  example: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
460
464
  permission: z.ZodOptional<z.ZodString>;
461
465
  gotchas: z.ZodOptional<z.ZodString>;
462
- required: z.ZodOptional<z.ZodBoolean>;
463
466
  hook: z.ZodString;
464
467
  }, z.core.$strict>, z.ZodObject<{
465
468
  description: z.ZodOptional<z.ZodString>;
@@ -467,7 +470,6 @@ export declare const gadgetDescriptorSchema: z.ZodObject<{
467
470
  example: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
468
471
  permission: z.ZodOptional<z.ZodString>;
469
472
  gotchas: z.ZodOptional<z.ZodString>;
470
- required: z.ZodOptional<z.ZodBoolean>;
471
473
  component: z.ZodString;
472
474
  }, z.core.$strict>]>>;
473
475
  version: z.ZodString;
@@ -519,7 +521,6 @@ export declare const strictGadgetDescriptorSchema: z.ZodObject<{
519
521
  "screen-wake-lock": "screen-wake-lock";
520
522
  }>>;
521
523
  gotchas: z.ZodOptional<z.ZodString>;
522
- required: z.ZodOptional<z.ZodBoolean>;
523
524
  hook: z.ZodString;
524
525
  }, z.core.$strict>, z.ZodObject<{
525
526
  description: z.ZodString;
@@ -544,7 +545,6 @@ export declare const strictGadgetDescriptorSchema: z.ZodObject<{
544
545
  "screen-wake-lock": "screen-wake-lock";
545
546
  }>>;
546
547
  gotchas: z.ZodOptional<z.ZodString>;
547
- required: z.ZodOptional<z.ZodBoolean>;
548
548
  component: z.ZodString;
549
549
  }, z.core.$strict>]>>;
550
550
  version: z.ZodString;
@@ -605,7 +605,6 @@ export declare const registeredGadgetDescriptorSchema: z.ZodObject<{
605
605
  "screen-wake-lock": "screen-wake-lock";
606
606
  }>>;
607
607
  gotchas: z.ZodOptional<z.ZodString>;
608
- required: z.ZodOptional<z.ZodBoolean>;
609
608
  hook: z.ZodString;
610
609
  }, z.core.$strict>, z.ZodObject<{
611
610
  description: z.ZodString;
@@ -630,7 +629,6 @@ export declare const registeredGadgetDescriptorSchema: z.ZodObject<{
630
629
  "screen-wake-lock": "screen-wake-lock";
631
630
  }>>;
632
631
  gotchas: z.ZodOptional<z.ZodString>;
633
- required: z.ZodOptional<z.ZodBoolean>;
634
632
  component: z.ZodString;
635
633
  }, z.core.$strict>]>>;
636
634
  version: z.ZodString;
@@ -654,7 +652,7 @@ export declare const registeredGadgetDescriptorSchema: z.ZodObject<{
654
652
  * The only wire-authored payload is optional intent-specific prose:
655
653
  *
656
654
  * - `description?` / `usage?` — when present the agent's prose wins
657
- * over the registered export's text; when omitted, push-time
655
+ * over the registered export's text; when omitted, render-time
658
656
  * resolution inherits the registered text verbatim.
659
657
  *
660
658
  * Everything else — `version`, transport metadata, `permission`,
@@ -691,8 +689,8 @@ export declare const gadgetPackageUseSchema: z.ZodRecord<z.ZodString, z.ZodObjec
691
689
  * the UI uses. The wire carries identity only — `(package, export
692
690
  * name)` — never `version` or transport metadata: the ggui server
693
691
  * resolves the full {@link GadgetDescriptor} from the `App.gadgets`
694
- * catalog at push time onto the `SessionStackEntry.gadgetDescriptors`
695
- * sidecar.
692
+ * catalog at render time onto the `ComponentGguiSession.gadgetDescriptors`
693
+ * sidecar (the `gadgetDescriptors` field of the `GguiSession` union member).
696
694
  *
697
695
  * `.strict()` (not `.passthrough()`): the retired `libraries` field
698
696
  * (renamed to `gadgets`) and any other stale sibling field MUST fail
@@ -1 +1 @@
1
- {"version":3,"file":"data-contract.d.ts","sourceRoot":"","sources":["../../src/schemas/data-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACX,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAYhD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CA2BlD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;kBASjB,CAAC;AAEZ,sFAAsF;AACtF,eAAO,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AO,MAAM,4BAA4B;;;;;kBAO9B,CAAC;AAEZ;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,sDAElB,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CASZ,CAAC"}
@@ -45,7 +45,7 @@
45
45
  * deliberately do NOT enforce JSON Schema's full grammar at this
46
46
  * layer — that work belongs in
47
47
  * `@ggui-ai/protocol/validation/schema-subset` and runs at
48
- * push-time + blueprint-registration-time as the F4 schema
48
+ * render-time + blueprint-registration-time as the F4 schema
49
49
  * compatibility checker. Agents authoring malformed schemas surface
50
50
  * at that pass with a named violation reason; this layer's job is
51
51
  * just to accept the contract and pass it to the generator.
@@ -75,7 +75,7 @@ export const jsonValueSchema = z.lazy(() => z.union([
75
75
  * fields the TS interface enumerates. `additionalProperties` and
76
76
  * `items` are recursive — kept loose (`z.unknown()`) to avoid
77
77
  * deep `z.lazy` chains; the F4 schema-subset checker validates
78
- * full structural correctness at push time.
78
+ * full structural correctness at render time.
79
79
  */
80
80
  export const jsonSchemaSchema = z.lazy(() => z
81
81
  .object({
@@ -109,7 +109,7 @@ export const jsonSchemaSchema = z.lazy(() => z
109
109
  * Shape: `{schema: {type:'string', ...}, required?, default?, ...}`.
110
110
  * The JSON Schema NEVER sits flat at the entry level — every entry's
111
111
  * schema lives in `.schema`. Authors writing `{type:'string'}` instead
112
- * of `{schema: {type:'string'}}` will hit a shape error at push time.
112
+ * of `{schema: {type:'string'}}` will hit a shape error at render time.
113
113
  */
114
114
  export const propEntrySchema = z
115
115
  .object({
@@ -161,7 +161,6 @@ export const streamChannelEntrySchema = z
161
161
  mode: z.enum(['append', 'replace']).optional(),
162
162
  replay: z.enum(['latest', 'all', 'none']).optional(),
163
163
  complete: z.boolean().optional(),
164
- tool: z.string().optional(),
165
164
  source: z
166
165
  .object({
167
166
  tool: z.string(),
@@ -188,18 +187,20 @@ export const contextSpecSchema = z.record(z.string(), contextEntrySchema);
188
187
  /** {@link AgentToolEntry} — per-tool metadata in an {@link AgentCapabilitiesSpec}. */
189
188
  export const agentToolEntrySchema = z
190
189
  .object({
191
- description: z.string().optional(),
192
- usage: z.string().optional(),
193
- inputSchema: jsonSchemaSchema.optional(),
194
- outputSchema: jsonSchemaSchema.optional(),
195
- required: z.boolean().optional(),
196
- example: z
190
+ // version is OPTIONAL: a Tier-2 author derives serverInfo.name from the
191
+ // mcp__<server>__ prefix and has no version; the catalog (Tier-1) fills both
192
+ // from `initialize`. name stays required — serverInfo without a name carries
193
+ // no identity.
194
+ serverInfo: z.object({ name: z.string(), version: z.string().optional() }).strict().optional(),
195
+ toolInfo: z
197
196
  .object({
198
- input: jsonValueSchema,
199
- output: jsonValueSchema,
197
+ inputSchema: jsonSchemaSchema,
198
+ description: z.string().optional(),
199
+ outputSchema: jsonSchemaSchema.optional(),
200
200
  })
201
- .strict()
202
- .optional(),
201
+ .strict(),
202
+ usage: z.string().optional(),
203
+ example: z.object({ input: jsonValueSchema, output: jsonValueSchema }).strict().optional(),
203
204
  })
204
205
  .strict();
205
206
  /** {@link AgentCapabilitiesSpec} — wrapper over the per-tool map. */
@@ -214,7 +215,7 @@ export const agentCapabilitiesSpecSchema = z
214
215
  * Each key in `App.publicEnv` MUST match this pattern. The prefix is
215
216
  * the **security boundary** — operators can't accidentally stash
216
217
  * sensitive credentials under arbitrary names, and downstream consumers
217
- * (push gate, bootstrap projection, iframe shim) can rely on the
218
+ * (render gate, bootstrap projection, iframe shim) can rely on the
218
219
  * naming convention to mean "public-by-design".
219
220
  *
220
221
  * Rule: `GGUI_PUBLIC_APP_` prefix, then uppercase letters / digits /
@@ -239,7 +240,7 @@ export const PUBLIC_ENV_APP_KEY_RE = /^GGUI_PUBLIC_APP_[A-Z0-9_]+$/;
239
240
  *
240
241
  * Entries are App.publicEnv key names — `GGUI_PUBLIC_APP_*`. Wrappers
241
242
  * that declare a `requires` key must have a corresponding App-side
242
- * publicEnv value at push time (gate: `assertPublicEnvSatisfied`).
243
+ * publicEnv value at render time (gate: `assertPublicEnvSatisfied`).
243
244
  */
244
245
  export const gadgetRequiresSchema = z
245
246
  .array(z.string().regex(PUBLIC_ENV_APP_KEY_RE))
@@ -304,7 +305,7 @@ export const SEMVER_PIN_RE = /^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/;
304
305
  * Hostname-only regex for `bundleHost` — the registry hostname (no
305
306
  * scheme, no path) that the server prepends `https://` to and
306
307
  * appends the canonical `/bundles/<scope>/<name>/<version>/{bundle.js,style.css}`
307
- * suffix to when resolving a gadget's URLs at push time.
308
+ * suffix to when resolving a gadget's URLs at render time.
308
309
  *
309
310
  * Examples that pass:
310
311
  * - `registry.ggui.ai` (spec default)
@@ -337,7 +338,7 @@ export const DEFAULT_BUNDLE_HOST = 'registry.ggui.ai';
337
338
  * Used symmetrically by:
338
339
  * - `buildInstallCommand` (publish CLI) to emit `http://localhost:PORT`
339
340
  * in the printed `ggui gadget install ...` line.
340
- * - `resolveGadgetUrls` (push-time bootstrap derivation) to compute
341
+ * - `resolveGadgetUrls` (render-time bootstrap derivation) to compute
341
342
  * `http://localhost:PORT/bundles/...` so iframe fetches a reachable
342
343
  * URL during local-dev / sandbox-registry workflows.
343
344
  *
@@ -369,13 +370,12 @@ export function bundleHostScheme(host) {
369
370
  export { HOOK_NAME_RE, COMPONENT_NAME_RE } from './gadget-name-grammar.js';
370
371
  /**
371
372
  * Per-export field shape shared by both export-schema postures —
372
- * `gotchas` + `required`. Teaching text (`description` / `usage` /
373
- * `example`) and `permission` differ between wire-permissive and
374
- * registry-strict, so they are spread per-posture below.
373
+ * `gotchas`. Teaching text (`description` / `usage` / `example`) and
374
+ * `permission` differ between wire-permissive and registry-strict, so
375
+ * they are spread per-posture below.
375
376
  */
376
377
  const baseExportFieldsShape = {
377
378
  gotchas: z.string().optional(),
378
- required: z.boolean().optional(),
379
379
  };
380
380
  /**
381
381
  * Wire-permissive per-export metadata: teaching text optional,
@@ -425,7 +425,7 @@ const basePackageFieldsShape = {
425
425
  // Shared `gadgetRequiresSchema`.
426
426
  requires: gadgetRequiresSchema.optional(),
427
427
  // HTTPS URL of the package's `.d.ts`. The handler fetches it at
428
- // push time, SRI-verifies against `typesSri`, and loads it into the
428
+ // render time, SRI-verifies against `typesSri`, and loads it into the
429
429
  // code-gen sandbox VFS. Optional at the base shape;
430
430
  // `registeredGadgetDescriptorSchema` refines it to REQUIRED for
431
431
  // non-stdlib packages.
@@ -551,7 +551,7 @@ export const registeredGadgetDescriptorSchema = strictGadgetDescriptorSchema.ref
551
551
  * The only wire-authored payload is optional intent-specific prose:
552
552
  *
553
553
  * - `description?` / `usage?` — when present the agent's prose wins
554
- * over the registered export's text; when omitted, push-time
554
+ * over the registered export's text; when omitted, render-time
555
555
  * resolution inherits the registered text verbatim.
556
556
  *
557
557
  * Everything else — `version`, transport metadata, `permission`,
@@ -595,8 +595,8 @@ export const gadgetPackageUseSchema = z
595
595
  * the UI uses. The wire carries identity only — `(package, export
596
596
  * name)` — never `version` or transport metadata: the ggui server
597
597
  * resolves the full {@link GadgetDescriptor} from the `App.gadgets`
598
- * catalog at push time onto the `SessionStackEntry.gadgetDescriptors`
599
- * sidecar.
598
+ * catalog at render time onto the `ComponentGguiSession.gadgetDescriptors`
599
+ * sidecar (the `gadgetDescriptors` field of the `GguiSession` union member).
600
600
  *
601
601
  * `.strict()` (not `.passthrough()`): the retired `libraries` field
602
602
  * (renamed to `gadgets`) and any other stale sibling field MUST fail
@@ -8,7 +8,7 @@
8
8
  * `z.ZodType<T>` so any drift fails compile.
9
9
  */
10
10
  import { z } from 'zod';
11
- import type { BlueprintDraft, BlueprintMeta, HandshakeSuggestion, JsonPatch, JsonPatchOp, PushDecision, SuggestionAmendments, SuggestionFinding, SuggestionOrigin } from '../types/handshake-suggestion.js';
11
+ import type { BlueprintDraft, BlueprintMeta, HandshakeSuggestion, JsonPatch, JsonPatchOp, SuggestionAmendments, SuggestionFinding, SuggestionOrigin } from '../types/handshake-suggestion.js';
12
12
  /** Three-mode routing enum on {@link HandshakeSuggestion.origin}. */
13
13
  export declare const suggestionOriginSchema: z.ZodType<SuggestionOrigin>;
14
14
  /** Single JSON-Patch op (RFC 6902 subset — add/remove/replace). */
@@ -31,7 +31,7 @@ export declare const blueprintDraftObjectSchema: z.ZodObject<{
31
31
  }, z.core.$strict>>;
32
32
  generator: z.ZodOptional<z.ZodString>;
33
33
  }, z.core.$strict>;
34
- /** `BlueprintDraft` — input shape on handshake + override push. */
34
+ /** `BlueprintDraft` — input shape on the handshake. */
35
35
  export declare const blueprintDraftSchema: z.ZodType<BlueprintDraft>;
36
36
  /** `BlueprintMeta` — projected onto the handshake response. */
37
37
  export declare const blueprintMetaSchema: z.ZodType<BlueprintMeta>;
@@ -41,6 +41,4 @@ export declare const suggestionFindingSchema: z.ZodType<SuggestionFinding>;
41
41
  export declare const suggestionAmendmentsSchema: z.ZodType<SuggestionAmendments>;
42
42
  /** The full handshake suggestion — produced in step-2 of the handshake. */
43
43
  export declare const handshakeSuggestionSchema: z.ZodType<HandshakeSuggestion>;
44
- /** Push decision discriminator — accept vs override. */
45
- export declare const pushDecisionSchema: z.ZodType<PushDecision>;
46
44
  //# sourceMappingURL=handshake-suggestion.d.ts.map
@@ -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,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAI1C,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAI7D,CAAC;AAEH,m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,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,eAAO,MAAM,0BAA0B;;;;;;;;;kBAc5B,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,OAAO,CAAC,iBAAiB,CAOtB,CAAC;AAE5C,qDAAqD;AACrD,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAKzB,CAAC;AAE/C,2EAA2E;AAC3E,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CASxB,CAAC"}
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { z } from 'zod';
11
11
  import { dataContractSchema, jsonValueSchema } from './data-contract.js';
12
- import { blueprintVarianceSchema } from './blueprint.js';
12
+ import { blueprintSourceSchema, blueprintVarianceSchema } from './blueprint.js';
13
13
  /** Three-mode routing enum on {@link HandshakeSuggestion.origin}. */
14
14
  export const suggestionOriginSchema = z.enum([
15
15
  'cache',
@@ -56,15 +56,15 @@ export const blueprintDraftObjectSchema = z
56
56
  generator: z.string().optional(),
57
57
  })
58
58
  .strict();
59
- /** `BlueprintDraft` — input shape on handshake + override push. */
59
+ /** `BlueprintDraft` — input shape on the handshake. */
60
60
  export const blueprintDraftSchema = blueprintDraftObjectSchema;
61
61
  /** `BlueprintMeta` — projected onto the handshake response. */
62
62
  export const blueprintMetaSchema = z
63
63
  .object({
64
- blueprintId: z.string().min(1),
64
+ blueprintId: z.string().min(1).optional(),
65
65
  contractHash: z.string().min(1),
66
66
  codeHash: z.string().optional(),
67
- generator: z.string().min(1),
67
+ source: blueprintSourceSchema.optional(),
68
68
  variance: blueprintVarianceSchema,
69
69
  selectedReason: z.string().optional(),
70
70
  })
@@ -91,17 +91,8 @@ export const handshakeSuggestionSchema = z
91
91
  origin: suggestionOriginSchema,
92
92
  rationale: z.string(),
93
93
  blueprintMeta: blueprintMetaSchema,
94
+ proposedContractSummary: z.string().optional(),
94
95
  amendments: suggestionAmendmentsSchema.optional(),
95
96
  validationFindings: z.array(suggestionFindingSchema).optional(),
96
97
  })
97
98
  .strict();
98
- /** Push decision discriminator — accept vs override. */
99
- export const pushDecisionSchema = z.union([
100
- z.object({ kind: z.literal('accept') }).strict(),
101
- z
102
- .object({
103
- kind: z.literal('override'),
104
- blueprintDraft: blueprintDraftSchema,
105
- })
106
- .strict(),
107
- ]);