@parall/sdk 1.34.0 → 1.36.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/client.d.ts +97 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +177 -8
- package/dist/constants.d.ts +19 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +28 -0
- package/dist/types.d.ts +343 -21
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +338 -12
- package/src/constants.ts +41 -0
- package/src/types.ts +398 -20
package/dist/client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ENDPOINTS } from './constants.js';
|
|
1
|
+
import { ENDPOINTS, WIKI_BASE } from './constants.js';
|
|
2
2
|
export class ParallClient {
|
|
3
3
|
baseUrl;
|
|
4
|
+
wikiBaseUrl;
|
|
4
5
|
token;
|
|
5
6
|
onTokenExpired;
|
|
6
7
|
getRefreshToken;
|
|
@@ -56,12 +57,25 @@ export class ParallClient {
|
|
|
56
57
|
}
|
|
57
58
|
constructor(options = {}) {
|
|
58
59
|
this.baseUrl = options.baseUrl ?? '';
|
|
60
|
+
// Defaults to baseUrl so existing single-origin consumers (web, desktop,
|
|
61
|
+
// hosted agents behind one gateway) are unchanged; only split api/wiki
|
|
62
|
+
// deployments (local dev) need to set it.
|
|
63
|
+
this.wikiBaseUrl = options.wikiBaseUrl ?? this.baseUrl;
|
|
59
64
|
this.token = options.token ?? null;
|
|
60
65
|
this.onTokenExpired = options.onTokenExpired;
|
|
61
66
|
this.getRefreshToken = options.getRefreshToken;
|
|
62
67
|
this.setTokens = options.setTokens;
|
|
63
68
|
this.swimlaneName = options.swimlaneName;
|
|
64
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Pick the origin for a request path: wiki-service base for `/wiki/v1`
|
|
72
|
+
* endpoints, api base for everything else. The path itself (from ENDPOINTS)
|
|
73
|
+
* is authoritative, so wiki vs api routing can't drift from how a caller
|
|
74
|
+
* happens to invoke the client.
|
|
75
|
+
*/
|
|
76
|
+
baseUrlFor(path) {
|
|
77
|
+
return path.startsWith(WIKI_BASE) ? this.wikiBaseUrl : this.baseUrl;
|
|
78
|
+
}
|
|
65
79
|
setToken(token) {
|
|
66
80
|
this.token = token;
|
|
67
81
|
}
|
|
@@ -131,7 +145,7 @@ export class ParallClient {
|
|
|
131
145
|
if (!retried) {
|
|
132
146
|
await this.ensureFreshToken(path);
|
|
133
147
|
}
|
|
134
|
-
let url = `${this.
|
|
148
|
+
let url = `${this.baseUrlFor(path)}${path}`;
|
|
135
149
|
if (query) {
|
|
136
150
|
const params = new URLSearchParams();
|
|
137
151
|
for (const [key, value] of Object.entries(query)) {
|
|
@@ -158,6 +172,9 @@ export class ParallClient {
|
|
|
158
172
|
headers,
|
|
159
173
|
body: body ? JSON.stringify(body) : undefined,
|
|
160
174
|
signal,
|
|
175
|
+
// keepalive lets a request fired during page unload (e.g. the browser
|
|
176
|
+
// viewer's stream.close on pagehide) outlive the document.
|
|
177
|
+
keepalive: opts?.keepalive,
|
|
161
178
|
});
|
|
162
179
|
}
|
|
163
180
|
catch (err) {
|
|
@@ -211,7 +228,7 @@ export class ParallClient {
|
|
|
211
228
|
void _drop;
|
|
212
229
|
let res;
|
|
213
230
|
try {
|
|
214
|
-
res = await fetch(`${this.
|
|
231
|
+
res = await fetch(`${this.baseUrlFor(path)}${path}`, {
|
|
215
232
|
method,
|
|
216
233
|
headers,
|
|
217
234
|
body,
|
|
@@ -335,6 +352,10 @@ export class ParallClient {
|
|
|
335
352
|
const res = await this.request('GET', ENDPOINTS.ORG_MEMBERS(orgId));
|
|
336
353
|
return res.data;
|
|
337
354
|
}
|
|
355
|
+
async getTeams(orgId) {
|
|
356
|
+
const res = await this.request('GET', ENDPOINTS.TEAMS(orgId));
|
|
357
|
+
return res.data;
|
|
358
|
+
}
|
|
338
359
|
async getOnlineMembers(orgId) {
|
|
339
360
|
const res = await this.request('GET', ENDPOINTS.ORG_MEMBERS_ONLINE(orgId));
|
|
340
361
|
return res.user_ids ?? [];
|
|
@@ -368,6 +389,21 @@ export class ParallClient {
|
|
|
368
389
|
q.limit = String(params.limit);
|
|
369
390
|
return this.request('GET', ENDPOINTS.ORG_MEMBER_TASKS(orgId, memberId), undefined, q);
|
|
370
391
|
}
|
|
392
|
+
// Auto-paginated variant of getMemberTasks: fetches ALL pending tasks
|
|
393
|
+
// (todo + in_progress) assigned to a member, including subtasks (the
|
|
394
|
+
// endpoint does not filter parent_id). Powers the CLI `tasks assigned`
|
|
395
|
+
// command so an agent answering "what's on X's plate" sees the full
|
|
396
|
+
// backlog, not just the first page.
|
|
397
|
+
async getMemberTasksAll(orgId, memberId) {
|
|
398
|
+
const all = [];
|
|
399
|
+
let cursor;
|
|
400
|
+
do {
|
|
401
|
+
const res = await this.getMemberTasks(orgId, memberId, { cursor, limit: 100 });
|
|
402
|
+
all.push(...res.data);
|
|
403
|
+
cursor = res.has_more ? res.next_cursor : undefined;
|
|
404
|
+
} while (cursor);
|
|
405
|
+
return all;
|
|
406
|
+
}
|
|
371
407
|
// ---- Invitations ----
|
|
372
408
|
async createInvitation(orgId, email, role) {
|
|
373
409
|
return this.request('POST', ENDPOINTS.ORG_INVITATIONS(orgId), { email, role });
|
|
@@ -573,6 +609,10 @@ export class ParallClient {
|
|
|
573
609
|
async createAgentApiKey(orgId, agentId) {
|
|
574
610
|
return this.request('POST', ENDPOINTS.AGENT_API_KEYS(orgId, agentId));
|
|
575
611
|
}
|
|
612
|
+
/** Revokes all of the agent's active API keys and mints a replacement. */
|
|
613
|
+
async regenerateAgentApiKey(orgId, agentId) {
|
|
614
|
+
return this.request('POST', ENDPOINTS.AGENT_API_KEY_REGENERATE(orgId, agentId));
|
|
615
|
+
}
|
|
576
616
|
async revokeAgentApiKey(orgId, agentId, key) {
|
|
577
617
|
return this.request('DELETE', ENDPOINTS.AGENT_API_KEY(orgId, agentId, key));
|
|
578
618
|
}
|
|
@@ -744,6 +784,17 @@ export class ParallClient {
|
|
|
744
784
|
provider_enabled: providerEnabled,
|
|
745
785
|
});
|
|
746
786
|
}
|
|
787
|
+
/**
|
|
788
|
+
* Replace the machine's capability set (admin). Primary use: healing a
|
|
789
|
+
* machine that registered without `browser_provider` during the capability
|
|
790
|
+
* migration's rolling-deploy window. Removing `agent_host` is rejected by the
|
|
791
|
+
* server while agents are attached (409 AGENTS_STILL_ATTACHED).
|
|
792
|
+
*/
|
|
793
|
+
async patchMachineCapabilities(orgId, machineId, capabilities) {
|
|
794
|
+
return this.request('PATCH', ENDPOINTS.MACHINE_CAPABILITIES(orgId, machineId), {
|
|
795
|
+
capabilities,
|
|
796
|
+
});
|
|
797
|
+
}
|
|
747
798
|
/** Get machine-level runtime auth state. */
|
|
748
799
|
async getMachineRuntimeAuth(orgId, machineId) {
|
|
749
800
|
return this.request('GET', ENDPOINTS.MACHINE_RUNTIME_AUTH(orgId, machineId));
|
|
@@ -834,6 +885,22 @@ export class ParallClient {
|
|
|
834
885
|
async postBrowseResponse(requestId, response) {
|
|
835
886
|
return this.request('POST', ENDPOINTS.MACHINES_ME_BROWSE_RESPONSE(requestId), response);
|
|
836
887
|
}
|
|
888
|
+
/**
|
|
889
|
+
* `POST /machines/me/browser-profiles/viewer-response/{requestId}` — daemon
|
|
890
|
+
* reply to a `machine.browser_profile.viewer` control command. Wakes the
|
|
891
|
+
* api-server request/reply bridge (mirrors {@link postBrowseResponse}).
|
|
892
|
+
*/
|
|
893
|
+
async postBrowserProfileViewerResponse(requestId, response) {
|
|
894
|
+
return this.request('POST', ENDPOINTS.MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE(requestId), response);
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* `POST /orgs/{orgId}/browser-profiles/{profileId}/viewer/command` — drive the
|
|
898
|
+
* hosted browser live viewer (WebRTC signaling + tab nav). Authz: profile
|
|
899
|
+
* owner or org admin. api-server brokers the command to the host daemon.
|
|
900
|
+
*/
|
|
901
|
+
async browserViewerCommand(orgId, profileId, req, opts) {
|
|
902
|
+
return this.request('POST', ENDPOINTS.BROWSER_PROFILE_VIEWER_COMMAND(orgId, profileId), req, undefined, false, opts);
|
|
903
|
+
}
|
|
837
904
|
async resizeMachine(orgId, machineId, spec) {
|
|
838
905
|
return this.request('PATCH', ENDPOINTS.MACHINE_SPEC(orgId, machineId), spec);
|
|
839
906
|
}
|
|
@@ -926,7 +993,7 @@ export class ParallClient {
|
|
|
926
993
|
* Returns null when the server responds with 304 (config unchanged).
|
|
927
994
|
*/
|
|
928
995
|
async getPlatformConfig(currentVersion) {
|
|
929
|
-
const url = `${this.
|
|
996
|
+
const url = `${this.baseUrlFor(ENDPOINTS.PLATFORM_CONFIG)}${ENDPOINTS.PLATFORM_CONFIG}`;
|
|
930
997
|
const extra = {};
|
|
931
998
|
if (currentVersion !== undefined) {
|
|
932
999
|
extra['If-None-Match'] = currentVersion;
|
|
@@ -1093,6 +1160,55 @@ export class ParallClient {
|
|
|
1093
1160
|
async getScheduleRun(orgId, runId) {
|
|
1094
1161
|
return this.request('GET', ENDPOINTS.SCHEDULE_RUN(orgId, runId));
|
|
1095
1162
|
}
|
|
1163
|
+
// ---- External triggers (org-scoped) ----
|
|
1164
|
+
async createExternalConnection(orgId, input) {
|
|
1165
|
+
return this.request('POST', ENDPOINTS.EXTERNAL_CONNECTIONS(orgId), input);
|
|
1166
|
+
}
|
|
1167
|
+
async listExternalConnections(orgId, filters) {
|
|
1168
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_CONNECTIONS(orgId), undefined, filters);
|
|
1169
|
+
}
|
|
1170
|
+
async getExternalConnection(orgId, connectionId) {
|
|
1171
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_CONNECTION(orgId, connectionId));
|
|
1172
|
+
}
|
|
1173
|
+
async updateExternalConnection(orgId, connectionId, patch) {
|
|
1174
|
+
return this.request('PATCH', ENDPOINTS.EXTERNAL_CONNECTION(orgId, connectionId), patch);
|
|
1175
|
+
}
|
|
1176
|
+
async regenerateExternalConnectionIngressToken(orgId, connectionId) {
|
|
1177
|
+
return this.request('POST', ENDPOINTS.EXTERNAL_CONNECTION_INGRESS_TOKEN_REGENERATE(orgId, connectionId));
|
|
1178
|
+
}
|
|
1179
|
+
async deleteExternalConnection(orgId, connectionId) {
|
|
1180
|
+
return this.request('DELETE', ENDPOINTS.EXTERNAL_CONNECTION(orgId, connectionId));
|
|
1181
|
+
}
|
|
1182
|
+
async getExternalTriggerSchema(orgId, connectionId) {
|
|
1183
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_TRIGGER_SCHEMA(orgId, connectionId));
|
|
1184
|
+
}
|
|
1185
|
+
async listExternalIngressEvents(orgId, filters) {
|
|
1186
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_INGRESS_EVENTS(orgId), undefined, filters);
|
|
1187
|
+
}
|
|
1188
|
+
async getExternalIngressEvent(orgId, eventId) {
|
|
1189
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_INGRESS_EVENT(orgId, eventId));
|
|
1190
|
+
}
|
|
1191
|
+
async createExternalTrigger(orgId, input) {
|
|
1192
|
+
return this.request('POST', ENDPOINTS.EXTERNAL_TRIGGERS(orgId), input);
|
|
1193
|
+
}
|
|
1194
|
+
async listExternalTriggers(orgId, filters) {
|
|
1195
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_TRIGGERS(orgId), undefined, filters);
|
|
1196
|
+
}
|
|
1197
|
+
async getExternalTrigger(orgId, triggerId) {
|
|
1198
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_TRIGGER(orgId, triggerId));
|
|
1199
|
+
}
|
|
1200
|
+
async updateExternalTrigger(orgId, triggerId, patch) {
|
|
1201
|
+
return this.request('PATCH', ENDPOINTS.EXTERNAL_TRIGGER(orgId, triggerId), patch);
|
|
1202
|
+
}
|
|
1203
|
+
async deleteExternalTrigger(orgId, triggerId) {
|
|
1204
|
+
return this.request('DELETE', ENDPOINTS.EXTERNAL_TRIGGER(orgId, triggerId));
|
|
1205
|
+
}
|
|
1206
|
+
async listExternalTriggerRuns(orgId, filters) {
|
|
1207
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_TRIGGER_RUNS(orgId), undefined, filters);
|
|
1208
|
+
}
|
|
1209
|
+
async getExternalTriggerRun(orgId, runId) {
|
|
1210
|
+
return this.request('GET', ENDPOINTS.EXTERNAL_TRIGGER_RUN(orgId, runId));
|
|
1211
|
+
}
|
|
1096
1212
|
// ---- Wikis (org-scoped) ----
|
|
1097
1213
|
async createWiki(orgId, data) {
|
|
1098
1214
|
return this.request('POST', ENDPOINTS.WIKIS(orgId), data);
|
|
@@ -1107,16 +1223,48 @@ export class ParallClient {
|
|
|
1107
1223
|
async getWikiTree(orgId, wikiId, params) {
|
|
1108
1224
|
return this.request('GET', ENDPOINTS.WIKI_TREE(orgId, wikiId), undefined, params);
|
|
1109
1225
|
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Resolve a server-returned, host-relative media URL (a wiki `signed_url`
|
|
1228
|
+
* like `/wiki/v1/signed/files?token=...`) against this client's base origin,
|
|
1229
|
+
* so it can be dropped straight into a browser `<img>`/`<video>`/`<iframe>`
|
|
1230
|
+
* `src`.
|
|
1231
|
+
*
|
|
1232
|
+
* wiki-service returns these relative on purpose — it doesn't know its own
|
|
1233
|
+
* public origin. A relative `src` resolves against the *page* origin, which
|
|
1234
|
+
* only works when the page and wiki-service share an origin (local dev:
|
|
1235
|
+
* same-origin + Next.js `/wiki/*` proxy). In deployed envs the app
|
|
1236
|
+
* (app.parall.com) and wiki-service (api.parall.com) are different origins,
|
|
1237
|
+
* so `app.parall.com/wiki/v1/signed/files` hits the SPA's own `/wiki/[...]`
|
|
1238
|
+
* catch-all route — an `<iframe>` then recursively renders the whole app
|
|
1239
|
+
* instead of the file. Prefixing with the wiki base (the exact origin every
|
|
1240
|
+
* wiki API request already uses — `baseUrlFor` resolves `/wiki/v1` paths to
|
|
1241
|
+
* `wikiBaseUrl`) makes the URL absolute against the origin that actually
|
|
1242
|
+
* serves the bytes. An empty base (local dev, same-origin proxy) leaves it
|
|
1243
|
+
* relative, preserving the proxy path.
|
|
1244
|
+
*/
|
|
1245
|
+
absoluteMediaUrl(url) {
|
|
1246
|
+
if (/^https?:\/\//i.test(url))
|
|
1247
|
+
return url; // already absolute — leave as-is
|
|
1248
|
+
return `${this.baseUrlFor(url)}${url}`;
|
|
1249
|
+
}
|
|
1110
1250
|
async getWikiBlob(orgId, wikiId, params) {
|
|
1111
|
-
|
|
1251
|
+
const blob = await this.request('GET', ENDPOINTS.WIKI_BLOB(orgId, wikiId), undefined, params);
|
|
1252
|
+
if (blob.signed_url)
|
|
1253
|
+
blob.signed_url = this.absoluteMediaUrl(blob.signed_url);
|
|
1254
|
+
return blob;
|
|
1112
1255
|
}
|
|
1113
1256
|
async getWikiNodeSections(orgId, wikiId, params) {
|
|
1114
1257
|
return this.request('GET', ENDPOINTS.WIKI_NODE_SECTIONS(orgId, wikiId), undefined, params);
|
|
1115
1258
|
}
|
|
1116
|
-
async search(orgId,
|
|
1259
|
+
async search(orgId,
|
|
1260
|
+
// `types` selects entities (message/task/wiki); `wiki_type` is the distinct
|
|
1261
|
+
// wiki document-type facet (frontmatter `type`) — the two never overlap.
|
|
1262
|
+
params, opts) {
|
|
1117
1263
|
return this.request('GET', ENDPOINTS.SEARCH(orgId), undefined, params, false, opts);
|
|
1118
1264
|
}
|
|
1119
|
-
async searchWiki(orgId, wikiId,
|
|
1265
|
+
async searchWiki(orgId, wikiId,
|
|
1266
|
+
// `type` is the wiki document-type facet (frontmatter `type`).
|
|
1267
|
+
params) {
|
|
1120
1268
|
return this.request('GET', ENDPOINTS.WIKI_SEARCH(orgId, wikiId), undefined, params);
|
|
1121
1269
|
}
|
|
1122
1270
|
async getWikiPageIndex(orgId, wikiId, params) {
|
|
@@ -1202,7 +1350,10 @@ export class ParallClient {
|
|
|
1202
1350
|
* token — don't leak it.
|
|
1203
1351
|
*/
|
|
1204
1352
|
async getWikiFilePreviewUrl(orgId, wikiId, params) {
|
|
1205
|
-
|
|
1353
|
+
const res = await this.request('POST', ENDPOINTS.WIKI_FILE_PREVIEW_URL(orgId, wikiId), params);
|
|
1354
|
+
if (res.url)
|
|
1355
|
+
res.url = this.absoluteMediaUrl(res.url);
|
|
1356
|
+
return res;
|
|
1206
1357
|
}
|
|
1207
1358
|
// ---- Wiki Path Scopes (AFCS ACL) ----
|
|
1208
1359
|
async getWikiPathScopes(orgId, wikiId) {
|
|
@@ -1215,6 +1366,17 @@ export class ParallClient {
|
|
|
1215
1366
|
async deleteWikiPathScope(orgId, wikiId, scopeId) {
|
|
1216
1367
|
await this.request('DELETE', ENDPOINTS.WIKI_PATH_SCOPE(orgId, wikiId, scopeId));
|
|
1217
1368
|
}
|
|
1369
|
+
// ---- Wiki Path Restrictions (narrowing ACL — private subtrees) ----
|
|
1370
|
+
async getWikiRestrictions(orgId, wikiId) {
|
|
1371
|
+
const res = await this.request('GET', ENDPOINTS.WIKI_RESTRICTIONS(orgId, wikiId));
|
|
1372
|
+
return res.data;
|
|
1373
|
+
}
|
|
1374
|
+
async createWikiRestriction(orgId, wikiId, data) {
|
|
1375
|
+
return this.request('POST', ENDPOINTS.WIKI_RESTRICTIONS(orgId, wikiId), data);
|
|
1376
|
+
}
|
|
1377
|
+
async deleteWikiRestriction(orgId, wikiId, restrictionId) {
|
|
1378
|
+
await this.request('DELETE', ENDPOINTS.WIKI_RESTRICTION(orgId, wikiId, restrictionId));
|
|
1379
|
+
}
|
|
1218
1380
|
async getWikiAccessStatus(orgId, wikiId, path) {
|
|
1219
1381
|
return this.request('GET', ENDPOINTS.WIKI_ACCESS_STATUS(orgId, wikiId), undefined, path ? { path } : undefined);
|
|
1220
1382
|
}
|
|
@@ -1377,6 +1539,10 @@ export class ParallClient {
|
|
|
1377
1539
|
async updateClip(orgId, clipId, req) {
|
|
1378
1540
|
return this.request('PATCH', ENDPOINTS.CLIP(orgId, clipId), req);
|
|
1379
1541
|
}
|
|
1542
|
+
/** Atomically set display_name and/or description on multiple clip instances (application metadata). */
|
|
1543
|
+
async bulkUpdateClipMetadata(orgId, req) {
|
|
1544
|
+
return this.request('POST', ENDPOINTS.CLIPS_BULK_METADATA(orgId), req);
|
|
1545
|
+
}
|
|
1380
1546
|
async deleteClip(orgId, clipId) {
|
|
1381
1547
|
await this.request('DELETE', ENDPOINTS.CLIP(orgId, clipId));
|
|
1382
1548
|
}
|
|
@@ -1403,6 +1569,9 @@ export class ParallClient {
|
|
|
1403
1569
|
const resp = await this.request('GET', ENDPOINTS.CLIP_ONLINE(orgId));
|
|
1404
1570
|
return resp.data;
|
|
1405
1571
|
}
|
|
1572
|
+
/** Org-wide browser-profile discovery list. Returns the sanitized
|
|
1573
|
+
* {@link BrowserProfileListItem} shape (not the full domain model), each row
|
|
1574
|
+
* carrying a per-viewer `can_open` control hint. */
|
|
1406
1575
|
async listBrowserProfiles(orgId) {
|
|
1407
1576
|
const resp = await this.request('GET', ENDPOINTS.BROWSER_PROFILES(orgId));
|
|
1408
1577
|
return resp.data;
|
package/dist/constants.d.ts
CHANGED
|
@@ -339,6 +339,7 @@ export declare const ENDPOINTS: {
|
|
|
339
339
|
readonly ORGS: "/api/v1/orgs";
|
|
340
340
|
readonly ORG: (orgId: string) => string;
|
|
341
341
|
readonly ORG_MEMBERS: (orgId: string) => string;
|
|
342
|
+
readonly TEAMS: (orgId: string) => string;
|
|
342
343
|
readonly ORG_MEMBERS_ONLINE: (orgId: string) => string;
|
|
343
344
|
readonly ORG_MEMBER: (orgId: string, userId: string) => string;
|
|
344
345
|
readonly ORG_MEMBER_CHATS: (orgId: string, memberId: string) => string;
|
|
@@ -375,6 +376,7 @@ export declare const ENDPOINTS: {
|
|
|
375
376
|
readonly AGENT: (orgId: string, agentId: string) => string;
|
|
376
377
|
readonly AGENT_API_KEYS: (orgId: string, agentId: string) => string;
|
|
377
378
|
readonly AGENT_API_KEY: (orgId: string, agentId: string, key: string) => string;
|
|
379
|
+
readonly AGENT_API_KEY_REGENERATE: (orgId: string, agentId: string) => string;
|
|
378
380
|
readonly AGENT_AVATAR: (orgId: string, agentId: string) => string;
|
|
379
381
|
readonly AGENT_ACTIVITY: (orgId: string, agentId: string) => string;
|
|
380
382
|
readonly AGENT_MONITOR: (orgId: string, agentId: string) => string;
|
|
@@ -410,6 +412,7 @@ export declare const ENDPOINTS: {
|
|
|
410
412
|
readonly MACHINE_AGENT_WORKSPACE_SETUP: (orgId: string, machineId: string, agentId: string) => string;
|
|
411
413
|
readonly MACHINE_LLM_SOURCE: (orgId: string, machineId: string) => string;
|
|
412
414
|
readonly MACHINE_PROVIDER_ENABLED: (orgId: string, machineId: string) => string;
|
|
415
|
+
readonly MACHINE_CAPABILITIES: (orgId: string, machineId: string) => string;
|
|
413
416
|
readonly MACHINE_RUNTIME_AUTH: (orgId: string, machineId: string) => string;
|
|
414
417
|
readonly MACHINE_KEYS: (orgId: string, machineId: string) => string;
|
|
415
418
|
readonly MACHINE_KEY: (orgId: string, machineId: string, keyId: string) => string;
|
|
@@ -427,6 +430,7 @@ export declare const ENDPOINTS: {
|
|
|
427
430
|
readonly MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId: string) => string;
|
|
428
431
|
readonly MACHINES_ME_WS_TICKET: "/api/v1/machines/me/ws/ticket";
|
|
429
432
|
readonly MACHINES_ME_BROWSE_RESPONSE: (requestId: string) => string;
|
|
433
|
+
readonly MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE: (requestId: string) => string;
|
|
430
434
|
readonly TASKS: (orgId: string) => string;
|
|
431
435
|
readonly TASK: (orgId: string, taskId: string) => string;
|
|
432
436
|
readonly TASK_ARCHIVE: (orgId: string, taskId: string) => string;
|
|
@@ -450,6 +454,16 @@ export declare const ENDPOINTS: {
|
|
|
450
454
|
readonly SCHEDULE_CANCEL: (orgId: string, id: string) => string;
|
|
451
455
|
readonly SCHEDULE_RUNS: (orgId: string, id: string) => string;
|
|
452
456
|
readonly SCHEDULE_RUN: (orgId: string, runId: string) => string;
|
|
457
|
+
readonly EXTERNAL_CONNECTIONS: (orgId: string) => string;
|
|
458
|
+
readonly EXTERNAL_CONNECTION: (orgId: string, connectionId: string) => string;
|
|
459
|
+
readonly EXTERNAL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId: string, connectionId: string) => string;
|
|
460
|
+
readonly EXTERNAL_TRIGGER_SCHEMA: (orgId: string, connectionId: string) => string;
|
|
461
|
+
readonly EXTERNAL_INGRESS_EVENTS: (orgId: string) => string;
|
|
462
|
+
readonly EXTERNAL_INGRESS_EVENT: (orgId: string, eventId: string) => string;
|
|
463
|
+
readonly EXTERNAL_TRIGGERS: (orgId: string) => string;
|
|
464
|
+
readonly EXTERNAL_TRIGGER: (orgId: string, triggerId: string) => string;
|
|
465
|
+
readonly EXTERNAL_TRIGGER_RUNS: (orgId: string) => string;
|
|
466
|
+
readonly EXTERNAL_TRIGGER_RUN: (orgId: string, runId: string) => string;
|
|
453
467
|
readonly ORG_INVITATIONS: (orgId: string) => string;
|
|
454
468
|
readonly ORG_INVITATION: (orgId: string, invId: string) => string;
|
|
455
469
|
readonly ORG_INVITATION_RESEND: (orgId: string, invId: string) => string;
|
|
@@ -483,6 +497,8 @@ export declare const ENDPOINTS: {
|
|
|
483
497
|
readonly WIKI_FILE_PREVIEW_URL: (orgId: string, wikiId: string) => string;
|
|
484
498
|
readonly WIKI_PATH_SCOPES: (orgId: string, wikiId: string) => string;
|
|
485
499
|
readonly WIKI_PATH_SCOPE: (orgId: string, wikiId: string, scopeId: string) => string;
|
|
500
|
+
readonly WIKI_RESTRICTIONS: (orgId: string, wikiId: string) => string;
|
|
501
|
+
readonly WIKI_RESTRICTION: (orgId: string, wikiId: string, restrictionId: string) => string;
|
|
486
502
|
readonly WIKI_ACCESS_STATUS: (orgId: string, wikiId: string) => string;
|
|
487
503
|
readonly WIKI_ACCESS_REQUESTS: (orgId: string, wikiId: string) => string;
|
|
488
504
|
readonly WIKI_COMMITS: (orgId: string, wikiId: string) => string;
|
|
@@ -530,6 +546,7 @@ export declare const ENDPOINTS: {
|
|
|
530
546
|
readonly COMPUTE_PRICING: () => string;
|
|
531
547
|
readonly CLIPS: (orgId: string) => string;
|
|
532
548
|
readonly CLIP: (orgId: string, clipId: string) => string;
|
|
549
|
+
readonly CLIPS_BULK_METADATA: (orgId: string) => string;
|
|
533
550
|
readonly CLIP_AGENTS: (orgId: string, clipId: string) => string;
|
|
534
551
|
readonly AGENT_CLIPS: (orgId: string, agentId: string) => string;
|
|
535
552
|
readonly AGENT_CLIP: (orgId: string, agentId: string, clipId: string) => string;
|
|
@@ -542,6 +559,7 @@ export declare const ENDPOINTS: {
|
|
|
542
559
|
readonly BROWSER_PROFILE_RESET: (orgId: string, profileId: string) => string;
|
|
543
560
|
readonly BROWSER_PROFILE_CONSENTS: (orgId: string, profileId: string) => string;
|
|
544
561
|
readonly BROWSER_PROFILE_CONSENT: (orgId: string, profileId: string, clipId: string) => string;
|
|
562
|
+
readonly BROWSER_PROFILE_VIEWER_COMMAND: (orgId: string, profileId: string) => string;
|
|
545
563
|
readonly CLIP_REGISTRY: () => string;
|
|
546
564
|
};
|
|
547
565
|
export declare const WS_EVENTS: {
|
|
@@ -614,6 +632,7 @@ export declare const WS_EVENTS: {
|
|
|
614
632
|
readonly MACHINE_CONFIG_UPDATED: "machine.config.updated";
|
|
615
633
|
readonly MACHINE_CLIP_SYNC: "machine.clip.sync";
|
|
616
634
|
readonly MACHINE_BROWSER_PROFILE_LIFECYCLE: "machine.browser_profile.lifecycle";
|
|
635
|
+
readonly MACHINE_BROWSER_PROFILE_VIEWER: "machine.browser_profile.viewer";
|
|
617
636
|
readonly AGENT_NEW_SESSION: "agent.new_session";
|
|
618
637
|
readonly CLIP_CREATED: "clip.created";
|
|
619
638
|
readonly CLIP_REMOVED: "clip.removed";
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,e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AAM;wCACX,MAAM;mCACX,MAAM;yCACA,MAAM,MAAM,MAAM;sCACrB,MAAM;2CACD,MAAM;;iCAIhB,MAAM;gCACP,MAAM,UAAU,MAAM;oCAClB,MAAM,UAAU,MAAM,gBAAgB,MAAM;mCAI7C,MAAM;qCACJ,MAAM;iCACV,MAAM;;;;;;6BAcV,MAAM;oCAGC,MAAM;8BAGZ,MAAM;2CACO,MAAM;uCACV,MAAM;0CACH,MAAM;2CACL,MAAM;;4BAQrB,MAAM;2BACP,MAAM,UAAU,MAAM;0CACP,MAAM;kCACd,MAAM,UAAU,MAAM;kCAEtB,MAAM,WAAW,MAAM;iCAExB,MAAM,WAAW,MAAM,UAAU,MAAM;kCAEtC,MAAM;kCACN,MAAM;uCACD,MAAM;sCACP,MAAM,aAAa,MAAM;2CAEpB,MAAM,aAAa,MAAM;2CAEzB,MAAM,aAAa,MAAM;4CAExB,MAAM,aAAa,MAAM;+CAEtB,MAAM,aAAa,MAAM;8CAE1B,MAAM,aAAa,MAAM,UAAU,MAAM;qDAIlC,MAAM,aAAa,MAAM;;CAKzD,CAAC;AAGX,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EZ,CAAC;AA6DX,eAAO,MAAM,cAAc;4BACV,MAAM;+BACH,MAAM,UAAU,MAAM;gCACrB,MAAM,QAAQ,MAAM;mCAGjB,MAAM,QAAQ,MAAM,OAAO,MAAM,mBAAmB,MAAM,EAAE;qCAKxE,MAAM,QACR,MAAM,OACP,MAAM,aACA,MAAM,WACR,MAAM;CAKT,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -334,6 +334,7 @@ export const ENDPOINTS = {
|
|
|
334
334
|
// Org-scoped
|
|
335
335
|
ORG: (orgId) => `${API_BASE}/orgs/${orgId}`,
|
|
336
336
|
ORG_MEMBERS: (orgId) => `${API_BASE}/orgs/${orgId}/members`,
|
|
337
|
+
TEAMS: (orgId) => `${API_BASE}/orgs/${orgId}/teams`,
|
|
337
338
|
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE}/orgs/${orgId}/members/online`,
|
|
338
339
|
ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
|
|
339
340
|
ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/chats`,
|
|
@@ -378,6 +379,7 @@ export const ENDPOINTS = {
|
|
|
378
379
|
AGENT: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}`,
|
|
379
380
|
AGENT_API_KEYS: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/api-keys`,
|
|
380
381
|
AGENT_API_KEY: (orgId, agentId, key) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/api-keys/${key}`,
|
|
382
|
+
AGENT_API_KEY_REGENERATE: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/api-keys/regenerate`,
|
|
381
383
|
AGENT_AVATAR: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/avatar`,
|
|
382
384
|
AGENT_ACTIVITY: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/activity`,
|
|
383
385
|
AGENT_MONITOR: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/monitor`,
|
|
@@ -417,6 +419,7 @@ export const ENDPOINTS = {
|
|
|
417
419
|
MACHINE_AGENT_WORKSPACE_SETUP: (orgId, machineId, agentId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/agents/${agentId}/workspace/setup`,
|
|
418
420
|
MACHINE_LLM_SOURCE: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/llm-source`,
|
|
419
421
|
MACHINE_PROVIDER_ENABLED: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/provider-enabled`,
|
|
422
|
+
MACHINE_CAPABILITIES: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/capabilities`,
|
|
420
423
|
MACHINE_RUNTIME_AUTH: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/runtime-auth`,
|
|
421
424
|
MACHINE_KEYS: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/keys`,
|
|
422
425
|
MACHINE_KEY: (orgId, machineId, keyId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/keys/${keyId}`,
|
|
@@ -437,6 +440,12 @@ export const ENDPOINTS = {
|
|
|
437
440
|
MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId) => `${API_BASE}/machines/me/agents/${agentId}/workspace-state`,
|
|
438
441
|
MACHINES_ME_WS_TICKET: `${API_BASE}/machines/me/ws/ticket`,
|
|
439
442
|
MACHINES_ME_BROWSE_RESPONSE: (requestId) => `${API_BASE}/machines/me/browse-response/${requestId}`,
|
|
443
|
+
// Hosted browser live-viewer control plane (api-server, NOT clip-service):
|
|
444
|
+
// the web client drives WebRTC signaling + tab nav through VIEWER_COMMAND;
|
|
445
|
+
// api-server brokers each command to the host daemon via the machine:{id}
|
|
446
|
+
// request/reply bridge (mirrors filesystem browse), and the daemon replies on
|
|
447
|
+
// VIEWER_RESPONSE. See docs/engineering-design/hosted-browser-provider-design.md.
|
|
448
|
+
MACHINES_ME_BROWSER_PROFILE_VIEWER_RESPONSE: (requestId) => `${API_BASE}/machines/me/browser-profiles/viewer-response/${requestId}`,
|
|
440
449
|
// Tasks (org-scoped)
|
|
441
450
|
TASKS: (orgId) => `${API_BASE}/orgs/${orgId}/tasks`,
|
|
442
451
|
TASK: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}`,
|
|
@@ -463,6 +472,17 @@ export const ENDPOINTS = {
|
|
|
463
472
|
SCHEDULE_CANCEL: (orgId, id) => `${API_BASE}/orgs/${orgId}/schedules/${id}/cancel`,
|
|
464
473
|
SCHEDULE_RUNS: (orgId, id) => `${API_BASE}/orgs/${orgId}/schedules/${id}/runs`,
|
|
465
474
|
SCHEDULE_RUN: (orgId, runId) => `${API_BASE}/orgs/${orgId}/schedule_runs/${runId}`,
|
|
475
|
+
// External triggers (org-scoped incoming integration primitive)
|
|
476
|
+
EXTERNAL_CONNECTIONS: (orgId) => `${API_BASE}/orgs/${orgId}/external-connections`,
|
|
477
|
+
EXTERNAL_CONNECTION: (orgId, connectionId) => `${API_BASE}/orgs/${orgId}/external-connections/${connectionId}`,
|
|
478
|
+
EXTERNAL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${API_BASE}/orgs/${orgId}/external-connections/${connectionId}/ingress-token/regenerate`,
|
|
479
|
+
EXTERNAL_TRIGGER_SCHEMA: (orgId, connectionId) => `${API_BASE}/orgs/${orgId}/external-connections/${connectionId}/trigger-schema`,
|
|
480
|
+
EXTERNAL_INGRESS_EVENTS: (orgId) => `${API_BASE}/orgs/${orgId}/external-ingress-events`,
|
|
481
|
+
EXTERNAL_INGRESS_EVENT: (orgId, eventId) => `${API_BASE}/orgs/${orgId}/external-ingress-events/${eventId}`,
|
|
482
|
+
EXTERNAL_TRIGGERS: (orgId) => `${API_BASE}/orgs/${orgId}/external-triggers`,
|
|
483
|
+
EXTERNAL_TRIGGER: (orgId, triggerId) => `${API_BASE}/orgs/${orgId}/external-triggers/${triggerId}`,
|
|
484
|
+
EXTERNAL_TRIGGER_RUNS: (orgId) => `${API_BASE}/orgs/${orgId}/external-trigger-runs`,
|
|
485
|
+
EXTERNAL_TRIGGER_RUN: (orgId, runId) => `${API_BASE}/orgs/${orgId}/external-trigger-runs/${runId}`,
|
|
466
486
|
// Invitations (org-scoped, admin)
|
|
467
487
|
ORG_INVITATIONS: (orgId) => `${API_BASE}/orgs/${orgId}/invitations`,
|
|
468
488
|
ORG_INVITATION: (orgId, invId) => `${API_BASE}/orgs/${orgId}/invitations/${invId}`,
|
|
@@ -502,6 +522,9 @@ export const ENDPOINTS = {
|
|
|
502
522
|
// Wiki Path Scopes (AFCS ACL)
|
|
503
523
|
WIKI_PATH_SCOPES: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/path-scopes`,
|
|
504
524
|
WIKI_PATH_SCOPE: (orgId, wikiId, scopeId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/path-scopes/${scopeId}`,
|
|
525
|
+
// Wiki Path Restrictions (AFCS narrowing ACL — private subtrees)
|
|
526
|
+
WIKI_RESTRICTIONS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/restrictions`,
|
|
527
|
+
WIKI_RESTRICTION: (orgId, wikiId, restrictionId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/restrictions/${restrictionId}`,
|
|
505
528
|
WIKI_ACCESS_STATUS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/access-status`,
|
|
506
529
|
WIKI_ACCESS_REQUESTS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/access-requests`,
|
|
507
530
|
// Wiki History (commits, file commits, blame)
|
|
@@ -567,6 +590,7 @@ export const ENDPOINTS = {
|
|
|
567
590
|
// Clips (org-scoped, served by clip-service)
|
|
568
591
|
CLIPS: (orgId) => `${CLIP_BASE}/orgs/${orgId}/clips`,
|
|
569
592
|
CLIP: (orgId, clipId) => `${CLIP_BASE}/orgs/${orgId}/clips/${clipId}`,
|
|
593
|
+
CLIPS_BULK_METADATA: (orgId) => `${CLIP_BASE}/orgs/${orgId}/clips/bulk-metadata`,
|
|
570
594
|
CLIP_AGENTS: (orgId, clipId) => `${CLIP_BASE}/orgs/${orgId}/clips/${clipId}/agents`,
|
|
571
595
|
AGENT_CLIPS: (orgId, agentId) => `${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips`,
|
|
572
596
|
AGENT_CLIP: (orgId, agentId, clipId) => `${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips/${clipId}`,
|
|
@@ -579,6 +603,9 @@ export const ENDPOINTS = {
|
|
|
579
603
|
BROWSER_PROFILE_RESET: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/reset`,
|
|
580
604
|
BROWSER_PROFILE_CONSENTS: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/consents`,
|
|
581
605
|
BROWSER_PROFILE_CONSENT: (orgId, profileId, clipId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/consents/${clipId}`,
|
|
606
|
+
// Live viewer command — on api-server (API_BASE), not clip-service: it rides
|
|
607
|
+
// the machine control-plane request/reply bridge that lives in api-server.
|
|
608
|
+
BROWSER_PROFILE_VIEWER_COMMAND: (orgId, profileId) => `${API_BASE}/orgs/${orgId}/browser-profiles/${profileId}/viewer/command`,
|
|
582
609
|
// Clip registry (global, served by clip-service → Pinix Hub proxy)
|
|
583
610
|
CLIP_REGISTRY: () => `${CLIP_BASE}/registry/clips`,
|
|
584
611
|
};
|
|
@@ -655,6 +682,7 @@ export const WS_EVENTS = {
|
|
|
655
682
|
MACHINE_CONFIG_UPDATED: 'machine.config.updated',
|
|
656
683
|
MACHINE_CLIP_SYNC: 'machine.clip.sync',
|
|
657
684
|
MACHINE_BROWSER_PROFILE_LIFECYCLE: 'machine.browser_profile.lifecycle',
|
|
685
|
+
MACHINE_BROWSER_PROFILE_VIEWER: 'machine.browser_profile.viewer',
|
|
658
686
|
AGENT_NEW_SESSION: 'agent.new_session',
|
|
659
687
|
CLIP_CREATED: 'clip.created',
|
|
660
688
|
CLIP_REMOVED: 'clip.removed',
|