@parall/daemon 1.85.0 → 1.87.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 +252 -108
- package/bundle/parall-claude-agent.js +253 -103
- package/bundle/parall-codex-agent.js +253 -103
- package/bundle/parall-daemon.js +310 -114
- package/package.json +6 -6
package/bundle/parall-daemon.js
CHANGED
|
@@ -520,6 +520,118 @@ var init_chat_team_grant_types = __esm({
|
|
|
520
520
|
}
|
|
521
521
|
});
|
|
522
522
|
|
|
523
|
+
// ts/sdk/dist/wiki-upload.js
|
|
524
|
+
function createWikiUploadFormData(params) {
|
|
525
|
+
const form = new FormData();
|
|
526
|
+
form.append("path", params.path);
|
|
527
|
+
form.append("file", params.file);
|
|
528
|
+
if (params.message)
|
|
529
|
+
form.append("message", params.message);
|
|
530
|
+
if (params.uploadId)
|
|
531
|
+
form.append("upload_id", params.uploadId);
|
|
532
|
+
if (params.conflict)
|
|
533
|
+
form.append("conflict", params.conflict);
|
|
534
|
+
if ("contentRoute" in params && params.contentRoute) {
|
|
535
|
+
form.append("content_route", params.contentRoute);
|
|
536
|
+
}
|
|
537
|
+
return form;
|
|
538
|
+
}
|
|
539
|
+
function sendMultipartRequest(options) {
|
|
540
|
+
if (options.onProgress && typeof XMLHttpRequest !== "undefined") {
|
|
541
|
+
return multipartXHR(options, options.onProgress);
|
|
542
|
+
}
|
|
543
|
+
const timeoutSignal = AbortSignal.timeout(options.timeoutMs);
|
|
544
|
+
const signal = options.signal ? AbortSignal.any([options.signal, timeoutSignal]) : timeoutSignal;
|
|
545
|
+
return fetch(options.url, {
|
|
546
|
+
method: options.method,
|
|
547
|
+
headers: options.headers,
|
|
548
|
+
body: options.body,
|
|
549
|
+
signal
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
function multipartXHR(options, onProgress) {
|
|
553
|
+
return new Promise((resolve9, reject) => {
|
|
554
|
+
const xhr = new XMLHttpRequest();
|
|
555
|
+
let settled = false;
|
|
556
|
+
const finish = (fn) => {
|
|
557
|
+
if (settled)
|
|
558
|
+
return;
|
|
559
|
+
settled = true;
|
|
560
|
+
options.signal?.removeEventListener("abort", abortFromSignal);
|
|
561
|
+
fn();
|
|
562
|
+
};
|
|
563
|
+
const abortFromSignal = () => xhr.abort();
|
|
564
|
+
xhr.open(options.method, options.url, true);
|
|
565
|
+
xhr.timeout = options.timeoutMs;
|
|
566
|
+
for (const [name, value] of Object.entries(options.headers)) {
|
|
567
|
+
xhr.setRequestHeader(name, value);
|
|
568
|
+
}
|
|
569
|
+
xhr.upload.onprogress = (event) => {
|
|
570
|
+
try {
|
|
571
|
+
onProgress(event.loaded, event.lengthComputable ? event.total : 0);
|
|
572
|
+
} catch {
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
xhr.onload = () => finish(() => {
|
|
576
|
+
const responseHeaders = new Headers();
|
|
577
|
+
for (const line of xhr.getAllResponseHeaders().trim().split(/[\r\n]+/)) {
|
|
578
|
+
if (!line)
|
|
579
|
+
continue;
|
|
580
|
+
const separator = line.indexOf(":");
|
|
581
|
+
if (separator > 0) {
|
|
582
|
+
responseHeaders.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
const responseBody = xhr.status === 204 || xhr.responseText === "" ? null : xhr.responseText;
|
|
586
|
+
resolve9(new Response(responseBody, {
|
|
587
|
+
status: xhr.status,
|
|
588
|
+
statusText: xhr.statusText,
|
|
589
|
+
headers: responseHeaders
|
|
590
|
+
}));
|
|
591
|
+
});
|
|
592
|
+
xhr.onerror = () => finish(() => reject(new TypeError("Network request failed")));
|
|
593
|
+
xhr.ontimeout = () => finish(() => reject(new DOMException("Request timed out", "TimeoutError")));
|
|
594
|
+
xhr.onabort = () => finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
595
|
+
if (options.signal?.aborted) {
|
|
596
|
+
finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
options.signal?.addEventListener("abort", abortFromSignal, { once: true });
|
|
600
|
+
xhr.send(options.body);
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
var init_wiki_upload = __esm({
|
|
604
|
+
"ts/sdk/dist/wiki-upload.js"() {
|
|
605
|
+
"use strict";
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
|
|
609
|
+
// ts/sdk/dist/fetch-cause.js
|
|
610
|
+
function describeFetchCause(err) {
|
|
611
|
+
const inner = err?.cause;
|
|
612
|
+
for (const candidate of [inner, err]) {
|
|
613
|
+
if (!(candidate instanceof Error))
|
|
614
|
+
continue;
|
|
615
|
+
const code = candidate.code;
|
|
616
|
+
const parts = [];
|
|
617
|
+
if (typeof code === "string" && code && !candidate.message.includes(code))
|
|
618
|
+
parts.push(code);
|
|
619
|
+
if (candidate.message && !GENERIC_FETCH_MESSAGES.has(candidate.message)) {
|
|
620
|
+
parts.push(candidate.message);
|
|
621
|
+
}
|
|
622
|
+
if (parts.length > 0)
|
|
623
|
+
return parts.join(" ");
|
|
624
|
+
}
|
|
625
|
+
return void 0;
|
|
626
|
+
}
|
|
627
|
+
var GENERIC_FETCH_MESSAGES;
|
|
628
|
+
var init_fetch_cause = __esm({
|
|
629
|
+
"ts/sdk/dist/fetch-cause.js"() {
|
|
630
|
+
"use strict";
|
|
631
|
+
GENERIC_FETCH_MESSAGES = /* @__PURE__ */ new Set(["Failed to fetch", "fetch failed"]);
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
|
|
523
635
|
// ts/sdk/dist/app-template-endpoints.js
|
|
524
636
|
function appTemplateEndpoints(apiBase) {
|
|
525
637
|
return {
|
|
@@ -620,6 +732,27 @@ var init_chat_team_grant_endpoints = __esm({
|
|
|
620
732
|
}
|
|
621
733
|
});
|
|
622
734
|
|
|
735
|
+
// ts/sdk/dist/team-invite-endpoints.js
|
|
736
|
+
function teamInviteEndpoints(apiBase) {
|
|
737
|
+
const seg = encodeURIComponent;
|
|
738
|
+
return {
|
|
739
|
+
TEMPLATE_INVITE_LINK: (orgId, templateId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link`,
|
|
740
|
+
TEMPLATE_INVITE_REQUESTS: (orgId, templateId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link/requests`,
|
|
741
|
+
TEMPLATE_INVITE_REQUEST_DECIDE: (orgId, templateId, requestId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link/requests/${seg(requestId)}/decide`,
|
|
742
|
+
TEAM_INVITE: (token) => `${apiBase}/team-invites/${seg(token)}`,
|
|
743
|
+
TEAM_INVITE_TEAMS: (token) => `${apiBase}/team-invites/${seg(token)}/teams`,
|
|
744
|
+
TEAM_INVITE_REQUESTS: (token) => `${apiBase}/team-invites/${seg(token)}/requests`,
|
|
745
|
+
TEAM_INVITE_REQUEST_MINE: (token) => `${apiBase}/team-invites/${seg(token)}/requests/mine`,
|
|
746
|
+
TEAM_INVITE_REQUEST_CANCEL: (requestId) => `${apiBase}/team-invite-requests/${seg(requestId)}/cancel`,
|
|
747
|
+
TEAM_INVITE_REQUEST_RETRY: (requestId) => `${apiBase}/team-invite-requests/${seg(requestId)}/retry`
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
var init_team_invite_endpoints = __esm({
|
|
751
|
+
"ts/sdk/dist/team-invite-endpoints.js"() {
|
|
752
|
+
"use strict";
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
|
|
623
756
|
// ts/sdk/dist/wechat-endpoints.js
|
|
624
757
|
function wechatEndpoints(apiBase) {
|
|
625
758
|
const agentBase = (orgId) => `${apiBase}/orgs/${orgId}/agents/me/wechat`;
|
|
@@ -669,8 +802,12 @@ var init_billing_endpoints = __esm({
|
|
|
669
802
|
function teamEndpoints(apiBase) {
|
|
670
803
|
return {
|
|
671
804
|
TEAMS: (orgId) => `${apiBase}/orgs/${orgId}/teams`,
|
|
805
|
+
/** The whole team tree in one read (team-chart-design.md §5). */
|
|
806
|
+
TEAM_GRAPH: (orgId) => `${apiBase}/orgs/${orgId}/team-graph`,
|
|
672
807
|
TEAM: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}`,
|
|
673
808
|
TEAM_PARENT: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
809
|
+
/** What moving a team would change (team-chart-design.md §7). */
|
|
810
|
+
TEAM_PARENT_PREVIEW: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent/preview`,
|
|
674
811
|
TEAM_MEMBERS: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members`,
|
|
675
812
|
TEAM_MEMBER: (orgId, teamId, userId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
676
813
|
/** An agent's owning Team (agent-team-attribution-design.md §5.4). */
|
|
@@ -738,6 +875,7 @@ var init_constants = __esm({
|
|
|
738
875
|
init_edge_endpoints();
|
|
739
876
|
init_slack_endpoints();
|
|
740
877
|
init_chat_team_grant_endpoints();
|
|
878
|
+
init_team_invite_endpoints();
|
|
741
879
|
init_wechat_endpoints();
|
|
742
880
|
init_billing_endpoints();
|
|
743
881
|
init_team_endpoints();
|
|
@@ -1018,6 +1156,9 @@ var init_constants = __esm({
|
|
|
1018
1156
|
codex: "openai/gpt-5.4"
|
|
1019
1157
|
};
|
|
1020
1158
|
ENDPOINTS = {
|
|
1159
|
+
WIKI_PAGE_SHARES: (orgId, wikiId) => `/wiki/v1/orgs/${orgId}/wikis/${wikiId}/page-shares`,
|
|
1160
|
+
WIKI_PAGE_SHARE_CANDIDATES: (orgId, wikiId) => `/wiki/v1/orgs/${orgId}/wikis/${wikiId}/page-share-candidates`,
|
|
1161
|
+
WIKI_SHARED_PAGE: (shareId) => `/wiki/v1/shared-pages/${encodeURIComponent(shareId)}`,
|
|
1021
1162
|
// Auth
|
|
1022
1163
|
AUTH_REGISTER: `${API_BASE2}/auth/register`,
|
|
1023
1164
|
AUTH_LOGIN: `${API_BASE2}/auth/login`,
|
|
@@ -1503,6 +1644,8 @@ var init_constants = __esm({
|
|
|
1503
1644
|
TEMPLATE: (orgId, templateId) => `${API_BASE2}/orgs/${orgId}/templates/${templateId}`,
|
|
1504
1645
|
TEMPLATE_DEPLOYMENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/template-deployments`,
|
|
1505
1646
|
TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${API_BASE2}/orgs/${orgId}/template-deployments/${deploymentId}`,
|
|
1647
|
+
// Team launch / team invite links (public preview + signed-in requests)
|
|
1648
|
+
...teamInviteEndpoints(API_BASE2),
|
|
1506
1649
|
CLIP_DEPENDENCIES_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/clip-dependencies/check`,
|
|
1507
1650
|
// Onboarding wizard progress (org-scoped, self)
|
|
1508
1651
|
ONBOARDING_PROGRESS: (orgId) => `${API_BASE2}/orgs/${orgId}/onboarding`,
|
|
@@ -3149,14 +3292,43 @@ var init_agent_owning_team_client = __esm({
|
|
|
3149
3292
|
}
|
|
3150
3293
|
});
|
|
3151
3294
|
|
|
3295
|
+
// ts/sdk/dist/team-graph-client.js
|
|
3296
|
+
var TeamGraphClient;
|
|
3297
|
+
var init_team_graph_client = __esm({
|
|
3298
|
+
"ts/sdk/dist/team-graph-client.js"() {
|
|
3299
|
+
"use strict";
|
|
3300
|
+
init_agent_owning_team_client();
|
|
3301
|
+
init_constants();
|
|
3302
|
+
TeamGraphClient = class extends AgentOwningTeamClient {
|
|
3303
|
+
async getTeamGraph(orgId, opts) {
|
|
3304
|
+
const query = opts?.includeAccess ? "?include=access" : "";
|
|
3305
|
+
return this.request("GET", `${ENDPOINTS.TEAM_GRAPH(orgId)}${query}`);
|
|
3306
|
+
}
|
|
3307
|
+
/**
|
|
3308
|
+
* Who would come to see more or less through teams if the team moved under
|
|
3309
|
+
* `parentTeamId`, or to the top level with null, without moving it
|
|
3310
|
+
* (team-chart-design.md §7). Org owners and admins only. Refuses what the move
|
|
3311
|
+
* would refuse, with the same codes. 503 when it cannot compute the whole answer
|
|
3312
|
+
* (`TEAM_MOVE_PREVIEW_WIKI_UNAVAILABLE`, `TEAM_MOVE_PREVIEW_TIMEOUT`,
|
|
3313
|
+
* `TEAM_MOVE_PREVIEW_TOO_LARGE`). Send `tree_revision` back on `setTeamParent`.
|
|
3314
|
+
*/
|
|
3315
|
+
async previewTeamMove(orgId, teamId, parentTeamId) {
|
|
3316
|
+
return this.request("POST", ENDPOINTS.TEAM_PARENT_PREVIEW(orgId, teamId), {
|
|
3317
|
+
parent_team_id: parentTeamId
|
|
3318
|
+
});
|
|
3319
|
+
}
|
|
3320
|
+
};
|
|
3321
|
+
}
|
|
3322
|
+
});
|
|
3323
|
+
|
|
3152
3324
|
// ts/sdk/dist/billing-client.js
|
|
3153
3325
|
var BillingClient;
|
|
3154
3326
|
var init_billing_client = __esm({
|
|
3155
3327
|
"ts/sdk/dist/billing-client.js"() {
|
|
3156
3328
|
"use strict";
|
|
3157
|
-
init_agent_owning_team_client();
|
|
3158
3329
|
init_constants();
|
|
3159
|
-
|
|
3330
|
+
init_team_graph_client();
|
|
3331
|
+
BillingClient = class extends TeamGraphClient {
|
|
3160
3332
|
// ---- Billing & Credits (org-scoped) ----
|
|
3161
3333
|
//
|
|
3162
3334
|
// Every account method takes an optional trailing accountId: omitted, it
|
|
@@ -3280,115 +3452,111 @@ var init_billing_client = __esm({
|
|
|
3280
3452
|
}
|
|
3281
3453
|
});
|
|
3282
3454
|
|
|
3283
|
-
// ts/sdk/dist/
|
|
3284
|
-
function
|
|
3285
|
-
|
|
3286
|
-
form.append("path", params.path);
|
|
3287
|
-
form.append("file", params.file);
|
|
3288
|
-
if (params.message)
|
|
3289
|
-
form.append("message", params.message);
|
|
3290
|
-
if (params.uploadId)
|
|
3291
|
-
form.append("upload_id", params.uploadId);
|
|
3292
|
-
if (params.conflict)
|
|
3293
|
-
form.append("conflict", params.conflict);
|
|
3294
|
-
if ("contentRoute" in params && params.contentRoute) {
|
|
3295
|
-
form.append("content_route", params.contentRoute);
|
|
3296
|
-
}
|
|
3297
|
-
return form;
|
|
3455
|
+
// ts/sdk/dist/team-invite-client.js
|
|
3456
|
+
function errorCode(err) {
|
|
3457
|
+
return typeof err === "object" && err !== null ? err.code : void 0;
|
|
3298
3458
|
}
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
}
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
let settled = false;
|
|
3316
|
-
const finish = (fn) => {
|
|
3317
|
-
if (settled)
|
|
3318
|
-
return;
|
|
3319
|
-
settled = true;
|
|
3320
|
-
options.signal?.removeEventListener("abort", abortFromSignal);
|
|
3321
|
-
fn();
|
|
3322
|
-
};
|
|
3323
|
-
const abortFromSignal = () => xhr.abort();
|
|
3324
|
-
xhr.open(options.method, options.url, true);
|
|
3325
|
-
xhr.timeout = options.timeoutMs;
|
|
3326
|
-
for (const [name, value] of Object.entries(options.headers)) {
|
|
3327
|
-
xhr.setRequestHeader(name, value);
|
|
3328
|
-
}
|
|
3329
|
-
xhr.upload.onprogress = (event) => {
|
|
3330
|
-
try {
|
|
3331
|
-
onProgress(event.loaded, event.lengthComputable ? event.total : 0);
|
|
3332
|
-
} catch {
|
|
3333
|
-
}
|
|
3334
|
-
};
|
|
3335
|
-
xhr.onload = () => finish(() => {
|
|
3336
|
-
const responseHeaders = new Headers();
|
|
3337
|
-
for (const line of xhr.getAllResponseHeaders().trim().split(/[\r\n]+/)) {
|
|
3338
|
-
if (!line)
|
|
3339
|
-
continue;
|
|
3340
|
-
const separator = line.indexOf(":");
|
|
3341
|
-
if (separator > 0) {
|
|
3342
|
-
responseHeaders.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());
|
|
3459
|
+
var TeamInviteClient;
|
|
3460
|
+
var init_team_invite_client = __esm({
|
|
3461
|
+
"ts/sdk/dist/team-invite-client.js"() {
|
|
3462
|
+
"use strict";
|
|
3463
|
+
init_billing_client();
|
|
3464
|
+
init_constants();
|
|
3465
|
+
TeamInviteClient = class extends BillingClient {
|
|
3466
|
+
/** Org owner/admin: the template's current launch link, or null while it
|
|
3467
|
+
* has none (`TEAM_INVITE_LINK_NOT_FOUND`). Never creates one. */
|
|
3468
|
+
async getTemplateInviteLink(orgId, templateId) {
|
|
3469
|
+
try {
|
|
3470
|
+
return await this.request("GET", ENDPOINTS.TEMPLATE_INVITE_LINK(orgId, templateId));
|
|
3471
|
+
} catch (err) {
|
|
3472
|
+
if (errorCode(err) === "TEAM_INVITE_LINK_NOT_FOUND")
|
|
3473
|
+
return null;
|
|
3474
|
+
throw err;
|
|
3343
3475
|
}
|
|
3344
3476
|
}
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
}
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3477
|
+
/** Org owner/admin: a new launch link, replacing the template's previous
|
|
3478
|
+
* one, whose URL stops working. Every new team waits for an admin's
|
|
3479
|
+
* approval unless `requireApproval` is false (the server's default is
|
|
3480
|
+
* true). */
|
|
3481
|
+
async createTemplateInviteLink(orgId, templateId, options = {}) {
|
|
3482
|
+
return this.request("POST", ENDPOINTS.TEMPLATE_INVITE_LINK(orgId, templateId), options.requireApproval !== void 0 ? { require_approval: options.requireApproval } : {});
|
|
3483
|
+
}
|
|
3484
|
+
/** Org owner/admin: the requests waiting for approval on the template's
|
|
3485
|
+
* current link, oldest first. */
|
|
3486
|
+
async listTemplateInviteRequests(orgId, templateId) {
|
|
3487
|
+
const res = await this.request("GET", ENDPOINTS.TEMPLATE_INVITE_REQUESTS(orgId, templateId));
|
|
3488
|
+
return res.requests ?? [];
|
|
3489
|
+
}
|
|
3490
|
+
/** Org owner/admin: approve or decline a waiting request. Approving brings
|
|
3491
|
+
* a requester from outside the org in as a member and starts their team.
|
|
3492
|
+
* `ALREADY_DECIDED` (409) when someone decided first. */
|
|
3493
|
+
async decideTemplateInviteRequest(orgId, templateId, requestId, decision) {
|
|
3494
|
+
return this.request("POST", ENDPOINTS.TEMPLATE_INVITE_REQUEST_DECIDE(orgId, templateId, requestId), { decision });
|
|
3495
|
+
}
|
|
3496
|
+
/** Public, no login needed: what a link shows before anyone signs in.
|
|
3497
|
+
* `TEAM_INVITE_NOT_FOUND` (404) for an unknown, revoked or switched-off
|
|
3498
|
+
* link; `TEAM_INVITE_EXPIRED` (410) once it lapsed. */
|
|
3499
|
+
async getTeamInvite(token) {
|
|
3500
|
+
return this.request("GET", ENDPOINTS.TEAM_INVITE(token));
|
|
3501
|
+
}
|
|
3502
|
+
/** Signed in: the org's Teams to pick from on a launch link, the caller's
|
|
3503
|
+
* own first, each marked with whether it has (or is getting) the squad and
|
|
3504
|
+
* which Team account would pay. */
|
|
3505
|
+
async getTeamInviteTeams(token) {
|
|
3506
|
+
const res = await this.request("GET", ENDPOINTS.TEAM_INVITE_TEAMS(token));
|
|
3507
|
+
return res.teams ?? [];
|
|
3508
|
+
}
|
|
3509
|
+
/** Ask for a team through a link: pick an existing one (`team_id`) or name
|
|
3510
|
+
* a new one. Submitting again returns the caller's open request instead of
|
|
3511
|
+
* making another. */
|
|
3512
|
+
async createTeamInviteRequest(token, body) {
|
|
3513
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUESTS(token), body);
|
|
3514
|
+
}
|
|
3515
|
+
/** The caller's latest request through this link, with its derived phase.
|
|
3516
|
+
* `TEAM_INVITE_REQUEST_NOT_FOUND` (404) while they have none. */
|
|
3517
|
+
async getMyTeamInviteRequest(token) {
|
|
3518
|
+
return this.request("GET", ENDPOINTS.TEAM_INVITE_REQUEST_MINE(token));
|
|
3519
|
+
}
|
|
3520
|
+
/** The requester withdraws a request that is still waiting. */
|
|
3521
|
+
async cancelTeamInviteRequest(requestId) {
|
|
3522
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUEST_CANCEL(requestId));
|
|
3523
|
+
}
|
|
3524
|
+
/** The requester retries a failed launch; the server never makes a second
|
|
3525
|
+
* squad for the same request. */
|
|
3526
|
+
async retryTeamInviteRequest(requestId) {
|
|
3527
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUEST_RETRY(requestId));
|
|
3528
|
+
}
|
|
3529
|
+
};
|
|
3366
3530
|
}
|
|
3367
3531
|
});
|
|
3368
3532
|
|
|
3369
|
-
// ts/sdk/dist/
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
if (!(candidate instanceof Error))
|
|
3374
|
-
continue;
|
|
3375
|
-
const code = candidate.code;
|
|
3376
|
-
const parts = [];
|
|
3377
|
-
if (typeof code === "string" && code && !candidate.message.includes(code))
|
|
3378
|
-
parts.push(code);
|
|
3379
|
-
if (candidate.message && !GENERIC_FETCH_MESSAGES.has(candidate.message)) {
|
|
3380
|
-
parts.push(candidate.message);
|
|
3381
|
-
}
|
|
3382
|
-
if (parts.length > 0)
|
|
3383
|
-
return parts.join(" ");
|
|
3384
|
-
}
|
|
3385
|
-
return void 0;
|
|
3386
|
-
}
|
|
3387
|
-
var GENERIC_FETCH_MESSAGES;
|
|
3388
|
-
var init_fetch_cause = __esm({
|
|
3389
|
-
"ts/sdk/dist/fetch-cause.js"() {
|
|
3533
|
+
// ts/sdk/dist/wiki-page-share-client.js
|
|
3534
|
+
var WikiPageShareClient;
|
|
3535
|
+
var init_wiki_page_share_client = __esm({
|
|
3536
|
+
"ts/sdk/dist/wiki-page-share-client.js"() {
|
|
3390
3537
|
"use strict";
|
|
3391
|
-
|
|
3538
|
+
init_team_invite_client();
|
|
3539
|
+
init_constants();
|
|
3540
|
+
WikiPageShareClient = class extends TeamInviteClient {
|
|
3541
|
+
async listWikiPageShares(orgId, wikiId, path27) {
|
|
3542
|
+
const res = await this.request("GET", ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId), void 0, { path: path27 });
|
|
3543
|
+
return res.data;
|
|
3544
|
+
}
|
|
3545
|
+
async createWikiPageShare(orgId, wikiId, path27, userId) {
|
|
3546
|
+
return this.request("POST", ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId), { user_id: userId }, { path: path27 });
|
|
3547
|
+
}
|
|
3548
|
+
async revokeWikiPageShare(orgId, wikiId, path27, shareId) {
|
|
3549
|
+
return this.request("DELETE", `${ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId)}/${encodeURIComponent(shareId)}`, void 0, { path: path27 });
|
|
3550
|
+
}
|
|
3551
|
+
async listWikiShareCandidates(orgId, wikiId, path27, q = "") {
|
|
3552
|
+
const res = await this.request("GET", ENDPOINTS.WIKI_PAGE_SHARE_CANDIDATES(orgId, wikiId), void 0, { path: path27, q });
|
|
3553
|
+
return res.data;
|
|
3554
|
+
}
|
|
3555
|
+
/** No path or ref override: the server always reads the shared page on main. */
|
|
3556
|
+
async getSharedWikiPage(shareId, opts) {
|
|
3557
|
+
return this.request("GET", ENDPOINTS.WIKI_SHARED_PAGE(shareId), void 0, void 0, false, opts);
|
|
3558
|
+
}
|
|
3559
|
+
};
|
|
3392
3560
|
}
|
|
3393
3561
|
});
|
|
3394
3562
|
|
|
@@ -3467,12 +3635,12 @@ var init_client = __esm({
|
|
|
3467
3635
|
"ts/sdk/dist/client.js"() {
|
|
3468
3636
|
"use strict";
|
|
3469
3637
|
init_browser_viewer();
|
|
3470
|
-
init_billing_client();
|
|
3471
3638
|
init_wiki_upload();
|
|
3472
3639
|
init_fetch_cause();
|
|
3640
|
+
init_wiki_page_share_client();
|
|
3473
3641
|
init_wiki_changeset();
|
|
3474
3642
|
init_constants();
|
|
3475
|
-
ParallClient = class _ParallClient extends
|
|
3643
|
+
ParallClient = class _ParallClient extends WikiPageShareClient {
|
|
3476
3644
|
baseUrl;
|
|
3477
3645
|
wikiBaseUrl;
|
|
3478
3646
|
token;
|
|
@@ -3873,10 +4041,16 @@ var init_client = __esm({
|
|
|
3873
4041
|
async deleteTeam(orgId, teamId) {
|
|
3874
4042
|
return this.request("DELETE", ENDPOINTS.TEAM(orgId, teamId));
|
|
3875
4043
|
}
|
|
3876
|
-
/**
|
|
3877
|
-
|
|
4044
|
+
/**
|
|
4045
|
+
* Moves a team under `parentTeamId`, or to the top level with null. Org-admin
|
|
4046
|
+
* action. `expectedTreeRevision` is the revision the move's preview returned: if
|
|
4047
|
+
* the org's team tree changed since, nothing moves and it answers 409
|
|
4048
|
+
* `TEAM_TREE_CHANGED`. Without it nothing is checked.
|
|
4049
|
+
*/
|
|
4050
|
+
async setTeamParent(orgId, teamId, parentTeamId, opts) {
|
|
3878
4051
|
return this.request("PUT", ENDPOINTS.TEAM_PARENT(orgId, teamId), {
|
|
3879
|
-
parent_team_id: parentTeamId
|
|
4052
|
+
parent_team_id: parentTeamId,
|
|
4053
|
+
...opts?.expectedTreeRevision ? { expected_tree_revision: opts.expectedTreeRevision } : {}
|
|
3880
4054
|
});
|
|
3881
4055
|
}
|
|
3882
4056
|
/** Roster with display info, minus members who left the org; `includeSubteams` adds subteam rows. */
|
|
@@ -6324,12 +6498,16 @@ var init_subject = __esm({
|
|
|
6324
6498
|
function resolveChatListMode(value) {
|
|
6325
6499
|
return CHAT_LIST_MODES.includes(value) ? value : DEFAULT_CHAT_LIST_MODE;
|
|
6326
6500
|
}
|
|
6327
|
-
|
|
6501
|
+
function resolveAccountLanguage(value) {
|
|
6502
|
+
return ACCOUNT_LANGUAGES.includes(value) ? value : null;
|
|
6503
|
+
}
|
|
6504
|
+
var CHAT_LIST_MODES, DEFAULT_CHAT_LIST_MODE, ACCOUNT_LANGUAGES;
|
|
6328
6505
|
var init_user_preferences_types = __esm({
|
|
6329
6506
|
"ts/sdk/dist/user-preferences-types.js"() {
|
|
6330
6507
|
"use strict";
|
|
6331
6508
|
CHAT_LIST_MODES = ["sections", "timeline"];
|
|
6332
6509
|
DEFAULT_CHAT_LIST_MODE = "sections";
|
|
6510
|
+
ACCOUNT_LANGUAGES = ["en", "zh-CN", "zh-HK"];
|
|
6333
6511
|
}
|
|
6334
6512
|
});
|
|
6335
6513
|
|
|
@@ -6340,6 +6518,13 @@ var init_task_label_types = __esm({
|
|
|
6340
6518
|
}
|
|
6341
6519
|
});
|
|
6342
6520
|
|
|
6521
|
+
// ts/sdk/dist/team-invite-types.js
|
|
6522
|
+
var init_team_invite_types = __esm({
|
|
6523
|
+
"ts/sdk/dist/team-invite-types.js"() {
|
|
6524
|
+
"use strict";
|
|
6525
|
+
}
|
|
6526
|
+
});
|
|
6527
|
+
|
|
6343
6528
|
// ts/sdk/dist/trigger-judge-types.js
|
|
6344
6529
|
var init_trigger_judge_types = __esm({
|
|
6345
6530
|
"ts/sdk/dist/trigger-judge-types.js"() {
|
|
@@ -6801,10 +6986,18 @@ var init_ws = __esm({
|
|
|
6801
6986
|
}
|
|
6802
6987
|
});
|
|
6803
6988
|
|
|
6989
|
+
// ts/sdk/dist/wiki-page-share-types.js
|
|
6990
|
+
var init_wiki_page_share_types = __esm({
|
|
6991
|
+
"ts/sdk/dist/wiki-page-share-types.js"() {
|
|
6992
|
+
"use strict";
|
|
6993
|
+
}
|
|
6994
|
+
});
|
|
6995
|
+
|
|
6804
6996
|
// ts/sdk/dist/index.js
|
|
6805
6997
|
var dist_exports = {};
|
|
6806
6998
|
__export(dist_exports, {
|
|
6807
6999
|
ACCENT_THEMES: () => ACCENT_THEMES,
|
|
7000
|
+
ACCOUNT_LANGUAGES: () => ACCOUNT_LANGUAGES,
|
|
6808
7001
|
API_BASE: () => API_BASE2,
|
|
6809
7002
|
ApiError: () => ApiError,
|
|
6810
7003
|
BROWSER_USE_ACTIONS: () => BROWSER_USE_ACTIONS,
|
|
@@ -6873,6 +7066,7 @@ __export(dist_exports, {
|
|
|
6873
7066
|
platformDefaultModelForRuntime: () => platformDefaultModelForRuntime,
|
|
6874
7067
|
readReceiptOf: () => readReceiptOf,
|
|
6875
7068
|
refusedAccountOf: () => refusedAccountOf,
|
|
7069
|
+
resolveAccountLanguage: () => resolveAccountLanguage,
|
|
6876
7070
|
resolveChatListMode: () => resolveChatListMode,
|
|
6877
7071
|
sameWikiDraftScope: () => sameWikiDraftScope,
|
|
6878
7072
|
showsReadReceipt: () => showsReadReceipt,
|
|
@@ -6915,11 +7109,13 @@ var init_dist = __esm({
|
|
|
6915
7109
|
init_subject();
|
|
6916
7110
|
init_user_preferences_types();
|
|
6917
7111
|
init_task_label_types();
|
|
7112
|
+
init_team_invite_types();
|
|
6918
7113
|
init_trigger_judge_types();
|
|
6919
7114
|
init_types();
|
|
6920
7115
|
init_wechat_types();
|
|
6921
7116
|
init_wiki_draft_types();
|
|
6922
7117
|
init_ws();
|
|
7118
|
+
init_wiki_page_share_types();
|
|
6923
7119
|
}
|
|
6924
7120
|
});
|
|
6925
7121
|
|
|
@@ -42574,8 +42770,8 @@ var require_client_h2 = __commonJS({
|
|
|
42574
42770
|
this.destroy(err);
|
|
42575
42771
|
util.destroy(this[kSocket], err);
|
|
42576
42772
|
}
|
|
42577
|
-
function onHttp2SessionGoAway(
|
|
42578
|
-
const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${
|
|
42773
|
+
function onHttp2SessionGoAway(errorCode2) {
|
|
42774
|
+
const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode2}`, util.getSocketInfo(this[kSocket]));
|
|
42579
42775
|
const client = this[kClient];
|
|
42580
42776
|
client[kSocket] = null;
|
|
42581
42777
|
client[kHTTPContext] = null;
|
|
@@ -64483,14 +64679,14 @@ var require_receiver2 = __commonJS({
|
|
|
64483
64679
|
* @return {(Error|RangeError)} The error
|
|
64484
64680
|
* @private
|
|
64485
64681
|
*/
|
|
64486
|
-
createError(ErrorCtor, message, prefix, statusCode,
|
|
64682
|
+
createError(ErrorCtor, message, prefix, statusCode, errorCode2) {
|
|
64487
64683
|
this._loop = false;
|
|
64488
64684
|
this._errored = true;
|
|
64489
64685
|
const err = new ErrorCtor(
|
|
64490
64686
|
prefix ? `Invalid WebSocket frame: ${message}` : message
|
|
64491
64687
|
);
|
|
64492
64688
|
Error.captureStackTrace(err, this.createError);
|
|
64493
|
-
err.code =
|
|
64689
|
+
err.code = errorCode2;
|
|
64494
64690
|
err[kStatusCode] = statusCode;
|
|
64495
64691
|
return err;
|
|
64496
64692
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/daemon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.87.0",
|
|
4
4
|
"description": "Parall local agent runtime — daemon supervisor + bridge runtimes, bundled as standalone JS files",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"@opentelemetry/api": "^1.9.0",
|
|
35
35
|
"@pinixai/bb-browser-pro": "0.15.0",
|
|
36
36
|
"ws": "^8.18.0",
|
|
37
|
-
"@parall/sdk": "1.
|
|
38
|
-
"@parall/claude-agent": "1.
|
|
39
|
-
"@parall/
|
|
40
|
-
"@parall/agent-core": "1.
|
|
41
|
-
"@parall/
|
|
37
|
+
"@parall/sdk": "1.87.0",
|
|
38
|
+
"@parall/claude-agent": "1.87.0",
|
|
39
|
+
"@parall/openclaw-agent": "1.87.0",
|
|
40
|
+
"@parall/agent-core": "1.87.0",
|
|
41
|
+
"@parall/codex-agent": "1.87.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^22.0.0",
|