@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.
- package/dist/envelope-adapters.d.ts +1 -14
- package/dist/envelope-adapters.d.ts.map +1 -1
- package/dist/envelope-adapters.js +17 -1
- package/dist/envelopes/render-refusal.d.ts +49 -0
- package/dist/envelopes/render-refusal.d.ts.map +1 -0
- package/dist/envelopes/render-refusal.js +12 -0
- package/dist/gadgets/resolve-app-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.d.ts +2 -2
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/index.d.ts +67 -60
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/integrations/mcp-apps.d.ts +4 -10
- package/dist/integrations/mcp-apps.d.ts.map +1 -1
- package/dist/schemas/app-theme.d.ts +5 -0
- package/dist/schemas/app-theme.d.ts.map +1 -1
- package/dist/schemas/app-theme.js +23 -0
- package/dist/schemas/blueprint.d.ts +2 -2
- package/dist/schemas/data-contract.d.ts +12 -30
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +6 -27
- package/dist/schemas/interface-context.d.ts +44 -0
- package/dist/schemas/interface-context.d.ts.map +1 -0
- package/dist/schemas/interface-context.js +22 -0
- package/dist/schemas/invoke.d.ts +1 -1
- package/dist/schemas/invoke.js +1 -1
- package/dist/schemas/mcp.d.ts +636 -69
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +554 -47
- package/dist/schemas/public-env-key.d.ts +26 -0
- package/dist/schemas/public-env-key.d.ts.map +1 -0
- package/dist/schemas/public-env-key.js +25 -0
- package/dist/schemas/render-input-envelope.d.ts +20 -0
- package/dist/schemas/render-input-envelope.d.ts.map +1 -0
- package/dist/schemas/render-input-envelope.js +56 -0
- package/dist/schemas/runtime-telemetry-limits.d.ts +11 -0
- package/dist/schemas/runtime-telemetry-limits.d.ts.map +1 -0
- package/dist/schemas/runtime-telemetry-limits.js +10 -0
- package/dist/transport/websocket.d.ts +5 -5
- package/dist/types/auth.d.ts +1 -1
- package/dist/types/contract-inference.d.ts +1 -1
- package/dist/types/events.d.ts +1 -1
- package/dist/types/ggui-session-event.d.ts +4 -5
- package/dist/types/ggui-session-event.d.ts.map +1 -1
- package/dist/types/ggui-session-event.js +0 -37
- package/dist/types/host-context.d.ts +18 -17
- package/dist/types/host-context.d.ts.map +1 -1
- package/dist/types/host-context.js +7 -0
- package/dist/types/interface-context.d.ts +1 -1
- package/dist/types/invoke.d.ts +1 -1
- package/dist/types/lifecycle.d.ts +1 -1
- package/dist/types/live-channel.d.ts +2 -2
- package/dist/types/llm-route.d.ts +2 -2
- package/dist/types/llm-route.d.ts.map +1 -1
- package/dist/types/llm-route.js +11 -3
- package/dist/types/llm.d.ts +397 -7
- package/dist/types/llm.d.ts.map +1 -1
- package/dist/types/llm.js +111 -10
- package/dist/types/mcp.d.ts +31 -111
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +7 -0
- package/dist/types/readonly.d.ts +11 -0
- package/dist/types/readonly.d.ts.map +1 -0
- package/dist/types/readonly.js +1 -0
- package/dist/types/refusal-codes.d.ts +340 -0
- package/dist/types/refusal-codes.d.ts.map +1 -0
- package/dist/types/refusal-codes.js +346 -0
- package/dist/types/render.d.ts +9 -8
- package/dist/types/render.d.ts.map +1 -1
- package/dist/types/ui-generator.d.ts +1 -1
- package/dist/validation/ajv-runtime.d.ts +2 -2
- package/dist/validation/contract-validator.d.ts +6 -6
- package/dist/validation/cross-references.d.ts +2 -2
- package/dist/validation/hygiene-rules.d.ts +1 -1
- package/dist/validation/name-invariants.d.ts +2 -2
- package/dist/validation/reserved-channels.d.ts +1 -1
- package/dist/validation/schema-compat-invariants.d.ts +2 -2
- package/dist/validation/schema-meta-validation.d.ts +1 -1
- package/dist/version.d.ts +201 -5
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +200 -4
- package/dist/wire.d.ts +45 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +44 -0
- package/package.json +13 -3
package/dist/types/llm.js
CHANGED
|
@@ -25,8 +25,10 @@
|
|
|
25
25
|
* `LLMProvider` (capital)) were deleted in the slice #43 close-out —
|
|
26
26
|
* routing went through `parseAnyLlmRoute` + typed dispatch.
|
|
27
27
|
*
|
|
28
|
-
* Pricing last verified: 2026-
|
|
29
|
-
*
|
|
28
|
+
* Pricing last verified: 2026-09-02 — Anthropic 5-family + Haiku 4.5 (and the
|
|
29
|
+
* new Fable 5.1 row) against platform.claude.com, quoted on ggui#706; the
|
|
30
|
+
* Anthropic 4.x legacy rows and the Google/OpenAI rows keep their 2026-08-04
|
|
31
|
+
* re-vendor verification (not re-checked on 2026-09-02 — no source quoted).
|
|
30
32
|
* Sources:
|
|
31
33
|
* https://docs.anthropic.com/en/docs/about-claude/pricing
|
|
32
34
|
* https://developers.openai.com/api/docs/pricing/
|
|
@@ -44,16 +46,52 @@
|
|
|
44
46
|
* Add a model here and you MUST re-vendor the snapshot in the same
|
|
45
47
|
* slice.
|
|
46
48
|
*/
|
|
49
|
+
/**
|
|
50
|
+
* The registry is the ONLY list of model ids (Strict Typing First,
|
|
51
|
+
* ggui#707): {@link ModelId} is derived from its keys below, and this
|
|
52
|
+
* definer forces every row's `id` to equal its key at the type level.
|
|
53
|
+
*/
|
|
54
|
+
function defineModelRegistry(rows) {
|
|
55
|
+
return rows;
|
|
56
|
+
}
|
|
47
57
|
// =============================================================================
|
|
48
|
-
// Model Registry — verified
|
|
58
|
+
// Model Registry — pricing verified 2026-09-02 (Anthropic 5-family + Haiku 4.5;
|
|
59
|
+
// see the file header for what the 2026-08-04 re-vendor still covers)
|
|
49
60
|
// =============================================================================
|
|
50
|
-
|
|
61
|
+
const MODEL_ROWS = defineModelRegistry({
|
|
51
62
|
// ── Anthropic Claude ──────────────────────────────────────────────
|
|
63
|
+
// Strings quoted from ggui#706 (platform.claude.com, 2026-09-02):
|
|
64
|
+
// $10/$50, 1M context, adaptive thinking always on, retire ≥ 2027-09-01.
|
|
65
|
+
"anthropic/claude-fable-5-1": {
|
|
66
|
+
id: "anthropic/claude-fable-5-1",
|
|
67
|
+
provider: "anthropic",
|
|
68
|
+
displayName: "Claude Fable 5.1",
|
|
69
|
+
tier: "premium",
|
|
70
|
+
state: "active",
|
|
71
|
+
lineup: true,
|
|
72
|
+
retireNotBefore: "2027-09-01",
|
|
73
|
+
costs: {
|
|
74
|
+
inputPer1M: 10.0,
|
|
75
|
+
outputPer1M: 50.0,
|
|
76
|
+
// 5-minute cache write (1.25×); the 1h write ($20) is not modeled.
|
|
77
|
+
cacheWritePer1M: 12.5,
|
|
78
|
+
// NOT the usual 0.1× — the pricing docs footnote: "Cache hits and
|
|
79
|
+
// refreshes on Claude Fable 5.1 and Claude Mythos 5.1 are priced at
|
|
80
|
+
// 0.025x the base input price." $0.25 / MTok; the vendored LiteLLM
|
|
81
|
+
// snapshot agrees (2.5e-7 per token). Verified 2026-09-02 (#707).
|
|
82
|
+
cacheReadPer1M: 0.25,
|
|
83
|
+
},
|
|
84
|
+
maxTokens: 1000000,
|
|
85
|
+
supportsTools: true,
|
|
86
|
+
},
|
|
52
87
|
"anthropic/claude-fable-5": {
|
|
53
88
|
id: "anthropic/claude-fable-5",
|
|
54
89
|
provider: "anthropic",
|
|
55
90
|
displayName: "Claude Fable 5",
|
|
56
91
|
tier: "premium",
|
|
92
|
+
state: "legacy",
|
|
93
|
+
lineup: false,
|
|
94
|
+
retireNotBefore: "2027-06-09",
|
|
57
95
|
costs: {
|
|
58
96
|
inputPer1M: 10.0,
|
|
59
97
|
outputPer1M: 50.0,
|
|
@@ -68,6 +106,9 @@ export const MODEL_REGISTRY = {
|
|
|
68
106
|
provider: "anthropic",
|
|
69
107
|
displayName: "Claude Opus 5",
|
|
70
108
|
tier: "premium",
|
|
109
|
+
state: "active",
|
|
110
|
+
lineup: true,
|
|
111
|
+
retireNotBefore: "2027-07-24",
|
|
71
112
|
costs: {
|
|
72
113
|
inputPer1M: 5.0,
|
|
73
114
|
outputPer1M: 25.0,
|
|
@@ -86,6 +127,9 @@ export const MODEL_REGISTRY = {
|
|
|
86
127
|
provider: "anthropic",
|
|
87
128
|
displayName: "Claude Sonnet 5",
|
|
88
129
|
tier: "balanced",
|
|
130
|
+
state: "active",
|
|
131
|
+
lineup: true,
|
|
132
|
+
retireNotBefore: "2027-06-30",
|
|
89
133
|
costs: {
|
|
90
134
|
inputPer1M: 2.0,
|
|
91
135
|
outputPer1M: 10.0,
|
|
@@ -102,6 +146,9 @@ export const MODEL_REGISTRY = {
|
|
|
102
146
|
provider: "anthropic",
|
|
103
147
|
displayName: "Claude Haiku 4.5",
|
|
104
148
|
tier: "fast",
|
|
149
|
+
state: "active",
|
|
150
|
+
lineup: true,
|
|
151
|
+
retireNotBefore: "2026-10-15",
|
|
105
152
|
costs: {
|
|
106
153
|
inputPer1M: 1.0,
|
|
107
154
|
outputPer1M: 5.0,
|
|
@@ -116,6 +163,8 @@ export const MODEL_REGISTRY = {
|
|
|
116
163
|
provider: "anthropic",
|
|
117
164
|
displayName: "Claude Sonnet 4.6",
|
|
118
165
|
tier: "balanced",
|
|
166
|
+
state: "legacy",
|
|
167
|
+
lineup: false,
|
|
119
168
|
costs: {
|
|
120
169
|
inputPer1M: 3.0,
|
|
121
170
|
outputPer1M: 15.0,
|
|
@@ -130,6 +179,8 @@ export const MODEL_REGISTRY = {
|
|
|
130
179
|
provider: "anthropic",
|
|
131
180
|
displayName: "Claude Opus 4.7",
|
|
132
181
|
tier: "premium",
|
|
182
|
+
state: "legacy",
|
|
183
|
+
lineup: false,
|
|
133
184
|
costs: {
|
|
134
185
|
inputPer1M: 5.0,
|
|
135
186
|
outputPer1M: 25.0,
|
|
@@ -144,6 +195,8 @@ export const MODEL_REGISTRY = {
|
|
|
144
195
|
provider: "anthropic",
|
|
145
196
|
displayName: "Claude Opus 4.6",
|
|
146
197
|
tier: "premium",
|
|
198
|
+
state: "legacy",
|
|
199
|
+
lineup: false,
|
|
147
200
|
costs: {
|
|
148
201
|
inputPer1M: 5.0,
|
|
149
202
|
outputPer1M: 25.0,
|
|
@@ -168,6 +221,8 @@ export const MODEL_REGISTRY = {
|
|
|
168
221
|
provider: "google",
|
|
169
222
|
displayName: "Gemini 3.7 Flash",
|
|
170
223
|
tier: "balanced",
|
|
224
|
+
state: "active",
|
|
225
|
+
lineup: false,
|
|
171
226
|
costs: { inputPer1M: 0.75, outputPer1M: 3.75, cacheReadPer1M: 0.075 },
|
|
172
227
|
maxTokens: 1048576,
|
|
173
228
|
supportsTools: true,
|
|
@@ -178,6 +233,8 @@ export const MODEL_REGISTRY = {
|
|
|
178
233
|
provider: "google",
|
|
179
234
|
displayName: "Gemini 3.6 Flash",
|
|
180
235
|
tier: "fast",
|
|
236
|
+
state: "active",
|
|
237
|
+
lineup: false,
|
|
181
238
|
// 2026-08-19 re-vendor: cut from $1.5/$7.5 to the 3.7-launch intro
|
|
182
239
|
// rate (see NOTE above 3.7-flash).
|
|
183
240
|
costs: { inputPer1M: 0.75, outputPer1M: 3.75, cacheReadPer1M: 0.075 },
|
|
@@ -190,6 +247,8 @@ export const MODEL_REGISTRY = {
|
|
|
190
247
|
provider: "google",
|
|
191
248
|
displayName: "Gemini 3.5 Flash",
|
|
192
249
|
tier: "fast",
|
|
250
|
+
state: "active",
|
|
251
|
+
lineup: false,
|
|
193
252
|
costs: { inputPer1M: 1.5, outputPer1M: 9.0 },
|
|
194
253
|
maxTokens: 1048576,
|
|
195
254
|
supportsTools: true,
|
|
@@ -201,6 +260,8 @@ export const MODEL_REGISTRY = {
|
|
|
201
260
|
provider: "google",
|
|
202
261
|
displayName: "Gemini 3.5 Flash Lite",
|
|
203
262
|
tier: "fast",
|
|
263
|
+
state: "active",
|
|
264
|
+
lineup: false,
|
|
204
265
|
costs: { inputPer1M: 0.3, outputPer1M: 2.5, cacheReadPer1M: 0.03 },
|
|
205
266
|
maxTokens: 1048576,
|
|
206
267
|
supportsTools: true,
|
|
@@ -212,6 +273,8 @@ export const MODEL_REGISTRY = {
|
|
|
212
273
|
provider: "google",
|
|
213
274
|
displayName: "Gemini 3.1 Flash Lite",
|
|
214
275
|
tier: "fast",
|
|
276
|
+
state: "active",
|
|
277
|
+
lineup: false,
|
|
215
278
|
costs: { inputPer1M: 0.25, outputPer1M: 1.5 },
|
|
216
279
|
maxTokens: 1000000,
|
|
217
280
|
supportsTools: true,
|
|
@@ -221,6 +284,8 @@ export const MODEL_REGISTRY = {
|
|
|
221
284
|
provider: "google",
|
|
222
285
|
displayName: "Gemini 3 Flash",
|
|
223
286
|
tier: "fast",
|
|
287
|
+
state: "active",
|
|
288
|
+
lineup: false,
|
|
224
289
|
costs: { inputPer1M: 0.5, outputPer1M: 3.0 },
|
|
225
290
|
maxTokens: 1000000,
|
|
226
291
|
supportsTools: true,
|
|
@@ -230,6 +295,8 @@ export const MODEL_REGISTRY = {
|
|
|
230
295
|
provider: "google",
|
|
231
296
|
displayName: "Gemini 3.1 Pro",
|
|
232
297
|
tier: "balanced",
|
|
298
|
+
state: "active",
|
|
299
|
+
lineup: false,
|
|
233
300
|
costs: { inputPer1M: 2.0, outputPer1M: 12.0 },
|
|
234
301
|
maxTokens: 1000000,
|
|
235
302
|
supportsTools: true,
|
|
@@ -245,11 +312,13 @@ export const MODEL_REGISTRY = {
|
|
|
245
312
|
provider: "openai",
|
|
246
313
|
displayName: "GPT-5.6 Sol",
|
|
247
314
|
tier: "premium",
|
|
315
|
+
state: "active",
|
|
316
|
+
lineup: false,
|
|
248
317
|
costs: {
|
|
249
|
-
inputPer1M:
|
|
250
|
-
outputPer1M:
|
|
251
|
-
cacheWritePer1M:
|
|
252
|
-
cacheReadPer1M: 0.
|
|
318
|
+
inputPer1M: 4.0,
|
|
319
|
+
outputPer1M: 20.0,
|
|
320
|
+
cacheWritePer1M: 5.0,
|
|
321
|
+
cacheReadPer1M: 0.4,
|
|
253
322
|
},
|
|
254
323
|
maxTokens: 1050000,
|
|
255
324
|
supportsTools: true,
|
|
@@ -259,6 +328,8 @@ export const MODEL_REGISTRY = {
|
|
|
259
328
|
provider: "openai",
|
|
260
329
|
displayName: "GPT-5.6 Terra",
|
|
261
330
|
tier: "balanced",
|
|
331
|
+
state: "active",
|
|
332
|
+
lineup: false,
|
|
262
333
|
costs: { inputPer1M: 2.0, outputPer1M: 12.0, cacheReadPer1M: 0.2 },
|
|
263
334
|
maxTokens: 1050000,
|
|
264
335
|
supportsTools: true,
|
|
@@ -269,6 +340,8 @@ export const MODEL_REGISTRY = {
|
|
|
269
340
|
provider: "openai",
|
|
270
341
|
displayName: "GPT-5.6 Luna",
|
|
271
342
|
tier: "fast",
|
|
343
|
+
state: "active",
|
|
344
|
+
lineup: false,
|
|
272
345
|
costs: { inputPer1M: 0.2, outputPer1M: 1.2, cacheReadPer1M: 0.02 },
|
|
273
346
|
maxTokens: 1050000,
|
|
274
347
|
supportsTools: true,
|
|
@@ -278,6 +351,8 @@ export const MODEL_REGISTRY = {
|
|
|
278
351
|
provider: "openai",
|
|
279
352
|
displayName: "GPT-5.3 Codex",
|
|
280
353
|
tier: "balanced",
|
|
354
|
+
state: "active",
|
|
355
|
+
lineup: false,
|
|
281
356
|
costs: { inputPer1M: 1.75, outputPer1M: 14.0 },
|
|
282
357
|
maxTokens: 200000,
|
|
283
358
|
supportsTools: true,
|
|
@@ -287,6 +362,8 @@ export const MODEL_REGISTRY = {
|
|
|
287
362
|
provider: "openai",
|
|
288
363
|
displayName: "GPT-5.4",
|
|
289
364
|
tier: "premium",
|
|
365
|
+
state: "active",
|
|
366
|
+
lineup: false,
|
|
290
367
|
costs: { inputPer1M: 2.5, outputPer1M: 15.0 },
|
|
291
368
|
maxTokens: 1050000,
|
|
292
369
|
supportsTools: true,
|
|
@@ -296,6 +373,8 @@ export const MODEL_REGISTRY = {
|
|
|
296
373
|
provider: "openai",
|
|
297
374
|
displayName: "GPT-5.4 Mini",
|
|
298
375
|
tier: "fast",
|
|
376
|
+
state: "active",
|
|
377
|
+
lineup: false,
|
|
299
378
|
costs: { inputPer1M: 0.75, outputPer1M: 4.5 },
|
|
300
379
|
maxTokens: 400000,
|
|
301
380
|
supportsTools: true,
|
|
@@ -305,12 +384,34 @@ export const MODEL_REGISTRY = {
|
|
|
305
384
|
provider: "openai",
|
|
306
385
|
displayName: "GPT-5.4 Nano",
|
|
307
386
|
tier: "fast",
|
|
387
|
+
state: "active",
|
|
388
|
+
lineup: false,
|
|
308
389
|
costs: { inputPer1M: 0.20, outputPer1M: 1.25 },
|
|
309
390
|
maxTokens: 400000,
|
|
310
391
|
supportsTools: true,
|
|
311
392
|
},
|
|
312
|
-
};
|
|
393
|
+
});
|
|
394
|
+
/**
|
|
395
|
+
* The registry consumers read. Typed by the normalized {@link ModelConfig}
|
|
396
|
+
* (not the literal row types) so `MODEL_REGISTRY[id]` for any `ModelId`
|
|
397
|
+
* exposes every optional field as `T | undefined` rather than a union in
|
|
398
|
+
* which some rows lack the property. The literal rows above still derive
|
|
399
|
+
* {@link ModelId} and enforce `id === key`.
|
|
400
|
+
*/
|
|
401
|
+
export const MODEL_REGISTRY = MODEL_ROWS;
|
|
402
|
+
/**
|
|
403
|
+
* The curated "current lineup" — derived once from the rows' `lineup`
|
|
404
|
+
* fact, in registry order. Pickers render this up front and put the
|
|
405
|
+
* rest of the ACTIVE registry (legacy rows inside, marked) behind a
|
|
406
|
+
* "see all models" door (ggui#707 / #711).
|
|
407
|
+
*/
|
|
408
|
+
export const MODEL_LINEUP = Object.keys(MODEL_REGISTRY).filter((id) => MODEL_REGISTRY[id].lineup);
|
|
409
|
+
/** Whether `id` is in {@link MODEL_LINEUP}. */
|
|
410
|
+
export function isLineupModel(id) {
|
|
411
|
+
return MODEL_REGISTRY[id].lineup;
|
|
412
|
+
}
|
|
313
413
|
/**
|
|
314
|
-
* Default model for generation
|
|
414
|
+
* Default model for generation. Stays Haiku 4.5 until the founder rules
|
|
415
|
+
* ggui#706 decision 1 (Fable 5.1 is 10× the per-render cost).
|
|
315
416
|
*/
|
|
316
417
|
export const DEFAULT_MODEL = "anthropic/claude-haiku-4-5";
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { DataContract, JsonObject, JsonSchema, JsonValue } from './data-contract';
|
|
3
|
-
import type {
|
|
4
|
-
import type { consumeInputSchema, getRenderSourceInputSchema, getSessionInputSchema, handshakeInputSchema, handshakeOutputSchema, renderBlueprintInputSchema, renderCacheMarkerSchema, renderErrorSchema, renderInputSchema, renderOutputSchema, resourceReadErrorCodeSchema, resourceReadErrorSchema, runtimePullInputSchema, runtimeTelemetryInputSchema, runtimeTelemetryOutputSchema, searchBlueprintsInputSchema, updateInputSchema, updateOutputSchema, amendInputSchema, amendOutputSchema, declareToolCatalogOutputSchema } from '../schemas/mcp';
|
|
5
|
-
import type { EventsResponse, ReplayHorizonPassedError } from './ggui-session-event';
|
|
6
|
-
export type { GguiSessionStatus } from './render';
|
|
2
|
+
import type { DataContract, JsonObject, JsonSchema, JsonValue } from './data-contract.js';
|
|
3
|
+
import type { DeepReadonly } from './readonly.js';
|
|
4
|
+
import type { consumeInputSchema, getRenderSourceInputSchema, getSessionInputSchema, handshakeInputSchema, handshakeOutputSchema, renderBlueprintInputSchema, renderCacheMarkerSchema, renderErrorSchema, renderInputSchema, renderOutputSchema, resourceReadErrorCodeSchema, resourceReadErrorSchema, runtimePullInputSchema, runtimeTelemetryInputSchema, runtimeTelemetryOutputSchema, searchBlueprintsInputSchema, updateInputSchema, updateOutputSchema, amendInputSchema, amendOutputSchema, declareToolCatalogOutputSchema, gguiGetSessionOutputSchema, gguiSearchBlueprintsOutputSchema, consumeEventEntrySchema, gguiConsumeOutputSchema, gguiEmitOutputSchema, gguiListSessionsOutputSchema } from '../schemas/mcp.js';
|
|
5
|
+
import type { EventsResponse, ReplayHorizonPassedError } from './ggui-session-event.js';
|
|
6
|
+
export type { GguiSessionStatus } from './render.js';
|
|
7
7
|
/** Target screen size category for responsive layout */
|
|
8
8
|
export type Screen = 'mobile' | 'tablet' | 'desktop' | 'universal';
|
|
9
9
|
/**
|
|
@@ -106,26 +106,20 @@ export interface GguiEmitInput<TPayload = JsonValue> {
|
|
|
106
106
|
* any subscriber is currently connected is a separate concern and does
|
|
107
107
|
* NOT affect this flag. No-subscriber is not an error.
|
|
108
108
|
*/
|
|
109
|
-
export
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* GguiSession-scoped monotonic outbound sequence assigned to this
|
|
114
|
-
* delivery. Omitted on implementations without a
|
|
115
|
-
* `GguiSessionStreamBuffer` (hosted cloud today); required on OSS
|
|
116
|
-
* `@ggui-ai/mcp-server`.
|
|
117
|
-
*/
|
|
118
|
-
seq?: number;
|
|
119
|
-
}
|
|
109
|
+
export type GguiEmitOutput = DeepReadonly<z.infer<typeof gguiEmitOutputSchema>>;
|
|
110
|
+
/** `ggui_list_sessions`' wire, derived from {@link gguiListSessionsOutputSchema} (ggui#817 part C2). */
|
|
111
|
+
export type GguiListSessionsOutput = DeepReadonly<z.infer<typeof gguiListSessionsOutputSchema>>;
|
|
120
112
|
/**
|
|
121
113
|
* Input for ggui_get_session tool — retrieves render state.
|
|
122
114
|
* Derived from `getSessionInputSchema`.
|
|
123
115
|
*/
|
|
124
116
|
export type GguiGetSessionInput = z.infer<typeof getSessionInputSchema>;
|
|
125
117
|
/**
|
|
126
|
-
*
|
|
118
|
+
* `ggui_get_session`'s wire — the projection, never a `GguiSession`: `variant`
|
|
119
|
+
* + the store row's six base fields, plus `contextSnapshot` when the row has
|
|
120
|
+
* one. Nothing else on the row travels (the transport strip-parses to this).
|
|
127
121
|
*/
|
|
128
|
-
export type GguiGetSessionOutput =
|
|
122
|
+
export type GguiGetSessionOutput = DeepReadonly<z.infer<typeof gguiGetSessionOutputSchema>>;
|
|
129
123
|
/**
|
|
130
124
|
* Input for ggui_get_render_source tool — read the generated source of
|
|
131
125
|
* the calling app's own render. Derived from `getRenderSourceInputSchema`.
|
|
@@ -164,32 +158,7 @@ export interface GguiGetRenderSourceOutput {
|
|
|
164
158
|
* seam) — consume reads from a separate render-scoped pipe whose entries
|
|
165
159
|
* originate at `submit_action`.
|
|
166
160
|
*/
|
|
167
|
-
export
|
|
168
|
-
/** Stable discriminator — always the literal `'action'`. */
|
|
169
|
-
readonly type: 'action';
|
|
170
|
-
/** GguiSession the gesture targeted. */
|
|
171
|
-
readonly sessionId: string;
|
|
172
|
-
/** Which `actionSpec[*]` entry the iframe dispatched against. */
|
|
173
|
-
readonly intent: string;
|
|
174
|
-
/**
|
|
175
|
-
* Typed payload satisfying `actionSpec[intent].schema`. `null` for
|
|
176
|
-
* no-payload gestures (bare button click).
|
|
177
|
-
*/
|
|
178
|
-
readonly actionData: JsonValue | null;
|
|
179
|
-
/**
|
|
180
|
-
* Snapshot of the contract's `contextSpec` slot values at the moment
|
|
181
|
-
* the user fired the gesture. Empty object `{}` when the contract
|
|
182
|
-
* has no `contextSpec` or no slots have been mirrored yet.
|
|
183
|
-
*/
|
|
184
|
-
readonly uiContext: JsonObject;
|
|
185
|
-
/**
|
|
186
|
-
* 8-hex FNV-1a correlation id of the gesture — matches the iframe-
|
|
187
|
-
* runtime's outstanding-toast key and the server's `drain_ack` frame.
|
|
188
|
-
*/
|
|
189
|
-
readonly actionId: string;
|
|
190
|
-
/** ISO 8601 UTC timestamp of the gesture (iframe-local clock). */
|
|
191
|
-
readonly firedAt: string;
|
|
192
|
-
}
|
|
161
|
+
export type ConsumeEventEntry = Readonly<z.infer<typeof consumeEventEntrySchema>>;
|
|
193
162
|
/**
|
|
194
163
|
* Output from `ggui_consume` — buffered consume-entries.
|
|
195
164
|
*
|
|
@@ -199,23 +168,7 @@ export interface ConsumeEventEntry {
|
|
|
199
168
|
* single source of truth — both the action and the local UI state are
|
|
200
169
|
* atomic on a single entry.
|
|
201
170
|
*/
|
|
202
|
-
export
|
|
203
|
-
/** Buffered consume-entries (cleared after return). */
|
|
204
|
-
events: ConsumeEventEntry[];
|
|
205
|
-
/** GguiSession status — `'expired'` means the GguiSession's TTL elapsed and
|
|
206
|
-
* no more events will arrive; the agent's long-poll loop terminates. */
|
|
207
|
-
status: GguiSessionStatus;
|
|
208
|
-
/**
|
|
209
|
-
* Client-side observations echoed back to the agent. Same shape
|
|
210
|
-
* `ggui_handshake` exposes. Lets the agent pick up mid-render
|
|
211
|
-
* changes (window resize, fullscreen toggle, etc.) without waiting
|
|
212
|
-
* for the next handshake. Absent ⇒ no client observations yet.
|
|
213
|
-
*
|
|
214
|
-
*/
|
|
215
|
-
client?: {
|
|
216
|
-
readonly hostContext?: import('./host-context.js').HostContextProjection;
|
|
217
|
-
};
|
|
218
|
-
}
|
|
171
|
+
export type GguiConsumeOutput = DeepReadonly<z.infer<typeof gguiConsumeOutputSchema>>;
|
|
219
172
|
/**
|
|
220
173
|
* Input for ggui_search_blueprints tool — semantic search over
|
|
221
174
|
* blueprints. Derived from `searchBlueprintsInputSchema`.
|
|
@@ -224,55 +177,7 @@ export type GguiSearchBlueprintsInput = z.infer<typeof searchBlueprintsInputSche
|
|
|
224
177
|
/**
|
|
225
178
|
* Output from ggui_search_blueprints tool
|
|
226
179
|
*/
|
|
227
|
-
export
|
|
228
|
-
/** Matching blueprints ordered by relevance */
|
|
229
|
-
results: Array<{
|
|
230
|
-
id: string;
|
|
231
|
-
name: string;
|
|
232
|
-
description: string;
|
|
233
|
-
category: string;
|
|
234
|
-
props: Array<{
|
|
235
|
-
name: string;
|
|
236
|
-
type: string;
|
|
237
|
-
required: boolean;
|
|
238
|
-
description: string;
|
|
239
|
-
}>;
|
|
240
|
-
callbacks: string[];
|
|
241
|
-
/** Whether this is a featured blueprint (curated by the app developer) */
|
|
242
|
-
featured: boolean;
|
|
243
|
-
relevance: 'match';
|
|
244
|
-
/** Cosine similarity score (0-1). Higher = better match. Agents can use this
|
|
245
|
-
* to decide whether to use a blueprint or generate from scratch. */
|
|
246
|
-
score: number;
|
|
247
|
-
/** Present only on registry-sourced entries — advisory candidates
|
|
248
|
-
* appended after local results, never auto-mounted. */
|
|
249
|
-
origin?: 'registry';
|
|
250
|
-
/** Registry artifact id (`@scope/name`) — registry entries only. */
|
|
251
|
-
artifactId?: string;
|
|
252
|
-
/** Registry artifact version — registry entries only. */
|
|
253
|
-
version?: string;
|
|
254
|
-
/** MCP tool bindings the artifact declares (publisher claims, not
|
|
255
|
-
* endorsements by the named server) — registry entries only. */
|
|
256
|
-
mcpTools?: ReadonlyArray<{
|
|
257
|
-
server?: string;
|
|
258
|
-
tool: string;
|
|
259
|
-
}>;
|
|
260
|
-
/** Publisher-scope verification label — registry entries only. */
|
|
261
|
-
scopeVerification?: 'verified' | 'unverified';
|
|
262
|
-
}>;
|
|
263
|
-
/** Total matches found */
|
|
264
|
-
total: number;
|
|
265
|
-
/** The query that was searched */
|
|
266
|
-
query: string;
|
|
267
|
-
/**
|
|
268
|
-
* Sources consulted but skipped this call (e.g. registry timeout).
|
|
269
|
-
* Present only when a source degraded; the tool call still succeeds.
|
|
270
|
-
*/
|
|
271
|
-
degradedSources?: ReadonlyArray<{
|
|
272
|
-
source: 'registry';
|
|
273
|
-
reason: 'unreachable' | 'timeout' | 'invalid_response';
|
|
274
|
-
}>;
|
|
275
|
-
}
|
|
180
|
+
export type GguiSearchBlueprintsOutput = DeepReadonly<z.infer<typeof gguiSearchBlueprintsOutputSchema>>;
|
|
276
181
|
/**
|
|
277
182
|
* Input for ggui_render_blueprint tool — renders a specific blueprint.
|
|
278
183
|
* Derived from `renderBlueprintInputSchema`.
|
|
@@ -417,12 +322,20 @@ export type RenderCacheMarker = z.infer<typeof renderCacheMarkerSchema>;
|
|
|
417
322
|
* Canonical declaration lives beside the schema in `schemas/mcp.ts`;
|
|
418
323
|
* re-exported here so existing importers keep their path.
|
|
419
324
|
*/
|
|
420
|
-
export type { RenderErrorCode } from '../schemas/mcp';
|
|
325
|
+
export type { RenderErrorCode } from '../schemas/mcp.js';
|
|
421
326
|
/**
|
|
422
327
|
* In-result failure marker on `GguiRenderOutput.error` — present iff the
|
|
423
328
|
* tool result is `isError: true`. Derived from {@link renderErrorSchema}.
|
|
424
329
|
*/
|
|
425
330
|
export type RenderError = z.infer<typeof renderErrorSchema>;
|
|
331
|
+
/**
|
|
332
|
+
* The three-outcome discriminant on `GguiRenderOutput.outcome`
|
|
333
|
+
* (ggui#786) and the PRE-GENERATION refusal marker on
|
|
334
|
+
* `GguiRenderOutput.refusal`. Canonical declarations live beside their
|
|
335
|
+
* schemas in `schemas/mcp.ts`; re-exported here so importers of the
|
|
336
|
+
* output types find them on the same path.
|
|
337
|
+
*/
|
|
338
|
+
export type { PreGenerationRefusal, RenderOutcome } from '../schemas/mcp.js';
|
|
426
339
|
/**
|
|
427
340
|
* Canonical failure code for a `resources/read` on a render locator
|
|
428
341
|
* (SPEC §7.9 Plane 1). Derived from
|
|
@@ -520,6 +433,13 @@ export declare const PLATFORM_ERROR_CODES: {
|
|
|
520
433
|
readonly APP_LIMIT_EXCEEDED: -32011;
|
|
521
434
|
readonly CONCURRENT_SESSION_LIMIT: -32012;
|
|
522
435
|
readonly RATE_LIMIT_EXCEEDED: -32013;
|
|
436
|
+
/**
|
|
437
|
+
* The generation queue is saturated — the server, not the caller, is
|
|
438
|
+
* the limit (contrast `RATE_LIMIT_EXCEEDED`: the caller slows down). HTTP
|
|
439
|
+
* 503 with `Retry-After`, which governs the retry; a parsed request's
|
|
440
|
+
* refusal, so it speaks this table (ggui#836 follow-up).
|
|
441
|
+
*/
|
|
442
|
+
readonly GENERATION_OVERLOADED: -32014;
|
|
523
443
|
readonly CONTRACT_VIOLATION: -32020;
|
|
524
444
|
};
|
|
525
445
|
//# sourceMappingURL=mcp.d.ts.map
|
package/dist/types/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAA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AGG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE1E;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG,wBAAwB,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAMtF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;IAW1B;;;;;;;;;;;;;OAaG;;CAEK,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;IAK/B;;;;;OAKG;;;CAGK,CAAC"}
|
package/dist/types/mcp.js
CHANGED
|
@@ -50,5 +50,12 @@ export const PLATFORM_ERROR_CODES = {
|
|
|
50
50
|
APP_LIMIT_EXCEEDED: -32011,
|
|
51
51
|
CONCURRENT_SESSION_LIMIT: -32012,
|
|
52
52
|
RATE_LIMIT_EXCEEDED: -32013,
|
|
53
|
+
/**
|
|
54
|
+
* The generation queue is saturated — the server, not the caller, is
|
|
55
|
+
* the limit (contrast `RATE_LIMIT_EXCEEDED`: the caller slows down). HTTP
|
|
56
|
+
* 503 with `Retry-After`, which governs the retry; a parsed request's
|
|
57
|
+
* refusal, so it speaks this table (ggui#836 follow-up).
|
|
58
|
+
*/
|
|
59
|
+
GENERATION_OVERLOADED: -32014,
|
|
53
60
|
CONTRACT_VIOLATION: -32020,
|
|
54
61
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Readonly applied at the SEAM, never in a wire schema: zod 4 projects
|
|
3
|
+
* `.readonly()` as `readOnly` into the advertised JSON Schema, and the wire
|
|
4
|
+
* is mutable JSON. Types derived from a wire schema wear this instead, so a
|
|
5
|
+
* consumer holding a projection cannot mutate it while the schema still
|
|
6
|
+
* says exactly what travels.
|
|
7
|
+
*/
|
|
8
|
+
export type DeepReadonly<T> = T extends (infer U)[] ? ReadonlyArray<DeepReadonly<U>> : T extends object ? {
|
|
9
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
10
|
+
} : T;
|
|
11
|
+
//# sourceMappingURL=readonly.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readonly.d.ts","sourceRoot":"","sources":["../../src/types/readonly.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAC/C,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAC9B,CAAC,SAAS,MAAM,GACd;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|