@parall/daemon 1.60.0 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/manifest.json +11 -11
- package/bundle/parall-browser-pod.js +346 -318
- package/bundle/parall-claude-agent.js +449 -358
- package/bundle/parall-codex-agent.js +449 -358
- package/bundle/parall-daemon.js +418 -345
- package/dist/supervisor.d.ts.map +1 -1
- package/dist/supervisor.js +3 -3
- package/package.json +6 -6
|
@@ -51568,6 +51568,21 @@ function attachmentEndpoints(apiBase) {
|
|
|
51568
51568
|
};
|
|
51569
51569
|
}
|
|
51570
51570
|
|
|
51571
|
+
// ts/sdk/dist/edge-endpoints.js
|
|
51572
|
+
var API_BASE = "/api/v1";
|
|
51573
|
+
var edgeEndpoints = {
|
|
51574
|
+
ORG_EDGE: (orgId) => `${API_BASE}/orgs/${orgId}/edge`,
|
|
51575
|
+
ORG_EDGE_CONNECT: (orgId) => `${API_BASE}/orgs/${orgId}/edge/connect`,
|
|
51576
|
+
ORG_EDGE_DEVICES: (orgId) => `${API_BASE}/orgs/${orgId}/edge/devices`,
|
|
51577
|
+
ORG_EDGE_DEVICE: (orgId, edgeId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}`,
|
|
51578
|
+
ORG_EDGE_DEVICE_UNREGISTER: (orgId, edgeId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/unregister`,
|
|
51579
|
+
ORG_EDGE_ONBOARDING: (orgId) => `${API_BASE}/orgs/${orgId}/edge/onboarding`,
|
|
51580
|
+
ORG_EDGE_PROFILES: (orgId, edgeId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/profiles`,
|
|
51581
|
+
ORG_EDGE_PROFILE_OPERATIONS: (orgId, edgeId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/profile-operations`,
|
|
51582
|
+
ORG_EDGE_PROFILE_OPERATION: (orgId, edgeId, operationId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}`,
|
|
51583
|
+
ORG_EDGE_PROFILE_OPERATION_CONFIRM: (orgId, edgeId, operationId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}/confirm`
|
|
51584
|
+
};
|
|
51585
|
+
|
|
51571
51586
|
// ts/sdk/dist/wechat-endpoints.js
|
|
51572
51587
|
function wechatEndpoints(apiBase) {
|
|
51573
51588
|
const agentBase = (orgId) => `${apiBase}/orgs/${orgId}/agents/me/wechat`;
|
|
@@ -51581,45 +51596,45 @@ function wechatEndpoints(apiBase) {
|
|
|
51581
51596
|
}
|
|
51582
51597
|
|
|
51583
51598
|
// ts/sdk/dist/constants.js
|
|
51584
|
-
var
|
|
51599
|
+
var API_BASE2 = "/api/v1";
|
|
51585
51600
|
var WIKI_BASE = "/wiki/v1";
|
|
51586
51601
|
var CLIP_BASE = "/clip/v1";
|
|
51587
51602
|
var ENDPOINTS = {
|
|
51588
51603
|
// Auth
|
|
51589
|
-
AUTH_REGISTER: `${
|
|
51590
|
-
AUTH_LOGIN: `${
|
|
51591
|
-
AUTH_REFRESH: `${
|
|
51592
|
-
AUTH_LOGOUT: `${
|
|
51593
|
-
AUTH_CHANGE_PASSWORD: `${
|
|
51594
|
-
AUTH_CHECK_EMAIL: `${
|
|
51595
|
-
AUTH_VERIFY_EMAIL: `${
|
|
51596
|
-
AUTH_RESEND_CODE: `${
|
|
51597
|
-
AUTH_FORGOT_PASSWORD: `${
|
|
51598
|
-
AUTH_RESET_PASSWORD: `${
|
|
51599
|
-
AUTH_OAUTH_EXCHANGE: `${
|
|
51604
|
+
AUTH_REGISTER: `${API_BASE2}/auth/register`,
|
|
51605
|
+
AUTH_LOGIN: `${API_BASE2}/auth/login`,
|
|
51606
|
+
AUTH_REFRESH: `${API_BASE2}/auth/refresh`,
|
|
51607
|
+
AUTH_LOGOUT: `${API_BASE2}/auth/logout`,
|
|
51608
|
+
AUTH_CHANGE_PASSWORD: `${API_BASE2}/auth/change-password`,
|
|
51609
|
+
AUTH_CHECK_EMAIL: `${API_BASE2}/auth/check-email`,
|
|
51610
|
+
AUTH_VERIFY_EMAIL: `${API_BASE2}/auth/verify-email`,
|
|
51611
|
+
AUTH_RESEND_CODE: `${API_BASE2}/auth/resend-code`,
|
|
51612
|
+
AUTH_FORGOT_PASSWORD: `${API_BASE2}/auth/forgot-password`,
|
|
51613
|
+
AUTH_RESET_PASSWORD: `${API_BASE2}/auth/reset-password`,
|
|
51614
|
+
AUTH_OAUTH_EXCHANGE: `${API_BASE2}/auth/oauth/exchange`,
|
|
51600
51615
|
// Users
|
|
51601
|
-
USERS_ME: `${
|
|
51602
|
-
USER_AVATAR: `${
|
|
51603
|
-
PERSONAL_API_KEYS: `${
|
|
51604
|
-
PERSONAL_API_KEY: (keyId) => `${
|
|
51605
|
-
USER: (id) => `${
|
|
51616
|
+
USERS_ME: `${API_BASE2}/users/me`,
|
|
51617
|
+
USER_AVATAR: `${API_BASE2}/users/me/avatar`,
|
|
51618
|
+
PERSONAL_API_KEYS: `${API_BASE2}/users/me/api-keys`,
|
|
51619
|
+
PERSONAL_API_KEY: (keyId) => `${API_BASE2}/users/me/api-keys/${keyId}`,
|
|
51620
|
+
USER: (id) => `${API_BASE2}/users/${id}`,
|
|
51606
51621
|
// WebSocket ticket
|
|
51607
|
-
WS_TICKET: `${
|
|
51622
|
+
WS_TICKET: `${API_BASE2}/ws/ticket`,
|
|
51608
51623
|
// Organizations (global)
|
|
51609
|
-
ORGS: `${
|
|
51624
|
+
ORGS: `${API_BASE2}/orgs`,
|
|
51610
51625
|
// Org-scoped
|
|
51611
|
-
ORG: (orgId) => `${
|
|
51612
|
-
ORG_MEMBERS: (orgId) => `${
|
|
51613
|
-
ORG_MEMBERS_FORMER: (orgId) => `${
|
|
51614
|
-
TEAMS: (orgId) => `${
|
|
51615
|
-
TEAM: (orgId, teamId) => `${
|
|
51616
|
-
TEAM_MEMBERS: (orgId, teamId) => `${
|
|
51617
|
-
TEAM_MEMBER: (orgId, teamId, userId) => `${
|
|
51618
|
-
ORG_MEMBERS_ONLINE: (orgId) => `${
|
|
51619
|
-
LLM_PROVIDERS: (orgId) => `${
|
|
51620
|
-
LLM_PROVIDER: (orgId, providerId) => `${
|
|
51621
|
-
ORG_LLM_MODELS: (orgId) => `${
|
|
51622
|
-
ORG_LLM_MODEL: (orgId, modelRowId) => `${
|
|
51626
|
+
ORG: (orgId) => `${API_BASE2}/orgs/${orgId}`,
|
|
51627
|
+
ORG_MEMBERS: (orgId) => `${API_BASE2}/orgs/${orgId}/members`,
|
|
51628
|
+
ORG_MEMBERS_FORMER: (orgId) => `${API_BASE2}/orgs/${orgId}/members/former`,
|
|
51629
|
+
TEAMS: (orgId) => `${API_BASE2}/orgs/${orgId}/teams`,
|
|
51630
|
+
TEAM: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}`,
|
|
51631
|
+
TEAM_MEMBERS: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members`,
|
|
51632
|
+
TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
51633
|
+
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE2}/orgs/${orgId}/members/online`,
|
|
51634
|
+
LLM_PROVIDERS: (orgId) => `${API_BASE2}/orgs/${orgId}/llm-providers`,
|
|
51635
|
+
LLM_PROVIDER: (orgId, providerId) => `${API_BASE2}/orgs/${orgId}/llm-providers/${providerId}`,
|
|
51636
|
+
ORG_LLM_MODELS: (orgId) => `${API_BASE2}/orgs/${orgId}/llm-models`,
|
|
51637
|
+
ORG_LLM_MODEL: (orgId, modelRowId) => `${API_BASE2}/orgs/${orgId}/llm-models/${modelRowId}`,
|
|
51623
51638
|
/**
|
|
51624
51639
|
* Platform catalog merged with this org's own model rows. Pass `runtime` to
|
|
51625
51640
|
* filter org-added models to the ones that runtime can actually reach —
|
|
@@ -51632,226 +51647,226 @@ var ENDPOINTS = {
|
|
|
51632
51647
|
if (includeModel)
|
|
51633
51648
|
params.set("include_model", includeModel);
|
|
51634
51649
|
const qs = params.toString();
|
|
51635
|
-
return `${
|
|
51650
|
+
return `${API_BASE2}/orgs/${orgId}/models${qs ? `?${qs}` : ""}`;
|
|
51636
51651
|
},
|
|
51637
|
-
ORG_MEMBER: (orgId, userId) => `${
|
|
51638
|
-
ORG_MEMBER_CHATS: (orgId, memberId) => `${
|
|
51639
|
-
ORG_MEMBER_TASKS: (orgId, memberId) => `${
|
|
51652
|
+
ORG_MEMBER: (orgId, userId) => `${API_BASE2}/orgs/${orgId}/members/${userId}`,
|
|
51653
|
+
ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE2}/orgs/${orgId}/members/${memberId}/chats`,
|
|
51654
|
+
ORG_MEMBER_TASKS: (orgId, memberId) => `${API_BASE2}/orgs/${orgId}/members/${memberId}/tasks`,
|
|
51640
51655
|
// Org-scoped public profile (title / description). GET readable by every
|
|
51641
51656
|
// active member; PATCH is CAS-guarded (expected_version).
|
|
51642
|
-
ORG_MEMBER_PROFILE: (orgId, userId) => `${
|
|
51657
|
+
ORG_MEMBER_PROFILE: (orgId, userId) => `${API_BASE2}/orgs/${orgId}/members/${userId}/profile`,
|
|
51643
51658
|
// Private agent Instructions — visibility gated server-side
|
|
51644
51659
|
// (agent self + Human org admin/owner + the agent's manager). Never cached.
|
|
51645
|
-
AGENT_INSTRUCTIONS: (orgId, agentId) => `${
|
|
51660
|
+
AGENT_INSTRUCTIONS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/instructions`,
|
|
51646
51661
|
// Agent manager (agent-global relation, org-scoped authorization).
|
|
51647
51662
|
// PATCH covers assign / transfer / renounce (manager_user_id null).
|
|
51648
|
-
AGENT_MANAGER: (orgId, agentId) => `${
|
|
51649
|
-
REF_SEARCH: (orgId) => `${
|
|
51663
|
+
AGENT_MANAGER: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/manager`,
|
|
51664
|
+
REF_SEARCH: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/search`,
|
|
51650
51665
|
// Direct messages (org-scoped, atomic find-or-create + send)
|
|
51651
|
-
DM: (orgId) => `${
|
|
51666
|
+
DM: (orgId) => `${API_BASE2}/orgs/${orgId}/dm`,
|
|
51652
51667
|
// Onboarding
|
|
51653
|
-
SEED_ONBOARDING_DM: (orgId) => `${
|
|
51654
|
-
DISMISS_ONBOARDING: (orgId) => `${
|
|
51668
|
+
SEED_ONBOARDING_DM: (orgId) => `${API_BASE2}/orgs/${orgId}/seed-onboarding-dm`,
|
|
51669
|
+
DISMISS_ONBOARDING: (orgId) => `${API_BASE2}/orgs/${orgId}/dismiss-onboarding`,
|
|
51655
51670
|
// Chats (org-scoped)
|
|
51656
|
-
CHATS: (orgId) => `${
|
|
51657
|
-
CHATS_DISCOVERABLE: (orgId) => `${
|
|
51658
|
-
CHAT: (orgId, chatId) => `${
|
|
51659
|
-
CHAT_JOIN: (orgId, chatId) => `${
|
|
51660
|
-
CHAT_ARCHIVE: (orgId, chatId) => `${
|
|
51661
|
-
CHAT_RESTORE: (orgId, chatId) => `${
|
|
51662
|
-
CHAT_MEMBERS: (orgId, chatId) => `${
|
|
51663
|
-
CHAT_MEMBER: (orgId, chatId, userId) => `${
|
|
51664
|
-
CHAT_TRANSFER_OWNERSHIP: (orgId, chatId) => `${
|
|
51665
|
-
CHAT_MESSAGES: (orgId, chatId) => `${
|
|
51671
|
+
CHATS: (orgId) => `${API_BASE2}/orgs/${orgId}/chats`,
|
|
51672
|
+
CHATS_DISCOVERABLE: (orgId) => `${API_BASE2}/orgs/${orgId}/chats/discoverable`,
|
|
51673
|
+
CHAT: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}`,
|
|
51674
|
+
CHAT_JOIN: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/join`,
|
|
51675
|
+
CHAT_ARCHIVE: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/archive`,
|
|
51676
|
+
CHAT_RESTORE: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/restore`,
|
|
51677
|
+
CHAT_MEMBERS: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/members`,
|
|
51678
|
+
CHAT_MEMBER: (orgId, chatId, userId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/members/${userId}`,
|
|
51679
|
+
CHAT_TRANSFER_OWNERSHIP: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/transfer-ownership`,
|
|
51680
|
+
CHAT_MESSAGES: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/messages`,
|
|
51666
51681
|
// Messages (global, by message ID)
|
|
51667
|
-
MESSAGE: (id) => `${
|
|
51668
|
-
MESSAGE_REPLIES: (id) => `${
|
|
51669
|
-
MESSAGE_WATCH: (id) => `${
|
|
51670
|
-
MESSAGE_WATCHERS: (id) => `${
|
|
51671
|
-
MESSAGE_WATCHING: (id) => `${
|
|
51682
|
+
MESSAGE: (id) => `${API_BASE2}/messages/${id}`,
|
|
51683
|
+
MESSAGE_REPLIES: (id) => `${API_BASE2}/messages/${id}/replies`,
|
|
51684
|
+
MESSAGE_WATCH: (id) => `${API_BASE2}/messages/${id}/watch`,
|
|
51685
|
+
MESSAGE_WATCHERS: (id) => `${API_BASE2}/messages/${id}/watchers`,
|
|
51686
|
+
MESSAGE_WATCHING: (id) => `${API_BASE2}/messages/${id}/watching`,
|
|
51672
51687
|
/** Caller's attention levels across chats / threads / tasks. */
|
|
51673
|
-
WATCHES: (orgId) => `${
|
|
51674
|
-
MESSAGE_REACTIONS: (id) => `${
|
|
51675
|
-
MESSAGE_REACTION: (id, emoji) => `${
|
|
51688
|
+
WATCHES: (orgId) => `${API_BASE2}/orgs/${orgId}/watches`,
|
|
51689
|
+
MESSAGE_REACTIONS: (id) => `${API_BASE2}/messages/${id}/reactions`,
|
|
51690
|
+
MESSAGE_REACTION: (id, emoji) => `${API_BASE2}/messages/${id}/reactions/${encodeURIComponent(emoji)}`,
|
|
51676
51691
|
// Upload (org-scoped)
|
|
51677
|
-
...attachmentEndpoints(
|
|
51692
|
+
...attachmentEndpoints(API_BASE2),
|
|
51678
51693
|
// Approval requests (org-scoped)
|
|
51679
|
-
APPROVAL_REQUESTS: (orgId) => `${
|
|
51694
|
+
APPROVAL_REQUESTS: (orgId) => `${API_BASE2}/orgs/${orgId}/approval-requests`,
|
|
51680
51695
|
// Approvals (global)
|
|
51681
|
-
APPROVAL: (id) => `${
|
|
51682
|
-
APPROVAL_DECIDE: (id) => `${
|
|
51683
|
-
APPROVAL_CANCEL: (id) => `${
|
|
51684
|
-
APPROVALS_PENDING: `${
|
|
51685
|
-
APPROVALS_ACTIONS: `${
|
|
51696
|
+
APPROVAL: (id) => `${API_BASE2}/approvals/${id}`,
|
|
51697
|
+
APPROVAL_DECIDE: (id) => `${API_BASE2}/approvals/${id}/decide`,
|
|
51698
|
+
APPROVAL_CANCEL: (id) => `${API_BASE2}/approvals/${id}/cancel`,
|
|
51699
|
+
APPROVALS_PENDING: `${API_BASE2}/approvals/pending`,
|
|
51700
|
+
APPROVALS_ACTIONS: `${API_BASE2}/approvals/actions`,
|
|
51686
51701
|
// Agents (org-scoped)
|
|
51687
|
-
AGENTS: (orgId) => `${
|
|
51688
|
-
AGENT: (orgId, agentId) => `${
|
|
51689
|
-
AGENT_API_KEYS: (orgId, agentId) => `${
|
|
51690
|
-
AGENT_API_KEY: (orgId, agentId, key) => `${
|
|
51691
|
-
AGENT_API_KEY_REGENERATE: (orgId, agentId) => `${
|
|
51692
|
-
AGENT_AVATAR: (orgId, agentId) => `${
|
|
51693
|
-
AGENT_ACTIVITY: (orgId, agentId) => `${
|
|
51694
|
-
AGENT_MONITOR: (orgId, agentId) => `${
|
|
51695
|
-
AGENT_ME: (orgId) => `${
|
|
51696
|
-
AGENT_REPLY_POLICY_CAPABILITY: (orgId) => `${
|
|
51697
|
-
AGENT_NEW_SESSION: (orgId, agentId) => `${
|
|
51698
|
-
AGENT_DEEP_RESET: (orgId, agentId) => `${
|
|
51699
|
-
AGENT_SESSIONS: (orgId, agentId) => `${
|
|
51700
|
-
AGENT_SESSION: (orgId, agentId, sessionId) => `${
|
|
51701
|
-
AGENT_SESSION_STEPS: (orgId, agentId, sessionId) => `${
|
|
51702
|
-
AGENT_SESSION_STEP: (orgId, agentId, sessionId, stepId) => `${
|
|
51703
|
-
AGENT_STEP_BY_ID: (orgId, stepId) => `${
|
|
51704
|
-
AGENT_TASKS: (orgId, agentId) => `${
|
|
51705
|
-
AGENT_RUNTIME_AUTH: (orgId, agentId) => `${
|
|
51706
|
-
AGENT_RUNTIME_AUTH_SESSIONS: (orgId, agentId) => `${
|
|
51707
|
-
AGENT_RUNTIME_AUTH_SESSION_COMPLETE: (orgId, agentId, sessionId) => `${
|
|
51708
|
-
AGENT_RUNTIME: (orgId, agentId) => `${
|
|
51709
|
-
AGENT_RUNTIME_UPGRADE: (orgId, agentId) => `${
|
|
51710
|
-
AGENT_RUNTIME_AVAILABLE_TAGS: (orgId, agentId) => `${
|
|
51711
|
-
AGENT_RUNTIME_RELEASE: (orgId, agentId, tag) => `${
|
|
51712
|
-
AGENT_PROVIDER_CONFIG: (orgId, agentId) => `${
|
|
51702
|
+
AGENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents`,
|
|
51703
|
+
AGENT: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}`,
|
|
51704
|
+
AGENT_API_KEYS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/api-keys`,
|
|
51705
|
+
AGENT_API_KEY: (orgId, agentId, key) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/api-keys/${key}`,
|
|
51706
|
+
AGENT_API_KEY_REGENERATE: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/api-keys/regenerate`,
|
|
51707
|
+
AGENT_AVATAR: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/avatar`,
|
|
51708
|
+
AGENT_ACTIVITY: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/activity`,
|
|
51709
|
+
AGENT_MONITOR: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/monitor`,
|
|
51710
|
+
AGENT_ME: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me`,
|
|
51711
|
+
AGENT_REPLY_POLICY_CAPABILITY: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/reply-policy-capability`,
|
|
51712
|
+
AGENT_NEW_SESSION: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/new-session`,
|
|
51713
|
+
AGENT_DEEP_RESET: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/deep-reset`,
|
|
51714
|
+
AGENT_SESSIONS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions`,
|
|
51715
|
+
AGENT_SESSION: (orgId, agentId, sessionId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions/${sessionId}`,
|
|
51716
|
+
AGENT_SESSION_STEPS: (orgId, agentId, sessionId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions/${sessionId}/steps`,
|
|
51717
|
+
AGENT_SESSION_STEP: (orgId, agentId, sessionId, stepId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions/${sessionId}/steps/${stepId}`,
|
|
51718
|
+
AGENT_STEP_BY_ID: (orgId, stepId) => `${API_BASE2}/orgs/${orgId}/agent-steps/${stepId}`,
|
|
51719
|
+
AGENT_TASKS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/tasks`,
|
|
51720
|
+
AGENT_RUNTIME_AUTH: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime-auth`,
|
|
51721
|
+
AGENT_RUNTIME_AUTH_SESSIONS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime-auth-sessions`,
|
|
51722
|
+
AGENT_RUNTIME_AUTH_SESSION_COMPLETE: (orgId, agentId, sessionId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime-auth-sessions/${sessionId}/complete`,
|
|
51723
|
+
AGENT_RUNTIME: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime`,
|
|
51724
|
+
AGENT_RUNTIME_UPGRADE: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime/upgrade`,
|
|
51725
|
+
AGENT_RUNTIME_AVAILABLE_TAGS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime/available-tags`,
|
|
51726
|
+
AGENT_RUNTIME_RELEASE: (orgId, agentId, tag) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime/releases/${encodeURIComponent(tag)}`,
|
|
51727
|
+
AGENT_PROVIDER_CONFIG: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/provider-config`,
|
|
51713
51728
|
// Machines (org-scoped)
|
|
51714
|
-
MACHINES: (orgId) => `${
|
|
51715
|
-
MACHINE: (orgId, machineId) => `${
|
|
51716
|
-
MACHINE_START: (orgId, machineId) => `${
|
|
51717
|
-
MACHINE_STOP: (orgId, machineId) => `${
|
|
51718
|
-
MACHINE_STATUS: (orgId, machineId) => `${
|
|
51719
|
-
MACHINE_LOGS: (orgId, machineId) => `${
|
|
51720
|
-
MACHINE_SPEC: (orgId, machineId) => `${
|
|
51721
|
-
MACHINE_RESTART: (orgId, machineId) => `${
|
|
51722
|
-
MACHINE_RESTART_ALL: (orgId) => `${
|
|
51729
|
+
MACHINES: (orgId) => `${API_BASE2}/orgs/${orgId}/machines`,
|
|
51730
|
+
MACHINE: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}`,
|
|
51731
|
+
MACHINE_START: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/start`,
|
|
51732
|
+
MACHINE_STOP: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/stop`,
|
|
51733
|
+
MACHINE_STATUS: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/status`,
|
|
51734
|
+
MACHINE_LOGS: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/logs`,
|
|
51735
|
+
MACHINE_SPEC: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/spec`,
|
|
51736
|
+
MACHINE_RESTART: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/restart`,
|
|
51737
|
+
MACHINE_RESTART_ALL: (orgId) => `${API_BASE2}/orgs/${orgId}/machines/restart-all`,
|
|
51723
51738
|
// Daemon-mode Machine management (org-scoped, user auth).
|
|
51724
51739
|
// POST creates a new daemon-mode Machine (daemon_mode=true always).
|
|
51725
51740
|
// Attach/Detach bind an agent to/from a daemon Machine.
|
|
51726
|
-
MACHINE_ATTACH_AGENT: (orgId, machineId, agentId) => `${
|
|
51727
|
-
MACHINE_DETACH_AGENT: (orgId, machineId, agentId) => `${
|
|
51728
|
-
MACHINE_WORKSPACE_STATES: (orgId, machineId) => `${
|
|
51729
|
-
MACHINE_AGENT_DAEMON_CONFIG: (orgId, machineId, agentId) => `${
|
|
51730
|
-
MACHINE_AGENT_WORKSPACE_SETUP: (orgId, machineId, agentId) => `${
|
|
51731
|
-
MACHINE_LLM_SOURCE: (orgId, machineId) => `${
|
|
51732
|
-
MACHINE_PROVIDER_ENABLED: (orgId, machineId) => `${
|
|
51733
|
-
MACHINE_MANAGED_BY: (orgId, machineId) => `${
|
|
51734
|
-
MACHINE_CAPABILITIES: (orgId, machineId) => `${
|
|
51735
|
-
MACHINE_RUNTIME_AUTH: (orgId, machineId) => `${
|
|
51736
|
-
MACHINE_KEYS: (orgId, machineId) => `${
|
|
51737
|
-
MACHINE_KEY: (orgId, machineId, keyId) => `${
|
|
51738
|
-
MACHINE_RUNTIME_AUTH_SESSIONS: (orgId, machineId) => `${
|
|
51739
|
-
MACHINE_RUNTIME_AUTH_SESSION_COMPLETE: (orgId, machineId, sessionId) => `${
|
|
51740
|
-
MACHINE_REQUEST_UPDATE: (orgId, machineId) => `${
|
|
51741
|
-
MACHINE_BROWSE: (orgId, machineId) => `${
|
|
51741
|
+
MACHINE_ATTACH_AGENT: (orgId, machineId, agentId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/agents/${agentId}`,
|
|
51742
|
+
MACHINE_DETACH_AGENT: (orgId, machineId, agentId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/agents/${agentId}`,
|
|
51743
|
+
MACHINE_WORKSPACE_STATES: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/workspace-states`,
|
|
51744
|
+
MACHINE_AGENT_DAEMON_CONFIG: (orgId, machineId, agentId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/agents/${agentId}/daemon-config`,
|
|
51745
|
+
MACHINE_AGENT_WORKSPACE_SETUP: (orgId, machineId, agentId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/agents/${agentId}/workspace/setup`,
|
|
51746
|
+
MACHINE_LLM_SOURCE: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/llm-source`,
|
|
51747
|
+
MACHINE_PROVIDER_ENABLED: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/provider-enabled`,
|
|
51748
|
+
MACHINE_MANAGED_BY: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/managed-by`,
|
|
51749
|
+
MACHINE_CAPABILITIES: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/capabilities`,
|
|
51750
|
+
MACHINE_RUNTIME_AUTH: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/runtime-auth`,
|
|
51751
|
+
MACHINE_KEYS: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/keys`,
|
|
51752
|
+
MACHINE_KEY: (orgId, machineId, keyId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/keys/${keyId}`,
|
|
51753
|
+
MACHINE_RUNTIME_AUTH_SESSIONS: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/runtime-auth-sessions`,
|
|
51754
|
+
MACHINE_RUNTIME_AUTH_SESSION_COMPLETE: (orgId, machineId, sessionId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/runtime-auth-sessions/${sessionId}/complete`,
|
|
51755
|
+
MACHINE_REQUEST_UPDATE: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/request-update`,
|
|
51756
|
+
MACHINE_BROWSE: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/browse`,
|
|
51742
51757
|
// Machine self-control-plane (mck_-scoped). The bearer token implicitly
|
|
51743
51758
|
// identifies the Machine, so there is no `:mid` URL parameter — these are
|
|
51744
51759
|
// "self" routes called by the daemon for its own host.
|
|
51745
|
-
MACHINES_ME: `${
|
|
51746
|
-
MACHINES_ME_AGENTS: `${
|
|
51747
|
-
MACHINES_ME_HEALTH: `${
|
|
51748
|
-
MACHINES_ME_CLIPS: `${
|
|
51749
|
-
MACHINES_ME_BROWSER_PROFILES: `${
|
|
51750
|
-
MACHINES_ME_BROWSER_PROFILE_STATUS: (profileId) => `${
|
|
51751
|
-
MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId) => `${
|
|
51752
|
-
MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId) => `${
|
|
51753
|
-
MACHINES_ME_WS_TICKET: `${
|
|
51754
|
-
MACHINES_ME_BROWSE_RESPONSE: (requestId) => `${
|
|
51760
|
+
MACHINES_ME: `${API_BASE2}/machines/me`,
|
|
51761
|
+
MACHINES_ME_AGENTS: `${API_BASE2}/machines/me/agents`,
|
|
51762
|
+
MACHINES_ME_HEALTH: `${API_BASE2}/machines/me/health`,
|
|
51763
|
+
MACHINES_ME_CLIPS: `${API_BASE2}/machines/me/clips`,
|
|
51764
|
+
MACHINES_ME_BROWSER_PROFILES: `${API_BASE2}/machines/me/browser-profiles`,
|
|
51765
|
+
MACHINES_ME_BROWSER_PROFILE_STATUS: (profileId) => `${API_BASE2}/machines/me/browser-profiles/${profileId}/status`,
|
|
51766
|
+
MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId) => `${API_BASE2}/machines/me/agents/${agentId}/launch-credential`,
|
|
51767
|
+
MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId) => `${API_BASE2}/machines/me/agents/${agentId}/workspace-state`,
|
|
51768
|
+
MACHINES_ME_WS_TICKET: `${API_BASE2}/machines/me/ws/ticket`,
|
|
51769
|
+
MACHINES_ME_BROWSE_RESPONSE: (requestId) => `${API_BASE2}/machines/me/browse-response/${requestId}`,
|
|
51755
51770
|
// Hosted browser live-viewer control plane (api-server, NOT clip-service):
|
|
51756
51771
|
// the web client drives WebRTC signaling + tab nav through VIEWER_COMMAND;
|
|
51757
51772
|
// api-server brokers each command to the host daemon via the machine:{id}
|
|
51758
51773
|
// request/reply bridge (mirrors filesystem browse), and the daemon replies on
|
|
51759
51774
|
// VIEWER_RESPONSE. See docs/engineering-design/hosted-browser-provider-design.md.
|
|
51760
|
-
MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE: (requestId) => `${
|
|
51775
|
+
MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE: (requestId) => `${API_BASE2}/machines/me/browser-profiles/viewer-response/${requestId}`,
|
|
51761
51776
|
// Tasks (org-scoped)
|
|
51762
|
-
TASKS: (orgId) => `${
|
|
51763
|
-
TASK_SUBTASK_SUMMARY: (orgId) => `${
|
|
51764
|
-
TASK: (orgId, taskId) => `${
|
|
51765
|
-
TASK_MOVE: (orgId, taskId) => `${
|
|
51766
|
-
TASK_ARCHIVE: (orgId, taskId) => `${
|
|
51767
|
-
TASK_RESTORE: (orgId, taskId) => `${
|
|
51768
|
-
TASK_WATCH: (orgId, taskId) => `${
|
|
51769
|
-
TASK_WATCHERS: (orgId, taskId) => `${
|
|
51770
|
-
TASK_SUBSCRIBER: (orgId, taskId, userId) => `${
|
|
51771
|
-
TASK_SUBTASKS: (orgId, taskId) => `${
|
|
51772
|
-
TASK_RELATIONS: (orgId, taskId) => `${
|
|
51773
|
-
TASK_RELATION: (orgId, taskId, relId) => `${
|
|
51774
|
-
TASK_RELATIONS_BY_TARGET: (orgId) => `${
|
|
51775
|
-
TASK_COMMENTS: (orgId, taskId) => `${
|
|
51776
|
-
TASK_COMMENT: (orgId, taskId, commentId) => `${
|
|
51777
|
-
TASK_ACTIVITIES: (orgId, taskId) => `${
|
|
51778
|
-
TASK_LABELS: (orgId, taskId) => `${
|
|
51779
|
-
TASK_LABEL: (orgId, taskId, labelId) => `${
|
|
51777
|
+
TASKS: (orgId) => `${API_BASE2}/orgs/${orgId}/tasks`,
|
|
51778
|
+
TASK_SUBTASK_SUMMARY: (orgId) => `${API_BASE2}/orgs/${orgId}/tasks/subtask-summary`,
|
|
51779
|
+
TASK: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}`,
|
|
51780
|
+
TASK_MOVE: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/move`,
|
|
51781
|
+
TASK_ARCHIVE: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/archive`,
|
|
51782
|
+
TASK_RESTORE: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/restore`,
|
|
51783
|
+
TASK_WATCH: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/watch`,
|
|
51784
|
+
TASK_WATCHERS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/watchers`,
|
|
51785
|
+
TASK_SUBSCRIBER: (orgId, taskId, userId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/subscribers/${userId}`,
|
|
51786
|
+
TASK_SUBTASKS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/subtasks`,
|
|
51787
|
+
TASK_RELATIONS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/relations`,
|
|
51788
|
+
TASK_RELATION: (orgId, taskId, relId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/relations/${relId}`,
|
|
51789
|
+
TASK_RELATIONS_BY_TARGET: (orgId) => `${API_BASE2}/orgs/${orgId}/task-relations`,
|
|
51790
|
+
TASK_COMMENTS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/comments`,
|
|
51791
|
+
TASK_COMMENT: (orgId, taskId, commentId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/comments/${commentId}`,
|
|
51792
|
+
TASK_ACTIVITIES: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/activities`,
|
|
51793
|
+
TASK_LABELS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/labels`,
|
|
51794
|
+
TASK_LABEL: (orgId, taskId, labelId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/labels/${labelId}`,
|
|
51780
51795
|
// Labels (org-scoped vocabulary; writes are admin-gated)
|
|
51781
|
-
LABELS: (orgId) => `${
|
|
51782
|
-
LABEL: (orgId, labelId) => `${
|
|
51796
|
+
LABELS: (orgId) => `${API_BASE2}/orgs/${orgId}/labels`,
|
|
51797
|
+
LABEL: (orgId, labelId) => `${API_BASE2}/orgs/${orgId}/labels/${labelId}`,
|
|
51783
51798
|
// Projects (org-scoped)
|
|
51784
|
-
PROJECTS: (orgId) => `${
|
|
51785
|
-
PROJECT_TASK_SUMMARY: (orgId) => `${
|
|
51786
|
-
PROJECT: (orgId, projectId) => `${
|
|
51787
|
-
PROJECT_MEMBERS: (orgId, projectId) => `${
|
|
51788
|
-
PROJECT_READERS: (orgId, projectId) => `${
|
|
51789
|
-
PROJECT_LIBRARY: (orgId) => `${
|
|
51790
|
-
PROJECT_JOIN: (orgId, projectId) => `${
|
|
51791
|
-
PROJECT_JOIN_REQUESTS: (orgId, projectId) => `${
|
|
51799
|
+
PROJECTS: (orgId) => `${API_BASE2}/orgs/${orgId}/projects`,
|
|
51800
|
+
PROJECT_TASK_SUMMARY: (orgId) => `${API_BASE2}/orgs/${orgId}/projects/task-summary`,
|
|
51801
|
+
PROJECT: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}`,
|
|
51802
|
+
PROJECT_MEMBERS: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/members`,
|
|
51803
|
+
PROJECT_READERS: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/readers`,
|
|
51804
|
+
PROJECT_LIBRARY: (orgId) => `${API_BASE2}/orgs/${orgId}/projects/library`,
|
|
51805
|
+
PROJECT_JOIN: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/join`,
|
|
51806
|
+
PROJECT_JOIN_REQUESTS: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/join-requests`,
|
|
51792
51807
|
// subject is a bare user ID or a bare team ID; both are path-segment safe.
|
|
51793
|
-
PROJECT_MEMBER: (orgId, projectId, subject) => `${
|
|
51808
|
+
PROJECT_MEMBER: (orgId, projectId, subject) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/members/${subject}`,
|
|
51794
51809
|
// Schedules (org-scoped, platform time trigger primitive)
|
|
51795
|
-
SCHEDULES: (orgId) => `${
|
|
51796
|
-
SCHEDULE: (orgId, id) => `${
|
|
51797
|
-
SCHEDULE_PAUSE: (orgId, id) => `${
|
|
51798
|
-
SCHEDULE_RESUME: (orgId, id) => `${
|
|
51799
|
-
SCHEDULE_CANCEL: (orgId, id) => `${
|
|
51800
|
-
SCHEDULE_RUNS: (orgId, id) => `${
|
|
51801
|
-
SCHEDULE_RUN: (orgId, runId) => `${
|
|
51810
|
+
SCHEDULES: (orgId) => `${API_BASE2}/orgs/${orgId}/schedules`,
|
|
51811
|
+
SCHEDULE: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}`,
|
|
51812
|
+
SCHEDULE_PAUSE: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}/pause`,
|
|
51813
|
+
SCHEDULE_RESUME: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}/resume`,
|
|
51814
|
+
SCHEDULE_CANCEL: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}/cancel`,
|
|
51815
|
+
SCHEDULE_RUNS: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}/runs`,
|
|
51816
|
+
SCHEDULE_RUN: (orgId, runId) => `${API_BASE2}/orgs/${orgId}/schedule_runs/${runId}`,
|
|
51802
51817
|
// External triggers (org-scoped incoming integration primitive)
|
|
51803
|
-
EXTERNAL_CONNECTIONS: (orgId) => `${
|
|
51804
|
-
EXTERNAL_CONNECTION: (orgId, connectionId) => `${
|
|
51805
|
-
EXTERNAL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${
|
|
51806
|
-
EXTERNAL_TRIGGER_SCHEMA: (orgId, connectionId) => `${
|
|
51807
|
-
EXTERNAL_INGRESS_EVENTS: (orgId) => `${
|
|
51808
|
-
EXTERNAL_INGRESS_EVENT: (orgId, eventId) => `${
|
|
51809
|
-
EXTERNAL_TRIGGERS: (orgId) => `${
|
|
51810
|
-
EXTERNAL_TRIGGER: (orgId, triggerId) => `${
|
|
51811
|
-
EXTERNAL_TRIGGER_RUNS: (orgId) => `${
|
|
51812
|
-
EXTERNAL_TRIGGER_RUN: (orgId, runId) => `${
|
|
51818
|
+
EXTERNAL_CONNECTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/external-connections`,
|
|
51819
|
+
EXTERNAL_CONNECTION: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/external-connections/${connectionId}`,
|
|
51820
|
+
EXTERNAL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/external-connections/${connectionId}/ingress-token/regenerate`,
|
|
51821
|
+
EXTERNAL_TRIGGER_SCHEMA: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/external-connections/${connectionId}/trigger-schema`,
|
|
51822
|
+
EXTERNAL_INGRESS_EVENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/external-ingress-events`,
|
|
51823
|
+
EXTERNAL_INGRESS_EVENT: (orgId, eventId) => `${API_BASE2}/orgs/${orgId}/external-ingress-events/${eventId}`,
|
|
51824
|
+
EXTERNAL_TRIGGERS: (orgId) => `${API_BASE2}/orgs/${orgId}/external-triggers`,
|
|
51825
|
+
EXTERNAL_TRIGGER: (orgId, triggerId) => `${API_BASE2}/orgs/${orgId}/external-triggers/${triggerId}`,
|
|
51826
|
+
EXTERNAL_TRIGGER_RUNS: (orgId) => `${API_BASE2}/orgs/${orgId}/external-trigger-runs`,
|
|
51827
|
+
EXTERNAL_TRIGGER_RUN: (orgId, runId) => `${API_BASE2}/orgs/${orgId}/external-trigger-runs/${runId}`,
|
|
51813
51828
|
// External IM channel (org-scoped, platform-mediated Feishu/Slack)
|
|
51814
|
-
CHANNEL_CONNECTIONS: (orgId) => `${
|
|
51815
|
-
CHANNEL_CONNECTION: (orgId, connectionId) => `${
|
|
51816
|
-
CHANNEL_CONNECTION_CREDENTIALS: (orgId, connectionId) => `${
|
|
51817
|
-
CHANNEL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${
|
|
51818
|
-
CHANNEL_CONNECTION_CONVERSATIONS: (orgId, connectionId) => `${
|
|
51819
|
-
CHANNEL_CONVERSATION: (orgId, conversationId) => `${
|
|
51820
|
-
CHANNEL_CONVERSATION_MESSAGES: (orgId, conversationId) => `${
|
|
51821
|
-
CHANNEL_CONVERSATION_SESSION: (orgId, conversationId) => `${
|
|
51822
|
-
CHANNEL_CONVERSATION_ATTENTION: (orgId, conversationId) => `${
|
|
51823
|
-
CHANNEL_MESSAGE: (orgId, messageId) => `${
|
|
51824
|
-
CHANNEL_PROVISIONING: (orgId) => `${
|
|
51825
|
-
CHANNEL_SLACK_MANIFEST_LINK: (orgId) => `${
|
|
51826
|
-
CHANNEL_PROVISIONING_SESSION: (orgId, sessionId) => `${
|
|
51827
|
-
CHANNEL_PROVISIONING_CANCEL: (orgId, sessionId) => `${
|
|
51829
|
+
CHANNEL_CONNECTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/channel-connections`,
|
|
51830
|
+
CHANNEL_CONNECTION: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/channel-connections/${connectionId}`,
|
|
51831
|
+
CHANNEL_CONNECTION_CREDENTIALS: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/channel-connections/${connectionId}/credentials`,
|
|
51832
|
+
CHANNEL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/channel-connections/${connectionId}/ingress-token/regenerate`,
|
|
51833
|
+
CHANNEL_CONNECTION_CONVERSATIONS: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/channel-connections/${connectionId}/conversations`,
|
|
51834
|
+
CHANNEL_CONVERSATION: (orgId, conversationId) => `${API_BASE2}/orgs/${orgId}/channel-conversations/${conversationId}`,
|
|
51835
|
+
CHANNEL_CONVERSATION_MESSAGES: (orgId, conversationId) => `${API_BASE2}/orgs/${orgId}/channel-conversations/${conversationId}/messages`,
|
|
51836
|
+
CHANNEL_CONVERSATION_SESSION: (orgId, conversationId) => `${API_BASE2}/orgs/${orgId}/channel-conversations/${conversationId}/session`,
|
|
51837
|
+
CHANNEL_CONVERSATION_ATTENTION: (orgId, conversationId) => `${API_BASE2}/orgs/${orgId}/channel-conversations/${conversationId}/attention`,
|
|
51838
|
+
CHANNEL_MESSAGE: (orgId, messageId) => `${API_BASE2}/orgs/${orgId}/channel-messages/${messageId}`,
|
|
51839
|
+
CHANNEL_PROVISIONING: (orgId) => `${API_BASE2}/orgs/${orgId}/channel-provisioning`,
|
|
51840
|
+
CHANNEL_SLACK_MANIFEST_LINK: (orgId) => `${API_BASE2}/orgs/${orgId}/channel-provisioning/slack/manifest-link`,
|
|
51841
|
+
CHANNEL_PROVISIONING_SESSION: (orgId, sessionId) => `${API_BASE2}/orgs/${orgId}/channel-provisioning/${sessionId}`,
|
|
51842
|
+
CHANNEL_PROVISIONING_CANCEL: (orgId, sessionId) => `${API_BASE2}/orgs/${orgId}/channel-provisioning/${sessionId}/cancel`,
|
|
51828
51843
|
// Tier-B platform verb (agent-only): send one message as the bound bot.
|
|
51829
|
-
CHANNEL_SEND: (orgId) => `${
|
|
51844
|
+
CHANNEL_SEND: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/channel-send`,
|
|
51830
51845
|
// Tier-B read verbs (agent-only): workspace visibility as the bot sees it.
|
|
51831
|
-
SLACK_CHANNELS: (orgId) => `${
|
|
51832
|
-
SLACK_USERS: (orgId) => `${
|
|
51833
|
-
SLACK_HISTORY: (orgId) => `${
|
|
51834
|
-
SLACK_MEMBERS: (orgId) => `${
|
|
51835
|
-
SLACK_STATUS: (orgId) => `${
|
|
51836
|
-
SLACK_FILE: (orgId) => `${
|
|
51837
|
-
SLACK_FILES: (orgId) => `${
|
|
51846
|
+
SLACK_CHANNELS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/channels`,
|
|
51847
|
+
SLACK_USERS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/users`,
|
|
51848
|
+
SLACK_HISTORY: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/history`,
|
|
51849
|
+
SLACK_MEMBERS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/members`,
|
|
51850
|
+
SLACK_STATUS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/status`,
|
|
51851
|
+
SLACK_FILE: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/file`,
|
|
51852
|
+
SLACK_FILES: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/files`,
|
|
51838
51853
|
// WeChat tier-B read verbs (agent-only; internal research preview).
|
|
51839
|
-
...wechatEndpoints(
|
|
51854
|
+
...wechatEndpoints(API_BASE2),
|
|
51840
51855
|
// Invitations (org-scoped, admin)
|
|
51841
|
-
ORG_INVITATIONS: (orgId) => `${
|
|
51842
|
-
ORG_INVITATION: (orgId, invId) => `${
|
|
51843
|
-
ORG_INVITATION_RESEND: (orgId, invId) => `${
|
|
51856
|
+
ORG_INVITATIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/invitations`,
|
|
51857
|
+
ORG_INVITATION: (orgId, invId) => `${API_BASE2}/orgs/${orgId}/invitations/${invId}`,
|
|
51858
|
+
ORG_INVITATION_RESEND: (orgId, invId) => `${API_BASE2}/orgs/${orgId}/invitations/${invId}/resend`,
|
|
51844
51859
|
// Invitations (invitee)
|
|
51845
|
-
MY_INVITATIONS: `${
|
|
51846
|
-
INVITATION_ACCEPT: (id) => `${
|
|
51847
|
-
INVITATION_DECLINE: (id) => `${
|
|
51848
|
-
INVITATION_BY_TOKEN: (token) => `${
|
|
51860
|
+
MY_INVITATIONS: `${API_BASE2}/invitations/pending`,
|
|
51861
|
+
INVITATION_ACCEPT: (id) => `${API_BASE2}/invitations/${id}/accept`,
|
|
51862
|
+
INVITATION_DECLINE: (id) => `${API_BASE2}/invitations/${id}/decline`,
|
|
51863
|
+
INVITATION_BY_TOKEN: (token) => `${API_BASE2}/invitations/by-token/${token}`,
|
|
51849
51864
|
// Org-level shareable invite link
|
|
51850
|
-
ORG_INVITE_LINK: (orgId) => `${
|
|
51851
|
-
ORG_INVITE_LINK_REGENERATE: (orgId) => `${
|
|
51852
|
-
ORG_INVITE_LINK_JOIN_REQUESTS: (orgId) => `${
|
|
51853
|
-
ORG_INVITE_LINK_JOIN_REQUEST_DECIDE: (orgId, jrId) => `${
|
|
51854
|
-
INVITE_LINK_JOIN: `${
|
|
51865
|
+
ORG_INVITE_LINK: (orgId) => `${API_BASE2}/orgs/${orgId}/invite-link`,
|
|
51866
|
+
ORG_INVITE_LINK_REGENERATE: (orgId) => `${API_BASE2}/orgs/${orgId}/invite-link/regenerate`,
|
|
51867
|
+
ORG_INVITE_LINK_JOIN_REQUESTS: (orgId) => `${API_BASE2}/orgs/${orgId}/invite-link/join-requests`,
|
|
51868
|
+
ORG_INVITE_LINK_JOIN_REQUEST_DECIDE: (orgId, jrId) => `${API_BASE2}/orgs/${orgId}/invite-link/join-requests/${jrId}/decide`,
|
|
51869
|
+
INVITE_LINK_JOIN: `${API_BASE2}/invite-link/join`,
|
|
51855
51870
|
// Wikis (org-scoped, served by wiki-service)
|
|
51856
51871
|
WIKIS: (orgId) => `${WIKI_BASE}/orgs/${orgId}/wikis`,
|
|
51857
51872
|
// Recycle bin — soft-deleted wikis (owner only). Must precede WIKI in the
|
|
@@ -51906,86 +51921,86 @@ var ENDPOINTS = {
|
|
|
51906
51921
|
WIKI_OPERATIONS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/operations`,
|
|
51907
51922
|
WIKI_OPERATION_REVERT: (orgId, wikiId, opId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/operations/${opId}/revert`,
|
|
51908
51923
|
// Unified Comments (org-scoped, api-server)
|
|
51909
|
-
COMMENTS: (orgId) => `${
|
|
51910
|
-
COMMENT: (orgId, commentId) => `${
|
|
51911
|
-
COMMENT_RESOLVE: (orgId, commentId) => `${
|
|
51912
|
-
COMMENT_REOPEN: (orgId, commentId) => `${
|
|
51924
|
+
COMMENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/comments`,
|
|
51925
|
+
COMMENT: (orgId, commentId) => `${API_BASE2}/orgs/${orgId}/comments/${commentId}`,
|
|
51926
|
+
COMMENT_RESOLVE: (orgId, commentId) => `${API_BASE2}/orgs/${orgId}/comments/${commentId}:resolve`,
|
|
51927
|
+
COMMENT_REOPEN: (orgId, commentId) => `${API_BASE2}/orgs/${orgId}/comments/${commentId}:reopen`,
|
|
51913
51928
|
// Inbox (org-scoped)
|
|
51914
|
-
INBOX: (orgId) => `${
|
|
51915
|
-
INBOX_UNREAD_COUNT: (orgId) => `${
|
|
51916
|
-
INBOX_ITEM_READ: (orgId, id) => `${
|
|
51917
|
-
INBOX_ITEM_UNREAD: (orgId, id) => `${
|
|
51918
|
-
INBOX_ITEM_ARCHIVE: (orgId, id) => `${
|
|
51929
|
+
INBOX: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox`,
|
|
51930
|
+
INBOX_UNREAD_COUNT: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox/unread-count`,
|
|
51931
|
+
INBOX_ITEM_READ: (orgId, id) => `${API_BASE2}/orgs/${orgId}/inbox/${id}/read`,
|
|
51932
|
+
INBOX_ITEM_UNREAD: (orgId, id) => `${API_BASE2}/orgs/${orgId}/inbox/${id}/unread`,
|
|
51933
|
+
INBOX_ITEM_ARCHIVE: (orgId, id) => `${API_BASE2}/orgs/${orgId}/inbox/${id}/archive`,
|
|
51919
51934
|
// Snooze/Unsnooze deferred until un-snooze cron worker is implemented
|
|
51920
|
-
INBOX_MARK_ALL_READ: (orgId) => `${
|
|
51921
|
-
INBOX_ARCHIVE_ALL: (orgId) => `${
|
|
51922
|
-
INBOX_ITEM: (orgId, id) => `${
|
|
51923
|
-
INBOX_ACK: (orgId) => `${
|
|
51935
|
+
INBOX_MARK_ALL_READ: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox/mark-all-read`,
|
|
51936
|
+
INBOX_ARCHIVE_ALL: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox/archive-all`,
|
|
51937
|
+
INBOX_ITEM: (orgId, id) => `${API_BASE2}/orgs/${orgId}/inbox/${id}`,
|
|
51938
|
+
INBOX_ACK: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox/ack`,
|
|
51924
51939
|
// Dispatch (agent event delivery)
|
|
51925
|
-
DISPATCH: (orgId) => `${
|
|
51926
|
-
DISPATCH_PENDING_COUNT: (orgId) => `${
|
|
51927
|
-
DISPATCH_RECEIVED: (orgId) => `${
|
|
51928
|
-
DISPATCH_ACK: (orgId) => `${
|
|
51929
|
-
DISPATCH_ACK_BY_ID: (orgId, id) => `${
|
|
51930
|
-
DISPATCH_EXPIRE: (orgId) => `${
|
|
51931
|
-
DISPATCH_BY_MESSAGES: (orgId) => `${
|
|
51932
|
-
DISPATCH_CLAIM: (orgId) => `${
|
|
51933
|
-
DISPATCH_STEER: (orgId) => `${
|
|
51934
|
-
DISPATCH_INPUT_STATE: (orgId) => `${
|
|
51935
|
-
DISPATCH_COMPLETE: (orgId) => `${
|
|
51936
|
-
DISPATCH_COMPLETE_SOURCES: (orgId) => `${
|
|
51937
|
-
DISPATCH_RELEASE: (orgId) => `${
|
|
51938
|
-
DISPATCH_HEARTBEAT: (orgId) => `${
|
|
51940
|
+
DISPATCH: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch`,
|
|
51941
|
+
DISPATCH_PENDING_COUNT: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/pending-count`,
|
|
51942
|
+
DISPATCH_RECEIVED: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/received`,
|
|
51943
|
+
DISPATCH_ACK: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/ack`,
|
|
51944
|
+
DISPATCH_ACK_BY_ID: (orgId, id) => `${API_BASE2}/orgs/${orgId}/dispatch/${id}/ack`,
|
|
51945
|
+
DISPATCH_EXPIRE: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/expire`,
|
|
51946
|
+
DISPATCH_BY_MESSAGES: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/by-messages`,
|
|
51947
|
+
DISPATCH_CLAIM: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/claim`,
|
|
51948
|
+
DISPATCH_STEER: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/steer`,
|
|
51949
|
+
DISPATCH_INPUT_STATE: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/input-state`,
|
|
51950
|
+
DISPATCH_COMPLETE: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/complete`,
|
|
51951
|
+
DISPATCH_COMPLETE_SOURCES: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/complete-sources`,
|
|
51952
|
+
DISPATCH_RELEASE: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/release`,
|
|
51953
|
+
DISPATCH_HEARTBEAT: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/heartbeat`,
|
|
51939
51954
|
// Unread
|
|
51940
|
-
UNREAD: `${
|
|
51941
|
-
ORG_UNREAD: (orgId) => `${
|
|
51942
|
-
CHAT_READ: (orgId, chatId) => `${
|
|
51943
|
-
CHAT_READ_ALL: (orgId, chatId) => `${
|
|
51944
|
-
THREAD_UNREAD: (orgId, chatId, threadRootId) => `${
|
|
51945
|
-
THREAD_READ: (orgId, chatId, threadRootId) => `${
|
|
51955
|
+
UNREAD: `${API_BASE2}/me/unread`,
|
|
51956
|
+
ORG_UNREAD: (orgId) => `${API_BASE2}/orgs/${orgId}/unread`,
|
|
51957
|
+
CHAT_READ: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/read`,
|
|
51958
|
+
CHAT_READ_ALL: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/read-all`,
|
|
51959
|
+
THREAD_UNREAD: (orgId, chatId, threadRootId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/unread`,
|
|
51960
|
+
THREAD_READ: (orgId, chatId, threadRootId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/read`,
|
|
51946
51961
|
// References (org-scoped)
|
|
51947
|
-
REFS_RESOLVE: (orgId) => `${
|
|
51948
|
-
REFS_BACKLINKS: (orgId) => `${
|
|
51949
|
-
REFS_OUTBOUND: (orgId) => `${
|
|
51950
|
-
REFS_GRAPH: (orgId) => `${
|
|
51951
|
-
REFS_CHECK: (orgId) => `${
|
|
51962
|
+
REFS_RESOLVE: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/resolve`,
|
|
51963
|
+
REFS_BACKLINKS: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/backlinks`,
|
|
51964
|
+
REFS_OUTBOUND: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/outbound`,
|
|
51965
|
+
REFS_GRAPH: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/graph`,
|
|
51966
|
+
REFS_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/check`,
|
|
51952
51967
|
// Platform config (agent-scoped, not org-scoped)
|
|
51953
|
-
PLATFORM_CONFIG: `${
|
|
51968
|
+
PLATFORM_CONFIG: `${API_BASE2}/agents/platform-config`,
|
|
51954
51969
|
// Push notifications
|
|
51955
|
-
PUSH_SUBSCRIBE: `${
|
|
51956
|
-
PUSH_UNSUBSCRIBE: `${
|
|
51957
|
-
PUSH_VAPID_KEY: `${
|
|
51970
|
+
PUSH_SUBSCRIBE: `${API_BASE2}/push/subscribe`,
|
|
51971
|
+
PUSH_UNSUBSCRIBE: `${API_BASE2}/push/unsubscribe`,
|
|
51972
|
+
PUSH_VAPID_KEY: `${API_BASE2}/push/vapid-key`,
|
|
51958
51973
|
// Notification preferences
|
|
51959
|
-
NOTIFICATION_PREFERENCES: `${
|
|
51974
|
+
NOTIFICATION_PREFERENCES: `${API_BASE2}/notification-preferences`,
|
|
51960
51975
|
// Unified search (messages + tasks + wiki, org-scoped)
|
|
51961
|
-
SEARCH: (orgId) => `${
|
|
51976
|
+
SEARCH: (orgId) => `${API_BASE2}/orgs/${orgId}/search`,
|
|
51962
51977
|
// Feature flags (server-evaluated). Org-scoped by default; omit the org for
|
|
51963
51978
|
// the pre-org form, which resolves "cap:" capabilities only (PostHog flags
|
|
51964
51979
|
// are org-scoped and absent there) for callers that have no org yet.
|
|
51965
|
-
FEATURE_FLAGS: (orgId) => orgId ? `${
|
|
51980
|
+
FEATURE_FLAGS: (orgId) => orgId ? `${API_BASE2}/orgs/${orgId}/feature-flags` : `${API_BASE2}/feature-flags`,
|
|
51966
51981
|
// Team templates (org-scoped, owner/admin only)
|
|
51967
|
-
TEMPLATES: (orgId) => `${
|
|
51968
|
-
TEMPLATE: (orgId, templateId) => `${
|
|
51969
|
-
TEMPLATE_DEPLOYMENTS: (orgId) => `${
|
|
51970
|
-
TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${
|
|
51971
|
-
CLIP_DEPENDENCIES_CHECK: (orgId) => `${
|
|
51982
|
+
TEMPLATES: (orgId) => `${API_BASE2}/orgs/${orgId}/templates`,
|
|
51983
|
+
TEMPLATE: (orgId, templateId) => `${API_BASE2}/orgs/${orgId}/templates/${templateId}`,
|
|
51984
|
+
TEMPLATE_DEPLOYMENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/template-deployments`,
|
|
51985
|
+
TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${API_BASE2}/orgs/${orgId}/template-deployments/${deploymentId}`,
|
|
51986
|
+
CLIP_DEPENDENCIES_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/clip-dependencies/check`,
|
|
51972
51987
|
// Onboarding wizard progress (org-scoped, self)
|
|
51973
|
-
ONBOARDING_PROGRESS: (orgId) => `${
|
|
51988
|
+
ONBOARDING_PROGRESS: (orgId) => `${API_BASE2}/orgs/${orgId}/onboarding`,
|
|
51974
51989
|
// Billing & Credits (org-scoped)
|
|
51975
|
-
BILLING: (orgId) => `${
|
|
51976
|
-
BILLING_TRANSACTIONS: (orgId) => `${
|
|
51977
|
-
BILLING_CHECKOUT: (orgId) => `${
|
|
51978
|
-
BILLING_AUTO_RELOAD: (orgId) => `${
|
|
51979
|
-
BILLING_SETUP_INTENT: (orgId) => `${
|
|
51980
|
-
COMPUTE_PRICING: () => `${
|
|
51990
|
+
BILLING: (orgId) => `${API_BASE2}/orgs/${orgId}/billing`,
|
|
51991
|
+
BILLING_TRANSACTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/transactions`,
|
|
51992
|
+
BILLING_CHECKOUT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/checkout`,
|
|
51993
|
+
BILLING_AUTO_RELOAD: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/auto-reload`,
|
|
51994
|
+
BILLING_SETUP_INTENT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/setup-intent`,
|
|
51995
|
+
COMPUTE_PRICING: () => `${API_BASE2}/billing/compute-pricing`,
|
|
51981
51996
|
// Runtime capability table (public, no auth) — SSOT for the create/settings
|
|
51982
51997
|
// interlock: per-runtime compute modes, native model family, cross-family
|
|
51983
51998
|
// availability, and recommended model.
|
|
51984
|
-
RUNTIMES: () => `${
|
|
51999
|
+
RUNTIMES: () => `${API_BASE2}/runtimes`,
|
|
51985
52000
|
// Model catalog (public, no auth) — served from the server's DB-backed
|
|
51986
52001
|
// snapshot. Optional include_model keeps an agent's pinned hidden legacy
|
|
51987
52002
|
// model representable in settings pickers.
|
|
51988
|
-
MODELS: (includeModel) => includeModel ? `${
|
|
52003
|
+
MODELS: (includeModel) => includeModel ? `${API_BASE2}/models?include_model=${encodeURIComponent(includeModel)}` : `${API_BASE2}/models`,
|
|
51989
52004
|
// ADMIN_GRANTS intentionally NOT exported here — it sits under the
|
|
51990
52005
|
// unauthenticated `/internal/admin/*` surface and must not bleed into the
|
|
51991
52006
|
// public SDK. Admin dashboard hits the URL directly from its own client.
|
|
@@ -52008,17 +52023,9 @@ var ENDPOINTS = {
|
|
|
52008
52023
|
BROWSER_PROFILE_CONSENT: (orgId, profileId, clipId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/consents/${clipId}`,
|
|
52009
52024
|
// Live viewer command — on api-server (API_BASE), not clip-service: it rides
|
|
52010
52025
|
// the machine control-plane request/reply bridge that lives in api-server.
|
|
52011
|
-
BROWSER_PROFILE_VIEWER_COMMAND: (orgId, profileId) => `${
|
|
52026
|
+
BROWSER_PROFILE_VIEWER_COMMAND: (orgId, profileId) => `${API_BASE2}/orgs/${orgId}/browser-profiles/${profileId}/viewer/command`,
|
|
52012
52027
|
// Edge device endpoints
|
|
52013
|
-
|
|
52014
|
-
ORG_EDGE_DEVICES: (orgId) => `/api/v1/orgs/${orgId}/edge/devices`,
|
|
52015
|
-
ORG_EDGE_DEVICE: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}`,
|
|
52016
|
-
ORG_EDGE_DEVICE_UNREGISTER: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/unregister`,
|
|
52017
|
-
ORG_EDGE_ONBOARDING: (orgId) => `/api/v1/orgs/${orgId}/edge/onboarding`,
|
|
52018
|
-
ORG_EDGE_PROFILES: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
|
|
52019
|
-
ORG_EDGE_PROFILE_OPERATIONS: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations`,
|
|
52020
|
-
ORG_EDGE_PROFILE_OPERATION: (orgId, edgeId, operationId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}`,
|
|
52021
|
-
ORG_EDGE_PROFILE_OPERATION_CONFIRM: (orgId, edgeId, operationId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}/confirm`,
|
|
52028
|
+
...edgeEndpoints,
|
|
52022
52029
|
ORG_BROWSER_ALIASES: (orgId) => `/api/v1/orgs/${orgId}/browser-aliases`,
|
|
52023
52030
|
ORG_BROWSER_ALIAS: (orgId, aliasId) => `/api/v1/orgs/${orgId}/browser-aliases/${aliasId}`,
|
|
52024
52031
|
ORG_BROWSER_ALIAS_READINESS_CHECKS: (orgId, aliasId) => `/api/v1/orgs/${orgId}/browser-aliases/${aliasId}/readiness-checks`,
|
|
@@ -52720,7 +52727,7 @@ var ParallClient = class _ParallClient extends ChannelConversationClient {
|
|
|
52720
52727
|
if (this.swimlaneName) {
|
|
52721
52728
|
headers["X-Prll-Swimlane"] = this.swimlaneName;
|
|
52722
52729
|
}
|
|
52723
|
-
if (path14.startsWith(
|
|
52730
|
+
if (path14.startsWith(API_BASE2)) {
|
|
52724
52731
|
const overrides = this.getFeatureFlagOverrides?.();
|
|
52725
52732
|
if (overrides)
|
|
52726
52733
|
headers["X-Prll-FF-Override"] = overrides;
|
|
@@ -53230,13 +53237,15 @@ var ParallClient = class _ParallClient extends ChannelConversationClient {
|
|
|
53230
53237
|
return this.request("POST", ENDPOINTS.DM(orgId), req);
|
|
53231
53238
|
}
|
|
53232
53239
|
/** Create the onboarding agent's DM and seed the intro message.
|
|
53233
|
-
*
|
|
53234
|
-
*
|
|
53240
|
+
* @deprecated The OnboardingPopup line that used this is gone; the
|
|
53241
|
+
* endpoint stays one Desktop release cycle for old bundles and is then
|
|
53242
|
+
* removed (docs/engineering-design/onboarding-wizard.md §7). */
|
|
53235
53243
|
async seedOnboardingDM(orgId) {
|
|
53236
53244
|
return this.request("POST", ENDPOINTS.SEED_ONBOARDING_DM(orgId));
|
|
53237
53245
|
}
|
|
53238
|
-
/**
|
|
53239
|
-
*
|
|
53246
|
+
/** Mark this member's onboarding for the org as dismissed. The wizard
|
|
53247
|
+
* entry gate treats it as "done", so a fresh org can be released from the
|
|
53248
|
+
* /onboarding redirect without walking the wizard (test setup). */
|
|
53240
53249
|
async dismissOnboarding(orgId) {
|
|
53241
53250
|
await this.request("POST", ENDPOINTS.DISMISS_ONBOARDING(orgId));
|
|
53242
53251
|
}
|
|
@@ -53885,8 +53894,11 @@ var ParallClient = class _ParallClient extends ChannelConversationClient {
|
|
|
53885
53894
|
return this.request("POST", ENDPOINTS.DISPATCH_COMPLETE_SOURCES(orgId), req);
|
|
53886
53895
|
}
|
|
53887
53896
|
/** Release a lane on graceful shutdown — members return to pending immediately. */
|
|
53888
|
-
async releaseDispatchLane(orgId, lane) {
|
|
53889
|
-
return this.request("POST", ENDPOINTS.DISPATCH_RELEASE(orgId), {
|
|
53897
|
+
async releaseDispatchLane(orgId, lane, reason) {
|
|
53898
|
+
return this.request("POST", ENDPOINTS.DISPATCH_RELEASE(orgId), {
|
|
53899
|
+
lane,
|
|
53900
|
+
...reason ? { reason } : {}
|
|
53901
|
+
});
|
|
53890
53902
|
}
|
|
53891
53903
|
/** Renew a live lane's lease (long-turn keepalive). 409 STALE_LANE when dethroned. */
|
|
53892
53904
|
async heartbeatDispatchLane(orgId, req) {
|
|
@@ -54622,8 +54634,8 @@ var ParallClient = class _ParallClient extends ChannelConversationClient {
|
|
|
54622
54634
|
* server-side via the `setup_intent.succeeded` webhook. Mirrors
|
|
54623
54635
|
* `POST /billing/setup-intent`.
|
|
54624
54636
|
*/
|
|
54625
|
-
async createSetupIntent(orgId) {
|
|
54626
|
-
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId));
|
|
54637
|
+
async createSetupIntent(orgId, req) {
|
|
54638
|
+
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId), req);
|
|
54627
54639
|
}
|
|
54628
54640
|
async getAutoReloadSettings(orgId) {
|
|
54629
54641
|
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId));
|
|
@@ -54848,37 +54860,25 @@ var ParallClient = class _ParallClient extends ChannelConversationClient {
|
|
|
54848
54860
|
async listEdgeDevices(orgId) {
|
|
54849
54861
|
return this.request("GET", ENDPOINTS.ORG_EDGE_DEVICES(orgId));
|
|
54850
54862
|
}
|
|
54851
|
-
/**
|
|
54852
|
-
*
|
|
54853
|
-
|
|
54854
|
-
|
|
54855
|
-
|
|
54856
|
-
* can create one (an agent gets `403 HOSTED_HUMAN_ONLY`), and only sign into it with
|
|
54857
|
-
* an account you are authorized and willing to share with the whole organization.
|
|
54858
|
-
* Creating one starts no pod and costs nothing.
|
|
54859
|
-
*/
|
|
54860
|
-
async registerEdgeDevice(orgId, input) {
|
|
54861
|
-
return this.request("POST", ENDPOINTS.ORG_EDGE(orgId), input);
|
|
54863
|
+
/** Register an Edge. `placement` defaults to BYOC; hosted creates an idle,
|
|
54864
|
+
* org-shared Cloud Profile and is restricted to human users. */
|
|
54865
|
+
async registerEdgeDevice(orgId, input, options) {
|
|
54866
|
+
const headers = options?.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : void 0;
|
|
54867
|
+
return this.request("POST", ENDPOINTS.ORG_EDGE(orgId), input, void 0, false, { headers });
|
|
54862
54868
|
}
|
|
54863
|
-
/**
|
|
54864
|
-
|
|
54865
|
-
|
|
54866
|
-
|
|
54867
|
-
|
|
54868
|
-
|
|
54869
|
-
|
|
54870
|
-
*
|
|
54871
|
-
*/
|
|
54869
|
+
/** Mint the short-lived, single-use ticket for one exact owned BYOC Edge. */
|
|
54870
|
+
async connectEdgeDevice(orgId, edgeId) {
|
|
54871
|
+
return this.request("POST", ENDPOINTS.ORG_EDGE_CONNECT(orgId), void 0, {
|
|
54872
|
+
edge_id: edgeId
|
|
54873
|
+
});
|
|
54874
|
+
}
|
|
54875
|
+
/** Idempotently begin deleting a hosted Cloud Profile; every repeat returns
|
|
54876
|
+
* `202 deleting` until the pod and stored browser state are finalized. */
|
|
54872
54877
|
async deleteEdgeDevice(orgId, edgeId) {
|
|
54873
54878
|
return this.request("DELETE", ENDPOINTS.ORG_EDGE_DEVICE(orgId, edgeId));
|
|
54874
54879
|
}
|
|
54875
|
-
/**
|
|
54876
|
-
*
|
|
54877
|
-
*
|
|
54878
|
-
* Synchronous and idempotent: a committed removal and a repeat after removal
|
|
54879
|
-
* both resolve with no response body. A live connection returns `EDGE_ONLINE`;
|
|
54880
|
-
* callers must not clear local device identity until this method resolves.
|
|
54881
|
-
*/
|
|
54880
|
+
/** Idempotently remove the human caller's own offline BYOC registration.
|
|
54881
|
+
* A live connection returns `EDGE_ONLINE`. */
|
|
54882
54882
|
async unregisterEdgeDevice(orgId, edgeId) {
|
|
54883
54883
|
await this.request("DELETE", ENDPOINTS.ORG_EDGE_DEVICE_UNREGISTER(orgId, edgeId));
|
|
54884
54884
|
}
|
|
@@ -55156,16 +55156,44 @@ var ParallClient = class _ParallClient extends ChannelConversationClient {
|
|
|
55156
55156
|
async listClipMCPConnections(orgId, clipId) {
|
|
55157
55157
|
return this.request("GET", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId));
|
|
55158
55158
|
}
|
|
55159
|
+
/** Create one MCP credential slot and its connection. */
|
|
55160
|
+
async createClipMCPConnection(orgId, clipId, req) {
|
|
55161
|
+
return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId), req, void 0, false, {
|
|
55162
|
+
timeoutMs: 4e4
|
|
55163
|
+
});
|
|
55164
|
+
}
|
|
55159
55165
|
/** Start a new Official OAuth MCP connection with the platform-owned app.
|
|
55160
55166
|
* Omitting oauth_client is load-bearing: the server resolves the exact
|
|
55161
55167
|
* reviewed-version binding and never falls back to DCR/CIMD cross-org. */
|
|
55162
|
-
async createClipMCPOAuthConnection(orgId, clipId, serverUrl, alias) {
|
|
55168
|
+
async createClipMCPOAuthConnection(orgId, clipId, serverUrl, alias, oauthClient) {
|
|
55163
55169
|
return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId), {
|
|
55164
55170
|
server_url: serverUrl,
|
|
55165
55171
|
auth_type: "oauth",
|
|
55166
|
-
...alias ? { alias } : {}
|
|
55172
|
+
...alias ? { alias } : {},
|
|
55173
|
+
...oauthClient ? { oauth_client: oauthClient } : {}
|
|
55167
55174
|
});
|
|
55168
55175
|
}
|
|
55176
|
+
/** Re-authorize an existing MCP credential slot. */
|
|
55177
|
+
async initiateClipMCPOAuthById(orgId, clipId, configId, serverUrl, expectedVersion, oauthClient) {
|
|
55178
|
+
const req = {
|
|
55179
|
+
server_url: serverUrl,
|
|
55180
|
+
auth_type: "oauth",
|
|
55181
|
+
...oauthClient ? { oauth_client: oauthClient } : {}
|
|
55182
|
+
};
|
|
55183
|
+
return this.request("PUT", ENDPOINTS.ORG_CLIP_MCP_CONFIG_BY_ID(orgId, clipId, configId), req, void 0, false, { headers: { "If-Match": `"${expectedVersion}"` }, timeoutMs: 4e4 });
|
|
55184
|
+
}
|
|
55185
|
+
/** Delete one MCP config and its paired connection. */
|
|
55186
|
+
async deleteClipMCPConfigById(orgId, clipId, configId, expectedVersion) {
|
|
55187
|
+
return this.request("DELETE", ENDPOINTS.ORG_CLIP_MCP_CONFIG_BY_ID(orgId, clipId, configId), void 0, void 0, false, { headers: { "If-Match": `"${expectedVersion}"` } });
|
|
55188
|
+
}
|
|
55189
|
+
/** Best-effort provider revocation plus local OAuth disconnect. */
|
|
55190
|
+
async disconnectClipMCPOAuthById(orgId, clipId, configId, expectedVersion) {
|
|
55191
|
+
return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_OAUTH_DISCONNECT_BY_ID(orgId, clipId, configId), void 0, void 0, false, { headers: { "If-Match": `"${expectedVersion}"` } });
|
|
55192
|
+
}
|
|
55193
|
+
/** Rename an MCP connection or promote it to default. */
|
|
55194
|
+
async updateClipMCPConnection(orgId, connectionId, req) {
|
|
55195
|
+
return this.request("PATCH", ENDPOINTS.CLIP_CONNECTION(orgId, connectionId), req);
|
|
55196
|
+
}
|
|
55169
55197
|
/**
|
|
55170
55198
|
* Re-run tools/list and replace the cached snapshot (org-admin only).
|
|
55171
55199
|
* Deliberately does NOT advance the CAS version, so an in-flight edit in
|
|
@@ -55251,6 +55279,20 @@ function buildApiError(res, rawErrorBody) {
|
|
|
55251
55279
|
}
|
|
55252
55280
|
|
|
55253
55281
|
// ts/sdk/dist/ws.js
|
|
55282
|
+
function describeWsStateDetail(detail) {
|
|
55283
|
+
if (!detail)
|
|
55284
|
+
return "";
|
|
55285
|
+
const parts = [`cause=${detail.cause}`];
|
|
55286
|
+
if (detail.code !== void 0)
|
|
55287
|
+
parts.push(`code=${detail.code}`);
|
|
55288
|
+
if (detail.reason)
|
|
55289
|
+
parts.push(`reason=${JSON.stringify(detail.reason)}`);
|
|
55290
|
+
if (detail.wasClean !== void 0)
|
|
55291
|
+
parts.push(`clean=${detail.wasClean}`);
|
|
55292
|
+
if (detail.attempt !== void 0)
|
|
55293
|
+
parts.push(`attempt=${detail.attempt}`);
|
|
55294
|
+
return ` (${parts.join(" ")})`;
|
|
55295
|
+
}
|
|
55254
55296
|
function isRetryableNetworkError(err) {
|
|
55255
55297
|
return err instanceof Error && err.name === "ApiError" && "status" in err && err.status === 0;
|
|
55256
55298
|
}
|
|
@@ -55298,9 +55340,9 @@ var ParallWs = class {
|
|
|
55298
55340
|
console.error("Failed to get WS ticket:", err);
|
|
55299
55341
|
}
|
|
55300
55342
|
if (this.options.reconnect) {
|
|
55301
|
-
this.scheduleReconnect();
|
|
55343
|
+
this.scheduleReconnect({ cause: "ticket_failed" });
|
|
55302
55344
|
} else {
|
|
55303
|
-
this.setState("disconnected");
|
|
55345
|
+
this.setState("disconnected", { cause: "ticket_failed" });
|
|
55304
55346
|
}
|
|
55305
55347
|
return;
|
|
55306
55348
|
}
|
|
@@ -55330,9 +55372,9 @@ var ParallWs = class {
|
|
|
55330
55372
|
if (ws !== this.ws)
|
|
55331
55373
|
return;
|
|
55332
55374
|
if (this.options.reconnect) {
|
|
55333
|
-
this.scheduleReconnect();
|
|
55375
|
+
this.scheduleReconnect({ cause: "connect_timeout" });
|
|
55334
55376
|
} else {
|
|
55335
|
-
this.setState("disconnected");
|
|
55377
|
+
this.setState("disconnected", { cause: "connect_timeout" });
|
|
55336
55378
|
}
|
|
55337
55379
|
}, 15e3);
|
|
55338
55380
|
this.ws.onopen = () => {
|
|
@@ -55348,18 +55390,24 @@ var ParallWs = class {
|
|
|
55348
55390
|
} catch {
|
|
55349
55391
|
}
|
|
55350
55392
|
};
|
|
55351
|
-
this.ws.onclose = () => {
|
|
55393
|
+
this.ws.onclose = (ev) => {
|
|
55352
55394
|
clearTimeout(connectTimeout);
|
|
55353
55395
|
this.stopHeartbeat();
|
|
55354
55396
|
this.clearProbe();
|
|
55397
|
+
const detail = {
|
|
55398
|
+
cause: this.intentionalClose ? "intentional" : "close",
|
|
55399
|
+
code: ev?.code,
|
|
55400
|
+
reason: ev?.reason,
|
|
55401
|
+
wasClean: ev?.wasClean
|
|
55402
|
+
};
|
|
55355
55403
|
if (this.intentionalClose) {
|
|
55356
|
-
this.setState("disconnected");
|
|
55404
|
+
this.setState("disconnected", detail);
|
|
55357
55405
|
return;
|
|
55358
55406
|
}
|
|
55359
55407
|
if (this.options.reconnect) {
|
|
55360
|
-
this.scheduleReconnect();
|
|
55408
|
+
this.scheduleReconnect(detail);
|
|
55361
55409
|
} else {
|
|
55362
|
-
this.setState("disconnected");
|
|
55410
|
+
this.setState("disconnected", detail);
|
|
55363
55411
|
}
|
|
55364
55412
|
};
|
|
55365
55413
|
this.ws.onerror = () => {
|
|
@@ -55375,7 +55423,7 @@ var ParallWs = class {
|
|
|
55375
55423
|
this.ws.close();
|
|
55376
55424
|
this.ws = null;
|
|
55377
55425
|
}
|
|
55378
|
-
this.setState("disconnected");
|
|
55426
|
+
this.setState("disconnected", { cause: "intentional" });
|
|
55379
55427
|
}
|
|
55380
55428
|
// ---- Client -> Server messages ----
|
|
55381
55429
|
/** Tell the server which chats the user is currently viewing (no auth implications). */
|
|
@@ -55463,8 +55511,8 @@ var ParallWs = class {
|
|
|
55463
55511
|
this.heartbeatTimer = null;
|
|
55464
55512
|
}
|
|
55465
55513
|
}
|
|
55466
|
-
scheduleReconnect() {
|
|
55467
|
-
this.setState("reconnecting");
|
|
55514
|
+
scheduleReconnect(detail) {
|
|
55515
|
+
this.setState("reconnecting", { ...detail, attempt: this.reconnectAttempts + 1 });
|
|
55468
55516
|
this.clearReconnect();
|
|
55469
55517
|
const base = Math.min(this.options.reconnectInterval * Math.pow(2, this.reconnectAttempts), this.options.maxReconnectInterval);
|
|
55470
55518
|
const delay = base * (0.5 + Math.random() * 0.5);
|
|
@@ -55480,7 +55528,7 @@ var ParallWs = class {
|
|
|
55480
55528
|
}
|
|
55481
55529
|
}
|
|
55482
55530
|
/** Force-close a dead/stale connection and trigger reconnect. */
|
|
55483
|
-
forceReconnect() {
|
|
55531
|
+
forceReconnect(cause) {
|
|
55484
55532
|
this.stopHeartbeat();
|
|
55485
55533
|
this.clearReconnect();
|
|
55486
55534
|
this.clearProbe();
|
|
@@ -55496,9 +55544,9 @@ var ParallWs = class {
|
|
|
55496
55544
|
this.ws = null;
|
|
55497
55545
|
}
|
|
55498
55546
|
if (this.options.reconnect && !this.intentionalClose) {
|
|
55499
|
-
this.scheduleReconnect();
|
|
55547
|
+
this.scheduleReconnect({ cause });
|
|
55500
55548
|
} else {
|
|
55501
|
-
this.setState("disconnected");
|
|
55549
|
+
this.setState("disconnected", { cause });
|
|
55502
55550
|
}
|
|
55503
55551
|
}
|
|
55504
55552
|
// ---- Browser event listeners for proactive reconnection ----
|
|
@@ -55534,7 +55582,7 @@ var ParallWs = class {
|
|
|
55534
55582
|
return;
|
|
55535
55583
|
this.send({ type: WS_EVENTS.PING, data: { ts: Date.now() } });
|
|
55536
55584
|
this.probeTimer = setTimeout(() => {
|
|
55537
|
-
this.forceReconnect();
|
|
55585
|
+
this.forceReconnect("probe_timeout");
|
|
55538
55586
|
}, 5e3);
|
|
55539
55587
|
}
|
|
55540
55588
|
clearProbe() {
|
|
@@ -55549,7 +55597,7 @@ var ParallWs = class {
|
|
|
55549
55597
|
return;
|
|
55550
55598
|
if (this._state === "connected") {
|
|
55551
55599
|
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
55552
|
-
this.forceReconnect();
|
|
55600
|
+
this.forceReconnect("zombie_socket");
|
|
55553
55601
|
} else {
|
|
55554
55602
|
this.probeConnection();
|
|
55555
55603
|
}
|
|
@@ -55565,7 +55613,7 @@ var ParallWs = class {
|
|
|
55565
55613
|
return;
|
|
55566
55614
|
if (this._state === "connected") {
|
|
55567
55615
|
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
55568
|
-
this.forceReconnect();
|
|
55616
|
+
this.forceReconnect("zombie_socket");
|
|
55569
55617
|
} else {
|
|
55570
55618
|
this.probeConnection();
|
|
55571
55619
|
}
|
|
@@ -55575,10 +55623,10 @@ var ParallWs = class {
|
|
|
55575
55623
|
this.connect();
|
|
55576
55624
|
}
|
|
55577
55625
|
};
|
|
55578
|
-
setState(state) {
|
|
55626
|
+
setState(state, detail) {
|
|
55579
55627
|
this._state = state;
|
|
55580
55628
|
for (const listener of this.stateListeners) {
|
|
55581
|
-
listener(state);
|
|
55629
|
+
listener(state, detail);
|
|
55582
55630
|
}
|
|
55583
55631
|
}
|
|
55584
55632
|
};
|
|
@@ -55889,7 +55937,7 @@ ${frame}` : frame;
|
|
|
55889
55937
|
return null;
|
|
55890
55938
|
}
|
|
55891
55939
|
this.opts.log?.warn(`steer fold failed for ${ev.messageId} \u2014 failing closed, releasing lane: ${String(err)}`);
|
|
55892
|
-
await this.release(laneKey);
|
|
55940
|
+
await this.release(laneKey, "steer_failed");
|
|
55893
55941
|
return null;
|
|
55894
55942
|
}
|
|
55895
55943
|
}
|
|
@@ -56130,22 +56178,22 @@ ${frame}` : frame;
|
|
|
56130
56178
|
* shutdown) so the next pod re-claims immediately instead of waiting out
|
|
56131
56179
|
* the lease.
|
|
56132
56180
|
*/
|
|
56133
|
-
async release(laneKey) {
|
|
56181
|
+
async release(laneKey, reason = "unspecified") {
|
|
56134
56182
|
const lane = this.lanes.get(laneKey);
|
|
56135
56183
|
if (!lane)
|
|
56136
56184
|
return;
|
|
56137
56185
|
this.lanes.delete(laneKey);
|
|
56138
56186
|
this.removeLaneContext(lane);
|
|
56139
56187
|
try {
|
|
56140
|
-
await this.opts.client.releaseDispatchLane(this.opts.orgId, lane.lane);
|
|
56188
|
+
await this.opts.client.releaseDispatchLane(this.opts.orgId, lane.lane, reason);
|
|
56141
56189
|
} catch (err) {
|
|
56142
|
-
this.opts.log?.warn(`lane release failed for ${lane.targetUri}: ${String(err)}`);
|
|
56190
|
+
this.opts.log?.warn(`lane release (${reason}) failed for ${lane.targetUri}: ${String(err)}`);
|
|
56143
56191
|
}
|
|
56144
56192
|
}
|
|
56145
|
-
async releaseAll() {
|
|
56193
|
+
async releaseAll(reason = "shutdown") {
|
|
56146
56194
|
const keys = [...this.lanes.keys()];
|
|
56147
56195
|
for (const key of keys) {
|
|
56148
|
-
await this.release(key);
|
|
56196
|
+
await this.release(key, reason);
|
|
56149
56197
|
}
|
|
56150
56198
|
}
|
|
56151
56199
|
/** True when any lane is currently active (used by shutdown logging). */
|
|
@@ -56322,7 +56370,7 @@ async function dispatchLaneGroup(host, opts) {
|
|
|
56322
56370
|
host.opts.log?.warn(`lane group for ${event.messageId} claimed without a frame \u2014 releasing the members instead of running`);
|
|
56323
56371
|
for (const ev of opts.events)
|
|
56324
56372
|
host.dispatchedMessages.delete(ev.messageId);
|
|
56325
|
-
await ledger.release(lane.laneKey).catch(() => {
|
|
56373
|
+
await ledger.release(lane.laneKey, "claim_without_frame").catch(() => {
|
|
56326
56374
|
});
|
|
56327
56375
|
return "foreign";
|
|
56328
56376
|
}
|
|
@@ -56338,7 +56386,7 @@ async function dispatchLaneGroup(host, opts) {
|
|
|
56338
56386
|
dispatched = await host.runDispatch(event, opts.sessionKey, opts.bodyPrefix + eventBody(event), opts.earlier, opts.captureText, inputLifecycle);
|
|
56339
56387
|
} catch (err) {
|
|
56340
56388
|
host.noteSessionLane(opts.sessionKey, null);
|
|
56341
|
-
await ledger.release(lane.laneKey).catch(() => {
|
|
56389
|
+
await ledger.release(lane.laneKey, "runtime_error").catch(() => {
|
|
56342
56390
|
});
|
|
56343
56391
|
throw err;
|
|
56344
56392
|
} finally {
|
|
@@ -56991,9 +57039,39 @@ function recordTurnUsage(usage, runtimeType) {
|
|
|
56991
57039
|
turnCostCounter?.add(usage.costUsd, { runtime_type: runtimeType });
|
|
56992
57040
|
}
|
|
56993
57041
|
}
|
|
56994
|
-
var
|
|
56995
|
-
function
|
|
56996
|
-
return
|
|
57042
|
+
var dispatchContextStorage = new AsyncLocalStorage();
|
|
57043
|
+
function runWithDispatchContext(ctx, fn) {
|
|
57044
|
+
return dispatchContextStorage.run({ ...ctx }, fn);
|
|
57045
|
+
}
|
|
57046
|
+
function patchDispatchContext(patch) {
|
|
57047
|
+
const store = dispatchContextStorage.getStore();
|
|
57048
|
+
if (store)
|
|
57049
|
+
Object.assign(store, patch);
|
|
57050
|
+
}
|
|
57051
|
+
function dispatchLogAttributes() {
|
|
57052
|
+
const store = dispatchContextStorage.getStore();
|
|
57053
|
+
if (!store)
|
|
57054
|
+
return {};
|
|
57055
|
+
const attrs = { "session.key": store.sessionKey };
|
|
57056
|
+
const set = (key, value) => {
|
|
57057
|
+
if (value)
|
|
57058
|
+
attrs[key] = value;
|
|
57059
|
+
};
|
|
57060
|
+
set("dispatch.event_id", store.dispatchEventId);
|
|
57061
|
+
set("dispatch.lane", store.lane);
|
|
57062
|
+
set("dispatch.target_uri", store.targetUri);
|
|
57063
|
+
set("dispatch.message_id", store.messageId);
|
|
57064
|
+
set("dispatch.thread_root_id", store.threadRootId);
|
|
57065
|
+
set("dispatch.event_type", store.eventType);
|
|
57066
|
+
return attrs;
|
|
57067
|
+
}
|
|
57068
|
+
function withActiveSpan(span, fn) {
|
|
57069
|
+
if (!span)
|
|
57070
|
+
return fn();
|
|
57071
|
+
return context.with(trace.setSpan(context.active(), span), fn);
|
|
57072
|
+
}
|
|
57073
|
+
function runInDispatchScope(span, ctx, fn) {
|
|
57074
|
+
return withActiveSpan(span, () => runWithDispatchContext(ctx, fn));
|
|
56997
57075
|
}
|
|
56998
57076
|
function createOtelLogger(layer, prefix) {
|
|
56999
57077
|
const ts = () => (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -57001,10 +57079,11 @@ function createOtelLogger(layer, prefix) {
|
|
|
57001
57079
|
if (!otelLogger)
|
|
57002
57080
|
return;
|
|
57003
57081
|
const severityNumber = severity === "ERROR" ? import_api_logs.SeverityNumber.ERROR : severity === "WARN" ? import_api_logs.SeverityNumber.WARN : import_api_logs.SeverityNumber.INFO;
|
|
57004
|
-
const attrs = {
|
|
57005
|
-
|
|
57006
|
-
|
|
57007
|
-
|
|
57082
|
+
const attrs = {
|
|
57083
|
+
"log.layer": layer,
|
|
57084
|
+
"log.prefix": prefix,
|
|
57085
|
+
...dispatchLogAttributes()
|
|
57086
|
+
};
|
|
57008
57087
|
otelLogger.emit({
|
|
57009
57088
|
severityNumber,
|
|
57010
57089
|
severityText: severity,
|
|
@@ -58425,8 +58504,8 @@ var ParallAgentGateway = class {
|
|
|
58425
58504
|
}
|
|
58426
58505
|
async run(abortSignal) {
|
|
58427
58506
|
const { ws, log: log2 } = this.opts;
|
|
58428
|
-
ws.onStateChange((state) => {
|
|
58429
|
-
log2?.info(`connection state \u2192 ${state}`);
|
|
58507
|
+
ws.onStateChange((state, detail) => {
|
|
58508
|
+
log2?.info(`connection state \u2192 ${state}${describeWsStateDetail(detail)}`);
|
|
58430
58509
|
});
|
|
58431
58510
|
ws.on("hello", async (data) => {
|
|
58432
58511
|
await this.handleHello(data);
|
|
@@ -58860,8 +58939,15 @@ var ParallAgentGateway = class {
|
|
|
58860
58939
|
}
|
|
58861
58940
|
resetDispatchMetrics(sessionKey);
|
|
58862
58941
|
this.turnOutcomes.delete(sessionKey);
|
|
58863
|
-
|
|
58864
|
-
|
|
58942
|
+
const dispatchSpan = startDispatchSpan(event, this.opts.runtimeType, sessionKey);
|
|
58943
|
+
const logContext = {
|
|
58944
|
+
sessionKey,
|
|
58945
|
+
messageId: event.messageId,
|
|
58946
|
+
eventType: event.type,
|
|
58947
|
+
dispatchEventId: event.dispatchEventId ?? null,
|
|
58948
|
+
threadRootId: event.threadRootId ?? null
|
|
58949
|
+
};
|
|
58950
|
+
return runInDispatchScope(dispatchSpan, logContext, async () => {
|
|
58865
58951
|
setSessionChatId(sessionKey, event.targetId);
|
|
58866
58952
|
setSessionMessageId(sessionKey, event.messageId);
|
|
58867
58953
|
setDispatchMessageId(sessionKey, event.messageId);
|
|
@@ -58892,6 +58978,12 @@ var ParallAgentGateway = class {
|
|
|
58892
58978
|
if (laneContextFilePath2) {
|
|
58893
58979
|
this.writeContextFile(laneContextFilePath2, contextBody);
|
|
58894
58980
|
}
|
|
58981
|
+
patchDispatchContext({
|
|
58982
|
+
dispatchEventId: contextBody.dispatch_event_id,
|
|
58983
|
+
lane: contextBody.lane,
|
|
58984
|
+
targetUri: contextBody.target_uri,
|
|
58985
|
+
threadRootId: contextBody.thread_root_id
|
|
58986
|
+
});
|
|
58895
58987
|
this.inFlightDispatches++;
|
|
58896
58988
|
const dispatchDeadline = this.dispatchInactivityDeadlines.start(sessionKey, this.DISPATCH_DEADLINE_MS, () => {
|
|
58897
58989
|
this.opts.log?.warn(`dispatch inactivity deadline exceeded (${this.DISPATCH_DEADLINE_MS}ms) for ${event.messageId} on ${sessionKey}; aborting`);
|
|
@@ -58914,7 +59006,6 @@ var ParallAgentGateway = class {
|
|
|
58914
59006
|
turnHandle = await this.sessionLifecycle.beginTurn(binding.agentSessionId, event.messageId);
|
|
58915
59007
|
};
|
|
58916
59008
|
try {
|
|
58917
|
-
dispatchSpan = startDispatchSpan(event, this.opts.runtimeType, sessionKey);
|
|
58918
59009
|
for await (const runtimeEvent of this.opts.dispatchAdapter.dispatch({
|
|
58919
59010
|
event,
|
|
58920
59011
|
earlierEvents,
|
|
@@ -58961,7 +59052,7 @@ var ParallAgentGateway = class {
|
|
|
58961
59052
|
...outcomeEvent.retryAt ? { retryAt: outcomeEvent.retryAt } : {}
|
|
58962
59053
|
} : { kind: "error", outcomeClass: outcomeEvent.outcome });
|
|
58963
59054
|
const failure = describeTurnOutcomeFailure(outcomeEvent);
|
|
58964
|
-
this.opts.log?.warn(`turn outcome: ${failure.warn}`);
|
|
59055
|
+
this.opts.log?.warn(`turn outcome: ${failure.warn} (dispatch=${contextBody.dispatch_event_id ?? "-"} lane=${contextBody.lane ?? "-"})`);
|
|
58965
59056
|
if (binding) {
|
|
58966
59057
|
await ensureTurnBegun();
|
|
58967
59058
|
if (!inputStepsCreated) {
|
|
@@ -59638,7 +59729,7 @@ var ParallAgentGateway = class {
|
|
|
59638
59729
|
dispatchEventId: item.id
|
|
59639
59730
|
};
|
|
59640
59731
|
applyWake(event, wake);
|
|
59641
|
-
this.opts.log?.info(`${String(item.event_type)} ${item.source_id} \u2192 ${targetId}`);
|
|
59732
|
+
this.opts.log?.info(`${String(item.event_type)} ${item.source_id} \u2192 ${targetId} (dispatch=${item.id})`);
|
|
59642
59733
|
return this.handleInboundEvent(event);
|
|
59643
59734
|
}
|
|
59644
59735
|
async catchUpFromDispatch() {
|