@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
|
@@ -34486,8 +34486,8 @@ var require_client_h2 = __commonJS({
|
|
|
34486
34486
|
this.destroy(err);
|
|
34487
34487
|
util.destroy(this[kSocket], err);
|
|
34488
34488
|
}
|
|
34489
|
-
function onHttp2SessionGoAway(
|
|
34490
|
-
const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${
|
|
34489
|
+
function onHttp2SessionGoAway(errorCode2) {
|
|
34490
|
+
const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode2}`, util.getSocketInfo(this[kSocket]));
|
|
34491
34491
|
const client = this[kClient];
|
|
34492
34492
|
client[kSocket] = null;
|
|
34493
34493
|
client[kHTTPContext] = null;
|
|
@@ -52032,6 +52032,107 @@ function browserViewerRequestOptions(command, opts) {
|
|
|
52032
52032
|
};
|
|
52033
52033
|
}
|
|
52034
52034
|
|
|
52035
|
+
// ts/sdk/dist/wiki-upload.js
|
|
52036
|
+
function createWikiUploadFormData(params) {
|
|
52037
|
+
const form = new FormData();
|
|
52038
|
+
form.append("path", params.path);
|
|
52039
|
+
form.append("file", params.file);
|
|
52040
|
+
if (params.message)
|
|
52041
|
+
form.append("message", params.message);
|
|
52042
|
+
if (params.uploadId)
|
|
52043
|
+
form.append("upload_id", params.uploadId);
|
|
52044
|
+
if (params.conflict)
|
|
52045
|
+
form.append("conflict", params.conflict);
|
|
52046
|
+
if ("contentRoute" in params && params.contentRoute) {
|
|
52047
|
+
form.append("content_route", params.contentRoute);
|
|
52048
|
+
}
|
|
52049
|
+
return form;
|
|
52050
|
+
}
|
|
52051
|
+
function sendMultipartRequest(options) {
|
|
52052
|
+
if (options.onProgress && typeof XMLHttpRequest !== "undefined") {
|
|
52053
|
+
return multipartXHR(options, options.onProgress);
|
|
52054
|
+
}
|
|
52055
|
+
const timeoutSignal = AbortSignal.timeout(options.timeoutMs);
|
|
52056
|
+
const signal = options.signal ? AbortSignal.any([options.signal, timeoutSignal]) : timeoutSignal;
|
|
52057
|
+
return fetch(options.url, {
|
|
52058
|
+
method: options.method,
|
|
52059
|
+
headers: options.headers,
|
|
52060
|
+
body: options.body,
|
|
52061
|
+
signal
|
|
52062
|
+
});
|
|
52063
|
+
}
|
|
52064
|
+
function multipartXHR(options, onProgress) {
|
|
52065
|
+
return new Promise((resolve3, reject) => {
|
|
52066
|
+
const xhr = new XMLHttpRequest();
|
|
52067
|
+
let settled = false;
|
|
52068
|
+
const finish = (fn) => {
|
|
52069
|
+
if (settled)
|
|
52070
|
+
return;
|
|
52071
|
+
settled = true;
|
|
52072
|
+
options.signal?.removeEventListener("abort", abortFromSignal);
|
|
52073
|
+
fn();
|
|
52074
|
+
};
|
|
52075
|
+
const abortFromSignal = () => xhr.abort();
|
|
52076
|
+
xhr.open(options.method, options.url, true);
|
|
52077
|
+
xhr.timeout = options.timeoutMs;
|
|
52078
|
+
for (const [name, value] of Object.entries(options.headers)) {
|
|
52079
|
+
xhr.setRequestHeader(name, value);
|
|
52080
|
+
}
|
|
52081
|
+
xhr.upload.onprogress = (event) => {
|
|
52082
|
+
try {
|
|
52083
|
+
onProgress(event.loaded, event.lengthComputable ? event.total : 0);
|
|
52084
|
+
} catch {
|
|
52085
|
+
}
|
|
52086
|
+
};
|
|
52087
|
+
xhr.onload = () => finish(() => {
|
|
52088
|
+
const responseHeaders = new Headers();
|
|
52089
|
+
for (const line of xhr.getAllResponseHeaders().trim().split(/[\r\n]+/)) {
|
|
52090
|
+
if (!line)
|
|
52091
|
+
continue;
|
|
52092
|
+
const separator = line.indexOf(":");
|
|
52093
|
+
if (separator > 0) {
|
|
52094
|
+
responseHeaders.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());
|
|
52095
|
+
}
|
|
52096
|
+
}
|
|
52097
|
+
const responseBody = xhr.status === 204 || xhr.responseText === "" ? null : xhr.responseText;
|
|
52098
|
+
resolve3(new Response(responseBody, {
|
|
52099
|
+
status: xhr.status,
|
|
52100
|
+
statusText: xhr.statusText,
|
|
52101
|
+
headers: responseHeaders
|
|
52102
|
+
}));
|
|
52103
|
+
});
|
|
52104
|
+
xhr.onerror = () => finish(() => reject(new TypeError("Network request failed")));
|
|
52105
|
+
xhr.ontimeout = () => finish(() => reject(new DOMException("Request timed out", "TimeoutError")));
|
|
52106
|
+
xhr.onabort = () => finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
52107
|
+
if (options.signal?.aborted) {
|
|
52108
|
+
finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
52109
|
+
return;
|
|
52110
|
+
}
|
|
52111
|
+
options.signal?.addEventListener("abort", abortFromSignal, { once: true });
|
|
52112
|
+
xhr.send(options.body);
|
|
52113
|
+
});
|
|
52114
|
+
}
|
|
52115
|
+
|
|
52116
|
+
// ts/sdk/dist/fetch-cause.js
|
|
52117
|
+
var GENERIC_FETCH_MESSAGES = /* @__PURE__ */ new Set(["Failed to fetch", "fetch failed"]);
|
|
52118
|
+
function describeFetchCause(err) {
|
|
52119
|
+
const inner = err?.cause;
|
|
52120
|
+
for (const candidate of [inner, err]) {
|
|
52121
|
+
if (!(candidate instanceof Error))
|
|
52122
|
+
continue;
|
|
52123
|
+
const code = candidate.code;
|
|
52124
|
+
const parts = [];
|
|
52125
|
+
if (typeof code === "string" && code && !candidate.message.includes(code))
|
|
52126
|
+
parts.push(code);
|
|
52127
|
+
if (candidate.message && !GENERIC_FETCH_MESSAGES.has(candidate.message)) {
|
|
52128
|
+
parts.push(candidate.message);
|
|
52129
|
+
}
|
|
52130
|
+
if (parts.length > 0)
|
|
52131
|
+
return parts.join(" ");
|
|
52132
|
+
}
|
|
52133
|
+
return void 0;
|
|
52134
|
+
}
|
|
52135
|
+
|
|
52035
52136
|
// ts/sdk/dist/app-template-endpoints.js
|
|
52036
52137
|
function appTemplateEndpoints(apiBase) {
|
|
52037
52138
|
return {
|
|
@@ -52100,6 +52201,22 @@ function chatTeamGrantEndpoints(apiBase) {
|
|
|
52100
52201
|
};
|
|
52101
52202
|
}
|
|
52102
52203
|
|
|
52204
|
+
// ts/sdk/dist/team-invite-endpoints.js
|
|
52205
|
+
function teamInviteEndpoints(apiBase) {
|
|
52206
|
+
const seg = encodeURIComponent;
|
|
52207
|
+
return {
|
|
52208
|
+
TEMPLATE_INVITE_LINK: (orgId, templateId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link`,
|
|
52209
|
+
TEMPLATE_INVITE_REQUESTS: (orgId, templateId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link/requests`,
|
|
52210
|
+
TEMPLATE_INVITE_REQUEST_DECIDE: (orgId, templateId, requestId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link/requests/${seg(requestId)}/decide`,
|
|
52211
|
+
TEAM_INVITE: (token) => `${apiBase}/team-invites/${seg(token)}`,
|
|
52212
|
+
TEAM_INVITE_TEAMS: (token) => `${apiBase}/team-invites/${seg(token)}/teams`,
|
|
52213
|
+
TEAM_INVITE_REQUESTS: (token) => `${apiBase}/team-invites/${seg(token)}/requests`,
|
|
52214
|
+
TEAM_INVITE_REQUEST_MINE: (token) => `${apiBase}/team-invites/${seg(token)}/requests/mine`,
|
|
52215
|
+
TEAM_INVITE_REQUEST_CANCEL: (requestId) => `${apiBase}/team-invite-requests/${seg(requestId)}/cancel`,
|
|
52216
|
+
TEAM_INVITE_REQUEST_RETRY: (requestId) => `${apiBase}/team-invite-requests/${seg(requestId)}/retry`
|
|
52217
|
+
};
|
|
52218
|
+
}
|
|
52219
|
+
|
|
52103
52220
|
// ts/sdk/dist/wechat-endpoints.js
|
|
52104
52221
|
function wechatEndpoints(apiBase) {
|
|
52105
52222
|
const agentBase = (orgId) => `${apiBase}/orgs/${orgId}/agents/me/wechat`;
|
|
@@ -52139,8 +52256,12 @@ function billingEndpoints(apiBase) {
|
|
|
52139
52256
|
function teamEndpoints(apiBase) {
|
|
52140
52257
|
return {
|
|
52141
52258
|
TEAMS: (orgId) => `${apiBase}/orgs/${orgId}/teams`,
|
|
52259
|
+
/** The whole team tree in one read (team-chart-design.md §5). */
|
|
52260
|
+
TEAM_GRAPH: (orgId) => `${apiBase}/orgs/${orgId}/team-graph`,
|
|
52142
52261
|
TEAM: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}`,
|
|
52143
52262
|
TEAM_PARENT: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
52263
|
+
/** What moving a team would change (team-chart-design.md §7). */
|
|
52264
|
+
TEAM_PARENT_PREVIEW: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent/preview`,
|
|
52144
52265
|
TEAM_MEMBERS: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members`,
|
|
52145
52266
|
TEAM_MEMBER: (orgId, teamId, userId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
52146
52267
|
/** An agent's owning Team (agent-team-attribution-design.md §5.4). */
|
|
@@ -52153,6 +52274,9 @@ var API_BASE2 = "/api/v1";
|
|
|
52153
52274
|
var WIKI_BASE = "/wiki/v1";
|
|
52154
52275
|
var CLIP_BASE = "/clip/v1";
|
|
52155
52276
|
var ENDPOINTS = {
|
|
52277
|
+
WIKI_PAGE_SHARES: (orgId, wikiId) => `/wiki/v1/orgs/${orgId}/wikis/${wikiId}/page-shares`,
|
|
52278
|
+
WIKI_PAGE_SHARE_CANDIDATES: (orgId, wikiId) => `/wiki/v1/orgs/${orgId}/wikis/${wikiId}/page-share-candidates`,
|
|
52279
|
+
WIKI_SHARED_PAGE: (shareId) => `/wiki/v1/shared-pages/${encodeURIComponent(shareId)}`,
|
|
52156
52280
|
// Auth
|
|
52157
52281
|
AUTH_REGISTER: `${API_BASE2}/auth/register`,
|
|
52158
52282
|
AUTH_LOGIN: `${API_BASE2}/auth/login`,
|
|
@@ -52638,6 +52762,8 @@ var ENDPOINTS = {
|
|
|
52638
52762
|
TEMPLATE: (orgId, templateId) => `${API_BASE2}/orgs/${orgId}/templates/${templateId}`,
|
|
52639
52763
|
TEMPLATE_DEPLOYMENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/template-deployments`,
|
|
52640
52764
|
TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${API_BASE2}/orgs/${orgId}/template-deployments/${deploymentId}`,
|
|
52765
|
+
// Team launch / team invite links (public preview + signed-in requests)
|
|
52766
|
+
...teamInviteEndpoints(API_BASE2),
|
|
52641
52767
|
CLIP_DEPENDENCIES_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/clip-dependencies/check`,
|
|
52642
52768
|
// Onboarding wizard progress (org-scoped, self)
|
|
52643
52769
|
ONBOARDING_PROGRESS: (orgId) => `${API_BASE2}/orgs/${orgId}/onboarding`,
|
|
@@ -53916,8 +54042,29 @@ var AgentOwningTeamClient = class extends AgentCallerScopeClient {
|
|
|
53916
54042
|
}
|
|
53917
54043
|
};
|
|
53918
54044
|
|
|
54045
|
+
// ts/sdk/dist/team-graph-client.js
|
|
54046
|
+
var TeamGraphClient = class extends AgentOwningTeamClient {
|
|
54047
|
+
async getTeamGraph(orgId, opts) {
|
|
54048
|
+
const query = opts?.includeAccess ? "?include=access" : "";
|
|
54049
|
+
return this.request("GET", `${ENDPOINTS.TEAM_GRAPH(orgId)}${query}`);
|
|
54050
|
+
}
|
|
54051
|
+
/**
|
|
54052
|
+
* Who would come to see more or less through teams if the team moved under
|
|
54053
|
+
* `parentTeamId`, or to the top level with null, without moving it
|
|
54054
|
+
* (team-chart-design.md §7). Org owners and admins only. Refuses what the move
|
|
54055
|
+
* would refuse, with the same codes. 503 when it cannot compute the whole answer
|
|
54056
|
+
* (`TEAM_MOVE_PREVIEW_WIKI_UNAVAILABLE`, `TEAM_MOVE_PREVIEW_TIMEOUT`,
|
|
54057
|
+
* `TEAM_MOVE_PREVIEW_TOO_LARGE`). Send `tree_revision` back on `setTeamParent`.
|
|
54058
|
+
*/
|
|
54059
|
+
async previewTeamMove(orgId, teamId, parentTeamId) {
|
|
54060
|
+
return this.request("POST", ENDPOINTS.TEAM_PARENT_PREVIEW(orgId, teamId), {
|
|
54061
|
+
parent_team_id: parentTeamId
|
|
54062
|
+
});
|
|
54063
|
+
}
|
|
54064
|
+
};
|
|
54065
|
+
|
|
53919
54066
|
// ts/sdk/dist/billing-client.js
|
|
53920
|
-
var BillingClient = class extends
|
|
54067
|
+
var BillingClient = class extends TeamGraphClient {
|
|
53921
54068
|
// ---- Billing & Credits (org-scoped) ----
|
|
53922
54069
|
//
|
|
53923
54070
|
// Every account method takes an optional trailing accountId: omitted, it
|
|
@@ -54039,106 +54186,97 @@ var BillingClient = class extends AgentOwningTeamClient {
|
|
|
54039
54186
|
}
|
|
54040
54187
|
};
|
|
54041
54188
|
|
|
54042
|
-
// ts/sdk/dist/
|
|
54043
|
-
|
|
54044
|
-
|
|
54045
|
-
|
|
54046
|
-
|
|
54047
|
-
|
|
54048
|
-
|
|
54049
|
-
|
|
54050
|
-
|
|
54051
|
-
|
|
54052
|
-
|
|
54053
|
-
|
|
54054
|
-
form.append("content_route", params.contentRoute);
|
|
54189
|
+
// ts/sdk/dist/team-invite-client.js
|
|
54190
|
+
var TeamInviteClient = class extends BillingClient {
|
|
54191
|
+
/** Org owner/admin: the template's current launch link, or null while it
|
|
54192
|
+
* has none (`TEAM_INVITE_LINK_NOT_FOUND`). Never creates one. */
|
|
54193
|
+
async getTemplateInviteLink(orgId, templateId) {
|
|
54194
|
+
try {
|
|
54195
|
+
return await this.request("GET", ENDPOINTS.TEMPLATE_INVITE_LINK(orgId, templateId));
|
|
54196
|
+
} catch (err) {
|
|
54197
|
+
if (errorCode(err) === "TEAM_INVITE_LINK_NOT_FOUND")
|
|
54198
|
+
return null;
|
|
54199
|
+
throw err;
|
|
54200
|
+
}
|
|
54055
54201
|
}
|
|
54056
|
-
|
|
54057
|
-
|
|
54058
|
-
|
|
54059
|
-
|
|
54060
|
-
|
|
54202
|
+
/** Org owner/admin: a new launch link, replacing the template's previous
|
|
54203
|
+
* one, whose URL stops working. Every new team waits for an admin's
|
|
54204
|
+
* approval unless `requireApproval` is false (the server's default is
|
|
54205
|
+
* true). */
|
|
54206
|
+
async createTemplateInviteLink(orgId, templateId, options = {}) {
|
|
54207
|
+
return this.request("POST", ENDPOINTS.TEMPLATE_INVITE_LINK(orgId, templateId), options.requireApproval !== void 0 ? { require_approval: options.requireApproval } : {});
|
|
54208
|
+
}
|
|
54209
|
+
/** Org owner/admin: the requests waiting for approval on the template's
|
|
54210
|
+
* current link, oldest first. */
|
|
54211
|
+
async listTemplateInviteRequests(orgId, templateId) {
|
|
54212
|
+
const res = await this.request("GET", ENDPOINTS.TEMPLATE_INVITE_REQUESTS(orgId, templateId));
|
|
54213
|
+
return res.requests ?? [];
|
|
54214
|
+
}
|
|
54215
|
+
/** Org owner/admin: approve or decline a waiting request. Approving brings
|
|
54216
|
+
* a requester from outside the org in as a member and starts their team.
|
|
54217
|
+
* `ALREADY_DECIDED` (409) when someone decided first. */
|
|
54218
|
+
async decideTemplateInviteRequest(orgId, templateId, requestId, decision) {
|
|
54219
|
+
return this.request("POST", ENDPOINTS.TEMPLATE_INVITE_REQUEST_DECIDE(orgId, templateId, requestId), { decision });
|
|
54220
|
+
}
|
|
54221
|
+
/** Public, no login needed: what a link shows before anyone signs in.
|
|
54222
|
+
* `TEAM_INVITE_NOT_FOUND` (404) for an unknown, revoked or switched-off
|
|
54223
|
+
* link; `TEAM_INVITE_EXPIRED` (410) once it lapsed. */
|
|
54224
|
+
async getTeamInvite(token) {
|
|
54225
|
+
return this.request("GET", ENDPOINTS.TEAM_INVITE(token));
|
|
54226
|
+
}
|
|
54227
|
+
/** Signed in: the org's Teams to pick from on a launch link, the caller's
|
|
54228
|
+
* own first, each marked with whether it has (or is getting) the squad and
|
|
54229
|
+
* which Team account would pay. */
|
|
54230
|
+
async getTeamInviteTeams(token) {
|
|
54231
|
+
const res = await this.request("GET", ENDPOINTS.TEAM_INVITE_TEAMS(token));
|
|
54232
|
+
return res.teams ?? [];
|
|
54233
|
+
}
|
|
54234
|
+
/** Ask for a team through a link: pick an existing one (`team_id`) or name
|
|
54235
|
+
* a new one. Submitting again returns the caller's open request instead of
|
|
54236
|
+
* making another. */
|
|
54237
|
+
async createTeamInviteRequest(token, body) {
|
|
54238
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUESTS(token), body);
|
|
54239
|
+
}
|
|
54240
|
+
/** The caller's latest request through this link, with its derived phase.
|
|
54241
|
+
* `TEAM_INVITE_REQUEST_NOT_FOUND` (404) while they have none. */
|
|
54242
|
+
async getMyTeamInviteRequest(token) {
|
|
54243
|
+
return this.request("GET", ENDPOINTS.TEAM_INVITE_REQUEST_MINE(token));
|
|
54244
|
+
}
|
|
54245
|
+
/** The requester withdraws a request that is still waiting. */
|
|
54246
|
+
async cancelTeamInviteRequest(requestId) {
|
|
54247
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUEST_CANCEL(requestId));
|
|
54248
|
+
}
|
|
54249
|
+
/** The requester retries a failed launch; the server never makes a second
|
|
54250
|
+
* squad for the same request. */
|
|
54251
|
+
async retryTeamInviteRequest(requestId) {
|
|
54252
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUEST_RETRY(requestId));
|
|
54061
54253
|
}
|
|
54062
|
-
|
|
54063
|
-
|
|
54064
|
-
return
|
|
54065
|
-
method: options.method,
|
|
54066
|
-
headers: options.headers,
|
|
54067
|
-
body: options.body,
|
|
54068
|
-
signal
|
|
54069
|
-
});
|
|
54070
|
-
}
|
|
54071
|
-
function multipartXHR(options, onProgress) {
|
|
54072
|
-
return new Promise((resolve3, reject) => {
|
|
54073
|
-
const xhr = new XMLHttpRequest();
|
|
54074
|
-
let settled = false;
|
|
54075
|
-
const finish = (fn) => {
|
|
54076
|
-
if (settled)
|
|
54077
|
-
return;
|
|
54078
|
-
settled = true;
|
|
54079
|
-
options.signal?.removeEventListener("abort", abortFromSignal);
|
|
54080
|
-
fn();
|
|
54081
|
-
};
|
|
54082
|
-
const abortFromSignal = () => xhr.abort();
|
|
54083
|
-
xhr.open(options.method, options.url, true);
|
|
54084
|
-
xhr.timeout = options.timeoutMs;
|
|
54085
|
-
for (const [name, value] of Object.entries(options.headers)) {
|
|
54086
|
-
xhr.setRequestHeader(name, value);
|
|
54087
|
-
}
|
|
54088
|
-
xhr.upload.onprogress = (event) => {
|
|
54089
|
-
try {
|
|
54090
|
-
onProgress(event.loaded, event.lengthComputable ? event.total : 0);
|
|
54091
|
-
} catch {
|
|
54092
|
-
}
|
|
54093
|
-
};
|
|
54094
|
-
xhr.onload = () => finish(() => {
|
|
54095
|
-
const responseHeaders = new Headers();
|
|
54096
|
-
for (const line of xhr.getAllResponseHeaders().trim().split(/[\r\n]+/)) {
|
|
54097
|
-
if (!line)
|
|
54098
|
-
continue;
|
|
54099
|
-
const separator = line.indexOf(":");
|
|
54100
|
-
if (separator > 0) {
|
|
54101
|
-
responseHeaders.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());
|
|
54102
|
-
}
|
|
54103
|
-
}
|
|
54104
|
-
const responseBody = xhr.status === 204 || xhr.responseText === "" ? null : xhr.responseText;
|
|
54105
|
-
resolve3(new Response(responseBody, {
|
|
54106
|
-
status: xhr.status,
|
|
54107
|
-
statusText: xhr.statusText,
|
|
54108
|
-
headers: responseHeaders
|
|
54109
|
-
}));
|
|
54110
|
-
});
|
|
54111
|
-
xhr.onerror = () => finish(() => reject(new TypeError("Network request failed")));
|
|
54112
|
-
xhr.ontimeout = () => finish(() => reject(new DOMException("Request timed out", "TimeoutError")));
|
|
54113
|
-
xhr.onabort = () => finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
54114
|
-
if (options.signal?.aborted) {
|
|
54115
|
-
finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
54116
|
-
return;
|
|
54117
|
-
}
|
|
54118
|
-
options.signal?.addEventListener("abort", abortFromSignal, { once: true });
|
|
54119
|
-
xhr.send(options.body);
|
|
54120
|
-
});
|
|
54254
|
+
};
|
|
54255
|
+
function errorCode(err) {
|
|
54256
|
+
return typeof err === "object" && err !== null ? err.code : void 0;
|
|
54121
54257
|
}
|
|
54122
54258
|
|
|
54123
|
-
// ts/sdk/dist/
|
|
54124
|
-
var
|
|
54125
|
-
|
|
54126
|
-
|
|
54127
|
-
|
|
54128
|
-
if (!(candidate instanceof Error))
|
|
54129
|
-
continue;
|
|
54130
|
-
const code = candidate.code;
|
|
54131
|
-
const parts = [];
|
|
54132
|
-
if (typeof code === "string" && code && !candidate.message.includes(code))
|
|
54133
|
-
parts.push(code);
|
|
54134
|
-
if (candidate.message && !GENERIC_FETCH_MESSAGES.has(candidate.message)) {
|
|
54135
|
-
parts.push(candidate.message);
|
|
54136
|
-
}
|
|
54137
|
-
if (parts.length > 0)
|
|
54138
|
-
return parts.join(" ");
|
|
54259
|
+
// ts/sdk/dist/wiki-page-share-client.js
|
|
54260
|
+
var WikiPageShareClient = class extends TeamInviteClient {
|
|
54261
|
+
async listWikiPageShares(orgId, wikiId, path15) {
|
|
54262
|
+
const res = await this.request("GET", ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId), void 0, { path: path15 });
|
|
54263
|
+
return res.data;
|
|
54139
54264
|
}
|
|
54140
|
-
|
|
54141
|
-
}
|
|
54265
|
+
async createWikiPageShare(orgId, wikiId, path15, userId) {
|
|
54266
|
+
return this.request("POST", ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId), { user_id: userId }, { path: path15 });
|
|
54267
|
+
}
|
|
54268
|
+
async revokeWikiPageShare(orgId, wikiId, path15, shareId) {
|
|
54269
|
+
return this.request("DELETE", `${ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId)}/${encodeURIComponent(shareId)}`, void 0, { path: path15 });
|
|
54270
|
+
}
|
|
54271
|
+
async listWikiShareCandidates(orgId, wikiId, path15, q = "") {
|
|
54272
|
+
const res = await this.request("GET", ENDPOINTS.WIKI_PAGE_SHARE_CANDIDATES(orgId, wikiId), void 0, { path: path15, q });
|
|
54273
|
+
return res.data;
|
|
54274
|
+
}
|
|
54275
|
+
/** No path or ref override: the server always reads the shared page on main. */
|
|
54276
|
+
async getSharedWikiPage(shareId, opts) {
|
|
54277
|
+
return this.request("GET", ENDPOINTS.WIKI_SHARED_PAGE(shareId), void 0, void 0, false, opts);
|
|
54278
|
+
}
|
|
54279
|
+
};
|
|
54142
54280
|
|
|
54143
54281
|
// ts/sdk/dist/wiki-changeset.js
|
|
54144
54282
|
function normalizeWikiChangeset(changeset) {
|
|
@@ -54175,7 +54313,7 @@ function legacyHeartbeatFromReport(report) {
|
|
|
54175
54313
|
detectedRuntimes
|
|
54176
54314
|
};
|
|
54177
54315
|
}
|
|
54178
|
-
var ParallClient = class _ParallClient extends
|
|
54316
|
+
var ParallClient = class _ParallClient extends WikiPageShareClient {
|
|
54179
54317
|
baseUrl;
|
|
54180
54318
|
wikiBaseUrl;
|
|
54181
54319
|
token;
|
|
@@ -54576,10 +54714,16 @@ var ParallClient = class _ParallClient extends BillingClient {
|
|
|
54576
54714
|
async deleteTeam(orgId, teamId) {
|
|
54577
54715
|
return this.request("DELETE", ENDPOINTS.TEAM(orgId, teamId));
|
|
54578
54716
|
}
|
|
54579
|
-
/**
|
|
54580
|
-
|
|
54717
|
+
/**
|
|
54718
|
+
* Moves a team under `parentTeamId`, or to the top level with null. Org-admin
|
|
54719
|
+
* action. `expectedTreeRevision` is the revision the move's preview returned: if
|
|
54720
|
+
* the org's team tree changed since, nothing moves and it answers 409
|
|
54721
|
+
* `TEAM_TREE_CHANGED`. Without it nothing is checked.
|
|
54722
|
+
*/
|
|
54723
|
+
async setTeamParent(orgId, teamId, parentTeamId, opts) {
|
|
54581
54724
|
return this.request("PUT", ENDPOINTS.TEAM_PARENT(orgId, teamId), {
|
|
54582
|
-
parent_team_id: parentTeamId
|
|
54725
|
+
parent_team_id: parentTeamId,
|
|
54726
|
+
...opts?.expectedTreeRevision ? { expected_tree_revision: opts.expectedTreeRevision } : {}
|
|
54583
54727
|
});
|
|
54584
54728
|
}
|
|
54585
54729
|
/** Roster with display info, minus members who left the org; `includeSubteams` adds subteam rows. */
|
|
@@ -57883,6 +58027,11 @@ The conversation history above is the main session's context, not your task. Do
|
|
|
57883
58027
|
|
|
57884
58028
|
End with a brief "Fork summary": what you did, where you replied, and anything the main session should know.]
|
|
57885
58029
|
|
|
58030
|
+
`;
|
|
58031
|
+
}
|
|
58032
|
+
function buildForkSteerNotice(event) {
|
|
58033
|
+
return `[Fork scope: the message(s) below arrived from ${forkScopeLabel(event)} while you were working \u2014 the same place as the event this fork was opened for. They are yours too: handle them as you would that event, replying where they came from when they call for a reply. The main session will not answer them.]
|
|
58034
|
+
|
|
57886
58035
|
`;
|
|
57887
58036
|
}
|
|
57888
58037
|
function forkResultBlocks(results) {
|
|
@@ -58191,7 +58340,8 @@ async function steerLaneMessageInner(host, event, runner) {
|
|
|
58191
58340
|
if (!folded.frame)
|
|
58192
58341
|
return;
|
|
58193
58342
|
event.frame = folded.frame;
|
|
58194
|
-
const
|
|
58343
|
+
const body = runner.fork ? buildForkSteerNotice(event) + eventBody(event) : eventBody(event);
|
|
58344
|
+
const injected = await adapter.enqueueDuringDispatch(runner.sessionKey, body, folded.inputLifecycle);
|
|
58195
58345
|
if (injected) {
|
|
58196
58346
|
runner.injected.add(event);
|
|
58197
58347
|
ledger.markSeen(event, folded.covered);
|