@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
package/bundle/parall-daemon.js
CHANGED
|
@@ -222,6 +222,27 @@ var init_attachment_endpoints = __esm({
|
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
|
|
225
|
+
// ts/sdk/dist/edge-endpoints.js
|
|
226
|
+
var API_BASE, edgeEndpoints;
|
|
227
|
+
var init_edge_endpoints = __esm({
|
|
228
|
+
"ts/sdk/dist/edge-endpoints.js"() {
|
|
229
|
+
"use strict";
|
|
230
|
+
API_BASE = "/api/v1";
|
|
231
|
+
edgeEndpoints = {
|
|
232
|
+
ORG_EDGE: (orgId) => `${API_BASE}/orgs/${orgId}/edge`,
|
|
233
|
+
ORG_EDGE_CONNECT: (orgId) => `${API_BASE}/orgs/${orgId}/edge/connect`,
|
|
234
|
+
ORG_EDGE_DEVICES: (orgId) => `${API_BASE}/orgs/${orgId}/edge/devices`,
|
|
235
|
+
ORG_EDGE_DEVICE: (orgId, edgeId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}`,
|
|
236
|
+
ORG_EDGE_DEVICE_UNREGISTER: (orgId, edgeId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/unregister`,
|
|
237
|
+
ORG_EDGE_ONBOARDING: (orgId) => `${API_BASE}/orgs/${orgId}/edge/onboarding`,
|
|
238
|
+
ORG_EDGE_PROFILES: (orgId, edgeId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/profiles`,
|
|
239
|
+
ORG_EDGE_PROFILE_OPERATIONS: (orgId, edgeId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/profile-operations`,
|
|
240
|
+
ORG_EDGE_PROFILE_OPERATION: (orgId, edgeId, operationId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}`,
|
|
241
|
+
ORG_EDGE_PROFILE_OPERATION_CONFIRM: (orgId, edgeId, operationId) => `${API_BASE}/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}/confirm`
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
|
|
225
246
|
// ts/sdk/dist/wechat-endpoints.js
|
|
226
247
|
function wechatEndpoints(apiBase) {
|
|
227
248
|
const agentBase = (orgId) => `${apiBase}/orgs/${orgId}/agents/me/wechat`;
|
|
@@ -240,51 +261,52 @@ var init_wechat_endpoints = __esm({
|
|
|
240
261
|
});
|
|
241
262
|
|
|
242
263
|
// ts/sdk/dist/constants.js
|
|
243
|
-
var
|
|
264
|
+
var API_BASE2, WIKI_BASE, CLIP_BASE, ENDPOINTS, WS_EVENTS;
|
|
244
265
|
var init_constants = __esm({
|
|
245
266
|
"ts/sdk/dist/constants.js"() {
|
|
246
267
|
"use strict";
|
|
247
268
|
init_attachment_endpoints();
|
|
269
|
+
init_edge_endpoints();
|
|
248
270
|
init_wechat_endpoints();
|
|
249
|
-
|
|
271
|
+
API_BASE2 = "/api/v1";
|
|
250
272
|
WIKI_BASE = "/wiki/v1";
|
|
251
273
|
CLIP_BASE = "/clip/v1";
|
|
252
274
|
ENDPOINTS = {
|
|
253
275
|
// Auth
|
|
254
|
-
AUTH_REGISTER: `${
|
|
255
|
-
AUTH_LOGIN: `${
|
|
256
|
-
AUTH_REFRESH: `${
|
|
257
|
-
AUTH_LOGOUT: `${
|
|
258
|
-
AUTH_CHANGE_PASSWORD: `${
|
|
259
|
-
AUTH_CHECK_EMAIL: `${
|
|
260
|
-
AUTH_VERIFY_EMAIL: `${
|
|
261
|
-
AUTH_RESEND_CODE: `${
|
|
262
|
-
AUTH_FORGOT_PASSWORD: `${
|
|
263
|
-
AUTH_RESET_PASSWORD: `${
|
|
264
|
-
AUTH_OAUTH_EXCHANGE: `${
|
|
276
|
+
AUTH_REGISTER: `${API_BASE2}/auth/register`,
|
|
277
|
+
AUTH_LOGIN: `${API_BASE2}/auth/login`,
|
|
278
|
+
AUTH_REFRESH: `${API_BASE2}/auth/refresh`,
|
|
279
|
+
AUTH_LOGOUT: `${API_BASE2}/auth/logout`,
|
|
280
|
+
AUTH_CHANGE_PASSWORD: `${API_BASE2}/auth/change-password`,
|
|
281
|
+
AUTH_CHECK_EMAIL: `${API_BASE2}/auth/check-email`,
|
|
282
|
+
AUTH_VERIFY_EMAIL: `${API_BASE2}/auth/verify-email`,
|
|
283
|
+
AUTH_RESEND_CODE: `${API_BASE2}/auth/resend-code`,
|
|
284
|
+
AUTH_FORGOT_PASSWORD: `${API_BASE2}/auth/forgot-password`,
|
|
285
|
+
AUTH_RESET_PASSWORD: `${API_BASE2}/auth/reset-password`,
|
|
286
|
+
AUTH_OAUTH_EXCHANGE: `${API_BASE2}/auth/oauth/exchange`,
|
|
265
287
|
// Users
|
|
266
|
-
USERS_ME: `${
|
|
267
|
-
USER_AVATAR: `${
|
|
268
|
-
PERSONAL_API_KEYS: `${
|
|
269
|
-
PERSONAL_API_KEY: (keyId) => `${
|
|
270
|
-
USER: (id) => `${
|
|
288
|
+
USERS_ME: `${API_BASE2}/users/me`,
|
|
289
|
+
USER_AVATAR: `${API_BASE2}/users/me/avatar`,
|
|
290
|
+
PERSONAL_API_KEYS: `${API_BASE2}/users/me/api-keys`,
|
|
291
|
+
PERSONAL_API_KEY: (keyId) => `${API_BASE2}/users/me/api-keys/${keyId}`,
|
|
292
|
+
USER: (id) => `${API_BASE2}/users/${id}`,
|
|
271
293
|
// WebSocket ticket
|
|
272
|
-
WS_TICKET: `${
|
|
294
|
+
WS_TICKET: `${API_BASE2}/ws/ticket`,
|
|
273
295
|
// Organizations (global)
|
|
274
|
-
ORGS: `${
|
|
296
|
+
ORGS: `${API_BASE2}/orgs`,
|
|
275
297
|
// Org-scoped
|
|
276
|
-
ORG: (orgId) => `${
|
|
277
|
-
ORG_MEMBERS: (orgId) => `${
|
|
278
|
-
ORG_MEMBERS_FORMER: (orgId) => `${
|
|
279
|
-
TEAMS: (orgId) => `${
|
|
280
|
-
TEAM: (orgId, teamId) => `${
|
|
281
|
-
TEAM_MEMBERS: (orgId, teamId) => `${
|
|
282
|
-
TEAM_MEMBER: (orgId, teamId, userId) => `${
|
|
283
|
-
ORG_MEMBERS_ONLINE: (orgId) => `${
|
|
284
|
-
LLM_PROVIDERS: (orgId) => `${
|
|
285
|
-
LLM_PROVIDER: (orgId, providerId) => `${
|
|
286
|
-
ORG_LLM_MODELS: (orgId) => `${
|
|
287
|
-
ORG_LLM_MODEL: (orgId, modelRowId) => `${
|
|
298
|
+
ORG: (orgId) => `${API_BASE2}/orgs/${orgId}`,
|
|
299
|
+
ORG_MEMBERS: (orgId) => `${API_BASE2}/orgs/${orgId}/members`,
|
|
300
|
+
ORG_MEMBERS_FORMER: (orgId) => `${API_BASE2}/orgs/${orgId}/members/former`,
|
|
301
|
+
TEAMS: (orgId) => `${API_BASE2}/orgs/${orgId}/teams`,
|
|
302
|
+
TEAM: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}`,
|
|
303
|
+
TEAM_MEMBERS: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members`,
|
|
304
|
+
TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
305
|
+
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE2}/orgs/${orgId}/members/online`,
|
|
306
|
+
LLM_PROVIDERS: (orgId) => `${API_BASE2}/orgs/${orgId}/llm-providers`,
|
|
307
|
+
LLM_PROVIDER: (orgId, providerId) => `${API_BASE2}/orgs/${orgId}/llm-providers/${providerId}`,
|
|
308
|
+
ORG_LLM_MODELS: (orgId) => `${API_BASE2}/orgs/${orgId}/llm-models`,
|
|
309
|
+
ORG_LLM_MODEL: (orgId, modelRowId) => `${API_BASE2}/orgs/${orgId}/llm-models/${modelRowId}`,
|
|
288
310
|
/**
|
|
289
311
|
* Platform catalog merged with this org's own model rows. Pass `runtime` to
|
|
290
312
|
* filter org-added models to the ones that runtime can actually reach —
|
|
@@ -297,226 +319,226 @@ var init_constants = __esm({
|
|
|
297
319
|
if (includeModel)
|
|
298
320
|
params.set("include_model", includeModel);
|
|
299
321
|
const qs = params.toString();
|
|
300
|
-
return `${
|
|
322
|
+
return `${API_BASE2}/orgs/${orgId}/models${qs ? `?${qs}` : ""}`;
|
|
301
323
|
},
|
|
302
|
-
ORG_MEMBER: (orgId, userId) => `${
|
|
303
|
-
ORG_MEMBER_CHATS: (orgId, memberId) => `${
|
|
304
|
-
ORG_MEMBER_TASKS: (orgId, memberId) => `${
|
|
324
|
+
ORG_MEMBER: (orgId, userId) => `${API_BASE2}/orgs/${orgId}/members/${userId}`,
|
|
325
|
+
ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE2}/orgs/${orgId}/members/${memberId}/chats`,
|
|
326
|
+
ORG_MEMBER_TASKS: (orgId, memberId) => `${API_BASE2}/orgs/${orgId}/members/${memberId}/tasks`,
|
|
305
327
|
// Org-scoped public profile (title / description). GET readable by every
|
|
306
328
|
// active member; PATCH is CAS-guarded (expected_version).
|
|
307
|
-
ORG_MEMBER_PROFILE: (orgId, userId) => `${
|
|
329
|
+
ORG_MEMBER_PROFILE: (orgId, userId) => `${API_BASE2}/orgs/${orgId}/members/${userId}/profile`,
|
|
308
330
|
// Private agent Instructions — visibility gated server-side
|
|
309
331
|
// (agent self + Human org admin/owner + the agent's manager). Never cached.
|
|
310
|
-
AGENT_INSTRUCTIONS: (orgId, agentId) => `${
|
|
332
|
+
AGENT_INSTRUCTIONS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/instructions`,
|
|
311
333
|
// Agent manager (agent-global relation, org-scoped authorization).
|
|
312
334
|
// PATCH covers assign / transfer / renounce (manager_user_id null).
|
|
313
|
-
AGENT_MANAGER: (orgId, agentId) => `${
|
|
314
|
-
REF_SEARCH: (orgId) => `${
|
|
335
|
+
AGENT_MANAGER: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/manager`,
|
|
336
|
+
REF_SEARCH: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/search`,
|
|
315
337
|
// Direct messages (org-scoped, atomic find-or-create + send)
|
|
316
|
-
DM: (orgId) => `${
|
|
338
|
+
DM: (orgId) => `${API_BASE2}/orgs/${orgId}/dm`,
|
|
317
339
|
// Onboarding
|
|
318
|
-
SEED_ONBOARDING_DM: (orgId) => `${
|
|
319
|
-
DISMISS_ONBOARDING: (orgId) => `${
|
|
340
|
+
SEED_ONBOARDING_DM: (orgId) => `${API_BASE2}/orgs/${orgId}/seed-onboarding-dm`,
|
|
341
|
+
DISMISS_ONBOARDING: (orgId) => `${API_BASE2}/orgs/${orgId}/dismiss-onboarding`,
|
|
320
342
|
// Chats (org-scoped)
|
|
321
|
-
CHATS: (orgId) => `${
|
|
322
|
-
CHATS_DISCOVERABLE: (orgId) => `${
|
|
323
|
-
CHAT: (orgId, chatId) => `${
|
|
324
|
-
CHAT_JOIN: (orgId, chatId) => `${
|
|
325
|
-
CHAT_ARCHIVE: (orgId, chatId) => `${
|
|
326
|
-
CHAT_RESTORE: (orgId, chatId) => `${
|
|
327
|
-
CHAT_MEMBERS: (orgId, chatId) => `${
|
|
328
|
-
CHAT_MEMBER: (orgId, chatId, userId) => `${
|
|
329
|
-
CHAT_TRANSFER_OWNERSHIP: (orgId, chatId) => `${
|
|
330
|
-
CHAT_MESSAGES: (orgId, chatId) => `${
|
|
343
|
+
CHATS: (orgId) => `${API_BASE2}/orgs/${orgId}/chats`,
|
|
344
|
+
CHATS_DISCOVERABLE: (orgId) => `${API_BASE2}/orgs/${orgId}/chats/discoverable`,
|
|
345
|
+
CHAT: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}`,
|
|
346
|
+
CHAT_JOIN: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/join`,
|
|
347
|
+
CHAT_ARCHIVE: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/archive`,
|
|
348
|
+
CHAT_RESTORE: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/restore`,
|
|
349
|
+
CHAT_MEMBERS: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/members`,
|
|
350
|
+
CHAT_MEMBER: (orgId, chatId, userId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/members/${userId}`,
|
|
351
|
+
CHAT_TRANSFER_OWNERSHIP: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/transfer-ownership`,
|
|
352
|
+
CHAT_MESSAGES: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/messages`,
|
|
331
353
|
// Messages (global, by message ID)
|
|
332
|
-
MESSAGE: (id) => `${
|
|
333
|
-
MESSAGE_REPLIES: (id) => `${
|
|
334
|
-
MESSAGE_WATCH: (id) => `${
|
|
335
|
-
MESSAGE_WATCHERS: (id) => `${
|
|
336
|
-
MESSAGE_WATCHING: (id) => `${
|
|
354
|
+
MESSAGE: (id) => `${API_BASE2}/messages/${id}`,
|
|
355
|
+
MESSAGE_REPLIES: (id) => `${API_BASE2}/messages/${id}/replies`,
|
|
356
|
+
MESSAGE_WATCH: (id) => `${API_BASE2}/messages/${id}/watch`,
|
|
357
|
+
MESSAGE_WATCHERS: (id) => `${API_BASE2}/messages/${id}/watchers`,
|
|
358
|
+
MESSAGE_WATCHING: (id) => `${API_BASE2}/messages/${id}/watching`,
|
|
337
359
|
/** Caller's attention levels across chats / threads / tasks. */
|
|
338
|
-
WATCHES: (orgId) => `${
|
|
339
|
-
MESSAGE_REACTIONS: (id) => `${
|
|
340
|
-
MESSAGE_REACTION: (id, emoji) => `${
|
|
360
|
+
WATCHES: (orgId) => `${API_BASE2}/orgs/${orgId}/watches`,
|
|
361
|
+
MESSAGE_REACTIONS: (id) => `${API_BASE2}/messages/${id}/reactions`,
|
|
362
|
+
MESSAGE_REACTION: (id, emoji) => `${API_BASE2}/messages/${id}/reactions/${encodeURIComponent(emoji)}`,
|
|
341
363
|
// Upload (org-scoped)
|
|
342
|
-
...attachmentEndpoints(
|
|
364
|
+
...attachmentEndpoints(API_BASE2),
|
|
343
365
|
// Approval requests (org-scoped)
|
|
344
|
-
APPROVAL_REQUESTS: (orgId) => `${
|
|
366
|
+
APPROVAL_REQUESTS: (orgId) => `${API_BASE2}/orgs/${orgId}/approval-requests`,
|
|
345
367
|
// Approvals (global)
|
|
346
|
-
APPROVAL: (id) => `${
|
|
347
|
-
APPROVAL_DECIDE: (id) => `${
|
|
348
|
-
APPROVAL_CANCEL: (id) => `${
|
|
349
|
-
APPROVALS_PENDING: `${
|
|
350
|
-
APPROVALS_ACTIONS: `${
|
|
368
|
+
APPROVAL: (id) => `${API_BASE2}/approvals/${id}`,
|
|
369
|
+
APPROVAL_DECIDE: (id) => `${API_BASE2}/approvals/${id}/decide`,
|
|
370
|
+
APPROVAL_CANCEL: (id) => `${API_BASE2}/approvals/${id}/cancel`,
|
|
371
|
+
APPROVALS_PENDING: `${API_BASE2}/approvals/pending`,
|
|
372
|
+
APPROVALS_ACTIONS: `${API_BASE2}/approvals/actions`,
|
|
351
373
|
// Agents (org-scoped)
|
|
352
|
-
AGENTS: (orgId) => `${
|
|
353
|
-
AGENT: (orgId, agentId) => `${
|
|
354
|
-
AGENT_API_KEYS: (orgId, agentId) => `${
|
|
355
|
-
AGENT_API_KEY: (orgId, agentId, key) => `${
|
|
356
|
-
AGENT_API_KEY_REGENERATE: (orgId, agentId) => `${
|
|
357
|
-
AGENT_AVATAR: (orgId, agentId) => `${
|
|
358
|
-
AGENT_ACTIVITY: (orgId, agentId) => `${
|
|
359
|
-
AGENT_MONITOR: (orgId, agentId) => `${
|
|
360
|
-
AGENT_ME: (orgId) => `${
|
|
361
|
-
AGENT_REPLY_POLICY_CAPABILITY: (orgId) => `${
|
|
362
|
-
AGENT_NEW_SESSION: (orgId, agentId) => `${
|
|
363
|
-
AGENT_DEEP_RESET: (orgId, agentId) => `${
|
|
364
|
-
AGENT_SESSIONS: (orgId, agentId) => `${
|
|
365
|
-
AGENT_SESSION: (orgId, agentId, sessionId) => `${
|
|
366
|
-
AGENT_SESSION_STEPS: (orgId, agentId, sessionId) => `${
|
|
367
|
-
AGENT_SESSION_STEP: (orgId, agentId, sessionId, stepId) => `${
|
|
368
|
-
AGENT_STEP_BY_ID: (orgId, stepId) => `${
|
|
369
|
-
AGENT_TASKS: (orgId, agentId) => `${
|
|
370
|
-
AGENT_RUNTIME_AUTH: (orgId, agentId) => `${
|
|
371
|
-
AGENT_RUNTIME_AUTH_SESSIONS: (orgId, agentId) => `${
|
|
372
|
-
AGENT_RUNTIME_AUTH_SESSION_COMPLETE: (orgId, agentId, sessionId) => `${
|
|
373
|
-
AGENT_RUNTIME: (orgId, agentId) => `${
|
|
374
|
-
AGENT_RUNTIME_UPGRADE: (orgId, agentId) => `${
|
|
375
|
-
AGENT_RUNTIME_AVAILABLE_TAGS: (orgId, agentId) => `${
|
|
376
|
-
AGENT_RUNTIME_RELEASE: (orgId, agentId, tag) => `${
|
|
377
|
-
AGENT_PROVIDER_CONFIG: (orgId, agentId) => `${
|
|
374
|
+
AGENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents`,
|
|
375
|
+
AGENT: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}`,
|
|
376
|
+
AGENT_API_KEYS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/api-keys`,
|
|
377
|
+
AGENT_API_KEY: (orgId, agentId, key) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/api-keys/${key}`,
|
|
378
|
+
AGENT_API_KEY_REGENERATE: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/api-keys/regenerate`,
|
|
379
|
+
AGENT_AVATAR: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/avatar`,
|
|
380
|
+
AGENT_ACTIVITY: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/activity`,
|
|
381
|
+
AGENT_MONITOR: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/monitor`,
|
|
382
|
+
AGENT_ME: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me`,
|
|
383
|
+
AGENT_REPLY_POLICY_CAPABILITY: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/reply-policy-capability`,
|
|
384
|
+
AGENT_NEW_SESSION: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/new-session`,
|
|
385
|
+
AGENT_DEEP_RESET: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/deep-reset`,
|
|
386
|
+
AGENT_SESSIONS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions`,
|
|
387
|
+
AGENT_SESSION: (orgId, agentId, sessionId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions/${sessionId}`,
|
|
388
|
+
AGENT_SESSION_STEPS: (orgId, agentId, sessionId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions/${sessionId}/steps`,
|
|
389
|
+
AGENT_SESSION_STEP: (orgId, agentId, sessionId, stepId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/sessions/${sessionId}/steps/${stepId}`,
|
|
390
|
+
AGENT_STEP_BY_ID: (orgId, stepId) => `${API_BASE2}/orgs/${orgId}/agent-steps/${stepId}`,
|
|
391
|
+
AGENT_TASKS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/tasks`,
|
|
392
|
+
AGENT_RUNTIME_AUTH: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime-auth`,
|
|
393
|
+
AGENT_RUNTIME_AUTH_SESSIONS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime-auth-sessions`,
|
|
394
|
+
AGENT_RUNTIME_AUTH_SESSION_COMPLETE: (orgId, agentId, sessionId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime-auth-sessions/${sessionId}/complete`,
|
|
395
|
+
AGENT_RUNTIME: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime`,
|
|
396
|
+
AGENT_RUNTIME_UPGRADE: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime/upgrade`,
|
|
397
|
+
AGENT_RUNTIME_AVAILABLE_TAGS: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime/available-tags`,
|
|
398
|
+
AGENT_RUNTIME_RELEASE: (orgId, agentId, tag) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/runtime/releases/${encodeURIComponent(tag)}`,
|
|
399
|
+
AGENT_PROVIDER_CONFIG: (orgId, agentId) => `${API_BASE2}/orgs/${orgId}/agents/${agentId}/provider-config`,
|
|
378
400
|
// Machines (org-scoped)
|
|
379
|
-
MACHINES: (orgId) => `${
|
|
380
|
-
MACHINE: (orgId, machineId) => `${
|
|
381
|
-
MACHINE_START: (orgId, machineId) => `${
|
|
382
|
-
MACHINE_STOP: (orgId, machineId) => `${
|
|
383
|
-
MACHINE_STATUS: (orgId, machineId) => `${
|
|
384
|
-
MACHINE_LOGS: (orgId, machineId) => `${
|
|
385
|
-
MACHINE_SPEC: (orgId, machineId) => `${
|
|
386
|
-
MACHINE_RESTART: (orgId, machineId) => `${
|
|
387
|
-
MACHINE_RESTART_ALL: (orgId) => `${
|
|
401
|
+
MACHINES: (orgId) => `${API_BASE2}/orgs/${orgId}/machines`,
|
|
402
|
+
MACHINE: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}`,
|
|
403
|
+
MACHINE_START: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/start`,
|
|
404
|
+
MACHINE_STOP: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/stop`,
|
|
405
|
+
MACHINE_STATUS: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/status`,
|
|
406
|
+
MACHINE_LOGS: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/logs`,
|
|
407
|
+
MACHINE_SPEC: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/spec`,
|
|
408
|
+
MACHINE_RESTART: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/restart`,
|
|
409
|
+
MACHINE_RESTART_ALL: (orgId) => `${API_BASE2}/orgs/${orgId}/machines/restart-all`,
|
|
388
410
|
// Daemon-mode Machine management (org-scoped, user auth).
|
|
389
411
|
// POST creates a new daemon-mode Machine (daemon_mode=true always).
|
|
390
412
|
// Attach/Detach bind an agent to/from a daemon Machine.
|
|
391
|
-
MACHINE_ATTACH_AGENT: (orgId, machineId, agentId) => `${
|
|
392
|
-
MACHINE_DETACH_AGENT: (orgId, machineId, agentId) => `${
|
|
393
|
-
MACHINE_WORKSPACE_STATES: (orgId, machineId) => `${
|
|
394
|
-
MACHINE_AGENT_DAEMON_CONFIG: (orgId, machineId, agentId) => `${
|
|
395
|
-
MACHINE_AGENT_WORKSPACE_SETUP: (orgId, machineId, agentId) => `${
|
|
396
|
-
MACHINE_LLM_SOURCE: (orgId, machineId) => `${
|
|
397
|
-
MACHINE_PROVIDER_ENABLED: (orgId, machineId) => `${
|
|
398
|
-
MACHINE_MANAGED_BY: (orgId, machineId) => `${
|
|
399
|
-
MACHINE_CAPABILITIES: (orgId, machineId) => `${
|
|
400
|
-
MACHINE_RUNTIME_AUTH: (orgId, machineId) => `${
|
|
401
|
-
MACHINE_KEYS: (orgId, machineId) => `${
|
|
402
|
-
MACHINE_KEY: (orgId, machineId, keyId) => `${
|
|
403
|
-
MACHINE_RUNTIME_AUTH_SESSIONS: (orgId, machineId) => `${
|
|
404
|
-
MACHINE_RUNTIME_AUTH_SESSION_COMPLETE: (orgId, machineId, sessionId) => `${
|
|
405
|
-
MACHINE_REQUEST_UPDATE: (orgId, machineId) => `${
|
|
406
|
-
MACHINE_BROWSE: (orgId, machineId) => `${
|
|
413
|
+
MACHINE_ATTACH_AGENT: (orgId, machineId, agentId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/agents/${agentId}`,
|
|
414
|
+
MACHINE_DETACH_AGENT: (orgId, machineId, agentId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/agents/${agentId}`,
|
|
415
|
+
MACHINE_WORKSPACE_STATES: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/workspace-states`,
|
|
416
|
+
MACHINE_AGENT_DAEMON_CONFIG: (orgId, machineId, agentId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/agents/${agentId}/daemon-config`,
|
|
417
|
+
MACHINE_AGENT_WORKSPACE_SETUP: (orgId, machineId, agentId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/agents/${agentId}/workspace/setup`,
|
|
418
|
+
MACHINE_LLM_SOURCE: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/llm-source`,
|
|
419
|
+
MACHINE_PROVIDER_ENABLED: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/provider-enabled`,
|
|
420
|
+
MACHINE_MANAGED_BY: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/managed-by`,
|
|
421
|
+
MACHINE_CAPABILITIES: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/capabilities`,
|
|
422
|
+
MACHINE_RUNTIME_AUTH: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/runtime-auth`,
|
|
423
|
+
MACHINE_KEYS: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/keys`,
|
|
424
|
+
MACHINE_KEY: (orgId, machineId, keyId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/keys/${keyId}`,
|
|
425
|
+
MACHINE_RUNTIME_AUTH_SESSIONS: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/runtime-auth-sessions`,
|
|
426
|
+
MACHINE_RUNTIME_AUTH_SESSION_COMPLETE: (orgId, machineId, sessionId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/runtime-auth-sessions/${sessionId}/complete`,
|
|
427
|
+
MACHINE_REQUEST_UPDATE: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/request-update`,
|
|
428
|
+
MACHINE_BROWSE: (orgId, machineId) => `${API_BASE2}/orgs/${orgId}/machines/${machineId}/browse`,
|
|
407
429
|
// Machine self-control-plane (mck_-scoped). The bearer token implicitly
|
|
408
430
|
// identifies the Machine, so there is no `:mid` URL parameter — these are
|
|
409
431
|
// "self" routes called by the daemon for its own host.
|
|
410
|
-
MACHINES_ME: `${
|
|
411
|
-
MACHINES_ME_AGENTS: `${
|
|
412
|
-
MACHINES_ME_HEALTH: `${
|
|
413
|
-
MACHINES_ME_CLIPS: `${
|
|
414
|
-
MACHINES_ME_BROWSER_PROFILES: `${
|
|
415
|
-
MACHINES_ME_BROWSER_PROFILE_STATUS: (profileId) => `${
|
|
416
|
-
MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId) => `${
|
|
417
|
-
MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId) => `${
|
|
418
|
-
MACHINES_ME_WS_TICKET: `${
|
|
419
|
-
MACHINES_ME_BROWSE_RESPONSE: (requestId) => `${
|
|
432
|
+
MACHINES_ME: `${API_BASE2}/machines/me`,
|
|
433
|
+
MACHINES_ME_AGENTS: `${API_BASE2}/machines/me/agents`,
|
|
434
|
+
MACHINES_ME_HEALTH: `${API_BASE2}/machines/me/health`,
|
|
435
|
+
MACHINES_ME_CLIPS: `${API_BASE2}/machines/me/clips`,
|
|
436
|
+
MACHINES_ME_BROWSER_PROFILES: `${API_BASE2}/machines/me/browser-profiles`,
|
|
437
|
+
MACHINES_ME_BROWSER_PROFILE_STATUS: (profileId) => `${API_BASE2}/machines/me/browser-profiles/${profileId}/status`,
|
|
438
|
+
MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId) => `${API_BASE2}/machines/me/agents/${agentId}/launch-credential`,
|
|
439
|
+
MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId) => `${API_BASE2}/machines/me/agents/${agentId}/workspace-state`,
|
|
440
|
+
MACHINES_ME_WS_TICKET: `${API_BASE2}/machines/me/ws/ticket`,
|
|
441
|
+
MACHINES_ME_BROWSE_RESPONSE: (requestId) => `${API_BASE2}/machines/me/browse-response/${requestId}`,
|
|
420
442
|
// Hosted browser live-viewer control plane (api-server, NOT clip-service):
|
|
421
443
|
// the web client drives WebRTC signaling + tab nav through VIEWER_COMMAND;
|
|
422
444
|
// api-server brokers each command to the host daemon via the machine:{id}
|
|
423
445
|
// request/reply bridge (mirrors filesystem browse), and the daemon replies on
|
|
424
446
|
// VIEWER_RESPONSE. See docs/engineering-design/hosted-browser-provider-design.md.
|
|
425
|
-
MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE: (requestId) => `${
|
|
447
|
+
MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE: (requestId) => `${API_BASE2}/machines/me/browser-profiles/viewer-response/${requestId}`,
|
|
426
448
|
// Tasks (org-scoped)
|
|
427
|
-
TASKS: (orgId) => `${
|
|
428
|
-
TASK_SUBTASK_SUMMARY: (orgId) => `${
|
|
429
|
-
TASK: (orgId, taskId) => `${
|
|
430
|
-
TASK_MOVE: (orgId, taskId) => `${
|
|
431
|
-
TASK_ARCHIVE: (orgId, taskId) => `${
|
|
432
|
-
TASK_RESTORE: (orgId, taskId) => `${
|
|
433
|
-
TASK_WATCH: (orgId, taskId) => `${
|
|
434
|
-
TASK_WATCHERS: (orgId, taskId) => `${
|
|
435
|
-
TASK_SUBSCRIBER: (orgId, taskId, userId) => `${
|
|
436
|
-
TASK_SUBTASKS: (orgId, taskId) => `${
|
|
437
|
-
TASK_RELATIONS: (orgId, taskId) => `${
|
|
438
|
-
TASK_RELATION: (orgId, taskId, relId) => `${
|
|
439
|
-
TASK_RELATIONS_BY_TARGET: (orgId) => `${
|
|
440
|
-
TASK_COMMENTS: (orgId, taskId) => `${
|
|
441
|
-
TASK_COMMENT: (orgId, taskId, commentId) => `${
|
|
442
|
-
TASK_ACTIVITIES: (orgId, taskId) => `${
|
|
443
|
-
TASK_LABELS: (orgId, taskId) => `${
|
|
444
|
-
TASK_LABEL: (orgId, taskId, labelId) => `${
|
|
449
|
+
TASKS: (orgId) => `${API_BASE2}/orgs/${orgId}/tasks`,
|
|
450
|
+
TASK_SUBTASK_SUMMARY: (orgId) => `${API_BASE2}/orgs/${orgId}/tasks/subtask-summary`,
|
|
451
|
+
TASK: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}`,
|
|
452
|
+
TASK_MOVE: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/move`,
|
|
453
|
+
TASK_ARCHIVE: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/archive`,
|
|
454
|
+
TASK_RESTORE: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/restore`,
|
|
455
|
+
TASK_WATCH: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/watch`,
|
|
456
|
+
TASK_WATCHERS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/watchers`,
|
|
457
|
+
TASK_SUBSCRIBER: (orgId, taskId, userId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/subscribers/${userId}`,
|
|
458
|
+
TASK_SUBTASKS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/subtasks`,
|
|
459
|
+
TASK_RELATIONS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/relations`,
|
|
460
|
+
TASK_RELATION: (orgId, taskId, relId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/relations/${relId}`,
|
|
461
|
+
TASK_RELATIONS_BY_TARGET: (orgId) => `${API_BASE2}/orgs/${orgId}/task-relations`,
|
|
462
|
+
TASK_COMMENTS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/comments`,
|
|
463
|
+
TASK_COMMENT: (orgId, taskId, commentId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/comments/${commentId}`,
|
|
464
|
+
TASK_ACTIVITIES: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/activities`,
|
|
465
|
+
TASK_LABELS: (orgId, taskId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/labels`,
|
|
466
|
+
TASK_LABEL: (orgId, taskId, labelId) => `${API_BASE2}/orgs/${orgId}/tasks/${taskId}/labels/${labelId}`,
|
|
445
467
|
// Labels (org-scoped vocabulary; writes are admin-gated)
|
|
446
|
-
LABELS: (orgId) => `${
|
|
447
|
-
LABEL: (orgId, labelId) => `${
|
|
468
|
+
LABELS: (orgId) => `${API_BASE2}/orgs/${orgId}/labels`,
|
|
469
|
+
LABEL: (orgId, labelId) => `${API_BASE2}/orgs/${orgId}/labels/${labelId}`,
|
|
448
470
|
// Projects (org-scoped)
|
|
449
|
-
PROJECTS: (orgId) => `${
|
|
450
|
-
PROJECT_TASK_SUMMARY: (orgId) => `${
|
|
451
|
-
PROJECT: (orgId, projectId) => `${
|
|
452
|
-
PROJECT_MEMBERS: (orgId, projectId) => `${
|
|
453
|
-
PROJECT_READERS: (orgId, projectId) => `${
|
|
454
|
-
PROJECT_LIBRARY: (orgId) => `${
|
|
455
|
-
PROJECT_JOIN: (orgId, projectId) => `${
|
|
456
|
-
PROJECT_JOIN_REQUESTS: (orgId, projectId) => `${
|
|
471
|
+
PROJECTS: (orgId) => `${API_BASE2}/orgs/${orgId}/projects`,
|
|
472
|
+
PROJECT_TASK_SUMMARY: (orgId) => `${API_BASE2}/orgs/${orgId}/projects/task-summary`,
|
|
473
|
+
PROJECT: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}`,
|
|
474
|
+
PROJECT_MEMBERS: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/members`,
|
|
475
|
+
PROJECT_READERS: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/readers`,
|
|
476
|
+
PROJECT_LIBRARY: (orgId) => `${API_BASE2}/orgs/${orgId}/projects/library`,
|
|
477
|
+
PROJECT_JOIN: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/join`,
|
|
478
|
+
PROJECT_JOIN_REQUESTS: (orgId, projectId) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/join-requests`,
|
|
457
479
|
// subject is a bare user ID or a bare team ID; both are path-segment safe.
|
|
458
|
-
PROJECT_MEMBER: (orgId, projectId, subject) => `${
|
|
480
|
+
PROJECT_MEMBER: (orgId, projectId, subject) => `${API_BASE2}/orgs/${orgId}/projects/${projectId}/members/${subject}`,
|
|
459
481
|
// Schedules (org-scoped, platform time trigger primitive)
|
|
460
|
-
SCHEDULES: (orgId) => `${
|
|
461
|
-
SCHEDULE: (orgId, id) => `${
|
|
462
|
-
SCHEDULE_PAUSE: (orgId, id) => `${
|
|
463
|
-
SCHEDULE_RESUME: (orgId, id) => `${
|
|
464
|
-
SCHEDULE_CANCEL: (orgId, id) => `${
|
|
465
|
-
SCHEDULE_RUNS: (orgId, id) => `${
|
|
466
|
-
SCHEDULE_RUN: (orgId, runId) => `${
|
|
482
|
+
SCHEDULES: (orgId) => `${API_BASE2}/orgs/${orgId}/schedules`,
|
|
483
|
+
SCHEDULE: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}`,
|
|
484
|
+
SCHEDULE_PAUSE: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}/pause`,
|
|
485
|
+
SCHEDULE_RESUME: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}/resume`,
|
|
486
|
+
SCHEDULE_CANCEL: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}/cancel`,
|
|
487
|
+
SCHEDULE_RUNS: (orgId, id) => `${API_BASE2}/orgs/${orgId}/schedules/${id}/runs`,
|
|
488
|
+
SCHEDULE_RUN: (orgId, runId) => `${API_BASE2}/orgs/${orgId}/schedule_runs/${runId}`,
|
|
467
489
|
// External triggers (org-scoped incoming integration primitive)
|
|
468
|
-
EXTERNAL_CONNECTIONS: (orgId) => `${
|
|
469
|
-
EXTERNAL_CONNECTION: (orgId, connectionId) => `${
|
|
470
|
-
EXTERNAL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${
|
|
471
|
-
EXTERNAL_TRIGGER_SCHEMA: (orgId, connectionId) => `${
|
|
472
|
-
EXTERNAL_INGRESS_EVENTS: (orgId) => `${
|
|
473
|
-
EXTERNAL_INGRESS_EVENT: (orgId, eventId) => `${
|
|
474
|
-
EXTERNAL_TRIGGERS: (orgId) => `${
|
|
475
|
-
EXTERNAL_TRIGGER: (orgId, triggerId) => `${
|
|
476
|
-
EXTERNAL_TRIGGER_RUNS: (orgId) => `${
|
|
477
|
-
EXTERNAL_TRIGGER_RUN: (orgId, runId) => `${
|
|
490
|
+
EXTERNAL_CONNECTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/external-connections`,
|
|
491
|
+
EXTERNAL_CONNECTION: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/external-connections/${connectionId}`,
|
|
492
|
+
EXTERNAL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/external-connections/${connectionId}/ingress-token/regenerate`,
|
|
493
|
+
EXTERNAL_TRIGGER_SCHEMA: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/external-connections/${connectionId}/trigger-schema`,
|
|
494
|
+
EXTERNAL_INGRESS_EVENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/external-ingress-events`,
|
|
495
|
+
EXTERNAL_INGRESS_EVENT: (orgId, eventId) => `${API_BASE2}/orgs/${orgId}/external-ingress-events/${eventId}`,
|
|
496
|
+
EXTERNAL_TRIGGERS: (orgId) => `${API_BASE2}/orgs/${orgId}/external-triggers`,
|
|
497
|
+
EXTERNAL_TRIGGER: (orgId, triggerId) => `${API_BASE2}/orgs/${orgId}/external-triggers/${triggerId}`,
|
|
498
|
+
EXTERNAL_TRIGGER_RUNS: (orgId) => `${API_BASE2}/orgs/${orgId}/external-trigger-runs`,
|
|
499
|
+
EXTERNAL_TRIGGER_RUN: (orgId, runId) => `${API_BASE2}/orgs/${orgId}/external-trigger-runs/${runId}`,
|
|
478
500
|
// External IM channel (org-scoped, platform-mediated Feishu/Slack)
|
|
479
|
-
CHANNEL_CONNECTIONS: (orgId) => `${
|
|
480
|
-
CHANNEL_CONNECTION: (orgId, connectionId) => `${
|
|
481
|
-
CHANNEL_CONNECTION_CREDENTIALS: (orgId, connectionId) => `${
|
|
482
|
-
CHANNEL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${
|
|
483
|
-
CHANNEL_CONNECTION_CONVERSATIONS: (orgId, connectionId) => `${
|
|
484
|
-
CHANNEL_CONVERSATION: (orgId, conversationId) => `${
|
|
485
|
-
CHANNEL_CONVERSATION_MESSAGES: (orgId, conversationId) => `${
|
|
486
|
-
CHANNEL_CONVERSATION_SESSION: (orgId, conversationId) => `${
|
|
487
|
-
CHANNEL_CONVERSATION_ATTENTION: (orgId, conversationId) => `${
|
|
488
|
-
CHANNEL_MESSAGE: (orgId, messageId) => `${
|
|
489
|
-
CHANNEL_PROVISIONING: (orgId) => `${
|
|
490
|
-
CHANNEL_SLACK_MANIFEST_LINK: (orgId) => `${
|
|
491
|
-
CHANNEL_PROVISIONING_SESSION: (orgId, sessionId) => `${
|
|
492
|
-
CHANNEL_PROVISIONING_CANCEL: (orgId, sessionId) => `${
|
|
501
|
+
CHANNEL_CONNECTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/channel-connections`,
|
|
502
|
+
CHANNEL_CONNECTION: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/channel-connections/${connectionId}`,
|
|
503
|
+
CHANNEL_CONNECTION_CREDENTIALS: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/channel-connections/${connectionId}/credentials`,
|
|
504
|
+
CHANNEL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/channel-connections/${connectionId}/ingress-token/regenerate`,
|
|
505
|
+
CHANNEL_CONNECTION_CONVERSATIONS: (orgId, connectionId) => `${API_BASE2}/orgs/${orgId}/channel-connections/${connectionId}/conversations`,
|
|
506
|
+
CHANNEL_CONVERSATION: (orgId, conversationId) => `${API_BASE2}/orgs/${orgId}/channel-conversations/${conversationId}`,
|
|
507
|
+
CHANNEL_CONVERSATION_MESSAGES: (orgId, conversationId) => `${API_BASE2}/orgs/${orgId}/channel-conversations/${conversationId}/messages`,
|
|
508
|
+
CHANNEL_CONVERSATION_SESSION: (orgId, conversationId) => `${API_BASE2}/orgs/${orgId}/channel-conversations/${conversationId}/session`,
|
|
509
|
+
CHANNEL_CONVERSATION_ATTENTION: (orgId, conversationId) => `${API_BASE2}/orgs/${orgId}/channel-conversations/${conversationId}/attention`,
|
|
510
|
+
CHANNEL_MESSAGE: (orgId, messageId) => `${API_BASE2}/orgs/${orgId}/channel-messages/${messageId}`,
|
|
511
|
+
CHANNEL_PROVISIONING: (orgId) => `${API_BASE2}/orgs/${orgId}/channel-provisioning`,
|
|
512
|
+
CHANNEL_SLACK_MANIFEST_LINK: (orgId) => `${API_BASE2}/orgs/${orgId}/channel-provisioning/slack/manifest-link`,
|
|
513
|
+
CHANNEL_PROVISIONING_SESSION: (orgId, sessionId) => `${API_BASE2}/orgs/${orgId}/channel-provisioning/${sessionId}`,
|
|
514
|
+
CHANNEL_PROVISIONING_CANCEL: (orgId, sessionId) => `${API_BASE2}/orgs/${orgId}/channel-provisioning/${sessionId}/cancel`,
|
|
493
515
|
// Tier-B platform verb (agent-only): send one message as the bound bot.
|
|
494
|
-
CHANNEL_SEND: (orgId) => `${
|
|
516
|
+
CHANNEL_SEND: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/channel-send`,
|
|
495
517
|
// Tier-B read verbs (agent-only): workspace visibility as the bot sees it.
|
|
496
|
-
SLACK_CHANNELS: (orgId) => `${
|
|
497
|
-
SLACK_USERS: (orgId) => `${
|
|
498
|
-
SLACK_HISTORY: (orgId) => `${
|
|
499
|
-
SLACK_MEMBERS: (orgId) => `${
|
|
500
|
-
SLACK_STATUS: (orgId) => `${
|
|
501
|
-
SLACK_FILE: (orgId) => `${
|
|
502
|
-
SLACK_FILES: (orgId) => `${
|
|
518
|
+
SLACK_CHANNELS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/channels`,
|
|
519
|
+
SLACK_USERS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/users`,
|
|
520
|
+
SLACK_HISTORY: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/history`,
|
|
521
|
+
SLACK_MEMBERS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/members`,
|
|
522
|
+
SLACK_STATUS: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/status`,
|
|
523
|
+
SLACK_FILE: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/file`,
|
|
524
|
+
SLACK_FILES: (orgId) => `${API_BASE2}/orgs/${orgId}/agents/me/slack/files`,
|
|
503
525
|
// WeChat tier-B read verbs (agent-only; internal research preview).
|
|
504
|
-
...wechatEndpoints(
|
|
526
|
+
...wechatEndpoints(API_BASE2),
|
|
505
527
|
// Invitations (org-scoped, admin)
|
|
506
|
-
ORG_INVITATIONS: (orgId) => `${
|
|
507
|
-
ORG_INVITATION: (orgId, invId) => `${
|
|
508
|
-
ORG_INVITATION_RESEND: (orgId, invId) => `${
|
|
528
|
+
ORG_INVITATIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/invitations`,
|
|
529
|
+
ORG_INVITATION: (orgId, invId) => `${API_BASE2}/orgs/${orgId}/invitations/${invId}`,
|
|
530
|
+
ORG_INVITATION_RESEND: (orgId, invId) => `${API_BASE2}/orgs/${orgId}/invitations/${invId}/resend`,
|
|
509
531
|
// Invitations (invitee)
|
|
510
|
-
MY_INVITATIONS: `${
|
|
511
|
-
INVITATION_ACCEPT: (id) => `${
|
|
512
|
-
INVITATION_DECLINE: (id) => `${
|
|
513
|
-
INVITATION_BY_TOKEN: (token) => `${
|
|
532
|
+
MY_INVITATIONS: `${API_BASE2}/invitations/pending`,
|
|
533
|
+
INVITATION_ACCEPT: (id) => `${API_BASE2}/invitations/${id}/accept`,
|
|
534
|
+
INVITATION_DECLINE: (id) => `${API_BASE2}/invitations/${id}/decline`,
|
|
535
|
+
INVITATION_BY_TOKEN: (token) => `${API_BASE2}/invitations/by-token/${token}`,
|
|
514
536
|
// Org-level shareable invite link
|
|
515
|
-
ORG_INVITE_LINK: (orgId) => `${
|
|
516
|
-
ORG_INVITE_LINK_REGENERATE: (orgId) => `${
|
|
517
|
-
ORG_INVITE_LINK_JOIN_REQUESTS: (orgId) => `${
|
|
518
|
-
ORG_INVITE_LINK_JOIN_REQUEST_DECIDE: (orgId, jrId) => `${
|
|
519
|
-
INVITE_LINK_JOIN: `${
|
|
537
|
+
ORG_INVITE_LINK: (orgId) => `${API_BASE2}/orgs/${orgId}/invite-link`,
|
|
538
|
+
ORG_INVITE_LINK_REGENERATE: (orgId) => `${API_BASE2}/orgs/${orgId}/invite-link/regenerate`,
|
|
539
|
+
ORG_INVITE_LINK_JOIN_REQUESTS: (orgId) => `${API_BASE2}/orgs/${orgId}/invite-link/join-requests`,
|
|
540
|
+
ORG_INVITE_LINK_JOIN_REQUEST_DECIDE: (orgId, jrId) => `${API_BASE2}/orgs/${orgId}/invite-link/join-requests/${jrId}/decide`,
|
|
541
|
+
INVITE_LINK_JOIN: `${API_BASE2}/invite-link/join`,
|
|
520
542
|
// Wikis (org-scoped, served by wiki-service)
|
|
521
543
|
WIKIS: (orgId) => `${WIKI_BASE}/orgs/${orgId}/wikis`,
|
|
522
544
|
// Recycle bin — soft-deleted wikis (owner only). Must precede WIKI in the
|
|
@@ -571,86 +593,86 @@ var init_constants = __esm({
|
|
|
571
593
|
WIKI_OPERATIONS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/operations`,
|
|
572
594
|
WIKI_OPERATION_REVERT: (orgId, wikiId, opId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/operations/${opId}/revert`,
|
|
573
595
|
// Unified Comments (org-scoped, api-server)
|
|
574
|
-
COMMENTS: (orgId) => `${
|
|
575
|
-
COMMENT: (orgId, commentId) => `${
|
|
576
|
-
COMMENT_RESOLVE: (orgId, commentId) => `${
|
|
577
|
-
COMMENT_REOPEN: (orgId, commentId) => `${
|
|
596
|
+
COMMENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/comments`,
|
|
597
|
+
COMMENT: (orgId, commentId) => `${API_BASE2}/orgs/${orgId}/comments/${commentId}`,
|
|
598
|
+
COMMENT_RESOLVE: (orgId, commentId) => `${API_BASE2}/orgs/${orgId}/comments/${commentId}:resolve`,
|
|
599
|
+
COMMENT_REOPEN: (orgId, commentId) => `${API_BASE2}/orgs/${orgId}/comments/${commentId}:reopen`,
|
|
578
600
|
// Inbox (org-scoped)
|
|
579
|
-
INBOX: (orgId) => `${
|
|
580
|
-
INBOX_UNREAD_COUNT: (orgId) => `${
|
|
581
|
-
INBOX_ITEM_READ: (orgId, id) => `${
|
|
582
|
-
INBOX_ITEM_UNREAD: (orgId, id) => `${
|
|
583
|
-
INBOX_ITEM_ARCHIVE: (orgId, id) => `${
|
|
601
|
+
INBOX: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox`,
|
|
602
|
+
INBOX_UNREAD_COUNT: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox/unread-count`,
|
|
603
|
+
INBOX_ITEM_READ: (orgId, id) => `${API_BASE2}/orgs/${orgId}/inbox/${id}/read`,
|
|
604
|
+
INBOX_ITEM_UNREAD: (orgId, id) => `${API_BASE2}/orgs/${orgId}/inbox/${id}/unread`,
|
|
605
|
+
INBOX_ITEM_ARCHIVE: (orgId, id) => `${API_BASE2}/orgs/${orgId}/inbox/${id}/archive`,
|
|
584
606
|
// Snooze/Unsnooze deferred until un-snooze cron worker is implemented
|
|
585
|
-
INBOX_MARK_ALL_READ: (orgId) => `${
|
|
586
|
-
INBOX_ARCHIVE_ALL: (orgId) => `${
|
|
587
|
-
INBOX_ITEM: (orgId, id) => `${
|
|
588
|
-
INBOX_ACK: (orgId) => `${
|
|
607
|
+
INBOX_MARK_ALL_READ: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox/mark-all-read`,
|
|
608
|
+
INBOX_ARCHIVE_ALL: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox/archive-all`,
|
|
609
|
+
INBOX_ITEM: (orgId, id) => `${API_BASE2}/orgs/${orgId}/inbox/${id}`,
|
|
610
|
+
INBOX_ACK: (orgId) => `${API_BASE2}/orgs/${orgId}/inbox/ack`,
|
|
589
611
|
// Dispatch (agent event delivery)
|
|
590
|
-
DISPATCH: (orgId) => `${
|
|
591
|
-
DISPATCH_PENDING_COUNT: (orgId) => `${
|
|
592
|
-
DISPATCH_RECEIVED: (orgId) => `${
|
|
593
|
-
DISPATCH_ACK: (orgId) => `${
|
|
594
|
-
DISPATCH_ACK_BY_ID: (orgId, id) => `${
|
|
595
|
-
DISPATCH_EXPIRE: (orgId) => `${
|
|
596
|
-
DISPATCH_BY_MESSAGES: (orgId) => `${
|
|
597
|
-
DISPATCH_CLAIM: (orgId) => `${
|
|
598
|
-
DISPATCH_STEER: (orgId) => `${
|
|
599
|
-
DISPATCH_INPUT_STATE: (orgId) => `${
|
|
600
|
-
DISPATCH_COMPLETE: (orgId) => `${
|
|
601
|
-
DISPATCH_COMPLETE_SOURCES: (orgId) => `${
|
|
602
|
-
DISPATCH_RELEASE: (orgId) => `${
|
|
603
|
-
DISPATCH_HEARTBEAT: (orgId) => `${
|
|
612
|
+
DISPATCH: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch`,
|
|
613
|
+
DISPATCH_PENDING_COUNT: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/pending-count`,
|
|
614
|
+
DISPATCH_RECEIVED: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/received`,
|
|
615
|
+
DISPATCH_ACK: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/ack`,
|
|
616
|
+
DISPATCH_ACK_BY_ID: (orgId, id) => `${API_BASE2}/orgs/${orgId}/dispatch/${id}/ack`,
|
|
617
|
+
DISPATCH_EXPIRE: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/expire`,
|
|
618
|
+
DISPATCH_BY_MESSAGES: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/by-messages`,
|
|
619
|
+
DISPATCH_CLAIM: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/claim`,
|
|
620
|
+
DISPATCH_STEER: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/steer`,
|
|
621
|
+
DISPATCH_INPUT_STATE: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/input-state`,
|
|
622
|
+
DISPATCH_COMPLETE: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/complete`,
|
|
623
|
+
DISPATCH_COMPLETE_SOURCES: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/complete-sources`,
|
|
624
|
+
DISPATCH_RELEASE: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/release`,
|
|
625
|
+
DISPATCH_HEARTBEAT: (orgId) => `${API_BASE2}/orgs/${orgId}/dispatch/heartbeat`,
|
|
604
626
|
// Unread
|
|
605
|
-
UNREAD: `${
|
|
606
|
-
ORG_UNREAD: (orgId) => `${
|
|
607
|
-
CHAT_READ: (orgId, chatId) => `${
|
|
608
|
-
CHAT_READ_ALL: (orgId, chatId) => `${
|
|
609
|
-
THREAD_UNREAD: (orgId, chatId, threadRootId) => `${
|
|
610
|
-
THREAD_READ: (orgId, chatId, threadRootId) => `${
|
|
627
|
+
UNREAD: `${API_BASE2}/me/unread`,
|
|
628
|
+
ORG_UNREAD: (orgId) => `${API_BASE2}/orgs/${orgId}/unread`,
|
|
629
|
+
CHAT_READ: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/read`,
|
|
630
|
+
CHAT_READ_ALL: (orgId, chatId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/read-all`,
|
|
631
|
+
THREAD_UNREAD: (orgId, chatId, threadRootId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/unread`,
|
|
632
|
+
THREAD_READ: (orgId, chatId, threadRootId) => `${API_BASE2}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/read`,
|
|
611
633
|
// References (org-scoped)
|
|
612
|
-
REFS_RESOLVE: (orgId) => `${
|
|
613
|
-
REFS_BACKLINKS: (orgId) => `${
|
|
614
|
-
REFS_OUTBOUND: (orgId) => `${
|
|
615
|
-
REFS_GRAPH: (orgId) => `${
|
|
616
|
-
REFS_CHECK: (orgId) => `${
|
|
634
|
+
REFS_RESOLVE: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/resolve`,
|
|
635
|
+
REFS_BACKLINKS: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/backlinks`,
|
|
636
|
+
REFS_OUTBOUND: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/outbound`,
|
|
637
|
+
REFS_GRAPH: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/graph`,
|
|
638
|
+
REFS_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/refs/check`,
|
|
617
639
|
// Platform config (agent-scoped, not org-scoped)
|
|
618
|
-
PLATFORM_CONFIG: `${
|
|
640
|
+
PLATFORM_CONFIG: `${API_BASE2}/agents/platform-config`,
|
|
619
641
|
// Push notifications
|
|
620
|
-
PUSH_SUBSCRIBE: `${
|
|
621
|
-
PUSH_UNSUBSCRIBE: `${
|
|
622
|
-
PUSH_VAPID_KEY: `${
|
|
642
|
+
PUSH_SUBSCRIBE: `${API_BASE2}/push/subscribe`,
|
|
643
|
+
PUSH_UNSUBSCRIBE: `${API_BASE2}/push/unsubscribe`,
|
|
644
|
+
PUSH_VAPID_KEY: `${API_BASE2}/push/vapid-key`,
|
|
623
645
|
// Notification preferences
|
|
624
|
-
NOTIFICATION_PREFERENCES: `${
|
|
646
|
+
NOTIFICATION_PREFERENCES: `${API_BASE2}/notification-preferences`,
|
|
625
647
|
// Unified search (messages + tasks + wiki, org-scoped)
|
|
626
|
-
SEARCH: (orgId) => `${
|
|
648
|
+
SEARCH: (orgId) => `${API_BASE2}/orgs/${orgId}/search`,
|
|
627
649
|
// Feature flags (server-evaluated). Org-scoped by default; omit the org for
|
|
628
650
|
// the pre-org form, which resolves "cap:" capabilities only (PostHog flags
|
|
629
651
|
// are org-scoped and absent there) for callers that have no org yet.
|
|
630
|
-
FEATURE_FLAGS: (orgId) => orgId ? `${
|
|
652
|
+
FEATURE_FLAGS: (orgId) => orgId ? `${API_BASE2}/orgs/${orgId}/feature-flags` : `${API_BASE2}/feature-flags`,
|
|
631
653
|
// Team templates (org-scoped, owner/admin only)
|
|
632
|
-
TEMPLATES: (orgId) => `${
|
|
633
|
-
TEMPLATE: (orgId, templateId) => `${
|
|
634
|
-
TEMPLATE_DEPLOYMENTS: (orgId) => `${
|
|
635
|
-
TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${
|
|
636
|
-
CLIP_DEPENDENCIES_CHECK: (orgId) => `${
|
|
654
|
+
TEMPLATES: (orgId) => `${API_BASE2}/orgs/${orgId}/templates`,
|
|
655
|
+
TEMPLATE: (orgId, templateId) => `${API_BASE2}/orgs/${orgId}/templates/${templateId}`,
|
|
656
|
+
TEMPLATE_DEPLOYMENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/template-deployments`,
|
|
657
|
+
TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${API_BASE2}/orgs/${orgId}/template-deployments/${deploymentId}`,
|
|
658
|
+
CLIP_DEPENDENCIES_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/clip-dependencies/check`,
|
|
637
659
|
// Onboarding wizard progress (org-scoped, self)
|
|
638
|
-
ONBOARDING_PROGRESS: (orgId) => `${
|
|
660
|
+
ONBOARDING_PROGRESS: (orgId) => `${API_BASE2}/orgs/${orgId}/onboarding`,
|
|
639
661
|
// Billing & Credits (org-scoped)
|
|
640
|
-
BILLING: (orgId) => `${
|
|
641
|
-
BILLING_TRANSACTIONS: (orgId) => `${
|
|
642
|
-
BILLING_CHECKOUT: (orgId) => `${
|
|
643
|
-
BILLING_AUTO_RELOAD: (orgId) => `${
|
|
644
|
-
BILLING_SETUP_INTENT: (orgId) => `${
|
|
645
|
-
COMPUTE_PRICING: () => `${
|
|
662
|
+
BILLING: (orgId) => `${API_BASE2}/orgs/${orgId}/billing`,
|
|
663
|
+
BILLING_TRANSACTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/transactions`,
|
|
664
|
+
BILLING_CHECKOUT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/checkout`,
|
|
665
|
+
BILLING_AUTO_RELOAD: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/auto-reload`,
|
|
666
|
+
BILLING_SETUP_INTENT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/setup-intent`,
|
|
667
|
+
COMPUTE_PRICING: () => `${API_BASE2}/billing/compute-pricing`,
|
|
646
668
|
// Runtime capability table (public, no auth) — SSOT for the create/settings
|
|
647
669
|
// interlock: per-runtime compute modes, native model family, cross-family
|
|
648
670
|
// availability, and recommended model.
|
|
649
|
-
RUNTIMES: () => `${
|
|
671
|
+
RUNTIMES: () => `${API_BASE2}/runtimes`,
|
|
650
672
|
// Model catalog (public, no auth) — served from the server's DB-backed
|
|
651
673
|
// snapshot. Optional include_model keeps an agent's pinned hidden legacy
|
|
652
674
|
// model representable in settings pickers.
|
|
653
|
-
MODELS: (includeModel) => includeModel ? `${
|
|
675
|
+
MODELS: (includeModel) => includeModel ? `${API_BASE2}/models?include_model=${encodeURIComponent(includeModel)}` : `${API_BASE2}/models`,
|
|
654
676
|
// ADMIN_GRANTS intentionally NOT exported here — it sits under the
|
|
655
677
|
// unauthenticated `/internal/admin/*` surface and must not bleed into the
|
|
656
678
|
// public SDK. Admin dashboard hits the URL directly from its own client.
|
|
@@ -673,17 +695,9 @@ var init_constants = __esm({
|
|
|
673
695
|
BROWSER_PROFILE_CONSENT: (orgId, profileId, clipId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/consents/${clipId}`,
|
|
674
696
|
// Live viewer command — on api-server (API_BASE), not clip-service: it rides
|
|
675
697
|
// the machine control-plane request/reply bridge that lives in api-server.
|
|
676
|
-
BROWSER_PROFILE_VIEWER_COMMAND: (orgId, profileId) => `${
|
|
698
|
+
BROWSER_PROFILE_VIEWER_COMMAND: (orgId, profileId) => `${API_BASE2}/orgs/${orgId}/browser-profiles/${profileId}/viewer/command`,
|
|
677
699
|
// Edge device endpoints
|
|
678
|
-
|
|
679
|
-
ORG_EDGE_DEVICES: (orgId) => `/api/v1/orgs/${orgId}/edge/devices`,
|
|
680
|
-
ORG_EDGE_DEVICE: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}`,
|
|
681
|
-
ORG_EDGE_DEVICE_UNREGISTER: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/unregister`,
|
|
682
|
-
ORG_EDGE_ONBOARDING: (orgId) => `/api/v1/orgs/${orgId}/edge/onboarding`,
|
|
683
|
-
ORG_EDGE_PROFILES: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
|
|
684
|
-
ORG_EDGE_PROFILE_OPERATIONS: (orgId, edgeId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations`,
|
|
685
|
-
ORG_EDGE_PROFILE_OPERATION: (orgId, edgeId, operationId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}`,
|
|
686
|
-
ORG_EDGE_PROFILE_OPERATION_CONFIRM: (orgId, edgeId, operationId) => `/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}/confirm`,
|
|
700
|
+
...edgeEndpoints,
|
|
687
701
|
ORG_BROWSER_ALIASES: (orgId) => `/api/v1/orgs/${orgId}/browser-aliases`,
|
|
688
702
|
ORG_BROWSER_ALIAS: (orgId, aliasId) => `/api/v1/orgs/${orgId}/browser-aliases/${aliasId}`,
|
|
689
703
|
ORG_BROWSER_ALIAS_READINESS_CHECKS: (orgId, aliasId) => `/api/v1/orgs/${orgId}/browser-aliases/${aliasId}/readiness-checks`,
|
|
@@ -1498,7 +1512,7 @@ var init_client = __esm({
|
|
|
1498
1512
|
if (this.swimlaneName) {
|
|
1499
1513
|
headers["X-Prll-Swimlane"] = this.swimlaneName;
|
|
1500
1514
|
}
|
|
1501
|
-
if (path24.startsWith(
|
|
1515
|
+
if (path24.startsWith(API_BASE2)) {
|
|
1502
1516
|
const overrides = this.getFeatureFlagOverrides?.();
|
|
1503
1517
|
if (overrides)
|
|
1504
1518
|
headers["X-Prll-FF-Override"] = overrides;
|
|
@@ -2008,13 +2022,15 @@ var init_client = __esm({
|
|
|
2008
2022
|
return this.request("POST", ENDPOINTS.DM(orgId), req);
|
|
2009
2023
|
}
|
|
2010
2024
|
/** Create the onboarding agent's DM and seed the intro message.
|
|
2011
|
-
*
|
|
2012
|
-
*
|
|
2025
|
+
* @deprecated The OnboardingPopup line that used this is gone; the
|
|
2026
|
+
* endpoint stays one Desktop release cycle for old bundles and is then
|
|
2027
|
+
* removed (docs/engineering-design/onboarding-wizard.md §7). */
|
|
2013
2028
|
async seedOnboardingDM(orgId) {
|
|
2014
2029
|
return this.request("POST", ENDPOINTS.SEED_ONBOARDING_DM(orgId));
|
|
2015
2030
|
}
|
|
2016
|
-
/**
|
|
2017
|
-
*
|
|
2031
|
+
/** Mark this member's onboarding for the org as dismissed. The wizard
|
|
2032
|
+
* entry gate treats it as "done", so a fresh org can be released from the
|
|
2033
|
+
* /onboarding redirect without walking the wizard (test setup). */
|
|
2018
2034
|
async dismissOnboarding(orgId) {
|
|
2019
2035
|
await this.request("POST", ENDPOINTS.DISMISS_ONBOARDING(orgId));
|
|
2020
2036
|
}
|
|
@@ -2663,8 +2679,11 @@ var init_client = __esm({
|
|
|
2663
2679
|
return this.request("POST", ENDPOINTS.DISPATCH_COMPLETE_SOURCES(orgId), req);
|
|
2664
2680
|
}
|
|
2665
2681
|
/** Release a lane on graceful shutdown — members return to pending immediately. */
|
|
2666
|
-
async releaseDispatchLane(orgId, lane) {
|
|
2667
|
-
return this.request("POST", ENDPOINTS.DISPATCH_RELEASE(orgId), {
|
|
2682
|
+
async releaseDispatchLane(orgId, lane, reason) {
|
|
2683
|
+
return this.request("POST", ENDPOINTS.DISPATCH_RELEASE(orgId), {
|
|
2684
|
+
lane,
|
|
2685
|
+
...reason ? { reason } : {}
|
|
2686
|
+
});
|
|
2668
2687
|
}
|
|
2669
2688
|
/** Renew a live lane's lease (long-turn keepalive). 409 STALE_LANE when dethroned. */
|
|
2670
2689
|
async heartbeatDispatchLane(orgId, req) {
|
|
@@ -3400,8 +3419,8 @@ var init_client = __esm({
|
|
|
3400
3419
|
* server-side via the `setup_intent.succeeded` webhook. Mirrors
|
|
3401
3420
|
* `POST /billing/setup-intent`.
|
|
3402
3421
|
*/
|
|
3403
|
-
async createSetupIntent(orgId) {
|
|
3404
|
-
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId));
|
|
3422
|
+
async createSetupIntent(orgId, req) {
|
|
3423
|
+
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId), req);
|
|
3405
3424
|
}
|
|
3406
3425
|
async getAutoReloadSettings(orgId) {
|
|
3407
3426
|
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId));
|
|
@@ -3626,37 +3645,25 @@ var init_client = __esm({
|
|
|
3626
3645
|
async listEdgeDevices(orgId) {
|
|
3627
3646
|
return this.request("GET", ENDPOINTS.ORG_EDGE_DEVICES(orgId));
|
|
3628
3647
|
}
|
|
3629
|
-
/**
|
|
3630
|
-
*
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
* can create one (an agent gets `403 HOSTED_HUMAN_ONLY`), and only sign into it with
|
|
3635
|
-
* an account you are authorized and willing to share with the whole organization.
|
|
3636
|
-
* Creating one starts no pod and costs nothing.
|
|
3637
|
-
*/
|
|
3638
|
-
async registerEdgeDevice(orgId, input) {
|
|
3639
|
-
return this.request("POST", ENDPOINTS.ORG_EDGE(orgId), input);
|
|
3648
|
+
/** Register an Edge. `placement` defaults to BYOC; hosted creates an idle,
|
|
3649
|
+
* org-shared Cloud Profile and is restricted to human users. */
|
|
3650
|
+
async registerEdgeDevice(orgId, input, options) {
|
|
3651
|
+
const headers = options?.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : void 0;
|
|
3652
|
+
return this.request("POST", ENDPOINTS.ORG_EDGE(orgId), input, void 0, false, { headers });
|
|
3640
3653
|
}
|
|
3641
|
-
/**
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
*
|
|
3649
|
-
*/
|
|
3654
|
+
/** Mint the short-lived, single-use ticket for one exact owned BYOC Edge. */
|
|
3655
|
+
async connectEdgeDevice(orgId, edgeId) {
|
|
3656
|
+
return this.request("POST", ENDPOINTS.ORG_EDGE_CONNECT(orgId), void 0, {
|
|
3657
|
+
edge_id: edgeId
|
|
3658
|
+
});
|
|
3659
|
+
}
|
|
3660
|
+
/** Idempotently begin deleting a hosted Cloud Profile; every repeat returns
|
|
3661
|
+
* `202 deleting` until the pod and stored browser state are finalized. */
|
|
3650
3662
|
async deleteEdgeDevice(orgId, edgeId) {
|
|
3651
3663
|
return this.request("DELETE", ENDPOINTS.ORG_EDGE_DEVICE(orgId, edgeId));
|
|
3652
3664
|
}
|
|
3653
|
-
/**
|
|
3654
|
-
*
|
|
3655
|
-
*
|
|
3656
|
-
* Synchronous and idempotent: a committed removal and a repeat after removal
|
|
3657
|
-
* both resolve with no response body. A live connection returns `EDGE_ONLINE`;
|
|
3658
|
-
* callers must not clear local device identity until this method resolves.
|
|
3659
|
-
*/
|
|
3665
|
+
/** Idempotently remove the human caller's own offline BYOC registration.
|
|
3666
|
+
* A live connection returns `EDGE_ONLINE`. */
|
|
3660
3667
|
async unregisterEdgeDevice(orgId, edgeId) {
|
|
3661
3668
|
await this.request("DELETE", ENDPOINTS.ORG_EDGE_DEVICE_UNREGISTER(orgId, edgeId));
|
|
3662
3669
|
}
|
|
@@ -3934,16 +3941,44 @@ var init_client = __esm({
|
|
|
3934
3941
|
async listClipMCPConnections(orgId, clipId) {
|
|
3935
3942
|
return this.request("GET", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId));
|
|
3936
3943
|
}
|
|
3944
|
+
/** Create one MCP credential slot and its connection. */
|
|
3945
|
+
async createClipMCPConnection(orgId, clipId, req) {
|
|
3946
|
+
return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId), req, void 0, false, {
|
|
3947
|
+
timeoutMs: 4e4
|
|
3948
|
+
});
|
|
3949
|
+
}
|
|
3937
3950
|
/** Start a new Official OAuth MCP connection with the platform-owned app.
|
|
3938
3951
|
* Omitting oauth_client is load-bearing: the server resolves the exact
|
|
3939
3952
|
* reviewed-version binding and never falls back to DCR/CIMD cross-org. */
|
|
3940
|
-
async createClipMCPOAuthConnection(orgId, clipId, serverUrl, alias) {
|
|
3953
|
+
async createClipMCPOAuthConnection(orgId, clipId, serverUrl, alias, oauthClient) {
|
|
3941
3954
|
return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_CONFIGS(orgId, clipId), {
|
|
3942
3955
|
server_url: serverUrl,
|
|
3943
3956
|
auth_type: "oauth",
|
|
3944
|
-
...alias ? { alias } : {}
|
|
3957
|
+
...alias ? { alias } : {},
|
|
3958
|
+
...oauthClient ? { oauth_client: oauthClient } : {}
|
|
3945
3959
|
});
|
|
3946
3960
|
}
|
|
3961
|
+
/** Re-authorize an existing MCP credential slot. */
|
|
3962
|
+
async initiateClipMCPOAuthById(orgId, clipId, configId, serverUrl, expectedVersion, oauthClient) {
|
|
3963
|
+
const req = {
|
|
3964
|
+
server_url: serverUrl,
|
|
3965
|
+
auth_type: "oauth",
|
|
3966
|
+
...oauthClient ? { oauth_client: oauthClient } : {}
|
|
3967
|
+
};
|
|
3968
|
+
return this.request("PUT", ENDPOINTS.ORG_CLIP_MCP_CONFIG_BY_ID(orgId, clipId, configId), req, void 0, false, { headers: { "If-Match": `"${expectedVersion}"` }, timeoutMs: 4e4 });
|
|
3969
|
+
}
|
|
3970
|
+
/** Delete one MCP config and its paired connection. */
|
|
3971
|
+
async deleteClipMCPConfigById(orgId, clipId, configId, expectedVersion) {
|
|
3972
|
+
return this.request("DELETE", ENDPOINTS.ORG_CLIP_MCP_CONFIG_BY_ID(orgId, clipId, configId), void 0, void 0, false, { headers: { "If-Match": `"${expectedVersion}"` } });
|
|
3973
|
+
}
|
|
3974
|
+
/** Best-effort provider revocation plus local OAuth disconnect. */
|
|
3975
|
+
async disconnectClipMCPOAuthById(orgId, clipId, configId, expectedVersion) {
|
|
3976
|
+
return this.request("POST", ENDPOINTS.ORG_CLIP_MCP_OAUTH_DISCONNECT_BY_ID(orgId, clipId, configId), void 0, void 0, false, { headers: { "If-Match": `"${expectedVersion}"` } });
|
|
3977
|
+
}
|
|
3978
|
+
/** Rename an MCP connection or promote it to default. */
|
|
3979
|
+
async updateClipMCPConnection(orgId, connectionId, req) {
|
|
3980
|
+
return this.request("PATCH", ENDPOINTS.CLIP_CONNECTION(orgId, connectionId), req);
|
|
3981
|
+
}
|
|
3947
3982
|
/**
|
|
3948
3983
|
* Re-run tools/list and replace the cached snapshot (org-admin only).
|
|
3949
3984
|
* Deliberately does NOT advance the CAS version, so an in-flight edit in
|
|
@@ -4036,6 +4071,20 @@ var init_wechat_types = __esm({
|
|
|
4036
4071
|
});
|
|
4037
4072
|
|
|
4038
4073
|
// ts/sdk/dist/ws.js
|
|
4074
|
+
function describeWsStateDetail(detail) {
|
|
4075
|
+
if (!detail)
|
|
4076
|
+
return "";
|
|
4077
|
+
const parts = [`cause=${detail.cause}`];
|
|
4078
|
+
if (detail.code !== void 0)
|
|
4079
|
+
parts.push(`code=${detail.code}`);
|
|
4080
|
+
if (detail.reason)
|
|
4081
|
+
parts.push(`reason=${JSON.stringify(detail.reason)}`);
|
|
4082
|
+
if (detail.wasClean !== void 0)
|
|
4083
|
+
parts.push(`clean=${detail.wasClean}`);
|
|
4084
|
+
if (detail.attempt !== void 0)
|
|
4085
|
+
parts.push(`attempt=${detail.attempt}`);
|
|
4086
|
+
return ` (${parts.join(" ")})`;
|
|
4087
|
+
}
|
|
4039
4088
|
function isRetryableNetworkError(err) {
|
|
4040
4089
|
return err instanceof Error && err.name === "ApiError" && "status" in err && err.status === 0;
|
|
4041
4090
|
}
|
|
@@ -4088,9 +4137,9 @@ var init_ws = __esm({
|
|
|
4088
4137
|
console.error("Failed to get WS ticket:", err);
|
|
4089
4138
|
}
|
|
4090
4139
|
if (this.options.reconnect) {
|
|
4091
|
-
this.scheduleReconnect();
|
|
4140
|
+
this.scheduleReconnect({ cause: "ticket_failed" });
|
|
4092
4141
|
} else {
|
|
4093
|
-
this.setState("disconnected");
|
|
4142
|
+
this.setState("disconnected", { cause: "ticket_failed" });
|
|
4094
4143
|
}
|
|
4095
4144
|
return;
|
|
4096
4145
|
}
|
|
@@ -4120,9 +4169,9 @@ var init_ws = __esm({
|
|
|
4120
4169
|
if (ws !== this.ws)
|
|
4121
4170
|
return;
|
|
4122
4171
|
if (this.options.reconnect) {
|
|
4123
|
-
this.scheduleReconnect();
|
|
4172
|
+
this.scheduleReconnect({ cause: "connect_timeout" });
|
|
4124
4173
|
} else {
|
|
4125
|
-
this.setState("disconnected");
|
|
4174
|
+
this.setState("disconnected", { cause: "connect_timeout" });
|
|
4126
4175
|
}
|
|
4127
4176
|
}, 15e3);
|
|
4128
4177
|
this.ws.onopen = () => {
|
|
@@ -4138,18 +4187,24 @@ var init_ws = __esm({
|
|
|
4138
4187
|
} catch {
|
|
4139
4188
|
}
|
|
4140
4189
|
};
|
|
4141
|
-
this.ws.onclose = () => {
|
|
4190
|
+
this.ws.onclose = (ev) => {
|
|
4142
4191
|
clearTimeout(connectTimeout);
|
|
4143
4192
|
this.stopHeartbeat();
|
|
4144
4193
|
this.clearProbe();
|
|
4194
|
+
const detail = {
|
|
4195
|
+
cause: this.intentionalClose ? "intentional" : "close",
|
|
4196
|
+
code: ev?.code,
|
|
4197
|
+
reason: ev?.reason,
|
|
4198
|
+
wasClean: ev?.wasClean
|
|
4199
|
+
};
|
|
4145
4200
|
if (this.intentionalClose) {
|
|
4146
|
-
this.setState("disconnected");
|
|
4201
|
+
this.setState("disconnected", detail);
|
|
4147
4202
|
return;
|
|
4148
4203
|
}
|
|
4149
4204
|
if (this.options.reconnect) {
|
|
4150
|
-
this.scheduleReconnect();
|
|
4205
|
+
this.scheduleReconnect(detail);
|
|
4151
4206
|
} else {
|
|
4152
|
-
this.setState("disconnected");
|
|
4207
|
+
this.setState("disconnected", detail);
|
|
4153
4208
|
}
|
|
4154
4209
|
};
|
|
4155
4210
|
this.ws.onerror = () => {
|
|
@@ -4165,7 +4220,7 @@ var init_ws = __esm({
|
|
|
4165
4220
|
this.ws.close();
|
|
4166
4221
|
this.ws = null;
|
|
4167
4222
|
}
|
|
4168
|
-
this.setState("disconnected");
|
|
4223
|
+
this.setState("disconnected", { cause: "intentional" });
|
|
4169
4224
|
}
|
|
4170
4225
|
// ---- Client -> Server messages ----
|
|
4171
4226
|
/** Tell the server which chats the user is currently viewing (no auth implications). */
|
|
@@ -4253,8 +4308,8 @@ var init_ws = __esm({
|
|
|
4253
4308
|
this.heartbeatTimer = null;
|
|
4254
4309
|
}
|
|
4255
4310
|
}
|
|
4256
|
-
scheduleReconnect() {
|
|
4257
|
-
this.setState("reconnecting");
|
|
4311
|
+
scheduleReconnect(detail) {
|
|
4312
|
+
this.setState("reconnecting", { ...detail, attempt: this.reconnectAttempts + 1 });
|
|
4258
4313
|
this.clearReconnect();
|
|
4259
4314
|
const base = Math.min(this.options.reconnectInterval * Math.pow(2, this.reconnectAttempts), this.options.maxReconnectInterval);
|
|
4260
4315
|
const delay = base * (0.5 + Math.random() * 0.5);
|
|
@@ -4270,7 +4325,7 @@ var init_ws = __esm({
|
|
|
4270
4325
|
}
|
|
4271
4326
|
}
|
|
4272
4327
|
/** Force-close a dead/stale connection and trigger reconnect. */
|
|
4273
|
-
forceReconnect() {
|
|
4328
|
+
forceReconnect(cause) {
|
|
4274
4329
|
this.stopHeartbeat();
|
|
4275
4330
|
this.clearReconnect();
|
|
4276
4331
|
this.clearProbe();
|
|
@@ -4286,9 +4341,9 @@ var init_ws = __esm({
|
|
|
4286
4341
|
this.ws = null;
|
|
4287
4342
|
}
|
|
4288
4343
|
if (this.options.reconnect && !this.intentionalClose) {
|
|
4289
|
-
this.scheduleReconnect();
|
|
4344
|
+
this.scheduleReconnect({ cause });
|
|
4290
4345
|
} else {
|
|
4291
|
-
this.setState("disconnected");
|
|
4346
|
+
this.setState("disconnected", { cause });
|
|
4292
4347
|
}
|
|
4293
4348
|
}
|
|
4294
4349
|
// ---- Browser event listeners for proactive reconnection ----
|
|
@@ -4324,7 +4379,7 @@ var init_ws = __esm({
|
|
|
4324
4379
|
return;
|
|
4325
4380
|
this.send({ type: WS_EVENTS.PING, data: { ts: Date.now() } });
|
|
4326
4381
|
this.probeTimer = setTimeout(() => {
|
|
4327
|
-
this.forceReconnect();
|
|
4382
|
+
this.forceReconnect("probe_timeout");
|
|
4328
4383
|
}, 5e3);
|
|
4329
4384
|
}
|
|
4330
4385
|
clearProbe() {
|
|
@@ -4339,7 +4394,7 @@ var init_ws = __esm({
|
|
|
4339
4394
|
return;
|
|
4340
4395
|
if (this._state === "connected") {
|
|
4341
4396
|
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
4342
|
-
this.forceReconnect();
|
|
4397
|
+
this.forceReconnect("zombie_socket");
|
|
4343
4398
|
} else {
|
|
4344
4399
|
this.probeConnection();
|
|
4345
4400
|
}
|
|
@@ -4355,7 +4410,7 @@ var init_ws = __esm({
|
|
|
4355
4410
|
return;
|
|
4356
4411
|
if (this._state === "connected") {
|
|
4357
4412
|
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
4358
|
-
this.forceReconnect();
|
|
4413
|
+
this.forceReconnect("zombie_socket");
|
|
4359
4414
|
} else {
|
|
4360
4415
|
this.probeConnection();
|
|
4361
4416
|
}
|
|
@@ -4365,10 +4420,10 @@ var init_ws = __esm({
|
|
|
4365
4420
|
this.connect();
|
|
4366
4421
|
}
|
|
4367
4422
|
};
|
|
4368
|
-
setState(state) {
|
|
4423
|
+
setState(state, detail) {
|
|
4369
4424
|
this._state = state;
|
|
4370
4425
|
for (const listener of this.stateListeners) {
|
|
4371
|
-
listener(state);
|
|
4426
|
+
listener(state, detail);
|
|
4372
4427
|
}
|
|
4373
4428
|
}
|
|
4374
4429
|
};
|
|
@@ -31037,16 +31092,34 @@ async function initAgentTelemetry(serviceName, runtimeType, opts = {}) {
|
|
|
31037
31092
|
return noopHandle;
|
|
31038
31093
|
}
|
|
31039
31094
|
}
|
|
31095
|
+
function dispatchLogAttributes() {
|
|
31096
|
+
const store = dispatchContextStorage.getStore();
|
|
31097
|
+
if (!store)
|
|
31098
|
+
return {};
|
|
31099
|
+
const attrs = { "session.key": store.sessionKey };
|
|
31100
|
+
const set = (key, value) => {
|
|
31101
|
+
if (value)
|
|
31102
|
+
attrs[key] = value;
|
|
31103
|
+
};
|
|
31104
|
+
set("dispatch.event_id", store.dispatchEventId);
|
|
31105
|
+
set("dispatch.lane", store.lane);
|
|
31106
|
+
set("dispatch.target_uri", store.targetUri);
|
|
31107
|
+
set("dispatch.message_id", store.messageId);
|
|
31108
|
+
set("dispatch.thread_root_id", store.threadRootId);
|
|
31109
|
+
set("dispatch.event_type", store.eventType);
|
|
31110
|
+
return attrs;
|
|
31111
|
+
}
|
|
31040
31112
|
function createOtelLogger(layer, prefix) {
|
|
31041
31113
|
const ts = () => (/* @__PURE__ */ new Date()).toISOString();
|
|
31042
31114
|
const emit = (severity, msg) => {
|
|
31043
31115
|
if (!otelLogger)
|
|
31044
31116
|
return;
|
|
31045
31117
|
const severityNumber = severity === "ERROR" ? import_api_logs.SeverityNumber.ERROR : severity === "WARN" ? import_api_logs.SeverityNumber.WARN : import_api_logs.SeverityNumber.INFO;
|
|
31046
|
-
const attrs = {
|
|
31047
|
-
|
|
31048
|
-
|
|
31049
|
-
|
|
31118
|
+
const attrs = {
|
|
31119
|
+
"log.layer": layer,
|
|
31120
|
+
"log.prefix": prefix,
|
|
31121
|
+
...dispatchLogAttributes()
|
|
31122
|
+
};
|
|
31050
31123
|
otelLogger.emit({
|
|
31051
31124
|
severityNumber,
|
|
31052
31125
|
severityText: severity,
|
|
@@ -31070,7 +31143,7 @@ function createOtelLogger(layer, prefix) {
|
|
|
31070
31143
|
child: (sub) => createOtelLogger(layer, `${prefix}:${sub}`)
|
|
31071
31144
|
};
|
|
31072
31145
|
}
|
|
31073
|
-
var import_api_logs, initialized, shutdownFn, tracer, dispatchCounter, dispatchDuration, missingReplyCounter, turnTokensCounter, turnCostCounter, otelLogger, PRODUCTION_API_HOSTS, STAGING_API_HOSTS, DIAG_THROTTLE_MS, DIAG_THROTTLE_KEYS,
|
|
31146
|
+
var import_api_logs, initialized, shutdownFn, tracer, dispatchCounter, dispatchDuration, missingReplyCounter, turnTokensCounter, turnCostCounter, otelLogger, PRODUCTION_API_HOSTS, STAGING_API_HOSTS, DIAG_THROTTLE_MS, DIAG_THROTTLE_KEYS, dispatchContextStorage;
|
|
31074
31147
|
var init_telemetry = __esm({
|
|
31075
31148
|
"ts/agent-core/dist/telemetry.js"() {
|
|
31076
31149
|
"use strict";
|
|
@@ -31090,7 +31163,7 @@ var init_telemetry = __esm({
|
|
|
31090
31163
|
STAGING_API_HOSTS = /* @__PURE__ */ new Set(["api.staging.prll.sh"]);
|
|
31091
31164
|
DIAG_THROTTLE_MS = 6e4;
|
|
31092
31165
|
DIAG_THROTTLE_KEYS = 200;
|
|
31093
|
-
|
|
31166
|
+
dispatchContextStorage = new AsyncLocalStorage();
|
|
31094
31167
|
}
|
|
31095
31168
|
});
|
|
31096
31169
|
|
|
@@ -68342,9 +68415,9 @@ var init_supervisor = __esm({
|
|
|
68342
68415
|
this.log.info(`WS: browser profile viewer command \u2014 profile=${data.profile_id} command=${data.command}`);
|
|
68343
68416
|
void this.enqueueBrowserProfileOp(data.profile_id, () => handleBrowserProfileViewerCommand({ pool: this.browserProfilePool, client: this.client, log: this.log }, data));
|
|
68344
68417
|
});
|
|
68345
|
-
this.ws.onStateChange((state) => {
|
|
68418
|
+
this.ws.onStateChange((state, detail) => {
|
|
68346
68419
|
if (state === "disconnected" || state === "reconnecting") {
|
|
68347
|
-
this.log.warn(`machine WS state: ${state}`);
|
|
68420
|
+
this.log.warn(`machine WS state: ${state}${describeWsStateDetail(detail)}`);
|
|
68348
68421
|
}
|
|
68349
68422
|
});
|
|
68350
68423
|
await this.ws.connect();
|