@parall/daemon 1.53.0 → 1.55.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.
@@ -63485,15 +63485,35 @@ import * as os from "node:os";
63485
63485
  import * as path6 from "node:path";
63486
63486
  import { pathToFileURL } from "node:url";
63487
63487
 
63488
- // ts/agent-core/dist/provider-config.js
63489
- function clearAllProviderCreds(env) {
63490
- delete env.ANTHROPIC_AUTH_TOKEN;
63491
- delete env.ANTHROPIC_BASE_URL;
63492
- delete env.ANTHROPIC_API_KEY;
63493
- delete env.OPENAI_API_KEY;
63494
- delete env.OPENAI_BASE_URL;
63495
- delete env.PRLL_CLAUDE_ALLOW_API_KEY;
63488
+ // ts/agent-core/dist/generated/platform-instructions.js
63489
+ 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.";
63490
+ 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.';
63491
+ var BRIDGE_SKILL_HINTS = {
63492
+ SCHEDULES_SKILL_HINT: " (read the `parall-schedules` skill at .parall/skills/parall-schedules.md).",
63493
+ TASKS_SKILL_HINT: "\nDetails: read the `parall-tasks` skill at .parall/skills/parall-tasks.md and follow it.",
63494
+ PLATFORM_SKILL_HINT: "\nDetails: read the `parall-platform` skill at .parall/skills/parall-platform.md."
63495
+ };
63496
+ function renderTemplate(template, values) {
63497
+ return template.replace(/\{\{([A-Z_]+)\}\}/g, (_match, token) => {
63498
+ const value = values[token];
63499
+ if (value === void 0)
63500
+ throw new Error(`missing generated platform instruction token: ${token}`);
63501
+ return value;
63502
+ });
63496
63503
  }
63504
+ function renderPlatformBehavior(skillsAvailable) {
63505
+ return renderTemplate(BEHAVIOR_TEMPLATE, {
63506
+ SCHEDULES_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.SCHEDULES_SKILL_HINT : ".",
63507
+ TASKS_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.TASKS_SKILL_HINT : ""
63508
+ });
63509
+ }
63510
+ function renderPlatformReferenceGuide(skillsAvailable) {
63511
+ return renderTemplate(REFERENCE_GUIDE_TEMPLATE, {
63512
+ PLATFORM_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.PLATFORM_SKILL_HINT : ""
63513
+ });
63514
+ }
63515
+ var PLATFORM_BEHAVIOR = renderPlatformBehavior(true);
63516
+ var PLATFORM_REFERENCE_GUIDE = renderPlatformReferenceGuide(true);
63497
63517
 
63498
63518
  // ts/sdk/dist/browser-viewer.js
63499
63519
  var BROWSER_VIEWER_READINESS_TIMEOUT_MS = 6e4;
@@ -63536,6 +63556,9 @@ var ENDPOINTS = {
63536
63556
  ORG_MEMBERS: (orgId) => `${API_BASE}/orgs/${orgId}/members`,
63537
63557
  ORG_MEMBERS_FORMER: (orgId) => `${API_BASE}/orgs/${orgId}/members/former`,
63538
63558
  TEAMS: (orgId) => `${API_BASE}/orgs/${orgId}/teams`,
63559
+ TEAM: (orgId, teamId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}`,
63560
+ TEAM_MEMBERS: (orgId, teamId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members`,
63561
+ TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
63539
63562
  ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE}/orgs/${orgId}/members/online`,
63540
63563
  ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
63541
63564
  ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/chats`,
@@ -63658,6 +63681,7 @@ var ENDPOINTS = {
63658
63681
  MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE: (requestId) => `${API_BASE}/machines/me/browser-profiles/viewer-response/${requestId}`,
63659
63682
  // Tasks (org-scoped)
63660
63683
  TASKS: (orgId) => `${API_BASE}/orgs/${orgId}/tasks`,
63684
+ TASK_SUBTASK_SUMMARY: (orgId) => `${API_BASE}/orgs/${orgId}/tasks/subtask-summary`,
63661
63685
  TASK: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}`,
63662
63686
  TASK_ARCHIVE: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/archive`,
63663
63687
  TASK_RESTORE: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/restore`,
@@ -63671,8 +63695,14 @@ var ENDPOINTS = {
63671
63695
  TASK_COMMENTS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/comments`,
63672
63696
  TASK_COMMENT: (orgId, taskId, commentId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/comments/${commentId}`,
63673
63697
  TASK_ACTIVITIES: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/activities`,
63698
+ TASK_LABELS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/labels`,
63699
+ TASK_LABEL: (orgId, taskId, labelId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/labels/${labelId}`,
63700
+ // Labels (org-scoped vocabulary; writes are admin-gated)
63701
+ LABELS: (orgId) => `${API_BASE}/orgs/${orgId}/labels`,
63702
+ LABEL: (orgId, labelId) => `${API_BASE}/orgs/${orgId}/labels/${labelId}`,
63674
63703
  // Projects (org-scoped)
63675
63704
  PROJECTS: (orgId) => `${API_BASE}/orgs/${orgId}/projects`,
63705
+ PROJECT_TASK_SUMMARY: (orgId) => `${API_BASE}/orgs/${orgId}/projects/task-summary`,
63676
63706
  PROJECT: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}`,
63677
63707
  // Schedules (org-scoped, platform time trigger primitive)
63678
63708
  SCHEDULES: (orgId) => `${API_BASE}/orgs/${orgId}/schedules`,
@@ -63715,8 +63745,10 @@ var ENDPOINTS = {
63715
63745
  SLACK_HISTORY: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/history`,
63716
63746
  SLACK_MEMBERS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/members`,
63717
63747
  SLACK_STATUS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/status`,
63718
- // WeChat tier-B read verb (agent-only; internal research preview).
63748
+ // WeChat tier-B read verbs (agent-only; internal research preview).
63719
63749
  WECHAT_CONTACTS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/contacts`,
63750
+ WECHAT_PROFILE: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/profile`,
63751
+ WECHAT_STATUS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/status`,
63720
63752
  // Invitations (org-scoped, admin)
63721
63753
  ORG_INVITATIONS: (orgId) => `${API_BASE}/orgs/${orgId}/invitations`,
63722
63754
  ORG_INVITATION: (orgId, invId) => `${API_BASE}/orgs/${orgId}/invitations/${invId}`,
@@ -63830,8 +63862,10 @@ var ENDPOINTS = {
63830
63862
  NOTIFICATION_PREFERENCES: `${API_BASE}/notification-preferences`,
63831
63863
  // Unified search (messages + tasks + wiki, org-scoped)
63832
63864
  SEARCH: (orgId) => `${API_BASE}/orgs/${orgId}/search`,
63833
- // Feature flags (org-scoped, server-evaluated)
63834
- FEATURE_FLAGS: (orgId) => `${API_BASE}/orgs/${orgId}/feature-flags`,
63865
+ // Feature flags (server-evaluated). Org-scoped by default; omit the org for
63866
+ // the pre-org form, which resolves "cap:" capabilities only (PostHog flags
63867
+ // are org-scoped and absent there) for callers that have no org yet.
63868
+ FEATURE_FLAGS: (orgId) => orgId ? `${API_BASE}/orgs/${orgId}/feature-flags` : `${API_BASE}/feature-flags`,
63835
63869
  // Team templates (org-scoped, owner/admin only)
63836
63870
  TEMPLATES: (orgId) => `${API_BASE}/orgs/${orgId}/templates`,
63837
63871
  TEMPLATE: (orgId, templateId) => `${API_BASE}/orgs/${orgId}/templates/${templateId}`,
@@ -63901,17 +63935,165 @@ var ENDPOINTS = {
63901
63935
  ORG_CLIP_INSTALL: (orgId) => `/api/v1/orgs/${orgId}/clips/install`,
63902
63936
  ORG_CLIPS_INSTALLED: (orgId) => `/api/v1/orgs/${orgId}/clips/installed`,
63903
63937
  ORG_CLIP_UNINSTALL: (orgId, clipId) => `/api/v1/orgs/${orgId}/clips/${clipId}/uninstall`,
63938
+ ORG_CLIP_MCP_REMOVE: (orgId, clipId) => `/api/v1/orgs/${orgId}/clips/${clipId}/mcp-remove`,
63904
63939
  // Per-org agent exec access for one clip (default all agents; PUT human-only)
63905
63940
  ORG_CLIP_EXEC_ACCESS: (orgId, clipId) => `/api/v1/orgs/${orgId}/clips/${clipId}/exec-access`,
63906
- // MCP clip server config (cap:clip-mcp; publisher-org only cross-org gets
63907
- // 403 MCP_CROSS_ORG_DISABLED on the whole family, reads included)
63941
+ // MCP clip server config (cap:clip-mcp; cross-org is limited to installed,
63942
+ // reviewed Official OAuth Clips). The
63943
+ // singular family addresses the org's DEFAULT connection (pre-165
63944
+ // back-compat shim); the plural family is the multi-connection surface —
63945
+ // one config row (credential slot) per connection, addressed by config id.
63908
63946
  ORG_CLIP_MCP_CONFIG: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-config`,
63909
63947
  ORG_CLIP_MCP_TOOLS_REFRESH: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-config/tools/refresh`,
63910
- ORG_CLIP_MCP_OAUTH_DISCONNECT: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-config/oauth/disconnect`
63948
+ ORG_CLIP_MCP_OAUTH_DISCONNECT: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-config/oauth/disconnect`,
63949
+ ORG_CLIP_MCP_CONFIGS: (orgId, clipId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-configs`,
63950
+ ORG_CLIP_MCP_CONFIG_BY_ID: (orgId, clipId, configId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-configs/${configId}`,
63951
+ ORG_CLIP_MCP_TOOLS_REFRESH_BY_ID: (orgId, clipId, configId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-configs/${configId}/tools/refresh`,
63952
+ ORG_CLIP_MCP_OAUTH_DISCONNECT_BY_ID: (orgId, clipId, configId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-configs/${configId}/oauth/disconnect`
63953
+ };
63954
+
63955
+ // ts/sdk/dist/project-task-client.js
63956
+ var ProjectTaskClient = class {
63957
+ async createTask(orgId, data2) {
63958
+ return this.request("POST", ENDPOINTS.TASKS(orgId), data2);
63959
+ }
63960
+ async getTasks(orgId, params) {
63961
+ return this.request("GET", ENDPOINTS.TASKS(orgId), void 0, params);
63962
+ }
63963
+ async getTaskSubtaskSummary(orgId, params) {
63964
+ return this.request("GET", ENDPOINTS.TASK_SUBTASK_SUMMARY(orgId), void 0, params);
63965
+ }
63966
+ async getTask(orgId, taskId) {
63967
+ return this.request("GET", ENDPOINTS.TASK(orgId, taskId));
63968
+ }
63969
+ async updateTask(orgId, taskId, data2) {
63970
+ return this.request("PATCH", ENDPOINTS.TASK(orgId, taskId), data2);
63971
+ }
63972
+ async deleteTask(orgId, taskId, opts) {
63973
+ return this.request("DELETE", ENDPOINTS.TASK(orgId, taskId), void 0, opts?.force ? { force: "true" } : void 0);
63974
+ }
63975
+ async archiveTask(orgId, taskId) {
63976
+ return this.request("POST", ENDPOINTS.TASK_ARCHIVE(orgId, taskId));
63977
+ }
63978
+ async restoreTask(orgId, taskId) {
63979
+ return this.request("POST", ENDPOINTS.TASK_RESTORE(orgId, taskId));
63980
+ }
63981
+ async watchTask(orgId, taskId) {
63982
+ return this.request("POST", ENDPOINTS.TASK_WATCH(orgId, taskId));
63983
+ }
63984
+ async unwatchTask(orgId, taskId) {
63985
+ return this.request("DELETE", ENDPOINTS.TASK_WATCH(orgId, taskId));
63986
+ }
63987
+ async getTaskWatchers(orgId, taskId) {
63988
+ const res = await this.request("GET", ENDPOINTS.TASK_WATCHERS(orgId, taskId));
63989
+ return res.data;
63990
+ }
63991
+ async subscribeTaskMember(orgId, taskId, userId) {
63992
+ return this.request("PUT", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
63993
+ }
63994
+ async unsubscribeTaskMember(orgId, taskId, userId) {
63995
+ return this.request("DELETE", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
63996
+ }
63997
+ async watchThread(threadRootId) {
63998
+ return this.request("POST", ENDPOINTS.MESSAGE_WATCH(threadRootId));
63999
+ }
64000
+ async unwatchThread(threadRootId) {
64001
+ return this.request("DELETE", ENDPOINTS.MESSAGE_WATCH(threadRootId));
64002
+ }
64003
+ async getThreadWatchers(threadRootId) {
64004
+ const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHERS(threadRootId));
64005
+ return res.data;
64006
+ }
64007
+ async isWatchingThread(threadRootId) {
64008
+ const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHING(threadRootId));
64009
+ return res.watching;
64010
+ }
64011
+ async getSubtasks(orgId, taskId) {
64012
+ const res = await this.request("GET", ENDPOINTS.TASK_SUBTASKS(orgId, taskId));
64013
+ return res.data;
64014
+ }
64015
+ async createTaskRelation(orgId, taskId, data2) {
64016
+ return this.request("POST", ENDPOINTS.TASK_RELATIONS(orgId, taskId), data2);
64017
+ }
64018
+ async getTaskRelations(orgId, taskId) {
64019
+ const res = await this.request("GET", ENDPOINTS.TASK_RELATIONS(orgId, taskId));
64020
+ return res.data;
64021
+ }
64022
+ async listTaskRelationsByTarget(orgId, params) {
64023
+ const query = new URLSearchParams({
64024
+ target_type: params.target_type,
64025
+ target_id: params.target_id
64026
+ });
64027
+ const res = await this.request("GET", `${ENDPOINTS.TASK_RELATIONS_BY_TARGET(orgId)}?${query.toString()}`);
64028
+ return res.data;
64029
+ }
64030
+ async deleteTaskRelation(orgId, taskId, relationId) {
64031
+ return this.request("DELETE", ENDPOINTS.TASK_RELATION(orgId, taskId, relationId));
64032
+ }
64033
+ async getTaskComments(orgId, taskId, params) {
64034
+ return this.request("GET", ENDPOINTS.TASK_COMMENTS(orgId, taskId), void 0, params);
64035
+ }
64036
+ async getTaskComment(orgId, taskId, commentId) {
64037
+ return this.request("GET", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
64038
+ }
64039
+ async createTaskComment(orgId, taskId, data2) {
64040
+ return this.request("POST", ENDPOINTS.TASK_COMMENTS(orgId, taskId), data2);
64041
+ }
64042
+ async updateTaskComment(orgId, taskId, commentId, data2) {
64043
+ return this.request("PATCH", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId), data2);
64044
+ }
64045
+ async deleteTaskComment(orgId, taskId, commentId) {
64046
+ return this.request("DELETE", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
64047
+ }
64048
+ async getTaskActivities(orgId, taskId, params) {
64049
+ return this.request("GET", ENDPOINTS.TASK_ACTIVITIES(orgId, taskId), void 0, params);
64050
+ }
64051
+ async createProject(orgId, data2) {
64052
+ return this.request("POST", ENDPOINTS.PROJECTS(orgId), data2);
64053
+ }
64054
+ async getProjects(orgId) {
64055
+ const res = await this.request("GET", ENDPOINTS.PROJECTS(orgId));
64056
+ return res.data;
64057
+ }
64058
+ async getProjectTaskSummary(orgId) {
64059
+ return this.request("GET", ENDPOINTS.PROJECT_TASK_SUMMARY(orgId));
64060
+ }
64061
+ async getProject(orgId, projectId) {
64062
+ return this.request("GET", ENDPOINTS.PROJECT(orgId, projectId));
64063
+ }
64064
+ async updateProject(orgId, projectId, data2) {
64065
+ return this.request("PATCH", ENDPOINTS.PROJECT(orgId, projectId), data2);
64066
+ }
64067
+ async deleteProject(orgId, projectId) {
64068
+ return this.request("DELETE", ENDPOINTS.PROJECT(orgId, projectId));
64069
+ }
64070
+ };
64071
+
64072
+ // ts/sdk/dist/task-label-client.js
64073
+ var TaskLabelClient = class extends ProjectTaskClient {
64074
+ async getLabels(orgId) {
64075
+ const response = await this.request("GET", ENDPOINTS.LABELS(orgId));
64076
+ return response.data;
64077
+ }
64078
+ async createLabel(orgId, data2) {
64079
+ return this.request("POST", ENDPOINTS.LABELS(orgId), data2);
64080
+ }
64081
+ async updateLabel(orgId, labelId, data2) {
64082
+ return this.request("PATCH", ENDPOINTS.LABEL(orgId, labelId), data2);
64083
+ }
64084
+ async deleteLabel(orgId, labelId) {
64085
+ return this.request("DELETE", ENDPOINTS.LABEL(orgId, labelId));
64086
+ }
64087
+ async addTaskLabels(orgId, taskId, data2) {
64088
+ return this.request("POST", ENDPOINTS.TASK_LABELS(orgId, taskId), data2);
64089
+ }
64090
+ async removeTaskLabel(orgId, taskId, labelId) {
64091
+ return this.request("DELETE", ENDPOINTS.TASK_LABEL(orgId, taskId, labelId));
64092
+ }
63911
64093
  };
63912
64094
 
63913
64095
  // ts/sdk/dist/client.js
63914
- var ParallClient = class _ParallClient {
64096
+ var ParallClient = class _ParallClient extends TaskLabelClient {
63915
64097
  baseUrl;
63916
64098
  wikiBaseUrl;
63917
64099
  token;
@@ -63971,6 +64153,7 @@ var ParallClient = class _ParallClient {
63971
64153
  return headers;
63972
64154
  }
63973
64155
  constructor(options = {}) {
64156
+ super();
63974
64157
  this.baseUrl = options.baseUrl ?? "";
63975
64158
  this.wikiBaseUrl = options.wikiBaseUrl ?? this.baseUrl;
63976
64159
  this.token = options.token ?? null;
@@ -64268,6 +64451,44 @@ var ParallClient = class _ParallClient {
64268
64451
  const res = await this.request("GET", ENDPOINTS.TEAMS(orgId));
64269
64452
  return res.data;
64270
64453
  }
64454
+ async getTeam(orgId, teamId) {
64455
+ return this.request("GET", ENDPOINTS.TEAM(orgId, teamId));
64456
+ }
64457
+ /** Creating, renaming and deleting a team are org-admin actions. */
64458
+ async createTeam(orgId, req) {
64459
+ return this.request("POST", ENDPOINTS.TEAMS(orgId), req);
64460
+ }
64461
+ /**
64462
+ * Renames a team. The slug cannot be changed — wiki ACL rows reference it as
64463
+ * `@slug`, so the server answers 400 SLUG_IMMUTABLE if one is sent.
64464
+ */
64465
+ async updateTeam(orgId, teamId, req) {
64466
+ return this.request("PATCH", ENDPOINTS.TEAM(orgId, teamId), req);
64467
+ }
64468
+ async deleteTeam(orgId, teamId) {
64469
+ return this.request("DELETE", ENDPOINTS.TEAM(orgId, teamId));
64470
+ }
64471
+ /** Roster with display info; members who left the org are already excluded. */
64472
+ async getTeamMembers(orgId, teamId) {
64473
+ const res = await this.request("GET", ENDPOINTS.TEAM_MEMBERS(orgId, teamId));
64474
+ return res.data;
64475
+ }
64476
+ /**
64477
+ * Adds an org member (human or agent) to a team. Org admins and that team's
64478
+ * managers may add ordinary members; adding straight to `manager` is an
64479
+ * org-admin action.
64480
+ */
64481
+ async addTeamMember(orgId, teamId, req) {
64482
+ return this.request("POST", ENDPOINTS.TEAM_MEMBERS(orgId, teamId), req);
64483
+ }
64484
+ /** Appointing or demoting a manager is org-admin only. */
64485
+ async updateTeamMember(orgId, teamId, userId, req) {
64486
+ return this.request("PATCH", ENDPOINTS.TEAM_MEMBER(orgId, teamId, userId), req);
64487
+ }
64488
+ /** A team manager may remove ordinary members; removing a peer manager is org-admin only. */
64489
+ async removeTeamMember(orgId, teamId, userId) {
64490
+ return this.request("DELETE", ENDPOINTS.TEAM_MEMBER(orgId, teamId, userId));
64491
+ }
64271
64492
  async getOnlineMembers(orgId) {
64272
64493
  const res = await this.request("GET", ENDPOINTS.ORG_MEMBERS_ONLINE(orgId));
64273
64494
  return res.user_ids ?? [];
@@ -65071,117 +65292,6 @@ var ParallClient = class _ParallClient {
65071
65292
  }
65072
65293
  return res.json();
65073
65294
  }
65074
- // ---- Tasks (org-scoped) ----
65075
- async createTask(orgId, data2) {
65076
- return this.request("POST", ENDPOINTS.TASKS(orgId), data2);
65077
- }
65078
- async getTasks(orgId, params) {
65079
- return this.request("GET", ENDPOINTS.TASKS(orgId), void 0, params);
65080
- }
65081
- async getTask(orgId, taskId) {
65082
- return this.request("GET", ENDPOINTS.TASK(orgId, taskId));
65083
- }
65084
- async updateTask(orgId, taskId, data2) {
65085
- return this.request("PATCH", ENDPOINTS.TASK(orgId, taskId), data2);
65086
- }
65087
- async deleteTask(orgId, taskId, opts) {
65088
- return this.request("DELETE", ENDPOINTS.TASK(orgId, taskId), void 0, opts?.force ? { force: "true" } : void 0);
65089
- }
65090
- async archiveTask(orgId, taskId) {
65091
- return this.request("POST", ENDPOINTS.TASK_ARCHIVE(orgId, taskId));
65092
- }
65093
- async restoreTask(orgId, taskId) {
65094
- return this.request("POST", ENDPOINTS.TASK_RESTORE(orgId, taskId));
65095
- }
65096
- async watchTask(orgId, taskId) {
65097
- return this.request("POST", ENDPOINTS.TASK_WATCH(orgId, taskId));
65098
- }
65099
- async unwatchTask(orgId, taskId) {
65100
- return this.request("DELETE", ENDPOINTS.TASK_WATCH(orgId, taskId));
65101
- }
65102
- async getTaskWatchers(orgId, taskId) {
65103
- const res = await this.request("GET", ENDPOINTS.TASK_WATCHERS(orgId, taskId));
65104
- return res.data;
65105
- }
65106
- async subscribeTaskMember(orgId, taskId, userId) {
65107
- return this.request("PUT", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
65108
- }
65109
- async unsubscribeTaskMember(orgId, taskId, userId) {
65110
- return this.request("DELETE", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
65111
- }
65112
- async watchThread(threadRootId) {
65113
- return this.request("POST", ENDPOINTS.MESSAGE_WATCH(threadRootId));
65114
- }
65115
- async unwatchThread(threadRootId) {
65116
- return this.request("DELETE", ENDPOINTS.MESSAGE_WATCH(threadRootId));
65117
- }
65118
- async getThreadWatchers(threadRootId) {
65119
- const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHERS(threadRootId));
65120
- return res.data;
65121
- }
65122
- async isWatchingThread(threadRootId) {
65123
- const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHING(threadRootId));
65124
- return res.watching;
65125
- }
65126
- async getSubtasks(orgId, taskId) {
65127
- const res = await this.request("GET", ENDPOINTS.TASK_SUBTASKS(orgId, taskId));
65128
- return res.data;
65129
- }
65130
- async createTaskRelation(orgId, taskId, data2) {
65131
- return this.request("POST", ENDPOINTS.TASK_RELATIONS(orgId, taskId), data2);
65132
- }
65133
- async getTaskRelations(orgId, taskId) {
65134
- const res = await this.request("GET", ENDPOINTS.TASK_RELATIONS(orgId, taskId));
65135
- return res.data;
65136
- }
65137
- async listTaskRelationsByTarget(orgId, params) {
65138
- const query = new URLSearchParams({
65139
- target_type: params.target_type,
65140
- target_id: params.target_id
65141
- });
65142
- const res = await this.request("GET", `${ENDPOINTS.TASK_RELATIONS_BY_TARGET(orgId)}?${query.toString()}`);
65143
- return res.data;
65144
- }
65145
- async deleteTaskRelation(orgId, taskId, relationId) {
65146
- return this.request("DELETE", ENDPOINTS.TASK_RELATION(orgId, taskId, relationId));
65147
- }
65148
- // ---- Task Comments ----
65149
- async getTaskComments(orgId, taskId, params) {
65150
- return this.request("GET", ENDPOINTS.TASK_COMMENTS(orgId, taskId), void 0, params);
65151
- }
65152
- async getTaskComment(orgId, taskId, commentId) {
65153
- return this.request("GET", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
65154
- }
65155
- async createTaskComment(orgId, taskId, data2) {
65156
- return this.request("POST", ENDPOINTS.TASK_COMMENTS(orgId, taskId), data2);
65157
- }
65158
- async updateTaskComment(orgId, taskId, commentId, data2) {
65159
- return this.request("PATCH", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId), data2);
65160
- }
65161
- async deleteTaskComment(orgId, taskId, commentId) {
65162
- return this.request("DELETE", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
65163
- }
65164
- // ---- Task Activities ----
65165
- async getTaskActivities(orgId, taskId, params) {
65166
- return this.request("GET", ENDPOINTS.TASK_ACTIVITIES(orgId, taskId), void 0, params);
65167
- }
65168
- // ---- Projects (org-scoped) ----
65169
- async createProject(orgId, data2) {
65170
- return this.request("POST", ENDPOINTS.PROJECTS(orgId), data2);
65171
- }
65172
- async getProjects(orgId) {
65173
- const res = await this.request("GET", ENDPOINTS.PROJECTS(orgId));
65174
- return res.data;
65175
- }
65176
- async getProject(orgId, projectId) {
65177
- return this.request("GET", ENDPOINTS.PROJECT(orgId, projectId));
65178
- }
65179
- async updateProject(orgId, projectId, data2) {
65180
- return this.request("PATCH", ENDPOINTS.PROJECT(orgId, projectId), data2);
65181
- }
65182
- async deleteProject(orgId, projectId) {
65183
- return this.request("DELETE", ENDPOINTS.PROJECT(orgId, projectId));
65184
- }
65185
65295
  // ---- Schedules (org-scoped) ----
65186
65296
  async createSchedule(orgId, input) {
65187
65297
  return this.request("POST", ENDPOINTS.SCHEDULES(orgId), input);
@@ -65319,12 +65429,26 @@ var ParallClient = class _ParallClient {
65319
65429
  }
65320
65430
  /**
65321
65431
  * WeChat tier-B read verb (agent-only; internal research preview): the
65322
- * account's address book — friend wxids, saved group room ids, followed
65323
- * official accounts. Same live gate as the send verb.
65432
+ * account's address book — friends/chatrooms enriched with display names,
65433
+ * followed official accounts. Same live gate as the send verb.
65324
65434
  */
65325
65435
  async listWechatContacts(orgId) {
65326
65436
  return this.request("GET", ENDPOINTS.WECHAT_CONTACTS(orgId));
65327
65437
  }
65438
+ /**
65439
+ * WeChat tier-B read verb (agent-only): the connected account's identity
65440
+ * (wxid / alias / nickName / app id).
65441
+ */
65442
+ async wechatProfile(orgId) {
65443
+ return this.request("GET", ENDPOINTS.WECHAT_PROFILE(orgId));
65444
+ }
65445
+ /**
65446
+ * WeChat tier-B read verb (agent-only): live online probe + identity +
65447
+ * the platform's offline record.
65448
+ */
65449
+ async wechatStatus(orgId) {
65450
+ return this.request("GET", ENDPOINTS.WECHAT_STATUS(orgId));
65451
+ }
65328
65452
  async listChannelConversations(orgId, connectionId) {
65329
65453
  return this.request("GET", ENDPOINTS.CHANNEL_CONNECTION_CONVERSATIONS(orgId, connectionId));
65330
65454
  }
@@ -65660,6 +65784,7 @@ var ParallClient = class _ParallClient {
65660
65784
  return this.request("PATCH", ENDPOINTS.NOTIFICATION_PREFERENCES, { prefs });
65661
65785
  }
65662
65786
  // ---- Feature Flags (org-scoped, server-evaluated) ----
65787
+ /** Omit orgId to resolve deployment capabilities before joining an org. */
65663
65788
  async getFeatureFlags(orgId) {
65664
65789
  return this.request("GET", ENDPOINTS.FEATURE_FLAGS(orgId));
65665
65790
  }
@@ -65676,6 +65801,44 @@ var ParallClient = class _ParallClient {
65676
65801
  timeoutMs: 185e3
65677
65802
  });
65678
65803
  }
65804
+ /** Queue a template deployment and poll its durable deployment row. Each
65805
+ * request is short-lived; closing the client does not cancel server work. */
65806
+ async deployTemplateAsync(orgId, request, idempotencyKey) {
65807
+ const queue = () => this.request("POST", ENDPOINTS.TEMPLATE_DEPLOYMENTS(orgId), {
65808
+ ...request,
65809
+ async: true,
65810
+ idempotency_key: idempotencyKey
65811
+ });
65812
+ let result;
65813
+ for (let attempt = 0; attempt < 2 && result === void 0; attempt += 1) {
65814
+ try {
65815
+ result = await queue();
65816
+ } catch (error2) {
65817
+ if (!(error2 instanceof ApiError) || error2.status !== 0 && error2.status < 500)
65818
+ throw error2;
65819
+ }
65820
+ }
65821
+ if (result === void 0) {
65822
+ throw new ApiError(0, "Template deployment request outcome is unknown", "NETWORK_ERROR");
65823
+ }
65824
+ const deadline = Date.now() + 30 * 60 * 1e3;
65825
+ while (result.status === "queued" || result.status === "deploying") {
65826
+ if (Date.now() >= deadline) {
65827
+ throw new ApiError(0, "Template deployment is still running", "REQUEST_TIMEOUT");
65828
+ }
65829
+ await new Promise((resolve2) => setTimeout(resolve2, 2e3));
65830
+ try {
65831
+ result = await this.request("GET", ENDPOINTS.TEMPLATE_DEPLOYMENT(orgId, result.deployment_id));
65832
+ } catch (error2) {
65833
+ if (!(error2 instanceof ApiError) || error2.status !== 0 && error2.status < 500)
65834
+ throw error2;
65835
+ }
65836
+ }
65837
+ if (result.status !== "deployed") {
65838
+ throw new ApiError(500, result.error?.message ?? "Template deployment failed", result.error?.code);
65839
+ }
65840
+ return result;
65841
+ }
65679
65842
  async getTemplateDeployment(orgId, deploymentId) {
65680
65843
  return this.request("GET", ENDPOINTS.TEMPLATE_DEPLOYMENT(orgId, deploymentId));
65681
65844
  }
@@ -65890,6 +66053,11 @@ var ParallClient = class _ParallClient {
65890
66053
  async uninstallRegistryClip(orgId, clipId) {
65891
66054
  await this.request("DELETE", ENDPOINTS.ORG_CLIP_UNINSTALL(orgId, clipId));
65892
66055
  }
66056
+ /** Best-effort provider revoke followed by atomic local removal of an
66057
+ * installed Official MCP Clip and all org-owned connection state. */
66058
+ async removeOfficialMCPClip(orgId, clipId) {
66059
+ return this.request("DELETE", ENDPOINTS.ORG_CLIP_MCP_REMOVE(orgId, clipId));
66060
+ }
65893
66061
  /** List the org's installed registry clips (full entries). */
65894
66062
  async listInstalledRegistryClips(orgId) {
65895
66063
  const resp = await this.request("GET", ENDPOINTS.ORG_CLIPS_INSTALLED(orgId));
@@ -66076,12 +66244,14 @@ var ParallClient = class _ParallClient {
66076
66244
  async deleteClipConnection(orgId, connId) {
66077
66245
  return this.request("DELETE", ENDPOINTS.CLIP_CONNECTION(orgId, connId));
66078
66246
  }
66079
- // ---- MCP clip server config (cap:clip-mcp; publisher-org only) ----
66247
+ // ---- MCP clip server config (same-org or reviewed Official OAuth) ----
66080
66248
  /**
66081
- * Read the redacted MCP config. 404 NOT_FOUND when the clip has none yet;
66082
- * 403 MCP_CROSS_ORG_DISABLED for a cross-org installed clip (the whole
66083
- * mcp-config family is publisher-org property, reads included). `version`
66084
- * is the CAS token the mutations echo via If-Match.
66249
+ * Read the redacted MCP config. 404 NOT_FOUND when the clip has none yet
66250
+ * and also when a cross-org clip is not public + approved + installed, which
66251
+ * reads as nonexistent rather than refused (same existence-hiding as exec).
66252
+ * A cross-org clip that IS installed and approved reads fine regardless of
66253
+ * auth shape; what may then be configured is decided per credential owner.
66254
+ * `version` is the CAS token the mutations echo via If-Match.
66085
66255
  */
66086
66256
  async getClipMCPConfig(orgId, clipId) {
66087
66257
  return this.request("GET", ENDPOINTS.ORG_CLIP_MCP_CONFIG(orgId, clipId));
@@ -66114,6 +66284,30 @@ var ParallClient = class _ParallClient {
66114
66284
  async deleteClipMCPConfig(orgId, clipId, expectedVersion) {
66115
66285
  return this.request("DELETE", ENDPOINTS.ORG_CLIP_MCP_CONFIG(orgId, clipId), void 0, void 0, false, { headers: { "If-Match": `"${expectedVersion}"` } });
66116
66286
  }
66287
+ /**
66288
+ * List the org's MCP connections for a clip, default first — one row per
66289
+ * connection (credential slot), WITHOUT the tools snapshot (`tool_count`
66290
+ * summarizes it; the per-config GET carries the full snapshot). Same
66291
+ * family-wide fence as the singular GET: same-org clips, or a cross-org clip
66292
+ * that is public + approved + installed; anything else reads as
66293
+ * `404 NOT_FOUND`. An installed cross-org clip with no connection yet lists
66294
+ * as an empty array — including one whose approved auth mode cannot be
66295
+ * configured at all (auth=none), which the write path is what refuses. With
66296
+ * `cap:clip-mcp` off the route is not registered at all.
66297
+ */
66298
+ async listClipMCPConnections(orgId, clipId) {
66299
+ return this.request("GET", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId));
66300
+ }
66301
+ /** Start a new Official OAuth MCP connection with the platform-owned app.
66302
+ * Omitting oauth_client is load-bearing: the server resolves the exact
66303
+ * reviewed-version binding and never falls back to DCR/CIMD cross-org. */
66304
+ async createClipMCPOAuthConnection(orgId, clipId, serverUrl, alias) {
66305
+ return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId), {
66306
+ server_url: serverUrl,
66307
+ auth_type: "oauth",
66308
+ ...alias ? { alias } : {}
66309
+ });
66310
+ }
66117
66311
  /**
66118
66312
  * Re-run tools/list and replace the cached snapshot (org-admin only).
66119
66313
  * Deliberately does NOT advance the CAS version, so an in-flight edit in
@@ -66191,6 +66385,13 @@ function buildApiError(res, rawErrorBody) {
66191
66385
  // ts/agent-core/dist/gateway-lane-flow.js
66192
66386
  var TYPED_BACKOFF_CAP_MS = 5 * 6e4;
66193
66387
 
66388
+ // ts/agent-core/dist/telemetry.js
66389
+ import { AsyncLocalStorage } from "node:async_hooks";
66390
+ var sessionKeyStorage = new AsyncLocalStorage();
66391
+
66392
+ // ts/agent-core/dist/http-keepalive.js
66393
+ var import_undici = __toESM(require_undici(), 1);
66394
+
66194
66395
  // ts/agent-core/dist/logger.js
66195
66396
  function createLogger(prefix) {
66196
66397
  return {
@@ -66201,12 +66402,15 @@ function createLogger(prefix) {
66201
66402
  };
66202
66403
  }
66203
66404
 
66204
- // ts/agent-core/dist/telemetry.js
66205
- import { AsyncLocalStorage } from "node:async_hooks";
66206
- var sessionKeyStorage = new AsyncLocalStorage();
66207
-
66208
- // ts/agent-core/dist/http-keepalive.js
66209
- var import_undici = __toESM(require_undici(), 1);
66405
+ // ts/agent-core/dist/provider-config.js
66406
+ function clearAllProviderCreds(env) {
66407
+ delete env.ANTHROPIC_AUTH_TOKEN;
66408
+ delete env.ANTHROPIC_BASE_URL;
66409
+ delete env.ANTHROPIC_API_KEY;
66410
+ delete env.OPENAI_API_KEY;
66411
+ delete env.OPENAI_BASE_URL;
66412
+ delete env.PRLL_CLAUDE_ALLOW_API_KEY;
66413
+ }
66210
66414
 
66211
66415
  // ts/daemon/dist/clip-runtime/browser-profile-manager.js
66212
66416
  import { spawn as spawn2 } from "node:child_process";