@parall/daemon 1.56.1 → 1.57.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.56.1",
3
- "built_at": "2026-08-20T15:59:41.375Z",
2
+ "version": "1.57.1",
3
+ "built_at": "2026-08-23T15:43:08.791Z",
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": "29465ed25d7eaa9f7f6e35345f0501594fafa0c885a4ad8bc9712aa6a20fac6b",
20
- "size": 2961071
19
+ "sha256": "1d1a58c7887c3cc0b1adf424f1a0f1a1f1203a1fa960226b8a4f51d07ac6d224",
20
+ "size": 2967901
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": "4ccbdb9f93cb2adeea7313b4391c471c0df150a185fb91b439c59274abfff506",
28
- "size": 2838235
27
+ "sha256": "0955733acf00be0b690bb5c1b72f3bfd939d746b23a301c84272ba37e9b0834e",
28
+ "size": 2847527
29
29
  },
30
30
  "parall-codex-agent.js": {
31
- "sha256": "a0dd40e7a27785f60ca8fff9a1c158203f5381447223dad3374811ec22ca1da5",
32
- "size": 2870182
31
+ "sha256": "edd30679e40834d7af752650b250e44ad9476969de446b5fdfbdef46df366a77",
32
+ "size": 2879474
33
33
  },
34
34
  "parall-daemon.js": {
35
- "sha256": "0f149f68323a5013c1afc5ddc3de6f1cd94b5005dac905ac2142f85fe7987ee9",
36
- "size": 3028253
35
+ "sha256": "48ad3e0c78a2abd16b23a6fb370da97b339b328f45debae69d0c07bb5438f545",
36
+ "size": 3036196
37
37
  },
38
38
  "parall-openclaw-agent.js": {
39
39
  "sha256": "856a1c3a9ae0ffef8efe2481fa1171dbeb1d67cccb88616aa9bf16da96a69355",
40
40
  "size": 9923
41
41
  }
42
42
  },
43
- "signature": "rveWOLf71C0Rr6tMca/y0AlIm7l2yLQIUbgJABu5NEz0TLXgWVhymuNYkGDKMhx0aztrea064KwfTBa8rk3JCA=="
43
+ "signature": "b1L2thmtzkfAijbNPw/2P8+gdqd86Bg2VDpBoC6gnlNALDH9Ta1E9IPEn1w8fPSnBPARX+AfPYseSdkKL8DnBQ=="
44
44
  }
