@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.
- package/bundle/manifest.json +11 -11
- package/bundle/parall-browser-pod.js +434 -143
- package/bundle/parall-claude-agent.js +4326 -4310
- package/bundle/parall-codex-agent.js +4328 -4309
- package/bundle/parall-daemon.js +589 -233
- package/package.json +6 -6
package/bundle/parall-daemon.js
CHANGED
|
@@ -83,42 +83,74 @@ var init_daemon_update_mode = __esm({
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
// ts/agent-core/dist/
|
|
87
|
-
function
|
|
88
|
-
return
|
|
86
|
+
// ts/agent-core/dist/generated/platform-instructions.js
|
|
87
|
+
function renderTemplate(template, values) {
|
|
88
|
+
return template.replace(/\{\{([A-Z_]+)\}\}/g, (_match, token) => {
|
|
89
|
+
const value = values[token];
|
|
90
|
+
if (value === void 0)
|
|
91
|
+
throw new Error(`missing generated platform instruction token: ${token}`);
|
|
92
|
+
return value;
|
|
93
|
+
});
|
|
89
94
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
return "";
|
|
95
|
+
function renderPlatformBehavior(skillsAvailable) {
|
|
96
|
+
return renderTemplate(BEHAVIOR_TEMPLATE, {
|
|
97
|
+
SCHEDULES_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.SCHEDULES_SKILL_HINT : ".",
|
|
98
|
+
TASKS_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.TASKS_SKILL_HINT : ""
|
|
99
|
+
});
|
|
97
100
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
delete env.OPENAI_API_KEY;
|
|
103
|
-
delete env.OPENAI_BASE_URL;
|
|
104
|
-
delete env.PRLL_CLAUDE_ALLOW_API_KEY;
|
|
101
|
+
function renderPlatformReferenceGuide(skillsAvailable) {
|
|
102
|
+
return renderTemplate(REFERENCE_GUIDE_TEMPLATE, {
|
|
103
|
+
PLATFORM_SKILL_HINT: skillsAvailable ? BRIDGE_SKILL_HINTS.PLATFORM_SKILL_HINT : ""
|
|
104
|
+
});
|
|
105
105
|
}
|
|
106
|
-
var
|
|
107
|
-
|
|
106
|
+
var BEHAVIOR_TEMPLATE, REFERENCE_GUIDE_TEMPLATE, BRIDGE_SKILL_HINTS, PLATFORM_BEHAVIOR, PLATFORM_REFERENCE_GUIDE;
|
|
107
|
+
var init_platform_instructions = __esm({
|
|
108
|
+
"ts/agent-core/dist/generated/platform-instructions.js"() {
|
|
108
109
|
"use strict";
|
|
110
|
+
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.";
|
|
111
|
+
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.';
|
|
112
|
+
BRIDGE_SKILL_HINTS = {
|
|
113
|
+
SCHEDULES_SKILL_HINT: " (read the `parall-schedules` skill at .parall/skills/parall-schedules.md).",
|
|
114
|
+
TASKS_SKILL_HINT: "\nDetails: read the `parall-tasks` skill at .parall/skills/parall-tasks.md and follow it.",
|
|
115
|
+
PLATFORM_SKILL_HINT: "\nDetails: read the `parall-platform` skill at .parall/skills/parall-platform.md."
|
|
116
|
+
};
|
|
117
|
+
PLATFORM_BEHAVIOR = renderPlatformBehavior(true);
|
|
118
|
+
PLATFORM_REFERENCE_GUIDE = renderPlatformReferenceGuide(true);
|
|
109
119
|
}
|
|
110
120
|
});
|
|
111
121
|
|
|
112
|
-
// ts/agent-core/dist/
|
|
113
|
-
var
|
|
114
|
-
"ts/agent-core/dist/
|
|
122
|
+
// ts/agent-core/dist/bridge-workspace.js
|
|
123
|
+
var init_bridge_workspace = __esm({
|
|
124
|
+
"ts/agent-core/dist/bridge-workspace.js"() {
|
|
115
125
|
"use strict";
|
|
126
|
+
init_platform_instructions();
|
|
116
127
|
}
|
|
117
128
|
});
|
|
118
129
|
|
|
119
|
-
// ts/agent-core/dist/
|
|
120
|
-
var
|
|
121
|
-
"ts/agent-core/dist/
|
|
130
|
+
// ts/agent-core/dist/channel-capability.js
|
|
131
|
+
var init_channel_capability = __esm({
|
|
132
|
+
"ts/agent-core/dist/channel-capability.js"() {
|
|
133
|
+
"use strict";
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// ts/agent-core/dist/channel-token.js
|
|
138
|
+
var init_channel_token = __esm({
|
|
139
|
+
"ts/agent-core/dist/channel-token.js"() {
|
|
140
|
+
"use strict";
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// ts/agent-core/dist/dispatch-adapter.js
|
|
145
|
+
var init_dispatch_adapter = __esm({
|
|
146
|
+
"ts/agent-core/dist/dispatch-adapter.js"() {
|
|
147
|
+
"use strict";
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// ts/agent-core/dist/event-format.js
|
|
152
|
+
var init_event_format = __esm({
|
|
153
|
+
"ts/agent-core/dist/event-format.js"() {
|
|
122
154
|
"use strict";
|
|
123
155
|
}
|
|
124
156
|
});
|
|
@@ -174,6 +206,9 @@ var init_constants = __esm({
|
|
|
174
206
|
ORG_MEMBERS: (orgId) => `${API_BASE}/orgs/${orgId}/members`,
|
|
175
207
|
ORG_MEMBERS_FORMER: (orgId) => `${API_BASE}/orgs/${orgId}/members/former`,
|
|
176
208
|
TEAMS: (orgId) => `${API_BASE}/orgs/${orgId}/teams`,
|
|
209
|
+
TEAM: (orgId, teamId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}`,
|
|
210
|
+
TEAM_MEMBERS: (orgId, teamId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members`,
|
|
211
|
+
TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
177
212
|
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE}/orgs/${orgId}/members/online`,
|
|
178
213
|
ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
|
|
179
214
|
ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/chats`,
|
|
@@ -296,6 +331,7 @@ var init_constants = __esm({
|
|
|
296
331
|
MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE: (requestId) => `${API_BASE}/machines/me/browser-profiles/viewer-response/${requestId}`,
|
|
297
332
|
// Tasks (org-scoped)
|
|
298
333
|
TASKS: (orgId) => `${API_BASE}/orgs/${orgId}/tasks`,
|
|
334
|
+
TASK_SUBTASK_SUMMARY: (orgId) => `${API_BASE}/orgs/${orgId}/tasks/subtask-summary`,
|
|
299
335
|
TASK: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}`,
|
|
300
336
|
TASK_ARCHIVE: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/archive`,
|
|
301
337
|
TASK_RESTORE: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/restore`,
|
|
@@ -309,9 +345,22 @@ var init_constants = __esm({
|
|
|
309
345
|
TASK_COMMENTS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/comments`,
|
|
310
346
|
TASK_COMMENT: (orgId, taskId, commentId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/comments/${commentId}`,
|
|
311
347
|
TASK_ACTIVITIES: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/activities`,
|
|
348
|
+
TASK_LABELS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/labels`,
|
|
349
|
+
TASK_LABEL: (orgId, taskId, labelId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/labels/${labelId}`,
|
|
350
|
+
// Labels (org-scoped vocabulary; writes are admin-gated)
|
|
351
|
+
LABELS: (orgId) => `${API_BASE}/orgs/${orgId}/labels`,
|
|
352
|
+
LABEL: (orgId, labelId) => `${API_BASE}/orgs/${orgId}/labels/${labelId}`,
|
|
312
353
|
// Projects (org-scoped)
|
|
313
354
|
PROJECTS: (orgId) => `${API_BASE}/orgs/${orgId}/projects`,
|
|
355
|
+
PROJECT_TASK_SUMMARY: (orgId) => `${API_BASE}/orgs/${orgId}/projects/task-summary`,
|
|
314
356
|
PROJECT: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}`,
|
|
357
|
+
PROJECT_MEMBERS: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/members`,
|
|
358
|
+
PROJECT_READERS: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/readers`,
|
|
359
|
+
PROJECT_LIBRARY: (orgId) => `${API_BASE}/orgs/${orgId}/projects/library`,
|
|
360
|
+
PROJECT_JOIN: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/join`,
|
|
361
|
+
PROJECT_JOIN_REQUESTS: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/join-requests`,
|
|
362
|
+
// subject is a bare user ID or a bare team ID; both are path-segment safe.
|
|
363
|
+
PROJECT_MEMBER: (orgId, projectId, subject) => `${API_BASE}/orgs/${orgId}/projects/${projectId}/members/${subject}`,
|
|
315
364
|
// Schedules (org-scoped, platform time trigger primitive)
|
|
316
365
|
SCHEDULES: (orgId) => `${API_BASE}/orgs/${orgId}/schedules`,
|
|
317
366
|
SCHEDULE: (orgId, id) => `${API_BASE}/orgs/${orgId}/schedules/${id}`,
|
|
@@ -353,8 +402,10 @@ var init_constants = __esm({
|
|
|
353
402
|
SLACK_HISTORY: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/history`,
|
|
354
403
|
SLACK_MEMBERS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/members`,
|
|
355
404
|
SLACK_STATUS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/slack/status`,
|
|
356
|
-
// WeChat tier-B read
|
|
405
|
+
// WeChat tier-B read verbs (agent-only; internal research preview).
|
|
357
406
|
WECHAT_CONTACTS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/contacts`,
|
|
407
|
+
WECHAT_PROFILE: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/profile`,
|
|
408
|
+
WECHAT_STATUS: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me/wechat/status`,
|
|
358
409
|
// Invitations (org-scoped, admin)
|
|
359
410
|
ORG_INVITATIONS: (orgId) => `${API_BASE}/orgs/${orgId}/invitations`,
|
|
360
411
|
ORG_INVITATION: (orgId, invId) => `${API_BASE}/orgs/${orgId}/invitations/${invId}`,
|
|
@@ -468,8 +519,10 @@ var init_constants = __esm({
|
|
|
468
519
|
NOTIFICATION_PREFERENCES: `${API_BASE}/notification-preferences`,
|
|
469
520
|
// Unified search (messages + tasks + wiki, org-scoped)
|
|
470
521
|
SEARCH: (orgId) => `${API_BASE}/orgs/${orgId}/search`,
|
|
471
|
-
// Feature flags (
|
|
472
|
-
|
|
522
|
+
// Feature flags (server-evaluated). Org-scoped by default; omit the org for
|
|
523
|
+
// the pre-org form, which resolves "cap:" capabilities only (PostHog flags
|
|
524
|
+
// are org-scoped and absent there) for callers that have no org yet.
|
|
525
|
+
FEATURE_FLAGS: (orgId) => orgId ? `${API_BASE}/orgs/${orgId}/feature-flags` : `${API_BASE}/feature-flags`,
|
|
473
526
|
// Team templates (org-scoped, owner/admin only)
|
|
474
527
|
TEMPLATES: (orgId) => `${API_BASE}/orgs/${orgId}/templates`,
|
|
475
528
|
TEMPLATE: (orgId, templateId) => `${API_BASE}/orgs/${orgId}/templates/${templateId}`,
|
|
@@ -525,6 +578,9 @@ var init_constants = __esm({
|
|
|
525
578
|
ORG_EDGE_PROFILES: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
|
|
526
579
|
// Per-profile egress proxy (hosted Cloud Profiles; manager-only, human-only).
|
|
527
580
|
ORG_EDGE_PROFILE_PROXY: (orgId, edgeId, profileName) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles/${encodeURIComponent(profileName)}/proxy`,
|
|
581
|
+
// Per-profile one-shot cookie seed (hosted Cloud Profiles; manager-only,
|
|
582
|
+
// human-only, idle-only). Injected at the next cold start, then consumed.
|
|
583
|
+
ORG_EDGE_PROFILE_COOKIES: (orgId, edgeId, profileName) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles/${encodeURIComponent(profileName)}/cookies`,
|
|
528
584
|
ORG_EDGE_EXEC: (orgId) => `/api/v1/orgs/${orgId}/edge/exec`,
|
|
529
585
|
// Cloud Edge live viewer command (V1b) — api-server, gated on cap:edge-viewer.
|
|
530
586
|
// Same request/reply shape as the v2 browser-profile viewer, on the v3 edge
|
|
@@ -539,10 +595,11 @@ var init_constants = __esm({
|
|
|
539
595
|
ORG_CLIP_INSTALL: (orgId) => `/api/v1/orgs/${orgId}/clips/install`,
|
|
540
596
|
ORG_CLIPS_INSTALLED: (orgId) => `/api/v1/orgs/${orgId}/clips/installed`,
|
|
541
597
|
ORG_CLIP_UNINSTALL: (orgId, clipId) => `/api/v1/orgs/${orgId}/clips/${clipId}/uninstall`,
|
|
598
|
+
ORG_CLIP_MCP_REMOVE: (orgId, clipId) => `/api/v1/orgs/${orgId}/clips/${clipId}/mcp-remove`,
|
|
542
599
|
// Per-org agent exec access for one clip (default all agents; PUT human-only)
|
|
543
600
|
ORG_CLIP_EXEC_ACCESS: (orgId, clipId) => `/api/v1/orgs/${orgId}/clips/${clipId}/exec-access`,
|
|
544
|
-
// MCP clip server config (cap:clip-mcp;
|
|
545
|
-
//
|
|
601
|
+
// MCP clip server config (cap:clip-mcp; cross-org is limited to installed,
|
|
602
|
+
// reviewed Official OAuth Clips). The
|
|
546
603
|
// singular family addresses the org's DEFAULT connection (pre-165
|
|
547
604
|
// back-compat shim); the plural family is the multi-connection surface —
|
|
548
605
|
// one config row (credential slot) per connection, addressed by config id.
|
|
@@ -565,6 +622,7 @@ var init_constants = __esm({
|
|
|
565
622
|
PONG: "pong",
|
|
566
623
|
WATCHING: "watching",
|
|
567
624
|
MESSAGE_NEW: "message.new",
|
|
625
|
+
/** @deprecated `message.patch` is retired and never published; kept for compile compatibility. */
|
|
568
626
|
MESSAGE_PATCH: "message.patch",
|
|
569
627
|
MESSAGE_EDIT: "message.edit",
|
|
570
628
|
MESSAGE_DELETE: "message.delete",
|
|
@@ -586,6 +644,9 @@ var init_constants = __esm({
|
|
|
586
644
|
PROJECT_CREATED: "project.created",
|
|
587
645
|
PROJECT_UPDATED: "project.updated",
|
|
588
646
|
PROJECT_DELETED: "project.deleted",
|
|
647
|
+
LABEL_CREATED: "label.created",
|
|
648
|
+
LABEL_UPDATED: "label.updated",
|
|
649
|
+
LABEL_DELETED: "label.deleted",
|
|
589
650
|
AGENT_SESSION_NEW: "agent_session.new",
|
|
590
651
|
AGENT_SESSION_UPDATE: "agent_session.update",
|
|
591
652
|
AGENT_STEP_NEW: "agent_step.new",
|
|
@@ -596,6 +657,7 @@ var init_constants = __esm({
|
|
|
596
657
|
ORG_JOIN_REQUEST_NEW: "org.join_request.new",
|
|
597
658
|
ORG_INVITE_LINK_JOINED: "org.invite_link.joined",
|
|
598
659
|
ORG_MEMBER_REMOVED: "org.member.removed",
|
|
660
|
+
ORG_MEMBER_PROFILE_UPDATED: "org.member.profile.updated",
|
|
599
661
|
AGENT_CONFIG_UPDATE: "agent_config.update",
|
|
600
662
|
PRESENCE_UPDATE: "presence.update",
|
|
601
663
|
WIKI_CHANGESET_CREATED: "wiki.changeset.created",
|
|
@@ -643,6 +705,217 @@ var init_constants = __esm({
|
|
|
643
705
|
}
|
|
644
706
|
});
|
|
645
707
|
|
|
708
|
+
// ts/sdk/dist/project-task-client.js
|
|
709
|
+
var ProjectTaskClient;
|
|
710
|
+
var init_project_task_client = __esm({
|
|
711
|
+
"ts/sdk/dist/project-task-client.js"() {
|
|
712
|
+
"use strict";
|
|
713
|
+
init_constants();
|
|
714
|
+
ProjectTaskClient = class {
|
|
715
|
+
async createTask(orgId, data) {
|
|
716
|
+
return this.request("POST", ENDPOINTS.TASKS(orgId), data);
|
|
717
|
+
}
|
|
718
|
+
async getTasks(orgId, params) {
|
|
719
|
+
return this.request("GET", ENDPOINTS.TASKS(orgId), void 0, params);
|
|
720
|
+
}
|
|
721
|
+
async getTaskSubtaskSummary(orgId, params) {
|
|
722
|
+
return this.request("GET", ENDPOINTS.TASK_SUBTASK_SUMMARY(orgId), void 0, params);
|
|
723
|
+
}
|
|
724
|
+
async getTask(orgId, taskId) {
|
|
725
|
+
return this.request("GET", ENDPOINTS.TASK(orgId, taskId));
|
|
726
|
+
}
|
|
727
|
+
async updateTask(orgId, taskId, data) {
|
|
728
|
+
return this.request("PATCH", ENDPOINTS.TASK(orgId, taskId), data);
|
|
729
|
+
}
|
|
730
|
+
async deleteTask(orgId, taskId, opts) {
|
|
731
|
+
return this.request("DELETE", ENDPOINTS.TASK(orgId, taskId), void 0, opts?.force ? { force: "true" } : void 0);
|
|
732
|
+
}
|
|
733
|
+
async archiveTask(orgId, taskId) {
|
|
734
|
+
return this.request("POST", ENDPOINTS.TASK_ARCHIVE(orgId, taskId));
|
|
735
|
+
}
|
|
736
|
+
async restoreTask(orgId, taskId) {
|
|
737
|
+
return this.request("POST", ENDPOINTS.TASK_RESTORE(orgId, taskId));
|
|
738
|
+
}
|
|
739
|
+
async watchTask(orgId, taskId) {
|
|
740
|
+
return this.request("POST", ENDPOINTS.TASK_WATCH(orgId, taskId));
|
|
741
|
+
}
|
|
742
|
+
async unwatchTask(orgId, taskId) {
|
|
743
|
+
return this.request("DELETE", ENDPOINTS.TASK_WATCH(orgId, taskId));
|
|
744
|
+
}
|
|
745
|
+
async getTaskWatchers(orgId, taskId) {
|
|
746
|
+
const res = await this.request("GET", ENDPOINTS.TASK_WATCHERS(orgId, taskId));
|
|
747
|
+
return res.data;
|
|
748
|
+
}
|
|
749
|
+
async subscribeTaskMember(orgId, taskId, userId) {
|
|
750
|
+
return this.request("PUT", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
|
|
751
|
+
}
|
|
752
|
+
async unsubscribeTaskMember(orgId, taskId, userId) {
|
|
753
|
+
return this.request("DELETE", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
|
|
754
|
+
}
|
|
755
|
+
async watchThread(threadRootId) {
|
|
756
|
+
return this.request("POST", ENDPOINTS.MESSAGE_WATCH(threadRootId));
|
|
757
|
+
}
|
|
758
|
+
async unwatchThread(threadRootId) {
|
|
759
|
+
return this.request("DELETE", ENDPOINTS.MESSAGE_WATCH(threadRootId));
|
|
760
|
+
}
|
|
761
|
+
async getThreadWatchers(threadRootId) {
|
|
762
|
+
const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHERS(threadRootId));
|
|
763
|
+
return res.data;
|
|
764
|
+
}
|
|
765
|
+
async isWatchingThread(threadRootId) {
|
|
766
|
+
const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHING(threadRootId));
|
|
767
|
+
return res.watching;
|
|
768
|
+
}
|
|
769
|
+
async getSubtasks(orgId, taskId) {
|
|
770
|
+
const res = await this.request("GET", ENDPOINTS.TASK_SUBTASKS(orgId, taskId));
|
|
771
|
+
return res.data;
|
|
772
|
+
}
|
|
773
|
+
async createTaskRelation(orgId, taskId, data) {
|
|
774
|
+
return this.request("POST", ENDPOINTS.TASK_RELATIONS(orgId, taskId), data);
|
|
775
|
+
}
|
|
776
|
+
async getTaskRelations(orgId, taskId) {
|
|
777
|
+
const res = await this.request("GET", ENDPOINTS.TASK_RELATIONS(orgId, taskId));
|
|
778
|
+
return res.data;
|
|
779
|
+
}
|
|
780
|
+
async listTaskRelationsByTarget(orgId, params) {
|
|
781
|
+
const query = new URLSearchParams({
|
|
782
|
+
target_type: params.target_type,
|
|
783
|
+
target_id: params.target_id
|
|
784
|
+
});
|
|
785
|
+
const res = await this.request("GET", `${ENDPOINTS.TASK_RELATIONS_BY_TARGET(orgId)}?${query.toString()}`);
|
|
786
|
+
return res.data;
|
|
787
|
+
}
|
|
788
|
+
async deleteTaskRelation(orgId, taskId, relationId) {
|
|
789
|
+
return this.request("DELETE", ENDPOINTS.TASK_RELATION(orgId, taskId, relationId));
|
|
790
|
+
}
|
|
791
|
+
async getTaskComments(orgId, taskId, params) {
|
|
792
|
+
return this.request("GET", ENDPOINTS.TASK_COMMENTS(orgId, taskId), void 0, params);
|
|
793
|
+
}
|
|
794
|
+
async getTaskComment(orgId, taskId, commentId) {
|
|
795
|
+
return this.request("GET", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
|
|
796
|
+
}
|
|
797
|
+
async createTaskComment(orgId, taskId, data) {
|
|
798
|
+
return this.request("POST", ENDPOINTS.TASK_COMMENTS(orgId, taskId), data);
|
|
799
|
+
}
|
|
800
|
+
async updateTaskComment(orgId, taskId, commentId, data) {
|
|
801
|
+
return this.request("PATCH", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId), data);
|
|
802
|
+
}
|
|
803
|
+
async deleteTaskComment(orgId, taskId, commentId) {
|
|
804
|
+
return this.request("DELETE", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
|
|
805
|
+
}
|
|
806
|
+
async getTaskActivities(orgId, taskId, params) {
|
|
807
|
+
return this.request("GET", ENDPOINTS.TASK_ACTIVITIES(orgId, taskId), void 0, params);
|
|
808
|
+
}
|
|
809
|
+
async createProject(orgId, data) {
|
|
810
|
+
return this.request("POST", ENDPOINTS.PROJECTS(orgId), data);
|
|
811
|
+
}
|
|
812
|
+
async getProjects(orgId) {
|
|
813
|
+
const res = await this.request("GET", ENDPOINTS.PROJECTS(orgId));
|
|
814
|
+
return res.data;
|
|
815
|
+
}
|
|
816
|
+
async getProjectTaskSummary(orgId) {
|
|
817
|
+
return this.request("GET", ENDPOINTS.PROJECT_TASK_SUMMARY(orgId));
|
|
818
|
+
}
|
|
819
|
+
async getProject(orgId, projectId) {
|
|
820
|
+
return this.request("GET", ENDPOINTS.PROJECT(orgId, projectId));
|
|
821
|
+
}
|
|
822
|
+
async updateProject(orgId, projectId, data) {
|
|
823
|
+
return this.request("PATCH", ENDPOINTS.PROJECT(orgId, projectId), data);
|
|
824
|
+
}
|
|
825
|
+
async deleteProject(orgId, projectId) {
|
|
826
|
+
return this.request("DELETE", ENDPOINTS.PROJECT(orgId, projectId));
|
|
827
|
+
}
|
|
828
|
+
/** Roster with display info; readable by anyone who can read the project. */
|
|
829
|
+
async getProjectMembers(orgId, projectId) {
|
|
830
|
+
const res = await this.request("GET", ENDPOINTS.PROJECT_MEMBERS(orgId, projectId));
|
|
831
|
+
return res.data;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* User IDs who may read the project — the assignee-eligibility set. Every
|
|
835
|
+
* tier answers the roster expansion (direct, team-reached, org
|
|
836
|
+
* owners/admins); visibility only shapes admission, never reach.
|
|
837
|
+
*/
|
|
838
|
+
async getProjectReaders(orgId, projectId) {
|
|
839
|
+
const res = await this.request("GET", ENDPOINTS.PROJECT_READERS(orgId, projectId));
|
|
840
|
+
return res.data;
|
|
841
|
+
}
|
|
842
|
+
/** The join library: every discoverable project (public + restricted, plus
|
|
843
|
+
* private for org owners/admins) with the caller's admission state. */
|
|
844
|
+
async getProjectLibrary(orgId) {
|
|
845
|
+
const res = await this.request("GET", ENDPOINTS.PROJECT_LIBRARY(orgId));
|
|
846
|
+
return res.data;
|
|
847
|
+
}
|
|
848
|
+
/** Public-tier self-admission: writes the caller's own member row.
|
|
849
|
+
* Other tiers answer `404 PROJECT_NOT_FOUND`; a duplicate answers
|
|
850
|
+
* `409 MEMBER_EXISTS`. */
|
|
851
|
+
async joinProject(orgId, projectId) {
|
|
852
|
+
return this.request("POST", ENDPOINTS.PROJECT_JOIN(orgId, projectId));
|
|
853
|
+
}
|
|
854
|
+
/** Restricted-tier admission petition. A pending duplicate answers
|
|
855
|
+
* `409 REQUEST_EXISTS`; membership answers `409 MEMBER_EXISTS`. */
|
|
856
|
+
async createProjectJoinRequest(orgId, projectId) {
|
|
857
|
+
return this.request("POST", ENDPOINTS.PROJECT_JOIN_REQUESTS(orgId, projectId));
|
|
858
|
+
}
|
|
859
|
+
/** Pending petitions for one project — manager standing required. */
|
|
860
|
+
async listProjectJoinRequests(orgId, projectId) {
|
|
861
|
+
const res = await this.request("GET", ENDPOINTS.PROJECT_JOIN_REQUESTS(orgId, projectId));
|
|
862
|
+
return res.data;
|
|
863
|
+
}
|
|
864
|
+
/** Withdraws the caller's own pending petition. */
|
|
865
|
+
async cancelProjectJoinRequest(orgId, projectId) {
|
|
866
|
+
return this.request("DELETE", ENDPOINTS.PROJECT_JOIN_REQUESTS(orgId, projectId));
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Adds one subject (user ID or team ID) to the roster. Manager-only,
|
|
870
|
+
* create-only: an existing row answers `409 MEMBER_EXISTS` — change roles
|
|
871
|
+
* through updateProjectMember instead.
|
|
872
|
+
*/
|
|
873
|
+
async addProjectMember(orgId, projectId, req) {
|
|
874
|
+
return this.request("POST", ENDPOINTS.PROJECT_MEMBERS(orgId, projectId), req);
|
|
875
|
+
}
|
|
876
|
+
/** Sets one roster entry's role. Demoting the last manager answers `400 LAST_MANAGER`. */
|
|
877
|
+
async updateProjectMember(orgId, projectId, subject, req) {
|
|
878
|
+
return this.request("PATCH", ENDPOINTS.PROJECT_MEMBER(orgId, projectId, subject), req);
|
|
879
|
+
}
|
|
880
|
+
/** Removes one roster entry. Removing the last manager answers `400 LAST_MANAGER`. */
|
|
881
|
+
async removeProjectMember(orgId, projectId, subject) {
|
|
882
|
+
return this.request("DELETE", ENDPOINTS.PROJECT_MEMBER(orgId, projectId, subject));
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
|
|
888
|
+
// ts/sdk/dist/task-label-client.js
|
|
889
|
+
var TaskLabelClient;
|
|
890
|
+
var init_task_label_client = __esm({
|
|
891
|
+
"ts/sdk/dist/task-label-client.js"() {
|
|
892
|
+
"use strict";
|
|
893
|
+
init_constants();
|
|
894
|
+
init_project_task_client();
|
|
895
|
+
TaskLabelClient = class extends ProjectTaskClient {
|
|
896
|
+
async getLabels(orgId) {
|
|
897
|
+
const response = await this.request("GET", ENDPOINTS.LABELS(orgId));
|
|
898
|
+
return response.data;
|
|
899
|
+
}
|
|
900
|
+
async createLabel(orgId, data) {
|
|
901
|
+
return this.request("POST", ENDPOINTS.LABELS(orgId), data);
|
|
902
|
+
}
|
|
903
|
+
async updateLabel(orgId, labelId, data) {
|
|
904
|
+
return this.request("PATCH", ENDPOINTS.LABEL(orgId, labelId), data);
|
|
905
|
+
}
|
|
906
|
+
async deleteLabel(orgId, labelId) {
|
|
907
|
+
return this.request("DELETE", ENDPOINTS.LABEL(orgId, labelId));
|
|
908
|
+
}
|
|
909
|
+
async addTaskLabels(orgId, taskId, data) {
|
|
910
|
+
return this.request("POST", ENDPOINTS.TASK_LABELS(orgId, taskId), data);
|
|
911
|
+
}
|
|
912
|
+
async removeTaskLabel(orgId, taskId, labelId) {
|
|
913
|
+
return this.request("DELETE", ENDPOINTS.TASK_LABEL(orgId, taskId, labelId));
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
|
|
646
919
|
// ts/sdk/dist/client.js
|
|
647
920
|
function normalizeWikiChangeset(changeset) {
|
|
648
921
|
return {
|
|
@@ -687,7 +960,8 @@ var init_client = __esm({
|
|
|
687
960
|
"use strict";
|
|
688
961
|
init_browser_viewer();
|
|
689
962
|
init_constants();
|
|
690
|
-
|
|
963
|
+
init_task_label_client();
|
|
964
|
+
ParallClient = class _ParallClient extends TaskLabelClient {
|
|
691
965
|
baseUrl;
|
|
692
966
|
wikiBaseUrl;
|
|
693
967
|
token;
|
|
@@ -747,6 +1021,7 @@ var init_client = __esm({
|
|
|
747
1021
|
return headers;
|
|
748
1022
|
}
|
|
749
1023
|
constructor(options = {}) {
|
|
1024
|
+
super();
|
|
750
1025
|
this.baseUrl = options.baseUrl ?? "";
|
|
751
1026
|
this.wikiBaseUrl = options.wikiBaseUrl ?? this.baseUrl;
|
|
752
1027
|
this.token = options.token ?? null;
|
|
@@ -1044,6 +1319,45 @@ var init_client = __esm({
|
|
|
1044
1319
|
const res = await this.request("GET", ENDPOINTS.TEAMS(orgId));
|
|
1045
1320
|
return res.data;
|
|
1046
1321
|
}
|
|
1322
|
+
async getTeam(orgId, teamId) {
|
|
1323
|
+
return this.request("GET", ENDPOINTS.TEAM(orgId, teamId));
|
|
1324
|
+
}
|
|
1325
|
+
/** Creating, renaming and deleting a team are org-admin actions. */
|
|
1326
|
+
async createTeam(orgId, req) {
|
|
1327
|
+
return this.request("POST", ENDPOINTS.TEAMS(orgId), req);
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* Renames a team. Renaming is an ordinary edit: ACL rows reference teams by
|
|
1331
|
+
* ID. Names are org-unique (case-insensitive); a duplicate answers 409
|
|
1332
|
+
* NAME_TAKEN.
|
|
1333
|
+
*/
|
|
1334
|
+
async updateTeam(orgId, teamId, req) {
|
|
1335
|
+
return this.request("PATCH", ENDPOINTS.TEAM(orgId, teamId), req);
|
|
1336
|
+
}
|
|
1337
|
+
async deleteTeam(orgId, teamId) {
|
|
1338
|
+
return this.request("DELETE", ENDPOINTS.TEAM(orgId, teamId));
|
|
1339
|
+
}
|
|
1340
|
+
/** Roster with display info; members who left the org are already excluded. */
|
|
1341
|
+
async getTeamMembers(orgId, teamId) {
|
|
1342
|
+
const res = await this.request("GET", ENDPOINTS.TEAM_MEMBERS(orgId, teamId));
|
|
1343
|
+
return res.data;
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Adds an org member (human or agent) to a team. Org admins and that team's
|
|
1347
|
+
* managers may add ordinary members; adding straight to `manager` is an
|
|
1348
|
+
* org-admin action.
|
|
1349
|
+
*/
|
|
1350
|
+
async addTeamMember(orgId, teamId, req) {
|
|
1351
|
+
return this.request("POST", ENDPOINTS.TEAM_MEMBERS(orgId, teamId), req);
|
|
1352
|
+
}
|
|
1353
|
+
/** Appointing or demoting a manager is org-admin only. */
|
|
1354
|
+
async updateTeamMember(orgId, teamId, userId, req) {
|
|
1355
|
+
return this.request("PATCH", ENDPOINTS.TEAM_MEMBER(orgId, teamId, userId), req);
|
|
1356
|
+
}
|
|
1357
|
+
/** A team manager may remove ordinary members; removing a peer manager is org-admin only. */
|
|
1358
|
+
async removeTeamMember(orgId, teamId, userId) {
|
|
1359
|
+
return this.request("DELETE", ENDPOINTS.TEAM_MEMBER(orgId, teamId, userId));
|
|
1360
|
+
}
|
|
1047
1361
|
async getOnlineMembers(orgId) {
|
|
1048
1362
|
const res = await this.request("GET", ENDPOINTS.ORG_MEMBERS_ONLINE(orgId));
|
|
1049
1363
|
return res.user_ids ?? [];
|
|
@@ -1847,117 +2161,6 @@ var init_client = __esm({
|
|
|
1847
2161
|
}
|
|
1848
2162
|
return res.json();
|
|
1849
2163
|
}
|
|
1850
|
-
// ---- Tasks (org-scoped) ----
|
|
1851
|
-
async createTask(orgId, data) {
|
|
1852
|
-
return this.request("POST", ENDPOINTS.TASKS(orgId), data);
|
|
1853
|
-
}
|
|
1854
|
-
async getTasks(orgId, params) {
|
|
1855
|
-
return this.request("GET", ENDPOINTS.TASKS(orgId), void 0, params);
|
|
1856
|
-
}
|
|
1857
|
-
async getTask(orgId, taskId) {
|
|
1858
|
-
return this.request("GET", ENDPOINTS.TASK(orgId, taskId));
|
|
1859
|
-
}
|
|
1860
|
-
async updateTask(orgId, taskId, data) {
|
|
1861
|
-
return this.request("PATCH", ENDPOINTS.TASK(orgId, taskId), data);
|
|
1862
|
-
}
|
|
1863
|
-
async deleteTask(orgId, taskId, opts) {
|
|
1864
|
-
return this.request("DELETE", ENDPOINTS.TASK(orgId, taskId), void 0, opts?.force ? { force: "true" } : void 0);
|
|
1865
|
-
}
|
|
1866
|
-
async archiveTask(orgId, taskId) {
|
|
1867
|
-
return this.request("POST", ENDPOINTS.TASK_ARCHIVE(orgId, taskId));
|
|
1868
|
-
}
|
|
1869
|
-
async restoreTask(orgId, taskId) {
|
|
1870
|
-
return this.request("POST", ENDPOINTS.TASK_RESTORE(orgId, taskId));
|
|
1871
|
-
}
|
|
1872
|
-
async watchTask(orgId, taskId) {
|
|
1873
|
-
return this.request("POST", ENDPOINTS.TASK_WATCH(orgId, taskId));
|
|
1874
|
-
}
|
|
1875
|
-
async unwatchTask(orgId, taskId) {
|
|
1876
|
-
return this.request("DELETE", ENDPOINTS.TASK_WATCH(orgId, taskId));
|
|
1877
|
-
}
|
|
1878
|
-
async getTaskWatchers(orgId, taskId) {
|
|
1879
|
-
const res = await this.request("GET", ENDPOINTS.TASK_WATCHERS(orgId, taskId));
|
|
1880
|
-
return res.data;
|
|
1881
|
-
}
|
|
1882
|
-
async subscribeTaskMember(orgId, taskId, userId) {
|
|
1883
|
-
return this.request("PUT", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
|
|
1884
|
-
}
|
|
1885
|
-
async unsubscribeTaskMember(orgId, taskId, userId) {
|
|
1886
|
-
return this.request("DELETE", ENDPOINTS.TASK_SUBSCRIBER(orgId, taskId, userId));
|
|
1887
|
-
}
|
|
1888
|
-
async watchThread(threadRootId) {
|
|
1889
|
-
return this.request("POST", ENDPOINTS.MESSAGE_WATCH(threadRootId));
|
|
1890
|
-
}
|
|
1891
|
-
async unwatchThread(threadRootId) {
|
|
1892
|
-
return this.request("DELETE", ENDPOINTS.MESSAGE_WATCH(threadRootId));
|
|
1893
|
-
}
|
|
1894
|
-
async getThreadWatchers(threadRootId) {
|
|
1895
|
-
const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHERS(threadRootId));
|
|
1896
|
-
return res.data;
|
|
1897
|
-
}
|
|
1898
|
-
async isWatchingThread(threadRootId) {
|
|
1899
|
-
const res = await this.request("GET", ENDPOINTS.MESSAGE_WATCHING(threadRootId));
|
|
1900
|
-
return res.watching;
|
|
1901
|
-
}
|
|
1902
|
-
async getSubtasks(orgId, taskId) {
|
|
1903
|
-
const res = await this.request("GET", ENDPOINTS.TASK_SUBTASKS(orgId, taskId));
|
|
1904
|
-
return res.data;
|
|
1905
|
-
}
|
|
1906
|
-
async createTaskRelation(orgId, taskId, data) {
|
|
1907
|
-
return this.request("POST", ENDPOINTS.TASK_RELATIONS(orgId, taskId), data);
|
|
1908
|
-
}
|
|
1909
|
-
async getTaskRelations(orgId, taskId) {
|
|
1910
|
-
const res = await this.request("GET", ENDPOINTS.TASK_RELATIONS(orgId, taskId));
|
|
1911
|
-
return res.data;
|
|
1912
|
-
}
|
|
1913
|
-
async listTaskRelationsByTarget(orgId, params) {
|
|
1914
|
-
const query = new URLSearchParams({
|
|
1915
|
-
target_type: params.target_type,
|
|
1916
|
-
target_id: params.target_id
|
|
1917
|
-
});
|
|
1918
|
-
const res = await this.request("GET", `${ENDPOINTS.TASK_RELATIONS_BY_TARGET(orgId)}?${query.toString()}`);
|
|
1919
|
-
return res.data;
|
|
1920
|
-
}
|
|
1921
|
-
async deleteTaskRelation(orgId, taskId, relationId) {
|
|
1922
|
-
return this.request("DELETE", ENDPOINTS.TASK_RELATION(orgId, taskId, relationId));
|
|
1923
|
-
}
|
|
1924
|
-
// ---- Task Comments ----
|
|
1925
|
-
async getTaskComments(orgId, taskId, params) {
|
|
1926
|
-
return this.request("GET", ENDPOINTS.TASK_COMMENTS(orgId, taskId), void 0, params);
|
|
1927
|
-
}
|
|
1928
|
-
async getTaskComment(orgId, taskId, commentId) {
|
|
1929
|
-
return this.request("GET", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
|
|
1930
|
-
}
|
|
1931
|
-
async createTaskComment(orgId, taskId, data) {
|
|
1932
|
-
return this.request("POST", ENDPOINTS.TASK_COMMENTS(orgId, taskId), data);
|
|
1933
|
-
}
|
|
1934
|
-
async updateTaskComment(orgId, taskId, commentId, data) {
|
|
1935
|
-
return this.request("PATCH", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId), data);
|
|
1936
|
-
}
|
|
1937
|
-
async deleteTaskComment(orgId, taskId, commentId) {
|
|
1938
|
-
return this.request("DELETE", ENDPOINTS.TASK_COMMENT(orgId, taskId, commentId));
|
|
1939
|
-
}
|
|
1940
|
-
// ---- Task Activities ----
|
|
1941
|
-
async getTaskActivities(orgId, taskId, params) {
|
|
1942
|
-
return this.request("GET", ENDPOINTS.TASK_ACTIVITIES(orgId, taskId), void 0, params);
|
|
1943
|
-
}
|
|
1944
|
-
// ---- Projects (org-scoped) ----
|
|
1945
|
-
async createProject(orgId, data) {
|
|
1946
|
-
return this.request("POST", ENDPOINTS.PROJECTS(orgId), data);
|
|
1947
|
-
}
|
|
1948
|
-
async getProjects(orgId) {
|
|
1949
|
-
const res = await this.request("GET", ENDPOINTS.PROJECTS(orgId));
|
|
1950
|
-
return res.data;
|
|
1951
|
-
}
|
|
1952
|
-
async getProject(orgId, projectId) {
|
|
1953
|
-
return this.request("GET", ENDPOINTS.PROJECT(orgId, projectId));
|
|
1954
|
-
}
|
|
1955
|
-
async updateProject(orgId, projectId, data) {
|
|
1956
|
-
return this.request("PATCH", ENDPOINTS.PROJECT(orgId, projectId), data);
|
|
1957
|
-
}
|
|
1958
|
-
async deleteProject(orgId, projectId) {
|
|
1959
|
-
return this.request("DELETE", ENDPOINTS.PROJECT(orgId, projectId));
|
|
1960
|
-
}
|
|
1961
2164
|
// ---- Schedules (org-scoped) ----
|
|
1962
2165
|
async createSchedule(orgId, input) {
|
|
1963
2166
|
return this.request("POST", ENDPOINTS.SCHEDULES(orgId), input);
|
|
@@ -2095,12 +2298,26 @@ var init_client = __esm({
|
|
|
2095
2298
|
}
|
|
2096
2299
|
/**
|
|
2097
2300
|
* WeChat tier-B read verb (agent-only; internal research preview): the
|
|
2098
|
-
* account's address book —
|
|
2099
|
-
* official accounts. Same live gate as the send verb.
|
|
2301
|
+
* account's address book — friends/chatrooms enriched with display names,
|
|
2302
|
+
* followed official accounts. Same live gate as the send verb.
|
|
2100
2303
|
*/
|
|
2101
2304
|
async listWechatContacts(orgId) {
|
|
2102
2305
|
return this.request("GET", ENDPOINTS.WECHAT_CONTACTS(orgId));
|
|
2103
2306
|
}
|
|
2307
|
+
/**
|
|
2308
|
+
* WeChat tier-B read verb (agent-only): the connected account's identity
|
|
2309
|
+
* (wxid / alias / nickName / app id).
|
|
2310
|
+
*/
|
|
2311
|
+
async wechatProfile(orgId) {
|
|
2312
|
+
return this.request("GET", ENDPOINTS.WECHAT_PROFILE(orgId));
|
|
2313
|
+
}
|
|
2314
|
+
/**
|
|
2315
|
+
* WeChat tier-B read verb (agent-only): live online probe + identity +
|
|
2316
|
+
* the platform's offline record.
|
|
2317
|
+
*/
|
|
2318
|
+
async wechatStatus(orgId) {
|
|
2319
|
+
return this.request("GET", ENDPOINTS.WECHAT_STATUS(orgId));
|
|
2320
|
+
}
|
|
2104
2321
|
async listChannelConversations(orgId, connectionId) {
|
|
2105
2322
|
return this.request("GET", ENDPOINTS.CHANNEL_CONNECTION_CONVERSATIONS(orgId, connectionId));
|
|
2106
2323
|
}
|
|
@@ -2436,6 +2653,7 @@ var init_client = __esm({
|
|
|
2436
2653
|
return this.request("PATCH", ENDPOINTS.NOTIFICATION_PREFERENCES, { prefs });
|
|
2437
2654
|
}
|
|
2438
2655
|
// ---- Feature Flags (org-scoped, server-evaluated) ----
|
|
2656
|
+
/** Omit orgId to resolve deployment capabilities before joining an org. */
|
|
2439
2657
|
async getFeatureFlags(orgId) {
|
|
2440
2658
|
return this.request("GET", ENDPOINTS.FEATURE_FLAGS(orgId));
|
|
2441
2659
|
}
|
|
@@ -2452,6 +2670,44 @@ var init_client = __esm({
|
|
|
2452
2670
|
timeoutMs: 185e3
|
|
2453
2671
|
});
|
|
2454
2672
|
}
|
|
2673
|
+
/** Queue a template deployment and poll its durable deployment row. Each
|
|
2674
|
+
* request is short-lived; closing the client does not cancel server work. */
|
|
2675
|
+
async deployTemplateAsync(orgId, request3, idempotencyKey) {
|
|
2676
|
+
const queue = () => this.request("POST", ENDPOINTS.TEMPLATE_DEPLOYMENTS(orgId), {
|
|
2677
|
+
...request3,
|
|
2678
|
+
async: true,
|
|
2679
|
+
idempotency_key: idempotencyKey
|
|
2680
|
+
});
|
|
2681
|
+
let result;
|
|
2682
|
+
for (let attempt = 0; attempt < 2 && result === void 0; attempt += 1) {
|
|
2683
|
+
try {
|
|
2684
|
+
result = await queue();
|
|
2685
|
+
} catch (error) {
|
|
2686
|
+
if (!(error instanceof ApiError) || error.status !== 0 && error.status < 500)
|
|
2687
|
+
throw error;
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
if (result === void 0) {
|
|
2691
|
+
throw new ApiError(0, "Template deployment request outcome is unknown", "NETWORK_ERROR");
|
|
2692
|
+
}
|
|
2693
|
+
const deadline = Date.now() + 30 * 60 * 1e3;
|
|
2694
|
+
while (result.status === "queued" || result.status === "deploying") {
|
|
2695
|
+
if (Date.now() >= deadline) {
|
|
2696
|
+
throw new ApiError(0, "Template deployment is still running", "REQUEST_TIMEOUT");
|
|
2697
|
+
}
|
|
2698
|
+
await new Promise((resolve9) => setTimeout(resolve9, 2e3));
|
|
2699
|
+
try {
|
|
2700
|
+
result = await this.request("GET", ENDPOINTS.TEMPLATE_DEPLOYMENT(orgId, result.deployment_id));
|
|
2701
|
+
} catch (error) {
|
|
2702
|
+
if (!(error instanceof ApiError) || error.status !== 0 && error.status < 500)
|
|
2703
|
+
throw error;
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
if (result.status !== "deployed") {
|
|
2707
|
+
throw new ApiError(500, result.error?.message ?? "Template deployment failed", result.error?.code);
|
|
2708
|
+
}
|
|
2709
|
+
return result;
|
|
2710
|
+
}
|
|
2455
2711
|
async getTemplateDeployment(orgId, deploymentId) {
|
|
2456
2712
|
return this.request("GET", ENDPOINTS.TEMPLATE_DEPLOYMENT(orgId, deploymentId));
|
|
2457
2713
|
}
|
|
@@ -2666,6 +2922,11 @@ var init_client = __esm({
|
|
|
2666
2922
|
async uninstallRegistryClip(orgId, clipId) {
|
|
2667
2923
|
await this.request("DELETE", ENDPOINTS.ORG_CLIP_UNINSTALL(orgId, clipId));
|
|
2668
2924
|
}
|
|
2925
|
+
/** Best-effort provider revoke followed by atomic local removal of an
|
|
2926
|
+
* installed Official MCP Clip and all org-owned connection state. */
|
|
2927
|
+
async removeOfficialMCPClip(orgId, clipId) {
|
|
2928
|
+
return this.request("DELETE", ENDPOINTS.ORG_CLIP_MCP_REMOVE(orgId, clipId));
|
|
2929
|
+
}
|
|
2669
2930
|
/** List the org's installed registry clips (full entries). */
|
|
2670
2931
|
async listInstalledRegistryClips(orgId) {
|
|
2671
2932
|
const resp = await this.request("GET", ENDPOINTS.ORG_CLIPS_INSTALLED(orgId));
|
|
@@ -2697,15 +2958,18 @@ var init_client = __esm({
|
|
|
2697
2958
|
/**
|
|
2698
2959
|
* Read a clip's per-org agent exec access. Org-member readable (agents
|
|
2699
2960
|
* included, so a denied agent can learn why exec answered
|
|
2700
|
-
* `CLIP_AGENT_NOT_ALLOWED`).
|
|
2961
|
+
* `CLIP_AGENT_NOT_ALLOWED` / `CLIP_AGENT_CONNECTION_NOT_ALLOWED`).
|
|
2701
2962
|
*/
|
|
2702
2963
|
async getClipAgentExecAccess(orgId, clipId) {
|
|
2703
2964
|
return this.request("GET", ENDPOINTS.ORG_CLIP_EXEC_ACCESS(orgId, clipId));
|
|
2704
2965
|
}
|
|
2705
2966
|
/**
|
|
2706
2967
|
* Replace a clip's per-org agent exec access. Human-only (agent principals
|
|
2707
|
-
* get 403); under `all_agents`
|
|
2708
|
-
*
|
|
2968
|
+
* get 403); under `all_agents` both lists must be empty; pass either
|
|
2969
|
+
* `agent_ids` (legacy flat form → every agent gets `connection_scope: 'all'`)
|
|
2970
|
+
* or `grants` (connection-scoped), never both. Every granted id must be an
|
|
2971
|
+
* active agent of this org, and every `connection_ids` entry a connection of
|
|
2972
|
+
* THIS clip in this org (else `400 INVALID_INPUT`).
|
|
2709
2973
|
*/
|
|
2710
2974
|
async putClipAgentExecAccess(orgId, clipId, access) {
|
|
2711
2975
|
return this.request("PUT", ENDPOINTS.ORG_CLIP_EXEC_ACCESS(orgId, clipId), access);
|
|
@@ -2791,6 +3055,41 @@ var init_client = __esm({
|
|
|
2791
3055
|
headers: expectedVersion ? { "If-Match": `"proxy-${expectedVersion}"` } : void 0
|
|
2792
3056
|
});
|
|
2793
3057
|
}
|
|
3058
|
+
/**
|
|
3059
|
+
* Read a hosted Cloud Profile's one-shot cookie-seed status (manager-only:
|
|
3060
|
+
* hosted human maintainer or org admin). Sanitized — cookie VALUES never come
|
|
3061
|
+
* back, only `cookie_count` and the distinct target `domains`. `can_mutate` /
|
|
3062
|
+
* `lease_status` are the authoritative idle gate. Typed errors: `EDGE_NOT_HOSTED`
|
|
3063
|
+
* (BYOC device), `NOT_FOUND` (unknown profile).
|
|
3064
|
+
*/
|
|
3065
|
+
async getEdgeProfileCookieSeed(orgId, edgeId, profileName) {
|
|
3066
|
+
return this.request("GET", ENDPOINTS.ORG_EDGE_PROFILE_COOKIES(orgId, edgeId, profileName));
|
|
3067
|
+
}
|
|
3068
|
+
/**
|
|
3069
|
+
* Set/replace the profile's one-shot cookie seed (the full normalized cookie
|
|
3070
|
+
* array every time) — IDLE ONLY: while the profile's hosted browser is running
|
|
3071
|
+
* the server answers 409 `EDGE_PROFILE_IN_USE`; close the viewer, wait for idle
|
|
3072
|
+
* scale-to-zero, and retry. The next cold start injects the cookies into the
|
|
3073
|
+
* profile partition and consumes the seed. Other typed errors:
|
|
3074
|
+
* `EDGE_COOKIE_SEED_STALE` (409 — expectedVersion lost a tab race, sent as the
|
|
3075
|
+
* `cookieseed-<version>` If-Match), `EDGE_DELETING` (409), and
|
|
3076
|
+
* `SECRETBOX_UNCONFIGURED` (503 — server cannot store cookies safely).
|
|
3077
|
+
*/
|
|
3078
|
+
async setEdgeProfileCookieSeed(orgId, edgeId, profileName, req, expectedVersion) {
|
|
3079
|
+
return this.request("PUT", ENDPOINTS.ORG_EDGE_PROFILE_COOKIES(orgId, edgeId, profileName), req, void 0, false, {
|
|
3080
|
+
headers: expectedVersion ? { "If-Match": `"cookieseed-${expectedVersion}"` } : void 0
|
|
3081
|
+
});
|
|
3082
|
+
}
|
|
3083
|
+
/**
|
|
3084
|
+
* Clear the pending cookie seed (does NOT sign the profile out — cookies
|
|
3085
|
+
* already injected into the partition stay). Idle-only like set — 409
|
|
3086
|
+
* `EDGE_PROFILE_IN_USE` while the browser is live.
|
|
3087
|
+
*/
|
|
3088
|
+
async clearEdgeProfileCookieSeed(orgId, edgeId, profileName, expectedVersion) {
|
|
3089
|
+
return this.request("DELETE", ENDPOINTS.ORG_EDGE_PROFILE_COOKIES(orgId, edgeId, profileName), void 0, void 0, false, {
|
|
3090
|
+
headers: expectedVersion ? { "If-Match": `"cookieseed-${expectedVersion}"` } : void 0
|
|
3091
|
+
});
|
|
3092
|
+
}
|
|
2794
3093
|
/**
|
|
2795
3094
|
* Execute a registry clip command on an Edge device.
|
|
2796
3095
|
*
|
|
@@ -2852,12 +3151,14 @@ var init_client = __esm({
|
|
|
2852
3151
|
async deleteClipConnection(orgId, connId) {
|
|
2853
3152
|
return this.request("DELETE", ENDPOINTS.CLIP_CONNECTION(orgId, connId));
|
|
2854
3153
|
}
|
|
2855
|
-
// ---- MCP clip server config (
|
|
3154
|
+
// ---- MCP clip server config (same-org or reviewed Official OAuth) ----
|
|
2856
3155
|
/**
|
|
2857
|
-
* Read the redacted MCP config. 404 NOT_FOUND when the clip has none yet
|
|
2858
|
-
*
|
|
2859
|
-
*
|
|
2860
|
-
*
|
|
3156
|
+
* Read the redacted MCP config. 404 NOT_FOUND when the clip has none yet —
|
|
3157
|
+
* and also when a cross-org clip is not public + approved + installed, which
|
|
3158
|
+
* reads as nonexistent rather than refused (same existence-hiding as exec).
|
|
3159
|
+
* A cross-org clip that IS installed and approved reads fine regardless of
|
|
3160
|
+
* auth shape; what may then be configured is decided per credential owner.
|
|
3161
|
+
* `version` is the CAS token the mutations echo via If-Match.
|
|
2861
3162
|
*/
|
|
2862
3163
|
async getClipMCPConfig(orgId, clipId) {
|
|
2863
3164
|
return this.request("GET", ENDPOINTS.ORG_CLIP_MCP_CONFIG(orgId, clipId));
|
|
@@ -2894,13 +3195,26 @@ var init_client = __esm({
|
|
|
2894
3195
|
* List the org's MCP connections for a clip, default first — one row per
|
|
2895
3196
|
* connection (credential slot), WITHOUT the tools snapshot (`tool_count`
|
|
2896
3197
|
* summarizes it; the per-config GET carries the full snapshot). Same
|
|
2897
|
-
* family-wide fence as the singular GET:
|
|
2898
|
-
*
|
|
3198
|
+
* family-wide fence as the singular GET: same-org clips, or a cross-org clip
|
|
3199
|
+
* that is public + approved + installed; anything else reads as
|
|
3200
|
+
* `404 NOT_FOUND`. An installed cross-org clip with no connection yet lists
|
|
3201
|
+
* as an empty array — including one whose approved auth mode cannot be
|
|
3202
|
+
* configured at all (auth=none), which the write path is what refuses. With
|
|
2899
3203
|
* `cap:clip-mcp` off the route is not registered at all.
|
|
2900
3204
|
*/
|
|
2901
3205
|
async listClipMCPConnections(orgId, clipId) {
|
|
2902
3206
|
return this.request("GET", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId));
|
|
2903
3207
|
}
|
|
3208
|
+
/** Start a new Official OAuth MCP connection with the platform-owned app.
|
|
3209
|
+
* Omitting oauth_client is load-bearing: the server resolves the exact
|
|
3210
|
+
* reviewed-version binding and never falls back to DCR/CIMD cross-org. */
|
|
3211
|
+
async createClipMCPOAuthConnection(orgId, clipId, serverUrl, alias) {
|
|
3212
|
+
return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId), {
|
|
3213
|
+
server_url: serverUrl,
|
|
3214
|
+
auth_type: "oauth",
|
|
3215
|
+
...alias ? { alias } : {}
|
|
3216
|
+
});
|
|
3217
|
+
}
|
|
2904
3218
|
/**
|
|
2905
3219
|
* Re-run tools/list and replace the cached snapshot (org-admin only).
|
|
2906
3220
|
* Deliberately does NOT advance the CAS version, so an in-flight edit in
|
|
@@ -2940,8 +3254,22 @@ var init_client = __esm({
|
|
|
2940
3254
|
}
|
|
2941
3255
|
});
|
|
2942
3256
|
|
|
3257
|
+
// ts/sdk/dist/subject.js
|
|
3258
|
+
var init_subject = __esm({
|
|
3259
|
+
"ts/sdk/dist/subject.js"() {
|
|
3260
|
+
"use strict";
|
|
3261
|
+
}
|
|
3262
|
+
});
|
|
3263
|
+
|
|
3264
|
+
// ts/sdk/dist/task-label-types.js
|
|
3265
|
+
var init_task_label_types = __esm({
|
|
3266
|
+
"ts/sdk/dist/task-label-types.js"() {
|
|
3267
|
+
"use strict";
|
|
3268
|
+
}
|
|
3269
|
+
});
|
|
3270
|
+
|
|
2943
3271
|
// ts/sdk/dist/types.js
|
|
2944
|
-
var
|
|
3272
|
+
var init_types = __esm({
|
|
2945
3273
|
"ts/sdk/dist/types.js"() {
|
|
2946
3274
|
"use strict";
|
|
2947
3275
|
}
|
|
@@ -3294,14 +3622,16 @@ var init_dist = __esm({
|
|
|
3294
3622
|
init_browser_viewer();
|
|
3295
3623
|
init_client();
|
|
3296
3624
|
init_constants();
|
|
3297
|
-
|
|
3625
|
+
init_subject();
|
|
3626
|
+
init_task_label_types();
|
|
3627
|
+
init_types();
|
|
3298
3628
|
init_ws();
|
|
3299
3629
|
}
|
|
3300
3630
|
});
|
|
3301
3631
|
|
|
3302
|
-
// ts/agent-core/dist/
|
|
3303
|
-
var
|
|
3304
|
-
"ts/agent-core/dist/
|
|
3632
|
+
// ts/agent-core/dist/lane-key.js
|
|
3633
|
+
var init_lane_key = __esm({
|
|
3634
|
+
"ts/agent-core/dist/lane-key.js"() {
|
|
3305
3635
|
"use strict";
|
|
3306
3636
|
}
|
|
3307
3637
|
});
|
|
@@ -3327,13 +3657,6 @@ var init_gateway_lane_flow = __esm({
|
|
|
3327
3657
|
}
|
|
3328
3658
|
});
|
|
3329
3659
|
|
|
3330
|
-
// ts/agent-core/dist/session-state.js
|
|
3331
|
-
var init_session_state = __esm({
|
|
3332
|
-
"ts/agent-core/dist/session-state.js"() {
|
|
3333
|
-
"use strict";
|
|
3334
|
-
}
|
|
3335
|
-
});
|
|
3336
|
-
|
|
3337
3660
|
// ts/agent-core/dist/routing.js
|
|
3338
3661
|
var init_routing = __esm({
|
|
3339
3662
|
"ts/agent-core/dist/routing.js"() {
|
|
@@ -3341,27 +3664,6 @@ var init_routing = __esm({
|
|
|
3341
3664
|
}
|
|
3342
3665
|
});
|
|
3343
3666
|
|
|
3344
|
-
// ts/agent-core/dist/prompt-fragments.js
|
|
3345
|
-
var init_prompt_fragments = __esm({
|
|
3346
|
-
"ts/agent-core/dist/prompt-fragments.js"() {
|
|
3347
|
-
"use strict";
|
|
3348
|
-
}
|
|
3349
|
-
});
|
|
3350
|
-
|
|
3351
|
-
// ts/agent-core/dist/bridge-workspace.js
|
|
3352
|
-
var init_bridge_workspace = __esm({
|
|
3353
|
-
"ts/agent-core/dist/bridge-workspace.js"() {
|
|
3354
|
-
"use strict";
|
|
3355
|
-
}
|
|
3356
|
-
});
|
|
3357
|
-
|
|
3358
|
-
// ts/agent-core/dist/dispatch-adapter.js
|
|
3359
|
-
var init_dispatch_adapter = __esm({
|
|
3360
|
-
"ts/agent-core/dist/dispatch-adapter.js"() {
|
|
3361
|
-
"use strict";
|
|
3362
|
-
}
|
|
3363
|
-
});
|
|
3364
|
-
|
|
3365
3667
|
// ts/agent-core/dist/redact.js
|
|
3366
3668
|
var init_redact = __esm({
|
|
3367
3669
|
"ts/agent-core/dist/redact.js"() {
|
|
@@ -3369,28 +3671,6 @@ var init_redact = __esm({
|
|
|
3369
3671
|
}
|
|
3370
3672
|
});
|
|
3371
3673
|
|
|
3372
|
-
// ts/agent-core/dist/logger.js
|
|
3373
|
-
function createLogger(prefix) {
|
|
3374
|
-
return {
|
|
3375
|
-
info: (msg) => console.log(`${(/* @__PURE__ */ new Date()).toISOString()} [${prefix}] ${msg}`),
|
|
3376
|
-
warn: (msg) => console.warn(`${(/* @__PURE__ */ new Date()).toISOString()} [${prefix}] ${msg}`),
|
|
3377
|
-
error: (msg) => console.error(`${(/* @__PURE__ */ new Date()).toISOString()} [${prefix}] ${msg}`),
|
|
3378
|
-
child: (sub) => createLogger(`${prefix}:${sub}`)
|
|
3379
|
-
};
|
|
3380
|
-
}
|
|
3381
|
-
var init_logger = __esm({
|
|
3382
|
-
"ts/agent-core/dist/logger.js"() {
|
|
3383
|
-
"use strict";
|
|
3384
|
-
}
|
|
3385
|
-
});
|
|
3386
|
-
|
|
3387
|
-
// ts/agent-core/dist/channel-capability.js
|
|
3388
|
-
var init_channel_capability = __esm({
|
|
3389
|
-
"ts/agent-core/dist/channel-capability.js"() {
|
|
3390
|
-
"use strict";
|
|
3391
|
-
}
|
|
3392
|
-
});
|
|
3393
|
-
|
|
3394
3674
|
// ts/agent-core/dist/step-retry-queue.js
|
|
3395
3675
|
var init_step_retry_queue = __esm({
|
|
3396
3676
|
"ts/agent-core/dist/step-retry-queue.js"() {
|
|
@@ -3421,6 +3701,13 @@ var init_fork_session_finalizer = __esm({
|
|
|
3421
3701
|
}
|
|
3422
3702
|
});
|
|
3423
3703
|
|
|
3704
|
+
// ts/agent-core/dist/session-state.js
|
|
3705
|
+
var init_session_state = __esm({
|
|
3706
|
+
"ts/agent-core/dist/session-state.js"() {
|
|
3707
|
+
"use strict";
|
|
3708
|
+
}
|
|
3709
|
+
});
|
|
3710
|
+
|
|
3424
3711
|
// ts/node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/version.js
|
|
3425
3712
|
var VERSION;
|
|
3426
3713
|
var init_version = __esm({
|
|
@@ -3583,7 +3870,7 @@ var init_ComponentLogger = __esm({
|
|
|
3583
3870
|
|
|
3584
3871
|
// ts/node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/types.js
|
|
3585
3872
|
var DiagLogLevel;
|
|
3586
|
-
var
|
|
3873
|
+
var init_types2 = __esm({
|
|
3587
3874
|
"ts/node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/types.js"() {
|
|
3588
3875
|
(function(DiagLogLevel2) {
|
|
3589
3876
|
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
@@ -3623,7 +3910,7 @@ function createLogLevelDiagLogger(maxLevel, logger) {
|
|
|
3623
3910
|
}
|
|
3624
3911
|
var init_logLevelLogger = __esm({
|
|
3625
3912
|
"ts/node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js"() {
|
|
3626
|
-
|
|
3913
|
+
init_types2();
|
|
3627
3914
|
}
|
|
3628
3915
|
});
|
|
3629
3916
|
|
|
@@ -3633,7 +3920,7 @@ var init_diag = __esm({
|
|
|
3633
3920
|
"ts/node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/diag.js"() {
|
|
3634
3921
|
init_ComponentLogger();
|
|
3635
3922
|
init_logLevelLogger();
|
|
3636
|
-
|
|
3923
|
+
init_types2();
|
|
3637
3924
|
init_global_utils();
|
|
3638
3925
|
API_NAME = "diag";
|
|
3639
3926
|
DiagAPI = class _DiagAPI {
|
|
@@ -4931,7 +5218,7 @@ var init_esm = __esm({
|
|
|
4931
5218
|
init_utils();
|
|
4932
5219
|
init_context();
|
|
4933
5220
|
init_consoleLogger();
|
|
4934
|
-
|
|
5221
|
+
init_types2();
|
|
4935
5222
|
init_NoopMeter();
|
|
4936
5223
|
init_Metric();
|
|
4937
5224
|
init_TextMapPropagator();
|
|
@@ -5271,7 +5558,7 @@ var init_OTLPExporterBase = __esm({
|
|
|
5271
5558
|
|
|
5272
5559
|
// ts/node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.57.2_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/types.js
|
|
5273
5560
|
var __extends, OTLPExporterError;
|
|
5274
|
-
var
|
|
5561
|
+
var init_types3 = __esm({
|
|
5275
5562
|
"ts/node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.57.2_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/types.js"() {
|
|
5276
5563
|
__extends = /* @__PURE__ */ (function() {
|
|
5277
5564
|
var extendStatics = function(d, b) {
|
|
@@ -9357,7 +9644,7 @@ var import_core, __awaiter2, __generator2, OTLPExportDelegate;
|
|
|
9357
9644
|
var init_otlp_export_delegate = __esm({
|
|
9358
9645
|
"ts/node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.57.2_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-export-delegate.js"() {
|
|
9359
9646
|
import_core = __toESM(require_src2());
|
|
9360
|
-
|
|
9647
|
+
init_types3();
|
|
9361
9648
|
init_logging_response_handler();
|
|
9362
9649
|
init_esm();
|
|
9363
9650
|
__awaiter2 = function(thisArg, _arguments, P, generator) {
|
|
@@ -9577,7 +9864,7 @@ __export(esm_exports3, {
|
|
|
9577
9864
|
var init_esm3 = __esm({
|
|
9578
9865
|
"ts/node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.57.2_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/index.js"() {
|
|
9579
9866
|
init_OTLPExporterBase();
|
|
9580
|
-
|
|
9867
|
+
init_types3();
|
|
9581
9868
|
init_shared_configuration();
|
|
9582
9869
|
init_legacy_node_configuration();
|
|
9583
9870
|
init_otlp_network_export_delegate();
|
|
@@ -24008,7 +24295,7 @@ var __assign;
|
|
|
24008
24295
|
var init_http_transport_utils = __esm({
|
|
24009
24296
|
"ts/node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.57.2_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/http-transport-utils.js"() {
|
|
24010
24297
|
init_is_export_retryable();
|
|
24011
|
-
|
|
24298
|
+
init_types3();
|
|
24012
24299
|
__assign = function() {
|
|
24013
24300
|
__assign = Object.assign || function(t) {
|
|
24014
24301
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -54811,6 +55098,21 @@ var init_http_keepalive = __esm({
|
|
|
54811
55098
|
}
|
|
54812
55099
|
});
|
|
54813
55100
|
|
|
55101
|
+
// ts/agent-core/dist/logger.js
|
|
55102
|
+
function createLogger(prefix) {
|
|
55103
|
+
return {
|
|
55104
|
+
info: (msg) => console.log(`${(/* @__PURE__ */ new Date()).toISOString()} [${prefix}] ${msg}`),
|
|
55105
|
+
warn: (msg) => console.warn(`${(/* @__PURE__ */ new Date()).toISOString()} [${prefix}] ${msg}`),
|
|
55106
|
+
error: (msg) => console.error(`${(/* @__PURE__ */ new Date()).toISOString()} [${prefix}] ${msg}`),
|
|
55107
|
+
child: (sub) => createLogger(`${prefix}:${sub}`)
|
|
55108
|
+
};
|
|
55109
|
+
}
|
|
55110
|
+
var init_logger = __esm({
|
|
55111
|
+
"ts/agent-core/dist/logger.js"() {
|
|
55112
|
+
"use strict";
|
|
55113
|
+
}
|
|
55114
|
+
});
|
|
55115
|
+
|
|
54814
55116
|
// ts/agent-core/dist/platform-config.js
|
|
54815
55117
|
var init_platform_config = __esm({
|
|
54816
55118
|
"ts/agent-core/dist/platform-config.js"() {
|
|
@@ -54818,9 +55120,9 @@ var init_platform_config = __esm({
|
|
|
54818
55120
|
}
|
|
54819
55121
|
});
|
|
54820
55122
|
|
|
54821
|
-
// ts/agent-core/dist/
|
|
54822
|
-
var
|
|
54823
|
-
"ts/agent-core/dist/
|
|
55123
|
+
// ts/agent-core/dist/generated/codex-message-delivery.js
|
|
55124
|
+
var init_codex_message_delivery = __esm({
|
|
55125
|
+
"ts/agent-core/dist/generated/codex-message-delivery.js"() {
|
|
54824
55126
|
"use strict";
|
|
54825
55127
|
}
|
|
54826
55128
|
});
|
|
@@ -54895,30 +55197,84 @@ var init_skills = __esm({
|
|
|
54895
55197
|
}
|
|
54896
55198
|
});
|
|
54897
55199
|
|
|
55200
|
+
// ts/agent-core/dist/platform-instructions.js
|
|
55201
|
+
var init_platform_instructions2 = __esm({
|
|
55202
|
+
"ts/agent-core/dist/platform-instructions.js"() {
|
|
55203
|
+
"use strict";
|
|
55204
|
+
init_codex_message_delivery();
|
|
55205
|
+
init_platform_instructions();
|
|
55206
|
+
init_skills();
|
|
55207
|
+
init_codex_message_delivery();
|
|
55208
|
+
init_platform_instructions();
|
|
55209
|
+
}
|
|
55210
|
+
});
|
|
55211
|
+
|
|
55212
|
+
// ts/agent-core/dist/prompt-fragments.js
|
|
55213
|
+
var init_prompt_fragments = __esm({
|
|
55214
|
+
"ts/agent-core/dist/prompt-fragments.js"() {
|
|
55215
|
+
"use strict";
|
|
55216
|
+
init_platform_instructions();
|
|
55217
|
+
}
|
|
55218
|
+
});
|
|
55219
|
+
|
|
55220
|
+
// ts/agent-core/dist/provider-config.js
|
|
55221
|
+
function llmSource(pc) {
|
|
55222
|
+
return effectiveLLMSourceExplicit(pc) || "parall";
|
|
55223
|
+
}
|
|
55224
|
+
function effectiveLLMSourceExplicit(pc) {
|
|
55225
|
+
if (pc?.llm_source)
|
|
55226
|
+
return pc.llm_source;
|
|
55227
|
+
if (pc?.openai_api_key || pc?.openai_base_url || pc?.anthropic_auth_token || pc?.anthropic_base_url) {
|
|
55228
|
+
return "custom";
|
|
55229
|
+
}
|
|
55230
|
+
return "";
|
|
55231
|
+
}
|
|
55232
|
+
function clearAllProviderCreds(env) {
|
|
55233
|
+
delete env.ANTHROPIC_AUTH_TOKEN;
|
|
55234
|
+
delete env.ANTHROPIC_BASE_URL;
|
|
55235
|
+
delete env.ANTHROPIC_API_KEY;
|
|
55236
|
+
delete env.OPENAI_API_KEY;
|
|
55237
|
+
delete env.OPENAI_BASE_URL;
|
|
55238
|
+
delete env.PRLL_CLAUDE_ALLOW_API_KEY;
|
|
55239
|
+
}
|
|
55240
|
+
var init_provider_config = __esm({
|
|
55241
|
+
"ts/agent-core/dist/provider-config.js"() {
|
|
55242
|
+
"use strict";
|
|
55243
|
+
}
|
|
55244
|
+
});
|
|
55245
|
+
|
|
55246
|
+
// ts/agent-core/dist/types.js
|
|
55247
|
+
var init_types4 = __esm({
|
|
55248
|
+
"ts/agent-core/dist/types.js"() {
|
|
55249
|
+
"use strict";
|
|
55250
|
+
}
|
|
55251
|
+
});
|
|
55252
|
+
|
|
54898
55253
|
// ts/agent-core/dist/index.js
|
|
54899
55254
|
var init_dist2 = __esm({
|
|
54900
55255
|
"ts/agent-core/dist/index.js"() {
|
|
54901
55256
|
"use strict";
|
|
54902
|
-
init_provider_config();
|
|
54903
|
-
init_types();
|
|
54904
|
-
init_lane_key();
|
|
54905
|
-
init_gateway_lane_flow();
|
|
54906
|
-
init_session_state();
|
|
54907
|
-
init_routing();
|
|
54908
|
-
init_event_format();
|
|
54909
|
-
init_prompt_fragments();
|
|
54910
55257
|
init_bridge_workspace();
|
|
55258
|
+
init_channel_capability();
|
|
55259
|
+
init_channel_token();
|
|
54911
55260
|
init_dispatch_adapter();
|
|
54912
|
-
|
|
54913
|
-
init_logger();
|
|
55261
|
+
init_event_format();
|
|
54914
55262
|
init_gateway_base();
|
|
54915
|
-
|
|
55263
|
+
init_gateway_lane_flow();
|
|
54916
55264
|
init_http_keepalive();
|
|
55265
|
+
init_lane_key();
|
|
55266
|
+
init_lane_ledger();
|
|
55267
|
+
init_logger();
|
|
54917
55268
|
init_platform_config();
|
|
54918
|
-
|
|
54919
|
-
|
|
55269
|
+
init_platform_instructions2();
|
|
55270
|
+
init_prompt_fragments();
|
|
55271
|
+
init_provider_config();
|
|
55272
|
+
init_redact();
|
|
55273
|
+
init_routing();
|
|
55274
|
+
init_session_state();
|
|
54920
55275
|
init_skills();
|
|
54921
55276
|
init_telemetry();
|
|
55277
|
+
init_types4();
|
|
54922
55278
|
}
|
|
54923
55279
|
});
|
|
54924
55280
|
|