@stndrds/schema 1.0.0-alpha.343 → 1.0.0-alpha.344
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/dist/index.d.mts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +9 -9
- package/dist/index.mjs +9 -9
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1950,7 +1950,7 @@ export type AgentMessagePart = {
|
|
|
1950
1950
|
} | {
|
|
1951
1951
|
type: "compaction";
|
|
1952
1952
|
state: "failed";
|
|
1953
|
-
/** Human-readable reason
|
|
1953
|
+
/** Human-readable reason the summary could not be produced (`summary_timeout`, `summary_failed`, …). */
|
|
1954
1954
|
reason: string;
|
|
1955
1955
|
durationMs?: number;
|
|
1956
1956
|
};
|
|
@@ -2710,6 +2710,28 @@ export declare const DEVICE_CHANNEL_PRESENCE_MS = 2000;
|
|
|
2710
2710
|
* The JSON frame is what keeps an MV3 service worker awake.
|
|
2711
2711
|
*/
|
|
2712
2712
|
export declare const DEVICE_CHANNEL_KEEPALIVE_MS = 20000;
|
|
2713
|
+
/**
|
|
2714
|
+
* The code a worker closes with when a frame breaks the protocol. A browser
|
|
2715
|
+
* `WebSocket` only accepts 1000 and 3000-4999, so the private-use mirror of
|
|
2716
|
+
* 1008 is the one code every worker can actually send.
|
|
2717
|
+
*/
|
|
2718
|
+
export declare const DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION = 4008;
|
|
2719
|
+
/** Where an exponential backoff starts, and where it stops doubling. */
|
|
2720
|
+
export interface RetryBounds {
|
|
2721
|
+
initialMs: number;
|
|
2722
|
+
maxMs: number;
|
|
2723
|
+
}
|
|
2724
|
+
/**
|
|
2725
|
+
* Where the channel is: the path is absolute on the API origin, so a profile's
|
|
2726
|
+
* `apiUrl` keeps only its host and the scheme swaps to the socket one. Written
|
|
2727
|
+
* as an explicit map rather than a rewrite of the origin string, because a
|
|
2728
|
+
* two-letter scheme literal reads to the SDK's egress scan as the `ws` package.
|
|
2729
|
+
*/
|
|
2730
|
+
export declare function deviceChannelUrl(apiUrl: string): string;
|
|
2731
|
+
/** Exponential backoff within the given bounds, plus the shared jitter window. */
|
|
2732
|
+
export declare function computeRetryDelay(attempt: number, random: () => number, bounds: RetryBounds): number;
|
|
2733
|
+
/** When to reconnect to the channel: 1 s doubling up to 30 s, plus jitter. */
|
|
2734
|
+
export declare function computeReconnectDelay(attempt: number, random?: () => number): number;
|
|
2713
2735
|
export declare const DEVICE_COMMAND_ERROR_CODES: readonly ["worker_disconnected", "cancelled", "timed_out", "execution_failed", "stale_reference", "tab_unavailable", "debugger_unavailable", "blocked_by_user"];
|
|
2714
2736
|
export type DeviceCommandErrorCode = (typeof DEVICE_COMMAND_ERROR_CODES)[number];
|
|
2715
2737
|
export declare class DeviceChannelProtocolError extends SchemaError {
|
package/dist/index.d.ts
CHANGED
|
@@ -1950,7 +1950,7 @@ export type AgentMessagePart = {
|
|
|
1950
1950
|
} | {
|
|
1951
1951
|
type: "compaction";
|
|
1952
1952
|
state: "failed";
|
|
1953
|
-
/** Human-readable reason
|
|
1953
|
+
/** Human-readable reason the summary could not be produced (`summary_timeout`, `summary_failed`, …). */
|
|
1954
1954
|
reason: string;
|
|
1955
1955
|
durationMs?: number;
|
|
1956
1956
|
};
|
|
@@ -2710,6 +2710,28 @@ export declare const DEVICE_CHANNEL_PRESENCE_MS = 2000;
|
|
|
2710
2710
|
* The JSON frame is what keeps an MV3 service worker awake.
|
|
2711
2711
|
*/
|
|
2712
2712
|
export declare const DEVICE_CHANNEL_KEEPALIVE_MS = 20000;
|
|
2713
|
+
/**
|
|
2714
|
+
* The code a worker closes with when a frame breaks the protocol. A browser
|
|
2715
|
+
* `WebSocket` only accepts 1000 and 3000-4999, so the private-use mirror of
|
|
2716
|
+
* 1008 is the one code every worker can actually send.
|
|
2717
|
+
*/
|
|
2718
|
+
export declare const DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION = 4008;
|
|
2719
|
+
/** Where an exponential backoff starts, and where it stops doubling. */
|
|
2720
|
+
export interface RetryBounds {
|
|
2721
|
+
initialMs: number;
|
|
2722
|
+
maxMs: number;
|
|
2723
|
+
}
|
|
2724
|
+
/**
|
|
2725
|
+
* Where the channel is: the path is absolute on the API origin, so a profile's
|
|
2726
|
+
* `apiUrl` keeps only its host and the scheme swaps to the socket one. Written
|
|
2727
|
+
* as an explicit map rather than a rewrite of the origin string, because a
|
|
2728
|
+
* two-letter scheme literal reads to the SDK's egress scan as the `ws` package.
|
|
2729
|
+
*/
|
|
2730
|
+
export declare function deviceChannelUrl(apiUrl: string): string;
|
|
2731
|
+
/** Exponential backoff within the given bounds, plus the shared jitter window. */
|
|
2732
|
+
export declare function computeRetryDelay(attempt: number, random: () => number, bounds: RetryBounds): number;
|
|
2733
|
+
/** When to reconnect to the channel: 1 s doubling up to 30 s, plus jitter. */
|
|
2734
|
+
export declare function computeReconnectDelay(attempt: number, random?: () => number): number;
|
|
2713
2735
|
export declare const DEVICE_COMMAND_ERROR_CODES: readonly ["worker_disconnected", "cancelled", "timed_out", "execution_failed", "stale_reference", "tab_unavailable", "debugger_unavailable", "blocked_by_user"];
|
|
2714
2736
|
export type DeviceCommandErrorCode = (typeof DEVICE_COMMAND_ERROR_CODES)[number];
|
|
2715
2737
|
export declare class DeviceChannelProtocolError extends SchemaError {
|