@openclaw/gateway-protocol 2026.10.1 → 2026.10.5-beta.1
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/README.md +2 -2
- package/dist/{tools-catalog-M28wGob1.mjs → catalog-WA519PXd.mjs} +393 -659
- package/dist/client-info.d.mts +0 -7
- package/dist/client-info.mjs +1 -2
- package/dist/connect-error-details.d.mts +3 -0
- package/dist/connect-error-details.mjs +14 -13
- package/dist/frame-guards.d.mts +1 -1
- package/dist/frame-guards.mjs +1 -1
- package/dist/{frames-DrSBm15j.d.mts → frames-DHlyMuKP.d.mts} +3 -0
- package/dist/{gateway-error-details-BH1DM8mu.d.mts → gateway-error-details-CsyGNcmF.d.mts} +7 -16
- package/dist/gateway-error-details.d.mts +2 -2
- package/dist/gateway-error-details.mjs +1 -24
- package/dist/index.d.mts +127 -110
- package/dist/index.mjs +12 -18
- package/dist/{schema-modules-BlWM3kTv.d.mts → schema-modules-9B0QAFVD.d.mts} +892 -1075
- package/dist/schema.d.mts +5 -5
- package/dist/schema.mjs +34 -40
- package/dist/{server-capabilities-BTjjxElt.mjs → server-capabilities-FfgdQE-U.mjs} +3 -0
- package/dist/{string-coerce-BSD-wsXs.mjs → string-coerce-BPnmwYe_.mjs} +5 -1
- package/dist/{theme-_hQKgfH-.mjs → theme-CBR5kBV0.mjs} +50 -6
- package/dist/{theme-s6T9Ck6Z.d.mts → theme-dtBTRSNj.d.mts} +25 -2
- package/dist/theme.d.mts +2 -2
- package/dist/theme.mjs +2 -2
- package/package.json +1 -1
- package/protocol.schema.json +9667 -10855
package/dist/client-info.d.mts
CHANGED
|
@@ -19,7 +19,6 @@ export declare const GATEWAY_CLIENT_IDS: {
|
|
|
19
19
|
readonly FINGERPRINT: "fingerprint";
|
|
20
20
|
readonly PROBE: "openclaw-probe";
|
|
21
21
|
};
|
|
22
|
-
/** Stable gateway client ids used on the wire during hello/connect handshakes. */
|
|
23
22
|
export type GatewayClientId = (typeof GATEWAY_CLIENT_IDS)[keyof typeof GATEWAY_CLIENT_IDS];
|
|
24
23
|
export declare const GATEWAY_CLIENT_NAMES: {
|
|
25
24
|
readonly WEBCHAT_UI: "webchat-ui";
|
|
@@ -53,11 +52,8 @@ export declare const GATEWAY_CLIENT_MODES: {
|
|
|
53
52
|
readonly PROBE: "probe";
|
|
54
53
|
readonly TEST: "test";
|
|
55
54
|
};
|
|
56
|
-
/** Coarse client category used for gateway policy and diagnostics. */
|
|
57
55
|
export type GatewayClientMode = (typeof GATEWAY_CLIENT_MODES)[keyof typeof GATEWAY_CLIENT_MODES];
|
|
58
|
-
/** Client metadata sent during gateway connection setup. */
|
|
59
56
|
export type GatewayClientInfo = {
|
|
60
|
-
/** Stable product/client identifier from `GATEWAY_CLIENT_IDS`. */
|
|
61
57
|
id: GatewayClientId;
|
|
62
58
|
/** Human-readable label for diagnostics; not used for policy decisions. */
|
|
63
59
|
displayName?: string;
|
|
@@ -73,7 +69,6 @@ export type GatewayClientInfo = {
|
|
|
73
69
|
modelIdentifier?: string;
|
|
74
70
|
/** Self-reported IANA time zone, such as `Europe/Vienna`, for presence display. */
|
|
75
71
|
timeZone?: string;
|
|
76
|
-
/** Coarse category from `GATEWAY_CLIENT_MODES` for policy and diagnostics. */
|
|
77
72
|
mode: GatewayClientMode;
|
|
78
73
|
/** Per-installation or per-process id used to distinguish same-product clients. */
|
|
79
74
|
instanceId?: string;
|
|
@@ -89,7 +84,6 @@ export declare const GATEWAY_CLIENT_CAPS: {
|
|
|
89
84
|
readonly MODEL_SELECTION_POLICY: "model-selection-policy";
|
|
90
85
|
readonly RUN_TOOL_BINDINGS: "run-tool-bindings";
|
|
91
86
|
readonly SESSION_SCOPED_EVENTS: "session-scoped-events";
|
|
92
|
-
readonly SKILL_CURATOR_LIVE_INVENTORY: "skill-curator-live-inventory";
|
|
93
87
|
readonly PLUGIN_APPROVALS: "plugin-approvals";
|
|
94
88
|
readonly TASK_SUGGESTIONS: "task-suggestions";
|
|
95
89
|
readonly TERMINAL_OFFSET_SEQ: "terminal-offset-seq";
|
|
@@ -100,7 +94,6 @@ export declare const GATEWAY_CLIENT_CAPS: {
|
|
|
100
94
|
readonly ULTRAFAST: "ultrafast";
|
|
101
95
|
readonly USAGE_REFRESHING: "usage-refreshing";
|
|
102
96
|
};
|
|
103
|
-
/** Optional capability advertised by clients during gateway handshake. */
|
|
104
97
|
export type GatewayClientCap = (typeof GATEWAY_CLIENT_CAPS)[keyof typeof GATEWAY_CLIENT_CAPS];
|
|
105
98
|
/** Normalizes untrusted client ids and rejects unknown values. */
|
|
106
99
|
export declare function normalizeGatewayClientId(raw?: string | null): GatewayClientId | undefined;
|
package/dist/client-info.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as normalizeOptionalLowercaseString } from "./string-coerce-BPnmwYe_.mjs";
|
|
2
2
|
//#region packages/gateway-protocol/src/client-info.ts
|
|
3
3
|
/**
|
|
4
4
|
* Shared gateway client identity contract.
|
|
@@ -49,7 +49,6 @@ const GATEWAY_CLIENT_CAPS = {
|
|
|
49
49
|
MODEL_SELECTION_POLICY: "model-selection-policy",
|
|
50
50
|
RUN_TOOL_BINDINGS: "run-tool-bindings",
|
|
51
51
|
SESSION_SCOPED_EVENTS: "session-scoped-events",
|
|
52
|
-
SKILL_CURATOR_LIVE_INVENTORY: "skill-curator-live-inventory",
|
|
53
52
|
PLUGIN_APPROVALS: "plugin-approvals",
|
|
54
53
|
TASK_SUGGESTIONS: "task-suggestions",
|
|
55
54
|
TERMINAL_OFFSET_SEQ: "terminal-offset-seq",
|
|
@@ -34,6 +34,8 @@ export declare const ConnectErrorDetailCodes: {
|
|
|
34
34
|
readonly DEVICE_AUTH_SIGNATURE_INVALID: "DEVICE_AUTH_SIGNATURE_INVALID";
|
|
35
35
|
readonly DEVICE_AUTH_PUBLIC_KEY_INVALID: "DEVICE_AUTH_PUBLIC_KEY_INVALID";
|
|
36
36
|
readonly PAIRING_REQUIRED: "PAIRING_REQUIRED";
|
|
37
|
+
readonly PAIRING_REJECTED: "PAIRING_REJECTED";
|
|
38
|
+
readonly PAIRING_EXPIRED: "PAIRING_EXPIRED";
|
|
37
39
|
readonly CLIENT_VERSION_MISMATCH: "CLIENT_VERSION_MISMATCH";
|
|
38
40
|
};
|
|
39
41
|
type ConnectErrorDetailCode = (typeof ConnectErrorDetailCodes)[keyof typeof ConnectErrorDetailCodes];
|
|
@@ -56,6 +58,7 @@ type PairingConnectErrorDetails = {
|
|
|
56
58
|
recommendedNextStep?: ConnectRecoveryNextStep;
|
|
57
59
|
retryable?: boolean;
|
|
58
60
|
pauseReconnect?: boolean;
|
|
61
|
+
waitForResolution?: boolean;
|
|
59
62
|
deviceId?: string;
|
|
60
63
|
requestedRole?: string;
|
|
61
64
|
requestedScopes?: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as normalizeOptionalString } from "./string-coerce-BPnmwYe_.mjs";
|
|
2
2
|
import { r as isRecord } from "./record-coerce-DVQGe6I0.mjs";
|
|
3
3
|
//#region packages/normalization-core/src/string-normalization.ts
|
|
4
4
|
/** Normalizes array-backed string lists and rejects non-array input as empty. */
|
|
@@ -57,6 +57,8 @@ const ConnectErrorDetailCodes = {
|
|
|
57
57
|
DEVICE_AUTH_SIGNATURE_INVALID: "DEVICE_AUTH_SIGNATURE_INVALID",
|
|
58
58
|
DEVICE_AUTH_PUBLIC_KEY_INVALID: "DEVICE_AUTH_PUBLIC_KEY_INVALID",
|
|
59
59
|
PAIRING_REQUIRED: "PAIRING_REQUIRED",
|
|
60
|
+
PAIRING_REJECTED: "PAIRING_REJECTED",
|
|
61
|
+
PAIRING_EXPIRED: "PAIRING_EXPIRED",
|
|
60
62
|
CLIENT_VERSION_MISMATCH: "CLIENT_VERSION_MISMATCH"
|
|
61
63
|
};
|
|
62
64
|
/** Suggested client-side recovery action for structured connect errors. */
|
|
@@ -172,6 +174,7 @@ function createPairingConnectErrorDetails(params) {
|
|
|
172
174
|
...params.recommendedNextStep ? { recommendedNextStep: params.recommendedNextStep } : {},
|
|
173
175
|
...params.retryable !== void 0 ? { retryable: params.retryable } : {},
|
|
174
176
|
...params.pauseReconnect !== void 0 ? { pauseReconnect: params.pauseReconnect } : {},
|
|
177
|
+
...params.waitForResolution !== void 0 ? { waitForResolution: params.waitForResolution } : {},
|
|
175
178
|
...params.deviceId ? { deviceId: params.deviceId } : {},
|
|
176
179
|
...params.requestedRole ? { requestedRole: params.requestedRole } : {},
|
|
177
180
|
...params.requestedScopes ? { requestedScopes: params.requestedScopes } : {},
|
|
@@ -198,7 +201,8 @@ function buildPairingConnectErrorDetails(params) {
|
|
|
198
201
|
reason: params.reason,
|
|
199
202
|
recommendedNextStep: params.recommendedNextStep,
|
|
200
203
|
retryable: params.retryable,
|
|
201
|
-
pauseReconnect: params.pauseReconnect
|
|
204
|
+
pauseReconnect: params.pauseReconnect,
|
|
205
|
+
waitForResolution: params.waitForResolution
|
|
202
206
|
});
|
|
203
207
|
}
|
|
204
208
|
function normalizePairingConnectMetadata(details, reason) {
|
|
@@ -228,14 +232,15 @@ function readPairingConnectErrorDetails(details) {
|
|
|
228
232
|
reason,
|
|
229
233
|
recommendedNextStep: normalizeConnectRecoveryNextStep(details.recommendedNextStep),
|
|
230
234
|
retryable: typeof details.retryable === "boolean" ? details.retryable : void 0,
|
|
231
|
-
pauseReconnect: typeof details.pauseReconnect === "boolean" ? details.pauseReconnect : void 0
|
|
235
|
+
pauseReconnect: typeof details.pauseReconnect === "boolean" ? details.pauseReconnect : void 0,
|
|
236
|
+
waitForResolution: typeof details.waitForResolution === "boolean" ? details.waitForResolution : void 0
|
|
232
237
|
});
|
|
233
238
|
}
|
|
234
239
|
/** Parses legacy/string-only pairing-required messages into structured details. */
|
|
235
240
|
function readConnectPairingRequiredMessage(message) {
|
|
236
241
|
const normalizedMessage = normalizeOptionalString(message);
|
|
237
242
|
if (!normalizedMessage) return null;
|
|
238
|
-
const normalized = normalizedMessage.
|
|
243
|
+
const normalized = normalizedMessage.toLowerCase();
|
|
239
244
|
let reason;
|
|
240
245
|
for (const [candidate, metadata] of Object.entries(PAIRING_CONNECT_REASON_METADATA)) if (normalized.includes(metadata.message)) {
|
|
241
246
|
reason = candidate;
|
|
@@ -270,12 +275,7 @@ function readIdentityProxyRejection(details) {
|
|
|
270
275
|
if (!isRecord(details)) return null;
|
|
271
276
|
if (details.reason !== "websocket-upgrade-rejected" || typeof details.httpStatus !== "number" || !IDENTITY_PROXY_HTTP_STATUSES.has(details.httpStatus)) return null;
|
|
272
277
|
const location = normalizeOptionalString(details.location);
|
|
273
|
-
|
|
274
|
-
try {
|
|
275
|
-
return { cloudflareAccess: new URL(location).hostname.toLowerCase().replace(/\.+$/u, "").endsWith(".cloudflareaccess.com") };
|
|
276
|
-
} catch {
|
|
277
|
-
return { cloudflareAccess: false };
|
|
278
|
-
}
|
|
278
|
+
return { cloudflareAccess: (URL.parse(location ?? "")?.hostname.toLowerCase().replace(/\.+$/u, ""))?.endsWith(".cloudflareaccess.com") ?? false };
|
|
279
279
|
}
|
|
280
280
|
/** Classifies Gateway connect failures from structured details, with one legacy text fallback. */
|
|
281
281
|
function classifyGatewayConnectFailure(input) {
|
|
@@ -319,8 +319,9 @@ function formatConnectPairingRequiredMessage(details) {
|
|
|
319
319
|
}
|
|
320
320
|
/** Formats connect errors using structured details before falling back to raw messages. */
|
|
321
321
|
function formatConnectErrorMessage(params) {
|
|
322
|
-
|
|
323
|
-
if (
|
|
322
|
+
const code = readConnectErrorDetailCode(params.details);
|
|
323
|
+
if (code === ConnectErrorDetailCodes.PAIRING_REQUIRED) return formatConnectPairingRequiredMessage(params.details);
|
|
324
|
+
if (code === ConnectErrorDetailCodes.PROTOCOL_MISMATCH) return formatProtocolMismatchMessage(params.message, params.details);
|
|
324
325
|
return normalizeOptionalString(params.message) ?? "gateway request failed";
|
|
325
326
|
}
|
|
326
327
|
function formatProtocolMismatchMessage(message, details) {
|
|
@@ -332,7 +333,7 @@ function formatProtocolMismatchMessage(message, details) {
|
|
|
332
333
|
const parts = [];
|
|
333
334
|
if (clientMin !== void 0 && clientMax !== void 0) parts.push(clientMin === clientMax ? `Control UI v${clientMin}` : `Control UI v${clientMin}-v${clientMax}`);
|
|
334
335
|
if (expected !== void 0) parts.push(`Gateway v${expected}`);
|
|
335
|
-
if (probeMin !== void 0) parts.push(`
|
|
336
|
+
if (probeMin !== void 0) parts.push(`connection check min v${probeMin}`);
|
|
336
337
|
const normalized = normalizeOptionalString(message) ?? "protocol mismatch";
|
|
337
338
|
return parts.length > 0 ? `${normalized}: ${parts.join(", ")}` : normalized;
|
|
338
339
|
}
|
package/dist/frame-guards.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventFrame, d as RequestFrame, l as HelloOk, p as ResponseFrame, r as ErrorShape, s as GatewayFrame, t as ConnectParams, y as GATEWAY_SERVER_CAPS } from "./frames-
|
|
1
|
+
import { a as EventFrame, d as RequestFrame, l as HelloOk, p as ResponseFrame, r as ErrorShape, s as GatewayFrame, t as ConnectParams, y as GATEWAY_SERVER_CAPS } from "./frames-DHlyMuKP.mjs";
|
|
2
2
|
//#region packages/gateway-protocol/src/frame-guards.d.ts
|
|
3
3
|
export declare function isGatewayEventFrame(value: unknown): value is EventFrame;
|
|
4
4
|
export declare function isGatewayResponseFrame(value: unknown): value is ResponseFrame;
|
package/dist/frame-guards.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as isRecord } from "./record-coerce-DVQGe6I0.mjs";
|
|
2
2
|
import { t as isNonEmptyProtocolString } from "./protocol-value-normalization-Oati9UF1.mjs";
|
|
3
|
-
import { t as GATEWAY_SERVER_CAPS } from "./server-capabilities-
|
|
3
|
+
import { t as GATEWAY_SERVER_CAPS } from "./server-capabilities-FfgdQE-U.mjs";
|
|
4
4
|
//#region packages/gateway-protocol/src/frame-guards.ts
|
|
5
5
|
function isNonNegativeInteger(value) {
|
|
6
6
|
return typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
@@ -25,7 +25,9 @@ declare const GATEWAY_SERVER_CAPS: {
|
|
|
25
25
|
readonly NODE_WORKER_HOST_DIAGNOSTICS: "node-worker-host-diagnostics-v1";
|
|
26
26
|
readonly NODE_WORKER_IDLE_RETENTION: "node-worker-idle-retention-v1";
|
|
27
27
|
readonly NODE_WORKER_LAUNCH_TOOL_NAMES: "node-worker-launch-tool-names-v1";
|
|
28
|
+
readonly NODE_WORKER_NATIVE_INFERENCE: "node-worker-native-inference-v1";
|
|
28
29
|
readonly NODE_WORKER_PORTAL_STREAM: "node-worker-portal-stream-v1";
|
|
30
|
+
readonly NODE_WORKER_PROMPT_CONTEXT: "node-worker-prompt-context-v1";
|
|
29
31
|
readonly NODE_WORKER_STATUS_WAIT: "node-worker-status-wait-v1";
|
|
30
32
|
readonly PUBLISHED_MODEL_CATALOG: "published-model-catalog";
|
|
31
33
|
readonly PROFILE_BINDING: "profile-binding-v1";
|
|
@@ -36,6 +38,7 @@ declare const GATEWAY_SERVER_CAPS: {
|
|
|
36
38
|
readonly SESSION_GOAL_START: "session-goal-start-v1";
|
|
37
39
|
readonly SESSION_SETTINGS_CONTRACT: "session-settings-contract";
|
|
38
40
|
readonly SESSION_SETTINGS_CAS: "session-settings-cas-v1";
|
|
41
|
+
readonly SENDER_RESTRICTED_HIDDEN_HELPERS: "sender-restricted-hidden-helpers-v1";
|
|
39
42
|
readonly SYSTEM_AGENT_WIZARD_CANCEL: "openclaw-chat-wizard-cancel";
|
|
40
43
|
readonly SYSTEM_AGENT_SETUP_MODEL_REF: "openclaw-setup-model-ref";
|
|
41
44
|
readonly TASK_SUGGESTIONS_ACCEPT_MODES: "taskSuggestions.acceptModes";
|
|
@@ -136,6 +136,7 @@ declare const SessionPlacementSchema: Type.TUnion<[Type.TObject<{
|
|
|
136
136
|
environmentId: Type.TString;
|
|
137
137
|
activeOwnerEpoch: Type.TInteger;
|
|
138
138
|
workerBundleHash: Type.TString;
|
|
139
|
+
inference: Type.TOptional<Type.TLiteral<"worker">>;
|
|
139
140
|
runner: Type.TOptional<Type.TObject<{
|
|
140
141
|
kind: Type.TLiteral<"device">;
|
|
141
142
|
status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
|
|
@@ -332,6 +333,7 @@ declare const SessionsDispatchResultSchema: Type.TObject<{
|
|
|
332
333
|
environmentId: Type.TString;
|
|
333
334
|
activeOwnerEpoch: Type.TInteger;
|
|
334
335
|
workerBundleHash: Type.TString;
|
|
336
|
+
inference: Type.TOptional<Type.TLiteral<"worker">>;
|
|
335
337
|
runner: Type.TOptional<Type.TObject<{
|
|
336
338
|
kind: Type.TLiteral<"device">;
|
|
337
339
|
status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
|
|
@@ -659,6 +661,7 @@ declare const SessionPlacementProtocolSchemas: {
|
|
|
659
661
|
environmentId: Type.TString;
|
|
660
662
|
activeOwnerEpoch: Type.TInteger;
|
|
661
663
|
workerBundleHash: Type.TString;
|
|
664
|
+
inference: Type.TOptional<Type.TLiteral<"worker">>;
|
|
662
665
|
runner: Type.TOptional<Type.TObject<{
|
|
663
666
|
kind: Type.TLiteral<"device">;
|
|
664
667
|
status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
|
|
@@ -909,6 +912,7 @@ declare const SessionPlacementProtocolSchemas: {
|
|
|
909
912
|
environmentId: Type.TString;
|
|
910
913
|
activeOwnerEpoch: Type.TInteger;
|
|
911
914
|
workerBundleHash: Type.TString;
|
|
915
|
+
inference: Type.TOptional<Type.TLiteral<"worker">>;
|
|
912
916
|
runner: Type.TOptional<Type.TObject<{
|
|
913
917
|
kind: Type.TLiteral<"device">;
|
|
914
918
|
status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
|
|
@@ -1097,6 +1101,7 @@ declare const SessionPlacementProtocolSchemas: {
|
|
|
1097
1101
|
environmentId: Type.TString;
|
|
1098
1102
|
activeOwnerEpoch: Type.TInteger;
|
|
1099
1103
|
workerBundleHash: Type.TString;
|
|
1104
|
+
inference: Type.TOptional<Type.TLiteral<"worker">>;
|
|
1100
1105
|
runner: Type.TOptional<Type.TObject<{
|
|
1101
1106
|
kind: Type.TLiteral<"device">;
|
|
1102
1107
|
status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
|
|
@@ -1323,7 +1328,6 @@ declare const GatewayErrorDetailCodes: {
|
|
|
1323
1328
|
readonly OUTBOUND_DELIVERY_QUEUED: "OUTBOUND_DELIVERY_QUEUED";
|
|
1324
1329
|
readonly USER_PREFS_LIMIT_EXCEEDED: "USER_PREFS_LIMIT_EXCEEDED";
|
|
1325
1330
|
readonly SESSION_COMPANION_BUSY: "SESSION_COMPANION_BUSY";
|
|
1326
|
-
readonly SKILL_PROPOSAL_REVISION_CHANGED: "SKILL_PROPOSAL_REVISION_CHANGED";
|
|
1327
1331
|
readonly PROJECT_CLONE_FAILED: "PROJECT_CLONE_FAILED";
|
|
1328
1332
|
readonly UNKNOWN_AGENT_ID: "UNKNOWN_AGENT_ID";
|
|
1329
1333
|
readonly WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND";
|
|
@@ -1379,12 +1383,6 @@ type ProjectCloneErrorDetails = {
|
|
|
1379
1383
|
code: typeof GatewayErrorDetailCodes.PROJECT_CLONE_FAILED;
|
|
1380
1384
|
cause: ProjectCloneFailureCause;
|
|
1381
1385
|
};
|
|
1382
|
-
/** Optimistic-concurrency mismatch for an operator-reviewed Skill Workshop draft. */
|
|
1383
|
-
type SkillProposalRevisionChangedErrorDetails = {
|
|
1384
|
-
code: typeof GatewayErrorDetailCodes.SKILL_PROPOSAL_REVISION_CHANGED;
|
|
1385
|
-
expectedRevisionHash: string;
|
|
1386
|
-
currentRevisionHash: string;
|
|
1387
|
-
};
|
|
1388
1386
|
/** Exact retained workspace owner that must be recovered or explicitly abandoned. */
|
|
1389
1387
|
type SessionWorkspaceRecoveryRequiredErrorDetails = {
|
|
1390
1388
|
code: typeof GatewayErrorDetailCodes.SESSION_WORKSPACE_RECOVERY_REQUIRED;
|
|
@@ -1399,19 +1397,12 @@ type TaskWorktreeSourceRequiredErrorDetails = {
|
|
|
1399
1397
|
cwd: string;
|
|
1400
1398
|
};
|
|
1401
1399
|
/** Structured details emitted by method-level failures. */
|
|
1402
|
-
type GatewayErrorDetails = CronJobNotFoundErrorDetails | MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | OutboundDeliveryQueuedErrorDetails | UserPrefsLimitExceededErrorDetails |
|
|
1400
|
+
type GatewayErrorDetails = CronJobNotFoundErrorDetails | MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | OutboundDeliveryQueuedErrorDetails | UserPrefsLimitExceededErrorDetails | ProjectCloneErrorDetails | UnknownAgentIdErrorDetails | WizardNotFoundErrorDetails | SetupAdmissionBusyErrorDetails | GitHubPublicationSelectionRejectedErrorDetails | SessionWorkspaceRecoveryRequiredErrorDetails | TaskWorktreeSourceRequiredErrorDetails | {
|
|
1403
1401
|
code: typeof GatewayErrorDetailCodes.TASK_HISTORY_PREVIEW_CAPACITY;
|
|
1404
1402
|
};
|
|
1405
1403
|
declare function readGitHubPublicationSelectionRejectedError(error: unknown): GitHubPublicationSelectionRejectedErrorDetails | null;
|
|
1406
1404
|
/** Reads a typed cron lookup miss without parsing operator-facing prose. */
|
|
1407
1405
|
declare function readCronJobNotFoundError(error: unknown): CronJobNotFoundErrorDetails | null;
|
|
1408
|
-
/** Builds the canonical stale-draft details shared by Skill Workshop RPCs. */
|
|
1409
|
-
declare function buildSkillProposalRevisionChangedErrorDetails(params: {
|
|
1410
|
-
expectedRevisionHash: string;
|
|
1411
|
-
currentRevisionHash: string;
|
|
1412
|
-
}): SkillProposalRevisionChangedErrorDetails;
|
|
1413
|
-
/** Reads a stale Skill Workshop decision without parsing operator-facing prose. */
|
|
1414
|
-
declare function readSkillProposalRevisionChangedError(error: unknown): SkillProposalRevisionChangedErrorDetails | null;
|
|
1415
1406
|
/** Reads validated missing-scope details from an untrusted protocol payload. */
|
|
1416
1407
|
declare function readMissingScopeErrorDetails(details: unknown): MissingScopeErrorDetails | null;
|
|
1417
1408
|
declare function isMcpAppViewExpiredError(error: unknown): boolean;
|
|
@@ -1421,4 +1412,4 @@ declare function isMcpAppViewExpiredError(error: unknown): boolean;
|
|
|
1421
1412
|
*/
|
|
1422
1413
|
declare function readMissingScopeError(error: unknown): MissingScopeErrorDetails | null;
|
|
1423
1414
|
//#endregion
|
|
1424
|
-
export {
|
|
1415
|
+
export { SessionsMoveParams as $, SessionMovePlacementState as A, SessionPlacementMove as B, readMissingScopeErrorDetails as C, SessionMoveGatewayTargetSchema as D, SessionMoveExpectedSourceSchema as E, SessionPlacement as F, SessionPlacementSchema as G, SessionPlacementProtocolSchemas as H, SessionPlacementDiskSpace as I, SessionPlacementWorkerRuntimeInstallSchema as J, SessionPlacementStateSchema as K, SessionPlacementDiskSpaceSchema as L, SessionMoveProfileTargetSchema as M, SessionMoveTarget as N, SessionMovePlacement as O, SessionMoveTargetSchema as P, SessionsDispatchResultSchema as Q, SessionPlacementMachine as R, readMissingScopeError as S, SessionMoveExpectedSource as T, SessionPlacementRunner as U, SessionPlacementMoveSchema as V, SessionPlacementRunnerSchema as W, SessionsDispatchParamsSchema as X, SessionsDispatchParams as Y, SessionsDispatchResult as Z, UserPrefsLimitExceededErrorDetails as _, GatewayErrorDetailCodes as a, SessionsReclaimResult as at, readCronJobNotFoundError as b, McpAppViewExpiredErrorDetails as c, SessionsReclaimResultSchema as ct, ProjectCloneErrorDetails as d, SessionsMoveParamsSchema as et, ProjectCloneFailureCause as f, UnknownAgentIdErrorDetails as g, TaskWorktreeSourceRequiredErrorDetails as h, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT as i, SessionsReclaimParamsSchema as it, SessionMovePlacementStateSchema as j, SessionMovePlacementSchema as k, MissingScopeErrorDetails as l, SetupAdmissionBusyErrorDetails as m, ErrorCode as n, SessionsMoveResultSchema as nt, GatewayErrorDetails as o, SessionsReclaimResultPlacement as ot, SessionWorkspaceRecoveryRequiredErrorDetails as p, SessionPlacementWorkerRuntimeInstall as q, ErrorCodes as r, SessionsReclaimParams as rt, GitHubPublicationSelectionRejectedErrorDetails as s, SessionsReclaimResultPlacementSchema as st, CronJobNotFoundErrorDetails as t, SessionsMoveResult as tt, OutboundDeliveryQueuedErrorDetails as u, WizardNotFoundErrorDetails as v, SessionMoveDeviceTargetSchema as w, readGitHubPublicationSelectionRejectedError as x, isMcpAppViewExpiredError as y, SessionPlacementMachineSchema as z };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { CronJobNotFoundErrorDetails, ErrorCode, ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, GatewayErrorDetails, GitHubPublicationSelectionRejectedErrorDetails, McpAppViewExpiredErrorDetails, MissingScopeErrorDetails, OutboundDeliveryQueuedErrorDetails, ProjectCloneErrorDetails, ProjectCloneFailureCause, SessionWorkspaceRecoveryRequiredErrorDetails, SetupAdmissionBusyErrorDetails,
|
|
1
|
+
import { C as readMissingScopeErrorDetails, S as readMissingScopeError, _ as UserPrefsLimitExceededErrorDetails, a as GatewayErrorDetailCodes, b as readCronJobNotFoundError, c as McpAppViewExpiredErrorDetails, d as ProjectCloneErrorDetails, f as ProjectCloneFailureCause, g as UnknownAgentIdErrorDetails, h as TaskWorktreeSourceRequiredErrorDetails, i as GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, l as MissingScopeErrorDetails, m as SetupAdmissionBusyErrorDetails, n as ErrorCode, o as GatewayErrorDetails, p as SessionWorkspaceRecoveryRequiredErrorDetails, r as ErrorCodes, s as GitHubPublicationSelectionRejectedErrorDetails, t as CronJobNotFoundErrorDetails, u as OutboundDeliveryQueuedErrorDetails, v as WizardNotFoundErrorDetails, x as readGitHubPublicationSelectionRejectedError, y as isMcpAppViewExpiredError } from "./gateway-error-details-CsyGNcmF.mjs";
|
|
2
|
+
export { CronJobNotFoundErrorDetails, ErrorCode, ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, GatewayErrorDetails, GitHubPublicationSelectionRejectedErrorDetails, McpAppViewExpiredErrorDetails, MissingScopeErrorDetails, OutboundDeliveryQueuedErrorDetails, ProjectCloneErrorDetails, ProjectCloneFailureCause, SessionWorkspaceRecoveryRequiredErrorDetails, SetupAdmissionBusyErrorDetails, TaskWorktreeSourceRequiredErrorDetails, UnknownAgentIdErrorDetails, UserPrefsLimitExceededErrorDetails, WizardNotFoundErrorDetails, isMcpAppViewExpiredError, readCronJobNotFoundError, readGitHubPublicationSelectionRejectedError, readMissingScopeError, readMissingScopeErrorDetails };
|
|
@@ -27,7 +27,6 @@ const GatewayErrorDetailCodes = {
|
|
|
27
27
|
OUTBOUND_DELIVERY_QUEUED: "OUTBOUND_DELIVERY_QUEUED",
|
|
28
28
|
USER_PREFS_LIMIT_EXCEEDED: "USER_PREFS_LIMIT_EXCEEDED",
|
|
29
29
|
SESSION_COMPANION_BUSY: "SESSION_COMPANION_BUSY",
|
|
30
|
-
SKILL_PROPOSAL_REVISION_CHANGED: "SKILL_PROPOSAL_REVISION_CHANGED",
|
|
31
30
|
PROJECT_CLONE_FAILED: "PROJECT_CLONE_FAILED",
|
|
32
31
|
UNKNOWN_AGENT_ID: "UNKNOWN_AGENT_ID",
|
|
33
32
|
WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND",
|
|
@@ -38,7 +37,6 @@ const GatewayErrorDetailCodes = {
|
|
|
38
37
|
TASK_HISTORY_PREVIEW_CAPACITY: "TASK_HISTORY_PREVIEW_CAPACITY"
|
|
39
38
|
};
|
|
40
39
|
const LEGACY_MISSING_SCOPE_PATTERN = /\bmissing scope:\s*([a-z0-9._-]+)/i;
|
|
41
|
-
const SHA256_PATTERN = /^[a-fA-F0-9]{64}$/;
|
|
42
40
|
function readGitHubPublicationSelectionRejectedError(error) {
|
|
43
41
|
const record = asNullableRecord(error);
|
|
44
42
|
const details = asNullableRecord(record?.details);
|
|
@@ -58,27 +56,6 @@ function readCronJobNotFoundError(error) {
|
|
|
58
56
|
jobId
|
|
59
57
|
} : null;
|
|
60
58
|
}
|
|
61
|
-
/** Builds the canonical stale-draft details shared by Skill Workshop RPCs. */
|
|
62
|
-
function buildSkillProposalRevisionChangedErrorDetails(params) {
|
|
63
|
-
return {
|
|
64
|
-
code: GatewayErrorDetailCodes.SKILL_PROPOSAL_REVISION_CHANGED,
|
|
65
|
-
expectedRevisionHash: params.expectedRevisionHash,
|
|
66
|
-
currentRevisionHash: params.currentRevisionHash
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
/** Reads a stale Skill Workshop decision without parsing operator-facing prose. */
|
|
70
|
-
function readSkillProposalRevisionChangedError(error) {
|
|
71
|
-
const record = asNullableRecord(error);
|
|
72
|
-
const details = asNullableRecord(record?.details);
|
|
73
|
-
if (details?.code !== GatewayErrorDetailCodes.SKILL_PROPOSAL_REVISION_CHANGED) return null;
|
|
74
|
-
const expectedRevisionHash = typeof details.expectedRevisionHash === "string" ? details.expectedRevisionHash : "";
|
|
75
|
-
const currentRevisionHash = typeof details.currentRevisionHash === "string" ? details.currentRevisionHash : "";
|
|
76
|
-
if (!SHA256_PATTERN.test(expectedRevisionHash) || !SHA256_PATTERN.test(currentRevisionHash)) return null;
|
|
77
|
-
return buildSkillProposalRevisionChangedErrorDetails({
|
|
78
|
-
expectedRevisionHash,
|
|
79
|
-
currentRevisionHash
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
59
|
/** Reads validated missing-scope details from an untrusted protocol payload. */
|
|
83
60
|
function readMissingScopeErrorDetails(details) {
|
|
84
61
|
const record = asNullableRecord(details);
|
|
@@ -115,4 +92,4 @@ function readMissingScopeError(error) {
|
|
|
115
92
|
} : null;
|
|
116
93
|
}
|
|
117
94
|
//#endregion
|
|
118
|
-
export { ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes,
|
|
95
|
+
export { ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, isMcpAppViewExpiredError, readCronJobNotFoundError, readGitHubPublicationSelectionRejectedError, readMissingScopeError, readMissingScopeErrorDetails };
|