@parall/sdk 1.32.1 → 1.34.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 +46 -13
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +101 -23
- package/dist/constants.d.ts +69 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +76 -4
- package/dist/types.d.ts +151 -27
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +175 -32
- package/src/constants.ts +88 -5
- package/src/types.ts +178 -27
package/src/constants.ts
CHANGED
|
@@ -13,6 +13,41 @@ export const CLIP_BASE = '/clip/v1';
|
|
|
13
13
|
// included for catalog completeness and agent runtime delivery; product UI
|
|
14
14
|
// should continue to display canonical model IDs/names.
|
|
15
15
|
export const PLATFORM_MODELS = [
|
|
16
|
+
// Fable 5 rejects an explicit thinking "disabled" param (400) — bridges must
|
|
17
|
+
// omit the thinking config entirely instead of disabling it.
|
|
18
|
+
// "(1M)" variants opt the claude-code runtime into the 1M-token context
|
|
19
|
+
// window via the CLI's [1m] model-name suffix; the server proxy aliases the
|
|
20
|
+
// catalog ID back to the base model upstream.
|
|
21
|
+
{
|
|
22
|
+
id: 'anthropic/claude-fable-5',
|
|
23
|
+
name: 'Claude Fable 5',
|
|
24
|
+
provider: 'anthropic',
|
|
25
|
+
effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
26
|
+
runtime_names: { 'claude-code': 'claude-fable-5' },
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 'anthropic/claude-fable-5-1m',
|
|
30
|
+
name: 'Claude Fable 5 (1M)',
|
|
31
|
+
provider: 'anthropic',
|
|
32
|
+
effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
33
|
+
runtime_names: { 'claude-code': 'claude-fable-5[1m]' },
|
|
34
|
+
upstream_id: 'anthropic/claude-fable-5',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'anthropic/claude-opus-4.8',
|
|
38
|
+
name: 'Claude Opus 4.8',
|
|
39
|
+
provider: 'anthropic',
|
|
40
|
+
effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
41
|
+
runtime_names: { 'claude-code': 'claude-opus-4-8' },
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'anthropic/claude-opus-4.8-1m',
|
|
45
|
+
name: 'Claude Opus 4.8 (1M)',
|
|
46
|
+
provider: 'anthropic',
|
|
47
|
+
effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
48
|
+
runtime_names: { 'claude-code': 'claude-opus-4-8[1m]' },
|
|
49
|
+
upstream_id: 'anthropic/claude-opus-4.8',
|
|
50
|
+
},
|
|
16
51
|
{
|
|
17
52
|
id: 'anthropic/claude-opus-4.7',
|
|
18
53
|
name: 'Claude Opus 4.7',
|
|
@@ -34,6 +69,14 @@ export const PLATFORM_MODELS = [
|
|
|
34
69
|
effortLevels: ['low', 'medium', 'high', 'max'],
|
|
35
70
|
runtime_names: { 'claude-code': 'claude-sonnet-4-6' },
|
|
36
71
|
},
|
|
72
|
+
{
|
|
73
|
+
id: 'anthropic/claude-sonnet-4.6-1m',
|
|
74
|
+
name: 'Claude Sonnet 4.6 (1M)',
|
|
75
|
+
provider: 'anthropic',
|
|
76
|
+
effortLevels: ['low', 'medium', 'high', 'max'],
|
|
77
|
+
runtime_names: { 'claude-code': 'claude-sonnet-4-6[1m]' },
|
|
78
|
+
upstream_id: 'anthropic/claude-sonnet-4.6',
|
|
79
|
+
},
|
|
37
80
|
{
|
|
38
81
|
id: 'anthropic/claude-sonnet-4.5',
|
|
39
82
|
name: 'Claude Sonnet 4.5',
|
|
@@ -77,6 +120,12 @@ export const PLATFORM_MODELS = [
|
|
|
77
120
|
effortLevels: ['medium', 'high', 'xhigh'],
|
|
78
121
|
runtime_names: { codex: 'gpt-5.4-pro' },
|
|
79
122
|
},
|
|
123
|
+
{
|
|
124
|
+
id: 'google/gemini-3.5-flash',
|
|
125
|
+
name: 'Gemini 3.5 Flash',
|
|
126
|
+
provider: 'google',
|
|
127
|
+
effortLevels: [],
|
|
128
|
+
},
|
|
80
129
|
{
|
|
81
130
|
id: 'google/gemini-3.1-pro-preview',
|
|
82
131
|
name: 'Gemini 3.1 Pro Preview',
|
|
@@ -244,6 +293,19 @@ export const PLATFORM_DEFAULT_MODEL_BY_RUNTIME = {
|
|
|
244
293
|
codex: 'openai/gpt-5.4',
|
|
245
294
|
} as const;
|
|
246
295
|
|
|
296
|
+
// Mirrors Go llmproxy.IsAllowedModelForRuntime's upstream-alias rule:
|
|
297
|
+
// variants that alias upstream (`upstream_id` set — the "(1M)" entries) encode
|
|
298
|
+
// runtime-specific client behavior and are only selectable by runtimes with an
|
|
299
|
+
// explicit runtime_names mapping. Model pickers must filter with this in
|
|
300
|
+
// addition to provider filtering.
|
|
301
|
+
export function isPlatformModelSelectableForRuntime(
|
|
302
|
+
model: { id: string; upstream_id?: string; runtime_names?: Record<string, string> },
|
|
303
|
+
runtime: string | null | undefined,
|
|
304
|
+
): boolean {
|
|
305
|
+
if (!model.upstream_id) return true;
|
|
306
|
+
return Boolean(runtime && model.runtime_names && runtime in model.runtime_names);
|
|
307
|
+
}
|
|
308
|
+
|
|
247
309
|
export function platformDefaultModelForRuntime(runtime: string | null | undefined): string | null {
|
|
248
310
|
switch (runtime?.trim()) {
|
|
249
311
|
case undefined:
|
|
@@ -415,6 +477,8 @@ export const ENDPOINTS = {
|
|
|
415
477
|
`${API_BASE}/orgs/${orgId}/machines/${machineId}/agents/${agentId}/workspace/setup`,
|
|
416
478
|
MACHINE_LLM_SOURCE: (orgId: string, machineId: string) =>
|
|
417
479
|
`${API_BASE}/orgs/${orgId}/machines/${machineId}/llm-source`,
|
|
480
|
+
MACHINE_PROVIDER_ENABLED: (orgId: string, machineId: string) =>
|
|
481
|
+
`${API_BASE}/orgs/${orgId}/machines/${machineId}/provider-enabled`,
|
|
418
482
|
MACHINE_RUNTIME_AUTH: (orgId: string, machineId: string) =>
|
|
419
483
|
`${API_BASE}/orgs/${orgId}/machines/${machineId}/runtime-auth`,
|
|
420
484
|
MACHINE_KEYS: (orgId: string, machineId: string) =>
|
|
@@ -436,9 +500,10 @@ export const ENDPOINTS = {
|
|
|
436
500
|
MACHINES_ME: `${API_BASE}/machines/me`,
|
|
437
501
|
MACHINES_ME_AGENTS: `${API_BASE}/machines/me/agents`,
|
|
438
502
|
MACHINES_ME_HEALTH: `${API_BASE}/machines/me/health`,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
503
|
+
MACHINES_ME_CLIPS: `${API_BASE}/machines/me/clips`,
|
|
504
|
+
MACHINES_ME_BROWSER_PROFILES: `${API_BASE}/machines/me/browser-profiles`,
|
|
505
|
+
MACHINES_ME_BROWSER_PROFILE_STATUS: (profileId: string) =>
|
|
506
|
+
`${API_BASE}/machines/me/browser-profiles/${profileId}/status`,
|
|
442
507
|
MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId: string) =>
|
|
443
508
|
`${API_BASE}/machines/me/agents/${agentId}/launch-credential`,
|
|
444
509
|
MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId: string) =>
|
|
@@ -593,6 +658,7 @@ export const ENDPOINTS = {
|
|
|
593
658
|
DISPATCH_RECEIVED: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch/received`,
|
|
594
659
|
DISPATCH_ACK: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch/ack`,
|
|
595
660
|
DISPATCH_ACK_BY_ID: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/dispatch/${id}/ack`,
|
|
661
|
+
DISPATCH_EXPIRE: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch/expire`,
|
|
596
662
|
DISPATCH_BY_MESSAGES: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch/by-messages`,
|
|
597
663
|
|
|
598
664
|
// Unread
|
|
@@ -618,6 +684,9 @@ export const ENDPOINTS = {
|
|
|
618
684
|
// Notification preferences
|
|
619
685
|
NOTIFICATION_PREFERENCES: `${API_BASE}/notification-preferences`,
|
|
620
686
|
|
|
687
|
+
// Unified search (messages + tasks + wiki, org-scoped)
|
|
688
|
+
SEARCH: (orgId: string) => `${API_BASE}/orgs/${orgId}/search`,
|
|
689
|
+
|
|
621
690
|
// Feature flags (org-scoped, server-evaluated)
|
|
622
691
|
FEATURE_FLAGS: (orgId: string) => `${API_BASE}/orgs/${orgId}/feature-flags`,
|
|
623
692
|
|
|
@@ -644,6 +713,19 @@ export const ENDPOINTS = {
|
|
|
644
713
|
`${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips/${clipId}`,
|
|
645
714
|
CLIP_INVOKE: (orgId: string) => `${CLIP_BASE}/orgs/${orgId}/invoke`,
|
|
646
715
|
CLIP_ONLINE: (orgId: string) => `${CLIP_BASE}/orgs/${orgId}/online`,
|
|
716
|
+
BROWSER_PROFILES: (orgId: string) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles`,
|
|
717
|
+
BROWSER_PROFILE: (orgId: string, profileId: string) =>
|
|
718
|
+
`${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}`,
|
|
719
|
+
BROWSER_PROFILE_OPEN: (orgId: string, profileId: string) =>
|
|
720
|
+
`${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/open`,
|
|
721
|
+
BROWSER_PROFILE_STOP: (orgId: string, profileId: string) =>
|
|
722
|
+
`${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/stop`,
|
|
723
|
+
BROWSER_PROFILE_RESET: (orgId: string, profileId: string) =>
|
|
724
|
+
`${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/reset`,
|
|
725
|
+
BROWSER_PROFILE_CONSENTS: (orgId: string, profileId: string) =>
|
|
726
|
+
`${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/consents`,
|
|
727
|
+
BROWSER_PROFILE_CONSENT: (orgId: string, profileId: string, clipId: string) =>
|
|
728
|
+
`${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/consents/${clipId}`,
|
|
647
729
|
|
|
648
730
|
// Clip registry (global, served by clip-service → Pinix Hub proxy)
|
|
649
731
|
CLIP_REGISTRY: () => `${CLIP_BASE}/registry/clips`,
|
|
@@ -721,9 +803,10 @@ export const WS_EVENTS = {
|
|
|
721
803
|
MACHINE_FILESYSTEM_BROWSE: 'machine.filesystem.browse',
|
|
722
804
|
MACHINE_UPDATE: 'machine.update',
|
|
723
805
|
MACHINE_CONFIG_UPDATED: 'machine.config.updated',
|
|
724
|
-
|
|
806
|
+
MACHINE_CLIP_SYNC: 'machine.clip.sync',
|
|
807
|
+
MACHINE_BROWSER_PROFILE_LIFECYCLE: 'machine.browser_profile.lifecycle',
|
|
725
808
|
AGENT_NEW_SESSION: 'agent.new_session',
|
|
726
|
-
|
|
809
|
+
CLIP_CREATED: 'clip.created',
|
|
727
810
|
CLIP_REMOVED: 'clip.removed',
|
|
728
811
|
CLIP_UPDATED: 'clip.updated',
|
|
729
812
|
} as const;
|
package/src/types.ts
CHANGED
|
@@ -21,6 +21,12 @@ export interface User {
|
|
|
21
21
|
export type ChatType = 'direct' | 'group';
|
|
22
22
|
export type AgentRoutingMode = 'passive' | 'active' | 'smart';
|
|
23
23
|
export type ChatVisibility = 'public' | 'private';
|
|
24
|
+
/**
|
|
25
|
+
* Who can add new members to a chat.
|
|
26
|
+
* - `everyone` (default): any chat member can add another org member.
|
|
27
|
+
* - `admins`: only chat admins/owners (and org admins) may add.
|
|
28
|
+
*/
|
|
29
|
+
export type MemberInvitePolicy = 'everyone' | 'admins';
|
|
24
30
|
|
|
25
31
|
export interface Chat {
|
|
26
32
|
id: string;
|
|
@@ -35,6 +41,7 @@ export interface Chat {
|
|
|
35
41
|
smart_routing_strategy: string | null;
|
|
36
42
|
/** Chat-level smart routing agent override. NULL = use org default. */
|
|
37
43
|
smart_routing_agent_id: string | null;
|
|
44
|
+
member_invite_policy: MemberInvitePolicy;
|
|
38
45
|
last_message_at: string | null;
|
|
39
46
|
last_message_preview: string | null;
|
|
40
47
|
last_message_sender: string | null;
|
|
@@ -718,7 +725,24 @@ export interface Machine {
|
|
|
718
725
|
daemon_mode: boolean;
|
|
719
726
|
llm_source?: string;
|
|
720
727
|
compute_mode: 'hosted' | 'local';
|
|
728
|
+
// Whether the machine contributes its local clips as a hub provider
|
|
729
|
+
// (org-admin-toggleable via PATCH /machines/{id}/provider-enabled). Absent on
|
|
730
|
+
// servers predating the field → treat as true (default-on). See
|
|
731
|
+
// docs/engineering-design/clip-provider-sharing-design.md.
|
|
732
|
+
provider_enabled?: boolean;
|
|
733
|
+
// Externally-reachable ProviderStream endpoint the daemon connects to in order
|
|
734
|
+
// to register its clips with the hub. Server-computed (grey-cloud
|
|
735
|
+
// clip-rpc.{env}.prll.sh, which bypasses Cloudflare's bidi-incompatible proxy)
|
|
736
|
+
// and delivered only to BYOC (local daemon-mode) machines via GET /machines/me;
|
|
737
|
+
// absent for hosted machines. See
|
|
738
|
+
// docs/engineering-design/clip-provider-sharing-design.md.
|
|
739
|
+
clip_provider_url?: string;
|
|
721
740
|
daemon_version?: string | null;
|
|
741
|
+
// Whether the daemon can act on a machine.update signal — true only when a
|
|
742
|
+
// service manager (launchd/systemd) supervises it, false for bare `npx`
|
|
743
|
+
// foreground runs that can't load the overlay or restart after exit(42).
|
|
744
|
+
// Reported on heartbeat; gates the "Check for Update" affordance + API.
|
|
745
|
+
self_update_capable?: boolean;
|
|
722
746
|
region: string | null;
|
|
723
747
|
created_by: string;
|
|
724
748
|
created_at: string;
|
|
@@ -862,6 +886,9 @@ export interface MachineAgentDetachedData {
|
|
|
862
886
|
export interface MachineConfigUpdatedData {
|
|
863
887
|
machine_id: string;
|
|
864
888
|
llm_source?: string;
|
|
889
|
+
// Present when provider_enabled changed → daemon (de)registers its clip
|
|
890
|
+
// provider. Absent on llm_source-only updates.
|
|
891
|
+
provider_enabled?: boolean;
|
|
865
892
|
}
|
|
866
893
|
|
|
867
894
|
export interface MachineWorkspaceSetupRequestedData {
|
|
@@ -887,11 +914,19 @@ export interface MachineUpdateData {
|
|
|
887
914
|
reason?: string;
|
|
888
915
|
}
|
|
889
916
|
|
|
890
|
-
export interface
|
|
917
|
+
export interface MachineClipSyncData {
|
|
918
|
+
machine_id: string;
|
|
891
919
|
clip_id: string;
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
920
|
+
action?: 'create' | 'update' | 'delete' | string;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
export type BrowserProfileLifecycleAction = 'open' | 'stop' | 'reset';
|
|
924
|
+
|
|
925
|
+
export interface MachineBrowserProfileLifecycleData {
|
|
926
|
+
machine_id: string;
|
|
927
|
+
profile_id: string;
|
|
928
|
+
action: BrowserProfileLifecycleAction;
|
|
929
|
+
start_url?: string;
|
|
895
930
|
}
|
|
896
931
|
|
|
897
932
|
export interface AgentNewSessionData {
|
|
@@ -1692,6 +1727,7 @@ export interface ChatUpdateData {
|
|
|
1692
1727
|
| 'agent_routing_mode'
|
|
1693
1728
|
| 'smart_routing_strategy'
|
|
1694
1729
|
| 'smart_routing_agent_id'
|
|
1730
|
+
| 'member_invite_policy'
|
|
1695
1731
|
| 'last_message_at'
|
|
1696
1732
|
| 'last_message_preview'
|
|
1697
1733
|
| 'last_message_sender'
|
|
@@ -1999,6 +2035,20 @@ export interface DispatchEvent {
|
|
|
1999
2035
|
|
|
2000
2036
|
export type DispatchNewData = DispatchEvent;
|
|
2001
2037
|
|
|
2038
|
+
export interface DispatchExpiredGroup {
|
|
2039
|
+
chat_id: string | null;
|
|
2040
|
+
chat_name?: string | null;
|
|
2041
|
+
event_type: DispatchEventType;
|
|
2042
|
+
count: number;
|
|
2043
|
+
oldest: string;
|
|
2044
|
+
newest: string;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
export interface DispatchExpireResult {
|
|
2048
|
+
total: number;
|
|
2049
|
+
groups: DispatchExpiredGroup[];
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2002
2052
|
export interface DispatchReceivedData {
|
|
2003
2053
|
agent_id: string;
|
|
2004
2054
|
event_type: string;
|
|
@@ -2105,8 +2155,9 @@ export type WsEventMap = {
|
|
|
2105
2155
|
'machine.stop': MachineStopData;
|
|
2106
2156
|
'machine.filesystem.browse': MachineFilesystemBrowseData;
|
|
2107
2157
|
'machine.update': MachineUpdateData;
|
|
2108
|
-
'machine.clip.
|
|
2109
|
-
'
|
|
2158
|
+
'machine.clip.sync': MachineClipSyncData;
|
|
2159
|
+
'machine.browser_profile.lifecycle': MachineBrowserProfileLifecycleData;
|
|
2160
|
+
'clip.created': ClipCreatedData;
|
|
2110
2161
|
'clip.removed': ClipRemovedData;
|
|
2111
2162
|
'clip.updated': ClipUpdatedData;
|
|
2112
2163
|
'agent.new_session': AgentNewSessionData;
|
|
@@ -2218,6 +2269,7 @@ export interface ResolvedRef {
|
|
|
2218
2269
|
sender_avatar_url?: string | null;
|
|
2219
2270
|
message_type?: string;
|
|
2220
2271
|
created_at?: string;
|
|
2272
|
+
attachments?: Attachment[];
|
|
2221
2273
|
|
|
2222
2274
|
// Range fields (cht_ + range anchor)
|
|
2223
2275
|
range_messages?: Array<{
|
|
@@ -2229,6 +2281,7 @@ export interface ResolvedRef {
|
|
|
2229
2281
|
message_type: string;
|
|
2230
2282
|
preview: string;
|
|
2231
2283
|
created_at: string;
|
|
2284
|
+
attachments?: Attachment[];
|
|
2232
2285
|
}>;
|
|
2233
2286
|
range_truncated?: boolean;
|
|
2234
2287
|
|
|
@@ -2560,17 +2613,16 @@ export interface Clip {
|
|
|
2560
2613
|
org_id: string;
|
|
2561
2614
|
alias: string;
|
|
2562
2615
|
name: string;
|
|
2616
|
+
display_name: string;
|
|
2563
2617
|
description: string | null;
|
|
2564
2618
|
manifest: Record<string, unknown>;
|
|
2565
2619
|
source_type: ClipSourceType;
|
|
2566
2620
|
source_ref: string | null;
|
|
2567
2621
|
version: string | null;
|
|
2568
2622
|
status: ClipStatus;
|
|
2623
|
+
machine_id: string;
|
|
2624
|
+
browser_profile_id: string | null;
|
|
2569
2625
|
created_by: string | null;
|
|
2570
|
-
/** Registry clip that reconciles onto every org machine, including machines
|
|
2571
|
-
* that join after creation. Targeted installs leave this false and persist
|
|
2572
|
-
* per-machine pending clip_instances instead. */
|
|
2573
|
-
install_on_all_machines: boolean;
|
|
2574
2626
|
created_at: string;
|
|
2575
2627
|
updated_at: string;
|
|
2576
2628
|
}
|
|
@@ -2584,21 +2636,27 @@ export interface AgentClip {
|
|
|
2584
2636
|
|
|
2585
2637
|
export interface CreateClipRequest {
|
|
2586
2638
|
alias: string;
|
|
2587
|
-
name
|
|
2639
|
+
name?: string;
|
|
2640
|
+
display_name?: string;
|
|
2588
2641
|
description?: string;
|
|
2589
|
-
manifest
|
|
2642
|
+
manifest?: Record<string, unknown>;
|
|
2590
2643
|
source_type?: ClipSourceType;
|
|
2591
2644
|
source_ref?: string;
|
|
2592
2645
|
version?: string;
|
|
2593
|
-
|
|
2646
|
+
machine_id: string;
|
|
2647
|
+
browser_profile_id?: string;
|
|
2594
2648
|
}
|
|
2595
2649
|
|
|
2596
2650
|
export interface UpdateClipRequest {
|
|
2597
2651
|
name?: string;
|
|
2652
|
+
display_name?: string;
|
|
2598
2653
|
description?: string;
|
|
2599
2654
|
manifest?: Record<string, unknown>;
|
|
2600
2655
|
status?: ClipStatus;
|
|
2601
2656
|
version?: string;
|
|
2657
|
+
machine_id?: string;
|
|
2658
|
+
/** Empty string clears the binding; omitted leaves it unchanged. */
|
|
2659
|
+
browser_profile_id?: string;
|
|
2602
2660
|
}
|
|
2603
2661
|
|
|
2604
2662
|
export interface BindAgentClipRequest {
|
|
@@ -2606,32 +2664,68 @@ export interface BindAgentClipRequest {
|
|
|
2606
2664
|
config?: Record<string, unknown>;
|
|
2607
2665
|
}
|
|
2608
2666
|
|
|
2609
|
-
|
|
2610
|
-
alias: string;
|
|
2667
|
+
interface InvokeClipBaseRequest {
|
|
2611
2668
|
command: string;
|
|
2612
2669
|
input?: unknown;
|
|
2613
2670
|
timeout_ms?: number;
|
|
2614
2671
|
}
|
|
2615
2672
|
|
|
2673
|
+
export type InvokeClipRequest =
|
|
2674
|
+
| (InvokeClipBaseRequest & { alias: string; clip_id?: never })
|
|
2675
|
+
| (InvokeClipBaseRequest & { clip_id: string; alias?: never });
|
|
2676
|
+
|
|
2616
2677
|
export interface InvokeClipResponse {
|
|
2617
2678
|
output: unknown;
|
|
2618
2679
|
error: string | null;
|
|
2619
2680
|
}
|
|
2620
2681
|
|
|
2621
|
-
export type
|
|
2682
|
+
export type BrowserProfileStatus = 'pending' | 'running' | 'stopped' | 'error';
|
|
2622
2683
|
|
|
2623
|
-
export interface
|
|
2684
|
+
export interface BrowserProfile {
|
|
2624
2685
|
id: string;
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2686
|
+
org_id: string;
|
|
2687
|
+
/** Host machine where the profile's cookies / bb-browser account live. */
|
|
2688
|
+
machine_id: string;
|
|
2689
|
+
owner_user_id: string;
|
|
2690
|
+
display_name: string;
|
|
2691
|
+
status: BrowserProfileStatus;
|
|
2692
|
+
error_msg?: string | null;
|
|
2693
|
+
last_seen?: string | null;
|
|
2694
|
+
created_by?: string | null;
|
|
2631
2695
|
created_at: string;
|
|
2632
2696
|
updated_at: string;
|
|
2633
2697
|
}
|
|
2634
2698
|
|
|
2699
|
+
export interface BrowserProfileConsent {
|
|
2700
|
+
id: string;
|
|
2701
|
+
org_id: string;
|
|
2702
|
+
browser_profile_id: string;
|
|
2703
|
+
clip_id: string;
|
|
2704
|
+
owner_user_id: string;
|
|
2705
|
+
granted_by: string;
|
|
2706
|
+
granted_at: string;
|
|
2707
|
+
revoked_at?: string | null;
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
export interface CreateBrowserProfileRequest {
|
|
2711
|
+
/** Host machine that runs the BrowserProfile (cookies / bb-browser account). */
|
|
2712
|
+
machine_id: string;
|
|
2713
|
+
owner_user_id: string;
|
|
2714
|
+
display_name: string;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
export interface UpdateBrowserProfileRequest {
|
|
2718
|
+
display_name?: string;
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2721
|
+
export interface BrowserProfileLifecycleRequest {
|
|
2722
|
+
start_url?: string;
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
export interface GrantBrowserProfileConsentRequest {
|
|
2726
|
+
clip_id: string;
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2635
2729
|
export interface OnlineClipInfo {
|
|
2636
2730
|
alias: string;
|
|
2637
2731
|
name: string;
|
|
@@ -2640,12 +2734,18 @@ export interface OnlineClipInfo {
|
|
|
2640
2734
|
provider_name: string;
|
|
2641
2735
|
}
|
|
2642
2736
|
|
|
2643
|
-
//
|
|
2644
|
-
export interface
|
|
2737
|
+
// Executable Clip definition assigned to a daemon machine.
|
|
2738
|
+
export interface MachineClip {
|
|
2645
2739
|
clip_id: string;
|
|
2646
2740
|
alias: string;
|
|
2741
|
+
name: string;
|
|
2742
|
+
display_name: string;
|
|
2743
|
+
description?: string | null;
|
|
2744
|
+
manifest?: Record<string, unknown>;
|
|
2745
|
+
source_type: ClipSourceType;
|
|
2647
2746
|
source_ref?: string;
|
|
2648
2747
|
version?: string;
|
|
2748
|
+
browser_profile_id?: string | null;
|
|
2649
2749
|
}
|
|
2650
2750
|
|
|
2651
2751
|
// Pinix registry catalog clip info (from GET /clip/v1/registry/clips,
|
|
@@ -2657,6 +2757,11 @@ export interface RegistryCommandInfo {
|
|
|
2657
2757
|
output?: string;
|
|
2658
2758
|
}
|
|
2659
2759
|
|
|
2760
|
+
export interface RegistryDependencyInfo {
|
|
2761
|
+
package: string;
|
|
2762
|
+
version: string;
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2660
2765
|
export interface RegistryClipInfo {
|
|
2661
2766
|
name: string; // @scope/name (canonical package id)
|
|
2662
2767
|
package: string; // @scope/name (alias derivation + install source_ref)
|
|
@@ -2666,13 +2771,59 @@ export interface RegistryClipInfo {
|
|
|
2666
2771
|
domain?: string;
|
|
2667
2772
|
author?: string;
|
|
2668
2773
|
commands: RegistryCommandInfo[];
|
|
2669
|
-
dependencies: string
|
|
2774
|
+
dependencies: Record<string, RegistryDependencyInfo>;
|
|
2670
2775
|
}
|
|
2671
2776
|
|
|
2672
2777
|
// Clip WS event data types
|
|
2673
|
-
export type
|
|
2778
|
+
export type ClipCreatedData = Clip;
|
|
2674
2779
|
export type ClipUpdatedData = Clip;
|
|
2675
2780
|
export interface ClipRemovedData {
|
|
2676
2781
|
clip_id: string;
|
|
2677
2782
|
org_id: string;
|
|
2678
2783
|
}
|
|
2784
|
+
|
|
2785
|
+
// ─── Unified Search ───
|
|
2786
|
+
|
|
2787
|
+
export interface SearchParams {
|
|
2788
|
+
q: string;
|
|
2789
|
+
types?: string;
|
|
2790
|
+
chat_id?: string;
|
|
2791
|
+
limit?: number;
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2794
|
+
export interface SearchMessageResult {
|
|
2795
|
+
message_id: string;
|
|
2796
|
+
chat_id: string;
|
|
2797
|
+
chat_name?: string;
|
|
2798
|
+
sender?: { id: string; display_name: string };
|
|
2799
|
+
content_snippet: string;
|
|
2800
|
+
score: number;
|
|
2801
|
+
created_at: string;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
export interface SearchTaskResult {
|
|
2805
|
+
task_id: string;
|
|
2806
|
+
project_id?: string;
|
|
2807
|
+
project_name?: string;
|
|
2808
|
+
title: string;
|
|
2809
|
+
content_snippet: string;
|
|
2810
|
+
score: number;
|
|
2811
|
+
updated_at?: string;
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
export interface SearchWikiResult {
|
|
2815
|
+
/** Globally-unique section id (stable React key — file_path can repeat across matched sections). */
|
|
2816
|
+
section_id: string;
|
|
2817
|
+
wiki_id: string;
|
|
2818
|
+
wiki_name?: string;
|
|
2819
|
+
file_path: string;
|
|
2820
|
+
heading_path: string[];
|
|
2821
|
+
content_snippet: string;
|
|
2822
|
+
score: number;
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
export interface SearchResponse {
|
|
2826
|
+
messages: SearchMessageResult[];
|
|
2827
|
+
tasks: SearchTaskResult[];
|
|
2828
|
+
wiki: SearchWikiResult[];
|
|
2829
|
+
}
|