@ggui-ai/protocol 0.14.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 (66) 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 -63
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +4 -0
  13. package/dist/integrations/mcp-apps.d.ts +2 -2
  14. package/dist/schemas/blueprint.d.ts +2 -2
  15. package/dist/schemas/data-contract.d.ts +10 -30
  16. package/dist/schemas/data-contract.d.ts.map +1 -1
  17. package/dist/schemas/data-contract.js +4 -27
  18. package/dist/schemas/interface-context.d.ts +44 -0
  19. package/dist/schemas/interface-context.d.ts.map +1 -0
  20. package/dist/schemas/interface-context.js +22 -0
  21. package/dist/schemas/invoke.d.ts +3 -3
  22. package/dist/schemas/invoke.js +1 -1
  23. package/dist/schemas/mcp.d.ts +203 -94
  24. package/dist/schemas/mcp.d.ts.map +1 -1
  25. package/dist/schemas/mcp.js +110 -32
  26. package/dist/schemas/public-env-key.d.ts +26 -0
  27. package/dist/schemas/public-env-key.d.ts.map +1 -0
  28. package/dist/schemas/public-env-key.js +25 -0
  29. package/dist/schemas/render-input-envelope.d.ts +2 -2
  30. package/dist/schemas/runtime-telemetry-limits.d.ts +11 -0
  31. package/dist/schemas/runtime-telemetry-limits.d.ts.map +1 -0
  32. package/dist/schemas/runtime-telemetry-limits.js +10 -0
  33. package/dist/transport/websocket.d.ts +5 -5
  34. package/dist/types/auth.d.ts +1 -1
  35. package/dist/types/contract-inference.d.ts +1 -1
  36. package/dist/types/events.d.ts +1 -1
  37. package/dist/types/ggui-session-event.d.ts +2 -2
  38. package/dist/types/host-context.d.ts +3 -3
  39. package/dist/types/interface-context.d.ts +1 -1
  40. package/dist/types/invoke.d.ts +1 -1
  41. package/dist/types/lifecycle.d.ts +1 -1
  42. package/dist/types/live-channel.d.ts +2 -2
  43. package/dist/types/mcp.d.ts +20 -63
  44. package/dist/types/mcp.d.ts.map +1 -1
  45. package/dist/types/mcp.js +7 -0
  46. package/dist/types/refusal-codes.d.ts +23 -2
  47. package/dist/types/refusal-codes.d.ts.map +1 -1
  48. package/dist/types/refusal-codes.js +26 -9
  49. package/dist/types/render.d.ts +9 -8
  50. package/dist/types/render.d.ts.map +1 -1
  51. package/dist/types/ui-generator.d.ts +1 -1
  52. package/dist/validation/ajv-runtime.d.ts +2 -2
  53. package/dist/validation/contract-validator.d.ts +6 -6
  54. package/dist/validation/cross-references.d.ts +2 -2
  55. package/dist/validation/hygiene-rules.d.ts +1 -1
  56. package/dist/validation/name-invariants.d.ts +2 -2
  57. package/dist/validation/reserved-channels.d.ts +1 -1
  58. package/dist/validation/schema-compat-invariants.d.ts +2 -2
  59. package/dist/validation/schema-meta-validation.d.ts +1 -1
  60. package/dist/version.d.ts +132 -10
  61. package/dist/version.d.ts.map +1 -1
  62. package/dist/version.js +132 -10
  63. package/dist/wire.d.ts +45 -0
  64. package/dist/wire.d.ts.map +1 -0
  65. package/dist/wire.js +44 -0
  66. package/package.json +7 -1
@@ -65,8 +65,15 @@
65
65
  * - `owner-api` — an app owner's own billing mutations.
66
66
  * - `provisioning-api` — a tenant provisioning an app on behalf of
67
67
  * its own users.
68
+ * - `mcp-endpoint` — the per-app MCP endpoint's authorization, on
69
+ * any JSON-RPC request (`initialize` included). The refusal rides
70
+ * the JSON-RPC error object's `data.refusal` (HTTP 403, error code
71
+ * `-32003` `APP_NOT_FOUND`, message `App not found` — ggui#836); only the codes listed
72
+ * here are ever typed there, and an authorization failure that is
73
+ * NOT one of them stays a bare 403 by contract, so a client can
74
+ * never learn which of the untyped arms it hit.
68
75
  */
