@parall/daemon 1.47.0 → 1.49.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.
- package/bundle/manifest.json +11 -11
- package/bundle/parall-browser-pod.js +182 -6
- package/bundle/parall-claude-agent.js +218 -7
- package/bundle/parall-codex-agent.js +218 -7
- package/bundle/parall-daemon.js +184 -6
- package/package.json +6 -6
package/bundle/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
3
|
-
"built_at": "2026-07-
|
|
2
|
+
"version": "1.49.0",
|
|
3
|
+
"built_at": "2026-07-26T04:12:18.813Z",
|
|
4
4
|
"min_node_version": "20.0.0",
|
|
5
5
|
"files": {
|
|
6
6
|
"bb-browser-daemon.js": {
|
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
"size": 18
|
|
17
17
|
},
|
|
18
18
|
"parall-browser-pod.js": {
|
|
19
|
-
"sha256": "
|
|
20
|
-
"size":
|
|
19
|
+
"sha256": "20a0ee67c5be9cd2352ed8e5a503fa60b8fe86d7dba04ecbe2345397c6e7e00f",
|
|
20
|
+
"size": 2899080
|
|
21
21
|
},
|
|
22
22
|
"parall-channel-exec.js": {
|
|
23
23
|
"sha256": "7c2a6e12483a45e9eb4a42cd7d4cdd3c4fa21dd09ac1347d9a3e177b4ddee930",
|
|
24
24
|
"size": 7220
|
|
25
25
|
},
|
|
26
26
|
"parall-claude-agent.js": {
|
|
27
|
-
"sha256": "
|
|
28
|
-
"size":
|
|
27
|
+
"sha256": "19203c62234b641e691de41af3444d52876beaabc3fa6abeb7907fd5276da711",
|
|
28
|
+
"size": 2732891
|
|
29
29
|
},
|
|
30
30
|
"parall-codex-agent.js": {
|
|
31
|
-
"sha256": "
|
|
32
|
-
"size":
|
|
31
|
+
"sha256": "8a80870d3f213ae3d36b5c46b4e4d4e6eb1d91855d5a2ce1c72be43e9cc960ba",
|
|
32
|
+
"size": 2774631
|
|
33
33
|
},
|
|
34
34
|
"parall-daemon.js": {
|
|
35
|
-
"sha256": "
|
|
36
|
-
"size":
|
|
35
|
+
"sha256": "ef3377051a8310fb760d2ce7826a6654d83225f093a8cdade696ad6216540b3c",
|
|
36
|
+
"size": 2961111
|
|
37
37
|
},
|
|
38
38
|
"parall-openclaw-agent.js": {
|
|
39
39
|
"sha256": "856a1c3a9ae0ffef8efe2481fa1171dbeb1d67cccb88616aa9bf16da96a69355",
|
|
40
40
|
"size": 9923
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"signature": "
|
|
43
|
+
"signature": "sDr+si9wQsnB/LezX3xlTWHu2bHV5DzO5KWEtQz/5Qj2XOWfpKqvb0JjjVFGOxCG07mIGSfj9U5KpeT3GMgbDg=="
|
|
44
44
|
}
|
|
@@ -63552,6 +63552,8 @@ var ENDPOINTS = {
|
|
|
63552
63552
|
MESSAGE_WATCH: (id) => `${API_BASE}/messages/${id}/watch`,
|
|
63553
63553
|
MESSAGE_WATCHERS: (id) => `${API_BASE}/messages/${id}/watchers`,
|
|
63554
63554
|
MESSAGE_WATCHING: (id) => `${API_BASE}/messages/${id}/watching`,
|
|
63555
|
+
MESSAGE_REACTIONS: (id) => `${API_BASE}/messages/${id}/reactions`,
|
|
63556
|
+
MESSAGE_REACTION: (id, emoji) => `${API_BASE}/messages/${id}/reactions/${encodeURIComponent(emoji)}`,
|
|
63555
63557
|
// Upload (org-scoped)
|
|
63556
63558
|
UPLOAD_PRESIGN: (orgId) => `${API_BASE}/orgs/${orgId}/upload/presign`,
|
|
63557
63559
|
UPLOAD_COMPLETE: (orgId) => `${API_BASE}/orgs/${orgId}/upload/complete`,
|
|
@@ -63789,11 +63791,13 @@ var ENDPOINTS = {
|
|
|
63789
63791
|
UNREAD: `${API_BASE}/me/unread`,
|
|
63790
63792
|
ORG_UNREAD: (orgId) => `${API_BASE}/orgs/${orgId}/unread`,
|
|
63791
63793
|
CHAT_READ: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read`,
|
|
63794
|
+
CHAT_READ_ALL: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read-all`,
|
|
63792
63795
|
THREAD_UNREAD: (orgId, chatId, threadRootId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/unread`,
|
|
63793
63796
|
THREAD_READ: (orgId, chatId, threadRootId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/read`,
|
|
63794
63797
|
// References (org-scoped)
|
|
63795
63798
|
REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
|
|
63796
63799
|
REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
|
|
63800
|
+
REFS_OUTBOUND: (orgId) => `${API_BASE}/orgs/${orgId}/refs/outbound`,
|
|
63797
63801
|
REFS_GRAPH: (orgId) => `${API_BASE}/orgs/${orgId}/refs/graph`,
|
|
63798
63802
|
REFS_CHECK: (orgId) => `${API_BASE}/orgs/${orgId}/refs/check`,
|
|
63799
63803
|
// Platform config (agent-scoped, not org-scoped)
|
|
@@ -63852,10 +63856,23 @@ var ENDPOINTS = {
|
|
|
63852
63856
|
ORG_EDGE: (orgId) => `/api/v1/orgs/${orgId}/edge`,
|
|
63853
63857
|
ORG_EDGE_DEVICES: (orgId) => `/api/v1/orgs/${orgId}/edge/devices`,
|
|
63854
63858
|
ORG_EDGE_DEVICE: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}`,
|
|
63859
|
+
ORG_EDGE_DEVICE_UNREGISTER: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/unregister`,
|
|
63855
63860
|
ORG_EDGE_ONBOARDING: (orgId) => `/api/v1/orgs/${orgId}/edge/onboarding`,
|
|
63856
63861
|
ORG_EDGE_PROFILES: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
|
|
63862
|
+
// Per-profile egress proxy (hosted Cloud Profiles; manager-only, human-only).
|
|
63863
|
+
ORG_EDGE_PROFILE_PROXY: (orgId, edgeId, profileName) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles/${encodeURIComponent(profileName)}/proxy`,
|
|
63864
|
+
ORG_EDGE_EXEC: (orgId) => `/api/v1/orgs/${orgId}/edge/exec`,
|
|
63865
|
+
// Cloud Edge live viewer command (V1b) — api-server, gated on cap:edge-viewer.
|
|
63866
|
+
// Same request/reply shape as the v2 browser-profile viewer, on the v3 edge
|
|
63867
|
+
// pipe. Additive: does NOT replace BROWSER_PROFILE_VIEWER_COMMAND.
|
|
63868
|
+
ORG_EDGE_VIEWER_COMMAND: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/viewer/command`,
|
|
63857
63869
|
CLIP_CONNECTIONS: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/connections`,
|
|
63858
|
-
CLIP_CONNECTION: (orgId, connId) => `/api/v1/orgs/${orgId}/clip-connections/${connId}
|
|
63870
|
+
CLIP_CONNECTION: (orgId, connId) => `/api/v1/orgs/${orgId}/clip-connections/${connId}`,
|
|
63871
|
+
// Clip registry (v3, org-scoped, served by api-server — `crg_` entries; the
|
|
63872
|
+
// Pinix Hub catalog proxy above is a different, id-less surface)
|
|
63873
|
+
ORG_CLIP_REGISTRY: (orgId) => `/api/v1/orgs/${orgId}/clip-registry`,
|
|
63874
|
+
ORG_CLIP_INSTALL: (orgId) => `/api/v1/orgs/${orgId}/clips/install`,
|
|
63875
|
+
ORG_CLIPS_INSTALLED: (orgId) => `/api/v1/orgs/${orgId}/clips/installed`
|
|
63859
63876
|
};
|
|
63860
63877
|
|
|
63861
63878
|
// ts/sdk/dist/client.js
|
|
@@ -64013,7 +64030,7 @@ var ParallClient = class _ParallClient {
|
|
|
64013
64030
|
if (qs)
|
|
64014
64031
|
url += `?${qs}`;
|
|
64015
64032
|
}
|
|
64016
|
-
const headers = this.buildHeaders(path7);
|
|
64033
|
+
const headers = this.buildHeaders(path7, opts?.headers);
|
|
64017
64034
|
const timeoutSignal = AbortSignal.timeout(opts?.timeoutMs ?? 15e3);
|
|
64018
64035
|
const signal = opts?.signal ? AbortSignal.any([opts.signal, timeoutSignal]) : timeoutSignal;
|
|
64019
64036
|
let res;
|
|
@@ -64419,6 +64436,14 @@ var ParallClient = class _ParallClient {
|
|
|
64419
64436
|
async getMessageReplies(id, params) {
|
|
64420
64437
|
return this.request("GET", ENDPOINTS.MESSAGE_REPLIES(id), void 0, params);
|
|
64421
64438
|
}
|
|
64439
|
+
// ---- Reactions ----
|
|
64440
|
+
async toggleReaction(messageId, emoji) {
|
|
64441
|
+
return this.request("PUT", ENDPOINTS.MESSAGE_REACTION(messageId, emoji));
|
|
64442
|
+
}
|
|
64443
|
+
async listReactions(messageId) {
|
|
64444
|
+
const res = await this.request("GET", ENDPOINTS.MESSAGE_REACTIONS(messageId));
|
|
64445
|
+
return res.reactions;
|
|
64446
|
+
}
|
|
64422
64447
|
// ---- File Upload ----
|
|
64423
64448
|
async getUploadPresignUrl(orgId, req) {
|
|
64424
64449
|
return this.request("POST", ENDPOINTS.UPLOAD_PRESIGN(orgId), req);
|
|
@@ -64794,6 +64819,15 @@ var ParallClient = class _ParallClient {
|
|
|
64794
64819
|
async browserViewerCommand(orgId, profileId, req, opts) {
|
|
64795
64820
|
return this.request("POST", ENDPOINTS.BROWSER_PROFILE_VIEWER_COMMAND(orgId, profileId), req, void 0, false, opts);
|
|
64796
64821
|
}
|
|
64822
|
+
/**
|
|
64823
|
+
* Drive the Cloud Edge live viewer (V1b, design §6): WebRTC signaling + input +
|
|
64824
|
+
* tab nav for a hosted browser (Cloud Profile). Same request/reply shape as
|
|
64825
|
+
* browserViewerCommand, on the v3 edge pipe; additive — the v2 browser-profile
|
|
64826
|
+
* viewer is unchanged.
|
|
64827
|
+
*/
|
|
64828
|
+
async edgeViewerCommand(orgId, edgeId, req, opts) {
|
|
64829
|
+
return this.request("POST", ENDPOINTS.ORG_EDGE_VIEWER_COMMAND(orgId, edgeId), req, void 0, false, opts);
|
|
64830
|
+
}
|
|
64797
64831
|
async resizeMachine(orgId, machineId, spec) {
|
|
64798
64832
|
return this.request("PATCH", ENDPOINTS.MACHINE_SPEC(orgId, machineId), spec);
|
|
64799
64833
|
}
|
|
@@ -64820,14 +64854,23 @@ var ParallClient = class _ParallClient {
|
|
|
64820
64854
|
}
|
|
64821
64855
|
// Wiki mount/token methods removed — wiki-service handles all wiki endpoints.
|
|
64822
64856
|
// ---- Unread ----
|
|
64823
|
-
async getUnreadCounts(orgId) {
|
|
64857
|
+
async getUnreadCounts(orgId, opts) {
|
|
64824
64858
|
const endpoint = orgId ? ENDPOINTS.ORG_UNREAD(orgId) : ENDPOINTS.UNREAD;
|
|
64825
|
-
const res = await this.request("GET", endpoint
|
|
64859
|
+
const res = await this.request("GET", endpoint, void 0, {
|
|
64860
|
+
include_thread_replies: opts?.includeThreadReplies ? "true" : void 0
|
|
64861
|
+
});
|
|
64826
64862
|
return res.data;
|
|
64827
64863
|
}
|
|
64828
64864
|
async markRead(orgId, chatId, messageId) {
|
|
64829
64865
|
return this.request("POST", ENDPOINTS.CHAT_READ(orgId, chatId), { message_id: messageId });
|
|
64830
64866
|
}
|
|
64867
|
+
/** Mark everything in a chat read: the channel cursor jumps to the latest
|
|
64868
|
+
* top-level message and every thread cursor to its latest reply, in one
|
|
64869
|
+
* idempotent call. The server echoes the same per-cursor WS events the
|
|
64870
|
+
* single-cursor routes emit and auto-clears covered inbox items. */
|
|
64871
|
+
async markAllRead(orgId, chatId) {
|
|
64872
|
+
return this.request("POST", ENDPOINTS.CHAT_READ_ALL(orgId, chatId));
|
|
64873
|
+
}
|
|
64831
64874
|
async getThreadUnread(orgId, chatId, threadRootId) {
|
|
64832
64875
|
return this.request("GET", ENDPOINTS.THREAD_UNREAD(orgId, chatId, threadRootId));
|
|
64833
64876
|
}
|
|
@@ -65502,6 +65545,16 @@ var ParallClient = class _ParallClient {
|
|
|
65502
65545
|
async getBacklinks(orgId, params) {
|
|
65503
65546
|
return this.request("GET", ENDPOINTS.REFS_BACKLINKS(orgId), void 0, params);
|
|
65504
65547
|
}
|
|
65548
|
+
/**
|
|
65549
|
+
* Outbound prll:// refs authored in a set of sources, as raw ref_links rows
|
|
65550
|
+
* (dedupe/group client-side). Pass `{ thread_root_id }` to list a whole
|
|
65551
|
+
* thread's refs (root + all replies, resolved server-side — the client's
|
|
65552
|
+
* reply window may be partial), or `{ source_type, source_ids }` for
|
|
65553
|
+
* explicit sources (max 500; v1 accepts only message sources).
|
|
65554
|
+
*/
|
|
65555
|
+
async listOutboundRefs(orgId, req) {
|
|
65556
|
+
return this.request("POST", ENDPOINTS.REFS_OUTBOUND(orgId), req);
|
|
65557
|
+
}
|
|
65505
65558
|
/**
|
|
65506
65559
|
* Bounded multi-hop walk of the prll:// reference graph around `uri`. `uri`
|
|
65507
65560
|
* must be an entity-level prll:// URI — a refined URI (path/query/fragment) is
|
|
@@ -65712,6 +65765,31 @@ var ParallClient = class _ParallClient {
|
|
|
65712
65765
|
const resp = await this.request("GET", url);
|
|
65713
65766
|
return resp.data;
|
|
65714
65767
|
}
|
|
65768
|
+
// ---- Clip registry (v3, api-server org registry — `crg_` entries) ----
|
|
65769
|
+
/**
|
|
65770
|
+
* List registry clips visible to the org: its own plus public+approved
|
|
65771
|
+
* cross-org entries. This is the surface `installRegistryClip` and clip
|
|
65772
|
+
* connections operate on — NOT the Pinix catalog proxy
|
|
65773
|
+
* ({@link listRegistryClips}), whose entries carry no `crg_` id.
|
|
65774
|
+
*/
|
|
65775
|
+
async listOrgRegistryClips(orgId) {
|
|
65776
|
+
const resp = await this.request("GET", `${ENDPOINTS.ORG_CLIP_REGISTRY(orgId)}?limit=100`);
|
|
65777
|
+
return resp ?? [];
|
|
65778
|
+
}
|
|
65779
|
+
/**
|
|
65780
|
+
* Install a registry clip into the org (a reference in `clip_installs`, not a
|
|
65781
|
+
* copy). Idempotent: installing an already-installed clip returns the same
|
|
65782
|
+
* `200 {ok:true}`. Fails closed with `403 CLIP_NOT_APPROVED` when the clip is
|
|
65783
|
+
* not eligible (cross-org requires public + approved).
|
|
65784
|
+
*/
|
|
65785
|
+
async installRegistryClip(orgId, clipId) {
|
|
65786
|
+
return this.request("POST", ENDPOINTS.ORG_CLIP_INSTALL(orgId), { clip_id: clipId });
|
|
65787
|
+
}
|
|
65788
|
+
/** List the org's installed registry clips (full entries). */
|
|
65789
|
+
async listInstalledRegistryClips(orgId) {
|
|
65790
|
+
const resp = await this.request("GET", ENDPOINTS.ORG_CLIPS_INSTALLED(orgId));
|
|
65791
|
+
return resp ?? [];
|
|
65792
|
+
}
|
|
65715
65793
|
// ---- Edge devices ----
|
|
65716
65794
|
async listEdgeDevices(orgId) {
|
|
65717
65795
|
return this.request("GET", ENDPOINTS.ORG_EDGE_DEVICES(orgId));
|
|
@@ -65729,8 +65807,8 @@ var ParallClient = class _ParallClient {
|
|
|
65729
65807
|
return this.request("POST", ENDPOINTS.ORG_EDGE(orgId), input);
|
|
65730
65808
|
}
|
|
65731
65809
|
/**
|
|
65732
|
-
* Delete a hosted Cloud Profile. Hosted only —
|
|
65733
|
-
*
|
|
65810
|
+
* Delete a hosted Cloud Profile. Hosted only — use {@link unregisterEdgeDevice}
|
|
65811
|
+
* for an offline BYOC registration (`400 EDGE_PLACEMENT_UNSUPPORTED` here).
|
|
65734
65812
|
*
|
|
65735
65813
|
* Idempotent and ASYNC: returns `202` with `hosted_state: 'deleting'` on the first
|
|
65736
65814
|
* call and on every repeat. The device stops being usable immediately (no exec, no
|
|
@@ -65740,12 +65818,105 @@ var ParallClient = class _ParallClient {
|
|
|
65740
65818
|
async deleteEdgeDevice(orgId, edgeId) {
|
|
65741
65819
|
return this.request("DELETE", ENDPOINTS.ORG_EDGE_DEVICE(orgId, edgeId));
|
|
65742
65820
|
}
|
|
65821
|
+
/**
|
|
65822
|
+
* Remove the interactive human caller's own offline BYOC registration.
|
|
65823
|
+
*
|
|
65824
|
+
* Synchronous and idempotent: a committed removal and a repeat after removal
|
|
65825
|
+
* both resolve with no response body. A live connection returns `EDGE_ONLINE`;
|
|
65826
|
+
* callers must not clear local device identity until this method resolves.
|
|
65827
|
+
*/
|
|
65828
|
+
async unregisterEdgeDevice(orgId, edgeId) {
|
|
65829
|
+
await this.request("DELETE", ENDPOINTS.ORG_EDGE_DEVICE_UNREGISTER(orgId, edgeId));
|
|
65830
|
+
}
|
|
65743
65831
|
async getEdgeOnboarding(orgId) {
|
|
65744
65832
|
return this.request("GET", ENDPOINTS.ORG_EDGE_ONBOARDING(orgId));
|
|
65745
65833
|
}
|
|
65746
65834
|
async listEdgeProfiles(orgId, edgeId) {
|
|
65747
65835
|
return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILES(orgId, edgeId));
|
|
65748
65836
|
}
|
|
65837
|
+
/**
|
|
65838
|
+
* Read a hosted Cloud Profile's egress-proxy status (manager-only: hosted
|
|
65839
|
+
* human maintainer or org admin). Sanitized — the password never comes back.
|
|
65840
|
+
* Typed errors: `EDGE_NOT_HOSTED` (BYOC device), `PROXY_CONFIG_CORRUPT` /
|
|
65841
|
+
* validation codes as 422 when a stored config no longer passes current rules.
|
|
65842
|
+
* `can_mutate` and `lease_status` are the authoritative idle gate; device
|
|
65843
|
+
* list status is not a substitute.
|
|
65844
|
+
*/
|
|
65845
|
+
async getEdgeProfileProxy(orgId, edgeId, profileName) {
|
|
65846
|
+
return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName));
|
|
65847
|
+
}
|
|
65848
|
+
/**
|
|
65849
|
+
* Set/replace the profile's egress proxy (full triple every time) — IDLE
|
|
65850
|
+
* ONLY: while the profile's hosted browser is running (a viewer session is
|
|
65851
|
+
* open or a pod is otherwise live) the server answers 409
|
|
65852
|
+
* `EDGE_PROFILE_IN_USE`; close the viewer, wait for idle scale-to-zero, and
|
|
65853
|
+
* retry. The next cold start uses the new egress; browser login state is
|
|
65854
|
+
* preserved across it. Other typed errors: the validation vocabulary
|
|
65855
|
+
* (`INVALID_PROXY_SERVER`, `PROXY_AUTH_INCOMPLETE`,
|
|
65856
|
+
* `PROXY_SERVER_FORBIDDEN_TARGET`, …), `EDGE_DELETING` (409), and
|
|
65857
|
+
* `SECRETBOX_UNCONFIGURED` (503 — server cannot store credentials safely),
|
|
65858
|
+
* and `EDGE_PROFILE_PROXY_STALE` (409 — expectedVersion lost a tab race).
|
|
65859
|
+
*/
|
|
65860
|
+
async setEdgeProfileProxy(orgId, edgeId, profileName, req, expectedVersion) {
|
|
65861
|
+
return this.request("PUT", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName), req, void 0, false, {
|
|
65862
|
+
headers: expectedVersion ? { "If-Match": `"proxy-${expectedVersion}"` } : void 0
|
|
65863
|
+
});
|
|
65864
|
+
}
|
|
65865
|
+
/**
|
|
65866
|
+
* Clear the profile's egress proxy; the next pod start egresses directly.
|
|
65867
|
+
* Idle-only like set — 409 `EDGE_PROFILE_IN_USE` while the browser is live.
|
|
65868
|
+
*/
|
|
65869
|
+
async clearEdgeProfileProxy(orgId, edgeId, profileName, expectedVersion) {
|
|
65870
|
+
return this.request("DELETE", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName), void 0, void 0, false, {
|
|
65871
|
+
headers: expectedVersion ? { "If-Match": `"proxy-${expectedVersion}"` } : void 0
|
|
65872
|
+
});
|
|
65873
|
+
}
|
|
65874
|
+
/**
|
|
65875
|
+
* Execute a registry clip command on an Edge device.
|
|
65876
|
+
*
|
|
65877
|
+
* A hosted (Cloud Profile) device is reachable ONLY through an explicit
|
|
65878
|
+
* `connection` (id `ccn_…` or alias) — there is no implicit route to an
|
|
65879
|
+
* org-shared browser login. BYOC keeps its legacy selectors (`edge_id`, or
|
|
65880
|
+
* nothing for the caller's own online device).
|
|
65881
|
+
*
|
|
65882
|
+
* Returns the result envelope on completion (`success` may be false when the
|
|
65883
|
+
* command RAN and failed — `error`/`error_code` describe why). Everything
|
|
65884
|
+
* else throws a typed {@link ApiError}; match on `err.code`:
|
|
65885
|
+
*
|
|
65886
|
+
* Safe to retry (guaranteed nothing was dispatched):
|
|
65887
|
+
* - `EDGE_ACTIVATING` 503 + `Retry-After` — cold cloud profile is starting.
|
|
65888
|
+
* Bounded backoff, same `correlation_id` across the loop.
|
|
65889
|
+
* - `EDGE_BUSY` 409 — the device is executing another request.
|
|
65890
|
+
* - `EDGE_CONCURRENCY_LIMIT` 429 — org at its concurrent-session limit.
|
|
65891
|
+
* - `EDGE_UNAVAILABLE` 503 — session torn down / replaced mid-dispatch.
|
|
65892
|
+
*
|
|
65893
|
+
* NOT retryable:
|
|
65894
|
+
* - `OUTCOME_UNKNOWN` 504 — dispatched, but no result arrived. The command
|
|
65895
|
+
* MAY HAVE EXECUTED (posted, ordered, deleted…). Never retry
|
|
65896
|
+
* automatically: verify the effect first, then decide. The message carries
|
|
65897
|
+
* the request id for audit.
|
|
65898
|
+
* - `EDGE_DEADLINE_EXCEEDED` 504 — arrived late, provably NOT executed.
|
|
65899
|
+
* - `EDGE_HOSTED_DISABLED_FOR_ORG` 403, `EDGE_REPAIR` 503 (operator-held),
|
|
65900
|
+
* `EDGE_RUNTIME_UNAVAILABLE` 503 (deployment has no hosted runtime).
|
|
65901
|
+
* - Routing errors: `HOSTED_CONNECTION_REQUIRED`, `CONNECTION_NOT_FOUND`,
|
|
65902
|
+
* `CONNECTION_CLIP_MISMATCH`, `CONNECTION_TARGET_GONE`,
|
|
65903
|
+
* `CONNECTION_PROFILE_MISMATCH`, `EDGE_DELETING`, `DEVICE_OFFLINE`.
|
|
65904
|
+
*/
|
|
65905
|
+
async execEdgeClip(orgId, req) {
|
|
65906
|
+
const t = req.timeout;
|
|
65907
|
+
const serverTimeout = t !== void 0 && t > 0 && t <= 12e4 ? t : 3e4;
|
|
65908
|
+
const timeoutMs = serverTimeout + 1e4;
|
|
65909
|
+
try {
|
|
65910
|
+
return await this.request("POST", ENDPOINTS.ORG_EDGE_EXEC(orgId), req, void 0, false, {
|
|
65911
|
+
timeoutMs
|
|
65912
|
+
});
|
|
65913
|
+
} catch (err) {
|
|
65914
|
+
if (err instanceof ApiError && err.status === 422 && !err.code && typeof err.extras?.error_code === "string") {
|
|
65915
|
+
err.code = err.extras.error_code;
|
|
65916
|
+
}
|
|
65917
|
+
throw err;
|
|
65918
|
+
}
|
|
65919
|
+
}
|
|
65749
65920
|
// ---- Clip connections ----
|
|
65750
65921
|
async listClipConnections(orgId, clipId) {
|
|
65751
65922
|
return this.request("GET", ENDPOINTS.CLIP_CONNECTIONS(orgId, clipId));
|
|
@@ -65768,6 +65939,8 @@ var ApiError = class extends Error {
|
|
|
65768
65939
|
status;
|
|
65769
65940
|
code;
|
|
65770
65941
|
extras;
|
|
65942
|
+
/** Retry-After delta seconds when the server supplies one. */
|
|
65943
|
+
retryAfterSeconds;
|
|
65771
65944
|
/** Attempted action (authorization denials) — e.g. "chat.add_member". */
|
|
65772
65945
|
action;
|
|
65773
65946
|
/** Target resource URI that was evaluated — e.g. "prll://cht_…". */
|
|
@@ -65787,6 +65960,9 @@ function buildApiError(res, rawErrorBody) {
|
|
|
65787
65960
|
const errMsg2 = (typeof errorObj?.message === "string" ? errorObj.message : void 0) ?? (typeof errorBody.message === "string" ? errorBody.message : void 0) ?? (typeof errorBody.error === "string" ? errorBody.error : void 0);
|
|
65788
65961
|
const errCode = (typeof errorObj?.code === "string" ? errorObj.code : void 0) ?? (typeof errorBody.code === "string" ? errorBody.code : void 0);
|
|
65789
65962
|
const apiError = new ApiError(res.status, errMsg2 ?? res.statusText, errCode);
|
|
65963
|
+
const retryAfter = Number(res.headers?.get("Retry-After"));
|
|
65964
|
+
if (Number.isFinite(retryAfter) && retryAfter > 0)
|
|
65965
|
+
apiError.retryAfterSeconds = retryAfter;
|
|
65790
65966
|
const anchors = errorObj ?? errorBody;
|
|
65791
65967
|
if (typeof anchors.action === "string")
|
|
65792
65968
|
apiError.action = anchors.action;
|