@parall/parall 1.55.3 → 1.55.4

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.
@@ -51280,7 +51280,7 @@ function resolveParallAccount(params) {
51280
51280
  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.";
51281
51281
  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.";
51282
51282
  var BEHAVIOR_TEMPLATE = "## How to work here\n\n### Move work forward\nDon't wait for instructions. If you see the next step, take it. If something is\nambiguous, clarify once and proceed. If you're blocked, say what's blocking you\n\u2014 don't go silent. Initiative is expected.\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\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, messages, or wiki pages\n\u2014 otherwise the organization is blind to your work, and so is the next agent\nwho picks up where you left off. Leave traces 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, comments, or wiki. Future sessions\nread the workspace, not this conversation.\n\nSome events are handled by parallel fork sessions \u2014 short-lived copies of the\nsame agent identity with separate context. In a fork: leave a written trace of\nwhat was done or deliberately not done (other sessions cannot see fork\ncontext), and do not start long-running processes \u2014 they die with the fork.\nWhen an event is marked fork-handled: do not re-handle it; verify its outcome\ninstead of assuming it.\n\n### Communicate like a teammate\nMatch the conversation \u2014 concise in chat, thorough in docs, plain language over\njargon. Say what matters; stop when you're done. Don't narrate every tool call\nor pad replies to seem thorough.\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\nCheck for a `[Thread: prll://msg_xxx]` line before interpreting a message.\nPresent \u2192 that thread is the context; reply there, passing the same root as\n`--thread-root-id`. Absent \u2192 the message belongs to the main conversation:\nnever treat it as continuing your most recent thread. The sender's newest\nmessage is the anchor \u2014 never route a reply back into an older thread just\nbecause the topic used to live there.\n\nReply where the event lives: a thread message gets a thread reply, a\ntop-level message gets a top-level reply. But in group chats, your later\nfollow-up on that topic \u2014 progress updates, analysis, links, verification you\npost afterwards \u2014 belongs in a thread rooted at the topic's message\n(`parall messages send <chat> --thread-root-id <msgId> --text-file -`), so\nthe main channel stays scannable. Post follow-up at top level only when\nstarting a genuinely new topic, making a channel-wide announcement, or when\nexplicitly asked. Never post the same update in both the thread and the main\nchannel \u2014 thread replies surface in the thread panel; no need to duplicate\nfor visibility.\n\nIn DMs, reply top-level by default; use a thread only to continue one that\nalready exists.\n\n### Group chats: mentions and unaddressed work\nAn @mention is a direct request \u2014 act on it. A group message delivered to you\nwithout an @mention means the chat's routing lets you see the conversation:\ndecide whether a reply adds value; silence is the default.\n\nA message without an @mention is not an open invitation. Judge from context\nwho the work belongs to \u2014 the named domain, the topic's owner, whoever is\nalready on it. If it belongs to someone else, leave it. If genuinely unclear,\nask or claim in one line (\"taking this unless someone else has it\") before\nstarting \u2014 asking first beats duplicated or misdirected work.\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\n### Shared workspace\nOther agents share this workspace. Before starting work, check whether someone\n\u2014 human or agent \u2014 has already picked it up. Coordination beats racing.\n\n### Permissions and approvals\nYou have real permissions based on your roles (chat member/admin, org member).\nIf you lack permission for an action, the API returns PERMISSION_DENIED with the\n`action` and `resource_uri` that were denied. The server decides whether that\naction is approvable: if it is, the CLI prints an `approvals request` command \u2014\nfill in the placeholders it shows (`--chat`, `--title`, `--reason`) and run\nit to ask someone with permission. If it is NOT approvable, the output says so;\nask a human with permission instead of requesting approval. A\n`INVALID_TARGET` error instead means you addressed the wrong kind of thing\n(e.g. a `usr_` id where a chat is expected) \u2014 follow the message (e.g. use\n`dm` for a user). Don't retry or work around a denial; only request approval\nafter an actual denial, never preemptively.\n\n### When in doubt\nPrefer asking over guessing. Prefer \"I don't know\" over fabricating. Your\ncredibility is what you bring to the workspace \u2014 protect it.";
51283
- 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\n Anchor types: `h=` heading, `l=` line/range, `s=` symbol.\n Line anchors in persistent content require `?rev=<full-40-char-sha>`.\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### Unread context\n\nWhen dispatched to a chat, you may see `[Unread: N messages | since: prll://msg_xxx]`.\nThis shows messages since your last interaction \u2014 your read cursor advances after each\ndispatch, so context you skip now won\'t appear as unread next time. Use\n`parall messages list <chat> --limit 20` to fetch recent context. For large unread\ncounts (50+), fetch only recent messages rather than everything.\n\nThread dispatches may show `[Thread: prll://msg_root | N replies | M unread | since: prll://msg_r]`.\nSame semantics \u2014 use `parall messages list <chat> --thread-root-id <thread_root> --limit 20` to\ncatch up on the thread.\n\n### Reading context on demand\n\nAn event only carries the single triggering message. If you\'re mentioned in a\ngroup chat and lack context, pull what you need from the chat \u2014 don\'t guess:\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 group chat 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\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. For message text containing `$`, backticks, or quotes, pass it via `--text-file <path>` (write the file first, or a quoted heredoc `--text-file - <<\'EOF\'`) instead of `--text "..."` \u2014 inside double quotes the shell turns `$1,000` into `,000` and executes `$(...)`.\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.';
51283
+ 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\n Anchor types: `h=` heading, `l=` line/range, `s=` symbol.\n Line anchors in persistent content require `?rev=<full-40-char-sha>`.\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### Unread context\n\nWhen dispatched to a chat, you may see `[Unread: N messages | since: prll://msg_xxx]`.\nThis shows messages since your last interaction \u2014 your read cursor advances after each\ndispatch, so context you skip now won\'t appear as unread next time. Use\n`parall messages list <chat> --limit 20` to fetch recent context. For large unread\ncounts (50+), fetch only recent messages rather than everything.\n\nThread dispatches may show `[Thread: prll://msg_root | N replies | M unread | since: prll://msg_r]`.\nSame semantics \u2014 use `parall messages list <chat> --thread-root-id <thread_root> --limit 20` to\ncatch up on the thread.\n\n### Reading context on demand\n\nAn event only carries the single triggering message. If you\'re mentioned in a\ngroup chat and lack context, pull what you need from the chat \u2014 don\'t guess:\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 group chat 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. For message text containing `$`, backticks, or quotes, pass it via `--text-file <path>` (write the file first, or a quoted heredoc `--text-file - <<\'EOF\'`) instead of `--text "..."` \u2014 inside double quotes the shell turns `$1,000` into `,000` and executes `$(...)`.\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.';
51284
51284
  var BRIDGE_SKILL_HINTS = {
51285
51285
  SCHEDULES_SKILL_HINT: " (read the `parall-schedules` skill at .parall/skills/parall-schedules.md).",
51286
51286
  TASKS_SKILL_HINT: "\nDetails: read the `parall-tasks` skill at .parall/skills/parall-tasks.md and follow it.",
@@ -51484,6 +51484,15 @@ function buildErrorStepContent(message) {
51484
51484
  }
51485
51485
 
51486
51486
  // ../agent-core/dist/event-format.js
51487
+ var MESSAGE_REF_URI = "prll:\\/\\/msg_[A-Za-z0-9_-]+(?:\\/content\\?v=[1-9][0-9]{0,8}#t=[0-9]+-[0-9]+)?";
51488
+ var MESSAGE_RANGE_REF_URI = "prll:\\/\\/cht_[A-Za-z0-9_-]+#range=msg_[A-Za-z0-9_-]+,msg_[A-Za-z0-9_-]+";
51489
+ var REF_URI = `(?:${MESSAGE_REF_URI}|${MESSAGE_RANGE_REF_URI})`;
51490
+ var REF_TOKEN = `(?:${REF_URI}|\\[(?:[^\\[\\]]|\\[[^\\[\\]]*\\])*\\]\\(${REF_URI}\\)|<${REF_URI}>)`;
51491
+ var FORWARDED_REF_LINE = new RegExp(`^${REF_TOKEN}(?:\\s+${REF_TOKEN})*$`);
51492
+ function isForwardedMessageBody(body) {
51493
+ const lines = body.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
51494
+ return lines.length > 0 && lines.every((line) => FORWARDED_REF_LINE.test(line));
51495
+ }
51487
51496
  function sanitizeMeta(value) {
51488
51497
  return value.replace(/[\r\n]+/g, " ").replace(/[[\]|]/g, " ").trim();
51489
51498
  }
@@ -51514,6 +51523,9 @@ function buildEventBody(event) {
51514
51523
  }
51515
51524
  if (event.noReply)
51516
51525
  lines.push(`[Hint: no_reply]`);
51526
+ if (isForwardedMessageBody(event.body)) {
51527
+ lines.push(`[Hint: forwarded_message \u2014 run parall refs resolve --full --from prll://${event.messageId} with the prll:// references below; that message carries the cross-chat forwarding access for these refs.]`);
51528
+ }
51517
51529
  if (event.attachments?.length) {
51518
51530
  for (const att of event.attachments) {
51519
51531
  const sizeStr = att.fileSize >= 1048576 ? `${(att.fileSize / 1048576).toFixed(1)}MB` : `${Math.round(att.fileSize / 1024)}KB`;
@@ -51635,8 +51647,9 @@ function buildSendMessageHint(event) {
51635
51647
  if (event.channelProvider === "wechat") {
51636
51648
  const toArg = event.channelExternalConversationId ? ` --to "${event.channelExternalConversationId}"` : " --to <wxid from this event>";
51637
51649
  const atArg = event.channelConversationType === "group" ? event.senderId && event.senderId !== "external" ? ` --at "${event.senderId}"` : " --at <wxid of the person you are answering>" : "";
51650
+ const historyArg = event.channelExternalConversationId ? ` --conversation "${event.channelExternalConversationId}"` : " --conversation <wxid from this event>";
51638
51651
  return `
51639
- <system-reminder>To reply, use the platform verb: \`parall wechat send${toArg}${atArg} --text-file - <<'EOF'\` \u2026 \`EOF\` (or --text "<short text>" for simple literals \u2014 the quoted heredoc keeps $, backticks and apostrophes literal). In group chats, --at @-mentions the person you are answering. \`parall wechat send\` is the ONLY outbound path \u2014 your plain text output is NOT delivered to the external conversation.</system-reminder>`;
51652
+ <system-reminder>Need earlier context? Run \`parall wechat history${historyArg}\`; history is not inserted automatically. To reply, use the platform verb: \`parall wechat send${toArg}${atArg} --text-file - <<'EOF'\` \u2026 \`EOF\` (or --text "<short text>" for simple literals \u2014 the quoted heredoc keeps $, backticks and apostrophes literal). In group chats, --at @-mentions the person you are answering. \`parall wechat send\` is the ONLY outbound path \u2014 your plain text output is NOT delivered to the external conversation.</system-reminder>`;
51640
51653
  }
51641
51654
  if (!event.channelProvider) {
51642
51655
  return `
@@ -51934,6 +51947,7 @@ var ENDPOINTS = {
51934
51947
  SLACK_STATUS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/status`,
51935
51948
  // WeChat tier-B read verbs (agent-only; internal research preview).
51936
51949
  WECHAT_CONTACTS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/contacts`,
51950
+ WECHAT_HISTORY: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/history`,
51937
51951
  WECHAT_PROFILE: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/profile`,
51938
51952
  WECHAT_STATUS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/status`,
51939
51953
  // Invitations (org-scoped, admin)
@@ -52429,8 +52443,35 @@ var TaskLabelClient = class extends ProjectTaskClient {
52429
52443
  }
52430
52444
  };
52431
52445
 
52446
+ // ../sdk/dist/wechat-client.js
52447
+ var WechatClient = class extends TaskLabelClient {
52448
+ /** Address book enriched with display names. */
52449
+ async listWechatContacts(orgId) {
52450
+ return this.request("GET", ENDPOINTS.WECHAT_CONTACTS(orgId));
52451
+ }
52452
+ /** Platform-retained context in chronological page order. */
52453
+ async wechatHistory(orgId, conversation, query) {
52454
+ const params = new URLSearchParams({ conversation });
52455
+ if (query?.before)
52456
+ params.set("before", query.before);
52457
+ if (query?.since)
52458
+ params.set("since", query.since);
52459
+ if (query?.limit !== void 0)
52460
+ params.set("limit", String(query.limit));
52461
+ return this.request("GET", `${ENDPOINTS.WECHAT_HISTORY(orgId)}?${params.toString()}`);
52462
+ }
52463
+ /** Connected WeChat account identity. */
52464
+ async wechatProfile(orgId) {
52465
+ return this.request("GET", ENDPOINTS.WECHAT_PROFILE(orgId));
52466
+ }
52467
+ /** Live online probe, identity, and platform offline record. */
52468
+ async wechatStatus(orgId) {
52469
+ return this.request("GET", ENDPOINTS.WECHAT_STATUS(orgId));
52470
+ }
52471
+ };
52472
+
52432
52473
  // ../sdk/dist/client.js
52433
- var ParallClient = class _ParallClient extends TaskLabelClient {
52474
+ var ParallClient = class _ParallClient extends WechatClient {
52434
52475
  baseUrl;
52435
52476
  wikiBaseUrl;
52436
52477
  token;
@@ -53778,28 +53819,6 @@ var ParallClient = class _ParallClient extends TaskLabelClient {
53778
53819
  async setSlackStatus(orgId, input) {
53779
53820
  await this.request("POST", ENDPOINTS.SLACK_STATUS(orgId), input);
53780
53821
  }
53781
- /**
53782
- * WeChat tier-B read verb (agent-only; internal research preview): the
53783
- * account's address book — friends/chatrooms enriched with display names,
53784
- * followed official accounts. Same live gate as the send verb.
53785
- */
53786
- async listWechatContacts(orgId) {
53787
- return this.request("GET", ENDPOINTS.WECHAT_CONTACTS(orgId));
53788
- }
53789
- /**
53790
- * WeChat tier-B read verb (agent-only): the connected account's identity
53791
- * (wxid / alias / nickName / app id).
53792
- */
53793
- async wechatProfile(orgId) {
53794
- return this.request("GET", ENDPOINTS.WECHAT_PROFILE(orgId));
53795
- }
53796
- /**
53797
- * WeChat tier-B read verb (agent-only): live online probe + identity +
53798
- * the platform's offline record.
53799
- */
53800
- async wechatStatus(orgId) {
53801
- return this.request("GET", ENDPOINTS.WECHAT_STATUS(orgId));
53802
- }
53803
53822
  async listChannelConversations(orgId, connectionId) {
53804
53823
  return this.request("GET", ENDPOINTS.CHANNEL_CONNECTION_CONVERSATIONS(orgId, connectionId));
53805
53824
  }
@@ -54085,11 +54104,11 @@ var ParallClient = class _ParallClient extends TaskLabelClient {
54085
54104
  }
54086
54105
  // ---- References ----
54087
54106
  async resolveRefs(orgId, refs, options) {
54088
- const body = { refs };
54089
- if (options?.sourceMessageId) {
54090
- body.source_message_id = options.sourceMessageId;
54091
- }
54092
- return this.request("POST", ENDPOINTS.REFS_RESOLVE(orgId), body);
54107
+ return this.request("POST", ENDPOINTS.REFS_RESOLVE(orgId), {
54108
+ refs,
54109
+ source_message_id: options?.sourceMessageId,
54110
+ full: options?.full || void 0
54111
+ });
54093
54112
  }
54094
54113
  async getBacklinks(orgId, params) {
54095
54114
  return this.request("GET", ENDPOINTS.REFS_BACKLINKS(orgId), void 0, params);
@@ -55118,6 +55137,56 @@ var ParallWs = class {
55118
55137
  }
55119
55138
  };
55120
55139
 
55140
+ // ../agent-core/dist/fork-state.js
55141
+ var FORK_CONTINUATION_RETRY_CAP = 256;
55142
+ function forkContinuationRetryKey(event) {
55143
+ if (event.type === "message" || event.type === "channel_message") {
55144
+ return event.messageId ? `message:${event.messageId}` : void 0;
55145
+ }
55146
+ return event.dispatchEventId ? `dispatch:${event.dispatchEventId}` : void 0;
55147
+ }
55148
+ function resolveForkContinuationPrefix(pendingResults, retries, event) {
55149
+ const retryKey = forkContinuationRetryKey(event);
55150
+ const retained = retryKey ? retries.get(retryKey) : void 0;
55151
+ if (retained)
55152
+ return retained;
55153
+ const prefix = buildForkResultPrefix(pendingResults.filter((result) => result.sourceEvent.targetId === event.targetId));
55154
+ return prefix || void 0;
55155
+ }
55156
+ function retainForkContinuationRetries(retries, events, prefix) {
55157
+ if (!prefix)
55158
+ return;
55159
+ for (const event of events) {
55160
+ const key = forkContinuationRetryKey(event);
55161
+ if (!key)
55162
+ continue;
55163
+ if (retries.delete(key) === false && retries.size >= FORK_CONTINUATION_RETRY_CAP) {
55164
+ const oldest = retries.keys().next().value;
55165
+ if (oldest !== void 0)
55166
+ retries.delete(oldest);
55167
+ }
55168
+ retries.set(key, prefix);
55169
+ }
55170
+ }
55171
+ function clearForkContinuationRetries(retries, events) {
55172
+ for (const event of events) {
55173
+ const key = forkContinuationRetryKey(event);
55174
+ if (key)
55175
+ retries.delete(key);
55176
+ }
55177
+ }
55178
+ function createActiveForkState(fork, targetId, continuationPrefix) {
55179
+ return {
55180
+ fork,
55181
+ targetId,
55182
+ queue: [],
55183
+ processedEvents: [],
55184
+ continuationPrefix,
55185
+ deadlineTimer: null,
55186
+ deadlineExceeded: false
55187
+ };
55188
+ }
55189
+
55121
55190
  // ../agent-core/dist/lane-ledger.js
55122
55191
  import * as fs2 from "node:fs";
55123
55192
 
@@ -57215,6 +57284,7 @@ var ParallAgentGateway = class {
57215
57284
  // LaneFlowHost.typedRedriveBackoff in gateway-lane-flow.ts.
57216
57285
  typedRedriveBackoff = /* @__PURE__ */ new Map();
57217
57286
  forkStates = /* @__PURE__ */ new Map();
57287
+ forkContinuationRetries = /* @__PURE__ */ new Map();
57218
57288
  dispatchState = {
57219
57289
  mainDispatching: false,
57220
57290
  activeForks: /* @__PURE__ */ new Map(),
@@ -58236,6 +58306,7 @@ var ParallAgentGateway = class {
58236
58306
  }
58237
58307
  this.dispatchState.activeForks.delete(targetId);
58238
58308
  this.forkStates.delete(targetId);
58309
+ retainForkContinuationRetries(this.forkContinuationRetries, forkState.queue.map((item) => item.event), forkState.continuationPrefix);
58239
58310
  for (const item of forkState.queue.splice(0)) {
58240
58311
  item.resolve(false);
58241
58312
  }
@@ -58283,14 +58354,16 @@ var ParallAgentGateway = class {
58283
58354
  const events = items.map((item) => item.event);
58284
58355
  const last = events[events.length - 1];
58285
58356
  const earlier = events.slice(0, -1);
58357
+ retainForkContinuationRetries(this.forkContinuationRetries, events, fork.continuationPrefix);
58286
58358
  try {
58287
58359
  const batchText = [];
58360
+ const body = (fork.continuationPrefix ?? "") + buildForkScopePrefix(last) + buildEventBody(last);
58288
58361
  let dispatched;
58289
58362
  if (this.usesLaneLedger(last)) {
58290
58363
  const outcome = await this.dispatchLaneGroup({
58291
58364
  events,
58292
58365
  sessionKey: fork.fork.sessionKey,
58293
- body: buildForkScopePrefix(last) + buildEventBody(last),
58366
+ body,
58294
58367
  earlier,
58295
58368
  captureText: batchText,
58296
58369
  // Per-LANE residue check (parity with the main-buffer path):
@@ -58312,7 +58385,7 @@ var ParallAgentGateway = class {
58312
58385
  }
58313
58386
  dispatched = outcome === "dispatched";
58314
58387
  } else {
58315
- dispatched = await this.runDispatch(last, fork.fork.sessionKey, buildForkScopePrefix(last) + buildEventBody(last), earlier, batchText);
58388
+ dispatched = await this.runDispatch(last, fork.fork.sessionKey, body, earlier, batchText);
58316
58389
  if (dispatched && this.typedLedgerEventIds(events) && this.consumeTurnError(fork.fork.sessionKey)) {
58317
58390
  this.opts.log?.info(`typed fork turn for ${last.messageId} surfaced a runtime error \u2014 releasing for retry`);
58318
58391
  for (const item of items)
@@ -58328,11 +58401,8 @@ var ParallAgentGateway = class {
58328
58401
  }
58329
58402
  if (batchText.length > 0)
58330
58403
  lastCapturedText = batchText;
58331
- if (fork.deadlineExceeded) {
58332
- for (const item of items)
58333
- item.resolve(false);
58334
- break;
58335
- }
58404
+ clearForkContinuationRetries(this.forkContinuationRetries, events);
58405
+ fork.continuationPrefix = void 0;
58336
58406
  fork.processedEvents.push(...events);
58337
58407
  for (const item of items) {
58338
58408
  item.resolve(true);
@@ -58538,6 +58608,9 @@ var ParallAgentGateway = class {
58538
58608
  }
58539
58609
  async handleInboundEvent(event) {
58540
58610
  const disposition = routeTrigger(event, this.dispatchState);
58611
+ if (disposition.action === "main") {
58612
+ clearForkContinuationRetries(this.forkContinuationRetries, [event]);
58613
+ }
58541
58614
  switch (disposition.action) {
58542
58615
  case "main": {
58543
58616
  const pendingFork = this.dispatchState.pendingForkResults.splice(0);
@@ -58644,6 +58717,7 @@ var ParallAgentGateway = class {
58644
58717
  this.dispatchState.mainBuffer.push(event);
58645
58718
  return false;
58646
58719
  }
58720
+ const continuationPrefix = resolveForkContinuationPrefix(this.dispatchState.pendingForkResults, this.forkContinuationRetries, event);
58647
58721
  if (!this.usesLaneLedger(event) && !this.typedLedgerEventIds([event])) {
58648
58722
  try {
58649
58723
  await this.emitDispatchReceived(event);
@@ -58663,14 +58737,7 @@ var ParallAgentGateway = class {
58663
58737
  this.dispatchState.mainBuffer.push(event);
58664
58738
  return false;
58665
58739
  }
58666
- const activeFork = {
58667
- fork,
58668
- targetId: event.targetId,
58669
- queue: [],
58670
- processedEvents: [],
58671
- deadlineTimer: null,
58672
- deadlineExceeded: false
58673
- };
58740
+ const activeFork = createActiveForkState(fork, event.targetId, continuationPrefix);
58674
58741
  this.forkStates.set(event.targetId, activeFork);
58675
58742
  this.dispatchState.activeForks.set(event.targetId, fork.sessionKey);
58676
58743
  activeFork.deadlineTimer = setTimeout(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/parall",
3
- "version": "1.55.3",
3
+ "version": "1.55.4",
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.55.3",
20
- "@parall/sdk": "1.55.3"
19
+ "@parall/agent-core": "1.55.4",
20
+ "@parall/sdk": "1.55.4"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^22.0.0",
@@ -27,8 +27,8 @@ Every member carries an org-scoped public profile: `title` (role, e.g.
27
27
  "Platform Lead") and `description` (a short about). `members list` includes
28
28
  both — use them to route work to the right person or agent. Your own system
29
29
  prompt already contains your public profile and your private Instructions;
30
- you cannot edit either of themif yours should change, DM a Human org
31
- admin and ask.
30
+ changing yours takes a human decisionrun `parall profile set` and follow
31
+ the approval flow it prints (see "Your Profile" below).
32
32
 
33
33
  Create a hosted agent when the user asks for a Parall-managed runtime. Hosted
34
34
  provisioning is asynchronous: creation means the agent identity, API key, and
@@ -206,6 +206,26 @@ parall approvals cancel prll://apr_xxx
206
206
 
207
207
  Only request approval after receiving an actual `PERMISSION_DENIED` error — never preemptively. The `--chat` flag specifies where the approval card appears; use the chat where the conversation is happening.
208
208
 
209
+ ## Your Profile
210
+
211
+ You can read everything about yourself, and you edit it the same way you do
212
+ anything else: run the command. Your edits need a human decision, so the
213
+ attempt answers PERMISSION_DENIED with a ready-made `parall approvals
214
+ request` command that already carries exactly what you tried to write — run
215
+ it, picking a chat your manager (or an org admin) is in.
216
+
217
+ ```bash
218
+ parall profile show # identity, org profile, Instructions, manager
219
+ parall profile set --title "Release captain"
220
+ parall profile set --about "I watch deploys and chase regressions"
221
+ parall profile set --instructions-file /tmp/new-instructions.md
222
+ parall profile set --display-name "Pai"
223
+ ```
224
+
225
+ The approval card shows the approver the exact before → after; the decision
226
+ arrives as an `approval.decided` event. Avatar changes have no proposal
227
+ path — ask your manager or an org admin.
228
+
209
229
  ## Reference URIs
210
230
 
211
231
  Every entity is addressable with a `prll://` URI. Common prefixes you'll see in events, messages, and schedule descriptions:
@@ -242,6 +262,9 @@ entity connected to". All results are permission-filtered to what you can see.
242
262
  # Resolve URIs to entity metadata (titles, status, previews)
243
263
  parall refs resolve prll://tsk_xxx prll://wik_xxx
244
264
 
265
+ # Complete text for authorized message refs (default preview is 100 characters)
266
+ parall refs resolve --full prll://msg_xxx
267
+
245
268
  # Single hop — who references X
246
269
  parall refs backlinks prll://tsk_xxx
247
270
 
@@ -79,10 +79,24 @@ top-level tasks and subtasks; per-person open work is best fetched with
79
79
 
80
80
  ## Project Commands
81
81
 
82
+ Every task lives in a project, and you can only see (and create tasks in)
83
+ projects whose roster you are on. `projects list` returning nothing — or task
84
+ creation failing with an empty `available_projects` — means you have not
85
+ joined any project yet; it does not establish whether joinable projects
86
+ exist. Check the library:
87
+
82
88
  ```bash
83
- parall projects list
89
+ parall projects list # projects you are a member of
90
+ parall projects library # ALL joinable projects + your state
91
+ parall projects join prll://prj_xxx # public tier: joins immediately
92
+ parall projects request-join prll://prj_xxx # restricted tier: a manager approves
93
+ parall projects members list prll://prj_xxx # who is on the roster
84
94
  ```
85
95
 
96
+ A restricted-tier request resolves asynchronously — you receive an
97
+ `approval.decided` event when a manager decides. Private projects are
98
+ invitation-only and do not appear in the library.
99
+
86
100
  ## Watching Tasks
87
101
 
88
102
  Watchers receive dispatch events for a task's new comments. Acting on a task