@parall/parall 1.57.2 → 1.58.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/dist/gateway.d.ts.map +1 -1
- package/dist/gateway.js +10 -22
- package/dist/index.bundle.mjs +480 -1270
- package/package.json +3 -3
- package/skills/parall-platform/SKILL.md +3 -1
- package/skills/parall-tasks/SKILL.md +14 -3
- package/src/gateway.ts +10 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/parall",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.1",
|
|
4
4
|
"description": "OpenClaw channel plugin for Parall IM",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"openclaw.plugin.json"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@parall/agent-core": "1.
|
|
20
|
-
"@parall/sdk": "1.
|
|
19
|
+
"@parall/agent-core": "1.58.1",
|
|
20
|
+
"@parall/sdk": "1.58.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^22.0.0",
|
|
@@ -218,7 +218,9 @@ parall approvals wait prll://apr_xxx --timeout 300
|
|
|
218
218
|
# List all your pending approvals
|
|
219
219
|
parall approvals list
|
|
220
220
|
|
|
221
|
-
# List available approvable actions
|
|
221
|
+
# List available approvable actions — the output includes each documented
|
|
222
|
+
# action's payload contract (exact field names, and where a CAS base like
|
|
223
|
+
# expected_version is read from). Check it before hand-writing a --payload.
|
|
222
224
|
parall approvals actions
|
|
223
225
|
|
|
224
226
|
# Cancel a pending request you made
|
|
@@ -88,8 +88,19 @@ parall tasks update prll://tsk_xxx --planned-start none
|
|
|
88
88
|
# Move a task to the end of its status column
|
|
89
89
|
parall tasks update prll://tsk_xxx --placement end
|
|
90
90
|
|
|
91
|
-
# Add a comment
|
|
92
|
-
|
|
91
|
+
# Add a comment — same shell rules as messages: the body runs through a
|
|
92
|
+
# shell, so pass real content via --body-file (a written file, or a quoted
|
|
93
|
+
# heredoc into stdin with '-'). --body "..." only for short literals with
|
|
94
|
+
# no $, backtick, or quote (single or double). A bare --body - is refused,
|
|
95
|
+
# not stdin.
|
|
96
|
+
parall tasks comments add prll://tsk_xxx --body-file - <<'PARALL_EOF'
|
|
97
|
+
Progress update: fixed the $1,000 rounding bug, it's in review.
|
|
98
|
+
PARALL_EOF
|
|
99
|
+
parall tasks comments add prll://tsk_xxx --body-file /tmp/comment.md
|
|
100
|
+
parall tasks comments add prll://tsk_xxx --body "On it"
|
|
101
|
+
|
|
102
|
+
# Long or multi-line description → same file / stdin channel
|
|
103
|
+
parall tasks create --title "Write the runbook" --project-id prll://prj_xxx --description-file /tmp/description.md
|
|
93
104
|
```
|
|
94
105
|
|
|
95
106
|
Ordering: to append a task to the end of a status column, always use
|
|
@@ -166,7 +177,7 @@ When you receive `[Event: task.comment.created]`, someone commented on a task yo
|
|
|
166
177
|
|
|
167
178
|
1. Resolve the project and read its current description as described above
|
|
168
179
|
2. Review the comment content and task context
|
|
169
|
-
3. Reply via comment: `tasks comments add prll://tsk_xxx --body "
|
|
180
|
+
3. Reply via comment: `tasks comments add prll://tsk_xxx --body-file -` with a quoted heredoc (`--body "..."` only for short literals with no `$`, backtick, or quote — single or double)
|
|
170
181
|
4. If the comment requests status changes, update accordingly
|
|
171
182
|
|
|
172
183
|
CLI success output is JSON; errors print a JSON line plus, on a `PERMISSION_DENIED`, an optional plain-text `Request approval:` line — read both.
|
package/src/gateway.ts
CHANGED
|
@@ -92,11 +92,14 @@ function buildInboundCtx(
|
|
|
92
92
|
earlierEvents: ParallEvent[] = [],
|
|
93
93
|
): Record<string, unknown> {
|
|
94
94
|
const inboundHistory = earlierEvents.length > 0 ? buildInboundHistory(earlierEvents) : undefined;
|
|
95
|
+
// The server frame is the whole text of the event (agent-core renders
|
|
96
|
+
// nothing); OpenClaw's inbound context gets it as the body.
|
|
97
|
+
const body = event.frame ?? '';
|
|
95
98
|
return core.channel.reply.finalizeInboundContext({
|
|
96
|
-
Body:
|
|
99
|
+
Body: body,
|
|
97
100
|
BodyForAgent: bodyForAgent,
|
|
98
|
-
RawBody:
|
|
99
|
-
CommandBody:
|
|
101
|
+
RawBody: body,
|
|
102
|
+
CommandBody: body,
|
|
100
103
|
// Attachment metadata is now in event.attachments (structured), not mediaFields
|
|
101
104
|
...(inboundHistory?.length ? { InboundHistory: inboundHistory } : {}),
|
|
102
105
|
From: `parall:${event.senderId}`,
|
|
@@ -104,7 +107,7 @@ function buildInboundCtx(
|
|
|
104
107
|
SessionKey: sessionKey,
|
|
105
108
|
AccountId: accountId,
|
|
106
109
|
ChatType: event.targetType ?? 'unknown',
|
|
107
|
-
SenderName: event.
|
|
110
|
+
SenderName: event.senderId,
|
|
108
111
|
SenderId: event.senderId,
|
|
109
112
|
Provider: 'parall' as const,
|
|
110
113
|
Surface: 'parall' as const,
|
|
@@ -117,22 +120,9 @@ function buildInboundCtx(
|
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
function buildInboundHistory(events: ParallEvent[]): Array<{ sender: string; body: string }> {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (event.noReply) meta.push(`[Hint: no_reply]`);
|
|
124
|
-
if (event.threadRootId) meta.push(`[Thread: ${event.threadRootId}]`);
|
|
125
|
-
if (event.attachments?.length) {
|
|
126
|
-
for (const att of event.attachments) {
|
|
127
|
-
const safeMime = att.mimeType.replace(/[\r\n[\]|]/g, ' ').trim();
|
|
128
|
-
meta.push(`[Attachment: prll://${att.id} | ${safeMime}]`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return {
|
|
132
|
-
sender: event.senderName,
|
|
133
|
-
body: meta.length > 0 ? `${meta.join(' ')}\n${event.body}` : event.body,
|
|
134
|
-
};
|
|
135
|
-
});
|
|
123
|
+
// Each earlier event is its own server frame (message ids, thread,
|
|
124
|
+
// attachments and hints are already inside it).
|
|
125
|
+
return events.map((event) => ({ sender: event.senderId, body: event.frame ?? '' }));
|
|
136
126
|
}
|
|
137
127
|
|
|
138
128
|
const OC_AUTH_TEXT = /unauthorized|401|403|invalid api key|authentication/i;
|