@ggui-ai/protocol 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/errors/domain-error.d.ts +70 -0
- package/dist/errors/domain-error.d.ts.map +1 -0
- package/dist/errors/domain-error.js +118 -0
- package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -4
- package/dist/integrations/mcp-apps.d.ts +48 -8
- package/dist/integrations/mcp-apps.d.ts.map +1 -1
- package/dist/integrations/mcp-apps.js +29 -23
- package/dist/integrations/overlay-hash.d.ts +19 -0
- package/dist/integrations/overlay-hash.d.ts.map +1 -0
- package/dist/integrations/overlay-hash.js +29 -0
- package/dist/integrations/theme-binding.d.ts +14 -12
- package/dist/integrations/theme-binding.d.ts.map +1 -1
- package/dist/integrations/theme-binding.js +10 -6
- package/dist/registry/blueprint-key.d.ts.map +1 -1
- package/dist/registry/blueprint-key.js +4 -3
- package/dist/schemas/app-generation-profile.d.ts +139 -0
- package/dist/schemas/app-generation-profile.d.ts.map +1 -0
- package/dist/schemas/app-generation-profile.js +121 -0
- package/dist/schemas/app-theme.d.ts +235 -9
- package/dist/schemas/app-theme.d.ts.map +1 -1
- package/dist/schemas/app-theme.js +218 -40
- package/dist/schemas/blueprint.d.ts +2 -1
- package/dist/schemas/blueprint.d.ts.map +1 -1
- package/dist/schemas/blueprint.js +15 -3
- package/dist/schemas/data-contract.d.ts +1 -1
- package/dist/schemas/data-contract.js +1 -1
- package/dist/schemas/handshake-suggestion.d.ts.map +1 -1
- package/dist/schemas/handshake-suggestion.js +8 -1
- package/dist/schemas/mcp.d.ts +62 -27
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +59 -21
- package/dist/schemas/ops-blueprint.d.ts +11 -4
- package/dist/schemas/ops-blueprint.d.ts.map +1 -1
- package/dist/schemas/ops-blueprint.js +25 -8
- package/dist/schemas/render-input-envelope.js +1 -1
- package/dist/schemas/rendering-context.d.ts +48 -0
- package/dist/schemas/rendering-context.d.ts.map +1 -0
- package/dist/schemas/rendering-context.js +39 -0
- package/dist/types/blueprint-source.d.ts +27 -7
- package/dist/types/blueprint-source.d.ts.map +1 -1
- package/dist/types/blueprint-source.js +19 -3
- package/dist/types/blueprint.d.ts +2 -2
- package/dist/types/blueprint.d.ts.map +1 -1
- package/dist/types/data-contract.d.ts +3 -3
- package/dist/types/domain-error-codes.d.ts +167 -0
- package/dist/types/domain-error-codes.d.ts.map +1 -0
- package/dist/types/domain-error-codes.js +170 -0
- package/dist/types/handshake-suggestion.d.ts +2 -2
- package/dist/types/live-channel.d.ts +1 -1
- package/dist/types/llm-route.d.ts +59 -2
- package/dist/types/llm-route.d.ts.map +1 -1
- package/dist/types/llm-route.js +62 -16
- package/dist/types/llm.d.ts +22 -2
- package/dist/types/llm.d.ts.map +1 -1
- package/dist/types/llm.js +29 -2
- package/dist/types/mcp.d.ts +31 -39
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +22 -10
- package/dist/types/refusal-codes.d.ts +31 -93
- package/dist/types/refusal-codes.d.ts.map +1 -1
- package/dist/types/refusal-codes.js +41 -96
- package/dist/types/render.d.ts +6 -5
- package/dist/types/render.d.ts.map +1 -1
- package/dist/validation/contract-validator.d.ts +8 -2
- package/dist/validation/contract-validator.d.ts.map +1 -1
- package/dist/validation/contract-validator.js +12 -4
- package/dist/validation/lint-contract.d.ts +2 -2
- package/dist/validation/lint-contract.d.ts.map +1 -1
- package/dist/validation/lint-contract.js +6 -4
- package/dist/validation/schema-subset.d.ts +3 -3
- package/dist/version.d.ts +445 -6
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +444 -5
- package/package.json +1 -1
- package/dist/envelope-adapters.d.ts +0 -12
- package/dist/envelope-adapters.d.ts.map +0 -1
- package/dist/envelope-adapters.js +0 -30
package/dist/types/llm.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - `MODEL_REGISTRY` here = LiteLLM-keyed pricing + capability
|
|
7
7
|
* metadata. Keys are LiteLLM strings (`"gemini/gemini-3.5-flash"`,
|
|
8
8
|
* `"openai/gpt-5.4-mini"`, …). Read by:
|
|
9
|
-
* -
|
|
9
|
+
* - a hosted deployment's pricing-drift test (vendored
|
|
10
10
|
* LiteLLM JSON pricing table)
|
|
11
11
|
* - `oss/misc/benchmark` runner (bench harness; picks model
|
|
12
12
|
* configs by LiteLLM key)
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
* EXISTS, and `scripts/check-litellm-pricing-drift.ts` compares the
|
|
41
41
|
* snapshot against upstream, never the registry. That gap let this
|
|
42
42
|
* table sit four months stale while production routed to models it did
|
|
43
|
-
* not even list.
|
|
43
|
+
* not even list. A hosted deployment's `pricing-tables.test.ts` now asserts every
|
|
44
44
|
* entry's `costs` match the vendored rate (with an explicit, dated
|
|
45
45
|
* PENDING_UPSTREAM allowlist for prices we learn before LiteLLM does).
|
|
46
46
|
* Add a model here and you MUST re-vendor the snapshot in the same
|
|
@@ -307,6 +307,27 @@ const MODEL_ROWS = defineModelRegistry({
|
|
|
307
307
|
// confirmed upstream LiteLLM has ingested both cuts, so these costs
|
|
308
308
|
// now agree with the vendored snapshot (no PENDING_UPSTREAM
|
|
309
309
|
// exemption needed).
|
|
310
|
+
// ggui#977 (2026-09-09) — Exp 008's founder-ruled second arm. Receipts on
|
|
311
|
+
// the issue: existence `GET /v1/models/gpt-6-astra` → 200; pricing from
|
|
312
|
+
// platform.openai.com/docs/pricing, standard short-context tier; context
|
|
313
|
+
// window and tool support from the model page. No retirement date is
|
|
314
|
+
// published → `retireNotBefore` unset. Not in the lineup (experiment arm).
|
|
315
|
+
"openai/gpt-6-astra": {
|
|
316
|
+
id: "openai/gpt-6-astra",
|
|
317
|
+
provider: "openai",
|
|
318
|
+
displayName: "GPT-6 Astra",
|
|
319
|
+
tier: "premium",
|
|
320
|
+
state: "active",
|
|
321
|
+
lineup: false,
|
|
322
|
+
costs: {
|
|
323
|
+
inputPer1M: 10.0,
|
|
324
|
+
outputPer1M: 50.0,
|
|
325
|
+
cacheWritePer1M: 12.5,
|
|
326
|
+
cacheReadPer1M: 1.0,
|
|
327
|
+
},
|
|
328
|
+
maxTokens: 922000,
|
|
329
|
+
supportsTools: true,
|
|
330
|
+
},
|
|
310
331
|
"openai/gpt-5.6-sol": {
|
|
311
332
|
id: "openai/gpt-5.6-sol",
|
|
312
333
|
provider: "openai",
|
|
@@ -399,6 +420,12 @@ const MODEL_ROWS = defineModelRegistry({
|
|
|
399
420
|
* {@link ModelId} and enforce `id === key`.
|
|
400
421
|
*/
|
|
401
422
|
export const MODEL_REGISTRY = MODEL_ROWS;
|
|
423
|
+
/** Whether `value` is a registry model id — provider-qualified, e.g. `anthropic/claude-haiku-4-5`. */
|
|
424
|
+
export function isModelId(value) {
|
|
425
|
+
return Object.hasOwn(MODEL_ROWS, value);
|
|
426
|
+
}
|
|
427
|
+
/** Every registry model id, in registry order (ggui#924: the blueprint record's `model` is one of these). */
|
|
428
|
+
export const MODEL_IDS = Object.keys(MODEL_ROWS).filter(isModelId);
|
|
402
429
|
/**
|
|
403
430
|
* The curated "current lineup" — derived once from the rows' `lineup`
|
|
404
431
|
* fact, in registry order. Pickers render this up front and put the
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -1,41 +1,21 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
2
|
import type { DataContract, JsonObject, JsonSchema, JsonValue } from './data-contract.js';
|
|
3
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';
|
|
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, pendingEventSchema, gguiConsumeOutputSchema, gguiEmitOutputSchema, gguiListSessionsOutputSchema } from '../schemas/mcp.js';
|
|
5
5
|
import type { EventsResponse, ReplayHorizonPassedError } from './ggui-session-event.js';
|
|
6
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
|
/**
|
|
10
|
-
*
|
|
10
|
+
* One stored row of the consume pipe — a user action awaiting the agent's
|
|
11
|
+
* `ggui_consume`. Derived from {@link pendingEventSchema} (ggui#839): the
|
|
12
|
+
* shape a producer appends and a store drains, on every store.
|
|
11
13
|
*
|
|
12
|
-
* `envelope` is the canonical {@link ConsumeEventEntry}
|
|
13
|
-
* is the
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* a JSON-stringified object, depending on how the deployment's storage
|
|
18
|
-
* layer serializes rows. Consume readers MUST accept both — see
|
|
19
|
-
* {@link parsePendingEnvelope}.
|
|
20
|
-
*/
|
|
21
|
-
export interface PendingEvent {
|
|
22
|
-
/** Stable row id — UUID assigned at ingestion. */
|
|
23
|
-
id: string;
|
|
24
|
-
/**
|
|
25
|
-
* Canonical {@link ConsumeEventEntry} row payload. JSON object or
|
|
26
|
-
* stringified JSON on the wire (both shapes round-trip through the
|
|
27
|
-
* consume helpers).
|
|
28
|
-
*/
|
|
29
|
-
envelope: ConsumeEventEntry | string;
|
|
30
|
-
/**
|
|
31
|
-
* GguiSession-scoped monotonic sequence assigned at ingestion. Mirrors
|
|
32
|
-
* `GguiSession.eventSequence` at the moment this row was appended so
|
|
33
|
-
* consumers can detect gaps without reading render state.
|
|
34
|
-
*/
|
|
35
|
-
sequence: number;
|
|
36
|
-
/** ISO datetime when the row was appended. */
|
|
37
|
-
createdAt: string;
|
|
38
|
-
}
|
|
14
|
+
* `envelope` is the canonical {@link ConsumeEventEntry} — always the
|
|
15
|
+
* object. `id` is the drain_ack key and the idempotency key per
|
|
16
|
+
* `(sessionId, id)`. `createdAt` is when the row was appended.
|
|
17
|
+
*/
|
|
18
|
+
export type PendingEvent = Readonly<z.infer<typeof pendingEventSchema>>;
|
|
39
19
|
/**
|
|
40
20
|
* Input for ggui_consume tool — long-poll for buffered events on a
|
|
41
21
|
* specific render.
|
|
@@ -280,7 +260,7 @@ export type GguiHandshakeOutput = z.infer<typeof handshakeOutputSchema>;
|
|
|
280
260
|
*
|
|
281
261
|
* Mirrors `handshakeOutputSchema.serverCapabilities` exactly — exported
|
|
282
262
|
* here as a named TypeScript type so server-side composition layers
|
|
283
|
-
* (the OSS `createGguiServer` resolver,
|
|
263
|
+
* (the OSS `createGguiServer` resolver, a hosted deployment's composer) can hand
|
|
284
264
|
* one back to the handshake factory without re-deriving the shape from
|
|
285
265
|
* the schema.
|
|
286
266
|
*
|
|
@@ -395,8 +375,17 @@ export type GguiRuntimeTelemetryOutput = z.infer<typeof runtimeTelemetryOutputSc
|
|
|
395
375
|
* §7.1; see {@link RenderErrorCode}). The slot stays unassigned so a
|
|
396
376
|
* future canonical code can't silently collide with stale consumers.
|
|
397
377
|
*
|
|
378
|
+
* `-32001` is RETIRED-RESERVED too (ggui#853): `UNAUTHORIZED` lived
|
|
379
|
+
* there until the 0.16.0 wave, but `-32001` is the MCP SDK client's own
|
|
380
|
+
* `RequestTimeout` — minted locally, never sent by a server — so a
|
|
381
|
+
* client reading the number could not tell a server's UNAUTHORIZED
|
|
382
|
+
* from its own timeout, the class ggui#836 closed for `-32000`
|
|
383
|
+
* (`ConnectionClosed`). `UNAUTHORIZED` is `-32007`; the slot stays
|
|
384
|
+
* unassigned. `error-codes-vs-sdk.test.ts` pins that no ggui-chosen
|
|
385
|
+
* code equals a code the SDK's `ErrorCode` enum owns.
|
|
386
|
+
*
|
|
398
387
|
* `-32006` is assigned to `MOUNT_UNAVAILABLE`; new canonical codes come
|
|
399
|
-
* at `-
|
|
388
|
+
* at `-32008` onwards.
|
|
400
389
|
*/
|
|
401
390
|
export declare const MCP_ERROR_CODES: {
|
|
402
391
|
readonly PARSE_ERROR: -32700;
|
|
@@ -404,10 +393,9 @@ export declare const MCP_ERROR_CODES: {
|
|
|
404
393
|
readonly METHOD_NOT_FOUND: -32601;
|
|
405
394
|
readonly INVALID_PARAMS: -32602;
|
|
406
395
|
readonly INTERNAL_ERROR: -32603;
|
|
407
|
-
readonly UNAUTHORIZED: -
|
|
396
|
+
readonly UNAUTHORIZED: -32007;
|
|
408
397
|
readonly SESSION_NOT_FOUND: -32002;
|
|
409
398
|
readonly APP_NOT_FOUND: -32003;
|
|
410
|
-
readonly CAPABILITY_DENIED: -32005;
|
|
411
399
|
/**
|
|
412
400
|
* A `resources/read` identified the resource but cannot return a
|
|
413
401
|
* mount for it — the component behind it is gone, the server keeps no
|
|
@@ -427,19 +415,23 @@ export declare const MCP_ERROR_CODES: {
|
|
|
427
415
|
/**
|
|
428
416
|
* Platform-specific error codes (-32010 range).
|
|
429
417
|
* These are ggui platform extensions, not part of the core protocol.
|
|
418
|
+
* `-32010`..`-32013` and `-32020` are retired-reserved (SPEC §7.9,
|
|
419
|
+
* ggui#910 / ggui#890): declared once, emitted by nothing first-party —
|
|
420
|
+
* quota, app-limit and concurrency states are refusals or
|
|
421
|
+
* implementation-range codes, and a contract violation is the Plane-2
|
|
422
|
+
* `contract_violation` result or the live channel's `CONTRACT_VIOLATION`
|
|
423
|
+
* frame code, never a JSON-RPC number.
|
|
430
424
|
*/
|
|
431
425
|
export declare const PLATFORM_ERROR_CODES: {
|
|
432
|
-
readonly GENERATION_QUOTA_EXCEEDED: -32010;
|
|
433
|
-
readonly APP_LIMIT_EXCEEDED: -32011;
|
|
434
|
-
readonly CONCURRENT_SESSION_LIMIT: -32012;
|
|
435
|
-
readonly RATE_LIMIT_EXCEEDED: -32013;
|
|
436
426
|
/**
|
|
437
427
|
* The generation queue is saturated — the server, not the caller, is
|
|
438
|
-
* the limit (contrast
|
|
428
|
+
* the limit (contrast a caller-side rate cap, which is a render-gate
|
|
429
|
+
* REFUSAL — `app_rate_limited` / `issuer_rate_limited`, SPEC §7.1 — the
|
|
430
|
+
* caller slows down; its former numeric `-32013` is retired-reserved,
|
|
431
|
+
* SPEC §7.9, ggui#890). HTTP
|
|
439
432
|
* 503 with `Retry-After`, which governs the retry; a parsed request's
|
|
440
433
|
* refusal, so it speaks this table (ggui#836 follow-up).
|
|
441
434
|
*/
|
|
442
435
|
readonly GENERATION_OVERLOADED: -32014;
|
|
443
|
-
readonly CONTRACT_VIOLATION: -32020;
|
|
444
436
|
};
|
|
445
437
|
//# 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,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB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CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC9D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;GAGG;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;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,eAAe;;;;;;;;;IAU1B;;;;;;;;;;;;;OAaG;;CAEK,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;IAC/B;;;;;;;;OAQG;;CAEK,CAAC"}
|
package/dist/types/mcp.js
CHANGED
|
@@ -11,8 +11,17 @@
|
|
|
11
11
|
* §7.1; see {@link RenderErrorCode}). The slot stays unassigned so a
|
|
12
12
|
* future canonical code can't silently collide with stale consumers.
|
|
13
13
|
*
|
|
14
|
+
* `-32001` is RETIRED-RESERVED too (ggui#853): `UNAUTHORIZED` lived
|
|
15
|
+
* there until the 0.16.0 wave, but `-32001` is the MCP SDK client's own
|
|
16
|
+
* `RequestTimeout` — minted locally, never sent by a server — so a
|
|
17
|
+
* client reading the number could not tell a server's UNAUTHORIZED
|
|
18
|
+
* from its own timeout, the class ggui#836 closed for `-32000`
|
|
19
|
+
* (`ConnectionClosed`). `UNAUTHORIZED` is `-32007`; the slot stays
|
|
20
|
+
* unassigned. `error-codes-vs-sdk.test.ts` pins that no ggui-chosen
|
|
21
|
+
* code equals a code the SDK's `ErrorCode` enum owns.
|
|
22
|
+
*
|
|
14
23
|
* `-32006` is assigned to `MOUNT_UNAVAILABLE`; new canonical codes come
|
|
15
|
-
* at `-
|
|
24
|
+
* at `-32008` onwards.
|
|
16
25
|
*/
|
|
17
26
|
export const MCP_ERROR_CODES = {
|
|
18
27
|
PARSE_ERROR: -32700,
|
|
@@ -20,11 +29,10 @@ export const MCP_ERROR_CODES = {
|
|
|
20
29
|
METHOD_NOT_FOUND: -32601,
|
|
21
30
|
INVALID_PARAMS: -32602,
|
|
22
31
|
INTERNAL_ERROR: -32603,
|
|
23
|
-
// Protocol-specific error codes (-32004 retired-reserved — see above)
|
|
24
|
-
UNAUTHORIZED: -
|
|
32
|
+
// Protocol-specific error codes (-32001, -32004 and -32005 retired-reserved — see above)
|
|
33
|
+
UNAUTHORIZED: -32007,
|
|
25
34
|
SESSION_NOT_FOUND: -32002,
|
|
26
35
|
APP_NOT_FOUND: -32003,
|
|
27
|
-
CAPABILITY_DENIED: -32005,
|
|
28
36
|
/**
|
|
29
37
|
* A `resources/read` identified the resource but cannot return a
|
|
30
38
|
* mount for it — the component behind it is gone, the server keeps no
|
|
@@ -44,18 +52,22 @@ export const MCP_ERROR_CODES = {
|
|
|
44
52
|
/**
|
|
45
53
|
* Platform-specific error codes (-32010 range).
|
|
46
54
|
* These are ggui platform extensions, not part of the core protocol.
|
|
55
|
+
* `-32010`..`-32013` and `-32020` are retired-reserved (SPEC §7.9,
|
|
56
|
+
* ggui#910 / ggui#890): declared once, emitted by nothing first-party —
|
|
57
|
+
* quota, app-limit and concurrency states are refusals or
|
|
58
|
+
* implementation-range codes, and a contract violation is the Plane-2
|
|
59
|
+
* `contract_violation` result or the live channel's `CONTRACT_VIOLATION`
|
|
60
|
+
* frame code, never a JSON-RPC number.
|
|
47
61
|
*/
|
|
48
62
|
export const PLATFORM_ERROR_CODES = {
|
|
49
|
-
GENERATION_QUOTA_EXCEEDED: -32010,
|
|
50
|
-
APP_LIMIT_EXCEEDED: -32011,
|
|
51
|
-
CONCURRENT_SESSION_LIMIT: -32012,
|
|
52
|
-
RATE_LIMIT_EXCEEDED: -32013,
|
|
53
63
|
/**
|
|
54
64
|
* The generation queue is saturated — the server, not the caller, is
|
|
55
|
-
* the limit (contrast
|
|
65
|
+
* the limit (contrast a caller-side rate cap, which is a render-gate
|
|
66
|
+
* REFUSAL — `app_rate_limited` / `issuer_rate_limited`, SPEC §7.1 — the
|
|
67
|
+
* caller slows down; its former numeric `-32013` is retired-reserved,
|
|
68
|
+
* SPEC §7.9, ggui#890). HTTP
|
|
56
69
|
* 503 with `Retry-After`, which governs the retry; a parsed request's
|
|
57
70
|
* refusal, so it speaks this table (ggui#836 follow-up).
|
|
58
71
|
*/
|
|
59
72
|
GENERATION_OVERLOADED: -32014,
|
|
60
|
-
CONTRACT_VIOLATION: -32020,
|
|
61
73
|
};
|
|
@@ -102,7 +102,7 @@ declare const REFUSAL_ROWS: {
|
|
|
102
102
|
readonly retry: "after-fix";
|
|
103
103
|
readonly fixBy: "owner";
|
|
104
104
|
readonly emitter: "a deployment's generation gate, balance arm";
|
|
105
|
-
readonly description: "The balance this deployment funds the
|
|
105
|
+
readonly description: "The balance this deployment funds the render from is at or below zero — pool or BYOK lane alike — so nothing renders under it. The owner adds credit, after which the same call succeeds.";
|
|
106
106
|
};
|
|
107
107
|
readonly hard_cap_exceeded: {
|
|
108
108
|
readonly code: "hard_cap_exceeded";
|
|
@@ -111,13 +111,13 @@ declare const REFUSAL_ROWS: {
|
|
|
111
111
|
readonly emitter: "a deployment's generation gate, cap arm";
|
|
112
112
|
readonly description: "The app reached the hard ceiling this deployment set for the current period. Nothing the caller or the owner does lifts it before the period rolls over.";
|
|
113
113
|
};
|
|
114
|
-
readonly
|
|
115
|
-
readonly code: "
|
|
114
|
+
readonly model_not_allowed: {
|
|
115
|
+
readonly code: "model_not_allowed";
|
|
116
116
|
readonly surfaces: readonly ["render-gate"];
|
|
117
117
|
readonly retry: "after-fix";
|
|
118
118
|
readonly fixBy: "caller";
|
|
119
119
|
readonly emitter: "a deployment's generation gate, model arm";
|
|
120
|
-
readonly description: "The requested model is not
|
|
120
|
+
readonly description: "The requested model is not one this account has been granted on this deployment. The caller picks a granted model and retries with the same handshakeId — the one render-gate state an agent may act on itself.";
|
|
121
121
|
};
|
|
122
122
|
readonly managed_default_cap_exceeded: {
|
|
123
123
|
readonly code: "managed_default_cap_exceeded";
|
|
@@ -142,30 +142,6 @@ declare const REFUSAL_ROWS: {
|
|
|
142
142
|
readonly emitter: "a deployment's provisioning guard and its generation gate, reading the same record";
|
|
143
143
|
readonly description: "The app record declares a funding mode this deployment does not recognise, or declares none at all. The value is reported as read and never coerced — an unreadable record is not a policy.";
|
|
144
144
|
};
|
|
145
|
-
readonly app_canceled: {
|
|
146
|
-
readonly code: "app_canceled";
|
|
147
|
-
readonly surfaces: readonly ["render-gate"];
|
|
148
|
-
readonly retry: "after-fix";
|
|
149
|
-
readonly fixBy: "owner";
|
|
150
|
-
readonly emitter: "a deployment's generation gate, plan-state arm";
|
|
151
|
-
readonly description: "The app's plan has ended, so it renders nothing while the stored work is kept. The owner starts a new plan to restore rendering.";
|
|
152
|
-
};
|
|
153
|
-
readonly trial_exhausted: {
|
|
154
|
-
readonly code: "trial_exhausted";
|
|
155
|
-
readonly surfaces: readonly ["render-gate"];
|
|
156
|
-
readonly retry: "after-fix";
|
|
157
|
-
readonly fixBy: "owner";
|
|
158
|
-
readonly emitter: "a deployment's generation gate, trial arm";
|
|
159
|
-
readonly description: "The trial this deployment grants the app has used up its allotment. The owner starts a paid plan.";
|
|
160
|
-
};
|
|
161
|
-
readonly trial_expired: {
|
|
162
|
-
readonly code: "trial_expired";
|
|
163
|
-
readonly surfaces: readonly ["render-gate"];
|
|
164
|
-
readonly retry: "after-fix";
|
|
165
|
-
readonly fixBy: "owner";
|
|
166
|
-
readonly emitter: "a deployment's generation gate, trial arm";
|
|
167
|
-
readonly description: "The app's trial window has closed. The owner starts a paid plan.";
|
|
168
|
-
};
|
|
169
145
|
readonly issuer_rate_limited: {
|
|
170
146
|
readonly code: "issuer_rate_limited";
|
|
171
147
|
readonly surfaces: readonly ["render-gate"];
|
|
@@ -192,16 +168,8 @@ declare const REFUSAL_ROWS: {
|
|
|
192
168
|
readonly surfaces: readonly ["render-gate"];
|
|
193
169
|
readonly retry: "after-fix";
|
|
194
170
|
readonly fixBy: "owner";
|
|
195
|
-
readonly emitter: "the generation gate's fall-through arm: a non-playground identity that resolves to no billing path (not a
|
|
196
|
-
readonly description: "The caller has no billing subject on this deployment, so nothing renders under it. The owner provisions one — a
|
|
197
|
-
};
|
|
198
|
-
readonly subscription_exists: {
|
|
199
|
-
readonly code: "subscription_exists";
|
|
200
|
-
readonly surfaces: readonly ["owner-api"];
|
|
201
|
-
readonly retry: "after-fix";
|
|
202
|
-
readonly fixBy: "owner";
|
|
203
|
-
readonly emitter: "a deployment's owner billing mutations";
|
|
204
|
-
readonly description: "An active (non-canceled) plan exists on this app. It refuses starting another one AND deleting the app — the refusal's own `fix` names the next step for the action that was called.";
|
|
171
|
+
readonly emitter: "the generation gate's fall-through arm: a non-playground identity that resolves to no billing path (not a managed app, not a credit holder)";
|
|
172
|
+
readonly description: "The caller has no billing subject on this deployment, so nothing renders under it. The owner provisions one — a managed policy, or credit. Unlike `billing_mode_anomaly` — an app record that exists and declares a funding mode this deployment cannot read — no record arm applies here: there is simply no subject to bill. A deployment MAY suppress this refusal by operator override; that switch is deployment policy, not a wire state.";
|
|
205
173
|
};
|
|
206
174
|
readonly checkout_unavailable: {
|
|
207
175
|
readonly code: "checkout_unavailable";
|
|
@@ -209,60 +177,7 @@ declare const REFUSAL_ROWS: {
|
|
|
209
177
|
readonly retry: "later";
|
|
210
178
|
readonly fixBy: "operator";
|
|
211
179
|
readonly emitter: "a deployment's owner billing mutations";
|
|
212
|
-
readonly description: "The surface that
|
|
213
|
-
};
|
|
214
|
-
readonly card_update_unavailable: {
|
|
215
|
-
readonly code: "card_update_unavailable";
|
|
216
|
-
readonly surfaces: readonly ["owner-api"];
|
|
217
|
-
readonly retry: "later";
|
|
218
|
-
readonly fixBy: "operator";
|
|
219
|
-
readonly emitter: "a deployment's owner billing mutations";
|
|
220
|
-
readonly description: "The surface that updates a payment method is unavailable on this deployment right now. Only the operator can restore it.";
|
|
221
|
-
};
|
|
222
|
-
readonly portal_unavailable: {
|
|
223
|
-
readonly code: "portal_unavailable";
|
|
224
|
-
readonly surfaces: readonly ["owner-api"];
|
|
225
|
-
readonly retry: "later";
|
|
226
|
-
readonly fixBy: "operator";
|
|
227
|
-
readonly emitter: "a deployment's owner billing mutations";
|
|
228
|
-
readonly description: "The self-service billing surface is unavailable on this deployment right now. Only the operator can restore it.";
|
|
229
|
-
};
|
|
230
|
-
readonly no_subscription: {
|
|
231
|
-
readonly code: "no_subscription";
|
|
232
|
-
readonly surfaces: readonly ["owner-api"];
|
|
233
|
-
readonly retry: "after-fix";
|
|
234
|
-
readonly fixBy: "owner";
|
|
235
|
-
readonly emitter: "a deployment's owner billing mutations";
|
|
236
|
-
readonly description: "A plan-management action was called on an app that has no plan. The owner starts a plan first.";
|
|
237
|
-
};
|
|
238
|
-
readonly already_on_tier: {
|
|
239
|
-
readonly code: "already_on_tier";
|
|
240
|
-
readonly surfaces: readonly ["owner-api"];
|
|
241
|
-
readonly retry: "after-fix";
|
|
242
|
-
readonly fixBy: "owner";
|
|
243
|
-
readonly emitter: "a deployment's owner billing mutations";
|
|
244
|
-
readonly description: "The plan requested is the one the app is already on. The owner picks a different plan.";
|
|
245
|
-
};
|
|
246
|
-
readonly managed_app_no_checkout: {
|
|
247
|
-
readonly code: "managed_app_no_checkout";
|
|
248
|
-
readonly surfaces: readonly ["owner-api"];
|
|
249
|
-
readonly retry: "never";
|
|
250
|
-
readonly emitter: "a deployment's owner billing mutations";
|
|
251
|
-
readonly description: "This app is funded by the tenant that provisioned it, so it has no owner-facing plan surface at all. No owner action creates one.";
|
|
252
|
-
};
|
|
253
|
-
readonly managed_app_no_card_update: {
|
|
254
|
-
readonly code: "managed_app_no_card_update";
|
|
255
|
-
readonly surfaces: readonly ["owner-api"];
|
|
256
|
-
readonly retry: "never";
|
|
257
|
-
readonly emitter: "a deployment's owner billing mutations";
|
|
258
|
-
readonly description: "This app is funded by the tenant that provisioned it, so it carries no owner payment method to update.";
|
|
259
|
-
};
|
|
260
|
-
readonly managed_app_no_portal: {
|
|
261
|
-
readonly code: "managed_app_no_portal";
|
|
262
|
-
readonly surfaces: readonly ["owner-api"];
|
|
263
|
-
readonly retry: "never";
|
|
264
|
-
readonly emitter: "a deployment's owner billing mutations";
|
|
265
|
-
readonly description: "This app is funded by the tenant that provisioned it, so it has no owner self-service billing surface.";
|
|
180
|
+
readonly description: "The surface that adds credit (a top-up) is unavailable on this deployment right now — unconfigured, or its provider is down. Only the operator can restore it.";
|
|
266
181
|
};
|
|
267
182
|
readonly owner_ref_mismatch: {
|
|
268
183
|
readonly code: "owner_ref_mismatch";
|
|
@@ -301,6 +216,15 @@ export interface RefusalRow {
|
|
|
301
216
|
}
|
|
302
217
|
/** The registry consumers read. */
|
|
303
218
|
export declare const PRE_GENERATION_REFUSAL_CODES: Readonly<Record<RefusalCode, RefusalRow>>;
|
|
219
|
+
/**
|
|
220
|
+
* The SAME registry object with its per-key literal types kept
|
|
221
|
+
* (ggui#889): `PRE_GENERATION_REFUSAL_ROWS.app_rate_limited.code` is
|
|
222
|
+
* `'app_rate_limited'`, its `retry` is `'later'`. The normalized view
|
|
223
|
+
* above erases those literals so `fixBy` reads uniformly; a producer
|
|
224
|
+
* that must satisfy a wire enum from a row (the registry-purity pin
|
|
225
|
+
* forbids the literal in source) reads it here — no parse, no literal.
|
|
226
|
+
*/
|
|
227
|
+
export declare const PRE_GENERATION_REFUSAL_ROWS: typeof REFUSAL_ROWS;
|
|
304
228
|
/**
|
|
305
229
|
* The codes on one surface, derived type-level from the literal rows'
|
|
306
230
|
* `surfaces` tuples. A runtime `.filter()` cannot narrow a type, so the
|
|
@@ -328,7 +252,7 @@ export type McpEndpointRefusalCode = CodesOnSurface<'mcp-endpoint'>;
|
|
|
328
252
|
* Every render-gate code, as the literal tuple the wire enum
|
|
329
253
|
* (`renderRefusalSchema.code`) is built from. Order is the registry's.
|
|
330
254
|
*/
|
|
331
|
-
export declare const RENDER_GATE_REFUSAL_CODES: readonly ["unsupported_provider", "insufficient_credit", "hard_cap_exceeded", "
|
|
255
|
+
export declare const RENDER_GATE_REFUSAL_CODES: readonly ["unsupported_provider", "insufficient_credit", "hard_cap_exceeded", "model_not_allowed", "managed_default_cap_exceeded", "app_policy_missing", "billing_mode_anomaly", "billing_path_missing", "issuer_rate_limited", "app_rate_limited", "app_deprovisioned"];
|
|
332
256
|
/**
|
|
333
257
|
* Every mcp-endpoint code, as the literal tuple the transport wire enum
|
|
334
258
|
* (`transportRefusalSchema.code`) is built from — the refusals a per-app
|
|
@@ -336,5 +260,19 @@ export declare const RENDER_GATE_REFUSAL_CODES: readonly ["unsupported_provider"
|
|
|
336
260
|
* (ggui#825). Order is the registry's.
|
|
337
261
|
*/
|
|
338
262
|
export declare const MCP_ENDPOINT_REFUSAL_CODES: readonly ["app_deprovisioned"];
|
|
263
|
+
/**
|
|
264
|
+
* A code an owner-API billing mutation may refuse with — i.e. one whose
|
|
265
|
+
* `surfaces` include `owner-api`. Derived, so a render-gate code is not
|
|
266
|
+
* expressible on an owner-API refusal. Registry v11 (ggui#960): the
|
|
267
|
+
* plan-era owner-api rows retired with the plan model; one owner billing
|
|
268
|
+
* surface remains — adding credit.
|
|
269
|
+
*/
|
|
270
|
+
export type OwnerApiRefusalCode = CodesOnSurface<'owner-api'>;
|
|
271
|
+
/**
|
|
272
|
+
* Every owner-api code, as the literal tuple a backend's owner-API
|
|
273
|
+
* refusal helper types its `code` from (ggui#960). Order is the
|
|
274
|
+
* registry's.
|
|
275
|
+
*/
|
|
276
|
+
export declare const OWNER_API_REFUSAL_CODES: readonly ["checkout_unavailable"];
|
|
339
277
|
export {};
|
|
340
278
|
//# sourceMappingURL=refusal-codes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refusal-codes.d.ts","sourceRoot":"","sources":["../../src/types/refusal-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,2EAKnB,CAAC;AAEX,8CAA8C;AAC9C,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,yEAAyE;AACzE,eAAO,MAAM,eAAe,yDAKlB,CAAC;AAEX,6CAA6C;AAC7C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,cAAc,oDAAqD,CAAC;AAEjF,4CAA4C;AAC5C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"refusal-codes.d.ts","sourceRoot":"","sources":["../../src/types/refusal-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,2EAKnB,CAAC;AAE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