@parall/agent-core 1.36.1 → 1.38.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.
Files changed (46) hide show
  1. package/dist/bridge-workspace.d.ts +1 -1
  2. package/dist/bridge-workspace.d.ts.map +1 -1
  3. package/dist/bridge-workspace.js +13 -3
  4. package/dist/dispatch-adapter.d.ts +6 -0
  5. package/dist/dispatch-adapter.d.ts.map +1 -1
  6. package/dist/event-format.d.ts.map +1 -1
  7. package/dist/event-format.js +36 -1
  8. package/dist/gateway-base.d.ts +56 -0
  9. package/dist/gateway-base.d.ts.map +1 -1
  10. package/dist/gateway-base.js +459 -97
  11. package/dist/gateway-lane-flow.d.ts +74 -0
  12. package/dist/gateway-lane-flow.d.ts.map +1 -0
  13. package/dist/gateway-lane-flow.js +167 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +1 -0
  17. package/dist/lane-key.d.ts +45 -0
  18. package/dist/lane-key.d.ts.map +1 -0
  19. package/dist/lane-key.js +34 -0
  20. package/dist/lane-ledger.d.ts +112 -0
  21. package/dist/lane-ledger.d.ts.map +1 -0
  22. package/dist/lane-ledger.js +333 -0
  23. package/dist/platform-config.d.ts +19 -0
  24. package/dist/platform-config.d.ts.map +1 -1
  25. package/dist/platform-config.js +72 -9
  26. package/dist/prompt-fragments.d.ts +1 -1
  27. package/dist/prompt-fragments.d.ts.map +1 -1
  28. package/dist/prompt-fragments.js +2 -0
  29. package/dist/skills/parall-platform.d.ts +1 -1
  30. package/dist/skills/parall-platform.d.ts.map +1 -1
  31. package/dist/skills/parall-platform.js +27 -6
  32. package/dist/types.d.ts +11 -2
  33. package/dist/types.d.ts.map +1 -1
  34. package/package.json +2 -2
  35. package/src/bridge-workspace.ts +13 -3
  36. package/src/dispatch-adapter.ts +6 -0
  37. package/src/event-format.ts +38 -1
  38. package/src/gateway-base.ts +637 -143
  39. package/src/gateway-lane-flow.ts +235 -0
  40. package/src/index.ts +2 -0
  41. package/src/lane-key.ts +67 -0
  42. package/src/lane-ledger.ts +370 -0
  43. package/src/platform-config.ts +85 -9
  44. package/src/prompt-fragments.ts +2 -0
  45. package/src/skills/parall-platform.ts +27 -6
  46. package/src/types.ts +17 -1
@@ -7,7 +7,7 @@
7
7
  * `@parall/agent-core` stays runtime-neutral and exports only text + pure
8
8
  * helpers here.
9
9
  */
