@velmlabs/unstuck-protocol 0.1.3 → 0.1.4

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.ts CHANGED
@@ -234,6 +234,11 @@ type EngineToViewer = {
234
234
  field?: Field;
235
235
  };
236
236
  declare function parseViewerMessage(raw: string): ViewerToEngine | null;
237
+ /**
238
+ * How long a human who left the viewer (switched apps to read a code, lost signal) can come back and resume.
239
+ * The engine frees the agent after this; the viewer stops retrying after it.
240
+ */
241
+ declare const RESUME_WINDOW_MS: number;
237
242
 
238
243
  declare const RELAY_SUBPROTOCOL = "unstuck-relay.1";
239
244
  declare const KEY_SUBPROTOCOL_PREFIX = "key.";
@@ -321,5 +326,5 @@ declare function openMsg(key: CryptoKey, sessionId: string, dir: Direction, conn
321
326
  plain: Uint8Array;
322
327
  } | null>;
323
328
 
324
- export { EngineToViewerSchema, FRAME_TYPE_JPEG, FieldKinds, FieldSchema, KEY_SUBPROTOCOL_PREFIX, Methods, PROTOCOL_VERSION, RELAY_CLOSE, RELAY_LIMITS, RELAY_SUBPROTOCOL, RpcCallError, SESSION_ID_RE, SessionStatusSchema, ViewerErrorCodes, ViewerToEngineSchema, b64urlDecode, b64urlEncode, createRpcPeer, decodeEnvelope, decodeFrame, encodeEnvelope, encodeFrame, importE2eKey, isJsonPlaintext, newConnNonce, newE2eKey, open, openMsg, parseAgentToRelay, parseRelayToAgent, parseViewerMessage, seal, sealMsg };
329
+ export { EngineToViewerSchema, FRAME_TYPE_JPEG, FieldKinds, FieldSchema, KEY_SUBPROTOCOL_PREFIX, Methods, PROTOCOL_VERSION, RELAY_CLOSE, RELAY_LIMITS, RELAY_SUBPROTOCOL, RESUME_WINDOW_MS, RpcCallError, SESSION_ID_RE, SessionStatusSchema, ViewerErrorCodes, ViewerToEngineSchema, b64urlDecode, b64urlEncode, createRpcPeer, decodeEnvelope, decodeFrame, encodeEnvelope, encodeFrame, importE2eKey, isJsonPlaintext, newConnNonce, newE2eKey, open, openMsg, parseAgentToRelay, parseRelayToAgent, parseViewerMessage, seal, sealMsg };
325
330
  export type { AgentToRelay, CdpClosedParams, CdpEventParams, CdpSendParams, CdpSubscribeParams, Direction, EngineToViewer, Field, FieldKind, Frame, HelloParams, HelloResult, PagePopupParams, RelayToAgent, RpcError, RpcNotification, RpcPeer, RpcRequest, RpcResponse, SessionStatus, TakeoverLinkParams, TakeoverParams, TakeoverResult, TakeoverStatus, ViewerErrorCode, ViewerInput, ViewerToEngine };
package/dist/index.js CHANGED
@@ -179,6 +179,7 @@ function parseViewerMessage(raw) {
179
179
  }
180
180
  return Value.Check(ViewerToEngineSchema, v) ? v : null;
181
181
  }
182
+ var RESUME_WINDOW_MS = 5 * 6e4;
182
183
 
183
184
  // src/relay.ts
184
185
  import { Type as Type2 } from "@sinclair/typebox";
@@ -328,6 +329,7 @@ export {
328
329
  RELAY_CLOSE,
329
330
  RELAY_LIMITS,
330
331
  RELAY_SUBPROTOCOL,
332
+ RESUME_WINDOW_MS,
331
333
  RpcCallError,
332
334
  SESSION_ID_RE,
333
335
  SessionStatusSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velmlabs/unstuck-protocol",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Wire protocol shared by the Unstuck engine, viewer and relays (frames, RPC, end-to-end encryption).",
5
5
  "keywords": [
6
6
  "ai",