@openclaw/gateway-protocol 2026.8.1-beta.1 → 2026.8.1-beta.3
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/CHANGELOG.md +3 -0
- package/README.md +1 -1
- package/dist/client-info.d.mts +2 -1
- package/dist/client-info.mjs +5 -5
- package/dist/connect-error-details.d.mts +23 -1
- package/dist/connect-error-details.mjs +96 -24
- package/dist/frame-guards.d.mts +1 -1
- package/dist/frame-guards.mjs +5 -9
- package/dist/{frames-C2oAsD4y.d.mts → frames-BKvowx_k.d.mts} +103 -5
- package/dist/gateway-error-details-DR-CyzeW.d.mts +90 -0
- package/dist/gateway-error-details.d.mts +2 -2
- package/dist/gateway-error-details.mjs +42 -8
- package/dist/index.d.mts +972 -163
- package/dist/index.mjs +118 -12
- package/dist/protocol-value-normalization-DcAoxLUs.mjs +12 -0
- package/dist/record-coerce-BKHrZ46I.mjs +11 -0
- package/dist/{schema-modules-CgdZSiqb.d.mts → schema-modules-CriS_x5c.d.mts} +10881 -8141
- package/dist/schema.d.mts +2276 -195
- package/dist/schema.mjs +147 -14
- package/dist/{worktrees-bbLGPO39.mjs → worktrees-D1V7ClOO.mjs} +6959 -5467
- package/package.json +4 -1
- package/protocol.schema.json +29367 -16359
- package/dist/gateway-error-details-Btc09cgL.d.mts +0 -51
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
//#region src/gateway-error-details.d.ts
|
|
2
|
-
/** Gateway JSON-RPC style error codes shared by clients and server handlers. */
|
|
3
|
-
declare const ErrorCodes: {
|
|
4
|
-
/** Client has not completed account/device linking for this gateway. */readonly NOT_LINKED: "NOT_LINKED"; /** Device exists but still needs an explicit pairing approval. */
|
|
5
|
-
readonly NOT_PAIRED: "NOT_PAIRED"; /** Agent turn exceeded the gateway wait window. */
|
|
6
|
-
readonly AGENT_TIMEOUT: "AGENT_TIMEOUT"; /** Request payload failed protocol validation or method preconditions. */
|
|
7
|
-
readonly INVALID_REQUEST: "INVALID_REQUEST"; /** Authenticated caller lacks permission for the requested operation. */
|
|
8
|
-
readonly FORBIDDEN: "FORBIDDEN"; /** Approval resolution referenced a missing or expired approval request. */
|
|
9
|
-
readonly APPROVAL_NOT_FOUND: "APPROVAL_NOT_FOUND"; /** Gateway service or required backend is temporarily unavailable. */
|
|
10
|
-
readonly UNAVAILABLE: "UNAVAILABLE";
|
|
11
|
-
};
|
|
12
|
-
/** Closed set of canonical gateway error code strings. */
|
|
13
|
-
type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
14
|
-
/** Stable discriminants for structured method-level failures. */
|
|
15
|
-
declare const GatewayErrorDetailCodes: {
|
|
16
|
-
readonly MISSING_SCOPE: "MISSING_SCOPE";
|
|
17
|
-
readonly MCP_APP_VIEW_EXPIRED: "MCP_APP_VIEW_EXPIRED";
|
|
18
|
-
readonly SESSION_COMPANION_BUSY: "SESSION_COMPANION_BUSY";
|
|
19
|
-
readonly UNKNOWN_AGENT_ID: "UNKNOWN_AGENT_ID";
|
|
20
|
-
readonly WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND";
|
|
21
|
-
};
|
|
22
|
-
/** Missing operator-scope details shared by WebSocket and HTTP responses. */
|
|
23
|
-
type MissingScopeErrorDetails = {
|
|
24
|
-
code: typeof GatewayErrorDetailCodes.MISSING_SCOPE;
|
|
25
|
-
missingScope: string;
|
|
26
|
-
requiredScopes: string[];
|
|
27
|
-
};
|
|
28
|
-
type McpAppViewExpiredErrorDetails = {
|
|
29
|
-
code: typeof GatewayErrorDetailCodes.MCP_APP_VIEW_EXPIRED;
|
|
30
|
-
};
|
|
31
|
-
/** Unknown agent details carried by agent-scoped method validation failures. */
|
|
32
|
-
type UnknownAgentIdErrorDetails = {
|
|
33
|
-
code: typeof GatewayErrorDetailCodes.UNKNOWN_AGENT_ID;
|
|
34
|
-
agentId: string;
|
|
35
|
-
};
|
|
36
|
-
/** Missing or expired process-local setup wizard session. */
|
|
37
|
-
type WizardNotFoundErrorDetails = {
|
|
38
|
-
code: typeof GatewayErrorDetailCodes.WIZARD_NOT_FOUND;
|
|
39
|
-
};
|
|
40
|
-
/** Structured details emitted by method-level failures. */
|
|
41
|
-
type GatewayErrorDetails = MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | UnknownAgentIdErrorDetails | WizardNotFoundErrorDetails;
|
|
42
|
-
/** Reads validated missing-scope details from an untrusted protocol payload. */
|
|
43
|
-
declare function readMissingScopeErrorDetails(details: unknown): MissingScopeErrorDetails | null;
|
|
44
|
-
declare function isMcpAppViewExpiredError(error: unknown): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Reads a method-level missing-scope failure, preferring structured details.
|
|
47
|
-
* The message fallback keeps clients compatible with gateways predating structured details.
|
|
48
|
-
*/
|
|
49
|
-
declare function readMissingScopeError(error: unknown): MissingScopeErrorDetails | null;
|
|
50
|
-
//#endregion
|
|
51
|
-
export { McpAppViewExpiredErrorDetails as a, WizardNotFoundErrorDetails as c, readMissingScopeErrorDetails as d, GatewayErrorDetails as i, isMcpAppViewExpiredError as l, ErrorCodes as n, MissingScopeErrorDetails as o, GatewayErrorDetailCodes as r, UnknownAgentIdErrorDetails as s, ErrorCode as t, readMissingScopeError as u };
|