@ggui-ai/protocol 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/envelope-adapters.d.ts +1 -14
  2. package/dist/envelope-adapters.d.ts.map +1 -1
  3. package/dist/envelope-adapters.js +17 -1
  4. package/dist/envelopes/render-refusal.d.ts +49 -0
  5. package/dist/envelopes/render-refusal.d.ts.map +1 -0
  6. package/dist/envelopes/render-refusal.js +12 -0
  7. package/dist/gadgets/resolve-app-gadgets.d.ts +1 -1
  8. package/dist/gadgets/stdlib-gadgets.d.ts +2 -2
  9. package/dist/gadgets/stdlib-gadgets.js +1 -1
  10. package/dist/index.d.ts +67 -60
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +10 -0
  13. package/dist/integrations/mcp-apps.d.ts +4 -10
  14. package/dist/integrations/mcp-apps.d.ts.map +1 -1
  15. package/dist/schemas/app-theme.d.ts +5 -0
  16. package/dist/schemas/app-theme.d.ts.map +1 -1
  17. package/dist/schemas/app-theme.js +23 -0
  18. package/dist/schemas/blueprint.d.ts +2 -2
  19. package/dist/schemas/data-contract.d.ts +12 -30
  20. package/dist/schemas/data-contract.d.ts.map +1 -1
  21. package/dist/schemas/data-contract.js +6 -27
  22. package/dist/schemas/interface-context.d.ts +44 -0
  23. package/dist/schemas/interface-context.d.ts.map +1 -0
  24. package/dist/schemas/interface-context.js +22 -0
  25. package/dist/schemas/invoke.d.ts +1 -1
  26. package/dist/schemas/invoke.js +1 -1
  27. package/dist/schemas/mcp.d.ts +636 -69
  28. package/dist/schemas/mcp.d.ts.map +1 -1
  29. package/dist/schemas/mcp.js +554 -47
  30. package/dist/schemas/public-env-key.d.ts +26 -0
  31. package/dist/schemas/public-env-key.d.ts.map +1 -0
  32. package/dist/schemas/public-env-key.js +25 -0
  33. package/dist/schemas/render-input-envelope.d.ts +20 -0
  34. package/dist/schemas/render-input-envelope.d.ts.map +1 -0
  35. package/dist/schemas/render-input-envelope.js +56 -0
  36. package/dist/schemas/runtime-telemetry-limits.d.ts +11 -0
  37. package/dist/schemas/runtime-telemetry-limits.d.ts.map +1 -0
  38. package/dist/schemas/runtime-telemetry-limits.js +10 -0
  39. package/dist/transport/websocket.d.ts +5 -5
  40. package/dist/types/auth.d.ts +1 -1
  41. package/dist/types/contract-inference.d.ts +1 -1
  42. package/dist/types/events.d.ts +1 -1
  43. package/dist/types/ggui-session-event.d.ts +4 -5
  44. package/dist/types/ggui-session-event.d.ts.map +1 -1
  45. package/dist/types/ggui-session-event.js +0 -37
  46. package/dist/types/host-context.d.ts +18 -17
  47. package/dist/types/host-context.d.ts.map +1 -1
  48. package/dist/types/host-context.js +7 -0
  49. package/dist/types/interface-context.d.ts +1 -1
  50. package/dist/types/invoke.d.ts +1 -1
  51. package/dist/types/lifecycle.d.ts +1 -1
  52. package/dist/types/live-channel.d.ts +2 -2
  53. package/dist/types/llm-route.d.ts +2 -2
  54. package/dist/types/llm-route.d.ts.map +1 -1
  55. package/dist/types/llm-route.js +11 -3
  56. package/dist/types/llm.d.ts +397 -7
  57. package/dist/types/llm.d.ts.map +1 -1
  58. package/dist/types/llm.js +111 -10
  59. package/dist/types/mcp.d.ts +31 -111
  60. package/dist/types/mcp.d.ts.map +1 -1
  61. package/dist/types/mcp.js +7 -0
  62. package/dist/types/readonly.d.ts +11 -0
  63. package/dist/types/readonly.d.ts.map +1 -0
  64. package/dist/types/readonly.js +1 -0
  65. package/dist/types/refusal-codes.d.ts +340 -0
  66. package/dist/types/refusal-codes.d.ts.map +1 -0
  67. package/dist/types/refusal-codes.js +346 -0
  68. package/dist/types/render.d.ts +9 -8
  69. package/dist/types/render.d.ts.map +1 -1
  70. package/dist/types/ui-generator.d.ts +1 -1
  71. package/dist/validation/ajv-runtime.d.ts +2 -2
  72. package/dist/validation/contract-validator.d.ts +6 -6
  73. package/dist/validation/cross-references.d.ts +2 -2
  74. package/dist/validation/hygiene-rules.d.ts +1 -1
  75. package/dist/validation/name-invariants.d.ts +2 -2
  76. package/dist/validation/reserved-channels.d.ts +1 -1
  77. package/dist/validation/schema-compat-invariants.d.ts +2 -2
  78. package/dist/validation/schema-meta-validation.d.ts +1 -1
  79. package/dist/version.d.ts +201 -5
  80. package/dist/version.d.ts.map +1 -1
  81. package/dist/version.js +200 -4
  82. package/dist/wire.d.ts +45 -0
  83. package/dist/wire.d.ts.map +1 -0
  84. package/dist/wire.js +44 -0
  85. package/package.json +13 -3
@@ -24,42 +24,6 @@
24
24
  * its handler imports {@link renderInputShape}.
25
25
  */
26
26
  import { z } from 'zod';
27
- export declare const viewportSchema: z.ZodObject<{
28
- width: z.ZodNumber;
29
- height: z.ZodNumber;
30
- }, z.core.$strip>;
31
- export declare const interfaceContextSchema: z.ZodObject<{
32
- viewport: z.ZodObject<{
33
- width: z.ZodNumber;
34
- height: z.ZodNumber;
35
- }, z.core.$strip>;
36
- platform: z.ZodEnum<{
37
- web: "web";
38
- desktop: "desktop";
39
- mobile: "mobile";
40
- }>;
41
- deviceType: z.ZodEnum<{
42
- desktop: "desktop";
43
- phone: "phone";
44
- tablet: "tablet";
45
- }>;
46
- orientation: z.ZodEnum<{
47
- portrait: "portrait";
48
- landscape: "landscape";
49
- }>;
50
- devicePixelRatio: z.ZodOptional<z.ZodNumber>;
51
- touchPrimary: z.ZodOptional<z.ZodBoolean>;
52
- shellType: z.ZodOptional<z.ZodEnum<{
53
- fullscreen: "fullscreen";
54
- chat: "chat";
55
- spatial: "spatial";
56
- }>>;
57
- colorScheme: z.ZodOptional<z.ZodEnum<{
58
- light: "light";
59
- dark: "dark";
60
- }>>;
61
- reducedMotion: z.ZodOptional<z.ZodBoolean>;
62
- }, z.core.$loose>;
63
27
  /**
64
28
  * `ggui_consume` input. The long-poll bound is SPEC §7.3: integer
65
29
  * seconds in `[0, 25]` — the cap dodges infrastructure kill windows
@@ -165,7 +129,7 @@ export declare const discoverInputSchema: z.ZodObject<{}, z.core.$strip>;
165
129
  */