69
- export declare const REFUSAL_SURFACES: readonly ["render-gate", "owner-api", "provisioning-api"];
76
+ export declare const REFUSAL_SURFACES: readonly ["render-gate", "owner-api", "provisioning-api", "mcp-endpoint"];
70
77
  /** One member of {@link REFUSAL_SURFACES}. */
71
78
  export type RefusalSurface = (typeof REFUSAL_SURFACES)[number];
72
79
  /** The closed `retry` vocabulary — see the file header for semantics. */
@@ -175,7 +182,7 @@ declare const REFUSAL_ROWS: {
175
182
  };
176
183
  readonly app_deprovisioned: {
177
184
  readonly code: "app_deprovisioned";
178
- readonly surfaces: readonly ["render-gate"];
185
+ readonly surfaces: readonly ["render-gate", "mcp-endpoint"];
179
186
  readonly retry: "never";
180
187
  readonly emitter: "the generation gate's owner-claim check, before any reservation or metering";
181
188
  readonly description: "The app record has no owner claim any more — either the claim was removed, or the record names no issuing tenant at all. A record with no owner cannot be funded, so nothing renders under it and no caller action restores it.";
@@ -310,10 +317,24 @@ type CodesOnSurface<S extends RefusalSurface> = {
310
317
  * render wire.
311
318
  */
312
319
  export type PreGenerationRefusalCode = CodesOnSurface<'render-gate'>;
320
+ /**
321
+ * A code that can appear in a per-app MCP endpoint refusal's
322
+ * `error.data.refusal.code` — i.e. one whose `surfaces` include
323
+ * `mcp-endpoint` (ggui#825). Derived, so a render-gate-only code is not
324
+ * expressible on the transport wire.
325
+ */
326
+ export type McpEndpointRefusalCode = CodesOnSurface<'mcp-endpoint'>;
313
327
  /**
314
328
  * Every render-gate code, as the literal tuple the wire enum
315
329
  * (`renderRefusalSchema.code`) is built from. Order is the registry's.
316
330
  */
317
331
  export declare const RENDER_GATE_REFUSAL_CODES: readonly ["unsupported_provider", "insufficient_credit", "hard_cap_exceeded", "model_not_in_tier", "managed_default_cap_exceeded", "app_policy_missing", "billing_mode_anomaly", "billing_path_missing", "app_canceled", "trial_exhausted", "trial_expired", "issuer_rate_limited", "app_rate_limited", "app_deprovisioned"];
332
+ /**
333
+ * Every mcp-endpoint code, as the literal tuple the transport wire enum
334
+ * (`transportRefusalSchema.code`) is built from — the refusals a per-app
335
+ * MCP endpoint's authorization types on `error.data.refusal`
336
+ * (ggui#825). Order is the registry's.
337
+ */
338
+ export declare const MCP_ENDPOINT_REFUSAL_CODES: readonly ["app_deprovisioned"];
318
339
  export {};
319
340
  //# 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;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,2DAInB,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;AAiD3D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqOhB,CAAC;AAEH,qEAAqE;AACrE,MAAM,MAAM,WAAW,GAAG,MAA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AAW,CAAC,CAAC;AAEf;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAErE;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAkBpE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,8TAepC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,gCAErC,CAAC"}
@@ -65,11 +65,19 @@
65
65
  * - `owner-api` — an app owner's own billing mutations.
66
66
  * - `provisioning-api` — a tenant provisioning an app on behalf of
67
67
  * its own users.
68
+ * - `mcp-endpoint` — the per-app MCP endpoint's authorization, on
69
+ * any JSON-RPC request (`initialize` included). The refusal rides
70
+ * the JSON-RPC error object's `data.refusal` (HTTP 403, error code
71
+ * `-32003` `APP_NOT_FOUND`, message `App not found` — ggui#836); only the codes listed
72
+ * here are ever typed there, and an authorization failure that is
73
+ * NOT one of them stays a bare 403 by contract, so a client can
74
+ * never learn which of the untyped arms it hit.
68
75
  */
69
76
  export const REFUSAL_SURFACES = [
70
77
  'render-gate',
71
78
  'owner-api',
72
79
  'provisioning-api',
80
+ 'mcp-endpoint',
73
81
  ];
74
82
  /** The closed `retry` vocabulary — see the file header for semantics. */
75
83
  export const REFUSAL_RETRIES = [
@@ -195,7 +203,7 @@ const REFUSAL_ROWS = /* @__PURE__ */ defineRefusalRegistry({
195
203
  },
196
204
  app_deprovisioned: {
197
205
  code: 'app_deprovisioned',
198
- surfaces: ['render-gate'],
206
+ surfaces: ['render-gate', 'mcp-endpoint'],
199
207
  retry: 'never',
200
208
  emitter: "the generation gate's owner-claim check, before any reservation or metering",
201
209
  description: 'The app record has no owner claim any more \u2014 either the claim was removed, or the record names no issuing tenant at all. A record with no owner cannot be funded, so nothing renders under it and no caller action restores it.',
@@ -299,19 +307,19 @@ const REFUSAL_ROWS = /* @__PURE__ */ defineRefusalRegistry({
299
307
  /** The registry consumers read. */
300
308
  export const PRE_GENERATION_REFUSAL_CODES = REFUSAL_ROWS;
301
309
  /**
302
- * Identity helper that only accepts an EXHAUSTIVE tuple of the
303
- * render-gate codes: omit one and the parameter type collapses to
304
- * `never`, so the call site is a compile error. A tuple is needed
305
- * because the wire enum requires a literal, non-empty tuple — a
306
- * runtime filter over the rows yields `string[]`, which cannot type an
307
- * enum. This keeps the tuple derived-CHECKED rather than a second list.
310
+ * Identity helper that only accepts an EXHAUSTIVE tuple of one surface's
311
+ * codes: omit one and the parameter type collapses to `never`, so the
312
+ * call site is a compile error. A tuple is needed because a wire enum
313
+ * requires a literal, non-empty tuple — a runtime filter over the rows
314
+ * yields `string[]`, which cannot type an enum. This keeps every
315
+ * per-surface tuple derived-CHECKED rather than a second list.
308
316
  */
309
- const exhaustiveRenderGateCodes = (codes) => codes;
317
+ const exhaustiveCodesOn = () => (codes) => codes;
310
318
  /**
311
319
  * Every render-gate code, as the literal tuple the wire enum
312
320
  * (`renderRefusalSchema.code`) is built from. Order is the registry's.
313
321
  */
314
- export const RENDER_GATE_REFUSAL_CODES = exhaustiveRenderGateCodes([
322
+ export const RENDER_GATE_REFUSAL_CODES = exhaustiveCodesOn()([
315
323
  'unsupported_provider',
316
324
  'insufficient_credit',
317
325
  'hard_cap_exceeded',
@@ -327,3 +335,12 @@ export const RENDER_GATE_REFUSAL_CODES = exhaustiveRenderGateCodes([
327
335
  'app_rate_limited',
328
336
  'app_deprovisioned',
329
337
  ]);
338
+ /**
339
+ * Every mcp-endpoint code, as the literal tuple the transport wire enum
340
+ * (`transportRefusalSchema.code`) is built from — the refusals a per-app
341
+ * MCP endpoint's authorization types on `error.data.refusal`
342
+ * (ggui#825). Order is the registry's.
343
+ */
344
+ export const MCP_ENDPOINT_REFUSAL_CODES = exhaustiveCodesOn()([
345
+ 'app_deprovisioned',
346
+ ]);
@@ -1,10 +1,11 @@
1
- import type { KNOWN_PERMISSION_NAMES } from '../validation/hygiene-rules';
2
- import type { PropsSpec, StreamSpec, ActionSpec, ContextSpec, ClientCapabilitiesSpec, GadgetDescriptor, JsonSchema, JsonObject } from './data-contract';
3
- import type { EndUserIdentity } from './auth';
4
- import type { HostContextProjection } from './host-context';
5
- import type { AppTheme } from '../schemas/app-theme';
6
- import type { RenderErrorCode } from '../schemas/mcp';
7
- import type { McpAppsGguiSession } from '../integrations/mcp-apps';
1
+ import type { KNOWN_PERMISSION_NAMES } from '../validation/hygiene-rules.js';
2
+ import type { PropsSpec, StreamSpec, ActionSpec, ContextSpec, ClientCapabilitiesSpec, GadgetDescriptor, JsonSchema, JsonObject } from './data-contract.js';
3
+ import type { EndUserIdentity } from './auth.js';
4
+ import type { HostContextProjection } from './host-context.js';
5
+ import type { AppTheme } from '../schemas/app-theme.js';
6
+ import type { z } from 'zod';
7
+ import type { RenderErrorCode, gguiSessionStatusSchema } from '../schemas/mcp.js';
8
+ import type { McpAppsGguiSession } from '../integrations/mcp-apps.js';
8
9
  /**
9
10
  * Recognised system-card kinds the runtime renders via built-in
10
11
  * components. The wire is open-ended (string), but new kinds without a
@@ -42,7 +43,7 @@ export type AdapterPermissions = {
42
43
  * in the earlier handshake collapse. The companion `ggui_close` tool
43
44
  * that wrote it was removed in the same slice.
44
45
  */
45
- export type GguiSessionStatus = 'active' | 'expired';
46
+ export type GguiSessionStatus = z.infer<typeof gguiSessionStatusSchema>;
46
47
  /**
47
48
  * Common base for every {@link GguiSession} variant. Carries identity,
48
49
  * tenancy, lifecycle, and conversation-scoped context that every
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/types/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ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QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC;mDAC+C;IAC/C,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IACrD;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACzD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAC1B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;CACvC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB,CAAC,MAAM,SAAS,UAAU,GAAG,UAAU,CACvE,SAAQ,eAAe;IACvB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,gDAAgD;IAChD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAMD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB,CAAC,SAAS,GAAG,UAAU;IACtD,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,EAAE,CAAC;IAChD,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -1,4 +1,4 @@
1
- import type { DataContract, JsonObject, JsonSchema, JsonValue } from './data-contract';
1
+ import type { DataContract, JsonObject, JsonSchema, JsonValue } from './data-contract.js';
2
2
  /**
3
3
  * Request to generate a UI component.
4
4
  * Generic `TContext` defaults to {@link JsonObject} for generator context hints.
@@ -50,8 +50,8 @@ import type { ErrorObject, ValidateFunction } from 'ajv';
50
50
  * dependency — TS resolves the type transitively through this package.
51
51
  */
52
52
  export type { ValidateFunction } from 'ajv';
53
- import type { JsonSchema } from '../types/data-contract';
54
- import type { ContractViolation } from './contract-validator';
53
+ import type { JsonSchema } from '../types/data-contract.js';
54
+ import type { ContractViolation } from './contract-validator.js';
55
55
  /**
56
56
  * Recursively walk a JSON Schema and inject
57
57
  * `additionalProperties: false` at every object node. Authors who
@@ -1,9 +1,9 @@
1
- import type { PropsSpec, StreamSpec, ActionSpec, ContextSpec, JsonSchema, JsonObject, DataContract } from '../types/data-contract';
2
- import type { ActionEnvelope } from '../types/events';
3
- import type { CompiledContractValidators } from '../integrations/mcp-apps';
4
- import type { ValidateFunction } from './ajv-runtime';
5
- export type { ValidateFunction } from './ajv-runtime';
6
- import { type ReservedChannelValidator } from './reserved-channels';
1
+ import type { PropsSpec, StreamSpec, ActionSpec, ContextSpec, JsonSchema, JsonObject, DataContract } from '../types/data-contract.js';
2
+ import type { ActionEnvelope } from '../types/events.js';
3
+ import type { CompiledContractValidators } from '../integrations/mcp-apps.js';
4
+ import type { ValidateFunction } from './ajv-runtime.js';
5
+ export type { ValidateFunction } from './ajv-runtime.js';
6
+ import { type ReservedChannelValidator } from './reserved-channels.js';
7
7
  export interface ContractViolation extends JsonObject {
8
8
  field: string;
9
9
  message: string;
@@ -15,8 +15,8 @@
15
15
  * declarative source of truth for every referenced tool). Violations
16
16
  * are author-recoverable at render time.
17
17
  */
18
- import type { DataContract, ActionSpec, StreamSpec, AgentCapabilitiesSpec } from '../types/data-contract';
19
- import type { ContractViolation } from './contract-validator';
18
+ import type { DataContract, ActionSpec, StreamSpec, AgentCapabilitiesSpec } from '../types/data-contract.js';
19
+ import type { ContractViolation } from './contract-validator.js';
20
20
  /**
21
21
  * Stable error code emitted when an `actionSpec[*].nextStep` value
22
22
  * does not resolve to a declared `agentCapabilities.tools[*]` key on
@@ -41,7 +41,7 @@
41
41
  * set is wired into `lintContract` via `phaseHygiene`; consumers that
42
42
  * want strict gates layer their own assertions on top.
43
43
  */
44
- import type { DataContract, GadgetDescriptor } from '../types/data-contract';
44
+ import type { DataContract, GadgetDescriptor } from '../types/data-contract.js';
45
45
  /**
46
46
  * Stable codes for hygiene rules. Each is a `LINT_*` rather than a
47
47
  * `CTR_*` — the convention: errors are `CTR_*`, warnings are `LINT_*`.
@@ -35,8 +35,8 @@
35
35
  * Companion to {@link CrossReferenceError} in `./cross-references` —
36
36
  * the two modules ship the "phase 2: references" rule registry.
37
37
  */
38
- import type { DataContract } from '../types/data-contract';
39
- import type { ContractViolation } from './contract-validator';
38
+ import type { DataContract } from '../types/data-contract.js';
39
+ import type { ContractViolation } from './contract-validator.js';
40
40
  /**
41
41
  * Stable error code for collisions across the three inbound spec maps
42
42
  * (`actionSpec` / `streamSpec` / `contextSpec`). The boilerplate
@@ -31,7 +31,7 @@
31
31
  * file describes a NAMING POLICY that the contract-structure validator
32
32
  * enforces. Separate concerns — easier to audit the boundary.
33
33
  */
34
- import type { ValidationResult } from './contract-validator';
34
+ import type { ValidationResult } from './contract-validator.js';
35
35
  /** Prefix that marks a channel as server-owned (reserved from agents). */
36
36
  export declare const RESERVED_CHANNEL_PREFIX = "_ggui:";
37
37
  /**
@@ -42,8 +42,8 @@
42
42
  * they ship companion rule registries to cross-references and
43
43
  * name-invariants under the unified `lintContract` API.
44
44
  */
45
- import type { AgentCapabilitiesSpec, DataContract } from '../types/data-contract';
46
- import type { ContractViolation } from './contract-validator';
45
+ import type { AgentCapabilitiesSpec, DataContract } from '../types/data-contract.js';
46
+ import type { ContractViolation } from './contract-validator.js';
47
47
  /**
48
48
  * Stable error code for protocol-level schema-compatibility
49
49
  * violations on action ⊆ inputSchema or channel ⊇ outputSchema.
@@ -30,7 +30,7 @@
30
30
  * assertions for the same author-recoverable failure class; this
31
31
  * sits alongside them.
32
32
  */
33
- import type { DataContract } from '../types/data-contract';
33
+ import type { DataContract } from '../types/data-contract.js';
34
34
  export interface SchemaMetaViolation {
35
35
  /** Path to the malformed schema field (e.g., `propsSpec.properties.todos.schema`). */
36
36
  field: string;
package/dist/version.d.ts CHANGED
@@ -6,6 +6,75 @@
6
6
  * schema change; the most recent change anchors {@link PROTOCOL_VERSION}.
7
7
  *
8
8
  * --------------------------------------------------------------------
9
+ * SPEC §7.1's refused arm is ONE primitive (2026-09-05, additive,
10
+ * pre-launch, ggui#803 leg 9). The tool result a render gate answers a
11
+ * pre-generation refusal with was built by hand in
12
+ * `@ggui-ai/mcp-server-handlers` (`buildRenderRefusalText` + an inline
13
+ * `{ outcome: 'refused', refusal }`), the conformance kit carried its
14
+ * own reference, and the reference server could not project it at all
15
+ * — so the reference server was not a reference for the refused
16
+ * envelope, and a third hand-built copy there would only have re-graded
17
+ * the kit's reference.
18
+ *
19
+ * rr1. **`projectRenderRefusal(refusal): RenderRefusalResult`** (new
20
+ * export, `envelopes/render-refusal.ts`) — `isError: true`,
21
+ * `content[0].text` = `<code>: <message> <fix>`, `structuredContent`
22
+ * = `{ outcome: 'refused', refusal }` typed as **`RefusedRenderOutput`**
23
+ * (`z.infer<typeof refusedOutputSchema>`, new export), no `_meta`.
24
+ * Pure and synchronous. The four facts have one source.
25
+ *
26
+ * rr2. **Consumers**: `mcp-server-handlers`' `ggui_render` builds the
27
+ * refused result here (its local builder, inline object and
28
+ * `RenderRefusedOutput` alias are deleted — no shim); the
29
+ * reference server supplies the kit's `refusalProjector` from the
30
+ * same primitive at the kit's stringly boundary (a code off
31
+ * `RENDER_GATE_REFUSAL_CODES` → `null`; anything else parsed by
32
+ * `renderRefusalSchema`), so its six `refusal-envelope/*` rows are
33
+ * GRADED, not skipped. The kit's own hand-built reference stays as
34
+ * the second source that catches the primitive drifting.
35
+ *
36
+ * Conformance-kit verdict: no new kit entry — the six `refusal-envelope`
37
+ * cases already grade exactly these four facts; what changed is that
38
+ * two implementations now answer them through one function, and the
39
+ * reference server's exact-set assertion moved the rows from SKIPPED to
40
+ * PASSING. Bytes on the wire: unchanged.
41
+ *
42
+ * Package version — classification MADE here: MINOR for
43
+ * `@ggui-ai/protocol` (two new exports, additive) and for
44
+ * `@ggui-ai/mcp-server-handlers` (same result, one source), pre-1.0 and
45
+ * pre-launch. PROTOCOL_VERSION unchanged — no WS envelope moved.
46
+ *
47
+ * --------------------------------------------------------------------
48
+ * Authorization refusals carry JSON-RPC `data` (2026-09-05, additive,
49
+ * pre-launch, ggui#825). `@ggui-ai/mcp-server`'s per-app `authorize`
50
+ * hook refuses by throwing, and the route answered every throw with a
51
+ * bare `403 {code: -32000, message: "Forbidden"}` — correct in effect,
52
+ * illegible to a client that needs to tell "this app is no longer served" from
53
+ * "your credential is wrong".
54
+ *
55
+ * ar1. **`ErrorMapperResult.data?: JsonValue`** — a deployment's
56
+ * `errorMapper` may attach JSON-RPC 2.0 error `data` (any JSON
57
+ * value) to a mapped result; serialized verbatim on `error.data`,
58
+ * omitted when absent. Applies to every mapped error, not only
59
+ * authorization refusals.
60
+ *
61
+ * ar2. **The per-app authorization refusal consults the mapper**,
62
+ * bounded to 401 / 403: a mapper answering any other status, or
63
+ * throwing, is ignored and logged (`per_app_authorize_mapper_out_
64
+ * of_bounds` / `error_mapper_failed` on the route logger) and the
65
+ * default-deny 403 stands byte-identical to a deployment with no
66
+ * mapper. The allow path never consults the mapper.
67
+ *
68
+ * Conformance-kit verdict: no kit entry required — an optional field on
69
+ * an operator-side hook result, no MCP tool name/shape touched; the
70
+ * shape of any `data.refusal` a deployment chooses to attach is that
71
+ * deployment's declaration, not this package's.
72
+ *
73
+ * Package version — classification MADE here: MINOR for
74
+ * `@ggui-ai/mcp-server` (new optional field on `ErrorMapperResult` +
75
+ * the authorization refusal path consults `errorMapper`), pre-1.0 and
76
+ * pre-launch. PROTOCOL_VERSION unchanged — no WS envelope moved.
77
+ * --------------------------------------------------------------------
9
78
  * Authored source rides blueprint reuse (2026-08-14, additive,
10
79
  * pre-launch). Cache-reuse renders (a repeated prompt semantic-matches
11
80
  * a cached blueprint) previously committed without authored
@@ -3121,15 +3190,6 @@
3121
3190
  * reference and against the shipping projector in
3122
3191
  * `@ggui-ai/mcp-server-handlers`) and `registry-completeness`
3123
3192
  * (the registry's structural pins, bound to the LIVE registry).
3124
- *
3125
- * FOLLOWER — moves in the SAME commit as this constant, pinned by a
3126
- * gate that fails loud when it lags: the `protocol` field of every
3127
- * shipped `samples/gguis/<name>/ggui.json` (the `@ggui-ai/project-config`
3128
- * samples test). That pin is a HOUSE rule — shipped samples declare the
3129
- * CURRENT stamp, because a new project starts from them. The CONTRACT
3130
- * for any `ggui.json#protocol` is membership in
3131
- * `CLIENT_SUPPORTED_VERSIONS`, enforced by the loader (`UPGRADE_REQUIRED`
3132
- * on a non-member); the two coincide only while the set is a singleton.
3133
3193
  * r7. **Tool output shapes are protocol-owned (ggui#817 part C):**
3134
3194
  * seven schemas — search / featured / validate / consume's
3135
3195
  * host-context projection / list_sessions' summary / runtime_pull's
@@ -3146,6 +3206,44 @@
3146
3206
  * grammar and nothing else, so `{}` still reaches the gate per r5); the
3147
3207
  * full envelope (`renderInputEnvelopeSchema`) parses after the gate.
3148
3208
  * Bare model ids are out.
3209
+ * r9. **Endpoint-level refusal (ggui#825):** registry surface
3210
+ * `mcp-endpoint` (v11) and the transport envelope — a per-app MCP
3211
+ * endpoint that refuses a request for a registry state answers HTTP
3212
+ * 403 with `{ code: -32000, message: 'Forbidden', data: { refusal } }`
3213
+ * (`transportRefusalErrorSchema`; `refusal` = the projection without
3214
+ * the render-only fields, `MCP_ENDPOINT_REFUSAL_CODES` derived — today
3215
+ * `app_deprovisioned`). Untyped authorization failures keep the bare
3216
+ * 403 by contract. Additive.
3217
+ * r10. **Consume / list_sessions / emit own their wire shapes (ggui#817
3218
+ * part C2):** `consumeEventEntrySchema` (the drained row, closed),
3219
+ * `gguiSessionStatusSchema` (`active` | `expired`), `gguiConsumeOutputSchema`,
3220
+ * `gguiListSessionsOutputSchema`, `gguiEmitOutputSchema`; the types
3221
+ * derive (`ConsumeEventEntry`, `GguiConsumeOutput`, `GguiEmitOutput`,
3222
+ * `GguiListSessionsOutput`, `GguiSessionStatus`). `tools/list` now
3223
+ * advertises the entry vocabulary and the status enum for
3224
+ * `ggui_consume`; `parsePendingEnvelope` parses a drained row instead
3225
+ * of casting it, so a malformed pipe entry refuses at the seam. The
3226
+ * wire bytes of a well-formed row are unchanged. Additive.
3227
+ * r11. **Endpoint refusal codes (ggui#836):** the per-app endpoint speaks
3228
+ * §7.9 Plane-1 rows — the typed deprovisioned arm is `-32003`
3229
+ * (`APP_NOT_FOUND`, `App not found`) with `data.refusal`; untyped
3230
+ * authorization failures are `-32001` (`UNAUTHORIZED`) with no
3231
+ * `data`; HTTP 403 on both. `-32000` (the SDK client's
3232
+ * `ConnectionClosed`) is never a code a first-party server chooses.
3233
+ * Supersedes r9's literals; pre-launch, no compatibility arm.
3234
+ * r12. **`GENERATION_OVERLOADED: -32014`** joins `PLATFORM_ERROR_CODES` —
3235
+ * the generation queue is saturated (HTTP 503 + `Retry-After`; the
3236
+ * server is the limit, unlike `-32013`). Additive; the four complete
3237
+ * mirrors carry it under `check-error-code-mirrors`.
3238
+ *
3239
+ * FOLLOWER — moves in the SAME commit as this constant, pinned by a
3240
+ * gate that fails loud when it lags: the `protocol` field of every
3241
+ * shipped `samples/gguis/<name>/ggui.json` (the `@ggui-ai/project-config`
3242
+ * samples test). That pin is a HOUSE rule — shipped samples declare the
3243
+ * CURRENT stamp, because a new project starts from them. The CONTRACT
3244
+ * for any `ggui.json#protocol` is membership in
3245
+ * `CLIENT_SUPPORTED_VERSIONS`, enforced by the loader (`UPGRADE_REQUIRED`
3246
+ * on a non-member); the two coincide only while the set is a singleton.
3149
3247
  */
3150
3248
  export declare const PROTOCOL_VERSION = "draft-2026-09-04";
3151
3249
  /**
@@ -3163,8 +3261,32 @@ export declare const PROTOCOL_VERSION = "draft-2026-09-04";
3163
3261
  * `package.json#version` (the same parity pattern as
3164
3262
  * `STDLIB_GADGETS_VERSION` and `agent-server`'s `CLIENT_INFO`), and the
3165
3263
  * `/release:cut` straggler list names it so the bump is mechanical.
3264
+ *
3265
+ * Wave classifications (protocol seat; the kit is the arbiter,
3266
+ * docs/protocol/VERSION-POLICY.md §1–2):
3267
+ *
3268
+ * - **0.15.0 — MINOR** (ruled 2026-09-05). Every `@ggui-ai/protocol`
3269
+ * landing since the 0.14.0 cut (`f3cf6c906`) is additive under
3270
+ * §1.2: the `@ggui-ai/protocol/wire` browser entry (ggui#819), the
3271
+ * `GENERATION_OVERLOADED: -32014` canonical code and SPEC §7.9's
3272
+ * Plane 0 (ggui#840), `ErrorMapperResult.data` (ggui#825), the
3273
+ * endpoint-level refusal — `403 {code: -32003, data.refusal}` for
3274
+ * `app_deprovisioned` (ggui#836), the `ggui_consume` /
3275
+ * `ggui_list_sessions` / `ggui_emit` output schemas (ggui#817 C2),
3276
+ * and the `.readonly()` removal from the gadget wire schema
3277
+ * (ggui#824). The one non-additive-looking line — the untyped
3278
+ * authorization refusal moving from `-32000` to `-32001
3279
+ * UNAUTHORIZED` (ggui#836) — is not a fixture regression: no
3280
+ * fixture on 0.14.0 pinned `-32000` (it was the SDK's default
3281
+ * courtesy code, never a first-party choice; ggui#840's Plane-0
3282
+ * ruling), and the transport-refusal catalog now states `-32001`.
3283
+ * §1.4 (`draft-`: semver describes intent) applies on top. A
3284
+ * 0.14.1 is legitimate ONLY as a founder-ruled hotfix branch off
3285
+ * `f3cf6c906` carrying ggui#846 alone (a declaration-emit fix —
3286
+ * PATCH under §1.3); it cannot be cut from main, whose delta since
3287
+ * 0.14.0 is minor-class.
3166
3288
  */
3167
- export declare const GGUI_WAVE_VERSION = "0.14.0";
3289
+ export declare const GGUI_WAVE_VERSION = "0.15.0";
3168
3290
  /**
3169
3291
  * Schema version stamped onto wire envelopes that opt into the
3170
3292
  * `schemaVersion` forward-compat field (see {@link ActionEnvelope},
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"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