@velmlabs/unstuck-protocol 0.1.6 → 0.2.0

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +10 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -76,8 +76,12 @@ interface TakeoverParams {
76
76
  requireCode?: boolean;
77
77
  /** Sites besides the page's own the human may navigate to, e.g. ["accounts.google.com"] (page lock). */
78
78
  allowedSites?: string[];
79
- /** Send this takeover to the user's paired phones (Unstuck Cloud); undefined means yes, false skips it. */
80
- alerts?: boolean;
79
+ /**
80
+ * Send this takeover to the user's paired phones (Unstuck Cloud); undefined means yes, false skips it. 'required' fails
81
+ * the takeover with `alert_failed` when Unstuck Cloud can't accept the link for at least one paired phone; without
82
+ * Unstuck Cloud the engine answers the request with error code `config_error`.
83
+ */
84
+ alerts?: boolean | 'required';
81
85
  }
82
86
  interface CdpSendParams {
83
87
  pageId: string;
@@ -117,6 +121,10 @@ interface TakeoverResult {
117
121
  sessionId: string;
118
122
  url: string;
119
123
  durationS: number;
124
+ /**
125
+ * Why it ended, when there is more to say: e.g. `page_closed`, `viewer_left`, `engine_closed`, `alert_failed` (with
126
+ * `alerts: 'required'`, the link reached no paired phone), or the human's own words after Can't solve.
127
+ */
120
128
  detail?: string;
121
129
  }
122
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velmlabs/unstuck-protocol",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
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",