@parall/daemon 1.37.0 → 1.39.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.
@@ -112,6 +112,13 @@ var init_types = __esm({
112
112
  }
113
113
  });
114
114
 
115
+ // ts/agent-core/dist/lane-key.js
116
+ var init_lane_key = __esm({
117
+ "ts/agent-core/dist/lane-key.js"() {
118
+ "use strict";
119
+ }
120
+ });
121
+
115
122
  // ts/agent-core/dist/session-state.js
116
123
  var init_session_state = __esm({
117
124
  "ts/agent-core/dist/session-state.js"() {
@@ -450,6 +457,11 @@ var init_constants = __esm({
450
457
  DISPATCH_ACK_BY_ID: (orgId, id) => `${API_BASE}/orgs/${orgId}/dispatch/${id}/ack`,
451
458
  DISPATCH_EXPIRE: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/expire`,
452
459
  DISPATCH_BY_MESSAGES: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/by-messages`,
460
+ DISPATCH_CLAIM: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/claim`,
461
+ DISPATCH_STEER: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/steer`,
462
+ DISPATCH_COMPLETE: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/complete`,
463
+ DISPATCH_RELEASE: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/release`,
464
+ DISPATCH_HEARTBEAT: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/heartbeat`,
453
465
  // Unread
454
466
  UNREAD: `${API_BASE}/me/unread`,
455
467
  ORG_UNREAD: (orgId) => `${API_BASE}/orgs/${orgId}/unread`,
@@ -511,7 +523,13 @@ var init_constants = __esm({
511
523
  // the machine control-plane request/reply bridge that lives in api-server.
512
524
  BROWSER_PROFILE_VIEWER_COMMAND: (orgId, profileId) => `${API_BASE}/orgs/${orgId}/browser-profiles/${profileId}/viewer/command`,
513
525
  // Clip registry (global, served by clip-service → Pinix Hub proxy)
514
- CLIP_REGISTRY: () => `${CLIP_BASE}/registry/clips`
526
+ CLIP_REGISTRY: () => `${CLIP_BASE}/registry/clips`,
527
+ // Edge device endpoints
528
+ ORG_EDGE_DEVICES: (orgId) => `/api/v1/orgs/${orgId}/edge/devices`,
529
+ ORG_EDGE_ONBOARDING: (orgId) => `/api/v1/orgs/${orgId}/edge/onboarding`,
530
+ ORG_EDGE_PROFILES: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
531
+ CLIP_CONNECTIONS: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/connections`,
532
+ CLIP_CONNECTION: (orgId, connId) => `/api/v1/orgs/${orgId}/clip-connections/${connId}`
515
533
  };
516
534
  WS_EVENTS = {
517
535
  // Client -> Server
@@ -570,6 +588,7 @@ var init_constants = __esm({
570
588
  READ_POSITION_UPDATED: "read_position.updated",
571
589
  DISPATCH_NEW: "dispatch.new",
572
590
  DISPATCH_RECEIVED: "dispatch.received",
591
+ DISPATCH_RESOLVED: "dispatch.resolved",
573
592
  SCHEDULE_CREATED: "schedule.created",
574
593
  SCHEDULE_UPDATED: "schedule.updated",
575
594
  SCHEDULE_DELETED: "schedule.deleted",
@@ -819,6 +838,7 @@ var init_client = __esm({
819
838
  const rawErrorBody = await res.json().catch(() => ({}));
820
839
  throw buildApiError(res, rawErrorBody);
821
840
  }
841
+ opts?.onStatus?.(res.status);
822
842
  if (res.status === 204)
823
843
  return void 0;
824
844
  if (res.status === 202) {
@@ -1152,6 +1172,21 @@ var init_client = __esm({
1152
1172
  async sendMessage(orgId, chatId, req) {
1153
1173
  return this.request("POST", ENDPOINTS.CHAT_MESSAGES(orgId, chatId), req);
1154
1174
  }
1175
+ /**
1176
+ * sendMessage variant that also reports whether the server answered with an
1177
+ * idempotent replay (HTTP 200 — the message already existed for this
1178
+ * idempotency/effect key) instead of a fresh create (201). Used by the CLI
1179
+ * to surface "already sent by a previous run (deduplicated)".
1180
+ */
1181
+ async sendMessageDetailed(orgId, chatId, req) {
1182
+ let status = 0;
1183
+ const message = await this.request("POST", ENDPOINTS.CHAT_MESSAGES(orgId, chatId), req, void 0, false, {
1184
+ onStatus: (s) => {
1185
+ status = s;
1186
+ }
1187
+ });
1188
+ return { message, deduplicated: status === 200 };
1189
+ }
1155
1190
  async getMessages(orgId, chatId, params) {
1156
1191
  return this.request("GET", ENDPOINTS.CHAT_MESSAGES(orgId, chatId), void 0, params);
1157
1192
  }
@@ -1613,6 +1648,30 @@ var init_client = __esm({
1613
1648
  const params = maxAgeHours !== void 0 ? { max_age_hours: String(maxAgeHours) } : void 0;
1614
1649
  return this.request("POST", ENDPOINTS.DISPATCH_EXPIRE(orgId), void 0, params);
1615
1650
  }
1651
+ /**
1652
+ * Claim a dispatch lane (explicit consume endpoint). Occupies the
1653
+ * (agent, target, thread) lane and folds claimable WorkItems into it;
1654
+ * `claimed: false` means a healthy incumbent holds the lane.
1655
+ */
1656
+ async claimDispatch(orgId, req) {
1657
+ return this.request("POST", ENDPOINTS.DISPATCH_CLAIM(orgId), req);
1658
+ }
1659
+ /** Fold a pending same-target WorkItem into a live lane (409 STALE_LANE when dethroned). */
1660
+ async steerDispatch(orgId, req) {
1661
+ return this.request("POST", ENDPOINTS.DISPATCH_STEER(orgId), req);
1662
+ }
1663
+ /** End a turn: no_action sweep of the lane's members + lane release + re-drive check. */
1664
+ async completeDispatch(orgId, req) {
1665
+ return this.request("POST", ENDPOINTS.DISPATCH_COMPLETE(orgId), req);
1666
+ }
1667
+ /** Release a lane on graceful shutdown — members return to pending immediately. */
1668
+ async releaseDispatchLane(orgId, lane) {
1669
+ return this.request("POST", ENDPOINTS.DISPATCH_RELEASE(orgId), { lane });
1670
+ }
1671
+ /** Renew a live lane's lease (long-turn keepalive). 409 STALE_LANE when dethroned. */
1672
+ async heartbeatDispatchLane(orgId, req) {
1673
+ return this.request("POST", ENDPOINTS.DISPATCH_HEARTBEAT(orgId), req);
1674
+ }
1616
1675
  async getDispatchByMessages(orgId, chatId, messageIds) {
1617
1676
  const params = { chat_id: chatId, message_ids: messageIds.join(",") };
1618
1677
  return this.request("GET", ENDPOINTS.DISPATCH_BY_MESSAGES(orgId), void 0, params);
@@ -2340,6 +2399,26 @@ var init_client = __esm({
2340
2399
  const resp = await this.request("GET", url);
2341
2400
  return resp.data;
2342
2401
  }
2402
+ // ---- Edge devices ----
2403
+ async listEdgeDevices(orgId) {
2404
+ return this.request("GET", ENDPOINTS.ORG_EDGE_DEVICES(orgId));
2405
+ }
2406
+ async getEdgeOnboarding(orgId) {
2407
+ return this.request("GET", ENDPOINTS.ORG_EDGE_ONBOARDING(orgId));
2408
+ }
2409
+ async listEdgeProfiles(orgId, edgeId) {
2410
+ return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILES(orgId, edgeId));
2411
+ }
2412
+ // ---- Clip connections ----
2413
+ async listClipConnections(orgId, clipId) {
2414
+ return this.request("GET", ENDPOINTS.CLIP_CONNECTIONS(orgId, clipId));
2415
+ }
2416
+ async createClipConnection(orgId, clipId, input) {
2417
+ return this.request("POST", ENDPOINTS.CLIP_CONNECTIONS(orgId, clipId), input);
2418
+ }
2419
+ async deleteClipConnection(orgId, connId) {
2420
+ return this.request("DELETE", ENDPOINTS.CLIP_CONNECTION(orgId, connId));
2421
+ }
2343
2422
  };
2344
2423
  ApiError = class extends Error {
2345
2424
  status;
@@ -2712,6 +2791,23 @@ var init_dist = __esm({
2712
2791
  }
2713
2792
  });
2714
2793
 
2794
+ // ts/agent-core/dist/lane-ledger.js
2795
+ var init_lane_ledger = __esm({
2796
+ "ts/agent-core/dist/lane-ledger.js"() {
2797
+ "use strict";
2798
+ init_dist();
2799
+ init_lane_key();
2800
+ }
2801
+ });
2802
+
2803
+ // ts/agent-core/dist/gateway-lane-flow.js
2804
+ var init_gateway_lane_flow = __esm({
2805
+ "ts/agent-core/dist/gateway-lane-flow.js"() {
2806
+ "use strict";
2807
+ init_lane_ledger();
2808
+ }
2809
+ });
2810
+
2715
2811
  // ts/node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/version.js
2716
2812
  var VERSION;
2717
2813
  var init_version = __esm({
@@ -29254,6 +29350,8 @@ var init_gateway_base = __esm({
29254
29350
  "use strict";
29255
29351
  init_dist();
29256
29352
  init_event_format();
29353
+ init_gateway_lane_flow();
29354
+ init_lane_ledger();
29257
29355
  init_routing();
29258
29356
  init_session_state();
29259
29357
  init_bridge_workspace();
@@ -29335,6 +29433,7 @@ var init_dist2 = __esm({
29335
29433
  "use strict";
29336
29434
  init_provider_config();
29337
29435
  init_types();
29436
+ init_lane_key();
29338
29437
  init_session_state();
29339
29438
  init_routing();
29340
29439
  init_event_format();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/daemon",
3
- "version": "1.37.0",
3
+ "version": "1.39.0",
4
4
  "description": "Parall local agent runtime — daemon supervisor + bridge runtimes, bundled as standalone JS files",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,11 +32,11 @@
32
32
  "dependencies": {
33
33
  "@aws-sdk/client-s3": "3.984.0",
34
34
  "@pinixai/bb-browser-pro": "0.15.0",
35
- "@parall/agent-core": "1.37.0",
36
- "@parall/sdk": "1.37.0",
37
- "@parall/claude-agent": "1.37.0",
38
- "@parall/codex-agent": "1.37.0",
39
- "@parall/openclaw-agent": "1.37.0"
35
+ "@parall/agent-core": "1.39.0",
36
+ "@parall/claude-agent": "1.39.0",
37
+ "@parall/openclaw-agent": "1.39.0",
38
+ "@parall/codex-agent": "1.39.0",
39
+ "@parall/sdk": "1.39.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^22.0.0",