@parall/daemon 1.32.0 → 1.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/manifest.json +9 -9
- package/bundle/parall-claude-agent.js +54 -36
- package/bundle/parall-codex-agent.js +54 -36
- package/bundle/parall-daemon.js +319 -251
- package/dist/clip-runtime/bun-resolver.d.ts +24 -0
- package/dist/clip-runtime/bun-resolver.d.ts.map +1 -0
- package/dist/clip-runtime/bun-resolver.js +58 -0
- package/dist/clip-runtime/clip-installer.d.ts.map +1 -1
- package/dist/clip-runtime/clip-installer.js +59 -18
- package/dist/clip-runtime/clip-provider.d.ts +3 -1
- package/dist/clip-runtime/clip-provider.d.ts.map +1 -1
- package/dist/clip-runtime/clip-provider.js +50 -22
- package/dist/clip-runtime/process-manager.d.ts.map +1 -1
- package/dist/clip-runtime/process-manager.js +8 -29
- package/package.json +6 -6
package/bundle/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.32.
|
|
3
|
-
"built_at": "2026-06-
|
|
2
|
+
"version": "1.32.1",
|
|
3
|
+
"built_at": "2026-06-02T14:24:57.505Z",
|
|
4
4
|
"min_node_version": "20.0.0",
|
|
5
5
|
"files": {
|
|
6
6
|
"package.json": {
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
"size": 18
|
|
9
9
|
},
|
|
10
10
|
"parall-claude-agent.js": {
|
|
11
|
-
"sha256": "
|
|
12
|
-
"size":
|
|
11
|
+
"sha256": "eeb0e9458c678d1edc467c0e1d2dc25a0fc5d6d110ab01a5997a2de4fdce776c",
|
|
12
|
+
"size": 1537100
|
|
13
13
|
},
|
|
14
14
|
"parall-codex-agent.js": {
|
|
15
|
-
"sha256": "
|
|
16
|
-
"size":
|
|
15
|
+
"sha256": "b9af840b8d787d2725540e432b416a489851d01a969b0eb45a0291dec8d70362",
|
|
16
|
+
"size": 1568189
|
|
17
17
|
},
|
|
18
18
|
"parall-daemon.js": {
|
|
19
|
-
"sha256": "
|
|
20
|
-
"size":
|
|
19
|
+
"sha256": "44fcf2c6817a56243bd3391eaf49decd5ce4d8953d0bebb1cfba06a54e5719d7",
|
|
20
|
+
"size": 1499163
|
|
21
21
|
},
|
|
22
22
|
"parall-openclaw-agent.js": {
|
|
23
23
|
"sha256": "657263cec61e6d26496389ec90ffe0716616a20e082e12c5a17bf6ffd5d1cdd6",
|
|
24
24
|
"size": 9727
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
"signature": "
|
|
27
|
+
"signature": "03XcA+dVTwzforsxVlxsVXHjHJMKJ/yfCHsrddoGTNN7PjK7hdmkT3fRsQqzA3M1hni+7AT++ZGKT4k25Oc6Cg=="
|
|
28
28
|
}
|
|
@@ -26776,10 +26776,15 @@ Other agents share this workspace. Before starting work, check whether someone
|
|
|
26776
26776
|
### Permissions and approvals
|
|
26777
26777
|
You have real permissions based on your roles (chat member/admin, org member).
|
|
26778
26778
|
If you lack permission for an action, the API returns PERMISSION_DENIED with the
|
|
26779
|
-
\`action\` and \`resource_uri\` that were denied.
|
|
26780
|
-
|
|
26781
|
-
|
|
26782
|
-
|
|
26779
|
+
\`action\` and \`resource_uri\` that were denied. The server decides whether that
|
|
26780
|
+
action is approvable: if it is, the CLI prints an \`approvals request\` command \u2014
|
|
26781
|
+
fill in the placeholders it shows (\`--chat\`, \`--title\`, \`--reason\`) and run
|
|
26782
|
+
it to ask someone with permission. If it is NOT approvable, the output says so;
|
|
26783
|
+
ask a human with permission instead of requesting approval. A
|
|
26784
|
+
\`INVALID_TARGET\` error instead means you addressed the wrong kind of thing
|
|
26785
|
+
(e.g. a \`usr_\` id where a chat is expected) \u2014 follow the message (e.g. use
|
|
26786
|
+
\`dm\` for a user). Don't retry or work around a denial; only request approval
|
|
26787
|
+
after an actual denial, never preemptively.
|
|
26783
26788
|
|
|
26784
26789
|
### When in doubt
|
|
26785
26790
|
Prefer asking over guessing. Prefer "I don't know" over fabricating. Your
|
|
@@ -26952,7 +26957,7 @@ See \`docs/engineering-design/agent-dm-loop-prevention.md\` \xA7 Layer 0 for why
|
|
|
26952
26957
|
|
|
26953
26958
|
When you try an action (e.g., archive a chat) and receive a PERMISSION_DENIED error, you can request someone with permission to do it:
|
|
26954
26959
|
|
|
26955
|
-
1. The error includes a \`PERMISSION_DENIED\` code
|
|
26960
|
+
1. 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), a \`Request approval:\` line with an approval command is printed \u2014 fill in its \`--chat\`, \`--title\`, \`--reason\` placeholders and run it. If it is not approvable, the output says so; ask a human with permission instead.
|
|
26956
26961
|
2. Request approval: \`parall approvals request --action chat.archive --resource prll://cht_123 --chat prll://cht_456 --title "Archive #old-project" --reason "Channel inactive"\`
|
|
26957
26962
|
3. A card will appear in the specified chat for someone with permission to approve
|
|
26958
26963
|
4. Check the result: \`parall approvals get prll://<id>\` or wait: \`parall approvals wait prll://<id> --timeout 300\`
|
|
@@ -27548,15 +27553,7 @@ var ParallClient = class _ParallClient {
|
|
|
27548
27553
|
}
|
|
27549
27554
|
if (!res.ok) {
|
|
27550
27555
|
const rawErrorBody = await res.json().catch(() => ({}));
|
|
27551
|
-
|
|
27552
|
-
const errorObj = errorBody?.error && typeof errorBody.error === "object" ? errorBody.error : void 0;
|
|
27553
|
-
const errMsg = errorObj?.message ?? (typeof errorBody?.error === "string" ? errorBody.error : void 0);
|
|
27554
|
-
const errCode = errorObj?.code ?? (typeof errorBody?.code === "string" ? errorBody.code : void 0);
|
|
27555
|
-
const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
|
|
27556
|
-
const { error: _e, code: _c, message: _m, ...extras } = errorBody;
|
|
27557
|
-
if (Object.keys(extras).length > 0)
|
|
27558
|
-
apiError.extras = extras;
|
|
27559
|
-
throw apiError;
|
|
27556
|
+
throw buildApiError(res, rawErrorBody);
|
|
27560
27557
|
}
|
|
27561
27558
|
if (res.status === 204)
|
|
27562
27559
|
return void 0;
|
|
@@ -27608,15 +27605,7 @@ var ParallClient = class _ParallClient {
|
|
|
27608
27605
|
}
|
|
27609
27606
|
if (!res.ok) {
|
|
27610
27607
|
const rawErrorBody = await res.json().catch(() => ({}));
|
|
27611
|
-
|
|
27612
|
-
const errorObj = errorBody?.error && typeof errorBody.error === "object" ? errorBody.error : void 0;
|
|
27613
|
-
const errMsg = errorObj?.message ?? (typeof errorBody?.error === "string" ? errorBody.error : void 0);
|
|
27614
|
-
const errCode = errorObj?.code ?? (typeof errorBody?.code === "string" ? errorBody.code : void 0);
|
|
27615
|
-
const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
|
|
27616
|
-
const { error: _e, code: _c, message: _m, ...extras } = errorBody;
|
|
27617
|
-
if (Object.keys(extras).length > 0)
|
|
27618
|
-
apiError.extras = extras;
|
|
27619
|
-
throw apiError;
|
|
27608
|
+
throw buildApiError(res, rawErrorBody);
|
|
27620
27609
|
}
|
|
27621
27610
|
if (res.status === 204)
|
|
27622
27611
|
return void 0;
|
|
@@ -28298,15 +28287,7 @@ var ParallClient = class _ParallClient {
|
|
|
28298
28287
|
return null;
|
|
28299
28288
|
if (!res.ok) {
|
|
28300
28289
|
const rawErrorBody = await res.json().catch(() => ({}));
|
|
28301
|
-
|
|
28302
|
-
const errorObj = errorBody?.error && typeof errorBody.error === "object" ? errorBody.error : void 0;
|
|
28303
|
-
const errMsg = errorObj?.message ?? (typeof errorBody?.error === "string" ? errorBody.error : void 0);
|
|
28304
|
-
const errCode = errorObj?.code ?? (typeof errorBody?.code === "string" ? errorBody.code : void 0);
|
|
28305
|
-
const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
|
|
28306
|
-
const { error: _e, code: _c, message: _m, ...extras } = errorBody;
|
|
28307
|
-
if (Object.keys(extras).length > 0)
|
|
28308
|
-
apiError.extras = extras;
|
|
28309
|
-
throw apiError;
|
|
28290
|
+
throw buildApiError(res, rawErrorBody);
|
|
28310
28291
|
}
|
|
28311
28292
|
return res.json();
|
|
28312
28293
|
}
|
|
@@ -28772,6 +28753,12 @@ var ApiError = class extends Error {
|
|
|
28772
28753
|
status;
|
|
28773
28754
|
code;
|
|
28774
28755
|
extras;
|
|
28756
|
+
/** Attempted action (authorization denials) — e.g. "chat.add_member". */
|
|
28757
|
+
action;
|
|
28758
|
+
/** Target resource URI that was evaluated — e.g. "prll://cht_…". */
|
|
28759
|
+
resourceUri;
|
|
28760
|
+
/** Whether the action is approval-executable (PERMISSION_DENIED only). */
|
|
28761
|
+
approvable;
|
|
28775
28762
|
constructor(status, message, code) {
|
|
28776
28763
|
super(message);
|
|
28777
28764
|
this.status = status;
|
|
@@ -28779,6 +28766,33 @@ var ApiError = class extends Error {
|
|
|
28779
28766
|
this.name = "ApiError";
|
|
28780
28767
|
}
|
|
28781
28768
|
};
|
|
28769
|
+
function buildApiError(res, rawErrorBody) {
|
|
28770
|
+
const errorBody = rawErrorBody !== null && typeof rawErrorBody === "object" ? rawErrorBody : {};
|
|
28771
|
+
const errorObj = errorBody.error && typeof errorBody.error === "object" ? errorBody.error : void 0;
|
|
28772
|
+
const errMsg = (typeof errorObj?.message === "string" ? errorObj.message : void 0) ?? (typeof errorBody.message === "string" ? errorBody.message : void 0) ?? (typeof errorBody.error === "string" ? errorBody.error : void 0);
|
|
28773
|
+
const errCode = (typeof errorObj?.code === "string" ? errorObj.code : void 0) ?? (typeof errorBody.code === "string" ? errorBody.code : void 0);
|
|
28774
|
+
const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
|
|
28775
|
+
const anchors = errorObj ?? errorBody;
|
|
28776
|
+
if (typeof anchors.action === "string")
|
|
28777
|
+
apiError.action = anchors.action;
|
|
28778
|
+
if (typeof anchors.resource_uri === "string")
|
|
28779
|
+
apiError.resourceUri = anchors.resource_uri;
|
|
28780
|
+
if (typeof anchors.approvable === "boolean")
|
|
28781
|
+
apiError.approvable = anchors.approvable;
|
|
28782
|
+
const structural = /* @__PURE__ */ new Set(["error", "code", "message", "status"]);
|
|
28783
|
+
const extras = {};
|
|
28784
|
+
for (const [k, v] of Object.entries(errorBody))
|
|
28785
|
+
if (!structural.has(k))
|
|
28786
|
+
extras[k] = v;
|
|
28787
|
+
if (errorObj) {
|
|
28788
|
+
for (const [k, v] of Object.entries(errorObj))
|
|
28789
|
+
if (!structural.has(k))
|
|
28790
|
+
extras[k] = v;
|
|
28791
|
+
}
|
|
28792
|
+
if (Object.keys(extras).length > 0)
|
|
28793
|
+
apiError.extras = extras;
|
|
28794
|
+
return apiError;
|
|
28795
|
+
}
|
|
28782
28796
|
|
|
28783
28797
|
// ts/sdk/dist/ws.js
|
|
28784
28798
|
function isRetryableNetworkError(err) {
|
|
@@ -31113,7 +31127,11 @@ parall dm "Alice" --file /tmp/report.pdf --text "Report attached"
|
|
|
31113
31127
|
|
|
31114
31128
|
## Approvals
|
|
31115
31129
|
|
|
31116
|
-
When a CLI command returns a \`PERMISSION_DENIED\` error, the output includes
|
|
31130
|
+
When a CLI command returns a \`PERMISSION_DENIED\` error, the output includes the denied \`action\` and \`resource_uri\`. Whether that action can be approved is decided by the server (there is no fixed allowlist):
|
|
31131
|
+
- If it IS approvable, a \`Request approval:\` line with a \`parall approvals request\` command follows \u2014 fill in the placeholders it shows (\`--chat\`, \`--title\`, \`--reason\`) and run it.
|
|
31132
|
+
- If it is NOT approvable, the output says so \u2014 ask a human with permission instead of requesting approval.
|
|
31133
|
+
|
|
31134
|
+
A different \`INVALID_TARGET\` error means you addressed the wrong kind of thing (e.g. a \`usr_\` id where a chat is expected). Follow the message (e.g. use \`parall dm\` to message a user) \u2014 do not request approval for it.
|
|
31117
31135
|
|
|
31118
31136
|
\`\`\`bash
|
|
31119
31137
|
# Request approval (use action and resource_uri from the error)
|
|
@@ -31155,7 +31173,7 @@ Every entity is addressable with a \`prll://\` URI. Common prefixes you'll see i
|
|
|
31155
31173
|
|
|
31156
31174
|
When a message or event references \`prll://sch_xxx\` or \`prll://srn_xxx\`, or when you receive \`[Event: schedule.fired]\`, switch to the **parall-schedules** skill for the CLI commands (create / list / pause / resume / cancel / runs).
|
|
31157
31175
|
|
|
31158
|
-
|
|
31176
|
+
CLI success output is JSON. Errors print a JSON line (\`{"error","status","code",...}\`) and, on a \`PERMISSION_DENIED\`, may add a plain-text \`Request approval:\` line \u2014 read both.
|
|
31159
31177
|
`;
|
|
31160
31178
|
|
|
31161
31179
|
// ts/agent-core/dist/skills/parall-tasks.js
|
|
@@ -31222,7 +31240,7 @@ When you receive \`[Event: task.comment.created]\`, someone commented on a task
|
|
|
31222
31240
|
2. Reply via comment: \`tasks comments add prll://tsk_xxx --body "Response..."\`
|
|
31223
31241
|
3. If the comment requests status changes, update accordingly
|
|
31224
31242
|
|
|
31225
|
-
|
|
31243
|
+
CLI success output is JSON; errors print a JSON line plus, on a \`PERMISSION_DENIED\`, an optional plain-text \`Request approval:\` line \u2014 read both.
|
|
31226
31244
|
`;
|
|
31227
31245
|
|
|
31228
31246
|
// ts/agent-core/dist/skills/parall-wiki.js
|
|
@@ -31355,7 +31373,7 @@ parall wiki reset <slug> # Restore all files to last synced state
|
|
|
31355
31373
|
parall wiki log <slug> # Recent wiki operations
|
|
31356
31374
|
\`\`\`
|
|
31357
31375
|
|
|
31358
|
-
|
|
31376
|
+
CLI success output is JSON; errors may add a plain-text \`Request approval:\` line on a \`PERMISSION_DENIED\` \u2014 read both. Run \`parall wiki --help\` for full options.
|
|
31359
31377
|
`;
|
|
31360
31378
|
|
|
31361
31379
|
// ts/agent-core/dist/skills/parall-schedules.js
|
|
@@ -26776,10 +26776,15 @@ Other agents share this workspace. Before starting work, check whether someone
|
|
|
26776
26776
|
### Permissions and approvals
|
|
26777
26777
|
You have real permissions based on your roles (chat member/admin, org member).
|
|
26778
26778
|
If you lack permission for an action, the API returns PERMISSION_DENIED with the
|
|
26779
|
-
\`action\` and \`resource_uri\` that were denied.
|
|
26780
|
-
|
|
26781
|
-
|
|
26782
|
-
|
|
26779
|
+
\`action\` and \`resource_uri\` that were denied. The server decides whether that
|
|
26780
|
+
action is approvable: if it is, the CLI prints an \`approvals request\` command \u2014
|
|
26781
|
+
fill in the placeholders it shows (\`--chat\`, \`--title\`, \`--reason\`) and run
|
|
26782
|
+
it to ask someone with permission. If it is NOT approvable, the output says so;
|
|
26783
|
+
ask a human with permission instead of requesting approval. A
|
|
26784
|
+
\`INVALID_TARGET\` error instead means you addressed the wrong kind of thing
|
|
26785
|
+
(e.g. a \`usr_\` id where a chat is expected) \u2014 follow the message (e.g. use
|
|
26786
|
+
\`dm\` for a user). Don't retry or work around a denial; only request approval
|
|
26787
|
+
after an actual denial, never preemptively.
|
|
26783
26788
|
|
|
26784
26789
|
### When in doubt
|
|
26785
26790
|
Prefer asking over guessing. Prefer "I don't know" over fabricating. Your
|
|
@@ -26952,7 +26957,7 @@ See \`docs/engineering-design/agent-dm-loop-prevention.md\` \xA7 Layer 0 for why
|
|
|
26952
26957
|
|
|
26953
26958
|
When you try an action (e.g., archive a chat) and receive a PERMISSION_DENIED error, you can request someone with permission to do it:
|
|
26954
26959
|
|
|
26955
|
-
1. The error includes a \`PERMISSION_DENIED\` code
|
|
26960
|
+
1. 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), a \`Request approval:\` line with an approval command is printed \u2014 fill in its \`--chat\`, \`--title\`, \`--reason\` placeholders and run it. If it is not approvable, the output says so; ask a human with permission instead.
|
|
26956
26961
|
2. Request approval: \`parall approvals request --action chat.archive --resource prll://cht_123 --chat prll://cht_456 --title "Archive #old-project" --reason "Channel inactive"\`
|
|
26957
26962
|
3. A card will appear in the specified chat for someone with permission to approve
|
|
26958
26963
|
4. Check the result: \`parall approvals get prll://<id>\` or wait: \`parall approvals wait prll://<id> --timeout 300\`
|
|
@@ -27548,15 +27553,7 @@ var ParallClient = class _ParallClient {
|
|
|
27548
27553
|
}
|
|
27549
27554
|
if (!res.ok) {
|
|
27550
27555
|
const rawErrorBody = await res.json().catch(() => ({}));
|
|
27551
|
-
|
|
27552
|
-
const errorObj = errorBody?.error && typeof errorBody.error === "object" ? errorBody.error : void 0;
|
|
27553
|
-
const errMsg = errorObj?.message ?? (typeof errorBody?.error === "string" ? errorBody.error : void 0);
|
|
27554
|
-
const errCode = errorObj?.code ?? (typeof errorBody?.code === "string" ? errorBody.code : void 0);
|
|
27555
|
-
const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
|
|
27556
|
-
const { error: _e, code: _c, message: _m, ...extras } = errorBody;
|
|
27557
|
-
if (Object.keys(extras).length > 0)
|
|
27558
|
-
apiError.extras = extras;
|
|
27559
|
-
throw apiError;
|
|
27556
|
+
throw buildApiError(res, rawErrorBody);
|
|
27560
27557
|
}
|
|
27561
27558
|
if (res.status === 204)
|
|
27562
27559
|
return void 0;
|
|
@@ -27608,15 +27605,7 @@ var ParallClient = class _ParallClient {
|
|
|
27608
27605
|
}
|
|
27609
27606
|
if (!res.ok) {
|
|
27610
27607
|
const rawErrorBody = await res.json().catch(() => ({}));
|
|
27611
|
-
|
|
27612
|
-
const errorObj = errorBody?.error && typeof errorBody.error === "object" ? errorBody.error : void 0;
|
|
27613
|
-
const errMsg = errorObj?.message ?? (typeof errorBody?.error === "string" ? errorBody.error : void 0);
|
|
27614
|
-
const errCode = errorObj?.code ?? (typeof errorBody?.code === "string" ? errorBody.code : void 0);
|
|
27615
|
-
const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
|
|
27616
|
-
const { error: _e, code: _c, message: _m, ...extras } = errorBody;
|
|
27617
|
-
if (Object.keys(extras).length > 0)
|
|
27618
|
-
apiError.extras = extras;
|
|
27619
|
-
throw apiError;
|
|
27608
|
+
throw buildApiError(res, rawErrorBody);
|
|
27620
27609
|
}
|
|
27621
27610
|
if (res.status === 204)
|
|
27622
27611
|
return void 0;
|
|
@@ -28298,15 +28287,7 @@ var ParallClient = class _ParallClient {
|
|
|
28298
28287
|
return null;
|
|
28299
28288
|
if (!res.ok) {
|
|
28300
28289
|
const rawErrorBody = await res.json().catch(() => ({}));
|
|
28301
|
-
|
|
28302
|
-
const errorObj = errorBody?.error && typeof errorBody.error === "object" ? errorBody.error : void 0;
|
|
28303
|
-
const errMsg = errorObj?.message ?? (typeof errorBody?.error === "string" ? errorBody.error : void 0);
|
|
28304
|
-
const errCode = errorObj?.code ?? (typeof errorBody?.code === "string" ? errorBody.code : void 0);
|
|
28305
|
-
const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
|
|
28306
|
-
const { error: _e, code: _c, message: _m, ...extras } = errorBody;
|
|
28307
|
-
if (Object.keys(extras).length > 0)
|
|
28308
|
-
apiError.extras = extras;
|
|
28309
|
-
throw apiError;
|
|
28290
|
+
throw buildApiError(res, rawErrorBody);
|
|
28310
28291
|
}
|
|
28311
28292
|
return res.json();
|
|
28312
28293
|
}
|
|
@@ -28772,6 +28753,12 @@ var ApiError = class extends Error {
|
|
|
28772
28753
|
status;
|
|
28773
28754
|
code;
|
|
28774
28755
|
extras;
|
|
28756
|
+
/** Attempted action (authorization denials) — e.g. "chat.add_member". */
|
|
28757
|
+
action;
|
|
28758
|
+
/** Target resource URI that was evaluated — e.g. "prll://cht_…". */
|
|
28759
|
+
resourceUri;
|
|
28760
|
+
/** Whether the action is approval-executable (PERMISSION_DENIED only). */
|
|
28761
|
+
approvable;
|
|
28775
28762
|
constructor(status, message, code) {
|
|
28776
28763
|
super(message);
|
|
28777
28764
|
this.status = status;
|
|
@@ -28779,6 +28766,33 @@ var ApiError = class extends Error {
|
|
|
28779
28766
|
this.name = "ApiError";
|
|
28780
28767
|
}
|
|
28781
28768
|
};
|
|
28769
|
+
function buildApiError(res, rawErrorBody) {
|
|
28770
|
+
const errorBody = rawErrorBody !== null && typeof rawErrorBody === "object" ? rawErrorBody : {};
|
|
28771
|
+
const errorObj = errorBody.error && typeof errorBody.error === "object" ? errorBody.error : void 0;
|
|
28772
|
+
const errMsg = (typeof errorObj?.message === "string" ? errorObj.message : void 0) ?? (typeof errorBody.message === "string" ? errorBody.message : void 0) ?? (typeof errorBody.error === "string" ? errorBody.error : void 0);
|
|
28773
|
+
const errCode = (typeof errorObj?.code === "string" ? errorObj.code : void 0) ?? (typeof errorBody.code === "string" ? errorBody.code : void 0);
|
|
28774
|
+
const apiError = new ApiError(res.status, errMsg ?? res.statusText, errCode);
|
|
28775
|
+
const anchors = errorObj ?? errorBody;
|
|
28776
|
+
if (typeof anchors.action === "string")
|
|
28777
|
+
apiError.action = anchors.action;
|
|
28778
|
+
if (typeof anchors.resource_uri === "string")
|
|
28779
|
+
apiError.resourceUri = anchors.resource_uri;
|
|
28780
|
+
if (typeof anchors.approvable === "boolean")
|
|
28781
|
+
apiError.approvable = anchors.approvable;
|
|
28782
|
+
const structural = /* @__PURE__ */ new Set(["error", "code", "message", "status"]);
|
|
28783
|
+
const extras = {};
|
|
28784
|
+
for (const [k, v] of Object.entries(errorBody))
|
|
28785
|
+
if (!structural.has(k))
|
|
28786
|
+
extras[k] = v;
|
|
28787
|
+
if (errorObj) {
|
|
28788
|
+
for (const [k, v] of Object.entries(errorObj))
|
|
28789
|
+
if (!structural.has(k))
|
|
28790
|
+
extras[k] = v;
|
|
28791
|
+
}
|
|
28792
|
+
if (Object.keys(extras).length > 0)
|
|
28793
|
+
apiError.extras = extras;
|
|
28794
|
+
return apiError;
|
|
28795
|
+
}
|
|
28782
28796
|
|
|
28783
28797
|
// ts/sdk/dist/ws.js
|
|
28784
28798
|
function isRetryableNetworkError(err) {
|
|
@@ -31113,7 +31127,11 @@ parall dm "Alice" --file /tmp/report.pdf --text "Report attached"
|
|
|
31113
31127
|
|
|
31114
31128
|
## Approvals
|
|
31115
31129
|
|
|
31116
|
-
When a CLI command returns a \`PERMISSION_DENIED\` error, the output includes
|
|
31130
|
+
When a CLI command returns a \`PERMISSION_DENIED\` error, the output includes the denied \`action\` and \`resource_uri\`. Whether that action can be approved is decided by the server (there is no fixed allowlist):
|
|
31131
|
+
- If it IS approvable, a \`Request approval:\` line with a \`parall approvals request\` command follows \u2014 fill in the placeholders it shows (\`--chat\`, \`--title\`, \`--reason\`) and run it.
|
|
31132
|
+
- If it is NOT approvable, the output says so \u2014 ask a human with permission instead of requesting approval.
|
|
31133
|
+
|
|
31134
|
+
A different \`INVALID_TARGET\` error means you addressed the wrong kind of thing (e.g. a \`usr_\` id where a chat is expected). Follow the message (e.g. use \`parall dm\` to message a user) \u2014 do not request approval for it.
|
|
31117
31135
|
|
|
31118
31136
|
\`\`\`bash
|
|
31119
31137
|
# Request approval (use action and resource_uri from the error)
|
|
@@ -31155,7 +31173,7 @@ Every entity is addressable with a \`prll://\` URI. Common prefixes you'll see i
|
|
|
31155
31173
|
|
|
31156
31174
|
When a message or event references \`prll://sch_xxx\` or \`prll://srn_xxx\`, or when you receive \`[Event: schedule.fired]\`, switch to the **parall-schedules** skill for the CLI commands (create / list / pause / resume / cancel / runs).
|
|
31157
31175
|
|
|
31158
|
-
|
|
31176
|
+
CLI success output is JSON. Errors print a JSON line (\`{"error","status","code",...}\`) and, on a \`PERMISSION_DENIED\`, may add a plain-text \`Request approval:\` line \u2014 read both.
|
|
31159
31177
|
`;
|
|
31160
31178
|
|
|
31161
31179
|
// ts/agent-core/dist/skills/parall-tasks.js
|
|
@@ -31222,7 +31240,7 @@ When you receive \`[Event: task.comment.created]\`, someone commented on a task
|
|
|
31222
31240
|
2. Reply via comment: \`tasks comments add prll://tsk_xxx --body "Response..."\`
|
|
31223
31241
|
3. If the comment requests status changes, update accordingly
|
|
31224
31242
|
|
|
31225
|
-
|
|
31243
|
+
CLI success output is JSON; errors print a JSON line plus, on a \`PERMISSION_DENIED\`, an optional plain-text \`Request approval:\` line \u2014 read both.
|
|
31226
31244
|
`;
|
|
31227
31245
|
|
|
31228
31246
|
// ts/agent-core/dist/skills/parall-wiki.js
|
|
@@ -31355,7 +31373,7 @@ parall wiki reset <slug> # Restore all files to last synced state
|
|
|
31355
31373
|
parall wiki log <slug> # Recent wiki operations
|
|
31356
31374
|
\`\`\`
|
|
31357
31375
|
|
|
31358
|
-
|
|
31376
|
+
CLI success output is JSON; errors may add a plain-text \`Request approval:\` line on a \`PERMISSION_DENIED\` \u2014 read both. Run \`parall wiki --help\` for full options.
|
|
31359
31377
|
`;
|
|
31360
31378
|
|
|
31361
31379
|
// ts/agent-core/dist/skills/parall-schedules.js
|