10
- export declare const 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\nIncoming events are rendered as structured `[Event: ...]` blocks.\nEach event includes `[Chat: ... (prll://cht_xxx)]` \u2014 use that chat ID (or full URI) when replying.\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 \"...\"` \u2014 reply into the triggering chat\n- `parall dm prll://usr_xxx --text \"...\" [--no-reply]` \u2014 direct message another user\n- `parall tasks update prll://tsk_xxx --status in_progress` \u2014 task state\n- `parall no-reply [--reason \"...\"]` \u2014 explicitly declare this turn silent (audit signal; not required for silence, just clarifies intent)\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\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- If an event carries `[Hint: no_reply]`, do not send anything for that event. `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- Keep CLI replies concise and task-focused.\n\nSee `docs/engineering-design/agent-dm-loop-prevention.md` \u00A7 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), 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.\n2. Request approval: `parall approvals request --action chat.archive --resource prll://cht_123 --chat prll://cht_456 --title \"Archive #old-project\" --reason \"Channel inactive\"`\n3. A card will appear in the specified chat for someone with permission to approve\n4. Check the result: `parall approvals get prll://<id>` or wait: `parall approvals wait prll://<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.\n\n## Threads\n\nMessages may arrive with a `[Thread: prll://msg_xxx]` line in the event block, indicating the message is a reply inside a thread rooted at `msg_xxx`.\n\n### When to use threads\n- Replying to a specific message or continuing a focused sub-conversation\n- Keeping detailed discussion (logs, debugging, follow-ups) out of the main channel flow\n- When someone starts a thread with you, reply in the same thread\n\n### When NOT to use threads\n- Broadcasting status updates or announcements \u2014 use top-level messages\n- Starting a new topic \u2014 post at top level, let others thread if needed\n\n### CLI usage\n- The `msg_xxx` from the `[Thread: prll://msg_xxx]` line is the thread root ID \u2014 pass it as `--thread-root-id`\n- Reply in a thread: `parall messages send <chatId> --text \"...\" --thread-root-id <msgId>`\n- Read thread replies: `parall messages list <chatId> --thread-root-id <msgId>`\n\n### Thread etiquette\n- If your trigger message is in a thread, reply in that thread by default\n- Don't duplicate thread content to the channel unless explicitly asked\n- Keep thread replies focused on the original topic\n";
10
+ export declare const 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\nIncoming events are rendered as structured `[Event: ...]` blocks.\nEach event includes `[Chat: ... (prll://cht_xxx)]` \u2014 use that chat ID (or full URI) when replying.\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 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\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\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- If an event carries `[Hint: no_reply]`, do not send anything for that event. `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- Keep CLI replies concise and task-focused.\n\nSee `docs/engineering-design/agent-dm-loop-prevention.md` \u00A7 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), 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.\n2. Request approval: `parall approvals request --action chat.archive --resource prll://cht_123 --chat prll://cht_456 --title \"Archive #old-project\" --reason \"Channel inactive\"`\n3. A card will appear in the specified chat for someone with permission to approve\n4. Check the result: `parall approvals get prll://<id>` or wait: `parall approvals wait prll://<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.\n\n## Threads\n\nMessages may arrive with a `[Thread: prll://msg_xxx]` line in the event block, indicating the message is a reply inside a thread rooted at `msg_xxx`.\n\n### When to use threads\n- Replying to a specific message or continuing a focused sub-conversation\n- Keeping detailed discussion (logs, debugging, follow-ups) out of the main channel flow\n- When someone starts a thread with you, reply in the same thread\n\n### When NOT to use threads\n- Broadcasting status updates or announcements \u2014 use top-level messages\n- Starting a new topic \u2014 post at top level, let others thread if needed\n\n### CLI usage\n- The `msg_xxx` from the `[Thread: prll://msg_xxx]` line is the thread root ID \u2014 pass it as `--thread-root-id`\n- Reply in a thread: `parall messages send <chatId> --text-file /tmp/reply.md --thread-root-id <msgId>`\n- Read thread replies: `parall messages list <chatId> --thread-root-id <msgId>`\n\n### Thread etiquette\n- If your trigger message is in a thread, reply in that thread by default\n- Don't duplicate thread content to the channel unless explicitly asked\n- Keep thread replies focused on the original topic\n";
11
11
  /** Extracts the `command` string from a shell/bash tool call's input payload. */
12
12
  export declare function extractShellCommand(input: unknown): string | undefined;
