@openclaw/gateway-protocol 2026.8.1-beta.2 → 2026.8.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.
@@ -0,0 +1,11 @@
1
+ //#region ../normalization-core/src/record-coerce.ts
2
+ /** Type guard for non-array object records at browser-safe boundaries. */
3
+ function isRecord(value) {
4
+ return value !== null && typeof value === "object" && !Array.isArray(value);
5
+ }
6
+ /** Returns a non-array record or null. */
7
+ function asNullableRecord(value) {
8
+ return isRecord(value) ? value : null;
9
+ }
10
+ //#endregion
11
+ export { isRecord as n, asNullableRecord as t };
@@ -0,0 +1,8 @@
1
+ //#region src/restart-unavailable.d.ts
2
+ /** Structured error reason used while the gateway drains for a restart. */
3
+ export declare const GATEWAY_RESTART_UNAVAILABLE_REASON = "gateway-restarting";
4
+ /** Structured error reason used while the gateway drains for a suspension. */
5
+ export declare const GATEWAY_SUSPEND_UNAVAILABLE_REASON = "gateway-suspending";
6
+ /** Detects the structured retryable error emitted while a restart drain refuses work. */
7
+ export declare function isGatewayRestartUnavailableError(error: unknown): boolean;
8
+ //#endregion
@@ -0,0 +1,13 @@
1
+ //#region src/restart-unavailable.ts
2
+ /** Structured error reason used while the gateway drains for a restart. */
3
+ const GATEWAY_RESTART_UNAVAILABLE_REASON = "gateway-restarting";
4
+ /** Structured error reason used while the gateway drains for a suspension. */
5
+ const GATEWAY_SUSPEND_UNAVAILABLE_REASON = "gateway-suspending";
6
+ /** Detects the structured retryable error emitted while a restart drain refuses work. */
7
+ function isGatewayRestartUnavailableError(error) {
8
+ if (!error || typeof error !== "object") return false;
9
+ const details = error.details;
10
+ return typeof details === "object" && details !== null && details.reason === "gateway-restarting";
11
+ }
12
+ //#endregion
13
+ export { GATEWAY_RESTART_UNAVAILABLE_REASON, GATEWAY_SUSPEND_UNAVAILABLE_REASON, isGatewayRestartUnavailableError };