166
130
  export declare const handshakeInputSchema: z.ZodObject<{
167
131
  intent: z.ZodString;
168
- blueprintDraft: z.ZodType<import("..").BlueprintDraft, unknown, z.core.$ZodTypeInternals<import("..").BlueprintDraft, unknown>>;
132
+ blueprintDraft: z.ZodType<import("../index.js").BlueprintDraft, unknown, z.core.$ZodTypeInternals<import("../index.js").BlueprintDraft, unknown>>;
169
133
  forceCreate: z.ZodOptional<z.ZodBoolean>;
170
134
  }, z.core.$strict>;
171
135
  /**
@@ -206,7 +170,7 @@ export declare const handshakeOutputSchema: z.ZodObject<{
206
170
  update: "update";
207
171
  declined: "declined";
208
172
  }>;
209
- suggestion: z.ZodType<import("..").HandshakeSuggestion, unknown, z.core.$ZodTypeInternals<import("..").HandshakeSuggestion, unknown>>;
173
+ suggestion: z.ZodType<import("../index.js").HandshakeSuggestion, unknown, z.core.$ZodTypeInternals<import("../index.js").HandshakeSuggestion, unknown>>;
210
174
  reason: z.ZodOptional<z.ZodString>;
211
175
  nextStep: z.ZodOptional<z.ZodObject<{
212
176
  tool: z.ZodLiteral<"ggui_render">;
@@ -269,9 +233,14 @@ export declare const renderInputShape: {
269
233
  /**
270
234
  * Typed `infra` envelope. Today carries one field (`model`); future
271
235
  * expansion (temperature, max_tokens, provider hints) lands here
272
- * additively. `model` MUST be a provider-prefixed id
273
- * (`provider/model-name`); a bound generator may also accept
274
- * generator-specific prefixes for alternate transports.
236
+ * additively. `model` MUST parse as a model route in either wire form —
237
+ * canonical `provider:model` or LiteLLM `provider/model` (aliases resolve
238
+ * in both). The mechanism is `renderInputEnvelopeSchema`
239
+ * (`schemas/render-input-envelope.ts`), which the render handler parses
240
+ * BEFORE its pre-generation gate; this registered shape stays
241
+ * parser-free by design so a browser bundle never carries the route
242
+ * tables (ggui#818). A bound generator may also accept generator-specific
243
+ * prefixes for alternate transports.
275
244
  *
276
245
  * Strict — extra keys at `infra.*` are not silently dropped, so a
277
246
  * typo (`infra.modelId`) surfaces as a clear zod path instead of a
@@ -293,8 +262,8 @@ export declare const renderInputShape: {
293
262
  * different variance resolves a distinct cached component.
294
263
  */
295
264
  readonly override: z.ZodOptional<z.ZodObject<{
296
- contract: z.ZodOptional<z.ZodType<import("..").DataContract, unknown, z.core.$ZodTypeInternals<import("..").DataContract, unknown>>>;
297
- variance: z.ZodOptional<z.ZodType<import("..").BlueprintVariance, unknown, z.core.$ZodTypeInternals<import("..").BlueprintVariance, unknown>>>;
265
+ contract: z.ZodOptional<z.ZodType<import("../index.js").DataContract, unknown, z.core.$ZodTypeInternals<import("../index.js").DataContract, unknown>>>;
266
+ variance: z.ZodOptional<z.ZodType<import("../index.js").BlueprintVariance, unknown, z.core.$ZodTypeInternals<import("../index.js").BlueprintVariance, unknown>>>;
298
267
  }, z.core.$strict>>;
299
268
  };
300
269
  export declare const renderInputSchema: z.ZodObject<{
@@ -305,8 +274,8 @@ export declare const renderInputSchema: z.ZodObject<{
305
274
  model: z.ZodOptional<z.ZodString>;
306
275
  }, z.core.$strict>>;
307
276
  override: z.ZodOptional<z.ZodObject<{
308
- contract: z.ZodOptional<z.ZodType<import("..").DataContract, unknown, z.core.$ZodTypeInternals<import("..").DataContract, unknown>>>;
309
- variance: z.ZodOptional<z.ZodType<import("..").BlueprintVariance, unknown, z.core.$ZodTypeInternals<import("..").BlueprintVariance, unknown>>>;
277
+ contract: z.ZodOptional<z.ZodType<import("../index.js").DataContract, unknown, z.core.$ZodTypeInternals<import("../index.js").DataContract, unknown>>>;
278
+ variance: z.ZodOptional<z.ZodType<import("../index.js").BlueprintVariance, unknown, z.core.$ZodTypeInternals<import("../index.js").BlueprintVariance, unknown>>>;
310
279
  }, z.core.$strict>>;
311
280
  }, z.core.$strip>;
