@parall/daemon 1.54.0 → 1.55.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,9 +63695,22 @@ 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}`,
63707
+ PROJECT_MEMBERS: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/members`,
63708
+ PROJECT_READERS: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/readers`,
63709
+ PROJECT_LIBRARY: (orgId) => `${API_BASE}/orgs/${orgId}/projects/library`,
63710
+ PROJECT_JOIN: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/join`,
63711
+ PROJECT_JOIN_REQUESTS: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/join-requests`,
63712
+ // subject is a bare user ID or a bare team ID; both are path-segment safe.
63713
+ PROJECT_MEMBER: (orgId, projectId, subject) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/members/${subject}`,
63677
63714
  // Schedules (org-scoped, platform time trigger primitive)
63678
63715
  SCHEDULES: (orgId) => `${API_BASE}/orgs/${orgId}/schedules`,
63679
63716
  SCHEDULE: (orgId, id) => `${API_BASE}/orgs/${orgId}/schedules/${id}`,
@@ -63715,8 +63752,10 @@ var ENDPOINTS = {
63715
63752
  SLACK_HISTORY: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/history`,
63716
63753
  SLACK_MEMBERS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/members`,
63717
63754
  SLACK_STATUS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/status`,
63718
- // WeChat tier-B read verb (agent-only; internal research preview).
63755
+ // WeChat tier-B read verbs (agent-only; internal research preview).
63719
63756
  WECHAT_CONTACTS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/contacts`,
63757
+ WECHAT_PROFILE: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/profile`,
63758
+ WECHAT_STATUS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/status`,
63720
63759
  // Invitations (org-scoped, admin)
63721
63760
  ORG_INVITATIONS: (orgId) => `${API_BASE}/orgs/${orgId}/invitations`,
63722
63761
  ORG_INVITATION: (orgId, invId) => `${API_BASE}/orgs/${orgId}/invitations/${invId}`,
@@ -63830,8 +63869,10 @@ var ENDPOINTS = {
63830
63869
  NOTIFICATION_PREFERENCES: `${API_BASE}/notification-preferences`,
63831
63870
  // Unified search (messages + tasks + wiki, org-scoped)
63832
63871
  SEARCH: (orgId) => `${API_BASE}/orgs/${orgId}/search`,
63833
- // Feature flags (org-scoped, server-evaluated)
63834
- FEATURE_FLAGS: (orgId) => `${API_BASE}/orgs/${orgId}/feature-flags`,
63872
+ // Feature flags (server-evaluated). Org-scoped by default; omit the org for
63873
+ // the pre-org form, which resolves "cap:" capabilities only (PostHog flags
63874
+ // are org-scoped and absent there) for callers that have no org yet.
63875
+ FEATURE_FLAGS: (orgId) => orgId ? `${API_BASE}/orgs/${orgId}/feature-flags` : `${API_BASE}/feature-flags`,
63835
63876
  // Team templates (org-scoped, owner/admin only)
63836
63877
  TEMPLATES: (orgId) => `${API_BASE}/orgs/${orgId}/templates`,
63837
63878
  TEMPLATE: (orgId, templateId) => `${API_BASE}/orgs/${orgId}/templates/${templateId}`,
@@ -63887,6 +63928,9 @@ var ENDPOINTS = {
63887
63928
  ORG_EDGE_PROFILES: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
63888
63929
  // Per-profile egress proxy (hosted Cloud Profiles; manager-only, human-only).
63889
63930
  ORG_EDGE_PROFILE_PROXY: (orgId, edgeId, profileName) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles/${encodeURIComponent(profileName)}/proxy`,
63931
+ // Per-profile one-shot cookie seed (hosted Cloud Profiles; manager-only,
63932
+ // human-only, idle-only). Injected at the next cold start, then consumed.
63933
+ ORG_EDGE_PROFILE_COOKIES: (orgId, edgeId, profileName) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles/${encodeURIComponent(profileName)}/cookies`,
63890
63934
  ORG_EDGE_EXEC: (orgId) => `/api/v1/orgs/${orgId}/edge/exec`,
63891
63935
  // Cloud Edge live viewer command (V1b) — api-server, gated on cap:edge-viewer.
63892
63936
  // Same request/reply shape as the v2 browser-profile viewer, on the v3 edge
@@ -63901,10 +63945,11 @@ var ENDPOINTS = {
63901
63945
  ORG_CLIP_INSTALL: (orgId) => `/api/v1/orgs/${orgId}/clips/install`,
63902
63946
  ORG_CLIPS_INSTALLED: (orgId) => `/api/v1/orgs/${orgId}/clips/installed`,
63903
63947
  ORG_CLIP_UNINSTALL: (orgId, clipId) => `/api/v1/orgs/${orgId}/clips/${clipId}/uninstall`,
63948
+ ORG_CLIP_MCP_REMOVE: (orgId, clipId) => `/api/v1/orgs/${orgId}/clips/${clipId}/mcp-remove`,
63904
63949
  // Per-org agent exec access for one clip (default all agents; PUT human-only)
63905
63950
  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). The
63951
+ // MCP clip server config (cap:clip-mcp; cross-org is limited to installed,
63952
+ // reviewed Official OAuth Clips). The
63908
63953
  // singular family addresses the org's DEFAULT connection (pre-165
63909
63954
  // back-compat shim); the plural family is the multi-connection surface —
63910
63955
  // one config row (credential slot) per connection, addressed by config id.
@@ -63917,8 +63962,204 @@ var ENDPOINTS = {
63917
63962
  ORG_CLIP_MCP_OAUTH_DISCONNECT_BY_ID: (orgId, clipId, configId) => `/api/v1/orgs/${orgId}/clip-registry/${clipId}/mcp-configs/${configId}/oauth/disconnect`
63918
63963
  };
63919
63964
 
63965
+ // ts/sdk/dist/project-task-client.js
63966
+ var ProjectTaskClient = class {
63967
+ async createTask(orgId, data2) {
63968
+ return this.request("POST", ENDPOINTS.TASKS(orgId), data2);
63969
+ }
63970
+ async getTasks(orgId, params) {
63971
+ return this.request("GET", ENDPOINTS.TASKS(orgId), void 0, params);
63972
+ }
63973
+ async getTaskSubtaskSummary(orgId, params) {
63974
+ return this.request("GET", ENDPOINTS.TASK_SUBTASK_SUMMARY(orgId), void 0, params);
63975
+ }
63976
+ async getTask(orgId, taskId) {
63977
+ return this.request("GET", ENDPOINTS.TASK(orgId, taskId));
63978
+ }
63979
+ async updateTask(orgId, taskId, data2) {
63980
+ return this.request("PATCH", ENDPOINTS.TASK(orgId, taskId), data2);
63981
+ }
63982
+ async deleteTask(orgId, taskId, opts) {
63983
+ return this.request("DELETE", ENDPOINTS.TASK(orgId, taskId), void 0, opts?.force ? { force: "true" } : void 0);
63984
+ }
63985
+ async archiveTask(orgId, taskId) {
63986
+ return this.request("POST", ENDPOINTS.TASK_ARCHIVE(orgId, taskId));
63987
+ }
63988
+ async restoreTask(orgId, taskId) {
63989
+ return this.request("POST", ENDPOINTS.TASK_RESTORE(orgId, taskId));
63990
+ }
63991
+ async watchTask(orgId, taskId) {
63992
+ return this.request("POST", ENDPOINTS.TASK_WATCH(orgId, taskId));
63993
+ }
63994
+ async unwatchTask(orgId, taskId) {
63995
+ return this.request("DELETE", ENDPOINTS.TASK_WATCH(orgId, taskId));
63996
+ }
63997
+ async getTaskWatchers(orgId, taskId) {
63998
+ const res = await this.request("GET", ENDPOINTS.TASK_WATCHERS(orgId, taskId));
63999
+ return res.data;
64000
+ }
64001
+ async subscribeTaskMember(orgId, taskId, userId) {
64002
+ return this.request("PUT", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
64003
+ }
64004
+ async unsubscribeTaskMember(orgId, taskId, userId) {
64005
+ return this.request("DELETE", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
64006
+ }
64007
+ async watchThread(threadRootId) {
64008
+ return this.request("POST", ENDPOINTS.MESSAGE_WATCH(threadRootId));
64009
+ }
64010
+ async unwatchThread(threadRootId) {
64011
+ return this.request("DELETE", ENDPOINTS.MESSAGE_WATCH(threadRootId));
64012
+ }
64013
+ async getThreadWatchers(threadRootId) {
64014
+ const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHERS(threadRootId));
64015
+ return res.data;
64016
+ }
64017
+ async isWatchingThread(threadRootId) {
64018
+ const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHING(threadRootId));
64019
+ return res.watching;
64020
+ }
64021
+ async getSubtasks(orgId, taskId) {
64022
+ const res = await this.request("GET", ENDPOINTS.TASK_SUBTASKS(orgId, taskId));
64023
+ return res.data;
64024
+ }
64025
+ async createTaskRelation(orgId, taskId, data2) {
64026
+ return this.request("POST", ENDPOINTS.TASK_RELATIONS(orgId, taskId), data2);
64027
+ }
64028
+ async getTaskRelations(orgId, taskId) {
64029
+ const res = await this.request("GET", ENDPOINTS.TASK_RELATIONS(orgId, taskId));
64030
+ return res.data;
64031
+ }
64032
+ async listTaskRelationsByTarget(orgId, params) {
64033
+ const query = new URLSearchParams({
64034
+ target_type: params.target_type,
64035
+ target_id: params.target_id
64036
+ });
64037
+ const res = await this.request("GET", `${ENDPOINTS.TASK_RELATIONS_BY_TARGET(orgId)}?${query.toString()}`);
64038
+ return res.data;
64039
+ }
64040
+ async deleteTaskRelation(orgId, taskId, relationId) {
64041
+ return this.request("DELETE", ENDPOINTS.TASK_RELATION(orgId, taskId, relationId));
64042
+ }
64043
+ async getTaskComments(orgId, taskId, params) {
64044
+ return this.request("GET", ENDPOINTS.TASK_COMMENTS(orgId, taskId), void 0, params);
64045
+ }
64046
+ async getTaskComment(orgId, taskId, commentId) {
64047
+ return this.request("GET", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
64048
+ }
64049
+ async createTaskComment(orgId, taskId, data2) {
64050
+ return this.request("POST", ENDPOINTS.TASK_COMMENTS(orgId, taskId), data2);
64051
+ }
64052
+ async updateTaskComment(orgId, taskId, commentId, data2) {
64053
+ return this.request("PATCH", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId), data2);
64054
+ }
64055
+ async deleteTaskComment(orgId, taskId, commentId) {
64056
+ return this.request("DELETE", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
64057
+ }
64058
+ async getTaskActivities(orgId, taskId, params) {
64059
+ return this.request("GET", ENDPOINTS.TASK_ACTIVITIES(orgId, taskId), void 0, params);
64060
+ }
64061
+ async createProject(orgId, data2) {
64062
+ return this.request("POST", ENDPOINTS.PROJECTS(orgId), data2);
64063
+ }
64064
+ async getProjects(orgId) {
64065
+ const res = await this.request("GET", ENDPOINTS.PROJECTS(orgId));
64066
+ return res.data;
64067
+ }
64068
+ async getProjectTaskSummary(orgId) {
64069
+ return this.request("GET", ENDPOINTS.PROJECT_TASK_SUMMARY(orgId));
64070
+ }
64071
+ async getProject(orgId, projectId) {
64072
+ return this.request("GET", ENDPOINTS.PROJECT(orgId, projectId));
64073
+ }
64074
+ async updateProject(orgId, projectId, data2) {
64075
+ return this.request("PATCH", ENDPOINTS.PROJECT(orgId, projectId), data2);
64076
+ }
64077
+ async deleteProject(orgId, projectId) {
64078
+ return this.request("DELETE", ENDPOINTS.PROJECT(orgId, projectId));
64079
+ }
64080
+ /** Roster with display info; readable by anyone who can read the project. */
64081
+ async getProjectMembers(orgId, projectId) {
64082
+ const res = await this.request("GET", ENDPOINTS.PROJECT_MEMBERS(orgId, projectId));
64083
+ return res.data;
64084
+ }
64085
+ /**
64086
+ * User IDs who may read the project — the assignee-eligibility set. Every
64087
+ * tier answers the roster expansion (direct, team-reached, org
64088
+ * owners/admins); visibility only shapes admission, never reach.
64089
+ */
64090
+ async getProjectReaders(orgId, projectId) {
64091
+ const res = await this.request("GET", ENDPOINTS.PROJECT_READERS(orgId, projectId));
64092
+ return res.data;
64093
+ }
64094
+ /** The join library: every discoverable project (public + restricted, plus
64095
+ * private for org owners/admins) with the caller's admission state. */
64096
+ async getProjectLibrary(orgId) {
64097
+ const res = await this.request("GET", ENDPOINTS.PROJECT_LIBRARY(orgId));
64098
+ return res.data;
64099
+ }
64100
+ /** Public-tier self-admission: writes the caller's own member row.
64101
+ * Other tiers answer `404 PROJECT_NOT_FOUND`; a duplicate answers
64102
+ * `409 MEMBER_EXISTS`. */
64103
+ async joinProject(orgId, projectId) {
64104
+ return this.request("POST", ENDPOINTS.PROJECT_JOIN(orgId, projectId));
64105
+ }
64106
+ /** Restricted-tier admission petition. A pending duplicate answers
64107
+ * `409 REQUEST_EXISTS`; membership answers `409 MEMBER_EXISTS`. */
64108
+ async createProjectJoinRequest(orgId, projectId) {
64109
+ return this.request("POST", ENDPOINTS.PROJECT_JOIN_REQUESTS(orgId, projectId));
64110
+ }
64111
+ /** Pending petitions for one project — manager standing required. */
64112
+ async listProjectJoinRequests(orgId, projectId) {
64113
+ const res = await this.request("GET", ENDPOINTS.PROJECT_JOIN_REQUESTS(orgId, projectId));
64114
+ return res.data;
64115
+ }
64116
+ /** Withdraws the caller's own pending petition. */
64117
+ async cancelProjectJoinRequest(orgId, projectId) {
64118
+ return this.request("DELETE", ENDPOINTS.PROJECT_JOIN_REQUESTS(orgId, projectId));
64119
+ }
64120
+ /**
64121
+ * Adds one subject (user ID or team ID) to the roster. Manager-only,
64122
+ * create-only: an existing row answers `409 MEMBER_EXISTS` — change roles
64123
+ * through updateProjectMember instead.
64124
+ */
64125
+ async addProjectMember(orgId, projectId, req) {
64126
+ return this.request("POST", ENDPOINTS.PROJECT_MEMBERS(orgId, projectId), req);
64127
+ }
64128
+ /** Sets one roster entry's role. Demoting the last manager answers `400 LAST_MANAGER`. */
64129
+ async updateProjectMember(orgId, projectId, subject, req) {
64130
+ return this.request("PATCH", ENDPOINTS.PROJECT_MEMBER(orgId, projectId, subject), req);
64131
+ }
64132
+ /** Removes one roster entry. Removing the last manager answers `400 LAST_MANAGER`. */
64133
+ async removeProjectMember(orgId, projectId, subject) {
64134
+ return this.request("DELETE", ENDPOINTS.PROJECT_MEMBER(orgId, projectId, subject));
64135
+ }
64136
+ };
64137
+
64138
+ // ts/sdk/dist/task-label-client.js
64139
+ var TaskLabelClient = class extends ProjectTaskClient {
64140
+ async getLabels(orgId) {
64141
+ const response = await this.request("GET", ENDPOINTS.LABELS(orgId));
64142
+ return response.data;
64143
+ }
64144
+ async createLabel(orgId, data2) {
64145
+ return this.request("POST", ENDPOINTS.LABELS(orgId), data2);
64146
+ }
64147
+ async updateLabel(orgId, labelId, data2) {
64148
+ return this.request("PATCH", ENDPOINTS.LABEL(orgId, labelId), data2);
64149
+ }
64150
+ async deleteLabel(orgId, labelId) {
64151
+ return this.request("DELETE", ENDPOINTS.LABEL(orgId, labelId));
64152
+ }
64153
+ async addTaskLabels(orgId, taskId, data2) {
64154
+ return this.request("POST", ENDPOINTS.TASK_LABELS(orgId, taskId), data2);
64155
+ }
64156
+ async removeTaskLabel(orgId, taskId, labelId) {
64157
+ return this.request("DELETE", ENDPOINTS.TASK_LABEL(orgId, taskId, labelId));
64158
+ }
64159
+ };
64160
+
63920
64161
  // ts/sdk/dist/client.js
63921
- var ParallClient = class _ParallClient {
64162
+ var ParallClient = class _ParallClient extends TaskLabelClient {
63922
64163
  baseUrl;
63923
64164
  wikiBaseUrl;
63924
64165
  token;
@@ -63978,6 +64219,7 @@ var ParallClient = class _ParallClient {
63978
64219
  return headers;
63979
64220
  }
63980
64221
  constructor(options = {}) {
64222
+ super();
63981
64223
  this.baseUrl = options.baseUrl ?? "";
63982
64224
  this.wikiBaseUrl = options.wikiBaseUrl ?? this.baseUrl;
63983
64225
  this.token = options.token ?? null;
@@ -64275,6 +64517,45 @@ var ParallClient = class _ParallClient {
64275
64517
  const res = await this.request("GET", ENDPOINTS.TEAMS(orgId));
64276
64518
  return res.data;
64277
64519
  }
64520
+ async getTeam(orgId, teamId) {
64521
+ return this.request("GET", ENDPOINTS.TEAM(orgId, teamId));
64522
+ }
64523
+ /** Creating, renaming and deleting a team are org-admin actions. */
64524
+ async createTeam(orgId, req) {
64525
+ return this.request("POST", ENDPOINTS.TEAMS(orgId), req);
64526
+ }
64527
+ /**
64528
+ * Renames a team. Renaming is an ordinary edit: ACL rows reference teams by
64529
+ * ID. Names are org-unique (case-insensitive); a duplicate answers 409
64530
+ * NAME_TAKEN.
64531
+ */
64532
+ async updateTeam(orgId, teamId, req) {
64533
+ return this.request("PATCH", ENDPOINTS.TEAM(orgId, teamId), req);
64534
+ }
64535
+ async deleteTeam(orgId, teamId) {
64536
+ return this.request("DELETE", ENDPOINTS.TEAM(orgId, teamId));
64537
+ }
64538
+ /** Roster with display info; members who left the org are already excluded. */
64539
+ async getTeamMembers(orgId, teamId) {
64540
+ const res = await this.request("GET", ENDPOINTS.TEAM_MEMBERS(orgId, teamId));
64541
+ return res.data;
64542
+ }
64543
+ /**
64544
+ * Adds an org member (human or agent) to a team. Org admins and that team's
64545
+ * managers may add ordinary members; adding straight to `manager` is an
64546
+ * org-admin action.
64547
+ */
64548
+ async addTeamMember(orgId, teamId, req) {
64549
+ return this.request("POST", ENDPOINTS.TEAM_MEMBERS(orgId, teamId), req);
64550
+ }
64551
+ /** Appointing or demoting a manager is org-admin only. */
64552
+ async updateTeamMember(orgId, teamId, userId, req) {
64553
+ return this.request("PATCH", ENDPOINTS.TEAM_MEMBER(orgId, teamId, userId), req);
64554
+ }
64555
+ /** A team manager may remove ordinary members; removing a peer manager is org-admin only. */
64556
+ async removeTeamMember(orgId, teamId, userId) {
64557
+ return this.request("DELETE", ENDPOINTS.TEAM_MEMBER(orgId, teamId, userId));
64558
+ }
64278
64559
  async getOnlineMembers(orgId) {
64279
64560
  const res = await this.request("GET", ENDPOINTS.ORG_MEMBERS_ONLINE(orgId));
64280
64561
  return res.user_ids ?? [];
@@ -65078,117 +65359,6 @@ var ParallClient = class _ParallClient {
65078
65359
  }
65079
65360
  return res.json();
65080
65361
  }
65081
- // ---- Tasks (org-scoped) ----
65082
- async createTask(orgId, data2) {
65083
- return this.request("POST", ENDPOINTS.TASKS(orgId), data2);
65084
- }
65085
- async getTasks(orgId, params) {
65086
- return this.request("GET", ENDPOINTS.TASKS(orgId), void 0, params);
65087
- }
65088
- async getTask(orgId, taskId) {
65089
- return this.request("GET", ENDPOINTS.TASK(orgId, taskId));
65090
- }
65091
- async updateTask(orgId, taskId, data2) {
65092
- return this.request("PATCH", ENDPOINTS.TASK(orgId, taskId), data2);
65093
- }
65094
- async deleteTask(orgId, taskId, opts) {
65095
- return this.request("DELETE", ENDPOINTS.TASK(orgId, taskId), void 0, opts?.force ? { force: "true" } : void 0);
65096
- }
65097
- async archiveTask(orgId, taskId) {
65098
- return this.request("POST", ENDPOINTS.TASK_ARCHIVE(orgId, taskId));
65099
- }
65100
- async restoreTask(orgId, taskId) {
65101
- return this.request("POST", ENDPOINTS.TASK_RESTORE(orgId, taskId));
65102
- }
65103
- async watchTask(orgId, taskId) {
65104
- return this.request("POST", ENDPOINTS.TASK_WATCH(orgId, taskId));
65105
- }
65106
- async unwatchTask(orgId, taskId) {
65107
- return this.request("DELETE", ENDPOINTS.TASK_WATCH(orgId, taskId));
65108
- }
65109
- async getTaskWatchers(orgId, taskId) {
65110
- const res = await this.request("GET", ENDPOINTS.TASK_WATCHERS(orgId, taskId));
65111
- return res.data;
65112
- }
65113
- async subscribeTaskMember(orgId, taskId, userId) {
65114
- return this.request("PUT", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
65115
- }
65116
- async unsubscribeTaskMember(orgId, taskId, userId) {
65117
- return this.request("DELETE", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
65118
- }
65119
- async watchThread(threadRootId) {
65120
- return this.request("POST", ENDPOINTS.MESSAGE_WATCH(threadRootId));
65121
- }
65122
- async unwatchThread(threadRootId) {
65123
- return this.request("DELETE", ENDPOINTS.MESSAGE_WATCH(threadRootId));
65124
- }
65125
- async getThreadWatchers(threadRootId) {
65126
- const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHERS(threadRootId));
65127
- return res.data;
65128
- }
65129
- async isWatchingThread(threadRootId) {
65130
- const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHING(threadRootId));
65131
- return res.watching;
65132
- }
65133
- async getSubtasks(orgId, taskId) {
65134
- const res = await this.request("GET", ENDPOINTS.TASK_SUBTASKS(orgId, taskId));
65135
- return res.data;
65136
- }
65137
- async createTaskRelation(orgId, taskId, data2) {
65138
- return this.request("POST", ENDPOINTS.TASK_RELATIONS(orgId, taskId), data2);
65139
- }
65140
- async getTaskRelations(orgId, taskId) {
65141
- const res = await this.request("GET", ENDPOINTS.TASK_RELATIONS(orgId, taskId));
65142
- return res.data;
65143
- }
65144
- async listTaskRelationsByTarget(orgId, params) {
65145
- const query = new URLSearchParams({
65146
- target_type: params.target_type,
65147
- target_id: params.target_id
65148
- });
65149
- const res = await this.request("GET", `${ENDPOINTS.TASK_RELATIONS_BY_TARGET(orgId)}?${query.toString()}`);
65150
- return res.data;
65151
- }
65152
- async deleteTaskRelation(orgId, taskId, relationId) {
65153
- return this.request("DELETE", ENDPOINTS.TASK_RELATION(orgId, taskId, relationId));
65154
- }
65155
- // ---- Task Comments ----
65156
- async getTaskComments(orgId, taskId, params) {
65157
- return this.request("GET", ENDPOINTS.TASK_COMMENTS(orgId, taskId), void 0, params);
65158
- }
65159
- async getTaskComment(orgId, taskId, commentId) {
65160
- return this.request("GET", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
65161
- }
65162
- async createTaskComment(orgId, taskId, data2) {
65163
- return this.request("POST", ENDPOINTS.TASK_COMMENTS(orgId, taskId), data2);
65164
- }
65165
- async updateTaskComment(orgId, taskId, commentId, data2) {
65166
- return this.request("PATCH", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId), data2);
65167
- }
65168
- async deleteTaskComment(orgId, taskId, commentId) {
65169
- return this.request("DELETE", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
65170
- }
65171
- // ---- Task Activities ----
65172
- async getTaskActivities(orgId, taskId, params) {
65173
- return this.request("GET", ENDPOINTS.TASK_ACTIVITIES(orgId, taskId), void 0, params);
65174
- }
65175
- // ---- Projects (org-scoped) ----
65176
- async createProject(orgId, data2) {
65177
- return this.request("POST", ENDPOINTS.PROJECTS(orgId), data2);
65178
- }
65179
- async getProjects(orgId) {
65180
- const res = await this.request("GET", ENDPOINTS.PROJECTS(orgId));
65181
- return res.data;
65182
- }
65183
- async getProject(orgId, projectId) {
65184
- return this.request("GET", ENDPOINTS.PROJECT(orgId, projectId));
65185
- }
65186
- async updateProject(orgId, projectId, data2) {
65187
- return this.request("PATCH", ENDPOINTS.PROJECT(orgId, projectId), data2);
65188
- }
65189
- async deleteProject(orgId, projectId) {
65190
- return this.request("DELETE", ENDPOINTS.PROJECT(orgId, projectId));
65191
- }
65192
65362
  // ---- Schedules (org-scoped) ----
65193
65363
  async createSchedule(orgId, input) {
65194
65364
  return this.request("POST", ENDPOINTS.SCHEDULES(orgId), input);
@@ -65326,12 +65496,26 @@ var ParallClient = class _ParallClient {
65326
65496
  }
65327
65497
  /**
65328
65498
  * WeChat tier-B read verb (agent-only; internal research preview): the
65329
- * account's address book — friend wxids, saved group room ids, followed
65330
- * official accounts. Same live gate as the send verb.
65499
+ * account's address book — friends/chatrooms enriched with display names,
65500
+ * followed official accounts. Same live gate as the send verb.
65331
65501
  */
65332
65502
  async listWechatContacts(orgId) {
65333
65503
  return this.request("GET", ENDPOINTS.WECHAT_CONTACTS(orgId));
65334
65504
  }
65505
+ /**
65506
+ * WeChat tier-B read verb (agent-only): the connected account's identity
65507
+ * (wxid / alias / nickName / app id).
65508
+ */
65509
+ async wechatProfile(orgId) {
65510
+ return this.request("GET", ENDPOINTS.WECHAT_PROFILE(orgId));
65511
+ }
65512
+ /**
65513
+ * WeChat tier-B read verb (agent-only): live online probe + identity +
65514
+ * the platform's offline record.
65515
+ */
65516
+ async wechatStatus(orgId) {
65517
+ return this.request("GET", ENDPOINTS.WECHAT_STATUS(orgId));
65518
+ }
65335
65519
  async listChannelConversations(orgId, connectionId) {
65336
65520
  return this.request("GET", ENDPOINTS.CHANNEL_CONNECTION_CONVERSATIONS(orgId, connectionId));
65337
65521
  }
@@ -65667,6 +65851,7 @@ var ParallClient = class _ParallClient {
65667
65851
  return this.request("PATCH", ENDPOINTS.NOTIFICATION_PREFERENCES, { prefs });
65668
65852
  }
65669
65853
  // ---- Feature Flags (org-scoped, server-evaluated) ----
65854
+ /** Omit orgId to resolve deployment capabilities before joining an org. */
65670
65855
  async getFeatureFlags(orgId) {
65671
65856
  return this.request("GET", ENDPOINTS.FEATURE_FLAGS(orgId));
65672
65857
  }
@@ -65683,6 +65868,44 @@ var ParallClient = class _ParallClient {
65683
65868
  timeoutMs: 185e3
65684
65869
  });
65685
65870
  }
65871
+ /** Queue a template deployment and poll its durable deployment row. Each
65872
+ * request is short-lived; closing the client does not cancel server work. */
65873
+ async deployTemplateAsync(orgId, request, idempotencyKey) {
65874
+ const queue = () => this.request("POST", ENDPOINTS.TEMPLATE_DEPLOYMENTS(orgId), {
65875
+ ...request,
65876
+ async: true,
65877
+ idempotency_key: idempotencyKey
65878
+ });
65879
+ let result;
65880
+ for (let attempt = 0; attempt < 2 && result === void 0; attempt += 1) {
65881
+ try {
65882
+ result = await queue();
65883
+ } catch (error2) {
65884
+ if (!(error2 instanceof ApiError) || error2.status !== 0 && error2.status < 500)
65885
+ throw error2;
65886
+ }
65887
+ }
65888
+ if (result === void 0) {
65889
+ throw new ApiError(0, "Template deployment request outcome is unknown", "NETWORK_ERROR");
65890
+ }
65891
+ const deadline = Date.now() + 30 * 60 * 1e3;
65892
+ while (result.status === "queued" || result.status === "deploying") {
65893
+ if (Date.now() >= deadline) {
65894
+ throw new ApiError(0, "Template deployment is still running", "REQUEST_TIMEOUT");
65895
+ }
65896
+ await new Promise((resolve2) => setTimeout(resolve2, 2e3));
65897
+ try {
65898
+ result = await this.request("GET", ENDPOINTS.TEMPLATE_DEPLOYMENT(orgId, result.deployment_id));
65899
+ } catch (error2) {
65900
+ if (!(error2 instanceof ApiError) || error2.status !== 0 && error2.status < 500)
65901
+ throw error2;
65902
+ }
65903
+ }
65904
+ if (result.status !== "deployed") {
65905
+ throw new ApiError(500, result.error?.message ?? "Template deployment failed", result.error?.code);
65906
+ }
65907
+ return result;
65908
+ }
65686
65909
  async getTemplateDeployment(orgId, deploymentId) {
65687
65910
  return this.request("GET", ENDPOINTS.TEMPLATE_DEPLOYMENT(orgId, deploymentId));
65688
65911
  }
@@ -65897,6 +66120,11 @@ var ParallClient = class _ParallClient {
65897
66120
  async uninstallRegistryClip(orgId, clipId) {
65898
66121
  await this.request("DELETE", ENDPOINTS.ORG_CLIP_UNINSTALL(orgId, clipId));
65899
66122
  }
66123
+ /** Best-effort provider revoke followed by atomic local removal of an
66124
+ * installed Official MCP Clip and all org-owned connection state. */
66125
+ async removeOfficialMCPClip(orgId, clipId) {
66126
+ return this.request("DELETE", ENDPOINTS.ORG_CLIP_MCP_REMOVE(orgId, clipId));
66127
+ }
65900
66128
  /** List the org's installed registry clips (full entries). */
65901
66129
  async listInstalledRegistryClips(orgId) {
65902
66130
  const resp = await this.request("GET", ENDPOINTS.ORG_CLIPS_INSTALLED(orgId));
@@ -65928,15 +66156,18 @@ var ParallClient = class _ParallClient {
65928
66156
  /**
65929
66157
  * Read a clip's per-org agent exec access. Org-member readable (agents
65930
66158
  * included, so a denied agent can learn why exec answered
65931
- * `CLIP_AGENT_NOT_ALLOWED`).
66159
+ * `CLIP_AGENT_NOT_ALLOWED` / `CLIP_AGENT_CONNECTION_NOT_ALLOWED`).
65932
66160
  */
65933
66161
  async getClipAgentExecAccess(orgId, clipId) {
65934
66162
  return this.request("GET", ENDPOINTS.ORG_CLIP_EXEC_ACCESS(orgId, clipId));
65935
66163
  }
65936
66164
  /**
65937
66165
  * Replace a clip's per-org agent exec access. Human-only (agent principals
65938
- * get 403); under `all_agents` the `agent_ids` must be empty. Every granted
65939
- * id must be an active agent of this org (else `400 INVALID_INPUT`).
66166
+ * get 403); under `all_agents` both lists must be empty; pass either
66167
+ * `agent_ids` (legacy flat form every agent gets `connection_scope: 'all'`)
66168
+ * or `grants` (connection-scoped), never both. Every granted id must be an
66169
+ * active agent of this org, and every `connection_ids` entry a connection of
66170
+ * THIS clip in this org (else `400 INVALID_INPUT`).
65940
66171
  */
65941
66172
  async putClipAgentExecAccess(orgId, clipId, access) {
65942
66173
  return this.request("PUT", ENDPOINTS.ORG_CLIP_EXEC_ACCESS(orgId, clipId), access);
@@ -66022,6 +66253,41 @@ var ParallClient = class _ParallClient {
66022
66253
  headers: expectedVersion ? { "If-Match": `"proxy-${expectedVersion}"` } : void 0
66023
66254
  });
66024
66255
  }
66256
+ /**
66257
+ * Read a hosted Cloud Profile's one-shot cookie-seed status (manager-only:
66258
+ * hosted human maintainer or org admin). Sanitized — cookie VALUES never come
66259
+ * back, only `cookie_count` and the distinct target `domains`. `can_mutate` /
66260
+ * `lease_status` are the authoritative idle gate. Typed errors: `EDGE_NOT_HOSTED`
66261
+ * (BYOC device), `NOT_FOUND` (unknown profile).
66262
+ */
66263
+ async getEdgeProfileCookieSeed(orgId, edgeId, profileName) {
66264
+ return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILE_COOKIES(orgId, edgeId, profileName));
66265
+ }
66266
+ /**
66267
+ * Set/replace the profile's one-shot cookie seed (the full normalized cookie
66268
+ * array every time) — IDLE ONLY: while the profile's hosted browser is running
66269
+ * the server answers 409 `EDGE_PROFILE_IN_USE`; close the viewer, wait for idle
66270
+ * scale-to-zero, and retry. The next cold start injects the cookies into the
66271
+ * profile partition and consumes the seed. Other typed errors:
66272
+ * `EDGE_COOKIE_SEED_STALE` (409 — expectedVersion lost a tab race, sent as the
66273
+ * `cookieseed-<version>` If-Match), `EDGE_DELETING` (409), and
66274
+ * `SECRETBOX_UNCONFIGURED` (503 — server cannot store cookies safely).
66275
+ */
66276
+ async setEdgeProfileCookieSeed(orgId, edgeId, profileName, req, expectedVersion) {
66277
+ return this.request("PUT", ENDPOINTS.ORG_EDGE_PROFILE_COOKIES(orgId, edgeId, profileName), req, void 0, false, {
66278
+ headers: expectedVersion ? { "If-Match": `"cookieseed-${expectedVersion}"` } : void 0
66279
+ });
66280
+ }
66281
+ /**
66282
+ * Clear the pending cookie seed (does NOT sign the profile out — cookies
66283
+ * already injected into the partition stay). Idle-only like set — 409
66284
+ * `EDGE_PROFILE_IN_USE` while the browser is live.
66285
+ */
66286
+ async clearEdgeProfileCookieSeed(orgId, edgeId, profileName, expectedVersion) {
66287
+ return this.request("DELETE", ENDPOINTS.ORG_EDGE_PROFILE_COOKIES(orgId, edgeId, profileName), void 0, void 0, false, {
66288
+ headers: expectedVersion ? { "If-Match": `"cookieseed-${expectedVersion}"` } : void 0
66289
+ });
66290
+ }
66025
66291
  /**
66026
66292
  * Execute a registry clip command on an Edge device.
66027
66293
  *
@@ -66083,12 +66349,14 @@ var ParallClient = class _ParallClient {
66083
66349
  async deleteClipConnection(orgId, connId) {
66084
66350
  return this.request("DELETE", ENDPOINTS.CLIP_CONNECTION(orgId, connId));
66085
66351
  }
66086
- // ---- MCP clip server config (cap:clip-mcp; publisher-org only) ----
66352
+ // ---- MCP clip server config (same-org or reviewed Official OAuth) ----
66087
66353
  /**
66088
- * Read the redacted MCP config. 404 NOT_FOUND when the clip has none yet;
66089
- * 403 MCP_CROSS_ORG_DISABLED for a cross-org installed clip (the whole
66090
- * mcp-config family is publisher-org property, reads included). `version`
66091
- * is the CAS token the mutations echo via If-Match.
66354
+ * Read the redacted MCP config. 404 NOT_FOUND when the clip has none yet
66355
+ * and also when a cross-org clip is not public + approved + installed, which
66356
+ * reads as nonexistent rather than refused (same existence-hiding as exec).
66357
+ * A cross-org clip that IS installed and approved reads fine regardless of
66358
+ * auth shape; what may then be configured is decided per credential owner.
66359
+ * `version` is the CAS token the mutations echo via If-Match.
66092
66360
  */
66093
66361
  async getClipMCPConfig(orgId, clipId) {
66094
66362
  return this.request("GET", ENDPOINTS.ORG_CLIP_MCP_CONFIG(orgId, clipId));
@@ -66125,13 +66393,26 @@ var ParallClient = class _ParallClient {
66125
66393
  * List the org's MCP connections for a clip, default first — one row per
66126
66394
  * connection (credential slot), WITHOUT the tools snapshot (`tool_count`
66127
66395
  * summarizes it; the per-config GET carries the full snapshot). Same
66128
- * family-wide fence as the singular GET: publisher-org members only
66129
- * cross-org installs get `403 MCP_CROSS_ORG_DISABLED`, and with
66396
+ * family-wide fence as the singular GET: same-org clips, or a cross-org clip
66397
+ * that is public + approved + installed; anything else reads as
66398
+ * `404 NOT_FOUND`. An installed cross-org clip with no connection yet lists
66399
+ * as an empty array — including one whose approved auth mode cannot be
66400
+ * configured at all (auth=none), which the write path is what refuses. With
66130
66401
  * `cap:clip-mcp` off the route is not registered at all.
66131
66402
  */
66132
66403
  async listClipMCPConnections(orgId, clipId) {
66133
66404
  return this.request("GET", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId));
66134
66405
  }
66406
+ /** Start a new Official OAuth MCP connection with the platform-owned app.
66407
+ * Omitting oauth_client is load-bearing: the server resolves the exact
66408
+ * reviewed-version binding and never falls back to DCR/CIMD cross-org. */
66409
+ async createClipMCPOAuthConnection(orgId, clipId, serverUrl, alias) {
66410
+ return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId), {
66411
+ server_url: serverUrl,
66412
+ auth_type: "oauth",
66413
+ ...alias ? { alias } : {}
66414
+ });
66415
+ }
66135
66416
  /**
66136
66417
  * Re-run tools/list and replace the cached snapshot (org-admin only).
66137
66418
  * Deliberately does NOT advance the CAS version, so an in-flight edit in
@@ -66209,6 +66490,13 @@ function buildApiError(res, rawErrorBody) {
66209
66490
  // ts/agent-core/dist/gateway-lane-flow.js
66210
66491
  var TYPED_BACKOFF_CAP_MS = 5 * 6e4;
66211
66492
 
66493
+ // ts/agent-core/dist/telemetry.js
66494
+ import { AsyncLocalStorage } from "node:async_hooks";
66495
+ var sessionKeyStorage = new AsyncLocalStorage();
66496
+
66497
+ // ts/agent-core/dist/http-keepalive.js
66498
+ var import_undici = __toESM(require_undici(), 1);
66499
+
66212
66500
  // ts/agent-core/dist/logger.js
66213
66501
  function createLogger(prefix) {
66214
66502
  return {
@@ -66219,12 +66507,15 @@ function createLogger(prefix) {
66219
66507
  };
66220
66508
  }
66221
66509
 
66222
- // ts/agent-core/dist/telemetry.js
66223
- import { AsyncLocalStorage } from "node:async_hooks";
66224
- var sessionKeyStorage = new AsyncLocalStorage();
66225
-
66226
- // ts/agent-core/dist/http-keepalive.js
66227
- var import_undici = __toESM(require_undici(), 1);
66510
+ // ts/agent-core/dist/provider-config.js
66511
+ function clearAllProviderCreds(env) {
66512
+ delete env.ANTHROPIC_AUTH_TOKEN;
66513
+ delete env.ANTHROPIC_BASE_URL;
66514
+ delete env.ANTHROPIC_API_KEY;
66515
+ delete env.OPENAI_API_KEY;
66516
+ delete env.OPENAI_BASE_URL;
66517
+ delete env.PRLL_CLAUDE_ALLOW_API_KEY;
66518
+ }
66228
66519
 
66229
66520
  // ts/daemon/dist/clip-runtime/browser-profile-manager.js
66230
66521
  import { spawn as spawn2 } from "node:child_process";