@parall/sdk 1.36.1 → 1.37.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 +67 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +118 -3
- package/dist/constants.d.ts +65 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +99 -8
- package/dist/types.d.ts +286 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +211 -2
- package/src/constants.ts +116 -8
- package/src/types.ts +333 -5
package/dist/constants.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export declare const API_BASE = "/api/v1";
|
|
2
2
|
export declare const WIKI_BASE = "/wiki/v1";
|
|
3
3
|
export declare const CLIP_BASE = "/clip/v1";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated The catalog is DB-backed — fetch it via `client.getModels()`
|
|
6
|
+
* (GET /api/v1/models). This constant is a frozen degraded-mode fallback and
|
|
7
|
+
* will be removed after one release cycle. Still structurally consumed by
|
|
8
|
+
* FALLBACK_CATALOG (`@parall/app` agent-interlock) — do not delete before
|
|
9
|
+
* that fallback strategy changes (PR-3).
|
|
10
|
+
*/
|
|
4
11
|
export declare const PLATFORM_MODELS: readonly [{
|
|
5
12
|
readonly id: "anthropic/claude-fable-5";
|
|
6
13
|
readonly name: "Claude Fable 5";
|
|
@@ -227,6 +234,12 @@ export declare const PLATFORM_MODELS: readonly [{
|
|
|
227
234
|
readonly provider: "qwen";
|
|
228
235
|
readonly effortLevels: readonly [];
|
|
229
236
|
}];
|
|
237
|
+
/**
|
|
238
|
+
* @deprecated Fetch via `client.getModels(currentModelId)` — the include_model
|
|
239
|
+
* parameter serves the legacy-pin case. Frozen degraded-mode fallback only.
|
|
240
|
+
* Still structurally consumed by FALLBACK_CATALOG (`@parall/app`
|
|
241
|
+
* agent-interlock) — do not delete before that fallback changes (PR-3).
|
|
242
|
+
*/
|
|
230
243
|
export declare const PLATFORM_LEGACY_MODELS: readonly [{
|
|
231
244
|
readonly id: "openai/gpt-5.4-mini";
|
|
232
245
|
readonly name: "GPT-5.4 Mini";
|
|
@@ -310,6 +323,10 @@ export declare const PLATFORM_LEGACY_MODELS: readonly [{
|
|
|
310
323
|
readonly provider: "qwen";
|
|
311
324
|
readonly effortLevels: readonly [];
|
|
312
325
|
}];
|
|
326
|
+
/**
|
|
327
|
+
* @deprecated Read `recommended_model` from `client.getRuntimes()` instead.
|
|
328
|
+
* Frozen degraded-mode fallback only.
|
|
329
|
+
*/
|
|
313
330
|
export declare const PLATFORM_DEFAULT_MODEL_BY_RUNTIME: {
|
|
314
331
|
readonly openclaw: "anthropic/claude-sonnet-4.6";
|
|
315
332
|
readonly 'claude-code': "anthropic/claude-sonnet-4.6";
|
|
@@ -339,6 +356,7 @@ export declare const ENDPOINTS: {
|
|
|
339
356
|
readonly ORGS: "/api/v1/orgs";
|
|
340
357
|
readonly ORG: (orgId: string) => string;
|
|
341
358
|
readonly ORG_MEMBERS: (orgId: string) => string;
|
|
359
|
+
readonly ORG_MEMBERS_FORMER: (orgId: string) => string;
|
|
342
360
|
readonly TEAMS: (orgId: string) => string;
|
|
343
361
|
readonly ORG_MEMBERS_ONLINE: (orgId: string) => string;
|
|
344
362
|
readonly ORG_MEMBER: (orgId: string, userId: string) => string;
|
|
@@ -464,6 +482,18 @@ export declare const ENDPOINTS: {
|
|
|
464
482
|
readonly EXTERNAL_TRIGGER: (orgId: string, triggerId: string) => string;
|
|
465
483
|
readonly EXTERNAL_TRIGGER_RUNS: (orgId: string) => string;
|
|
466
484
|
readonly EXTERNAL_TRIGGER_RUN: (orgId: string, runId: string) => string;
|
|
485
|
+
readonly CHANNEL_CONNECTIONS: (orgId: string) => string;
|
|
486
|
+
readonly CHANNEL_CONNECTION: (orgId: string, connectionId: string) => string;
|
|
487
|
+
readonly CHANNEL_CONNECTION_CREDENTIALS: (orgId: string, connectionId: string) => string;
|
|
488
|
+
readonly CHANNEL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId: string, connectionId: string) => string;
|
|
489
|
+
readonly CHANNEL_CONNECTION_CONVERSATIONS: (orgId: string, connectionId: string) => string;
|
|
490
|
+
readonly CHANNEL_CONVERSATION: (orgId: string, conversationId: string) => string;
|
|
491
|
+
readonly CHANNEL_CONVERSATION_MESSAGES: (orgId: string, conversationId: string) => string;
|
|
492
|
+
readonly CHANNEL_CONVERSATION_SESSION: (orgId: string, conversationId: string) => string;
|
|
493
|
+
readonly CHANNEL_MESSAGE: (orgId: string, messageId: string) => string;
|
|
494
|
+
readonly CHANNEL_PROVISIONING: (orgId: string) => string;
|
|
495
|
+
readonly CHANNEL_PROVISIONING_SESSION: (orgId: string, sessionId: string) => string;
|
|
496
|
+
readonly CHANNEL_PROVISIONING_CANCEL: (orgId: string, sessionId: string) => string;
|
|
467
497
|
readonly ORG_INVITATIONS: (orgId: string) => string;
|
|
468
498
|
readonly ORG_INVITATION: (orgId: string, invId: string) => string;
|
|
469
499
|
readonly ORG_INVITATION_RESEND: (orgId: string, invId: string) => string;
|
|
@@ -477,9 +507,12 @@ export declare const ENDPOINTS: {
|
|
|
477
507
|
readonly ORG_INVITE_LINK_JOIN_REQUEST_DECIDE: (orgId: string, jrId: string) => string;
|
|
478
508
|
readonly INVITE_LINK_JOIN: "/api/v1/invite-link/join";
|
|
479
509
|
readonly WIKIS: (orgId: string) => string;
|
|
510
|
+
readonly WIKIS_DELETED: (orgId: string) => string;
|
|
480
511
|
readonly WIKI: (orgId: string, wikiId: string) => string;
|
|
512
|
+
readonly WIKI_RESTORE: (orgId: string, wikiId: string) => string;
|
|
481
513
|
readonly WIKI_TREE: (orgId: string, wikiId: string) => string;
|
|
482
514
|
readonly WIKI_BLOB: (orgId: string, wikiId: string) => string;
|
|
515
|
+
readonly WIKI_COPY: (orgId: string, wikiId: string) => string;
|
|
483
516
|
readonly WIKI_NODE_SECTIONS: (orgId: string, wikiId: string) => string;
|
|
484
517
|
readonly WIKI_SEARCH: (orgId: string, wikiId: string) => string;
|
|
485
518
|
readonly WIKI_PAGE_INDEX: (orgId: string, wikiId: string) => string;
|
|
@@ -545,6 +578,8 @@ export declare const ENDPOINTS: {
|
|
|
545
578
|
readonly BILLING_AUTO_RELOAD: (orgId: string) => string;
|
|
546
579
|
readonly BILLING_SETUP_INTENT: (orgId: string) => string;
|
|
547
580
|
readonly COMPUTE_PRICING: () => string;
|
|
581
|
+
readonly RUNTIMES: () => string;
|
|
582
|
+
readonly MODELS: (includeModel?: string) => string;
|
|
548
583
|
readonly CLIPS: (orgId: string) => string;
|
|
549
584
|
readonly CLIP: (orgId: string, clipId: string) => string;
|
|
550
585
|
readonly CLIPS_BULK_METADATA: (orgId: string) => string;
|
|
@@ -553,6 +588,7 @@ export declare const ENDPOINTS: {
|
|
|
553
588
|
readonly AGENT_CLIP: (orgId: string, agentId: string, clipId: string) => string;
|
|
554
589
|
readonly CLIP_INVOKE: (orgId: string) => string;
|
|
555
590
|
readonly CLIP_ONLINE: (orgId: string) => string;
|
|
591
|
+
readonly BROWSER_RUNTIME_STATUS: (orgId: string) => string;
|
|
556
592
|
readonly BROWSER_PROFILES: (orgId: string) => string;
|
|
557
593
|
readonly BROWSER_PROFILE: (orgId: string, profileId: string) => string;
|
|
558
594
|
readonly BROWSER_PROFILE_OPEN: (orgId: string, profileId: string) => string;
|
|
@@ -563,6 +599,31 @@ export declare const ENDPOINTS: {
|
|
|
563
599
|
readonly BROWSER_PROFILE_VIEWER_COMMAND: (orgId: string, profileId: string) => string;
|
|
564
600
|
readonly CLIP_REGISTRY: () => string;
|
|
565
601
|
};
|
|
602
|
+
/**
|
|
603
|
+
* Wiki personal-namespace prefix — the path subtree a member owns for
|
|
604
|
+
* self-service private spaces: `users/{userId}/`. SSOT mirror of the
|
|
605
|
+
* wiki-service `personalNamespacePrefix` (server/internal/wiki/handler/acl.go):
|
|
606
|
+
* a member may create/manage path restrictions anywhere under this prefix
|
|
607
|
+
* without org/path admin. The trailing slash is load-bearing — it keeps a user
|
|
608
|
+
* ID that is a string prefix of another from matching across namespaces.
|
|
609
|
+
*/
|
|
610
|
+
export declare function wikiPersonalNamespacePrefix(userId: string): string;
|
|
611
|
+
/**
|
|
612
|
+
* Whether `path` falls inside `userId`'s personal namespace (the namespace root
|
|
613
|
+
* itself or any descendant). Mirrors the server's `ownsPersonalNamespacePath`;
|
|
614
|
+
* use it for UI affordance gating only — the wiki-service stays the security
|
|
615
|
+
* SSOT and re-checks on every mutation.
|
|
616
|
+
*/
|
|
617
|
+
export declare function isInWikiPersonalNamespace(userId: string, path: string): boolean;
|
|
618
|
+
/**
|
|
619
|
+
* Whether `path` falls inside ANY user's personal namespace (`users/{id}/…`),
|
|
620
|
+
* regardless of whose. UI affordance helper — e.g. badging member personal-space
|
|
621
|
+
* restriction rows in the admin Access tab, or keeping "copy to shared wiki"
|
|
622
|
+
* destinations out of personal namespaces. Matches by shape (`users/<segment>/`
|
|
623
|
+
* or the bare `users/<segment>`), deliberately broader than
|
|
624
|
+
* `isInWikiPersonalNamespace`.
|
|
625
|
+
*/
|
|
626
|
+
export declare function isWikiPersonalNamespacePath(path: string): boolean;
|
|
566
627
|
export declare const WS_EVENTS: {
|
|
567
628
|
readonly PING: "ping";
|
|
568
629
|
readonly TYPING: "typing";
|
|
@@ -600,10 +661,13 @@ export declare const WS_EVENTS: {
|
|
|
600
661
|
readonly INVITATION_REVOKED: "invitation.revoked";
|
|
601
662
|
readonly ORG_JOIN_REQUEST_NEW: "org.join_request.new";
|
|
602
663
|
readonly ORG_INVITE_LINK_JOINED: "org.invite_link.joined";
|
|
664
|
+
readonly ORG_MEMBER_REMOVED: "org.member.removed";
|
|
603
665
|
readonly AGENT_CONFIG_UPDATE: "agent_config.update";
|
|
604
666
|
readonly PRESENCE_UPDATE: "presence.update";
|
|
605
667
|
readonly WIKI_CHANGESET_CREATED: "wiki.changeset.created";
|
|
606
668
|
readonly WIKI_CHANGESET_UPDATED: "wiki.changeset.updated";
|
|
669
|
+
readonly WIKI_DELETED: "wiki.deleted";
|
|
670
|
+
readonly WIKI_RESTORED: "wiki.restored";
|
|
607
671
|
readonly COMMENT_CREATED: "comment.created";
|
|
608
672
|
readonly COMMENT_UPDATED: "comment.updated";
|
|
609
673
|
readonly COMMENT_DELETED: "comment.deleted";
|
|
@@ -631,6 +695,7 @@ export declare const WS_EVENTS: {
|
|
|
631
695
|
readonly MACHINE_FILESYSTEM_BROWSE: "machine.filesystem.browse";
|
|
632
696
|
readonly MACHINE_UPDATE: "machine.update";
|
|
633
697
|
readonly MACHINE_CONFIG_UPDATED: "machine.config.updated";
|
|
698
|
+
readonly MACHINE_AGENT_CONFIG_UPDATED: "machine.agent_config.updated";
|
|
634
699
|
readonly MACHINE_CLIP_SYNC: "machine.clip.sync";
|
|
635
700
|
readonly MACHINE_BROWSER_PROFILE_LIFECYCLE: "machine.browser_profile.lifecycle";
|
|
636
701
|
readonly MACHINE_BROWSER_PROFILE_VIEWER: "machine.browser_profile.viewer";
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ,YAAY,CAAC;AAGlC,eAAO,MAAM,SAAS,aAAa,CAAC;AAGpC,eAAO,MAAM,SAAS,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ,YAAY,CAAC;AAGlC,eAAO,MAAM,SAAS,aAAa,CAAC;AAGpC,eAAO,MAAM,SAAS,aAAa,CAAC;AAMpC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAEjE;AAGD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFZ,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
|
@@ -4,11 +4,17 @@ export const API_BASE = '/api/v1';
|
|
|
4
4
|
export const WIKI_BASE = '/wiki/v1';
|
|
5
5
|
// Clip-service base path (served by clip-service, routed via LB path rules)
|
|
6
6
|
export const CLIP_BASE = '/clip/v1';
|
|
7
|
-
// LLM model catalog —
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
|
|
7
|
+
// LLM model catalog — frozen compile-time mirror of the catalog at the time
|
|
8
|
+
// the DB-backed source shipped (docs/engineering-design/model-catalog-design.md).
|
|
9
|
+
// Kept ONLY as the offline/degraded fallback for pickers; it is NOT updated
|
|
10
|
+
// when models are added through the admin catalog.
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated The catalog is DB-backed — fetch it via `client.getModels()`
|
|
13
|
+
* (GET /api/v1/models). This constant is a frozen degraded-mode fallback and
|
|
14
|
+
* will be removed after one release cycle. Still structurally consumed by
|
|
15
|
+
* FALLBACK_CATALOG (`@parall/app` agent-interlock) — do not delete before
|
|
16
|
+
* that fallback strategy changes (PR-3).
|
|
17
|
+
*/
|
|
12
18
|
export const PLATFORM_MODELS = [
|
|
13
19
|
// Fable 5 rejects an explicit thinking "disabled" param (400) — bridges must
|
|
14
20
|
// omit the thinking config entirely instead of disabling it.
|
|
@@ -207,6 +213,12 @@ export const PLATFORM_MODELS = [
|
|
|
207
213
|
];
|
|
208
214
|
// Hidden from new-agent pickers, but available to editors so persisted Beta
|
|
209
215
|
// agent defaults remain representable.
|
|
216
|
+
/**
|
|
217
|
+
* @deprecated Fetch via `client.getModels(currentModelId)` — the include_model
|
|
218
|
+
* parameter serves the legacy-pin case. Frozen degraded-mode fallback only.
|
|
219
|
+
* Still structurally consumed by FALLBACK_CATALOG (`@parall/app`
|
|
220
|
+
* agent-interlock) — do not delete before that fallback changes (PR-3).
|
|
221
|
+
*/
|
|
210
222
|
export const PLATFORM_LEGACY_MODELS = [
|
|
211
223
|
{
|
|
212
224
|
id: 'openai/gpt-5.4-mini',
|
|
@@ -279,9 +291,13 @@ export const PLATFORM_LEGACY_MODELS = [
|
|
|
279
291
|
effortLevels: [],
|
|
280
292
|
},
|
|
281
293
|
];
|
|
282
|
-
//
|
|
283
|
-
//
|
|
284
|
-
//
|
|
294
|
+
// Frozen mirror of the per-runtime defaults at ship time of the DB-backed
|
|
295
|
+
// catalog (llm_runtime_defaults). Live values arrive as recommended_model on
|
|
296
|
+
// GET /runtimes.
|
|
297
|
+
/**
|
|
298
|
+
* @deprecated Read `recommended_model` from `client.getRuntimes()` instead.
|
|
299
|
+
* Frozen degraded-mode fallback only.
|
|
300
|
+
*/
|
|
285
301
|
export const PLATFORM_DEFAULT_MODEL_BY_RUNTIME = {
|
|
286
302
|
openclaw: 'anthropic/claude-sonnet-4.6',
|
|
287
303
|
'claude-code': 'anthropic/claude-sonnet-4.6',
|
|
@@ -303,6 +319,11 @@ export function platformDefaultModelForRuntime(runtime) {
|
|
|
303
319
|
case '':
|
|
304
320
|
case 'openclaw':
|
|
305
321
|
case 'claude-code':
|
|
322
|
+
// hermes / parel route through the Parall proxy and accept any model; the
|
|
323
|
+
// server (DefaultModelIDForRuntime) recommends the platform default, so
|
|
324
|
+
// mirror it.
|
|
325
|
+
case 'hermes':
|
|
326
|
+
case 'parel':
|
|
306
327
|
return PLATFORM_DEFAULT_MODEL_BY_RUNTIME.openclaw;
|
|
307
328
|
case 'codex':
|
|
308
329
|
return PLATFORM_DEFAULT_MODEL_BY_RUNTIME.codex;
|
|
@@ -334,6 +355,7 @@ export const ENDPOINTS = {
|
|
|
334
355
|
// Org-scoped
|
|
335
356
|
ORG: (orgId) => `${API_BASE}/orgs/${orgId}`,
|
|
336
357
|
ORG_MEMBERS: (orgId) => `${API_BASE}/orgs/${orgId}/members`,
|
|
358
|
+
ORG_MEMBERS_FORMER: (orgId) => `${API_BASE}/orgs/${orgId}/members/former`,
|
|
337
359
|
TEAMS: (orgId) => `${API_BASE}/orgs/${orgId}/teams`,
|
|
338
360
|
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE}/orgs/${orgId}/members/online`,
|
|
339
361
|
ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
|
|
@@ -483,6 +505,19 @@ export const ENDPOINTS = {
|
|
|
483
505
|
EXTERNAL_TRIGGER: (orgId, triggerId) => `${API_BASE}/orgs/${orgId}/external-triggers/${triggerId}`,
|
|
484
506
|
EXTERNAL_TRIGGER_RUNS: (orgId) => `${API_BASE}/orgs/${orgId}/external-trigger-runs`,
|
|
485
507
|
EXTERNAL_TRIGGER_RUN: (orgId, runId) => `${API_BASE}/orgs/${orgId}/external-trigger-runs/${runId}`,
|
|
508
|
+
// External IM channel (org-scoped, platform-mediated Feishu/Slack)
|
|
509
|
+
CHANNEL_CONNECTIONS: (orgId) => `${API_BASE}/orgs/${orgId}/channel-connections`,
|
|
510
|
+
CHANNEL_CONNECTION: (orgId, connectionId) => `${API_BASE}/orgs/${orgId}/channel-connections/${connectionId}`,
|
|
511
|
+
CHANNEL_CONNECTION_CREDENTIALS: (orgId, connectionId) => `${API_BASE}/orgs/${orgId}/channel-connections/${connectionId}/credentials`,
|
|
512
|
+
CHANNEL_CONNECTION_INGRESS_TOKEN_REGENERATE: (orgId, connectionId) => `${API_BASE}/orgs/${orgId}/channel-connections/${connectionId}/ingress-token/regenerate`,
|
|
513
|
+
CHANNEL_CONNECTION_CONVERSATIONS: (orgId, connectionId) => `${API_BASE}/orgs/${orgId}/channel-connections/${connectionId}/conversations`,
|
|
514
|
+
CHANNEL_CONVERSATION: (orgId, conversationId) => `${API_BASE}/orgs/${orgId}/channel-conversations/${conversationId}`,
|
|
515
|
+
CHANNEL_CONVERSATION_MESSAGES: (orgId, conversationId) => `${API_BASE}/orgs/${orgId}/channel-conversations/${conversationId}/messages`,
|
|
516
|
+
CHANNEL_CONVERSATION_SESSION: (orgId, conversationId) => `${API_BASE}/orgs/${orgId}/channel-conversations/${conversationId}/session`,
|
|
517
|
+
CHANNEL_MESSAGE: (orgId, messageId) => `${API_BASE}/orgs/${orgId}/channel-messages/${messageId}`,
|
|
518
|
+
CHANNEL_PROVISIONING: (orgId) => `${API_BASE}/orgs/${orgId}/channel-provisioning`,
|
|
519
|
+
CHANNEL_PROVISIONING_SESSION: (orgId, sessionId) => `${API_BASE}/orgs/${orgId}/channel-provisioning/${sessionId}`,
|
|
520
|
+
CHANNEL_PROVISIONING_CANCEL: (orgId, sessionId) => `${API_BASE}/orgs/${orgId}/channel-provisioning/${sessionId}/cancel`,
|
|
486
521
|
// Invitations (org-scoped, admin)
|
|
487
522
|
ORG_INVITATIONS: (orgId) => `${API_BASE}/orgs/${orgId}/invitations`,
|
|
488
523
|
ORG_INVITATION: (orgId, invId) => `${API_BASE}/orgs/${orgId}/invitations/${invId}`,
|
|
@@ -500,9 +535,16 @@ export const ENDPOINTS = {
|
|
|
500
535
|
INVITE_LINK_JOIN: `${API_BASE}/invite-link/join`,
|
|
501
536
|
// Wikis (org-scoped, served by wiki-service)
|
|
502
537
|
WIKIS: (orgId) => `${WIKI_BASE}/orgs/${orgId}/wikis`,
|
|
538
|
+
// Recycle bin — soft-deleted wikis (owner only). Must precede WIKI in the
|
|
539
|
+
// backend router so `deleted` isn't captured as a {wikiId}; the SDK builder
|
|
540
|
+
// is just a string.
|
|
541
|
+
WIKIS_DELETED: (orgId) => `${WIKI_BASE}/orgs/${orgId}/wikis/deleted`,
|
|
542
|
+
// Detail URL — also reused for DELETE (soft-delete) and `${WIKI}/restore`.
|
|
503
543
|
WIKI: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}`,
|
|
544
|
+
WIKI_RESTORE: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/restore`,
|
|
504
545
|
WIKI_TREE: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/tree`,
|
|
505
546
|
WIKI_BLOB: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/blob`,
|
|
547
|
+
WIKI_COPY: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/copy`,
|
|
506
548
|
WIKI_NODE_SECTIONS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/node-sections`,
|
|
507
549
|
WIKI_SEARCH: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/search`,
|
|
508
550
|
WIKI_PAGE_INDEX: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/page-index`,
|
|
@@ -585,6 +627,16 @@ export const ENDPOINTS = {
|
|
|
585
627
|
BILLING_AUTO_RELOAD: (orgId) => `${API_BASE}/orgs/${orgId}/billing/auto-reload`,
|
|
586
628
|
BILLING_SETUP_INTENT: (orgId) => `${API_BASE}/orgs/${orgId}/billing/setup-intent`,
|
|
587
629
|
COMPUTE_PRICING: () => `${API_BASE}/billing/compute-pricing`,
|
|
630
|
+
// Runtime capability table (public, no auth) — SSOT for the create/settings
|
|
631
|
+
// interlock: per-runtime compute modes, native model family, cross-family
|
|
632
|
+
// availability, and recommended model.
|
|
633
|
+
RUNTIMES: () => `${API_BASE}/runtimes`,
|
|
634
|
+
// Model catalog (public, no auth) — served from the server's DB-backed
|
|
635
|
+
// snapshot. Optional include_model keeps an agent's pinned hidden legacy
|
|
636
|
+
// model representable in settings pickers.
|
|
637
|
+
MODELS: (includeModel) => includeModel
|
|
638
|
+
? `${API_BASE}/models?include_model=${encodeURIComponent(includeModel)}`
|
|
639
|
+
: `${API_BASE}/models`,
|
|
588
640
|
// ADMIN_GRANTS intentionally NOT exported here — it sits under the
|
|
589
641
|
// unauthenticated `/internal/admin/*` surface and must not bleed into the
|
|
590
642
|
// public SDK. Admin dashboard hits the URL directly from its own client.
|
|
@@ -597,6 +649,7 @@ export const ENDPOINTS = {
|
|
|
597
649
|
AGENT_CLIP: (orgId, agentId, clipId) => `${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips/${clipId}`,
|
|
598
650
|
CLIP_INVOKE: (orgId) => `${CLIP_BASE}/orgs/${orgId}/invoke`,
|
|
599
651
|
CLIP_ONLINE: (orgId) => `${CLIP_BASE}/orgs/${orgId}/online`,
|
|
652
|
+
BROWSER_RUNTIME_STATUS: (orgId) => `${CLIP_BASE}/orgs/${orgId}/browser-runtime/status`,
|
|
600
653
|
BROWSER_PROFILES: (orgId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles`,
|
|
601
654
|
BROWSER_PROFILE: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}`,
|
|
602
655
|
BROWSER_PROFILE_OPEN: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/open`,
|
|
@@ -610,6 +663,40 @@ export const ENDPOINTS = {
|
|
|
610
663
|
// Clip registry (global, served by clip-service → Pinix Hub proxy)
|
|
611
664
|
CLIP_REGISTRY: () => `${CLIP_BASE}/registry/clips`,
|
|
612
665
|
};
|
|
666
|
+
/**
|
|
667
|
+
* Wiki personal-namespace prefix — the path subtree a member owns for
|
|
668
|
+
* self-service private spaces: `users/{userId}/`. SSOT mirror of the
|
|
669
|
+
* wiki-service `personalNamespacePrefix` (server/internal/wiki/handler/acl.go):
|
|
670
|
+
* a member may create/manage path restrictions anywhere under this prefix
|
|
671
|
+
* without org/path admin. The trailing slash is load-bearing — it keeps a user
|
|
672
|
+
* ID that is a string prefix of another from matching across namespaces.
|
|
673
|
+
*/
|
|
674
|
+
export function wikiPersonalNamespacePrefix(userId) {
|
|
675
|
+
return `users/${userId}/`;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Whether `path` falls inside `userId`'s personal namespace (the namespace root
|
|
679
|
+
* itself or any descendant). Mirrors the server's `ownsPersonalNamespacePath`;
|
|
680
|
+
* use it for UI affordance gating only — the wiki-service stays the security
|
|
681
|
+
* SSOT and re-checks on every mutation.
|
|
682
|
+
*/
|
|
683
|
+
export function isInWikiPersonalNamespace(userId, path) {
|
|
684
|
+
if (!userId)
|
|
685
|
+
return false;
|
|
686
|
+
const prefix = wikiPersonalNamespacePrefix(userId);
|
|
687
|
+
return path === prefix || path.startsWith(prefix);
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Whether `path` falls inside ANY user's personal namespace (`users/{id}/…`),
|
|
691
|
+
* regardless of whose. UI affordance helper — e.g. badging member personal-space
|
|
692
|
+
* restriction rows in the admin Access tab, or keeping "copy to shared wiki"
|
|
693
|
+
* destinations out of personal namespaces. Matches by shape (`users/<segment>/`
|
|
694
|
+
* or the bare `users/<segment>`), deliberately broader than
|
|
695
|
+
* `isInWikiPersonalNamespace`.
|
|
696
|
+
*/
|
|
697
|
+
export function isWikiPersonalNamespacePath(path) {
|
|
698
|
+
return /^users\/[^/]+(\/|$)/.test(path);
|
|
699
|
+
}
|
|
613
700
|
// WebSocket event types
|
|
614
701
|
export const WS_EVENTS = {
|
|
615
702
|
// Client -> Server
|
|
@@ -650,10 +737,13 @@ export const WS_EVENTS = {
|
|
|
650
737
|
INVITATION_REVOKED: 'invitation.revoked',
|
|
651
738
|
ORG_JOIN_REQUEST_NEW: 'org.join_request.new',
|
|
652
739
|
ORG_INVITE_LINK_JOINED: 'org.invite_link.joined',
|
|
740
|
+
ORG_MEMBER_REMOVED: 'org.member.removed',
|
|
653
741
|
AGENT_CONFIG_UPDATE: 'agent_config.update',
|
|
654
742
|
PRESENCE_UPDATE: 'presence.update',
|
|
655
743
|
WIKI_CHANGESET_CREATED: 'wiki.changeset.created',
|
|
656
744
|
WIKI_CHANGESET_UPDATED: 'wiki.changeset.updated',
|
|
745
|
+
WIKI_DELETED: 'wiki.deleted',
|
|
746
|
+
WIKI_RESTORED: 'wiki.restored',
|
|
657
747
|
COMMENT_CREATED: 'comment.created',
|
|
658
748
|
COMMENT_UPDATED: 'comment.updated',
|
|
659
749
|
COMMENT_DELETED: 'comment.deleted',
|
|
@@ -681,6 +771,7 @@ export const WS_EVENTS = {
|
|
|
681
771
|
MACHINE_FILESYSTEM_BROWSE: 'machine.filesystem.browse',
|
|
682
772
|
MACHINE_UPDATE: 'machine.update',
|
|
683
773
|
MACHINE_CONFIG_UPDATED: 'machine.config.updated',
|
|
774
|
+
MACHINE_AGENT_CONFIG_UPDATED: 'machine.agent_config.updated',
|
|
684
775
|
MACHINE_CLIP_SYNC: 'machine.clip.sync',
|
|
685
776
|
MACHINE_BROWSER_PROFILE_LIFECYCLE: 'machine.browser_profile.lifecycle',
|
|
686
777
|
MACHINE_BROWSER_PROFILE_VIEWER: 'machine.browser_profile.viewer',
|