@ggui-ai/protocol 0.1.0-rc.3 → 0.2.0-alpha.1
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.
- package/README.md +3 -3
- package/dist/bridge/invoke-agent.d.ts +8 -8
- package/dist/bridge/invoke-agent.d.ts.map +1 -1
- package/dist/bridge/invoke-agent.js +12 -12
- package/dist/envelopes/builders.d.ts +2 -4
- package/dist/envelopes/builders.d.ts.map +1 -1
- package/dist/envelopes/builders.js +2 -6
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/integrations/mcp-apps.d.ts +354 -711
- package/dist/integrations/mcp-apps.d.ts.map +1 -1
- package/dist/integrations/mcp-apps.js +266 -208
- package/dist/recommended-prompts.d.ts +1 -1
- package/dist/recommended-prompts.js +1 -1
- package/dist/schemas/data-contract.d.ts +4 -3
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +4 -3
- package/dist/schemas/invoke.d.ts +2 -2
- package/dist/schemas/invoke.js +2 -2
- package/dist/schemas/mcp.d.ts +60 -79
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +93 -116
- package/dist/schemas/sync-check.js +1 -1
- package/dist/stream/stream-parser.d.ts +4 -4
- package/dist/stream/stream-parser.d.ts.map +1 -1
- package/dist/stream/stream-parser.js +9 -9
- package/dist/transport/websocket.d.ts +14 -49
- package/dist/transport/websocket.d.ts.map +1 -1
- package/dist/types/app-config.d.ts +17 -32
- package/dist/types/app-config.d.ts.map +1 -1
- package/dist/types/canvas-lifecycle.d.ts +13 -13
- package/dist/types/canvas-lifecycle.d.ts.map +1 -1
- package/dist/types/canvas-lifecycle.js +3 -3
- package/dist/types/contract-inference.d.ts +4 -7
- package/dist/types/contract-inference.d.ts.map +1 -1
- package/dist/types/data-bindings.d.ts +1 -1
- package/dist/types/data-bindings.d.ts.map +1 -1
- package/dist/types/data-contract.d.ts +10 -10
- package/dist/types/data-contract.d.ts.map +1 -1
- package/dist/types/events.d.ts +14 -56
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/events.js +1 -8
- package/dist/types/feedback.d.ts +2 -4
- package/dist/types/feedback.d.ts.map +1 -1
- package/dist/types/handshake-suggestion.d.ts +1 -1
- package/dist/types/host-context.d.ts +5 -15
- package/dist/types/host-context.d.ts.map +1 -1
- package/dist/types/host-context.js +1 -1
- package/dist/types/live-channel.d.ts +128 -191
- package/dist/types/live-channel.d.ts.map +1 -1
- package/dist/types/llm-route.d.ts +233 -0
- package/dist/types/llm-route.d.ts.map +1 -0
- package/dist/types/llm-route.js +433 -0
- package/dist/types/llm.d.ts +34 -16
- package/dist/types/llm.d.ts.map +1 -1
- package/dist/types/llm.js +34 -38
- package/dist/types/mcp.d.ts +47 -137
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +2 -2
- package/dist/types/openrouter-models.d.ts +3 -2
- package/dist/types/openrouter-models.d.ts.map +1 -1
- package/dist/types/render-event.d.ts +119 -0
- package/dist/types/render-event.d.ts.map +1 -0
- package/dist/types/render-event.js +38 -0
- package/dist/types/session.d.ts +216 -342
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/ui-generator.d.ts +8 -9
- package/dist/types/ui-generator.d.ts.map +1 -1
- package/dist/validation/contract-validator.d.ts +60 -4
- package/dist/validation/contract-validator.d.ts.map +1 -1
- package/dist/validation/contract-validator.js +101 -5
- package/dist/validation/reserved-channels.d.ts +1 -1
- package/dist/validation/reserved-channels.js +5 -5
- package/dist/validation/sanitize-error.js +1 -1
- package/dist/validation/schema-compat-invariants.d.ts +2 -2
- package/dist/validation/schema-compat-invariants.js +2 -2
- package/dist/validation/schema-meta-validation.d.ts +1 -1
- package/dist/validation/schema-meta-validation.js +2 -2
- package/dist/validation/schema-subset.d.ts +1 -1
- package/dist/version.d.ts +253 -46
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +253 -46
- package/package.json +3 -2
- package/dist/navigation/index.d.ts +0 -3
- package/dist/navigation/index.d.ts.map +0 -1
- package/dist/navigation/index.js +0 -1
- package/dist/navigation/stack-navigation.d.ts +0 -55
- package/dist/navigation/stack-navigation.d.ts.map +0 -1
- package/dist/navigation/stack-navigation.js +0 -80
|
@@ -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,MAAM,eAAe;;;;;;;;;;kBAKjB,CAAC;AAEZ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;kBAUnB,CAAC;AAEZ,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB;;;;;;;;mBAA0C,CAAC;AAExE,iFAAiF;AACjF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;kBAiB1B,CAAC;AAEZ,uEAAuE;AACvE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;mBAAiD,CAAC;AAE/E,yEAAyE;AACzE,eAAO,MAAM,kBAAkB;;;;;;kBAQpB,CAAC;AAEZ,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB;;;;;;mBAA2C,CAAC;AAE1E,sFAAsF;AAC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;;;;;;oBAanC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKxB,CAAC;AAEZ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAK9B,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAU1C,CAAC;AAOJ;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB;;;kBAKvB,CAAC;AAEZ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;mBAa/B,CAAC;AAEL;;;;;;;;;;;;;;;GAeG;AACH,eAAO,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"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ## Why this file exists
|
|
6
6
|
*
|
|
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
10
|
* originates from internal pod state).
|
|
11
11
|
*
|
|
@@ -617,7 +617,8 @@ export const clientCapabilitiesSpecSchema = z
|
|
|
617
617
|
* Consumed by:
|
|
618
618
|
* - OSS `ggui.json#app.publicEnv` boot-time parse.
|
|
619
619
|
* - Cloud AppRecord persistence layer.
|
|
620
|
-
* - Defensive re-validation in
|
|
620
|
+
* - Defensive re-validation in the iframe-runtime slice-meta
|
|
621
|
+
* extractors (`parseMetaFromGlobal`, `parseMetaFromToolResult`).
|
|
621
622
|
*/
|
|
622
623
|
export const appPublicEnvSchema = z
|
|
623
624
|
.record(z.string().regex(PUBLIC_ENV_APP_KEY_RE), z.string())
|
|
@@ -648,7 +649,7 @@ export const appPublicEnvSchema = z
|
|
|
648
649
|
* `passthrough()` lets unknown fields ride through without rejection
|
|
649
650
|
* — forward-compatible with future protocol additions, and matches
|
|
650
651
|
* the protocol's general "input-shape lax / validator-shape strict"
|
|
651
|
-
* posture (`handshakeInputSchema`, `
|
|
652
|
+
* posture (`handshakeInputSchema`, `renderInputSchema`, etc. all
|
|
652
653
|
* `passthrough` for the same reason).
|
|
653
654
|
*/
|
|
654
655
|
export const dataContractSchema = z
|
package/dist/schemas/invoke.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const toolUseBlockSchema: z.ZodObject<{
|
|
|
28
28
|
* Tool execution result (Protocol v1.1).
|
|
29
29
|
*
|
|
30
30
|
* Emitted inline on the assistant turn when the server executed a tool on
|
|
31
|
-
* the agent's behalf (e.g. `
|
|
31
|
+
* the agent's behalf (e.g. `ggui_render`, `ggui_handshake`). Clients pair this
|
|
32
32
|
* with the matching `tool_use` by `tool_use_id` and render — no second
|
|
33
33
|
* round-trip through a `ggui_render` client tool is needed.
|
|
34
34
|
*
|
|
@@ -276,7 +276,7 @@ export declare const invokeTurnSchema: z.ZodObject<{
|
|
|
276
276
|
*
|
|
277
277
|
* Stateless by default — client holds history, sends full `history[]` every
|
|
278
278
|
* turn. Agents that need server-side memory layer their own keyed on
|
|
279
|
-
* `X-Ggui-Session-Id`.
|
|
279
|
+
* `X-Ggui-Host-Session-Id`.
|
|
280
280
|
*/
|
|
281
281
|
export declare const invokeRequestSchema: z.ZodObject<{
|
|
282
282
|
message: z.ZodString;
|
package/dist/schemas/invoke.js
CHANGED
|
@@ -30,7 +30,7 @@ export const toolUseBlockSchema = z.object({
|
|
|
30
30
|
* Tool execution result (Protocol v1.1).
|
|
31
31
|
*
|
|
32
32
|
* Emitted inline on the assistant turn when the server executed a tool on
|
|
33
|
-
* the agent's behalf (e.g. `
|
|
33
|
+
* the agent's behalf (e.g. `ggui_render`, `ggui_handshake`). Clients pair this
|
|
34
34
|
* with the matching `tool_use` by `tool_use_id` and render — no second
|
|
35
35
|
* round-trip through a `ggui_render` client tool is needed.
|
|
36
36
|
*
|
|
@@ -159,7 +159,7 @@ export const invokeTurnSchema = z.object({
|
|
|
159
159
|
*
|
|
160
160
|
* Stateless by default — client holds history, sends full `history[]` every
|
|
161
161
|
* turn. Agents that need server-side memory layer their own keyed on
|
|
162
|
-
* `X-Ggui-Session-Id`.
|
|
162
|
+
* `X-Ggui-Host-Session-Id`.
|
|
163
163
|
*/
|
|
164
164
|
export const invokeRequestSchema = z.object({
|
|
165
165
|
message: z.string(),
|
package/dist/schemas/mcp.d.ts
CHANGED
|
@@ -42,11 +42,8 @@ export declare const interfaceContextSchema: z.ZodObject<{
|
|
|
42
42
|
}>>;
|
|
43
43
|
reducedMotion: z.ZodOptional<z.ZodBoolean>;
|
|
44
44
|
}, z.core.$loose>;
|
|
45
|
-
export declare const popInputSchema: z.ZodObject<{
|
|
46
|
-
sessionId: z.ZodString;
|
|
47
|
-
}, z.core.$strict>;
|
|
48
45
|
export declare const consumeInputSchema: z.ZodObject<{
|
|
49
|
-
|
|
46
|
+
renderId: z.ZodString;
|
|
50
47
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
51
48
|
}, z.core.$strict>;
|
|
52
49
|
/**
|
|
@@ -54,20 +51,13 @@ export declare const consumeInputSchema: z.ZodObject<{
|
|
|
54
51
|
* `streamSpec[channel]`.
|
|
55
52
|
*/
|
|
56
53
|
export declare const emitInputSchema: z.ZodObject<{
|
|
57
|
-
|
|
54
|
+
renderId: z.ZodString;
|
|
58
55
|
channel: z.ZodString;
|
|
59
56
|
payload: z.ZodUnknown;
|
|
60
57
|
complete: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
-
stackItemId: z.ZodOptional<z.ZodString>;
|
|
62
|
-
}, z.core.$strict>;
|
|
63
|
-
export declare const getSessionInputSchema: z.ZodObject<{
|
|
64
|
-
sessionId: z.ZodString;
|
|
65
58
|
}, z.core.$strict>;
|
|
66
|
-
export declare const
|
|
67
|
-
|
|
68
|
-
}, z.core.$strict>;
|
|
69
|
-
export declare const closeInputSchema: z.ZodObject<{
|
|
70
|
-
sessionId: z.ZodString;
|
|
59
|
+
export declare const getRenderInputSchema: z.ZodObject<{
|
|
60
|
+
renderId: z.ZodString;
|
|
71
61
|
}, z.core.$strict>;
|
|
72
62
|
export declare const listFeaturedBlueprintsInputSchema: z.ZodObject<{
|
|
73
63
|
level: z.ZodOptional<z.ZodEnum<{
|
|
@@ -92,33 +82,8 @@ export declare const discoverInputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
|
92
82
|
export declare const requestCredentialInputSchema: z.ZodObject<{
|
|
93
83
|
serviceId: z.ZodString;
|
|
94
84
|
reason: z.ZodOptional<z.ZodString>;
|
|
95
|
-
|
|
85
|
+
renderId: z.ZodOptional<z.ZodString>;
|
|
96
86
|
}, z.core.$strict>;
|
|
97
|
-
/**
|
|
98
|
-
* `ggui_new_session` — mint or resolve a chat-scoped session handle.
|
|
99
|
-
*
|
|
100
|
-
* Server-mints, agent-threads. SEP-2567 aligned ("Sessionless MCP",
|
|
101
|
-
* Final 2026-03-11): the MCP spec deliberately removes Mcp-Session-Id
|
|
102
|
-
* because hosts can't agree on what a session means; the recommended
|
|
103
|
-
* pattern is exactly this — server returns explicit handles, agent
|
|
104
|
-
* threads them through subsequent calls.
|
|
105
|
-
*
|
|
106
|
-
* No inputs — every call mints a fresh random sessionId. (A prior
|
|
107
|
-
* optional `seed` for deterministic derivation was retired because
|
|
108
|
-
* LLMs were passing the same seed across user turns and getting back
|
|
109
|
-
* the same sessionId, defeating the "new" in the tool name.)
|
|
110
|
-
*/
|
|
111
|
-
export declare const newSessionInputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
112
|
-
export declare const newSessionOutputSchema: z.ZodObject<{
|
|
113
|
-
sessionId: z.ZodString;
|
|
114
|
-
appId: z.ZodString;
|
|
115
|
-
createdAt: z.ZodString;
|
|
116
|
-
nextStep: z.ZodObject<{
|
|
117
|
-
tool: z.ZodLiteral<"ggui_handshake">;
|
|
118
|
-
description: z.ZodString;
|
|
119
|
-
example: z.ZodString;
|
|
120
|
-
}, z.core.$strip>;
|
|
121
|
-
}, z.core.$strip>;
|
|
122
87
|
/**
|
|
123
88
|
* `ggui_handshake` — three-step suggestion protocol.
|
|
124
89
|
*
|
|
@@ -129,7 +94,7 @@ export declare const newSessionOutputSchema: z.ZodObject<{
|
|
|
129
94
|
* `BlueprintSearch` and contract-validation in parallel and returns a
|
|
130
95
|
* `HandshakeSuggestion` routed by `origin: cache | agent | synth`.
|
|
131
96
|
*
|
|
132
|
-
* Step 3 (paired `
|
|
97
|
+
* Step 3 (paired `ggui_render`): the agent accepts (reuses the
|
|
133
98
|
* provisional `blueprintId` minted in step-2) OR overrides (mints a
|
|
134
99
|
* fresh `blueprintId` against a NEW draft).
|
|
135
100
|
*
|
|
@@ -139,9 +104,13 @@ export declare const newSessionOutputSchema: z.ZodObject<{
|
|
|
139
104
|
* variance + generator hint.
|
|
140
105
|
* - The agent is the contract authority; synth amends only when
|
|
141
106
|
* validation fails.
|
|
107
|
+
* - Post-Phase-B the handshake input carries NO `sessionId`. The
|
|
108
|
+
* server mints `renderId` on the paired `ggui_render`; host
|
|
109
|
+
* conversation grouping flows via the host-supplied
|
|
110
|
+
* `_meta["ai.ggui/host-session"]` envelope captured at render
|
|
111
|
+
* creation (see {@link RenderBase.hostSession}).
|
|
142
112
|
*/
|
|
143
113
|
export declare const handshakeInputSchema: z.ZodObject<{
|
|
144
|
-
sessionId: z.ZodString;
|
|
145
114
|
intent: z.ZodString;
|
|
146
115
|
blueprintDraft: z.ZodType<import("..").BlueprintDraft, unknown, z.core.$ZodTypeInternals<import("..").BlueprintDraft, unknown>>;
|
|
147
116
|
forceCreate: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -152,13 +121,13 @@ export declare const handshakeInputSchema: z.ZodObject<{
|
|
|
152
121
|
* and optional `amendments` (synth-only) / `validationFindings`
|
|
153
122
|
* (soft on cache).
|
|
154
123
|
*
|
|
155
|
-
* The agent reads `suggestion.origin` to branch the paired
|
|
124
|
+
* The agent reads `suggestion.origin` to branch the paired render call:
|
|
156
125
|
*
|
|
157
|
-
* - `cache` →
|
|
158
|
-
* - `agent` →
|
|
159
|
-
* - `synth` →
|
|
126
|
+
* - `cache` → render `{decision: {kind: 'accept'}}` for cache delivery.
|
|
127
|
+
* - `agent` → render `{decision: {kind: 'accept'}}` to gen against the draft.
|
|
128
|
+
* - `synth` → render `{decision: {kind: 'accept'}}` to gen against the amended contract.
|
|
160
129
|
*
|
|
161
|
-
* Any origin →
|
|
130
|
+
* Any origin → render `{decision: {kind: 'override', blueprintDraft: {...}}}` to
|
|
162
131
|
* discard the suggestion and gen against a fresh draft (mints a new
|
|
163
132
|
* `blueprintId` server-side).
|
|
164
133
|
*
|
|
@@ -167,8 +136,12 @@ export declare const handshakeInputSchema: z.ZodObject<{
|
|
|
167
136
|
* its internal `HandshakeOutput` TS shape for telemetry / post-classify
|
|
168
137
|
* tracing — zod strips them before structuredContent serialization.
|
|
169
138
|
*
|
|
170
|
-
* `serverCapabilities` reaches the iframe via `
|
|
171
|
-
* (see `
|
|
139
|
+
* `serverCapabilities` reaches the iframe via the `ai.ggui/render`
|
|
140
|
+
* slice meta (see `slice-meta-derivation.ts`), not via this response.
|
|
141
|
+
*
|
|
142
|
+
* Post-Phase-B the `'compose'` action enum value is gone — there is no
|
|
143
|
+
* stack of N renders to compose against. Three create/update branches +
|
|
144
|
+
* `'declined'` cover every legal outcome.
|
|
172
145
|
*/
|
|
173
146
|
export declare const handshakeOutputSchema: z.ZodObject<{
|
|
174
147
|
handshakeId: z.ZodString;
|
|
@@ -177,19 +150,18 @@ export declare const handshakeOutputSchema: z.ZodObject<{
|
|
|
177
150
|
create: "create";
|
|
178
151
|
reuse: "reuse";
|
|
179
152
|
update: "update";
|
|
180
|
-
compose: "compose";
|
|
181
153
|
declined: "declined";
|
|
182
154
|
}>;
|
|
183
155
|
suggestion: z.ZodType<import("..").HandshakeSuggestion, unknown, z.core.$ZodTypeInternals<import("..").HandshakeSuggestion, unknown>>;
|
|
184
156
|
reason: z.ZodOptional<z.ZodString>;
|
|
185
157
|
nextStep: z.ZodOptional<z.ZodObject<{
|
|
186
|
-
tool: z.ZodLiteral<"
|
|
158
|
+
tool: z.ZodLiteral<"ggui_render">;
|
|
187
159
|
description: z.ZodString;
|
|
188
160
|
example: z.ZodString;
|
|
189
161
|
}, z.core.$strip>>;
|
|
190
162
|
}, z.core.$strip>;
|
|
191
163
|
/**
|
|
192
|
-
* `
|
|
164
|
+
* `ggui_render` — materialises a UI emission. Step 3 of the three-step
|
|
193
165
|
* handshake protocol.
|
|
194
166
|
*
|
|
195
167
|
* The agent commits its decision relative to the prior handshake's
|
|
@@ -204,33 +176,43 @@ export declare const handshakeOutputSchema: z.ZodObject<{
|
|
|
204
176
|
* - `accept` reuses `handshake.suggestion.blueprintMeta.blueprintId`
|
|
205
177
|
* exactly; `override` discards the provisional id and mints fresh.
|
|
206
178
|
*
|
|
207
|
-
* There is no separate `ggui_commit` —
|
|
179
|
+
* There is no separate `ggui_commit` — render absorbs that responsibility.
|
|
180
|
+
*
|
|
181
|
+
* Post-Phase-B rename from `ggui_push` — the tool materialises a single
|
|
182
|
+
* render (no stack of N to push onto); the new name reflects what the
|
|
183
|
+
* tool does at the protocol surface.
|
|
208
184
|
*/
|
|
209
|
-
export declare const
|
|
185
|
+
export declare const renderInputSchema: z.ZodObject<{
|
|
210
186
|
handshakeId: z.ZodString;
|
|
211
187
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
212
188
|
decision: z.ZodType<import("..").PushDecision, unknown, z.core.$ZodTypeInternals<import("..").PushDecision, unknown>>;
|
|
213
189
|
}, z.core.$strict>;
|
|
214
190
|
/**
|
|
215
|
-
* Wire-output shape — intentionally lean: `{
|
|
216
|
-
*
|
|
217
|
-
* `
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
191
|
+
* Wire-output shape — intentionally lean: `{renderId, nextStep?, action}`.
|
|
192
|
+
* The handler carries `shortCode`, `codeReady`, `handshakeId`,
|
|
193
|
+
* `decision`, `contract`, `contractHash`, `cache`, `codeUrl`, `codeHash`
|
|
194
|
+
* on its internal `RenderOutput` TS shape for telemetry / post-classify
|
|
195
|
+
* tracing — zod strips them before structuredContent serialization.
|
|
196
|
+
*
|
|
197
|
+
* The iframe receives bootstrap credentials (`wsUrl`, `wsToken`,
|
|
198
|
+
* `expiresAt`) via the single `ai.ggui/render` slice meta, not via this
|
|
199
|
+
* response. There is no clickable `url` field — post-R5 the `/r/`
|
|
200
|
+
* shortCode route was deleted (every host either resolves the
|
|
201
|
+
* `_meta.ui.resourceUri` iframe or reads `{renderId}` via
|
|
202
|
+
* `render-resource/...`). Leaving a dead URL on the wire had the model
|
|
203
|
+
* hallucinating links that resolve nowhere.
|
|
221
204
|
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
205
|
+
* Post-Phase-B the `'compose'` action enum value is gone — there is no
|
|
206
|
+
* stack of N renders to compose against.
|
|
224
207
|
*/
|
|
225
|
-
export declare const
|
|
226
|
-
|
|
227
|
-
|
|
208
|
+
export declare const renderOutputSchema: z.ZodObject<{
|
|
209
|
+
renderId: z.ZodString;
|
|
210
|
+
resourceUri: z.ZodString;
|
|
228
211
|
action: z.ZodEnum<{
|
|
229
212
|
replace: "replace";
|
|
230
213
|
create: "create";
|
|
231
214
|
reuse: "reuse";
|
|
232
215
|
update: "update";
|
|
233
|
-
compose: "compose";
|
|
234
216
|
declined: "declined";
|
|
235
217
|
}>;
|
|
236
218
|
nextStep: z.ZodOptional<z.ZodObject<{
|
|
@@ -238,7 +220,7 @@ export declare const pushOutputSchema: z.ZodObject<{
|
|
|
238
220
|
description: z.ZodString;
|
|
239
221
|
example: z.ZodString;
|
|
240
222
|
args: z.ZodObject<{
|
|
241
|
-
|
|
223
|
+
renderId: z.ZodString;
|
|
242
224
|
}, z.core.$strip>;
|
|
243
225
|
}, z.core.$strip>>;
|
|
244
226
|
}, z.core.$strip>;
|
|
@@ -266,36 +248,35 @@ export declare const pushOutputSchema: z.ZodObject<{
|
|
|
266
248
|
* - Do NOT send `patch` on `kind: 'replace'` — use `props`.
|
|
267
249
|
*
|
|
268
250
|
* Both modes validate the FINAL props state (post-merge for `merge`)
|
|
269
|
-
* against the
|
|
251
|
+
* against the render's `propsSpec` and reject on violation —
|
|
270
252
|
* partial patches that would break required fields, type-mismatch
|
|
271
253
|
* values, etc. all reject pre-persist.
|
|
272
254
|
*
|
|
273
|
-
* `
|
|
274
|
-
*
|
|
275
|
-
* NO `sessionId` on the wire.
|
|
255
|
+
* `renderId` is globally unique; the server tenancy-checks via
|
|
256
|
+
* `ctx.appId`.
|
|
276
257
|
*/
|
|
277
258
|
export declare const updateInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
278
|
-
|
|
259
|
+
renderId: z.ZodString;
|
|
279
260
|
kind: z.ZodLiteral<"replace">;
|
|
280
261
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
281
262
|
}, z.core.$strict>, z.ZodObject<{
|
|
282
|
-
|
|
263
|
+
renderId: z.ZodString;
|
|
283
264
|
kind: z.ZodLiteral<"merge">;
|
|
284
265
|
patch: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
285
266
|
}, z.core.$strict>], "kind">;
|
|
286
267
|
/**
|
|
287
268
|
* Wire-output shape — minimal acknowledgement. The handler carries
|
|
288
|
-
* `
|
|
289
|
-
*
|
|
290
|
-
* serialization.
|
|
269
|
+
* `decision`, `contract`, `contractHash` on its internal `UpdateOutput`
|
|
270
|
+
* TS shape — zod strips them before structuredContent serialization.
|
|
291
271
|
*
|
|
292
272
|
* Post-update the iframe receives the new props via the live-channel
|
|
293
273
|
* `props_update` WS frame; the cross-host fallback path receives them
|
|
294
|
-
* via `
|
|
295
|
-
* wire response itself is just
|
|
274
|
+
* via the `ai.ggui/render.propsJson` slice field (see
|
|
275
|
+
* `update.resultMeta`). The wire response itself is just
|
|
276
|
+
* acknowledgement.
|
|
296
277
|
*/
|
|
297
278
|
export declare const updateOutputSchema: z.ZodObject<{
|
|
298
|
-
|
|
279
|
+
renderId: z.ZodString;
|
|
299
280
|
updated: z.ZodBoolean;
|
|
300
281
|
}, z.core.$strip>;
|
|
301
282
|
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/schemas/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,cAAc;;;iBAGzB,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUnB,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/schemas/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,cAAc;;;iBAGzB,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUnB,CAAC;AAUjB,eAAO,MAAM,kBAAkB;;;kBAIpB,CAAC;AAEZ;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;kBAOjB,CAAC;AAEZ,eAAO,MAAM,oBAAoB;;kBAEtB,CAAC;AAEZ,eAAO,MAAM,iCAAiC;;;;;;;;;;kBAKnC,CAAC;AAEZ,eAAO,MAAM,2BAA2B;;;kB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