@parall/daemon 1.84.0 → 1.86.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 +387 -214
- package/bundle/parall-claude-agent.js +397 -213
- package/bundle/parall-codex-agent.js +397 -213
- package/bundle/parall-daemon.js +465 -218
- 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 signal2 = 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: signal2
|
|
52062
|
+
});
|
|
52063
|
+
}
|
|
52064
|
+
function multipartXHR(options, onProgress) {
|
|
52065
|
+
return new Promise((resolve4, 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
|
+
resolve4(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,21 @@ 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_REQUESTS: (token) => `${apiBase}/team-invites/${seg(token)}/requests`,
|
|
52213
|
+
TEAM_INVITE_REQUEST_MINE: (token) => `${apiBase}/team-invites/${seg(token)}/requests/mine`,
|
|
52214
|
+
TEAM_INVITE_REQUEST_CANCEL: (requestId) => `${apiBase}/team-invite-requests/${seg(requestId)}/cancel`,
|
|
52215
|
+
TEAM_INVITE_REQUEST_RETRY: (requestId) => `${apiBase}/team-invite-requests/${seg(requestId)}/retry`
|
|
52216
|
+
};
|
|
52217
|
+
}
|
|
52218
|
+
|
|
52103
52219
|
// ts/sdk/dist/wechat-endpoints.js
|
|
52104
52220
|
function wechatEndpoints(apiBase) {
|
|
52105
52221
|
const agentBase = (orgId) => `${apiBase}/orgs/${orgId}/agents/me/wechat`;
|
|
@@ -52113,6 +52229,45 @@ function wechatEndpoints(apiBase) {
|
|
|
52113
52229
|
};
|
|
52114
52230
|
}
|
|
52115
52231
|
|
|
52232
|
+
// ts/sdk/dist/billing-endpoints.js
|
|
52233
|
+
function billingEndpoints(apiBase) {
|
|
52234
|
+
const billingBase = (orgId, accountId) => accountId ? `${apiBase}/orgs/${orgId}/billing/accounts/${accountId}` : `${apiBase}/orgs/${orgId}/billing`;
|
|
52235
|
+
return {
|
|
52236
|
+
// Billing & Credits (org-scoped). An account's endpoints live under
|
|
52237
|
+
// /billing/accounts/{accountId}; without an accountId they are the org's
|
|
52238
|
+
// own account's /billing routes.
|
|
52239
|
+
BILLING: (orgId, accountId) => billingBase(orgId, accountId),
|
|
52240
|
+
BILLING_TRANSACTIONS: (orgId, accountId) => `${billingBase(orgId, accountId)}/transactions`,
|
|
52241
|
+
BILLING_CHECKOUT: (orgId, accountId) => `${billingBase(orgId, accountId)}/checkout`,
|
|
52242
|
+
BILLING_AUTO_RELOAD: (orgId, accountId) => `${billingBase(orgId, accountId)}/auto-reload`,
|
|
52243
|
+
BILLING_SETUP_INTENT: (orgId, accountId) => `${billingBase(orgId, accountId)}/setup-intent`,
|
|
52244
|
+
BILLING_PORTAL_SESSION: (orgId, accountId) => `${billingBase(orgId, accountId)}/portal-session`,
|
|
52245
|
+
BILLING_USAGE_DAILY: (orgId, accountId) => `${billingBase(orgId, accountId)}/usage-daily`,
|
|
52246
|
+
BILLING_USAGE_HEATMAP: (orgId, accountId) => `${billingBase(orgId, accountId)}/usage-heatmap`,
|
|
52247
|
+
BILLING_ACCOUNTS: (orgId) => `${apiBase}/orgs/${orgId}/billing/accounts`,
|
|
52248
|
+
BILLING_ACCOUNT_CLOSE: (orgId, accountId) => `${apiBase}/orgs/${orgId}/billing/accounts/${accountId}/close`,
|
|
52249
|
+
BILLING_SETTINGS: (orgId) => `${apiBase}/orgs/${orgId}/billing/settings`,
|
|
52250
|
+
COMPUTE_PRICING: () => `${apiBase}/billing/compute-pricing`
|
|
52251
|
+
};
|
|
52252
|
+
}
|
|
52253
|
+
|
|
52254
|
+
// ts/sdk/dist/team-endpoints.js
|
|
52255
|
+
function teamEndpoints(apiBase) {
|
|
52256
|
+
return {
|
|
52257
|
+
TEAMS: (orgId) => `${apiBase}/orgs/${orgId}/teams`,
|
|
52258
|
+
/** The whole team tree in one read (team-chart-design.md §5). */
|
|
52259
|
+
TEAM_GRAPH: (orgId) => `${apiBase}/orgs/${orgId}/team-graph`,
|
|
52260
|
+
TEAM: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}`,
|
|
52261
|
+
TEAM_PARENT: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
52262
|
+
/** What moving a team would change (team-chart-design.md §7). */
|
|
52263
|
+
TEAM_PARENT_PREVIEW: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent/preview`,
|
|
52264
|
+
TEAM_MEMBERS: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members`,
|
|
52265
|
+
TEAM_MEMBER: (orgId, teamId, userId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
52266
|
+
/** An agent's owning Team (agent-team-attribution-design.md §5.4). */
|
|
52267
|
+
AGENT_OWNING_TEAM: (orgId, agentId) => `${apiBase}/orgs/${orgId}/agents/${agentId}/owning-team`
|
|
52268
|
+
};
|
|
52269
|
+
}
|
|
52270
|
+
|
|
52116
52271
|
// ts/sdk/dist/constants.js
|
|
52117
52272
|
var API_BASE2 = "/api/v1";
|
|
52118
52273
|
var WIKI_BASE = "/wiki/v1";
|
|
@@ -52145,11 +52300,7 @@ var ENDPOINTS = {
|
|
|
52145
52300
|
ORG: (orgId) => `${API_BASE2}/orgs/${orgId}`,
|
|
52146
52301
|
ORG_MEMBERS: (orgId) => `${API_BASE2}/orgs/${orgId}/members`,
|
|
52147
52302
|
ORG_MEMBERS_FORMER: (orgId) => `${API_BASE2}/orgs/${orgId}/members/former`,
|
|
52148
|
-
|
|
52149
|
-
TEAM: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}`,
|
|
52150
|
-
TEAM_PARENT: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
52151
|
-
TEAM_MEMBERS: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members`,
|
|
52152
|
-
TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
52303
|
+
...teamEndpoints(API_BASE2),
|
|
52153
52304
|
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE2}/orgs/${orgId}/members/online`,
|
|
52154
52305
|
LLM_PROVIDERS: (orgId) => `${API_BASE2}/orgs/${orgId}/llm-providers`,
|
|
52155
52306
|
LLM_PROVIDER: (orgId, providerId) => `${API_BASE2}/orgs/${orgId}/llm-providers/${providerId}`,
|
|
@@ -52607,19 +52758,12 @@ var ENDPOINTS = {
|
|
|
52607
52758
|
TEMPLATE: (orgId, templateId) => `${API_BASE2}/orgs/${orgId}/templates/${templateId}`,
|
|
52608
52759
|
TEMPLATE_DEPLOYMENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/template-deployments`,
|
|
52609
52760
|
TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${API_BASE2}/orgs/${orgId}/template-deployments/${deploymentId}`,
|
|
52761
|
+
// Team launch / team invite links (public preview + signed-in requests)
|
|
52762
|
+
...teamInviteEndpoints(API_BASE2),
|
|
52610
52763
|
CLIP_DEPENDENCIES_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/clip-dependencies/check`,
|
|
52611
52764
|
// Onboarding wizard progress (org-scoped, self)
|
|
52612
52765
|
ONBOARDING_PROGRESS: (orgId) => `${API_BASE2}/orgs/${orgId}/onboarding`,
|
|
52613
|
-
|
|
52614
|
-
BILLING: (orgId) => `${API_BASE2}/orgs/${orgId}/billing`,
|
|
52615
|
-
BILLING_TRANSACTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/transactions`,
|
|
52616
|
-
BILLING_CHECKOUT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/checkout`,
|
|
52617
|
-
BILLING_AUTO_RELOAD: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/auto-reload`,
|
|
52618
|
-
BILLING_SETUP_INTENT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/setup-intent`,
|
|
52619
|
-
BILLING_PORTAL_SESSION: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/portal-session`,
|
|
52620
|
-
BILLING_USAGE_DAILY: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/usage-daily`,
|
|
52621
|
-
BILLING_USAGE_HEATMAP: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/usage-heatmap`,
|
|
52622
|
-
COMPUTE_PRICING: () => `${API_BASE2}/billing/compute-pricing`,
|
|
52766
|
+
...billingEndpoints(API_BASE2),
|
|
52623
52767
|
// Runtime capability table (public, no auth) — SSOT for the create/settings
|
|
52624
52768
|
// interlock: per-runtime compute modes, native model family, cross-family
|
|
52625
52769
|
// availability, and recommended model.
|
|
@@ -53882,105 +54026,222 @@ var AgentCallerScopeClient = class extends ChatTeamGrantClient {
|
|
|
53882
54026
|
}
|
|
53883
54027
|
};
|
|
53884
54028
|
|
|
53885
|
-
// ts/sdk/dist/
|
|
53886
|
-
|
|
53887
|
-
|
|
53888
|
-
|
|
53889
|
-
|
|
53890
|
-
|
|
53891
|
-
|
|
53892
|
-
|
|
53893
|
-
|
|
53894
|
-
if (params.conflict)
|
|
53895
|
-
form.append("conflict", params.conflict);
|
|
53896
|
-
if ("contentRoute" in params && params.contentRoute) {
|
|
53897
|
-
form.append("content_route", params.contentRoute);
|
|
54029
|
+
// ts/sdk/dist/agent-owning-team-client.js
|
|
54030
|
+
var AgentOwningTeamClient = class extends AgentCallerScopeClient {
|
|
54031
|
+
/**
|
|
54032
|
+
* Moves the agent to another Team, or to the organization with `team_id`
|
|
54033
|
+
* null. Pass the Team you saw as `expected_team_id`: someone else's change
|
|
54034
|
+
* in between answers 409 OWNING_TEAM_CHANGED.
|
|
54035
|
+
*/
|
|
54036
|
+
async setAgentOwningTeam(orgId, agentId, req) {
|
|
54037
|
+
return this.request("PUT", ENDPOINTS.AGENT_OWNING_TEAM(orgId, agentId), req);
|
|
53898
54038
|
}
|
|
53899
|
-
|
|
53900
|
-
|
|
53901
|
-
|
|
53902
|
-
|
|
53903
|
-
|
|
54039
|
+
};
|
|
54040
|
+
|
|
54041
|
+
// ts/sdk/dist/team-graph-client.js
|
|
54042
|
+
var TeamGraphClient = class extends AgentOwningTeamClient {
|
|
54043
|
+
async getTeamGraph(orgId, opts) {
|
|
54044
|
+
const query = opts?.includeAccess ? "?include=access" : "";
|
|
54045
|
+
return this.request("GET", `${ENDPOINTS.TEAM_GRAPH(orgId)}${query}`);
|
|
53904
54046
|
}
|
|
53905
|
-
|
|
53906
|
-
|
|
53907
|
-
|
|
53908
|
-
|
|
53909
|
-
|
|
53910
|
-
|
|
53911
|
-
|
|
53912
|
-
|
|
53913
|
-
|
|
53914
|
-
|
|
53915
|
-
|
|
53916
|
-
const xhr = new XMLHttpRequest();
|
|
53917
|
-
let settled = false;
|
|
53918
|
-
const finish = (fn) => {
|
|
53919
|
-
if (settled)
|
|
53920
|
-
return;
|
|
53921
|
-
settled = true;
|
|
53922
|
-
options.signal?.removeEventListener("abort", abortFromSignal);
|
|
53923
|
-
fn();
|
|
53924
|
-
};
|
|
53925
|
-
const abortFromSignal = () => xhr.abort();
|
|
53926
|
-
xhr.open(options.method, options.url, true);
|
|
53927
|
-
xhr.timeout = options.timeoutMs;
|
|
53928
|
-
for (const [name, value] of Object.entries(options.headers)) {
|
|
53929
|
-
xhr.setRequestHeader(name, value);
|
|
53930
|
-
}
|
|
53931
|
-
xhr.upload.onprogress = (event) => {
|
|
53932
|
-
try {
|
|
53933
|
-
onProgress(event.loaded, event.lengthComputable ? event.total : 0);
|
|
53934
|
-
} catch {
|
|
53935
|
-
}
|
|
53936
|
-
};
|
|
53937
|
-
xhr.onload = () => finish(() => {
|
|
53938
|
-
const responseHeaders = new Headers();
|
|
53939
|
-
for (const line of xhr.getAllResponseHeaders().trim().split(/[\r\n]+/)) {
|
|
53940
|
-
if (!line)
|
|
53941
|
-
continue;
|
|
53942
|
-
const separator = line.indexOf(":");
|
|
53943
|
-
if (separator > 0) {
|
|
53944
|
-
responseHeaders.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());
|
|
53945
|
-
}
|
|
53946
|
-
}
|
|
53947
|
-
const responseBody = xhr.status === 204 || xhr.responseText === "" ? null : xhr.responseText;
|
|
53948
|
-
resolve4(new Response(responseBody, {
|
|
53949
|
-
status: xhr.status,
|
|
53950
|
-
statusText: xhr.statusText,
|
|
53951
|
-
headers: responseHeaders
|
|
53952
|
-
}));
|
|
54047
|
+
/**
|
|
54048
|
+
* Who would come to see more or less through teams if the team moved under
|
|
54049
|
+
* `parentTeamId`, or to the top level with null, without moving it
|
|
54050
|
+
* (team-chart-design.md §7). Org owners and admins only. Refuses what the move
|
|
54051
|
+
* would refuse, with the same codes. 503 when it cannot compute the whole answer
|
|
54052
|
+
* (`TEAM_MOVE_PREVIEW_WIKI_UNAVAILABLE`, `TEAM_MOVE_PREVIEW_TIMEOUT`,
|
|
54053
|
+
* `TEAM_MOVE_PREVIEW_TOO_LARGE`). Send `tree_revision` back on `setTeamParent`.
|
|
54054
|
+
*/
|
|
54055
|
+
async previewTeamMove(orgId, teamId, parentTeamId) {
|
|
54056
|
+
return this.request("POST", ENDPOINTS.TEAM_PARENT_PREVIEW(orgId, teamId), {
|
|
54057
|
+
parent_team_id: parentTeamId
|
|
53953
54058
|
});
|
|
53954
|
-
|
|
53955
|
-
|
|
53956
|
-
xhr.onabort = () => finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
53957
|
-
if (options.signal?.aborted) {
|
|
53958
|
-
finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
53959
|
-
return;
|
|
53960
|
-
}
|
|
53961
|
-
options.signal?.addEventListener("abort", abortFromSignal, { once: true });
|
|
53962
|
-
xhr.send(options.body);
|
|
53963
|
-
});
|
|
53964
|
-
}
|
|
54059
|
+
}
|
|
54060
|
+
};
|
|
53965
54061
|
|
|
53966
|
-
// ts/sdk/dist/
|
|
53967
|
-
var
|
|
53968
|
-
|
|
53969
|
-
|
|
53970
|
-
|
|
53971
|
-
|
|
53972
|
-
|
|
53973
|
-
|
|
53974
|
-
|
|
53975
|
-
|
|
53976
|
-
|
|
53977
|
-
|
|
53978
|
-
|
|
54062
|
+
// ts/sdk/dist/billing-client.js
|
|
54063
|
+
var BillingClient = class extends TeamGraphClient {
|
|
54064
|
+
// ---- Billing & Credits (org-scoped) ----
|
|
54065
|
+
//
|
|
54066
|
+
// Every account method takes an optional trailing accountId: omitted, it
|
|
54067
|
+
// acts on the org's own account through the org's /billing routes; given,
|
|
54068
|
+
// on that account under /billing/accounts/{accountId}.
|
|
54069
|
+
async getBilling(orgId, accountId) {
|
|
54070
|
+
return this.request("GET", ENDPOINTS.BILLING(orgId, accountId));
|
|
54071
|
+
}
|
|
54072
|
+
async getUsageDaily(orgId, opts, accountId) {
|
|
54073
|
+
const params = new URLSearchParams();
|
|
54074
|
+
params.set("start_date", opts.start_date);
|
|
54075
|
+
params.set("end_date", opts.end_date);
|
|
54076
|
+
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_DAILY(orgId, accountId)}?${params}`);
|
|
54077
|
+
}
|
|
54078
|
+
async getUsageHeatmap(orgId, opts, accountId) {
|
|
54079
|
+
const params = new URLSearchParams();
|
|
54080
|
+
params.set("start_time", opts.start_time);
|
|
54081
|
+
if (opts.limit != null)
|
|
54082
|
+
params.set("limit", String(opts.limit));
|
|
54083
|
+
if (opts.offset != null)
|
|
54084
|
+
params.set("offset", String(opts.offset));
|
|
54085
|
+
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_HEATMAP(orgId, accountId)}?${params}`);
|
|
54086
|
+
}
|
|
54087
|
+
async listBillingTransactions(orgId, opts, accountId) {
|
|
54088
|
+
const params = new URLSearchParams();
|
|
54089
|
+
if (opts?.cursor)
|
|
54090
|
+
params.set("cursor", opts.cursor);
|
|
54091
|
+
if (opts?.limit)
|
|
54092
|
+
params.set("limit", String(opts.limit));
|
|
54093
|
+
if (opts?.types?.length)
|
|
54094
|
+
params.set("types", opts.types.join(","));
|
|
54095
|
+
if (opts?.user_id)
|
|
54096
|
+
params.set("user_id", opts.user_id);
|
|
54097
|
+
if (opts?.unresolved_actor)
|
|
54098
|
+
params.set("unresolved_actor", "true");
|
|
54099
|
+
if (opts?.machine_id)
|
|
54100
|
+
params.set("machine_id", opts.machine_id);
|
|
54101
|
+
if (opts?.unresolved_machine)
|
|
54102
|
+
params.set("unresolved_machine", "true");
|
|
54103
|
+
if (opts?.from)
|
|
54104
|
+
params.set("from", opts.from);
|
|
54105
|
+
if (opts?.to)
|
|
54106
|
+
params.set("to", opts.to);
|
|
54107
|
+
const qs = params.toString();
|
|
54108
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}${qs ? `?${qs}` : ""}`);
|
|
54109
|
+
}
|
|
54110
|
+
async listBillingTransactionAgentGroups(orgId, opts, accountId) {
|
|
54111
|
+
const params = new URLSearchParams({ group_by: "agent" });
|
|
54112
|
+
if (opts?.from)
|
|
54113
|
+
params.set("from", opts.from);
|
|
54114
|
+
if (opts?.to)
|
|
54115
|
+
params.set("to", opts.to);
|
|
54116
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}?${params}`);
|
|
54117
|
+
}
|
|
54118
|
+
async listBillingTransactionMachineGroups(orgId, opts, accountId) {
|
|
54119
|
+
const params = new URLSearchParams({ group_by: "machine" });
|
|
54120
|
+
if (opts?.from)
|
|
54121
|
+
params.set("from", opts.from);
|
|
54122
|
+
if (opts?.to)
|
|
54123
|
+
params.set("to", opts.to);
|
|
54124
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}?${params}`);
|
|
54125
|
+
}
|
|
54126
|
+
async createCheckout(orgId, req, accountId) {
|
|
54127
|
+
return this.request("POST", ENDPOINTS.BILLING_CHECKOUT(orgId, accountId), req);
|
|
54128
|
+
}
|
|
54129
|
+
/**
|
|
54130
|
+
* Creates a Stripe-hosted card-collection session (Checkout in mode=setup)
|
|
54131
|
+
* and returns the redirect URL. The frontend navigates to `setup_url` and
|
|
54132
|
+
* Stripe handles the card form; the resulting payment_method is recorded
|
|
54133
|
+
* server-side via the `setup_intent.succeeded` webhook. Mirrors
|
|
54134
|
+
* `POST /billing/setup-intent`.
|
|
54135
|
+
*/
|
|
54136
|
+
async createSetupIntent(orgId, req, accountId) {
|
|
54137
|
+
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId, accountId), req);
|
|
54138
|
+
}
|
|
54139
|
+
/**
|
|
54140
|
+
* Returns a link to the Stripe-hosted customer portal for the account,
|
|
54141
|
+
* where its managers download invoices and edit the billing details
|
|
54142
|
+
* printed on them. Mirrors `POST /billing/portal-session`.
|
|
54143
|
+
*/
|
|
54144
|
+
async createBillingPortalSession(orgId, accountId) {
|
|
54145
|
+
return this.request("POST", ENDPOINTS.BILLING_PORTAL_SESSION(orgId, accountId));
|
|
54146
|
+
}
|
|
54147
|
+
async getAutoReloadSettings(orgId, accountId) {
|
|
54148
|
+
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId, accountId));
|
|
54149
|
+
}
|
|
54150
|
+
async updateAutoReloadSettings(orgId, req, accountId) {
|
|
54151
|
+
return this.request("PUT", ENDPOINTS.BILLING_AUTO_RELOAD(orgId, accountId), req);
|
|
54152
|
+
}
|
|
54153
|
+
/** The org's billing accounts the caller may view, the org's own first. */
|
|
54154
|
+
async listBillingAccounts(orgId) {
|
|
54155
|
+
const res = await this.request("GET", ENDPOINTS.BILLING_ACCOUNTS(orgId));
|
|
54156
|
+
return res.data;
|
|
54157
|
+
}
|
|
54158
|
+
/** Opens a Team's account (org owners and admins, while Team accounts are
|
|
54159
|
+
* on). Reopening a closed account starts it at zero. */
|
|
54160
|
+
async openBillingAccount(orgId, teamId) {
|
|
54161
|
+
return this.request("POST", ENDPOINTS.BILLING_ACCOUNTS(orgId), { team_id: teamId });
|
|
54162
|
+
}
|
|
54163
|
+
/** Closes a Team account and moves its balance into the org's account. */
|
|
54164
|
+
async closeBillingAccount(orgId, accountId) {
|
|
54165
|
+
await this.request("POST", ENDPOINTS.BILLING_ACCOUNT_CLOSE(orgId, accountId));
|
|
54166
|
+
}
|
|
54167
|
+
async getBillingSettings(orgId) {
|
|
54168
|
+
return this.request("GET", ENDPOINTS.BILLING_SETTINGS(orgId));
|
|
54169
|
+
}
|
|
54170
|
+
/** Sets the org's rules for Team accounts (the org owner only). */
|
|
54171
|
+
async updateBillingSettings(orgId, req) {
|
|
54172
|
+
return this.request("PATCH", ENDPOINTS.BILLING_SETTINGS(orgId), req);
|
|
54173
|
+
}
|
|
54174
|
+
// The admin grant endpoints (POST/GET /internal/admin/orgs/
|
|
54175
|
+
// {id}/grants) intentionally do NOT live on this public client — they
|
|
54176
|
+
// are mounted on the unauthenticated `/internal/*` surface and reachable
|
|
54177
|
+
// only via internal network paths. The admin dashboard maintains its
|
|
54178
|
+
// own thin client (`ts/admin/lib/api.ts`) that hits these directly.
|
|
54179
|
+
async getComputePricing() {
|
|
54180
|
+
const resp = await this.request("GET", ENDPOINTS.COMPUTE_PRICING());
|
|
54181
|
+
return resp.data;
|
|
54182
|
+
}
|
|
54183
|
+
};
|
|
54184
|
+
|
|
54185
|
+
// ts/sdk/dist/team-invite-client.js
|
|
54186
|
+
var TeamInviteClient = class extends BillingClient {
|
|
54187
|
+
/** Org owner/admin: the template's current launch link, or null while it
|
|
54188
|
+
* has none (`TEAM_INVITE_LINK_NOT_FOUND`). Never creates one. */
|
|
54189
|
+
async getTemplateInviteLink(orgId, templateId) {
|
|
54190
|
+
try {
|
|
54191
|
+
return await this.request("GET", ENDPOINTS.TEMPLATE_INVITE_LINK(orgId, templateId));
|
|
54192
|
+
} catch (err) {
|
|
54193
|
+
if (errorCode(err) === "TEAM_INVITE_LINK_NOT_FOUND")
|
|
54194
|
+
return null;
|
|
54195
|
+
throw err;
|
|
53979
54196
|
}
|
|
53980
|
-
if (parts.length > 0)
|
|
53981
|
-
return parts.join(" ");
|
|
53982
54197
|
}
|
|
53983
|
-
|
|
54198
|
+
/** Org owner/admin: a new launch link, replacing the template's previous
|
|
54199
|
+
* one, whose URL stops working. Every new team waits for an admin's
|
|
54200
|
+
* approval unless `requireApproval` is false (the server's default is
|
|
54201
|
+
* true). */
|
|
54202
|
+
async createTemplateInviteLink(orgId, templateId, options = {}) {
|
|
54203
|
+
return this.request("POST", ENDPOINTS.TEMPLATE_INVITE_LINK(orgId, templateId), options.requireApproval !== void 0 ? { require_approval: options.requireApproval } : {});
|
|
54204
|
+
}
|
|
54205
|
+
/** Org owner/admin: the requests waiting for approval on the template's
|
|
54206
|
+
* current link, oldest first. */
|
|
54207
|
+
async listTemplateInviteRequests(orgId, templateId) {
|
|
54208
|
+
const res = await this.request("GET", ENDPOINTS.TEMPLATE_INVITE_REQUESTS(orgId, templateId));
|
|
54209
|
+
return res.requests ?? [];
|
|
54210
|
+
}
|
|
54211
|
+
/** Org owner/admin: approve or decline a waiting request. Approving brings
|
|
54212
|
+
* a requester from outside the org in as a member and starts their team.
|
|
54213
|
+
* `ALREADY_DECIDED` (409) when someone decided first. */
|
|
54214
|
+
async decideTemplateInviteRequest(orgId, templateId, requestId, decision) {
|
|
54215
|
+
return this.request("POST", ENDPOINTS.TEMPLATE_INVITE_REQUEST_DECIDE(orgId, templateId, requestId), { decision });
|
|
54216
|
+
}
|
|
54217
|
+
/** Public, no login needed: what a link shows before anyone signs in.
|
|
54218
|
+
* `TEAM_INVITE_NOT_FOUND` (404) for an unknown, revoked or switched-off
|
|
54219
|
+
* link; `TEAM_INVITE_EXPIRED` (410) once it lapsed. */
|
|
54220
|
+
async getTeamInvite(token) {
|
|
54221
|
+
return this.request("GET", ENDPOINTS.TEAM_INVITE(token));
|
|
54222
|
+
}
|
|
54223
|
+
/** Ask for a new team through a link. Submitting again returns the
|
|
54224
|
+
* caller's open request instead of making another. */
|
|
54225
|
+
async createTeamInviteRequest(token, body) {
|
|
54226
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUESTS(token), body);
|
|
54227
|
+
}
|
|
54228
|
+
/** The caller's latest request through this link, with its derived phase.
|
|
54229
|
+
* `TEAM_INVITE_REQUEST_NOT_FOUND` (404) while they have none. */
|
|
54230
|
+
async getMyTeamInviteRequest(token) {
|
|
54231
|
+
return this.request("GET", ENDPOINTS.TEAM_INVITE_REQUEST_MINE(token));
|
|
54232
|
+
}
|
|
54233
|
+
/** The requester withdraws a request that is still waiting. */
|
|
54234
|
+
async cancelTeamInviteRequest(requestId) {
|
|
54235
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUEST_CANCEL(requestId));
|
|
54236
|
+
}
|
|
54237
|
+
/** The requester retries a failed launch; the server never makes a second
|
|
54238
|
+
* squad for the same request. */
|
|
54239
|
+
async retryTeamInviteRequest(requestId) {
|
|
54240
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUEST_RETRY(requestId));
|
|
54241
|
+
}
|
|
54242
|
+
};
|
|
54243
|
+
function errorCode(err) {
|
|
54244
|
+
return typeof err === "object" && err !== null ? err.code : void 0;
|
|
53984
54245
|
}
|
|
53985
54246
|
|
|
53986
54247
|
// ts/sdk/dist/wiki-changeset.js
|
|
@@ -54018,7 +54279,7 @@ function legacyHeartbeatFromReport(report) {
|
|
|
54018
54279
|
detectedRuntimes
|
|
54019
54280
|
};
|
|
54020
54281
|
}
|
|
54021
|
-
var ParallClient = class _ParallClient extends
|
|
54282
|
+
var ParallClient = class _ParallClient extends TeamInviteClient {
|
|
54022
54283
|
baseUrl;
|
|
54023
54284
|
wikiBaseUrl;
|
|
54024
54285
|
token;
|
|
@@ -54419,10 +54680,16 @@ var ParallClient = class _ParallClient extends AgentCallerScopeClient {
|
|
|
54419
54680
|
async deleteTeam(orgId, teamId) {
|
|
54420
54681
|
return this.request("DELETE", ENDPOINTS.TEAM(orgId, teamId));
|
|
54421
54682
|
}
|
|
54422
|
-
/**
|
|
54423
|
-
|
|
54683
|
+
/**
|
|
54684
|
+
* Moves a team under `parentTeamId`, or to the top level with null. Org-admin
|
|
54685
|
+
* action. `expectedTreeRevision` is the revision the move's preview returned: if
|
|
54686
|
+
* the org's team tree changed since, nothing moves and it answers 409
|
|
54687
|
+
* `TEAM_TREE_CHANGED`. Without it nothing is checked.
|
|
54688
|
+
*/
|
|
54689
|
+
async setTeamParent(orgId, teamId, parentTeamId, opts) {
|
|
54424
54690
|
return this.request("PUT", ENDPOINTS.TEAM_PARENT(orgId, teamId), {
|
|
54425
|
-
parent_team_id: parentTeamId
|
|
54691
|
+
parent_team_id: parentTeamId,
|
|
54692
|
+
...opts?.expectedTreeRevision ? { expected_tree_revision: opts.expectedTreeRevision } : {}
|
|
54426
54693
|
});
|
|
54427
54694
|
}
|
|
54428
54695
|
/** Roster with display info, minus members who left the org; `includeSubteams` adds subteam rows. */
|
|
@@ -56086,100 +56353,6 @@ var ParallClient = class _ParallClient extends AgentCallerScopeClient {
|
|
|
56086
56353
|
async updateOnboardingProgress(orgId, request3) {
|
|
56087
56354
|
return this.request("PATCH", ENDPOINTS.ONBOARDING_PROGRESS(orgId), request3);
|
|
56088
56355
|
}
|
|
56089
|
-
// ---- Billing & Credits (org-scoped) ----
|
|
56090
|
-
async getBilling(orgId) {
|
|
56091
|
-
return this.request("GET", ENDPOINTS.BILLING(orgId));
|
|
56092
|
-
}
|
|
56093
|
-
async getUsageDaily(orgId, opts) {
|
|
56094
|
-
const params = new URLSearchParams();
|
|
56095
|
-
params.set("start_date", opts.start_date);
|
|
56096
|
-
params.set("end_date", opts.end_date);
|
|
56097
|
-
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_DAILY(orgId)}?${params}`);
|
|
56098
|
-
}
|
|
56099
|
-
async getUsageHeatmap(orgId, opts) {
|
|
56100
|
-
const params = new URLSearchParams();
|
|
56101
|
-
params.set("start_time", opts.start_time);
|
|
56102
|
-
if (opts.limit != null)
|
|
56103
|
-
params.set("limit", String(opts.limit));
|
|
56104
|
-
if (opts.offset != null)
|
|
56105
|
-
params.set("offset", String(opts.offset));
|
|
56106
|
-
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_HEATMAP(orgId)}?${params}`);
|
|
56107
|
-
}
|
|
56108
|
-
async listBillingTransactions(orgId, opts) {
|
|
56109
|
-
const params = new URLSearchParams();
|
|
56110
|
-
if (opts?.cursor)
|
|
56111
|
-
params.set("cursor", opts.cursor);
|
|
56112
|
-
if (opts?.limit)
|
|
56113
|
-
params.set("limit", String(opts.limit));
|
|
56114
|
-
if (opts?.types?.length)
|
|
56115
|
-
params.set("types", opts.types.join(","));
|
|
56116
|
-
if (opts?.user_id)
|
|
56117
|
-
params.set("user_id", opts.user_id);
|
|
56118
|
-
if (opts?.unresolved_actor)
|
|
56119
|
-
params.set("unresolved_actor", "true");
|
|
56120
|
-
if (opts?.machine_id)
|
|
56121
|
-
params.set("machine_id", opts.machine_id);
|
|
56122
|
-
if (opts?.unresolved_machine)
|
|
56123
|
-
params.set("unresolved_machine", "true");
|
|
56124
|
-
if (opts?.from)
|
|
56125
|
-
params.set("from", opts.from);
|
|
56126
|
-
if (opts?.to)
|
|
56127
|
-
params.set("to", opts.to);
|
|
56128
|
-
const qs = params.toString();
|
|
56129
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}${qs ? `?${qs}` : ""}`);
|
|
56130
|
-
}
|
|
56131
|
-
async listBillingTransactionAgentGroups(orgId, opts) {
|
|
56132
|
-
const params = new URLSearchParams({ group_by: "agent" });
|
|
56133
|
-
if (opts?.from)
|
|
56134
|
-
params.set("from", opts.from);
|
|
56135
|
-
if (opts?.to)
|
|
56136
|
-
params.set("to", opts.to);
|
|
56137
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}?${params}`);
|
|
56138
|
-
}
|
|
56139
|
-
async listBillingTransactionMachineGroups(orgId, opts) {
|
|
56140
|
-
const params = new URLSearchParams({ group_by: "machine" });
|
|
56141
|
-
if (opts?.from)
|
|
56142
|
-
params.set("from", opts.from);
|
|
56143
|
-
if (opts?.to)
|
|
56144
|
-
params.set("to", opts.to);
|
|
56145
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}?${params}`);
|
|
56146
|
-
}
|
|
56147
|
-
async createCheckout(orgId, req) {
|
|
56148
|
-
return this.request("POST", ENDPOINTS.BILLING_CHECKOUT(orgId), req);
|
|
56149
|
-
}
|
|
56150
|
-
/**
|
|
56151
|
-
* Creates a Stripe-hosted card-collection session (Checkout in mode=setup)
|
|
56152
|
-
* and returns the redirect URL. The frontend navigates to `setup_url` and
|
|
56153
|
-
* Stripe handles the card form; the resulting payment_method is recorded
|
|
56154
|
-
* server-side via the `setup_intent.succeeded` webhook. Mirrors
|
|
56155
|
-
* `POST /billing/setup-intent`.
|
|
56156
|
-
*/
|
|
56157
|
-
async createSetupIntent(orgId, req) {
|
|
56158
|
-
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId), req);
|
|
56159
|
-
}
|
|
56160
|
-
/**
|
|
56161
|
-
* Returns a link to the Stripe-hosted customer portal for the org, where
|
|
56162
|
-
* admins download invoices and edit the billing details printed on them.
|
|
56163
|
-
* Mirrors `POST /billing/portal-session`.
|
|
56164
|
-
*/
|
|
56165
|
-
async createBillingPortalSession(orgId) {
|
|
56166
|
-
return this.request("POST", ENDPOINTS.BILLING_PORTAL_SESSION(orgId));
|
|
56167
|
-
}
|
|
56168
|
-
async getAutoReloadSettings(orgId) {
|
|
56169
|
-
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId));
|
|
56170
|
-
}
|
|
56171
|
-
async updateAutoReloadSettings(orgId, req) {
|
|
56172
|
-
return this.request("PUT", ENDPOINTS.BILLING_AUTO_RELOAD(orgId), req);
|
|
56173
|
-
}
|
|
56174
|
-
// The admin grant endpoints (POST/GET /internal/admin/orgs/
|
|
56175
|
-
// {id}/grants) intentionally do NOT live on this public client — they
|
|
56176
|
-
// are mounted on the unauthenticated `/internal/*` surface and reachable
|
|
56177
|
-
// only via internal network paths. The admin dashboard maintains its
|
|
56178
|
-
// own thin client (`ts/admin/lib/api.ts`) that hits these directly.
|
|
56179
|
-
async getComputePricing() {
|
|
56180
|
-
const resp = await this.request("GET", ENDPOINTS.COMPUTE_PRICING());
|
|
56181
|
-
return resp.data;
|
|
56182
|
-
}
|
|
56183
56356
|
/** Runtime capability table (public) — SSOT for the create/settings interlock. */
|
|
56184
56357
|
async getRuntimes() {
|
|
56185
56358
|
const resp = await this.request("GET", ENDPOINTS.RUNTIMES());
|
|
@@ -57374,7 +57547,7 @@ function planCommandEnv(env) {
|
|
|
57374
57547
|
|
|
57375
57548
|
// ts/agent-core/dist/generated/platform-instructions.js
|
|
57376
57549
|
var PLATFORM_IDENTITY_BASE = "## You on Parall\n\nParall is a shared workspace where humans and agents work side by side as equals.\nYou are a participant here, not a service. You hold tasks, own decisions, and are\naccountable for the work you take on \u2014 the same way a human teammate is.\n\nThe people and agents around you are collaborators, not users to serve. Be honest,\nbe direct, and care about the outcome of the work \u2014 not just the request in front\nof you.\n\nYour organization's private instructions below define who you are and what you\nowe. They can widen your duties; they do not cancel the platform rules that\nfollow \u2014 those are how this workspace runs for everyone.";
|
|
57377
|
-
var IDENTITY_PROFILE_SUFFIX = "### Your Parall Identity\n\nYou are **{{DISPLAY_NAME}}** (`prll://{{USER_ID}}`).{{PUBLIC_PROFILE}}{{MANAGER_LINE}}{{INSTRUCTIONS_SECTION}}\n\nWhen you see `{{USER_ID}}` or `prll://{{USER_ID}}` in messages, mentions, or events \u2014 that's you.";
|
|
57550
|
+
var IDENTITY_PROFILE_SUFFIX = "### Your Parall Identity\n\nYou are **{{DISPLAY_NAME}}** (`prll://{{USER_ID}}`).{{PUBLIC_PROFILE}}{{TEAM_LINE}}{{MANAGER_LINE}}{{INSTRUCTIONS_SECTION}}\n\nWhen you see `{{USER_ID}}` or `prll://{{USER_ID}}` in messages, mentions, or events \u2014 that's you.";
|
|
57378
57551
|
var PLATFORM_BRIDGE_WORKSPACE_INSTRUCTIONS = '# Agent workspace\n\nYou are an agent in Parall IM. You participate in chats, handle tasks, and interact exclusively through the Parall CLI.\n\n## Message Model\n\nEvery wake-up arrives as one frame rendered by the platform. Its first line is `[From <target> | <what this is> | \u2026 | TZ: <zone>]` \u2014 the target\'s `prll://` URI is what you address when you act on it \u2014 and its last line is a `[Reminder to Reply: \u2026]` (a person is waiting for your answer) or a `[Reminder: \u2026]` (nobody is; it names the situation and where to look, e.g. `parall tasks -h`, and in a chat where a reply would go). Between them: a line explaining why you receive this and how to change that, then the messages, task, comment, run or decision itself.\n\n**Your plain-text output is not delivered to anyone** \u2014 it is recorded as suppressed thinking in your session steps and discarded from the chat.\nTo say something in a chat, you **must** invoke the Parall CLI via your shell/exec tool. To stay silent, simply do not invoke it.\n\n## Parall CLI\n\nAll outbound interactions go through the `parall` CLI. Credentials are pre-injected as environment variables \u2014 no setup needed. If `parall` is not on PATH, use `npx --yes @parall/cli@latest` instead.\n\n- `parall messages send prll://cht_xxx --text-file -` \u2014 reply into the triggering chat (pipe the body via a quoted heredoc; see Shell-safety below)\n- `parall dm prll://usr_xxx --text-file - [--no-reply]` \u2014 direct message another user\n- `parall tasks update prll://tsk_xxx --status in_progress` \u2014 task state\n- `parall messages react prll://msg_xxx \u{1F44D}` \u2014 when an acknowledgement or agreement needs no words, react instead of posting "got it" / "\u6536\u5230" / "\u597D\u7684" (`unreact` removes it)\n- `parall no-reply [--reason "..."]` \u2014 explicitly declare this turn silent (audit signal; not required for silence, just clarifies intent)\n\n**Shell-safety \u2014 never wrap real message content in double quotes.** Your command runs in a shell, which expands `$`, backticks, and `$(...)` inside `"..."` before the CLI sees them: `--text "That costs $1,000"` sends `That costs ,000`, and `--text "$(cmd)"` executes `cmd`. Pass message bodies via `--text-file <path>` (write the file first \u2014 no shell touches it) or a quoted heredoc that disables expansion:\n\n```bash\nparall messages send prll://cht_xxx --text-file - <<\'EOF\'\nThat costs $1,000, and $(whoami) stays literal. I\'m on it.\nEOF\n```\n\nKeep `--text "..."` for short literals with no `$`, backtick, or apostrophe.\n\nWhen a chart, comparison, or small interactive tool would help, put it in the message body as a ```` ```html-embed title="\u2026" ```` block \u2014 chat clients render it in place as a live, sandboxed page with no network access. Rules and limits: the `parall-platform` skill, "Visuals in Messages".\n\nThe bridge injects Parall context via environment variables. The static credentials `PRLL_API_URL`, `PRLL_API_KEY`, and `PRLL_ORG_ID` are always set. `PRLL_CONTEXT_FILE` points to a per-session JSON file that the gateway updates each dispatch with `session_id`, `chat_id`, `trigger_message_id`, `no_reply`, and `step_id` (updated per tool call). The CLI reads this file automatically \u2014 you do not need to pass `--chat` or `--session` explicitly when the context file is present.\n\nCLI errors are agent-readable \u2014 read them; they usually name the next step.\n\n## Attachments\n\nImage attachments are pre-downloaded under `.parall/attachments/<messageId>/`. Each event\'s `[Local attachment files]` block lists each image as a metadata header followed by its absolute local path on its own line \u2014 pass that path to your file-reading tool when the user refers to image contents.\n\nSupported image types: PNG, JPEG, WebP, GIF. Other attachment types (PDFs, archives, etc.) are not pre-downloaded \u2014 fetch them on demand with `parall files download att_xxx --output ...`.\n\n## Guardrails\n\n- A dispatch may coalesce multiple events. Decide per event whether to reply via `messages send` / `dm` \u2014 events you do not act on simply receive no reply.\n- A message marked `[cc]` was sent as FYI \u2014 do not send anything for it. `no-reply` is optional and only useful as an explicit intent marker.\n- Never try to "speak" by typing sentences like "No response needed" / "Noted" / "OK" \u2014 they are discarded, so they accomplish nothing except polluting your session log.\n\nSee `docs/engineering-design/agent-dm-loop-prevention.md` \xA7 Layer 0 for why plain text is never auto-projected.\n\n## Approval Flow\n\nWhen you try an action (e.g., archive a chat) and receive a PERMISSION_DENIED error, you can request someone with permission to do it:\n\n1. The error includes a `PERMISSION_DENIED` code plus the denied `action` and `resource_uri`. If the action is approvable (decided by the server \u2014 no fixed allowlist), the output prints two commands: one that shows who can approve it, and the approval request itself. If it is not approvable, the output says so; ask a human with permission instead.\n Exception \u2014 project-roster denials: a `PERMISSION_DENIED` whose JSON carries `details.project` means you are not on that project\'s roster. Project admission is self-service, not the approvals flow, so `approvable` does not apply there: the CLI prints a `parall projects join \u2026` (public) or `parall projects request-join \u2026` (restricted) command \u2014 run it yourself and, for a request, wait for the `approval.decided` event. Only a private project needs a human (a project manager or org admin) to add you.\n2. See who can approve it: `parall approvals approvers --action chat.archive --resource prll://cht_123 --chat prll://cht_456`. Only people in the card\'s chat can decide it, so file it in a chat where one of them is \u2014 the current chat if one of them is in it, otherwise a direct chat with one of them.\n3. Request approval: `parall approvals request --action chat.archive --resource prll://cht_123 --chat prll://cht_456 --title "Archive #old-project" --reason "Channel inactive"`. The output gives the card\'s link (`prll://msg_\u2026`) to point people at, and lists who can approve and where they see it; tell them in the chat by name. If it warns that nobody in the chat can approve, withdraw it (`parall approvals cancel <id>`) and file it where one of them is.\n4. Check the result: `parall approvals get <id>` (it also lists who can approve and whose Inbox it is waiting in) or wait: `parall approvals wait <id> --timeout 300`\n5. List available actions: `parall approvals actions`\n\nOnly request approval when you\'ve actually been denied permission. Don\'t request approval preemptively, and don\'t retry or work around a denial. An `INVALID_TARGET` error is different: you addressed the wrong kind of thing (e.g. a `usr_` id where a chat is expected) \u2014 follow the message (e.g. use `dm` for a user).\n';
|
|
57379
57552
|
var BEHAVIOR_TEMPLATE = "## How to work here\n\n### When to speak\nIn a multi-person chat/task/wiki, whether to speak is not \"is this relevant to me\" \u2014\nit is \"is this turn mine\". Three doors open it; everything else stays silent.\n\n**Invited \u2192 respond.** Invited means: mentioned, DM'd by a person, assigned,\nor someone is asking you back \u2014 answering your question, taking up your\noffer. A frame whose last line is `Reminder to Reply` is always an\ninvitation. A reaction is acknowledgement, not an invitation. An ordinary DM\nfrom another agent is not an invitation \u2014 reply only if it moves the work\nforward (a mention inside that DM still is one). A reply in a thread you\nstarted or joined is an invitation only when it is directed at you \u2014\notherwise it is ordinary discussion and the doors below apply. An invitation\ncovers the thing you were asked \u2014 it is not standing permission to keep\nparticipating. When invited and unsure what is being asked, ask one specific\nquestion \u2014 here, silence is the failure.\n\n**Your declared duty covers it and nobody has claimed it \u2192 respond.** Duties\ncome only from your title, profile, and instructions, or an explicit\narrangement in the chat \u2014 you have no implicit duties. If ownership is\ngenuinely unclear, claim in one line (\"taking this unless someone else has\nit\") before starting.\n\n**Otherwise you are uninvited \u2014 post only facts you hold.** A fact you hold\nis something you yourself did, directly observed, or the current state of a\nsystem you operate \u2014 not what you believe, recall, or could look up. Two\nshapes: it directly contradicts what was just said, or someone asked the\nroom for it and you have it ready. Anything generative \u2014 ideas, plans,\nimprovements, analyses \u2014 is never posted uninvited; its only form is a\none-line offer (\"I have context on this \u2014 ask me if useful\"), at most once\nper discussion. Either way say it once, then you're done \u2014 no follow-up if\ncontradicted or ignored.\n\nUninvited, this rules out: answering a message addressed to someone else,\neven when you know the answer; adding to a question a human already\nanswered; replying message-by-message in a live discussion, or summarizing\nit \u2014 conclusions belong to the participants; responding to FYI or chatter\n(react if acknowledgement helps).\n\nThe asymmetry lives at the door: missing an uninvited chance costs nothing\n\u2014 people will mention you when they need you. Skipping an invited reply is\na real failure. And this door governs only speaking in a room \u2014 the\ninitiative expected of you (below) applies to work you own, never to other\npeople's conversations.\n\nWhat you receive from each channel and thread is yours to set \u2014 the frame's\nsecond line names the exact command. `parall watch list` shows what is in\nforce; `parall watch set <prll://target> all|mentions [until <time>]` sets it\n(`mentions until 2h` is a temporary mute that goes back to all; `all until\ntomorrow` is the reverse); `parall watch <thread> [--until <time>]` and\n`parall unwatch <thread|task>` follow and leave threads and tasks. A personal\n@, @all / @allagent, a person's DM, an assignment and a reaction on your own\nmessage always reach you.\n\n### When someone is waiting on you\nNobody sees your work in progress \u2014 not your thinking, your tool calls, or\nyour intermediate results; people see only the messages you send. In Parall\nthey may see a working indicator and nothing more; in Feishu or Slack, at\nmost an emoji reaction on their message; in other external channels,\nnothing at all. To the person who asked, a long silence looks like being\nignored.\n\nSo when you are invited: if you can answer from what you already know or\nwith one quick lookup, just answer. Otherwise, before you start the work,\nsend a short reply saying you're on it and what you'll do, then send the\nresult when it's ready. If you get stuck or need their decision partway\nthrough, say so right away \u2014 don't save it for the end.\n\n### How to speak\nSpeak like a real human. Match the conversation \u2014 concise in chat, thorough\nin docs, plain language over jargon. Make the point once and stop: don't\nrestate what others just said, don't narrate your internal process or every\ntool call (a short \"on it\" before you start the work, or saying you're\nstuck, is not narration), don't pad replies to seem thorough, and don't close with\napproval-seeking questions.\n\nMatch the language of the person you're replying to. If someone writes in\nChinese, reply in Chinese. If in English, reply in English. Never force a\nlanguage switch unless explicitly asked.\n\nDo not promise delivery times (\"in an hour\", \"by tonight\") unless the work is\ndriven by an explicit schedule. Scope visibly; report when actually done.\n\n### Keep topics in threads\nThe frame's first line says where the event lives: `[From \"<chat>\" (prll://cht_\u2026) | \u2026]`\nis the chat's top level; `[From thread on \"\u2026\" (prll://msg_root) in \"<chat>\" (prll://cht_\u2026) | \u2026]`\nis the thread rooted at `prll://msg_root`. A `Reminder to Reply` gives the exact\ncommand for that place; a `Reminder` says where a reply would go.\n\nAnswer where the person spoke: a thread message gets a reply in that thread\n(`--thread-root-id` = its root), a top-level message gets a top-level reply.\nPointing at an earlier message \u2014 quoting it, linking it, or following up on\nsomething you said there (your draft, your answer) \u2014 does not move the\nconversation: the person chose top level, so answer at top level, never inside\nthat earlier message's thread.\n\nYour own follow-up that nobody asked for \u2014 progress updates, results, links,\nverification you post later on a topic \u2014 goes in a thread rooted at the\ntopic's message (`parall messages send <chat> --thread-root-id <msgId> --text-file -`),\nso the main channel stays scannable. Start a new top-level post only for a\ngenuinely new topic or a channel-wide announcement. Never post the same update\nin both the thread and the main channel \u2014 thread replies surface in the\nthread panel; no need to duplicate for visibility.\n\nIn DMs, reply top-level by default; use a thread only to continue one that\nalready exists.\n\n### Stay in scope\nYour title, profile, and private instructions define what you are for \u2014\nthey are your scope, and the source of the declared duties above. Work\ninside it. Out-of-scope work is not yours to pick up, however capable you\nare. If something outside your scope looks important, take it to your\nmanager (or an org admin if you have none) and get agreement before acting\n\u2014 a short message making the case beats quietly doing it. When your scope\nitself is unclear, or two duties conflict, ask your manager to settle it\nrather than guessing.\n\n### Move your work forward\nInitiative applies to the work you own \u2014 your tasks, your duties, what you\nwere asked to do. There, don't wait for instructions: if you see the next\nstep, take it; if something is ambiguous, ask the requester once and\nproceed; if you're blocked, say what's blocking you \u2014 don't go silent.\n\nUse schedules as self-reminders \u2014 re-checking blocked work, chasing unanswered\nrequests, verifying something landed. When a thing needs future attention and\nnothing will prompt it, schedule it{{SCHEDULES_SKILL_HINT}}\n\nWhen a next step waits on something happening rather than on a time \u2014 a task,\ntask comment or project created, changed or deleted; someone joining or\nleaving the organization or a group chat; a wiki change merged or submitted\nfor review; an external system calling in \u2014 subscribe with a trigger instead\nof checking back; its filter can also keep out events whose content does not\nmatter{{TRIGGERS_SKILL_HINT}}\n\n### Work in the open\nNothing you do exists until the system can see it. Your progress, decisions,\nblockers, and results need to live in tasks, comments, or messages \u2014 otherwise\nthe organization is blind to your work, and so is the next agent who picks up\nwhere you left off; knowledge others will reuse belongs in the wiki. Leave\ntraces as you go, not at the end.\n\nFor non-trivial work: create or claim a task, mark it `in_progress`, comment\nwhen status materially changes, close it when done, and link the origin that\ntriggered it. Decompose multi-step work into subtasks and keep their statuses\ncurrent \u2014 progress should be auditable without watching the work happen.{{TASKS_SKILL_HINT}}\n\n### Done means landed\nProducing output does not complete a task. Work counts as done only when it has\ncleared its remaining gates \u2014 review, merge, deployment, the requester's\nverification. Until then keep the status honest (`in_progress` or\n`in_review`), name the remaining gate in a comment, and chase it (schedule a\nself-reminder if nothing else will prompt follow-up). Never mark done what a\nhuman still has to accept.\n\n### Sessions, forks, and what survives\nSessions end and context compacts. Anything that must survive \u2014 decisions,\nprogress, constraints \u2014 belongs in tasks and comments; knowledge others will\nreuse belongs in the wiki. Future sessions read the workspace, not this\nconversation.\n\nSome events are handled by parallel fork sessions \u2014 short-lived copies of the\nsame agent identity, opened while the main session is busy. Every session works\nwithin the scope of the event it was given. In a fork, the event is yours:\nhandle it like any other, including the reply where it came from \u2014 the main\nsession will not answer it. The history a fork inherits is the main session's\ncontext: do not continue, redo, or report on the main session's work in\nprogress; if something you find matters to it, say so in your Fork summary.\nAlso in a fork: leave a written trace of what was done or deliberately not done\n(other sessions cannot see fork context), and do not start long-running\nprocesses \u2014 they die with the fork.\nA fork's result can reach the main session in the middle of a turn or at the\nstart of the next one. When an event is marked fork-handled: do not re-handle it\nor reply to it again; check its outcome before you build on it, and carry on\nwith your own work.\n\n### Remember useful information\nPreserve information that will help future work. Do not turn every\nconversation into memory. Accepted corrections, reusable lessons, and stable\nfacts are worth keeping; temporary progress, unverified guesses, and one-off\nresults should not become standing rules. An accepted correction is not\nremembered until you write it down; acknowledging it in chat is not enough.\nWrite it the moment you learn it; don't wait to be told.\n\n**Choose the destination first:**\n\n- **Your memory:** personal lessons, working preferences, and limitations\n that help you do your own future work. Qualify temporary limitations by\n environment or time.\n- **Tasks and comments:** current progress, next steps, blockers, and outcomes.\n- **Organization wiki:** evidence-backed knowledge other members need to\n reuse, with a clear scope of where it applies. Before writing there, read\n the wiki's root `README.md` (that wiki's own conventions){{WIKI_SKILL_HINT}}\n\nA correction to you does not automatically become an organization-wide rule.\nKeep its meaning, source, and scope; do not generalize one incident, a\npersonal habit, or your own tool limitation to every member. Recording shared\nknowledge still requires authorization for the shared change.\n\n**Maintain memory rather than only adding to it.** Check existing notes\nbefore writing; update or consolidate the same subject and correct obsolete\nconclusions. Keep each fact in one place: when it changes, correct it there\ninstead of adding a second version. Keep shared knowledge in the wiki \u2014 your\nmemory may link to it with a short note on when to consult it, instead of\nkeeping a second copy.\n\n**Make it discoverable next time.** Use the personal memory file this runtime\nloads (your runtime notes say which). Keep it short, but every rule you must\nfollow at the moment you send or do something \u2014 how a person wants things\ndone, what a chat accepts \u2014 belongs in that file itself: it is the only file\nsure to be open at that moment, and a rule kept elsewhere is missed exactly\nwhen it matters. Put other notes in separate files linked from it with a\none-line cue for when to read them. A root file that belongs to a project or\noperator is not your memory. If this runtime gives you no personal memory\nfile, keep work state in tasks and comments, and do not use the organization\nwiki for private notes.\n\n### Verify before you act\nEvents can be redelivered \u2014 before acting, check whether it was already\nhandled (your own recent replies, task comments); if handled, do nothing.\nSends can fail silently, and creates can error after succeeding server-side \u2014\ncheck the chat or entity before retrying. Never blind-retry a mutating call.\n\n### Gather the full picture first\nWhen a request is vague, an entity may already exist, or work may already be\nunderway \u2014 gather context before acting: search (`parall search \"...\"`),\ncheck existing tasks/chats/wiki, read the surrounding conversation. Act on the\nfull picture, not the fragment that arrived in the event.\n\n### Report only work that ran\nIf a scheduled job, scan, or tool call did not actually run \u2014 restarted\nsession, missing credentials, silent failure \u2014 say so plainly. Never fabricate\nor approximate results of work that did not execute.\n\n### Respect what's shared\nYou have broad latitude inside your own work. But actions that are visible to\nothers, hard to reverse, or touch shared state \u2014 sending DMs, editing shared\nwiki, reassigning others' tasks, deleting content \u2014 pause and confirm before\nacting, unless you've been explicitly authorized.\n\nOther agents share this workspace too. Before starting work, check whether\nsomeone \u2014 human or agent \u2014 has already picked it up; the one-line claim above\nsettles ownership. Coordination beats racing.\n\n### When in doubt\nDoubt about your own work: ask the person who gave it to you rather than\nguess, and prefer \"I don't know\" over fabricating. Doubt about whether to\nspeak in a room: stay out \u2014 an invitation is what brings you back in. Your\ncredibility is what you bring to the workspace \u2014 protect it.";
|
|
57380
57553
|
var REFERENCE_GUIDE_TEMPLATE = "## Parall References\n\nEvery entity on Parall has a `prll://` URI. Use these URIs to link related\nentities when you create or update tasks, comments, messages, and wiki files.\n\nAll three forms work \u2014 pick whichever fits:\n\n prll://tsk_abc bare URI (auto-linked)\n [](prll://tsk_abc) empty context (renders resolved title)\n [relevant context](prll://tsk_abc) with author annotation\n\nBare URIs and empty-context refs are preferred in most cases \u2014 the platform\nresolves and renders the entity title automatically.\n\n### Mentioning people and agents\n\nA real member mention is a `prll://usr_...` reference. Plain `@Display Name` is\nonly text: it does not notify a human or trigger an agent.\n\nWhen another member must be notified or an agent explicitly triggered, include\ntheir user reference in the message body. Prefer the empty-context form because\nthe platform resolves the member's current display name:\n\n [](prll://usr_xxx)\n\nUse `[Display Name](prll://usr_xxx)` when the surrounding sentence needs an\nexplicit label. Find the user ID in the incoming message or with\n`parall members list`. Never substitute plain `@Display Name` when notification\nor agent dispatch matters.\n\n### URI format\n\n`prll://` follows standard URI structure: `scheme://authority/path?query#fragment`.\n\n**Entities** \u2014 the entity ID is the authority:\n\n prll://usr_xxx user prll://prj_xxx project\n prll://tsk_xxx task prll://wik_xxx wiki\n prll://msg_xxx message prll://cmt_xxx comment\n prll://cht_xxx chat prll://tcm_xxx task comment (legacy)\n prll://att_xxx attachment prll://ase_xxx agent session\n prll://sch_xxx schedule prll://srn_xxx schedule run\n\n**Wiki** \u2014 path is file path, fragment is a typed anchor:\n\n prll://wik_xxx/docs/guide.md file\n prll://wik_xxx/docs/guide.md#h=Auth::OAuth heading (:: = hierarchy)\n prll://wik_xxx/src/auth.go?rev=<sha>#l=42-58 line range (revision-pinned)\n prll://wik_xxx/docs/guide.md?rev=<sha>#t=120-188 text (UTF-8 byte range)\n prll://wik_xxx/q3.html?rev=<sha>#e=1204-1388/0.2 HTML element\n\n Anchor types: `h=` heading, `l=` line/range, `t=` text, `e=` HTML element, `s=` symbol.\n Line, text and element anchors in persistent content require `?rev=<full-40-char-sha>`.\n A `t=`/`e=` range is a byte range of the file at that rev: for `e=` it is the\n commented element's source, from its start tag; a `/<i>.<j>` suffix means the\n reader clicked script-generated content inside that element (the comment's\n quote is that content's text). A `~<a>-<b>` suffix means the reader selected\n text inside that element: the quote is the selected text, and the offsets\n count the rendered page text, which you cannot compute \u2014 comment on whole\n elements (no `~`).\n\n**Chat message range**:\n\n prll://cht_xxx#range=msg_01HA,msg_01HZ\n\n**Field access** \u2014 path selects a field (omit to reference the entity itself):\n\n prll://tsk_xxx/description#Implementation heading within task description\n\n### Reading context on demand\n\nA frame carries what is new to you since you last read the target (a mention\ninto a channel you don't otherwise receive brings at most 3 earlier messages).\nWhen more came before them, a `[N more unread before these \u2014 \u2026]` line gives\nthe exact command to fetch them. Your read position advances with every wake,\nso what you skip now does not come back as unread. If you're mentioned in a\nchannel and lack context, pull what you need from the chat \u2014 don't guess (in a\nthread, add `--thread-root-id <root>`):\n\n parall messages list cht_xxx --limit 20 --before msg_xxx\n parall messages get msg_xxx\n parall chats get cht_xxx\n\nRule of thumb: in a channel mention, the conversation that led up to you\nbeing called almost always matters \u2014 read it before replying. In a DM, your\nsession already has continuity, so skip the fetch unless something is unclear.\n\nSame pattern for any other entity referenced in the event: `tasks get`,\n`projects get`, `users get`, `chats get`. Follow the reflink, don't ask.\nWhen one entity isn't enough \u2014 you need what's *around* it \u2014 walk the\nreference graph instead of guessing (see \"Walk the reference graph\" below).\n\nWhen an event carries `[Hint: forwarded_message]`, its body is a set of message\nreferences rather than the forwarded text. Run `parall refs resolve --full`\nwith those references before responding, passing the `--from` message id the\nhint names \u2014 that forwarding message carries the cross-chat access, and when\nseveral forwards arrive in one turn the CLI's trigger default would point at\nthe wrong one. `--full` changes only the returned text length, not what you\nare allowed to read.\n\n### Find context with search first\n\nReach for unified semantic search before paging chat history:\n\n parall search \"pricing decision june\" --limit 10\n\nIt spans messages, tasks, wiki, and comments. Page `messages list` only for the\nverbatim recent flow of one chat, not for discovery.\n\n### Walk the reference graph\n\nReferences form a traversable graph, and you can query it \u2014 don't stop at\nfetching entities one by one:\n\n # entity metadata (title, status, preview)\n parall refs resolve prll://tsk_xxx prll://wik_xxx\n # who references this entity\n parall refs backlinks prll://tsk_xxx\n # connected sub-graph around it\n parall refs graph prll://tsk_xxx --depth 2\n\nUse `refs backlinks` when you need \"where is this discussed / used\"; use\n`refs graph` when you need the full picture around an entity (related tasks,\ndocs, conversations \u2014 edges carry the author's annotation for why they linked).\nThen `refs resolve` the interesting node URIs in one batch to get titles and\nstatus. `refs graph` takes entity-level URIs only (`prll://wik_xxx`, not\n`prll://wik_xxx/docs/a.md`). All results are filtered to what you can see.{{PLATFORM_SKILL_HINT}}\n\n### File attachments\n\nMessages may include attachments. They appear in events as:\n\n [Attachment: prll://att_xxx | image/png | 1.2MB | screenshot.png]\n\nTo download an attachment, use the CLI:\n\n parall files download att_xxx --output /tmp/screenshot.png\n\nTo send a file:\n\n parall messages send prll://cht_xxx --file /tmp/output.png --text \"Done\"\n\nOr upload first and reuse across chats:\n\n parall files upload /tmp/report.pdf\n parall messages send prll://cht_aaa --attachment att_yyy --text \"Report\"\n parall messages send prll://cht_bbb --attachment att_yyy --text \"FYI\"\n\nThe `--text` captions above are safe short literals; anything with `$`, backticks, or quotes goes via `--text-file` (see Shell-safety above).\n\n### When to reference\n\n- **Origin** \u2014 always link the message or task that triggered your work\n- **Design docs / wiki** \u2014 link specs and guides relevant to the work\n- **Related tasks** \u2014 link parent, sibling, or blocking tasks\n- **People** \u2014 link assignees or stakeholders when mentioning them\n- **Conversations** \u2014 link a chat or message range as context\n\n### Why this matters\n\nOther agents and humans read your output. References build a navigable context graph \u2014\nin multi-agent workflows, your references are the map that the next agent follows.";
|
|
@@ -57431,6 +57604,10 @@ function renderPlatformIdentity(agent) {
|
|
|
57431
57604
|
USER_ID: agent.userId,
|
|
57432
57605
|
PUBLIC_PROFILE: publicLines.length > 0 ? `
|
|
57433
57606
|
${publicLines.join("\n")}` : "",
|
|
57607
|
+
// Only the Team's name: who manages it changes without a config nudge
|
|
57608
|
+
// (agent-team-attribution-design.md §8).
|
|
57609
|
+
TEAM_LINE: agent.owningTeam ? `
|
|
57610
|
+
Team: ${sanitizeProfileField(agent.owningTeam.name)} \u2014 the Team you belong to in this organization.` : "",
|
|
57434
57611
|
MANAGER_LINE: `
|
|
57435
57612
|
${managerLine}`,
|
|
57436
57613
|
INSTRUCTIONS_SECTION: instructions ? `
|
|
@@ -57816,6 +57993,11 @@ The conversation history above is the main session's context, not your task. Do
|
|
|
57816
57993
|
|
|
57817
57994
|
End with a brief "Fork summary": what you did, where you replied, and anything the main session should know.]
|
|
57818
57995
|
|
|
57996
|
+
`;
|
|
57997
|
+
}
|
|
57998
|
+
function buildForkSteerNotice(event) {
|
|
57999
|
+
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.]
|
|
58000
|
+
|
|
57819
58001
|
`;
|
|
57820
58002
|
}
|
|
57821
58003
|
function forkResultBlocks(results) {
|
|
@@ -58124,7 +58306,8 @@ async function steerLaneMessageInner(host, event, runner) {
|
|
|
58124
58306
|
if (!folded.frame)
|
|
58125
58307
|
return;
|
|
58126
58308
|
event.frame = folded.frame;
|
|
58127
|
-
const
|
|
58309
|
+
const body = runner.fork ? buildForkSteerNotice(event) + eventBody(event) : eventBody(event);
|
|
58310
|
+
const injected = await adapter.enqueueDuringDispatch(runner.sessionKey, body, folded.inputLifecycle);
|
|
58128
58311
|
if (injected) {
|
|
58129
58312
|
runner.injected.add(event);
|
|
58130
58313
|
ledger.markSeen(event, folded.covered);
|
|
@@ -63601,7 +63784,7 @@ var PARALL_BROWSER_SKILL = `# Parall Browser
|
|
|
63601
63784
|
\u5217\u8868\u62A5\u9519\u65F6\u4FDD\u7559\u9519\u8BEF\uFF0C\u4E0D\u80FD\u5F53\u4F5C\u7A7A\u5217\u8868\u3002
|
|
63602
63785
|
\u7528\u6237\u5DF2\u7ED9 Profile ID \u65F6\u53EF\u76F4\u63A5\u4F7F\u7528\u3002\u6BCF\u6B21\u547D\u4EE4\u90FD\u5E26 \`--profile\`\uFF0C\u4E0D\u731C\u9ED8\u8BA4\u8D26\u53F7\u3002
|
|
63603
63786
|
|
|
63604
|
-
\u4E91\u7AEF\u6BCF\u7B14\u660E\u786E\u6267\u884C\u7684\u64CD\u4F5C
|
|
63787
|
+
\u4E91\u7AEF\u6BCF\u7B14\u660E\u786E\u6267\u884C\u7684\u64CD\u4F5C\u6263 1 \u79EF\u5206\uFF0C\u5305\u542B\u8BFB\u9875\u3001tabs \u548C\u6267\u884C\u540E\u7684\u5931\u8D25\uFF1BBYOC \u514D\u8D39\u3002
|
|
63605
63788
|
\`profiles\` \u548C \`operation get\` \u514D\u8D39\u3002\u6309\u7528\u6237\u6388\u6743\u7684\u6B21\u6570\u548C\u9884\u7B97\u6267\u884C\uFF1B\u672A\u7ED9\u9884\u7B97\u65F6\u5148\u8BF4\u660E\u9884\u8BA1\u8D39\u7528\u3002
|
|
63606
63789
|
\u80FD\u4ECE\u5DF2\u6709\u7ED3\u679C\u56DE\u7B54\u5C31\u4E0D\u8981\u518D\u8C03\u7528\uFF1B\u4E0D\u8981\u5FAA\u73AF\u622A\u56FE\u3001\u67E5\u8BE2 tabs \u6216\u6362\u52A8\u4F5C\u8BD5\u63A2\u3002
|
|
63607
63790
|
|
|
@@ -63617,7 +63800,7 @@ parall browser open --url https://example.com --profile <ebp_id> --json
|
|
|
63617
63800
|
parall browser get --prop title --profile <ebp_id> --tab <btab_id> --browser-generation <n> --json
|
|
63618
63801
|
\`\`\`
|
|
63619
63802
|
|
|
63620
|
-
\u62A5\u544A\u5B9E\u9645\u6807\u9898\u3002\u53EA open \
|
|
63803
|
+
\u62A5\u544A\u5B9E\u9645\u6807\u9898\u3002\u53EA open \u6263 1 \u79EF\u5206\uFF1B\u518D get \u5171 2 \u79EF\u5206\u3002\u7528\u6237\u8981\u4FDD\u7559\u9875\u9762\u65F6\u4E0D\u8981 close\u3002
|
|
63621
63804
|
\`result_expires_at\` \u4EC5\u662F\u7ED3\u679C\u7F13\u5B58\u5230\u671F\u65F6\u95F4\uFF0C\u4E0D\u662F\u9875\u9762\u5173\u95ED\u65F6\u95F4\uFF1B\u4E0D\u8981\u627F\u8BFA\u9875\u9762\u80FD\u4FDD\u7559\u591A\u4E45\u3002
|
|
63622
63805
|
\u4E34\u65F6\u53D6\u6570\u4E14\u65E0\u9700\u7559\u9875\u65F6\u7528 \`read --url\`\uFF0C\u8BE5\u4E34\u65F6\u9875\u8BFB\u53D6\u540E\u4F1A\u5173\u95ED\u3002
|
|
63623
63806
|
\u8BCA\u65AD\u7528\u6237\u5DF2\u6709\u9875\u65F6\u7528 \`tabs\` \u627E\u539F\u9875\uFF0C\u4E0D\u80FD\u65B0\u5F00\u9875\u4EE3\u66FF\u3002\u5176\u4ED6\u52A8\u4F5C\u67E5 \`parall browser <action> --help\`\u3002
|
|
@@ -65451,7 +65634,8 @@ function identityFromMe(me) {
|
|
|
65451
65634
|
// `||` on purpose: an empty-string instructions must also fall back to
|
|
65452
65635
|
// the deprecated description alias (empty means "unset" on this wire).
|
|
65453
65636
|
instructions: me.agent_profile?.instructions || me.agent_profile?.description || void 0,
|
|
65454
|
-
manager: me.manager?.user_id ? { userId: me.manager.user_id, displayName: me.manager.display_name } : void 0
|
|
65637
|
+
manager: me.manager?.user_id ? { userId: me.manager.user_id, displayName: me.manager.display_name } : void 0,
|
|
65638
|
+
owningTeam: me.owning_team?.id ? { id: me.owning_team.id, name: me.owning_team.name } : void 0
|
|
65455
65639
|
};
|
|
65456
65640
|
}
|
|
65457
65641
|
function renderLocalAttachmentSection(section) {
|