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