@@ -18360,7 +18360,7 @@ var require_response = __commonJS({
18360
18360
  var assert = __require("node:assert");
18361
18361
  var { isomorphicEncode, serializeJavascriptValueToJSONString } = require_infra();
18362
18362
  var textEncoder = new TextEncoder("utf-8");
18363
- var Response = class _Response {
18363
+ var Response2 = class _Response {
18364
18364
  /** @type {Headers} */
18365
18365
  #headers;
18366
18366
  #state;
@@ -18532,13 +18532,13 @@ var require_response = __commonJS({
18532
18532
  response.#state = newState;
18533
18533
  }
18534
18534
  };
18535
- var { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response;
18536
- Reflect.deleteProperty(Response, "getResponseHeaders");
18537
- Reflect.deleteProperty(Response, "setResponseHeaders");
18538
- Reflect.deleteProperty(Response, "getResponseState");
18539
- Reflect.deleteProperty(Response, "setResponseState");
18540
- mixinBody(Response, getResponseState);
18541
- Object.defineProperties(Response.prototype, {
18535
+ var { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response2;
18536
+ Reflect.deleteProperty(Response2, "getResponseHeaders");
18537
+ Reflect.deleteProperty(Response2, "setResponseHeaders");
18538
+ Reflect.deleteProperty(Response2, "getResponseState");
18539
+ Reflect.deleteProperty(Response2, "setResponseState");
18540
+ mixinBody(Response2, getResponseState);
18541
+ Object.defineProperties(Response2.prototype, {
18542
18542
  type: kEnumerableProperty,
18543
18543
  url: kEnumerableProperty,
18544
18544
  status: kEnumerableProperty,
@@ -18554,7 +18554,7 @@ var require_response = __commonJS({
18554
18554
  configurable: true
18555
18555
  }
18556
18556
  });
18557
- Object.defineProperties(Response, {
18557
+ Object.defineProperties(Response2, {
18558
18558
  json: kEnumerableProperty,
18559
18559
  redirect: kEnumerableProperty,
18560
18560
  error: kEnumerableProperty
@@ -18687,7 +18687,7 @@ var require_response = __commonJS({
18687
18687
  }
18688
18688
  }
18689
18689
  function fromInnerResponse(innerResponse, guard) {
18690
- const response = new Response(kConstruct);
18690
+ const response = new Response2(kConstruct);
18691
18691
  setResponseState(response, innerResponse);
18692
18692
  const headers = new Headers2(kConstruct);
18693
18693
  setResponseHeaders(response, headers);
@@ -18741,14 +18741,14 @@ var require_response = __commonJS({
18741
18741
  converter: webidl.converters.HeadersInit
18742
18742
  }
18743
18743
  ]);
18744
- webidl.is.Response = webidl.util.MakeTypeAssertion(Response);
18744
+ webidl.is.Response = webidl.util.MakeTypeAssertion(Response2);
18745
18745
  module.exports = {
18746
18746
  isNetworkError,
18747
18747
  makeNetworkError,
18748
18748
  makeResponse,
18749
18749
  makeAppropriateNetworkError,
18750
18750
  filterResponse,
18751
- Response,
18751
+ Response: Response2,
18752
18752
  cloneResponse,
18753
18753
  fromInnerResponse,
18754
18754
  getResponseState
@@ -63563,6 +63563,8 @@ var ENDPOINTS = {
63563
63563
  // Users
63564
63564
  USERS_ME: `${API_BASE}/users/me`,
63565
63565
  USER_AVATAR: `${API_BASE}/users/me/avatar`,
63566
+ PERSONAL_API_KEYS: `${API_BASE}/users/me/api-keys`,
63567
+ PERSONAL_API_KEY: (keyId) => `${API_BASE}/users/me/api-keys/${keyId}`,
63566
63568
  USER: (id) => `${API_BASE}/users/${id}`,
63567
63569
  // WebSocket ticket
63568
63570
  WS_TICKET: `${API_BASE}/ws/ticket`,
@@ -63577,6 +63579,24 @@ var ENDPOINTS = {
63577
63579
  TEAM_MEMBERS: (orgId, teamId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members`,
63578
63580
  TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
63579
63581
  ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE}/orgs/${orgId}/members/online`,
63582
+ LLM_PROVIDERS: (orgId) => `${API_BASE}/orgs/${orgId}/llm-providers`,
63583
+ LLM_PROVIDER: (orgId, providerId) => `${API_BASE}/orgs/${orgId}/llm-providers/${providerId}`,
63584
+ ORG_LLM_MODELS: (orgId) => `${API_BASE}/orgs/${orgId}/llm-models`,
63585
+ ORG_LLM_MODEL: (orgId, modelRowId) => `${API_BASE}/orgs/${orgId}/llm-models/${modelRowId}`,
63586
+ /**
63587
+ * Platform catalog merged with this org's own model rows. Pass `runtime` to
63588
+ * filter org-added models to the ones that runtime can actually reach —
63589
+ * without it a picker can offer a model the write path rejects.
63590
+ */
63591
+ ORG_MODEL_CATALOG: (orgId, runtime, includeModel) => {
63592
+ const params = new URLSearchParams();
63593
+ if (runtime)
63594
+ params.set("runtime", runtime);
63595
+ if (includeModel)
63596
+ params.set("include_model", includeModel);
63597
+ const qs = params.toString();
63598
+ return `${API_BASE}/orgs/${orgId}/models${qs ? `?${qs}` : ""}`;
63599
+ },
63580
63600
  ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
63581
63601
  ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/chats`,
63582
63602
  ORG_MEMBER_TASKS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/tasks`,
@@ -64239,6 +64259,55 @@ var WechatClient = class extends TaskLabelClient {
64239
64259
  }
64240
64260
  };
64241
64261
 
64262
+ // ts/sdk/dist/llm-provider-client.js
64263
+ var LLMProviderClient = class extends WechatClient {
64264
+ async getLLMProviders(orgId) {
64265
+ const response = await this.request("GET", ENDPOINTS.LLM_PROVIDERS(orgId));
64266
+ return response.data;
64267
+ }
64268
+ async createLLMProvider(orgId, data2) {
64269
+ return this.request("POST", ENDPOINTS.LLM_PROVIDERS(orgId), data2);
64270
+ }
64271
+ /** Omitting `api_key` leaves the stored credential untouched. */
64272
+ async updateLLMProvider(orgId, providerId, data2) {
64273
+ return this.request("PATCH", ENDPOINTS.LLM_PROVIDER(orgId, providerId), data2);
64274
+ }
64275
+ /** Fails with PROVIDER_IN_USE while model rows still point at it. */
64276
+ async deleteLLMProvider(orgId, providerId) {
64277
+ return this.request("DELETE", ENDPOINTS.LLM_PROVIDER(orgId, providerId));
64278
+ }
64279
+ async getOrgLLMModels(orgId) {
64280
+ const response = await this.request("GET", ENDPOINTS.ORG_LLM_MODELS(orgId));
64281
+ return response.data;
64282
+ }
64283
+ async createOrgLLMModel(orgId, data2) {
64284
+ return this.request("POST", ENDPOINTS.ORG_LLM_MODELS(orgId), data2);
64285
+ }
64286
+ /**
64287
+ * Patches a model row in place. Repointing a provider or fixing an upstream
64288
+ * name this way avoids the delete-and-recreate window, during which an
64289
+ * org-only model has no upstream at all and its pinned agents fail.
64290
+ */
64291
+ async updateOrgLLMModel(orgId, modelRowId, data2) {
64292
+ return this.request("PATCH", ENDPOINTS.ORG_LLM_MODEL(orgId, modelRowId), data2);
64293
+ }
64294
+ async deleteOrgLLMModel(orgId, modelRowId) {
64295
+ return this.request("DELETE", ENDPOINTS.ORG_LLM_MODEL(orgId, modelRowId));
64296
+ }
64297
+ /**
64298
+ * The catalog as this org sees it: platform models with the org's rows
64299
+ * merged in. Distinct from the public model catalog, which stays org-agnostic
64300
+ * and cacheable — use this one wherever an org context exists.
64301
+ *
64302
+ * Pass `runtime` on a picker: org-added models are then filtered to what that
64303
+ * runtime's protocol can reach, matching the server-side pin validation.
64304
+ */
64305
+ async getOrgModelCatalog(orgId, runtime, includeModel) {
64306
+ const response = await this.request("GET", ENDPOINTS.ORG_MODEL_CATALOG(orgId, runtime, includeModel));
64307
+ return response.data;
64308
+ }
64309
+ };
64310
+
64242
64311
  // ts/sdk/dist/attachment-client.js
64243
64312
  var COMPLETION_RETRY_DELAYS_MS = [250, 750];
64244
64313
  function isRetryableCompletionError(error2) {
@@ -64247,7 +64316,7 @@ function isRetryableCompletionError(error2) {
64247
64316
  const status = error2.status;
64248
64317
  return status === 0 || typeof status === "number" && status >= 500;
64249
64318
  }
64250
- var AttachmentClient = class extends WechatClient {
64319
+ var AttachmentClient = class extends LLMProviderClient {
64251
64320
  async getUploadPresignUrl(orgId, req) {
64252
64321
  return this.request("POST", ENDPOINTS.UPLOAD_PRESIGN(orgId), req);
64253
64322
  }
@@ -64275,6 +64344,99 @@ var AttachmentClient = class extends WechatClient {
64275
64344
  }
64276
64345
  };
64277
64346
 
64347
+ // ts/sdk/dist/wiki-upload.js
64348
+ function createWikiUploadFormData(params) {
64349
+ const form = new FormData();
64350
+ form.append("path", params.path);
64351
+ form.append("file", params.file);
64352
+ if (params.message)
64353
+ form.append("message", params.message);
64354
+ if (params.uploadId)
64355
+ form.append("upload_id", params.uploadId);
64356
+ if (params.conflict)
64357
+ form.append("conflict", params.conflict);
64358
+ if ("contentRoute" in params && params.contentRoute) {
64359
+ form.append("content_route", params.contentRoute);
64360
+ }
64361
+ return form;
64362
+ }
64363
+ function sendMultipartRequest(options) {
64364
+ if (options.onProgress && typeof XMLHttpRequest !== "undefined") {
64365
+ return multipartXHR(options, options.onProgress);
64366
+ }
64367
+ const timeoutSignal = AbortSignal.timeout(options.timeoutMs);
64368
+ const signal = options.signal ? AbortSignal.any([options.signal, timeoutSignal]) : timeoutSignal;
64369
+ return fetch(options.url, {
64370
+ method: options.method,
64371
+ headers: options.headers,
64372
+ body: options.body,
64373
+ signal
64374
+ });
64375
+ }
64376
+ function multipartXHR(options, onProgress) {
64377
+ return new Promise((resolve2, reject) => {
64378
+ const xhr = new XMLHttpRequest();
64379
+ let settled = false;
64380
+ const finish = (fn) => {
64381
+ if (settled)
64382
+ return;
64383
+ settled = true;
64384
+ options.signal?.removeEventListener("abort", abortFromSignal);
64385
+ fn();
64386
+ };
64387
+ const abortFromSignal = () => xhr.abort();
64388
+ xhr.open(options.method, options.url, true);
64389
+ xhr.timeout = options.timeoutMs;
64390
+ for (const [name, value] of Object.entries(options.headers)) {
64391
+ xhr.setRequestHeader(name, value);
64392
+ }
64393
+ xhr.upload.onprogress = (event) => {
64394
+ try {
64395
+ onProgress(event.loaded, event.lengthComputable ? event.total : 0);
64396
+ } catch {
64397
+ }
64398
+ };
64399
+ xhr.onload = () => finish(() => {
64400
+ const responseHeaders = new Headers();
64401
+ for (const line of xhr.getAllResponseHeaders().trim().split(/[\r\n]+/)) {
64402
+ if (!line)
64403
+ continue;
64404
+ const separator = line.indexOf(":");
64405
+ if (separator > 0) {
64406
+ responseHeaders.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());
64407
+ }
64408
+ }
64409
+ const responseBody = xhr.status === 204 || xhr.responseText === "" ? null : xhr.responseText;
64410
+ resolve2(new Response(responseBody, {
64411
+ status: xhr.status,
64412
+ statusText: xhr.statusText,
64413
+ headers: responseHeaders
64414
+ }));
64415
+ });
64416
+ xhr.onerror = () => finish(() => reject(new TypeError("Network request failed")));
64417
+ xhr.ontimeout = () => finish(() => reject(new DOMException("Request timed out", "TimeoutError")));
64418
+ xhr.onabort = () => finish(() => reject(new DOMException("Request aborted", "AbortError")));
64419
+ if (options.signal?.aborted) {
64420
+ finish(() => reject(new DOMException("Request aborted", "AbortError")));
64421
+ return;
64422
+ }
64423
+ options.signal?.addEventListener("abort", abortFromSignal, { once: true });
64424
+ xhr.send(options.body);
64425
+ });
64426
+ }
64427
+
64428
+ // ts/sdk/dist/wiki-changeset.js
64429
+ function normalizeWikiChangeset(changeset) {
64430
+ return {
64431
+ ...changeset,
64432
+ head_branch: changeset.head_branch ?? null,
64433
+ base_commit: changeset.base_commit ?? null,
64434
+ merge_commit: changeset.merge_commit ?? null,
64435
+ changed_paths: changeset.changed_paths ?? [],
64436
+ file_changes: changeset.file_changes ?? []
64437
+ };
64438
+ }
64439
+
64278
64440
  // ts/sdk/dist/client.js
64279
64441
  var ParallClient = class _ParallClient extends AttachmentClient {
64280
64442
  baseUrl;
@@ -64480,23 +64642,27 @@ var ParallClient = class _ParallClient extends AttachmentClient {
64480
64642
  * Multipart upload variant of `request`. Same auth / refresh / error
64481
64643
  * handling, but lets the caller hand us a prepared `FormData` (file +
64482
64644
  * text fields) and skips the JSON content-type. Used by
64483
- * uploadWikiFile / uploadWikiFileToChangeset — wiki binary uploads can
64645
+ * uploadWikiFile / uploadWikiFileToChangeset — wiki file uploads can
64484
64646
  * hit the 100 MiB cap, so a longer 5-minute timeout is used so a
64485
64647
  * 50 MiB blob on a slow connection doesn't get chopped at 15 s.
64486
64648
  */
64487
- async multipartRequest(method, path7, body, retried = false) {
64649
+ async multipartRequest(method, path7, body, retried = false, opts) {
64488
64650
  if (!retried) {
64489
64651
  await this.ensureFreshToken(path7);
64490
64652
  }
64491
64653
  const { "Content-Type": _drop, ...headers } = this.buildHeaders(path7);
64492
64654
  void _drop;
64655
+ const timeoutMs = opts?.timeoutMs ?? 5 * 60 * 1e3;
64493
64656
  let res;
64494
64657
  try {
64495
- res = await fetch(`${this.baseUrlFor(path7)}${path7}`, {
64658
+ res = await sendMultipartRequest({
64496
64659
  method,
64660
+ url: `${this.baseUrlFor(path7)}${path7}`,
64497
64661
  headers,
64498
64662
  body,
64499
- signal: AbortSignal.timeout(5 * 60 * 1e3)
64663
+ timeoutMs,
64664
+ signal: opts?.signal,
64665
+ onProgress: opts?.onProgress
64500
64666
  });
64501
64667
  } catch (err) {
64502
64668
  throw _ParallClient.normalizeFetchError(err);
@@ -64507,7 +64673,7 @@ var ParallClient = class _ParallClient extends AttachmentClient {
64507
64673
  if (!retried && !isAuthPath && this.getRefreshToken) {
64508
64674
  const refreshed = await this.tryRefresh();
64509
64675
  if (refreshed) {
64510
- return this.multipartRequest(method, path7, body, true);
64676
+ return this.multipartRequest(method, path7, body, true, opts);
64511
64677
  }
64512
64678
  }
64513
64679
  if (this.onTokenExpired && !isAuthPath) {
@@ -64586,6 +64752,18 @@ var ParallClient = class _ParallClient extends AttachmentClient {
64586
64752
  async deleteAvatar() {
64587
64753
  return this.request("DELETE", ENDPOINTS.USER_AVATAR);
64588
64754
  }
64755
+ // ---- Personal API keys (org-scoped; JWT session required) ----
64756
+ /** Mints an org-scoped personal API key. The plaintext is returned once and never again. */
64757
+ async createPersonalApiKey(req) {
64758
+ return this.request("POST", ENDPOINTS.PERSONAL_API_KEYS, req);
64759
+ }
64760
+ async listPersonalApiKeys() {
64761
+ const res = await this.request("GET", ENDPOINTS.PERSONAL_API_KEYS);
64762
+ return res.data;
64763
+ }
64764
+ async revokePersonalApiKey(keyId) {
64765
+ return this.request("DELETE", ENDPOINTS.PERSONAL_API_KEY(keyId));
64766
+ }
64589
64767
  async uploadAgentAvatar(orgId, agentId, file) {
64590
64768
  const fd = new FormData();
64591
64769
  fd.append("file", file);
@@ -65804,26 +65982,21 @@ var ParallClient = class _ParallClient extends AttachmentClient {
65804
65982
  * through createWikiChangeset / updateWikiChangeset.
65805
65983
  */
65806
65984
  async uploadWikiFile(orgId, wikiId, params) {
65807
- const fd = new FormData();
65808
- fd.append("path", params.path);
65809
- fd.append("file", params.file);
65810
- if (params.message)
65811
- fd.append("message", params.message);
65812
- return this.multipartRequest("POST", ENDPOINTS.WIKI_UPLOADS(orgId, wikiId), fd);
65985
+ const fd = createWikiUploadFormData(params);
65986
+ return this.multipartRequest("POST", ENDPOINTS.WIKI_UPLOADS(orgId, wikiId), fd, false, {
65987
+ signal: params.signal,
65988
+ onProgress: params.onProgress
65989
+ });
65813
65990
  }
65814
65991
  /**
65815
- * Upload a binary file into a changeset's feature branch (read scope +
65816
- * author-only). Used by reader flow: propose a changeset, attach
65817
- * binary, PATCH markdown that references it. On merge the binary
65818
- * squashes into the default branch.
65992
+ * Upload a file into a changeset's feature branch (read scope +
65993
+ * author-only). The default remains binary-only; contentRoute `auto`
65994
+ * opts into reviewable text for the Web library upload flow. On merge the
65995
+ * branch contents squash into the default branch.
65819
65996
  */
65820
65997
  async uploadWikiFileToChangeset(orgId, wikiId, changesetId, params) {
65821
- const fd = new FormData();
65822
- fd.append("path", params.path);
65823
- fd.append("file", params.file);
65824
- if (params.message)
65825
- fd.append("message", params.message);
65826
- return this.multipartRequest("POST", ENDPOINTS.WIKI_CHANGESET_FILES(orgId, wikiId, changesetId), fd);
65998
+ const fd = createWikiUploadFormData(params);
65999
+ return this.multipartRequest("POST", ENDPOINTS.WIKI_CHANGESET_FILES(orgId, wikiId, changesetId), fd, false, { signal: params.signal, onProgress: params.onProgress });
65827
66000
  }
65828
66001
  /** Remove a binary file from the default branch. Text files must use a
65829
66002
  * changeset delete action. The blob stays reachable via git history. */
@@ -66690,13 +66863,6 @@ var ParallClient = class _ParallClient extends AttachmentClient {
66690
66863
  );
66691
66864
  }
66692
66865
  };
66693
- function normalizeWikiChangeset(changeset) {
66694
- return {
66695
- ...changeset,
66696
- changed_paths: changeset.changed_paths ?? [],
66697
- file_changes: changeset.file_changes ?? []
66698
- };
66699
- }
66700
66866
  var ApiError = class extends Error {
66701
66867
  status;
66702
66868
  code;