312
281
  /**
@@ -380,6 +349,178 @@ export declare const renderErrorSchema: z.ZodObject<{
380
349
  }>;
381
350
  message: z.ZodString;
382
351
  }, z.core.$strip>;
352
+ /**
353
+ * The three outcomes a `ggui_render` result can report (SPEC §7.1,
354
+ * ggui#786). A reader branches on this rather than guessing from which
355
+ * fields happen to be present:
356
+ *
357
+ * - `rendered` — the render ran and produced an interface. The
358
+ * identity fields (`sessionId`, `action`, `contractHash`,
359
+ * `blueprintId`, `variantKey`, `cache`) are all present.
360
+ * - `failed` — generation RAN and did not produce a component. The
361
+ * error session IS committed, so the identity fields are present
362
+ * and `error` carries the classification. The handshake is
363
+ * consumed.
364
+ * - `refused` — the deployment declined the call BEFORE it did any
365
+ * work: no state read, nothing committed, no spend. (The SDK has
366
+ * already checked the call against the declared `inputSchema` —
367
+ * the claim is nothing READ, not nothing validated.) The identity
368
+ * fields are structurally ABSENT and `refusal` carries the whole
369
+ * story; the handshake is INTACT, so the same id is valid on a
370
+ * retry.
371
+ *
372
+ * Declared HERE rather than in `types/mcp.ts` (which re-exports the
373
+ * inferred type) so `types/render.ts` can reference it without a
374
+ * type-only import cycle through `types/mcp.ts` — same convention as
375
+ * {@link renderErrorCodeSchema}.
376
+ */
377
+ export declare const renderOutcomeSchema: z.ZodEnum<{
378
+ rendered: "rendered";
379
+ failed: "failed";
380
+ refused: "refused";
381
+ }>;
382
+ /** Canonical inferred type for {@link renderOutcomeSchema}. */
383
+ export type RenderOutcome = z.infer<typeof renderOutcomeSchema>;
384
+ export declare const renderRefusalSchema: z.ZodObject<{
385
+ handshake: z.ZodLiteral<"intact">;
386
+ balanceCentsAtCheck: z.ZodOptional<z.ZodNumber>;
387
+ message: z.ZodString;
388
+ fix: z.ZodString;
389
+ retry: z.ZodEnum<{
390
+ never: "never";
391
+ "after-fix": "after-fix";
392
+ "next-period": "next-period";
393
+ later: "later";
394
+ }>;
395
+ code: z.ZodEnum<{
396
+ unsupported_provider: "unsupported_provider";
397
+ insufficient_credit: "insufficient_credit";
398
+ hard_cap_exceeded: "hard_cap_exceeded";
399
+ model_not_in_tier: "model_not_in_tier";
400
+ managed_default_cap_exceeded: "managed_default_cap_exceeded";
401
+ app_policy_missing: "app_policy_missing";
402
+ billing_mode_anomaly: "billing_mode_anomaly";
403
+ app_canceled: "app_canceled";
404
+ trial_exhausted: "trial_exhausted";
405
+ trial_expired: "trial_expired";
406
+ issuer_rate_limited: "issuer_rate_limited";
407
+ app_rate_limited: "app_rate_limited";
408
+ app_deprovisioned: "app_deprovisioned";
409
+ billing_path_missing: "billing_path_missing";
410
+ }>;
411
+ }, z.core.$strip>;
412
+ /** The refusal marker, derived from {@link renderRefusalSchema}. */
413
+ export type PreGenerationRefusal = z.infer<typeof renderRefusalSchema>;
414
+ /**
415
+ * A refusal typed on the per-app MCP endpoint's authorization
416
+ * (ggui#825) — the registry projection WITHOUT the render-only fields:
417
+ * no `handshake` (nothing was handed), no `balanceCentsAtCheck`. Strict:
418
+ * a render-only field here is a bug, never a wire state. `code` draws
419
+ * from {@link MCP_ENDPOINT_REFUSAL_CODES} — today exactly
420
+ * `app_deprovisioned`, the one refusal with a tenant-side fix and
421
+ * therefore the one that MUST be legible where a deleted app and a bad
422
+ * credential would otherwise look alike.
423
+ */
424
+ export declare const transportRefusalSchema: z.ZodObject<{
425
+ message: z.ZodString;
426
+ fix: z.ZodString;
427
+ retry: z.ZodEnum<{
428
+ never: "never";
429
+ "after-fix": "after-fix";
430
+ "next-period": "next-period";
431
+ later: "later";
432
+ }>;
433
+ code: z.ZodEnum<{
434
+ app_deprovisioned: "app_deprovisioned";
435
+ }>;
436
+ }, z.core.$strict>;
437
+ /** A refusal on the per-app MCP endpoint, derived from {@link transportRefusalSchema}. */
438
+ export type TransportRefusal = z.infer<typeof transportRefusalSchema>;
439
+ /**
440
+ * The JSON-RPC error object a per-app MCP endpoint answers with when it
441
+ * refuses a request for a typed reason (ggui#825, codes ruled in
442
+ * ggui#836): HTTP 403, `code` `-32003` (`APP_NOT_FOUND` — the endpoint
443
+ * no longer serves this app, the same reading ggui's embed host gives a
444
+ * proxy 403) and `message` `App not found`, plus `data.refusal`, which
445
+ * makes it legible. `data` is strict: it carries the refusal and nothing
446
+ * else. An authorization failure that is not a registry state answers
447
+ * HTTP 403 with `-32001` (`UNAUTHORIZED`) and NO `data` — the three
448
+ * untyped arms stay indistinguishable among themselves by contract:
449
+ * naming any of them would say which is true. A first-party server
450
+ * never chooses `-32000`: it is the SDK client's `ConnectionClosed`, so
451
+ * a bare 403 and a dropped socket would share a number.
452
+ */
453
+ export declare const transportRefusalErrorSchema: z.ZodObject<{
454
+ code: z.ZodLiteral<-32003>;
455
+ message: z.ZodLiteral<"App not found">;
456
+ data: z.ZodObject<{
457
+ refusal: z.ZodObject<{
458
+ message: z.ZodString;
459
+ fix: z.ZodString;
460
+ retry: z.ZodEnum<{
461
+ never: "never";
462
+ "after-fix": "after-fix";
463
+ "next-period": "next-period";
464
+ later: "later";
465
+ }>;
466
+ code: z.ZodEnum<{
467
+ app_deprovisioned: "app_deprovisioned";
468
+ }>;
469
+ }, z.core.$strict>;
470
+ }, z.core.$strict>;
471
+ }, z.core.$strict>;
472
+ /** The typed-refusal JSON-RPC error object, derived from {@link transportRefusalErrorSchema}. */
473
+ export type TransportRefusalError = z.infer<typeof transportRefusalErrorSchema>;
474
+ /**
475
+ * The COMPLETE structuredContent of a refused tool result — the whole
476
+ * payload, not a slice of it. Strict on purpose: a refusal commits
477
+ * nothing, so ANY other key (a `sessionId`, a `resourceUri`, an
478
+ * `error`) means the projection leaked state that does not exist.
479
+ *
480
+ * Today `ggui_render` is the only tool that carries a refusing gate;
481
+ * {@link renderOutputSchema} delegates its refused arm here rather than
482
+ * restating the rules, so there is exactly ONE declaration of them.
483
+ *
484
+ * NOT reusable verbatim by a second refusing tool, despite the strict
485
+ * shape reading as generic: {@link renderRefusalSchema} REQUIRES
486
+ * `handshake: 'intact'`, and that field is render-only by
487
+ * construction — a mutation consumes no handshake, so it has nothing
488
+ * to report intact. A mutation arm therefore lands WITH its first
489
+ * emitter, sharing the facts this envelope carries (`code`, `message`,
490
+ * `fix`, `retry`, one closed registry) and carrying no `handshake`
491
+ * field at all (ggui#798).
492
+ */
493
+ export declare const refusedOutputSchema: z.ZodObject<{
494
+ outcome: z.ZodLiteral<"refused">;
495
+ refusal: z.ZodObject<{
496
+ handshake: z.ZodLiteral<"intact">;
497
+ balanceCentsAtCheck: z.ZodOptional<z.ZodNumber>;
498
+ message: z.ZodString;
499
+ fix: z.ZodString;
500
+ retry: z.ZodEnum<{
501
+ never: "never";
502
+ "after-fix": "after-fix";
503
+ "next-period": "next-period";
504
+ later: "later";
505
+ }>;
506
+ code: z.ZodEnum<{
507
+ unsupported_provider: "unsupported_provider";
508
+ insufficient_credit: "insufficient_credit";
509
+ hard_cap_exceeded: "hard_cap_exceeded";
510
+ model_not_in_tier: "model_not_in_tier";
511
+ managed_default_cap_exceeded: "managed_default_cap_exceeded";
512
+ app_policy_missing: "app_policy_missing";
513
+ billing_mode_anomaly: "billing_mode_anomaly";
514
+ app_canceled: "app_canceled";
515
+ trial_exhausted: "trial_exhausted";
516
+ trial_expired: "trial_expired";
517
+ issuer_rate_limited: "issuer_rate_limited";
518
+ app_rate_limited: "app_rate_limited";
519
+ app_deprovisioned: "app_deprovisioned";
520
+ billing_path_missing: "billing_path_missing";
521
+ }>;
522
+ }, z.core.$strip>;
523
+ }, z.core.$strict>;
383
524
  /**
384
525
  * Canonical failure codes for a `resources/read` on a render locator
385
526
  * (`ui://ggui/render/{sessionId}/{blueprintKey}`). Closed enum.
@@ -433,9 +574,10 @@ export declare const resourceReadErrorSchema: z.ZodObject<{
433
574
  detail: z.ZodOptional<z.ZodString>;
434
575
  }, z.core.$strip>;
435
576
  /**
436
- * Wire-output shape — `{sessionId, resourceUri?, action, contractHash,
437
- * cache, error?, nextStep?}`. `contractHash` (data-contract identity)
438
- * and `cache` (reuse outcome) are required wire fields on this schema.
577
+ * Wire-output shape. `outcome` is the discriminant and the only
578
+ * unconditionally required field; which of the others exist follows
579
+ * from it, per the THREE OUTCOMES section below — that section is the
580
+ * single summary of this shape, so do not restate it here.
439
581
  * The handler carries `shortCode`, `codeReady`, `handshakeId`,
440
582
  * `decision`, `contract`, `codeUrl`, `codeHash`
441
583
  * on its internal `RenderOutput` TS shape for telemetry / post-classify
@@ -449,29 +591,53 @@ export declare const resourceReadErrorSchema: z.ZodObject<{
449
591
  * `render-resource/...`). Leaving a dead URL on the wire had the model
450
592
  * hallucinating links that resolve nowhere.
451
593
  *
452
- * Failure envelope (SPEC §7.1): a failed/rejected generation returns
453
- * this same schema-conformant shape on an `isError: true` tool result —
454
- * `error` present, `resourceUri` absent (nothing mountable), no
455
- * `_meta` on the result. The error GguiSession is still committed, so
456
- * `sessionId` remains a live handle into the session channel.
594
+ * THREE OUTCOMES (SPEC §7.1, ggui#786). Every result carries
595
+ * {@link renderOutcomeSchema} on `outcome`, and the identity fields are
596
+ * present IFF something was committed — which is why they are optional
597
+ * at the schema level and pinned by the presence refinement below:
598
+ *
599
+ * - `rendered` — identity fields present; `resourceUri` present iff
600
+ * mountable; no `error`, no `refusal`.
601
+ * - `failed` — generation ran and produced nothing. Identity fields
602
+ * present (the error GguiSession IS committed, so `sessionId`
603
+ * remains a live handle into the session channel), `error`
604
+ * present, `resourceUri` absent, no `_meta` on the result. The
605
+ * handshake is consumed.
606
+ * - `refused` — the deployment declined before doing any work.
607
+ * Identity fields ABSENT, `refusal` present, no `error`, no
608
+ * `nextStep`, no `_meta`. Nothing was committed and the handshake
609
+ * is intact. The refused arm's whole envelope is
610
+ * {@link refusedOutputSchema}.
611
+ *
612
+ * The root stays ONE object with a discriminant field rather than a
613
+ * discriminated union: the MCP spec's `Tool.outputSchema` root MUST be
614
+ * a JSON Schema of type `object`, and the SDK registers zod raw shapes.
615
+ * TypeScript narrowing is via the guards at the bottom of this file
616
+ * ({@link isRenderedOutput} / {@link isFailedRenderOutput} /
617
+ * {@link isRefusedRenderOutput}), never a parallel union type.
457
618
  *
458
619
  * Post-Phase-B the `'compose'` action enum value is gone — there is no
459
620
  * stack of N renders to compose against.
460
621
  */
