@parall/parall 1.48.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.
@@ -51349,6 +51349,8 @@ var ENDPOINTS = {
51349
51349
  MESSAGE_WATCH: (id) => `${API_BASE}/messages/${id}/watch`,
51350
51350
  MESSAGE_WATCHERS: (id) => `${API_BASE}/messages/${id}/watchers`,
51351
51351
  MESSAGE_WATCHING: (id) => `${API_BASE}/messages/${id}/watching`,
51352
+ MESSAGE_REACTIONS: (id) => `${API_BASE}/messages/${id}/reactions`,
51353
+ MESSAGE_REACTION: (id, emoji) => `${API_BASE}/messages/${id}/reactions/${encodeURIComponent(emoji)}`,
51352
51354
  // Upload (org-scoped)
51353
51355
  UPLOAD_PRESIGN: (orgId) => `${API_BASE}/orgs/${orgId}/upload/presign`,
51354
51356
  UPLOAD_COMPLETE: (orgId) => `${API_BASE}/orgs/${orgId}/upload/complete`,
@@ -51586,11 +51588,13 @@ var ENDPOINTS = {
51586
51588
  UNREAD: `${API_BASE}/me/unread`,
51587
51589
  ORG_UNREAD: (orgId) => `${API_BASE}/orgs/${orgId}/unread`,
51588
51590
  CHAT_READ: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read`,
51591
+ CHAT_READ_ALL: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read-all`,
51589
51592
  THREAD_UNREAD: (orgId, chatId, threadRootId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/unread`,
51590
51593
  THREAD_READ: (orgId, chatId, threadRootId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/read`,
51591
51594
  // References (org-scoped)
51592
51595
  REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
51593
51596
  REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
51597
+ REFS_OUTBOUND: (orgId) => `${API_BASE}/orgs/${orgId}/refs/outbound`,
51594
51598
  REFS_GRAPH: (orgId) => `${API_BASE}/orgs/${orgId}/refs/graph`,
51595
51599
  REFS_CHECK: (orgId) => `${API_BASE}/orgs/${orgId}/refs/check`,
51596
51600
  // Platform config (agent-scoped, not org-scoped)
@@ -51652,7 +51656,13 @@ var ENDPOINTS = {
51652
51656
  ORG_EDGE_DEVICE_UNREGISTER: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/unregister`,
51653
51657
  ORG_EDGE_ONBOARDING: (orgId) => `/api/v1/orgs/${orgId}/edge/onboarding`,
51654
51658
  ORG_EDGE_PROFILES: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
51659
+ // Per-profile egress proxy (hosted Cloud Profiles; manager-only, human-only).
51660
+ ORG_EDGE_PROFILE_PROXY: (orgId, edgeId, profileName) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles/${encodeURIComponent(profileName)}/proxy`,
51655
51661
  ORG_EDGE_EXEC: (orgId) => `/api/v1/orgs/${orgId}/edge/exec`,
51662
+ // Cloud Edge live viewer command (V1b) — api-server, gated on cap:edge-viewer.
51663
+ // Same request/reply shape as the v2 browser-profile viewer, on the v3 edge
51664
+ // pipe. Additive: does NOT replace BROWSER_PROFILE_VIEWER_COMMAND.
51665
+ ORG_EDGE_VIEWER_COMMAND: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/viewer/command`,
51656
51666
  CLIP_CONNECTIONS: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/connections`,
51657
51667
  CLIP_CONNECTION: (orgId, connId) => `/api/v1/orgs/${orgId}/clip-connections/${connId}`,
51658
51668
  // Clip registry (v3, org-scoped, served by api-server — `crg_` entries; the
@@ -51675,6 +51685,7 @@ var WS_EVENTS = {
51675
51685
  MESSAGE_PATCH: "message.patch",
51676
51686
  MESSAGE_EDIT: "message.edit",
51677
51687
  MESSAGE_DELETE: "message.delete",
51688
+ MESSAGE_REACTION_UPDATED: "message.reaction.updated",
51678
51689
  TYPING_UPDATE: "typing.update",
51679
51690
  CHAT_UPDATE: "chat.update",
51680
51691
  CHAT_DELETED: "chat.deleted",
@@ -51716,6 +51727,7 @@ var WS_EVENTS = {
51716
51727
  INBOX_UPDATE: "inbox.update",
51717
51728
  INBOX_BULK_UPDATE: "inbox.bulk_update",
51718
51729
  READ_POSITION_UPDATED: "read_position.updated",
51730
+ THREAD_READ_POSITION_UPDATED: "thread_read_position.updated",
51719
51731
  DISPATCH_NEW: "dispatch.new",
51720
51732
  DISPATCH_RECEIVED: "dispatch.received",
51721
51733
  DISPATCH_RESOLVED: "dispatch.resolved",
@@ -51901,7 +51913,7 @@ var ParallClient = class _ParallClient {
51901
51913
  if (qs)
51902
51914
  url += `?${qs}`;
51903
51915
  }
51904
- const headers = this.buildHeaders(path9);
51916
+ const headers = this.buildHeaders(path9, opts?.headers);
51905
51917
  const timeoutSignal = AbortSignal.timeout(opts?.timeoutMs ?? 15e3);
51906
51918
  const signal = opts?.signal ? AbortSignal.any([opts.signal, timeoutSignal]) : timeoutSignal;
51907
51919
  let res;
@@ -52307,6 +52319,14 @@ var ParallClient = class _ParallClient {
52307
52319
  async getMessageReplies(id, params) {
52308
52320
  return this.request("GET", ENDPOINTS.MESSAGE_REPLIES(id), void 0, params);
52309
52321
  }
52322
+ // ---- Reactions ----
52323
+ async toggleReaction(messageId, emoji) {
52324
+ return this.request("PUT", ENDPOINTS.MESSAGE_REACTION(messageId, emoji));
52325
+ }
52326
+ async listReactions(messageId) {
52327
+ const res = await this.request("GET", ENDPOINTS.MESSAGE_REACTIONS(messageId));
52328
+ return res.reactions;
52329
+ }
52310
52330
  // ---- File Upload ----
52311
52331
  async getUploadPresignUrl(orgId, req) {
52312
52332
  return this.request("POST", ENDPOINTS.UPLOAD_PRESIGN(orgId), req);
@@ -52682,6 +52702,15 @@ var ParallClient = class _ParallClient {
52682
52702
  async browserViewerCommand(orgId, profileId, req, opts) {
52683
52703
  return this.request("POST", ENDPOINTS.BROWSER_PROFILE_VIEWER_COMMAND(orgId, profileId), req, void 0, false, opts);
52684
52704
  }
52705
+ /**
52706
+ * Drive the Cloud Edge live viewer (V1b, design §6): WebRTC signaling + input +
52707
+ * tab nav for a hosted browser (Cloud Profile). Same request/reply shape as
52708
+ * browserViewerCommand, on the v3 edge pipe; additive — the v2 browser-profile
52709
+ * viewer is unchanged.
52710
+ */
52711
+ async edgeViewerCommand(orgId, edgeId, req, opts) {
52712
+ return this.request("POST", ENDPOINTS.ORG_EDGE_VIEWER_COMMAND(orgId, edgeId), req, void 0, false, opts);
52713
+ }
52685
52714
  async resizeMachine(orgId, machineId, spec) {
52686
52715
  return this.request("PATCH", ENDPOINTS.MACHINE_SPEC(orgId, machineId), spec);
52687
52716
  }
@@ -52708,14 +52737,23 @@ var ParallClient = class _ParallClient {
52708
52737
  }
52709
52738
  // Wiki mount/token methods removed — wiki-service handles all wiki endpoints.
52710
52739
  // ---- Unread ----
52711
- async getUnreadCounts(orgId) {
52740
+ async getUnreadCounts(orgId, opts) {
52712
52741
  const endpoint = orgId ? ENDPOINTS.ORG_UNREAD(orgId) : ENDPOINTS.UNREAD;
52713
- const res = await this.request("GET", endpoint);
52742
+ const res = await this.request("GET", endpoint, void 0, {
52743
+ include_thread_replies: opts?.includeThreadReplies ? "true" : void 0
52744
+ });
52714
52745
  return res.data;
52715
52746
  }
52716
52747
  async markRead(orgId, chatId, messageId) {
52717
52748
  return this.request("POST", ENDPOINTS.CHAT_READ(orgId, chatId), { message_id: messageId });
52718
52749
  }
52750
+ /** Mark everything in a chat read: the channel cursor jumps to the latest
52751
+ * top-level message and every thread cursor to its latest reply, in one
52752
+ * idempotent call. The server echoes the same per-cursor WS events the
52753
+ * single-cursor routes emit and auto-clears covered inbox items. */
52754
+ async markAllRead(orgId, chatId) {
52755
+ return this.request("POST", ENDPOINTS.CHAT_READ_ALL(orgId, chatId));
52756
+ }
52719
52757
  async getThreadUnread(orgId, chatId, threadRootId) {
52720
52758
  return this.request("GET", ENDPOINTS.THREAD_UNREAD(orgId, chatId, threadRootId));
52721
52759
  }
@@ -53390,6 +53428,16 @@ var ParallClient = class _ParallClient {
53390
53428
  async getBacklinks(orgId, params) {
53391
53429
  return this.request("GET", ENDPOINTS.REFS_BACKLINKS(orgId), void 0, params);
53392
53430
  }
53431
+ /**
53432
+ * Outbound prll:// refs authored in a set of sources, as raw ref_links rows
53433
+ * (dedupe/group client-side). Pass `{ thread_root_id }` to list a whole
53434
+ * thread's refs (root + all replies, resolved server-side — the client's
53435
+ * reply window may be partial), or `{ source_type, source_ids }` for
53436
+ * explicit sources (max 500; v1 accepts only message sources).
53437
+ */
53438
+ async listOutboundRefs(orgId, req) {
53439
+ return this.request("POST", ENDPOINTS.REFS_OUTBOUND(orgId), req);
53440
+ }
53393
53441
  /**
53394
53442
  * Bounded multi-hop walk of the prll:// reference graph around `uri`. `uri`
53395
53443
  * must be an entity-level prll:// URI — a refined URI (path/query/fragment) is
@@ -53669,6 +53717,43 @@ var ParallClient = class _ParallClient {
53669
53717
  async listEdgeProfiles(orgId, edgeId) {
53670
53718
  return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILES(orgId, edgeId));
53671
53719
  }
53720
+ /**
53721
+ * Read a hosted Cloud Profile's egress-proxy status (manager-only: hosted
53722
+ * human maintainer or org admin). Sanitized — the password never comes back.
53723
+ * Typed errors: `EDGE_NOT_HOSTED` (BYOC device), `PROXY_CONFIG_CORRUPT` /
53724
+ * validation codes as 422 when a stored config no longer passes current rules.
53725
+ * `can_mutate` and `lease_status` are the authoritative idle gate; device
53726
+ * list status is not a substitute.
53727
+ */
53728
+ async getEdgeProfileProxy(orgId, edgeId, profileName) {
53729
+ return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName));
53730
+ }
53731
+ /**
53732
+ * Set/replace the profile's egress proxy (full triple every time) — IDLE
53733
+ * ONLY: while the profile's hosted browser is running (a viewer session is
53734
+ * open or a pod is otherwise live) the server answers 409
53735
+ * `EDGE_PROFILE_IN_USE`; close the viewer, wait for idle scale-to-zero, and
53736
+ * retry. The next cold start uses the new egress; browser login state is
53737
+ * preserved across it. Other typed errors: the validation vocabulary
53738
+ * (`INVALID_PROXY_SERVER`, `PROXY_AUTH_INCOMPLETE`,
53739
+ * `PROXY_SERVER_FORBIDDEN_TARGET`, …), `EDGE_DELETING` (409), and
53740
+ * `SECRETBOX_UNCONFIGURED` (503 — server cannot store credentials safely),
53741
+ * and `EDGE_PROFILE_PROXY_STALE` (409 — expectedVersion lost a tab race).
53742
+ */
53743
+ async setEdgeProfileProxy(orgId, edgeId, profileName, req, expectedVersion) {
53744
+ return this.request("PUT", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName), req, void 0, false, {
53745
+ headers: expectedVersion ? { "If-Match": `"proxy-${expectedVersion}"` } : void 0
53746
+ });
53747
+ }
53748
+ /**
53749
+ * Clear the profile's egress proxy; the next pod start egresses directly.
53750
+ * Idle-only like set — 409 `EDGE_PROFILE_IN_USE` while the browser is live.
53751
+ */
53752
+ async clearEdgeProfileProxy(orgId, edgeId, profileName, expectedVersion) {
53753
+ return this.request("DELETE", ENDPOINTS.ORG_EDGE_PROFILE_PROXY(orgId, edgeId, profileName), void 0, void 0, false, {
53754
+ headers: expectedVersion ? { "If-Match": `"proxy-${expectedVersion}"` } : void 0
53755
+ });
53756
+ }
53672
53757
  /**
53673
53758
  * Execute a registry clip command on an Edge device.
53674
53759
  *
@@ -53737,6 +53822,8 @@ var ApiError = class extends Error {
53737
53822
  status;
53738
53823
  code;
53739
53824
  extras;
53825
+ /** Retry-After delta seconds when the server supplies one. */
53826
+ retryAfterSeconds;
53740
53827
  /** Attempted action (authorization denials) — e.g. "chat.add_member". */
53741
53828
  action;
53742
53829
  /** Target resource URI that was evaluated — e.g. "prll://cht_…". */
@@ -53756,6 +53843,9 @@ function buildApiError(res, rawErrorBody) {
53756
53843
  const errMsg = (typeof errorObj?.message === "string" ? errorObj.message : void 0) ?? (typeof errorBody.message === "string" ? errorBody.message : void 0) ?? (typeof errorBody.error === "string" ? errorBody.error : void 0);
53757
53844
  const errCode = (typeof errorObj?.code === "string" ? errorObj.code : void 0) ?? (typeof errorBody.code === "string" ? errorBody.code : void 0);
53758
53845
  const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
53846
+ const retryAfter = Number(res.headers?.get("Retry-After"));
53847
+ if (Number.isFinite(retryAfter) && retryAfter > 0)
53848
+ apiError.retryAfterSeconds = retryAfter;
53759
53849
  const anchors = errorObj ?? errorBody;
53760
53850
  if (typeof anchors.action === "string")
53761
53851
  apiError.action = anchors.action;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/parall",
3
- "version": "1.48.0",
3
+ "version": "1.49.0",
4
4
  "description": "OpenClaw channel plugin for Parall IM",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  "openclaw.plugin.json"
17
17
  ],
18
18
  "dependencies": {
19
- "@parall/sdk": "1.48.0",
20
- "@parall/agent-core": "1.48.0"
19
+ "@parall/agent-core": "1.49.0",
20
+ "@parall/sdk": "1.49.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^22.0.0",
@@ -39,7 +39,7 @@ parall tasks list --assignee-id prll://usr_xxx # first page only (default 20)
39
39
  parall tasks subtasks prll://tsk_xxx # children of a single parent task
40
40
 
41
41
  # Create a task (add --parent-id to make it a SUBTASK of another task)
42
- parall tasks create --title "Task title" [--assignee-id prll://usr_xxx] [--parent-id prll://tsk_xxx] [--project-id prll://prj_xxx] [--due-date 2026-08-01]
42
+ parall tasks create --title "Task title" [--assignee-id prll://usr_xxx] [--parent-id prll://tsk_xxx] [--project-id prll://prj_xxx] [--planned-start 2026-07-20] [--due-date 2026-08-01]
43
43
 
44
44
  # Update task status — add --placement end so the task lands at the end of
45
45
  # its NEW status column (a bare --status keeps the old column's sort_order)
@@ -50,6 +50,12 @@ parall tasks update prll://tsk_xxx --status done --placement end
50
50
  parall tasks update prll://tsk_xxx --due-date 2026-08-01
51
51
  parall tasks update prll://tsk_xxx --due-date none
52
52
 
53
+ # Planned start — same grammar as --due-date; must be on or before the due
54
+ # date when both are set. This is the planned schedule's left-edge date,
55
+ # NOT when work actually began (that stays on lifecycle timestamps)
56
+ parall tasks update prll://tsk_xxx --planned-start 2026-07-20
57
+ parall tasks update prll://tsk_xxx --planned-start none
58
+
53
59
  # Move a task to the end of its status column
54
60
  parall tasks update prll://tsk_xxx --placement end
55
61