13
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"bridge-workspace.d.ts","sourceRoot":"","sources":["../src/bridge-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,6BAA6B,8kKAwEzC,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAItE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAmBzE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAKxE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAI3E"}
1
+ {"version":3,"file":"bridge-workspace.d.ts","sourceRoot":"","sources":["../src/bridge-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,6BAA6B,+xLAkFzC,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAItE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAmBzE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAKxE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAI3E"}
@@ -23,11 +23,21 @@ To say something in a chat, you **must** invoke the Parall CLI via your shell/ex
23
23
 
24
24
  All outbound interactions go through the \`parall\` CLI. Credentials are pre-injected as environment variables — no setup needed. If \`parall\` is not on PATH, use \`npx --yes @parall/cli@latest\` instead.
25
25
 
26
- - \`parall messages send prll://cht_xxx --text "..."\` — reply into the triggering chat
27
- - \`parall dm prll://usr_xxx --text "..." [--no-reply]\` — direct message another user
26
+ - \`parall messages send prll://cht_xxx --text-file -\` — reply into the triggering chat (pipe the body via a quoted heredoc; see Shell-safety below)
27
+ - \`parall dm prll://usr_xxx --text-file - [--no-reply]\` — direct message another user
28
28
  - \`parall tasks update prll://tsk_xxx --status in_progress\` — task state
29
29
  - \`parall no-reply [--reason "..."]\` — explicitly declare this turn silent (audit signal; not required for silence, just clarifies intent)
30
30
 
31
+ **Shell-safety — 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 — no shell touches it) or a quoted heredoc that disables expansion:
32
+
33
+ \`\`\`bash
34
+ parall messages send prll://cht_xxx --text-file - <<'EOF'
35
+ That costs $1,000, and $(whoami) stays literal. I'm on it.
36
+ EOF
37
+ \`\`\`
38
+
39
+ Keep \`--text "..."\` for short literals with no \`$\`, backtick, or apostrophe.
40
+
31
41
  The 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 — you do not need to pass \`--chat\` or \`--session\` explicitly when the context file is present.
32
42
 
33
43
  ## Attachments
@@ -72,7 +82,7 @@ Messages may arrive with a \`[Thread: prll://msg_xxx]\` line in the event block,
72
82
 
73
83
  ### CLI usage
74
84
  - The \`msg_xxx\` from the \`[Thread: prll://msg_xxx]\` line is the thread root ID — pass it as \`--thread-root-id\`
75
- - Reply in a thread: \`parall messages send <chatId> --text "..." --thread-root-id <msgId>\`
85
+ - Reply in a thread: \`parall messages send <chatId> --text-file /tmp/reply.md --thread-root-id <msgId>\`
76
86
  - Read thread replies: \`parall messages list <chatId> --thread-root-id <msgId>\`
77
87
 
78
88
  ### Thread etiquette
@@ -21,6 +21,12 @@ export type DispatchContext = {
21
21
  contextFilePath?: string;
22
22
  /** @deprecated Use contextFilePath. Kept for runtimes that haven't migrated. */
23
23
  stepIdFilePath?: string;
24
+ /**
25
+ * PRLL_CONTEXT_DIR contract: the per-agent directory holding per-lane
26
+ * dispatch context files (`<lane-key>.json`, see lane-key.ts). Stable for
27
+ * the life of the bridge — safe to pin into spawn env.
28
+ */
29
+ contextDirPath?: string;
24
30
  client: ParallClient;
25
31
  log?: GatewayLogger;
26
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"dispatch-adapter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;;;;;;;;OAaG;IACH,qBAAqB,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAErF,4GAA4G;IAC5G,oBAAoB,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAEnD,+FAA+F;IAC/F,WAAW,CAAC,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,GAAG,iBAAiB,GAAG,IAAI,CAAC;IAE3F,wDAAwD;IACxD,WAAW,CAAC,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE1D,6FAA6F;IAC7F,cAAc,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAExD,yFAAyF;IACzF,qBAAqB,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAE/D;;;;;OAKG;IACH,aAAa,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"event-format.d.ts","sourceRoot":"","sources":["../src/event-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAS1D,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAgHzD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEtE;AA6BD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAK/D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAkBnE"}
1
+ {"version":3,"file":"event-format.d.ts","sourceRoot":"","sources":["../src/event-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAS1D,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAkIzD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEtE;AAgDD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAK/D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAkBnE"}
@@ -93,6 +93,23 @@ export function buildEventBody(event) {
93
93
  lines.push(`[Attached: ${sanitizeMeta(event.attachedUri)}]`);
94
94
  lines.push('', event.body);
95
95
  }
96
+ else if (event.type === 'channel_message') {
97
+ // External IM channel: the audience is OUTSIDE Parall. Frame the
98
+ // event so the agent writes for that audience — no prll:// refs, no
99
+ // internal cards/links in the reply body (they are dead links there).
100
+ lines.push(`[Event: channel.message]`);
101
+ const providerLabel = sanitizeMeta(event.channelProvider ?? 'external IM');
102
+ const convLabel = event.channelExternalConversationId
103
+ ? `${sanitizeMeta(event.channelExternalConversationId)} (${sanitizeMeta(event.channelConversationType ?? 'conversation')})`
104
+ : sanitizeMeta(event.channelConversationType ?? 'conversation');
105
+ lines.push(`[Channel: ${providerLabel} | conversation: ${convLabel}]`);
106
+ lines.push(`[From: ${sanitizeMeta(event.senderName)} (external user, not a Parall member)]`);
107
+ if (event.channelExternalMessageId) {
108
+ lines.push(`[External message ID: ${sanitizeMeta(event.channelExternalMessageId)}]`);
109
+ }
110
+ lines.push(`[Audience: this conversation lives on ${providerLabel}, OUTSIDE Parall. Readers cannot open prll:// links, Parall cards, or internal attachments — never include them in replies. Write plain conversational text.]`);
111
+ lines.push('', event.body);
112
+ }
96
113
  else if (event.type === 'external_trigger') {
97
114
  lines.push(`[Event: external.trigger]`);
98
115
  lines.push(`[Trigger: prll://${event.targetId}]`);
@@ -137,7 +154,7 @@ function buildSendMessageHint(event) {
137
154
  return `\n<system-reminder>To reply on ${where}, run: \`parall comments add --target "${event.replyTargetUri}" --body "..."\` (read the thread first with \`parall comments list --target "${event.replyTargetUri}"\`). To message someone instead, use \`parall messages send\` / \`parall dm\`. Your plain text output is not delivered.</system-reminder>`;
138
155
  }
139
156
  if (event.targetId.startsWith('cht_')) {
140
- return `\n<system-reminder>To reply, run: \`parall messages send prll://${event.targetId} --text "..."\` your plain text output is not delivered to the chat.</system-reminder>`;
157
+ return `\n<system-reminder>To reply, run \`parall messages send prll://${event.targetId} --text-file - <<'EOF'\` … \`EOF\` — the quoted heredoc keeps \`$\`, backticks and apostrophes literal (plain \`--text "$1,000"\` sends \`,000\`). Your plain text output is not delivered to the chat.</system-reminder>`;
141
158
  }
142
159
  if (event.targetId.startsWith('tsk_')) {
143
160
  return `\n<system-reminder>To respond, use the CLI: \`parall tasks update\` / \`parall tasks comments add\`. To message someone, use \`parall messages send\` / \`parall dm\`. Your plain text output is not delivered.</system-reminder>`;
@@ -145,6 +162,24 @@ function buildSendMessageHint(event) {
145
162
  if (event.targetId.startsWith('sch_')) {
146
163
  return `\n<system-reminder>To communicate, use the CLI: \`parall messages send\` / \`parall dm\`. Your plain text output is not delivered.</system-reminder>`;
147
164
  }
165
+ if (event.type === 'channel_message') {
166
+ // Provider metadata is best-effort (the gateway's connection lookup can
167
+ // fail) — never instruct the agent to invoke a made-up clip alias.
168
+ const clipLabel = event.channelProvider
169
+ ? `the \`${event.channelProvider}\` clip's`
170
+ : "your channel provider clip's";
171
+ const apiLabel = event.channelProvider ?? 'external platform';
172
+ const target = event.channelExternalConversationId
173
+ ? `{"chat_id": "${event.channelExternalConversationId}", "text": "..."}`
174
+ : `{"chat_id": "<conversation id>", "text": "..."}`;
175
+ // Offer the in-thread alternative whenever the inbound message id is
176
+ // known — otherwise the hint nudges every threaded conversation toward a
177
+ // new top-level message.
178
+ const threadAlt = event.channelExternalMessageId
179
+ ? ` To reply in-thread to this specific message, use {"message_id": "${event.channelExternalMessageId}", "text": "..."} instead.`
180
+ : '';
181
+ return `\n<system-reminder>To reply, invoke ${clipLabel} \`send_message\` command with ${target} — your plain text output is NOT delivered to the external conversation.${threadAlt} The same clip's \`call\` command reaches the wider ${apiLabel} API when needed.</system-reminder>`;
182
+ }
148
183
  if (event.type === 'external_trigger' || event.targetId.startsWith('xtr_')) {
149
184
  return `\n<system-reminder>This external trigger is incoming-only. Your plain text output is not sent back to the external provider. To communicate in Parall, use \`parall messages send\` / \`parall dm\`; provider-specific outbound actions require a separate capability.</system-reminder>`;
150
185
  }
@@ -1,6 +1,35 @@
1
1
  import { ParallClient, ParallWs } from '@parall/sdk';
2
2
  import type { AgentConfigUpdateData } from '@parall/sdk';
3
3
  import type { DispatchAdapter, GatewayLogger } from './dispatch-adapter.js';
4
+ import type { ParallEvent } from './types.js';
5
+ export type DispatchableMessage = {
6
+ id: string;
7
+ sender_id: string;
8
+ sender?: {
9
+ display_name?: string | null;
10
+ };
11
+ message_type: string;
12
+ content: unknown;
13
+ thread_root_id?: string | null;
14
+ hints?: {
15
+ no_reply?: boolean;
16
+ } | null;
17
+ attachments?: Array<{
18
+ id: string;
19
+ file_name: string;
20
+ file_size: number;
21
+ mime_type: string;
22
+ }>;
23
+ created_at?: string;
24
+ };
25
+ export type MessageDispatchDecision = {
26
+ action: 'dispatch';
27
+ event: ParallEvent;
28
+ } | {
29
+ action: 'skip';
30
+ } | {
31
+ action: 'retry';
32
+ };
4
33
  export type ParallGatewayOptions = {
5
34
  accountId: string;
6
35
  client: ParallClient;
@@ -25,6 +54,13 @@ export type ParallGatewayOptions = {
25
54
  contextFilePathForSession?: (sessionKey: string) => string | undefined;
26
55
  /** @deprecated Use contextFilePathForSession. Kept for runtimes that haven't migrated. */
27
56
  stepIdFilePathForSession?: (sessionKey: string) => string | undefined;
57
+ /**
58
+ * PRLL_CONTEXT_DIR contract root (per-agent stateDir, never the workspace).
59
+ * When set, chat-message dispatches ride the server dispatch ledger
60
+ * (claim → steer → complete) and per-lane context files are written under
61
+ * this directory. Absent → legacy received/ack flow (openclaw / hermes).
62
+ */
63
+ dispatchContextDir?: string;
28
64
  onConfigUpdate?: (data: AgentConfigUpdateData) => Promise<void> | void;
29
65
  onSessionReady?: (state: {
30
66
  activeSessionId?: string;
@@ -48,6 +84,7 @@ export declare class ParallAgentGateway {
48
84
  private readonly opts;
49
85
  private readonly chatInfoMap;
50
86
  private readonly dispatchedTasks;
87
+ private readonly channelConnectionProviders;
51
88
  private readonly dispatchedMessages;
52
89
  private readonly forkStates;
53
90
  private readonly dispatchState;
@@ -61,6 +98,9 @@ export declare class ParallAgentGateway {
61
98
  private inFlightDispatches;
62
99
  private drainResolvers;
63
100
  private pendingRestartNotification;
101
+ private readonly laneLedger?;
102
+ private ledgerDisabled;
103
+ private mainCurrentGroupKey?;
64
104
  private readonly DISPATCHED_MESSAGES_CAP;
65
105
  private readonly SHUTDOWN_DEADLINE_MS;
66
106
  private readonly FORK_DEADLINE_MS;
@@ -69,6 +109,19 @@ export declare class ParallAgentGateway {
69
109
  run(abortSignal: AbortSignal): Promise<void>;
70
110
  private tryClaimMessage;
71
111
  private emitDispatchReceived;
112
+ /** True when this event's lifecycle is owned by the dispatch lane ledger. */
113
+ private usesLaneLedger;
114
+ private disableLedger;
115
+ /**
116
+ * Buffer grouping key. Lane-ledger message events group by full lane
117
+ * identity (chat + thread) so a channel lane and a thread lane in the same
118
+ * chat dispatch as separate turns with separate claims; everything else
119
+ * keeps the historical chat-level grouping.
120
+ */
121
+ private dispatchGroupKey;
122
+ private laneFlowHost;
123
+ private dispatchLaneGroup;
124
+ private consumeTypedDispatch;
72
125
  private buildDispatchContext;
73
126
  private isSessionNotLiveError;
74
127
  private createInputStep;
@@ -90,6 +143,8 @@ export declare class ParallAgentGateway {
90
143
  private getOrFetchChatInfo;
91
144
  private buildMessageDispatchDecision;
92
145
  private handleMessage;
146
+ private handleMessageRedrive;
147
+ private consumeMessageWorkItem;
93
148
  private handleTaskAssignment;
94
149
  private handleTaskDispatch;
95
150
  private handleTaskComment;
@@ -105,6 +160,7 @@ export declare class ParallAgentGateway {
105
160
  private fetchAndHandleScheduleFire;
106
161
  private handleScheduleFire;
107
162
  private fetchAndHandleExternalTriggerRun;
163
+ private fetchAndHandleChannelMessage;
108
164
  private handleExternalTriggerRun;
109
165
  private fetchAndHandleApprovalDecided;
110
166
  private catchUpFromDispatch;
@@ -1 +1 @@
1
- {"version":3,"file":"gateway-base.d.ts","sourceRoot":"","sources":["../src/gateway-base.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiC,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,KAAK,EACV,qBAAqB,EAgBtB,MAAM,aAAa,CAAC;AAOrB,OAAO,KAAK,EAEV,eAAe,EAGf,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAuE/B,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,YAAY,CAAC;IACrB,EAAE,EAAE,QAAQ,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE;QACN,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,eAAe,EAAE,eAAe,CAAC;IACjC,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,kGAAkG;IAClG,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAI3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yBAAyB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CA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