461
622
  export declare const renderOutputSchema: z.ZodObject<{
462
- sessionId: z.ZodString;
623
+ outcome: z.ZodEnum<{
624
+ rendered: "rendered";
625
+ failed: "failed";
626
+ refused: "refused";
627
+ }>;
628
+ sessionId: z.ZodOptional<z.ZodString>;
463
629
  resourceUri: z.ZodOptional<z.ZodString>;
464
- action: z.ZodEnum<{
630
+ action: z.ZodOptional<z.ZodEnum<{
465
631
  replace: "replace";
466
632
  create: "create";
467
633
  reuse: "reuse";
468
634
  update: "update";
469
635
  declined: "declined";
470
- }>;
471
- contractHash: z.ZodString;
472
- blueprintId: z.ZodString;
473
- variantKey: z.ZodString;
474
- cache: z.ZodObject<{
636
+ }>>;
637
+ contractHash: z.ZodOptional<z.ZodString>;
638
+ blueprintId: z.ZodOptional<z.ZodString>;
639
+ variantKey: z.ZodOptional<z.ZodString>;
640
+ cache: z.ZodOptional<z.ZodObject<{
475
641
  hit: z.ZodBoolean;
476
642
  similarity: z.ZodOptional<z.ZodNumber>;
477
643
  cachedBlueprintId: z.ZodOptional<z.ZodString>;
@@ -481,7 +647,7 @@ export declare const renderOutputSchema: z.ZodObject<{
481
647
  cold: "cold";
482
648
  }>>;
483
649
  reason: z.ZodOptional<z.ZodString>;
484
- }, z.core.$strip>;
650
+ }, z.core.$strip>>;
485
651
  error: z.ZodOptional<z.ZodObject<{
486
652
  code: z.ZodEnum<{
487
653
  PRODUCTION_FAILED: "PRODUCTION_FAILED";
@@ -492,6 +658,34 @@ export declare const renderOutputSchema: z.ZodObject<{
492
658
  }>;
493
659
  message: z.ZodString;
494
660
  }, z.core.$strip>>;
661
+ refusal: z.ZodOptional<z.ZodObject<{
662
+ handshake: z.ZodLiteral<"intact">;
663
+ balanceCentsAtCheck: z.ZodOptional<z.ZodNumber>;
664
+ message: z.ZodString;
665
+ fix: z.ZodString;
666
+ retry: z.ZodEnum<{
667
+ never: "never";
668
+ "after-fix": "after-fix";
669
+ "next-period": "next-period";
670
+ later: "later";
671
+ }>;
672
+ code: z.ZodEnum<{
673
+ unsupported_provider: "unsupported_provider";
674
+ insufficient_credit: "insufficient_credit";
675
+ hard_cap_exceeded: "hard_cap_exceeded";
676
+ model_not_in_tier: "model_not_in_tier";
677
+ managed_default_cap_exceeded: "managed_default_cap_exceeded";
678
+ app_policy_missing: "app_policy_missing";
679
+ billing_mode_anomaly: "billing_mode_anomaly";
680
+ app_canceled: "app_canceled";
681
+ trial_exhausted: "trial_exhausted";
682
+ trial_expired: "trial_expired";
683
+ issuer_rate_limited: "issuer_rate_limited";
684
+ app_rate_limited: "app_rate_limited";
685
+ app_deprovisioned: "app_deprovisioned";
686
+ billing_path_missing: "billing_path_missing";
687
+ }>;
688
+ }, z.core.$strip>>;
495
689
  nextStep: z.ZodOptional<z.ZodObject<{
496
690
  tool: z.ZodLiteral<"ggui_consume">;
497
691
  description: z.ZodString;
@@ -559,9 +753,10 @@ export declare const amendInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
559
753
  patch: z.ZodRecord<z.ZodString, z.ZodUnknown>;
560
754
  }, z.core.$strict>], "kind">;
561
755
  /**
562
- * Wire-output shape — minimal acknowledgement. The handler carries
563
- * `decision`, `contract`, `contractHash` on its internal `UpdateOutput`
564
- * TS shape — zod strips them before structuredContent serialization.
756
+ * Wire-output shape — minimal acknowledgement. This schema IS the
757
+ * handler's declared output: `ggui_update` registers `.shape` and its
758
+ * return type is `GguiUpdateOutput` (`z.infer` of this schema), so
759
+ * there is no second declaration to keep in step (ggui#798).
565
760
  *
566
761
  * Every REAL update (`updated: true`) mints a new history record and
567
762
  * its result carries the `ai.ggui/render` slice as a FULL bootable
@@ -571,6 +766,15 @@ export declare const amendInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
571
766
  * history when its higher-epoch `props_update` frame lands; the
572
767
  * in-place repaint over the live-channel ladder (WS / SSE / polling /
573
768
  * bridge-pull) is `ggui_amend`'s job.
769
+ *
770
+ * NO refusal arm (ggui#786): the pre-generation refusal envelope rides
771
+ * `ggui_render` only. There is no pre-state POLICY gate on the
772
+ * mutation tools today — nothing on this path can decline a call for
773
+ * deployment-policy reasons (a contract error still rejects a
774
+ * malformed mutation before any store read; that is a parse result,
775
+ * not a refusal) — and `handshake: 'intact'` would assert something
776
+ * meaningless on a tool that consumes no handshake. The arm lands with its first
777
+ * emitter (ggui#798), not as a mechanical port of the render one.
574
778
  */
575
779
  export declare const updateOutputSchema: z.ZodObject<{
576
780
  sessionId: z.ZodString;
@@ -587,6 +791,10 @@ export declare const updateOutputSchema: z.ZodObject<{
587
791
  * mints a record, so there is no pinned URI to return and no epoch
588
792
  * field — the history number is untouched by construction). The
589
793
  * mounted card receives the new props over the live channels.
794
+ *
795
+ * As with {@link updateOutputSchema}, this schema IS the handler's
796
+ * declared output — `ggui_amend` registers `.shape` and returns
797
+ * `GguiAmendOutput` (ggui#798).
590
798
  */
591
799
  export declare const amendOutputSchema: z.ZodObject<{
592
800
  sessionId: z.ZodString;
@@ -752,11 +960,6 @@ export declare const runtimePullOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
752
960
  reason: z.ZodLiteral<"REPLAY_HORIZON_PASSED">;
753
961
  currentSequence: z.ZodNumber;
754
962
  }, z.core.$strip>]>;
755
- /**
756
- * Per-batch event cap on `ggui_runtime_telemetry` — a bounded
757
- * fire-and-forget diagnostic channel, never a data plane.
758
- */
759
- export declare const RUNTIME_TELEMETRY_MAX_EVENTS = 40;
760
963
  /**
761
964
  * `ggui_runtime_telemetry` input — the iframe runtime's transport
762
965
  * self-report (`_meta.ui.visibility: ['app']`, view-callable only).
@@ -796,4 +999,368 @@ export declare const runtimeTelemetryInputSchema: z.ZodObject<{
796
999
  export declare const runtimeTelemetryOutputSchema: z.ZodObject<{
797
1000
  ok: z.ZodLiteral<true>;
798
1001
  }, z.core.$strip>;
1002
+ type RenderOutputValue = z.infer<typeof renderOutputSchema>;
1003
+ /** Identity fields a committed render reports. */
1004
+ type CommittedRenderIdentity = Required<Pick<RenderOutputValue, 'sessionId' | 'action' | 'contractHash' | 'blueprintId' | 'variantKey' | 'cache'>>;
1005
+ /** A render that produced an interface — identity fields present. */
1006
+ export declare function isRenderedOutput(output: RenderOutputValue): output is RenderOutputValue & {
1007
+ outcome: 'rendered';
1008
+ } & CommittedRenderIdentity;
1009
+ /**
1010
+ * A generation that RAN and produced nothing. The error session is
1011
+ * committed, so `sessionId` is a live handle and `error` classifies it.
1012
+ */
1013
+ export declare function isFailedRenderOutput(output: RenderOutputValue): output is RenderOutputValue & {
1014
+ outcome: 'failed';
1015
+ error: z.infer<typeof renderErrorSchema>;
1016
+ } & CommittedRenderIdentity;
1017
+ /**
1018
+ * A PRE-GENERATION refusal — nothing read and nothing committed, so
1019
+ * every identity field is absent and `refusal` carries the state. (Not
1020
+ * "nothing parsed": the SDK has already checked the call against the
1021
+ * tool's declared `inputSchema` by the time a gate can refuse it.)
1022
+ */
1023
+ export declare function isRefusedRenderOutput(output: RenderOutputValue): output is {
1024
+ outcome: 'refused';
1025
+ refusal: PreGenerationRefusal;
1026
+ };
1027
+ /** Display modes an MCP Apps host can render a view in (ext-apps vocabulary). */
1028
+ export declare const mcpUiDisplayModeSchema: z.ZodEnum<{
1029
+ inline: "inline";
1030
+ fullscreen: "fullscreen";
1031
+ pip: "pip";
1032
+ }>;
1033
+ /**
1034
+ * The host-context projection the iframe-runtime observes and `ggui_consume`
1035
+ * echoes (`client.hostContext`). Every field optional: a host that never
1036
+ * reports one leaves it absent — absent ⇒ the documented default.
1037
+ */
1038
+ export declare const hostContextProjectionSchema: z.ZodObject<{
1039
+ availableDisplayModes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1040
+ inline: "inline";
1041
+ fullscreen: "fullscreen";
1042
+ pip: "pip";
1043
+ }>>>;
1044
+ currentDisplayMode: z.ZodOptional<z.ZodEnum<{
1045
+ inline: "inline";
1046
+ fullscreen: "fullscreen";
1047
+ pip: "pip";
1048
+ }>>;
1049
+ containerDimensions: z.ZodOptional<z.ZodObject<{
1050
+ width: z.ZodOptional<z.ZodNumber>;
1051
+ maxWidth: z.ZodOptional<z.ZodNumber>;
1052
+ height: z.ZodOptional<z.ZodNumber>;
1053
+ maxHeight: z.ZodOptional<z.ZodNumber>;
1054
+ }, z.core.$strip>>;
1055
+ platform: z.ZodOptional<z.ZodEnum<{
1056
+ web: "web";
1057
+ desktop: "desktop";
1058
+ mobile: "mobile";
1059
+ }>>;
1060
+ deviceCapabilities: z.ZodOptional<z.ZodObject<{
1061
+ touch: z.ZodOptional<z.ZodBoolean>;
1062
+ hover: z.ZodOptional<z.ZodBoolean>;
1063
+ }, z.core.$strip>>;
1064
+ locale: z.ZodOptional<z.ZodString>;
1065
+ timeZone: z.ZodOptional<z.ZodString>;
1066
+ }, z.core.$strip>;
1067
+ /** `ggui_consume`'s `client` slice — what the runtime observed about its host. */
1068
+ export declare const clientObservationsSchema: z.ZodObject<{
1069
+ hostContext: z.ZodOptional<z.ZodObject<{
1070
+ availableDisplayModes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1071
+ inline: "inline";
1072
+ fullscreen: "fullscreen";
1073
+ pip: "pip";
1074
+ }>>>;
1075
+ currentDisplayMode: z.ZodOptional<z.ZodEnum<{
1076
+ inline: "inline";
1077
+ fullscreen: "fullscreen";
1078
+ pip: "pip";
1079
+ }>>;
1080
+ containerDimensions: z.ZodOptional<z.ZodObject<{
1081
+ width: z.ZodOptional<z.ZodNumber>;
1082
+ maxWidth: z.ZodOptional<z.ZodNumber>;
1083
+ height: z.ZodOptional<z.ZodNumber>;
1084
+ maxHeight: z.ZodOptional<z.ZodNumber>;
1085
+ }, z.core.$strip>>;
1086
+ platform: z.ZodOptional<z.ZodEnum<{
1087
+ web: "web";
1088
+ desktop: "desktop";
1089
+ mobile: "mobile";
1090
+ }>>;
1091
+ deviceCapabilities: z.ZodOptional<z.ZodObject<{
1092
+ touch: z.ZodOptional<z.ZodBoolean>;
1093
+ hover: z.ZodOptional<z.ZodBoolean>;
1094
+ }, z.core.$strip>>;
1095
+ locale: z.ZodOptional<z.ZodString>;
1096
+ timeZone: z.ZodOptional<z.ZodString>;
1097
+ }, z.core.$strip>>;
1098
+ }, z.core.$strip>;
1099
+ /** One row of `ggui_list_sessions` — eight closed keys; nothing passes through. */
1100
+ export declare const gguiSessionSummaryWireSchema: z.ZodObject<{
1101
+ sessionId: z.ZodString;
1102
+ hostName: z.ZodOptional<z.ZodString>;
1103
+ hostSessionId: z.ZodOptional<z.ZodString>;
1104
+ createdAt: z.ZodString;
1105
+ lastActivityAt: z.ZodString;
1106
+ status: z.ZodString;
1107
+ wsToken: z.ZodOptional<z.ZodString>;
1108
+ wsTokenExpiresAt: z.ZodOptional<z.ZodString>;
1109
+ }, z.core.$strip>;
1110
+ /**
1111
+ * The two states a GguiSession is in on the wire — the pair the consume
1112
+ * loop exits on (`expired`). Owned here (ggui#817 part C2); the type is
1113
+ * derived, never a second list.
1114
+ */
1115
+ export declare const gguiSessionStatusSchema: z.ZodEnum<{
1116
+ active: "active";
1117
+ expired: "expired";
1118
+ }>;
1119
+ /**
1120
+ * One drained row of `ggui_consume` — a user action that reached the
1121
+ * 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.
1125
+ */
1126
+ export declare const consumeEventEntrySchema: z.ZodObject<{
1127
+ type: z.ZodLiteral<"action">;
1128
+ sessionId: z.ZodString;
1129
+ intent: z.ZodString;
1130
+ actionData: z.ZodNullable<z.ZodType<import("../index.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("../index.js").JsonValue, unknown>>>;
1131
+ uiContext: z.ZodType<import("../index.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../index.js").JsonObject, unknown>>;
1132
+ actionId: z.ZodString;
1133
+ firedAt: z.ZodString;
1134
+ }, z.core.$strip>;
1135
+ /**
1136
+ * `ggui_consume`'s output — the drained rows, the session's state, and the
1137
+ * client's observations when the host sent any (ggui#817 part C2). The
1138
+ * handler registers `.shape`; `tools/list` therefore advertises the entry
1139
+ * vocabulary and the status enum instead of a free-form record and a free
1140
+ * string.
1141
+ */
1142
+ export declare const gguiConsumeOutputSchema: z.ZodObject<{
1143
+ events: z.ZodArray<z.ZodObject<{
1144
+ type: z.ZodLiteral<"action">;
1145
+ sessionId: z.ZodString;
1146
+ intent: z.ZodString;
1147
+ actionData: z.ZodNullable<z.ZodType<import("../index.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("../index.js").JsonValue, unknown>>>;
1148
+ uiContext: z.ZodType<import("../index.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../index.js").JsonObject, unknown>>;
1149
+ actionId: z.ZodString;
1150
+ firedAt: z.ZodString;
1151
+ }, z.core.$strip>>;
1152
+ status: z.ZodEnum<{
1153
+ active: "active";
1154
+ expired: "expired";
1155
+ }>;
1156
+ client: z.ZodOptional<z.ZodObject<{
1157
+ hostContext: z.ZodOptional<z.ZodObject<{
1158
+ availableDisplayModes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1159
+ inline: "inline";
1160
+ fullscreen: "fullscreen";
1161
+ pip: "pip";
1162
+ }>>>;
1163
+ currentDisplayMode: z.ZodOptional<z.ZodEnum<{
1164
+ inline: "inline";
1165
+ fullscreen: "fullscreen";
1166
+ pip: "pip";
1167
+ }>>;
1168
+ containerDimensions: z.ZodOptional<z.ZodObject<{
1169
+ width: z.ZodOptional<z.ZodNumber>;
1170
+ maxWidth: z.ZodOptional<z.ZodNumber>;
1171
+ height: z.ZodOptional<z.ZodNumber>;
1172
+ maxHeight: z.ZodOptional<z.ZodNumber>;
1173
+ }, z.core.$strip>>;
1174
+ platform: z.ZodOptional<z.ZodEnum<{
1175
+ web: "web";
1176
+ desktop: "desktop";
1177
+ mobile: "mobile";
1178
+ }>>;
1179
+ deviceCapabilities: z.ZodOptional<z.ZodObject<{
1180
+ touch: z.ZodOptional<z.ZodBoolean>;
1181
+ hover: z.ZodOptional<z.ZodBoolean>;
1182
+ }, z.core.$strip>>;
1183
+ locale: z.ZodOptional<z.ZodString>;
1184
+ timeZone: z.ZodOptional<z.ZodString>;
1185
+ }, z.core.$strip>>;
1186
+ }, z.core.$strip>>;
1187
+ }, z.core.$strip>;
1188
+ /** `ggui_list_sessions`' output — the closed summary rows (ggui#817 part C2). */
1189
+ export declare const gguiListSessionsOutputSchema: z.ZodObject<{
1190
+ sessions: z.ZodArray<z.ZodObject<{
1191
+ sessionId: z.ZodString;
1192
+ hostName: z.ZodOptional<z.ZodString>;
1193
+ hostSessionId: z.ZodOptional<z.ZodString>;
1194
+ createdAt: z.ZodString;
1195
+ lastActivityAt: z.ZodString;
1196
+ status: z.ZodString;
1197
+ wsToken: z.ZodOptional<z.ZodString>;
1198
+ wsTokenExpiresAt: z.ZodOptional<z.ZodString>;
1199
+ }, z.core.$strip>>;
1200
+ }, z.core.$strip>;
1201
+ /**
1202
+ * `ggui_emit`'s output (ggui#817 part C2): `accepted` at the boundary, and
1203
+ * `seq` when the server keeps a stream buffer — seq-aware implementations
1204
+ * stamp and return it so replay cursors can be built from the ack.
1205
+ */
1206
+ export declare const gguiEmitOutputSchema: z.ZodObject<{
1207
+ accepted: z.ZodBoolean;
1208
+ seq: z.ZodOptional<z.ZodNumber>;
1209
+ }, z.core.$strip>;
1210
+ /**
1211
+ * `ggui_get_session`'s wire: the store row's six base fields plus the mount
1212
+ * variant — for EVERY session. An MCP-Apps mount is locator-only on the
1213
+ * render object, but its store row carries the base fields, so the
1214
+ * projection reads them from the row and the wire never fails on that
1215
+ * variant. The locator itself is not on this wire (MCP-Apps resources have
1216
+ * their own paths).
1217
+ * `contextSnapshot` rides when a component (`render`) mount's row has one —
1218
+ * never on an mcpApps mount.
1219
+ */
1220
+ export declare const gguiGetSessionOutputSchema: z.ZodObject<{
1221
+ variant: z.ZodEnum<{
1222
+ render: "render";
1223
+ mcpApps: "mcpApps";
1224
+ }>;
1225
+ id: z.ZodString;
1226
+ appId: z.ZodString;
1227
+ eventSequence: z.ZodNumber;
1228
+ createdAt: z.ZodNumber;
1229
+ lastActivityAt: z.ZodNumber;
1230
+ expiresAt: z.ZodNumber;
1231
+ contextSnapshot: z.ZodOptional<z.ZodType<import("../index.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("../index.js").JsonObject, unknown>>>;
1232
+ }, z.core.$strip>;
1233
+ /** The three sequential gates of `ggui_protocol_validate_blueprint`. */
1234
+ export declare const blueprintValidationTierSchema: z.ZodEnum<{
1235
+ compile: "compile";
1236
+ selfCheck: "selfCheck";
1237
+ runtime: "runtime";
1238
+ }>;
1239
+ export declare const blueprintValidationIssueSchema: z.ZodObject<{
1240
+ tier: z.ZodEnum<{
1241
+ compile: "compile";
1242
+ selfCheck: "selfCheck";
1243
+ runtime: "runtime";
1244
+ }>;
1245
+ code: z.ZodString;
1246
+ message: z.ZodString;
1247
+ fix: z.ZodOptional<z.ZodString>;
1248
+ }, z.core.$strip>;
1249
+ /** `ggui_protocol_validate_blueprint`'s result envelope: `failedAt` names the tier that stopped, or null. */
1250
+ export declare const blueprintValidationResultSchema: z.ZodObject<{
1251
+ valid: z.ZodBoolean;
1252
+ failedAt: z.ZodNullable<z.ZodEnum<{
1253
+ compile: "compile";
1254
+ selfCheck: "selfCheck";
1255
+ runtime: "runtime";
1256
+ }>>;
1257
+ errors: z.ZodArray<z.ZodObject<{
1258
+ tier: z.ZodEnum<{
1259
+ compile: "compile";
1260
+ selfCheck: "selfCheck";
1261
+ runtime: "runtime";
1262
+ }>;
1263
+ code: z.ZodString;
1264
+ message: z.ZodString;
1265
+ fix: z.ZodOptional<z.ZodString>;
1266
+ }, z.core.$strip>>;
1267
+ warnings: z.ZodArray<z.ZodObject<{
1268
+ tier: z.ZodEnum<{
1269
+ compile: "compile";
1270
+ selfCheck: "selfCheck";
1271
+ runtime: "runtime";
1272
+ }>;
1273
+ code: z.ZodString;
1274
+ message: z.ZodString;
1275
+ fix: z.ZodOptional<z.ZodString>;
1276
+ }, z.core.$strip>>;
1277
+ }, z.core.$strip>;
1278
+ /** A provider row — what `ggui_list_featured_blueprints` returns per blueprint. */
1279
+ export declare const blueprintEntryWireSchema: z.ZodObject<{
1280
+ id: z.ZodString;
1281
+ name: z.ZodString;
1282
+ description: z.ZodOptional<z.ZodString>;
1283
+ source: z.ZodType<import("../index.js").BlueprintSource, unknown, z.core.$ZodTypeInternals<import("../index.js").BlueprintSource, unknown>>;
1284
+ updatedAt: z.ZodString;
1285
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1286
+ }, z.core.$strip>;
1287
+ export declare const gguiListFeaturedBlueprintsOutputSchema: z.ZodObject<{
1288
+ blueprints: z.ZodArray<z.ZodObject<{
1289
+ id: z.ZodString;
1290
+ name: z.ZodString;
1291
+ description: z.ZodOptional<z.ZodString>;
1292
+ source: z.ZodType<import("../index.js").BlueprintSource, unknown, z.core.$ZodTypeInternals<import("../index.js").BlueprintSource, unknown>>;
1293
+ updatedAt: z.ZodString;
1294
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1295
+ }, z.core.$strip>>;
1296
+ total: z.ZodNumber;
1297
+ }, z.core.$strip>;
1298
+ /** One `ggui_search_blueprints` hit — a scored row plus the registry-only keys. */
1299
+ export declare const gguiSearchBlueprintsResultSchema: z.ZodObject<{
1300
+ id: z.ZodString;
1301
+ name: z.ZodString;
1302
+ description: z.ZodString;
1303
+ category: z.ZodString;
1304
+ props: z.ZodArray<z.ZodObject<{
1305
+ name: z.ZodString;
1306
+ type: z.ZodString;
1307
+ required: z.ZodBoolean;
1308
+ description: z.ZodString;
1309
+ }, z.core.$strip>>;
1310
+ callbacks: z.ZodArray<z.ZodString>;
1311
+ featured: z.ZodBoolean;
1312
+ relevance: z.ZodLiteral<"match">;
1313
+ score: z.ZodNumber;
1314
+ origin: z.ZodOptional<z.ZodLiteral<"registry">>;
1315
+ artifactId: z.ZodOptional<z.ZodString>;
1316
+ version: z.ZodOptional<z.ZodString>;
1317
+ mcpTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1318
+ server: z.ZodOptional<z.ZodString>;
1319
+ tool: z.ZodString;
1320
+ }, z.core.$strip>>>;
1321
+ scopeVerification: z.ZodOptional<z.ZodEnum<{
1322
+ verified: "verified";
1323
+ unverified: "unverified";
1324
+ }>>;
1325
+ }, z.core.$strip>;
1326
+ export declare const gguiSearchBlueprintsOutputSchema: z.ZodObject<{
1327
+ results: z.ZodArray<z.ZodObject<{
1328
+ id: z.ZodString;
1329
+ name: z.ZodString;
1330
+ description: z.ZodString;
1331
+ category: z.ZodString;
1332
+ props: z.ZodArray<z.ZodObject<{
1333
+ name: z.ZodString;
1334
+ type: z.ZodString;
1335
+ required: z.ZodBoolean;
1336
+ description: z.ZodString;
1337
+ }, z.core.$strip>>;
1338
+ callbacks: z.ZodArray<z.ZodString>;
1339
+ featured: z.ZodBoolean;
1340
+ relevance: z.ZodLiteral<"match">;
1341
+ score: z.ZodNumber;
1342
+ origin: z.ZodOptional<z.ZodLiteral<"registry">>;
1343
+ artifactId: z.ZodOptional<z.ZodString>;
1344
+ version: z.ZodOptional<z.ZodString>;
1345
+ mcpTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1346
+ server: z.ZodOptional<z.ZodString>;
1347
+ tool: z.ZodString;
1348
+ }, z.core.$strip>>>;
1349
+ scopeVerification: z.ZodOptional<z.ZodEnum<{
1350
+ verified: "verified";
1351
+ unverified: "unverified";
1352
+ }>>;
1353
+ }, z.core.$strip>>;
1354
+ total: z.ZodNumber;
1355
+ query: z.ZodString;
1356
+ degradedSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
1357
+ source: z.ZodLiteral<"registry">;
1358
+ reason: z.ZodEnum<{
1359
+ timeout: "timeout";
1360
+ unreachable: "unreachable";
1361
+ invalid_response: "invalid_response";
1362
+ }>;
1363
+ }, z.core.$strip>>>;
1364
+ }, z.core.$strip>;
1365
+ export {};
799
1366
  //# sourceMappingURL=mcp.d.ts.map