@adea-ai/runtime-gateway-protocol 1.10.1 → 1.11.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.
@@ -1,32 +1,10 @@
1
1
  import type { GatewayCommandEnvelope } from './protocol.js';
2
- /**
3
- * The gateway channel that carries ONE opaque sealed ACP command.
4
- *
5
- * A sealed ACP command is HPKE ciphertext bound to the device recipient key. The gateway relays
6
- * it without being able to read it: it sees the route, the command identity and the timing, and
7
- * never the prompt. The channel therefore hands the carrier command to the gateway's ordinary
8
- * durable command path and resolves with the device's opaque sealed reply.
9
- *
10
- * Both sides of the seam depend on this package, so the contract is declared once and checked by
11
- * the compiler on both ends: the controller wire consumes it, and the gateway channel adapter
12
- * declares that it returns exactly this shape.
13
- */
14
2
  export interface AcpRemoteSealedCarrierChannel {
15
- /**
16
- * The channel's CURRENT authenticated node/connection channel generation, or `undefined` when the
17
- * device is not reachable on an authenticated channel. A wire refuses to send without one.
18
- */
19
3
  readonly currentChannelGeneration: () => number | undefined;
20
- /** Delivers one carrier command and resolves with the device's opaque sealed reply. */
21
4
  readonly dispatchSealed: (input: {
22
5
  readonly command: GatewayCommandEnvelope;
23
6
  readonly signal?: AbortSignal;
24
7
  }) => Promise<unknown>;
25
- /**
26
- * The inventory the gateway pushed on the authenticated channel, together with the channel
27
- * generation it was pushed at. The controller compares that generation with the current one, so
28
- * a stale push is denied instead of published.
29
- */
30
8
  readonly pushedInventory: () => Promise<{
31
9
  readonly inventory: unknown;
32
10
  readonly channelGeneration: number;
@@ -29,21 +29,13 @@ export declare class RuntimeNodeIdentityValidationError extends Error {
29
29
  readonly reason: 'credential' | 'proof';
30
30
  constructor(reason: 'credential' | 'proof');
31
31
  }
32
- /** Result of the durable, atomic one-time credential-consumption fence. */
33
32
  export type RuntimeNodeCredentialConsumptionResult = 'consumed' | 'replayed' | 'revoked' | 'expired' | 'unknown';
34
- /**
35
- * Produces the proof challenge bound to one RFC 6455 upgrade request. Both the
36
- * RuntimeNode client and gateway derive this from the client-generated 128-bit
37
- * `Sec-WebSocket-Key`; the result is URL-safe for the bounded proof schema.
38
- */
39
33
  export declare function runtimeNodeWebSocketChallenge(secWebSocketKey: string): string;
40
34
  export interface RuntimeNodeIdentityValidationPort {
41
35
  verify(attempt: RuntimeNodeAuthenticationAttempt): Promise<unknown>;
42
36
  isRevoked(credentialId: string, revocationVersion: number): Promise<boolean>;
43
- /** Legacy 1.x listener contract; retained for source compatibility. */
44
37
  subscribeRevocations(listener: (credentialId: string) => void): () => void;
45
38
  }
46
- /** Durable identity state changes that should immediately invalidate open channels. */
47
39
  export type RuntimeNodeIdentityInvalidation = {
48
40
  readonly kind: 'credential';
49
41
  readonly credentialId: string;
@@ -63,11 +63,6 @@ export class RuntimeNodeIdentityValidationError extends Error {
63
63
  this.name = 'RuntimeNodeIdentityValidationError';
64
64
  }
65
65
  }
66
- /**
67
- * Produces the proof challenge bound to one RFC 6455 upgrade request. Both the
68
- * RuntimeNode client and gateway derive this from the client-generated 128-bit
69
- * `Sec-WebSocket-Key`; the result is URL-safe for the bounded proof schema.
70
- */
71
66
  export function runtimeNodeWebSocketChallenge(secWebSocketKey) {
72
67
  if (!/^[A-Za-z0-9+/]{22}==$/.test(secWebSocketKey)) {
73
68
  throw new Error('RUNTIME_NODE_WEBSOCKET_KEY_INVALID');
@@ -695,11 +695,6 @@ export type GatewayErrorEnvelope = z.output<typeof GatewayErrorEnvelopeSchema>;
695
695
  export type GatewayInventoryEnvelope = z.output<typeof GatewayInventoryEnvelopeSchema>;
696
696
  export type GatewayHelloEnvelope = z.output<typeof GatewayHelloEnvelopeSchema>;
697
697
  export type GatewayRetainedCommandOutcome = z.output<typeof GatewayRetainedCommandOutcomeSchema>;
698
- /**
699
- * Shared gateway protocol schemas (M13 #405 hoist): the grant reference shape
700
- * and the canonical runtime-error envelope, byte-identical across the ACP and
701
- * managed-Pi gateway clients.
702
- */
703
698
  export declare const GrantReferenceSchema: z.ZodString;
704
699
  export type GrantReference = z.output<typeof GrantReferenceSchema>;
705
700
  export declare const RuntimeErrorDataSchema: z.ZodObject<{
package/dist/protocol.js CHANGED
@@ -497,11 +497,6 @@ function forbiddenKeyMatches(normalizedKey, forbidden) {
497
497
  'sessiontoken',
498
498
  ].includes(normalizedKey));
499
499
  }
500
- /**
501
- * Shared gateway protocol schemas (M13 #405 hoist): the grant reference shape
502
- * and the canonical runtime-error envelope, byte-identical across the ACP and
503
- * managed-Pi gateway clients.
504
- */
505
500
  export const GrantReferenceSchema = z
506
501
  .string()
507
502
  .min(16)
@@ -1,4 +1,3 @@
1
- // Compile-time regression guard for consumers that implemented the published 1.x port.
2
1
  const legacyIdentityValidator = {
3
2
  verify: async () => ({}),
4
3
  isRevoked: async () => false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/runtime-gateway-protocol",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "description": "Versioned wire protocol between the Control Plane and external runtimes: schemas, emulator, fixtures, and authentication.",
5
5
  "keywords": [
6
6
  "agents",
@@ -41,14 +41,14 @@
41
41
  },
42
42
  "scripts": {
43
43
  "build": "tsc -p tsconfig.json",
44
- "typecheck": "bun check -p tsconfig.json",
44
+ "typecheck": "bun check -p tsconfig.json && bun check -p tsconfig.scripts.json",
45
45
  "lint": "oxlint src",
46
- "schema:check": "bun scripts/schema.mjs --check",
47
- "schema:generate": "bun scripts/schema.mjs",
48
- "test": "bun scripts/schema.mjs --check && bun test src"
46
+ "schema:check": "bun scripts/schema.ts --check",
47
+ "schema:generate": "bun scripts/schema.ts",
48
+ "test": "bun scripts/schema.ts --check && bun test src"
49
49
  },
50
50
  "dependencies": {
51
- "@adea-ai/runtime-sdk": "^1.17.2",
51
+ "@adea-ai/runtime-sdk": "^1.21.0",
52
52
  "zod": "4.6.6"
53
53
  },
54
54
  "engines": {