@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/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;AAOpC,eAAO,MAAM,eAAe
|
|
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;AAOpC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmMlB,CAAC;AAIX,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA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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
|
@@ -10,6 +10,41 @@ export const CLIP_BASE = '/clip/v1';
|
|
|
10
10
|
// included for catalog completeness and agent runtime delivery; product UI
|
|
11
11
|
// should continue to display canonical model IDs/names.
|
|
12
12
|
export const PLATFORM_MODELS = [
|
|
13
|
+
// Fable 5 rejects an explicit thinking "disabled" param (400) — bridges must
|
|
14
|
+
// omit the thinking config entirely instead of disabling it.
|
|
15
|
+
// "(1M)" variants opt the claude-code runtime into the 1M-token context
|
|
16
|
+
// window via the CLI's [1m] model-name suffix; the server proxy aliases the
|
|
17
|
+
// catalog ID back to the base model upstream.
|
|
18
|
+
{
|
|
19
|
+
id: 'anthropic/claude-fable-5',
|
|
20
|
+
name: 'Claude Fable 5',
|
|
21
|
+
provider: 'anthropic',
|
|
22
|
+
effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
23
|
+
runtime_names: { 'claude-code': 'claude-fable-5' },
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'anthropic/claude-fable-5-1m',
|
|
27
|
+
name: 'Claude Fable 5 (1M)',
|
|
28
|
+
provider: 'anthropic',
|
|
29
|
+
effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
30
|
+
runtime_names: { 'claude-code': 'claude-fable-5[1m]' },
|
|
31
|
+
upstream_id: 'anthropic/claude-fable-5',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'anthropic/claude-opus-4.8',
|
|
35
|
+
name: 'Claude Opus 4.8',
|
|
36
|
+
provider: 'anthropic',
|
|
37
|
+
effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
38
|
+
runtime_names: { 'claude-code': 'claude-opus-4-8' },
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'anthropic/claude-opus-4.8-1m',
|
|
42
|
+
name: 'Claude Opus 4.8 (1M)',
|
|
43
|
+
provider: 'anthropic',
|
|
44
|
+
effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
45
|
+
runtime_names: { 'claude-code': 'claude-opus-4-8[1m]' },
|
|
46
|
+
upstream_id: 'anthropic/claude-opus-4.8',
|
|
47
|
+
},
|
|
13
48
|
{
|
|
14
49
|
id: 'anthropic/claude-opus-4.7',
|
|
15
50
|
name: 'Claude Opus 4.7',
|
|
@@ -31,6 +66,14 @@ export const PLATFORM_MODELS = [
|
|
|
31
66
|
effortLevels: ['low', 'medium', 'high', 'max'],
|
|
32
67
|
runtime_names: { 'claude-code': 'claude-sonnet-4-6' },
|
|
33
68
|
},
|
|
69
|
+
{
|
|
70
|
+
id: 'anthropic/claude-sonnet-4.6-1m',
|
|
71
|
+
name: 'Claude Sonnet 4.6 (1M)',
|
|
72
|
+
provider: 'anthropic',
|
|
73
|
+
effortLevels: ['low', 'medium', 'high', 'max'],
|
|
74
|
+
runtime_names: { 'claude-code': 'claude-sonnet-4-6[1m]' },
|
|
75
|
+
upstream_id: 'anthropic/claude-sonnet-4.6',
|
|
76
|
+
},
|
|
34
77
|
{
|
|
35
78
|
id: 'anthropic/claude-sonnet-4.5',
|
|
36
79
|
name: 'Claude Sonnet 4.5',
|
|
@@ -74,6 +117,12 @@ export const PLATFORM_MODELS = [
|
|
|
74
117
|
effortLevels: ['medium', 'high', 'xhigh'],
|
|
75
118
|
runtime_names: { codex: 'gpt-5.4-pro' },
|
|
76
119
|
},
|
|
120
|
+
{
|
|
121
|
+
id: 'google/gemini-3.5-flash',
|
|
122
|
+
name: 'Gemini 3.5 Flash',
|
|
123
|
+
provider: 'google',
|
|
124
|
+
effortLevels: [],
|
|
125
|
+
},
|
|
77
126
|
{
|
|
78
127
|
id: 'google/gemini-3.1-pro-preview',
|
|
79
128
|
name: 'Gemini 3.1 Pro Preview',
|
|
@@ -238,6 +287,16 @@ export const PLATFORM_DEFAULT_MODEL_BY_RUNTIME = {
|
|
|
238
287
|
'claude-code': 'anthropic/claude-sonnet-4.6',
|
|
239
288
|
codex: 'openai/gpt-5.4',
|
|
240
289
|
};
|
|
290
|
+
// Mirrors Go llmproxy.IsAllowedModelForRuntime's upstream-alias rule:
|
|
291
|
+
// variants that alias upstream (`upstream_id` set — the "(1M)" entries) encode
|
|
292
|
+
// runtime-specific client behavior and are only selectable by runtimes with an
|
|
293
|
+
// explicit runtime_names mapping. Model pickers must filter with this in
|
|
294
|
+
// addition to provider filtering.
|
|
295
|
+
export function isPlatformModelSelectableForRuntime(model, runtime) {
|
|
296
|
+
if (!model.upstream_id)
|
|
297
|
+
return true;
|
|
298
|
+
return Boolean(runtime && model.runtime_names && runtime in model.runtime_names);
|
|
299
|
+
}
|
|
241
300
|
export function platformDefaultModelForRuntime(runtime) {
|
|
242
301
|
switch (runtime?.trim()) {
|
|
243
302
|
case undefined:
|
|
@@ -357,6 +416,7 @@ export const ENDPOINTS = {
|
|
|
357
416
|
MACHINE_AGENT_DAEMON_CONFIG: (orgId, machineId, agentId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/agents/${agentId}/daemon-config`,
|
|
358
417
|
MACHINE_AGENT_WORKSPACE_SETUP: (orgId, machineId, agentId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/agents/${agentId}/workspace/setup`,
|
|
359
418
|
MACHINE_LLM_SOURCE: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/llm-source`,
|
|
419
|
+
MACHINE_PROVIDER_ENABLED: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/provider-enabled`,
|
|
360
420
|
MACHINE_RUNTIME_AUTH: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/runtime-auth`,
|
|
361
421
|
MACHINE_KEYS: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/keys`,
|
|
362
422
|
MACHINE_KEY: (orgId, machineId, keyId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/keys/${keyId}`,
|
|
@@ -370,8 +430,9 @@ export const ENDPOINTS = {
|
|
|
370
430
|
MACHINES_ME: `${API_BASE}/machines/me`,
|
|
371
431
|
MACHINES_ME_AGENTS: `${API_BASE}/machines/me/agents`,
|
|
372
432
|
MACHINES_ME_HEALTH: `${API_BASE}/machines/me/health`,
|
|
373
|
-
|
|
374
|
-
|
|
433
|
+
MACHINES_ME_CLIPS: `${API_BASE}/machines/me/clips`,
|
|
434
|
+
MACHINES_ME_BROWSER_PROFILES: `${API_BASE}/machines/me/browser-profiles`,
|
|
435
|
+
MACHINES_ME_BROWSER_PROFILE_STATUS: (profileId) => `${API_BASE}/machines/me/browser-profiles/${profileId}/status`,
|
|
375
436
|
MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId) => `${API_BASE}/machines/me/agents/${agentId}/launch-credential`,
|
|
376
437
|
MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId) => `${API_BASE}/machines/me/agents/${agentId}/workspace-state`,
|
|
377
438
|
MACHINES_ME_WS_TICKET: `${API_BASE}/machines/me/ws/ticket`,
|
|
@@ -470,6 +531,7 @@ export const ENDPOINTS = {
|
|
|
470
531
|
DISPATCH_RECEIVED: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/received`,
|
|
471
532
|
DISPATCH_ACK: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/ack`,
|
|
472
533
|
DISPATCH_ACK_BY_ID: (orgId, id) => `${API_BASE}/orgs/${orgId}/dispatch/${id}/ack`,
|
|
534
|
+
DISPATCH_EXPIRE: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/expire`,
|
|
473
535
|
DISPATCH_BY_MESSAGES: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/by-messages`,
|
|
474
536
|
// Unread
|
|
475
537
|
UNREAD: `${API_BASE}/me/unread`,
|
|
@@ -488,6 +550,8 @@ export const ENDPOINTS = {
|
|
|
488
550
|
PUSH_VAPID_KEY: `${API_BASE}/push/vapid-key`,
|
|
489
551
|
// Notification preferences
|
|
490
552
|
NOTIFICATION_PREFERENCES: `${API_BASE}/notification-preferences`,
|
|
553
|
+
// Unified search (messages + tasks + wiki, org-scoped)
|
|
554
|
+
SEARCH: (orgId) => `${API_BASE}/orgs/${orgId}/search`,
|
|
491
555
|
// Feature flags (org-scoped, server-evaluated)
|
|
492
556
|
FEATURE_FLAGS: (orgId) => `${API_BASE}/orgs/${orgId}/feature-flags`,
|
|
493
557
|
// Billing & Credits (org-scoped)
|
|
@@ -508,6 +572,13 @@ export const ENDPOINTS = {
|
|
|
508
572
|
AGENT_CLIP: (orgId, agentId, clipId) => `${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips/${clipId}`,
|
|
509
573
|
CLIP_INVOKE: (orgId) => `${CLIP_BASE}/orgs/${orgId}/invoke`,
|
|
510
574
|
CLIP_ONLINE: (orgId) => `${CLIP_BASE}/orgs/${orgId}/online`,
|
|
575
|
+
BROWSER_PROFILES: (orgId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles`,
|
|
576
|
+
BROWSER_PROFILE: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}`,
|
|
577
|
+
BROWSER_PROFILE_OPEN: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/open`,
|
|
578
|
+
BROWSER_PROFILE_STOP: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/stop`,
|
|
579
|
+
BROWSER_PROFILE_RESET: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/reset`,
|
|
580
|
+
BROWSER_PROFILE_CONSENTS: (orgId, profileId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/consents`,
|
|
581
|
+
BROWSER_PROFILE_CONSENT: (orgId, profileId, clipId) => `${CLIP_BASE}/orgs/${orgId}/browser-profiles/${profileId}/consents/${clipId}`,
|
|
511
582
|
// Clip registry (global, served by clip-service → Pinix Hub proxy)
|
|
512
583
|
CLIP_REGISTRY: () => `${CLIP_BASE}/registry/clips`,
|
|
513
584
|
};
|
|
@@ -582,9 +653,10 @@ export const WS_EVENTS = {
|
|
|
582
653
|
MACHINE_FILESYSTEM_BROWSE: 'machine.filesystem.browse',
|
|
583
654
|
MACHINE_UPDATE: 'machine.update',
|
|
584
655
|
MACHINE_CONFIG_UPDATED: 'machine.config.updated',
|
|
585
|
-
|
|
656
|
+
MACHINE_CLIP_SYNC: 'machine.clip.sync',
|
|
657
|
+
MACHINE_BROWSER_PROFILE_LIFECYCLE: 'machine.browser_profile.lifecycle',
|
|
586
658
|
AGENT_NEW_SESSION: 'agent.new_session',
|
|
587
|
-
|
|
659
|
+
CLIP_CREATED: 'clip.created',
|
|
588
660
|
CLIP_REMOVED: 'clip.removed',
|
|
589
661
|
CLIP_UPDATED: 'clip.updated',
|
|
590
662
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ export interface User {
|
|
|
15
15
|
export type ChatType = 'direct' | 'group';
|
|
16
16
|
export type AgentRoutingMode = 'passive' | 'active' | 'smart';
|
|
17
17
|
export type ChatVisibility = 'public' | 'private';
|
|
18
|
+
/**
|
|
19
|
+
* Who can add new members to a chat.
|
|
20
|
+
* - `everyone` (default): any chat member can add another org member.
|
|
21
|
+
* - `admins`: only chat admins/owners (and org admins) may add.
|
|
22
|
+
*/
|
|
23
|
+
export type MemberInvitePolicy = 'everyone' | 'admins';
|
|
18
24
|
export interface Chat {
|
|
19
25
|
id: string;
|
|
20
26
|
type: ChatType;
|
|
@@ -28,6 +34,7 @@ export interface Chat {
|
|
|
28
34
|
smart_routing_strategy: string | null;
|
|
29
35
|
/** Chat-level smart routing agent override. NULL = use org default. */
|
|
30
36
|
smart_routing_agent_id: string | null;
|
|
37
|
+
member_invite_policy: MemberInvitePolicy;
|
|
31
38
|
last_message_at: string | null;
|
|
32
39
|
last_message_preview: string | null;
|
|
33
40
|
last_message_sender: string | null;
|
|
@@ -582,7 +589,10 @@ export interface Machine {
|
|
|
582
589
|
daemon_mode: boolean;
|
|
583
590
|
llm_source?: string;
|
|
584
591
|
compute_mode: 'hosted' | 'local';
|
|
592
|
+
provider_enabled?: boolean;
|
|
593
|
+
clip_provider_url?: string;
|
|
585
594
|
daemon_version?: string | null;
|
|
595
|
+
self_update_capable?: boolean;
|
|
586
596
|
region: string | null;
|
|
587
597
|
created_by: string;
|
|
588
598
|
created_at: string;
|
|
@@ -694,6 +704,7 @@ export interface MachineAgentDetachedData {
|
|
|
694
704
|
export interface MachineConfigUpdatedData {
|
|
695
705
|
machine_id: string;
|
|
696
706
|
llm_source?: string;
|
|
707
|
+
provider_enabled?: boolean;
|
|
697
708
|
}
|
|
698
709
|
export interface MachineWorkspaceSetupRequestedData {
|
|
699
710
|
machine_id: string;
|
|
@@ -714,11 +725,17 @@ export interface MachineUpdateData {
|
|
|
714
725
|
mandatory: boolean;
|
|
715
726
|
reason?: string;
|
|
716
727
|
}
|
|
717
|
-
export interface
|
|
728
|
+
export interface MachineClipSyncData {
|
|
729
|
+
machine_id: string;
|
|
718
730
|
clip_id: string;
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
731
|
+
action?: 'create' | 'update' | 'delete' | string;
|
|
732
|
+
}
|
|
733
|
+
export type BrowserProfileLifecycleAction = 'open' | 'stop' | 'reset';
|
|
734
|
+
export interface MachineBrowserProfileLifecycleData {
|
|
735
|
+
machine_id: string;
|
|
736
|
+
profile_id: string;
|
|
737
|
+
action: BrowserProfileLifecycleAction;
|
|
738
|
+
start_url?: string;
|
|
722
739
|
}
|
|
723
740
|
export interface AgentNewSessionData {
|
|
724
741
|
previous_session_id?: string;
|
|
@@ -1364,7 +1381,7 @@ export interface ChatCreatedData extends Chat {
|
|
|
1364
1381
|
}
|
|
1365
1382
|
export interface ChatUpdateData {
|
|
1366
1383
|
chat_id: string;
|
|
1367
|
-
changes: Partial<Pick<Chat, 'name' | 'avatar_url' | 'description' | 'visibility' | 'agent_routing_mode' | 'smart_routing_strategy' | 'smart_routing_agent_id' | 'last_message_at' | 'last_message_preview' | 'last_message_sender' | 'archived_at' | 'deleted_at'>>;
|
|
1384
|
+
changes: Partial<Pick<Chat, 'name' | 'avatar_url' | 'description' | 'visibility' | 'agent_routing_mode' | 'smart_routing_strategy' | 'smart_routing_agent_id' | 'member_invite_policy' | 'last_message_at' | 'last_message_preview' | 'last_message_sender' | 'archived_at' | 'deleted_at'>>;
|
|
1368
1385
|
}
|
|
1369
1386
|
export interface ChatDeletedData {
|
|
1370
1387
|
chat_id: string;
|
|
@@ -1600,6 +1617,18 @@ export interface DispatchEvent {
|
|
|
1600
1617
|
created_at: string;
|
|
1601
1618
|
}
|
|
1602
1619
|
export type DispatchNewData = DispatchEvent;
|
|
1620
|
+
export interface DispatchExpiredGroup {
|
|
1621
|
+
chat_id: string | null;
|
|
1622
|
+
chat_name?: string | null;
|
|
1623
|
+
event_type: DispatchEventType;
|
|
1624
|
+
count: number;
|
|
1625
|
+
oldest: string;
|
|
1626
|
+
newest: string;
|
|
1627
|
+
}
|
|
1628
|
+
export interface DispatchExpireResult {
|
|
1629
|
+
total: number;
|
|
1630
|
+
groups: DispatchExpiredGroup[];
|
|
1631
|
+
}
|
|
1603
1632
|
export interface DispatchReceivedData {
|
|
1604
1633
|
agent_id: string;
|
|
1605
1634
|
event_type: string;
|
|
@@ -1701,8 +1730,9 @@ export type WsEventMap = {
|
|
|
1701
1730
|
'machine.stop': MachineStopData;
|
|
1702
1731
|
'machine.filesystem.browse': MachineFilesystemBrowseData;
|
|
1703
1732
|
'machine.update': MachineUpdateData;
|
|
1704
|
-
'machine.clip.
|
|
1705
|
-
'
|
|
1733
|
+
'machine.clip.sync': MachineClipSyncData;
|
|
1734
|
+
'machine.browser_profile.lifecycle': MachineBrowserProfileLifecycleData;
|
|
1735
|
+
'clip.created': ClipCreatedData;
|
|
1706
1736
|
'clip.removed': ClipRemovedData;
|
|
1707
1737
|
'clip.updated': ClipUpdatedData;
|
|
1708
1738
|
'agent.new_session': AgentNewSessionData;
|
|
@@ -1786,6 +1816,7 @@ export interface ResolvedRef {
|
|
|
1786
1816
|
sender_avatar_url?: string | null;
|
|
1787
1817
|
message_type?: string;
|
|
1788
1818
|
created_at?: string;
|
|
1819
|
+
attachments?: Attachment[];
|
|
1789
1820
|
range_messages?: Array<{
|
|
1790
1821
|
id: string;
|
|
1791
1822
|
sender_id: string;
|
|
@@ -1795,6 +1826,7 @@ export interface ResolvedRef {
|
|
|
1795
1826
|
message_type: string;
|
|
1796
1827
|
preview: string;
|
|
1797
1828
|
created_at: string;
|
|
1829
|
+
attachments?: Attachment[];
|
|
1798
1830
|
}>;
|
|
1799
1831
|
range_truncated?: boolean;
|
|
1800
1832
|
file_name?: string;
|
|
@@ -2039,17 +2071,16 @@ export interface Clip {
|
|
|
2039
2071
|
org_id: string;
|
|
2040
2072
|
alias: string;
|
|
2041
2073
|
name: string;
|
|
2074
|
+
display_name: string;
|
|
2042
2075
|
description: string | null;
|
|
2043
2076
|
manifest: Record<string, unknown>;
|
|
2044
2077
|
source_type: ClipSourceType;
|
|
2045
2078
|
source_ref: string | null;
|
|
2046
2079
|
version: string | null;
|
|
2047
2080
|
status: ClipStatus;
|
|
2081
|
+
machine_id: string;
|
|
2082
|
+
browser_profile_id: string | null;
|
|
2048
2083
|
created_by: string | null;
|
|
2049
|
-
/** Registry clip that reconciles onto every org machine, including machines
|
|
2050
|
-
* that join after creation. Targeted installs leave this false and persist
|
|
2051
|
-
* per-machine pending clip_instances instead. */
|
|
2052
|
-
install_on_all_machines: boolean;
|
|
2053
2084
|
created_at: string;
|
|
2054
2085
|
updated_at: string;
|
|
2055
2086
|
}
|
|
@@ -2061,47 +2092,87 @@ export interface AgentClip {
|
|
|
2061
2092
|
}
|
|
2062
2093
|
export interface CreateClipRequest {
|
|
2063
2094
|
alias: string;
|
|
2064
|
-
name
|
|
2095
|
+
name?: string;
|
|
2096
|
+
display_name?: string;
|
|
2065
2097
|
description?: string;
|
|
2066
|
-
manifest
|
|
2098
|
+
manifest?: Record<string, unknown>;
|
|
2067
2099
|
source_type?: ClipSourceType;
|
|
2068
2100
|
source_ref?: string;
|
|
2069
2101
|
version?: string;
|
|
2070
|
-
|
|
2102
|
+
machine_id: string;
|
|
2103
|
+
browser_profile_id?: string;
|
|
2071
2104
|
}
|
|
2072
2105
|
export interface UpdateClipRequest {
|
|
2073
2106
|
name?: string;
|
|
2107
|
+
display_name?: string;
|
|
2074
2108
|
description?: string;
|
|
2075
2109
|
manifest?: Record<string, unknown>;
|
|
2076
2110
|
status?: ClipStatus;
|
|
2077
2111
|
version?: string;
|
|
2112
|
+
machine_id?: string;
|
|
2113
|
+
/** Empty string clears the binding; omitted leaves it unchanged. */
|
|
2114
|
+
browser_profile_id?: string;
|
|
2078
2115
|
}
|
|
2079
2116
|
export interface BindAgentClipRequest {
|
|
2080
2117
|
clip_id: string;
|
|
2081
2118
|
config?: Record<string, unknown>;
|
|
2082
2119
|
}
|
|
2083
|
-
|
|
2084
|
-
alias: string;
|
|
2120
|
+
interface InvokeClipBaseRequest {
|
|
2085
2121
|
command: string;
|
|
2086
2122
|
input?: unknown;
|
|
2087
2123
|
timeout_ms?: number;
|
|
2088
2124
|
}
|
|
2125
|
+
export type InvokeClipRequest = (InvokeClipBaseRequest & {
|
|
2126
|
+
alias: string;
|
|
2127
|
+
clip_id?: never;
|
|
2128
|
+
}) | (InvokeClipBaseRequest & {
|
|
2129
|
+
clip_id: string;
|
|
2130
|
+
alias?: never;
|
|
2131
|
+
});
|
|
2089
2132
|
export interface InvokeClipResponse {
|
|
2090
2133
|
output: unknown;
|
|
2091
2134
|
error: string | null;
|
|
2092
2135
|
}
|
|
2093
|
-
export type
|
|
2094
|
-
export interface
|
|
2136
|
+
export type BrowserProfileStatus = 'pending' | 'running' | 'stopped' | 'error';
|
|
2137
|
+
export interface BrowserProfile {
|
|
2095
2138
|
id: string;
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2139
|
+
org_id: string;
|
|
2140
|
+
/** Host machine where the profile's cookies / bb-browser account live. */
|
|
2141
|
+
machine_id: string;
|
|
2142
|
+
owner_user_id: string;
|
|
2143
|
+
display_name: string;
|
|
2144
|
+
status: BrowserProfileStatus;
|
|
2145
|
+
error_msg?: string | null;
|
|
2146
|
+
last_seen?: string | null;
|
|
2147
|
+
created_by?: string | null;
|
|
2102
2148
|
created_at: string;
|
|
2103
2149
|
updated_at: string;
|
|
2104
2150
|
}
|
|
2151
|
+
export interface BrowserProfileConsent {
|
|
2152
|
+
id: string;
|
|
2153
|
+
org_id: string;
|
|
2154
|
+
browser_profile_id: string;
|
|
2155
|
+
clip_id: string;
|
|
2156
|
+
owner_user_id: string;
|
|
2157
|
+
granted_by: string;
|
|
2158
|
+
granted_at: string;
|
|
2159
|
+
revoked_at?: string | null;
|
|
2160
|
+
}
|
|
2161
|
+
export interface CreateBrowserProfileRequest {
|
|
2162
|
+
/** Host machine that runs the BrowserProfile (cookies / bb-browser account). */
|
|
2163
|
+
machine_id: string;
|
|
2164
|
+
owner_user_id: string;
|
|
2165
|
+
display_name: string;
|
|
2166
|
+
}
|
|
2167
|
+
export interface UpdateBrowserProfileRequest {
|
|
2168
|
+
display_name?: string;
|
|
2169
|
+
}
|
|
2170
|
+
export interface BrowserProfileLifecycleRequest {
|
|
2171
|
+
start_url?: string;
|
|
2172
|
+
}
|
|
2173
|
+
export interface GrantBrowserProfileConsentRequest {
|
|
2174
|
+
clip_id: string;
|
|
2175
|
+
}
|
|
2105
2176
|
export interface OnlineClipInfo {
|
|
2106
2177
|
alias: string;
|
|
2107
2178
|
name: string;
|
|
@@ -2112,11 +2183,17 @@ export interface OnlineClipInfo {
|
|
|
2112
2183
|
}>;
|
|
2113
2184
|
provider_name: string;
|
|
2114
2185
|
}
|
|
2115
|
-
export interface
|
|
2186
|
+
export interface MachineClip {
|
|
2116
2187
|
clip_id: string;
|
|
2117
2188
|
alias: string;
|
|
2189
|
+
name: string;
|
|
2190
|
+
display_name: string;
|
|
2191
|
+
description?: string | null;
|
|
2192
|
+
manifest?: Record<string, unknown>;
|
|
2193
|
+
source_type: ClipSourceType;
|
|
2118
2194
|
source_ref?: string;
|
|
2119
2195
|
version?: string;
|
|
2196
|
+
browser_profile_id?: string | null;
|
|
2120
2197
|
}
|
|
2121
2198
|
export interface RegistryCommandInfo {
|
|
2122
2199
|
name: string;
|
|
@@ -2124,6 +2201,10 @@ export interface RegistryCommandInfo {
|
|
|
2124
2201
|
input?: string;
|
|
2125
2202
|
output?: string;
|
|
2126
2203
|
}
|
|
2204
|
+
export interface RegistryDependencyInfo {
|
|
2205
|
+
package: string;
|
|
2206
|
+
version: string;
|
|
2207
|
+
}
|
|
2127
2208
|
export interface RegistryClipInfo {
|
|
2128
2209
|
name: string;
|
|
2129
2210
|
package: string;
|
|
@@ -2133,12 +2214,55 @@ export interface RegistryClipInfo {
|
|
|
2133
2214
|
domain?: string;
|
|
2134
2215
|
author?: string;
|
|
2135
2216
|
commands: RegistryCommandInfo[];
|
|
2136
|
-
dependencies: string
|
|
2217
|
+
dependencies: Record<string, RegistryDependencyInfo>;
|
|
2137
2218
|
}
|
|
2138
|
-
export type
|
|
2219
|
+
export type ClipCreatedData = Clip;
|
|
2139
2220
|
export type ClipUpdatedData = Clip;
|
|
2140
2221
|
export interface ClipRemovedData {
|
|
2141
2222
|
clip_id: string;
|
|
2142
2223
|
org_id: string;
|
|
2143
2224
|
}
|
|
2225
|
+
export interface SearchParams {
|
|
2226
|
+
q: string;
|
|
2227
|
+
types?: string;
|
|
2228
|
+
chat_id?: string;
|
|
2229
|
+
limit?: number;
|
|
2230
|
+
}
|
|
2231
|
+
export interface SearchMessageResult {
|
|
2232
|
+
message_id: string;
|
|
2233
|
+
chat_id: string;
|
|
2234
|
+
chat_name?: string;
|
|
2235
|
+
sender?: {
|
|
2236
|
+
id: string;
|
|
2237
|
+
display_name: string;
|
|
2238
|
+
};
|
|
2239
|
+
content_snippet: string;
|
|
2240
|
+
score: number;
|
|
2241
|
+
created_at: string;
|
|
2242
|
+
}
|
|
2243
|
+
export interface SearchTaskResult {
|
|
2244
|
+
task_id: string;
|
|
2245
|
+
project_id?: string;
|
|
2246
|
+
project_name?: string;
|
|
2247
|
+
title: string;
|
|
2248
|
+
content_snippet: string;
|
|
2249
|
+
score: number;
|
|
2250
|
+
updated_at?: string;
|
|
2251
|
+
}
|
|
2252
|
+
export interface SearchWikiResult {
|
|
2253
|
+
/** Globally-unique section id (stable React key — file_path can repeat across matched sections). */
|
|
2254
|
+
section_id: string;
|
|
2255
|
+
wiki_id: string;
|
|
2256
|
+
wiki_name?: string;
|
|
2257
|
+
file_path: string;
|
|
2258
|
+
heading_path: string[];
|
|
2259
|
+
content_snippet: string;
|
|
2260
|
+
score: number;
|
|
2261
|
+
}
|
|
2262
|
+
export interface SearchResponse {
|
|
2263
|
+
messages: SearchMessageResult[];
|
|
2264
|
+
tasks: SearchTaskResult[];
|
|
2265
|
+
wiki: SearchWikiResult[];
|
|
2266
|
+
}
|
|
2267
|
+
export {};
|
|
2144
2268
|
//# sourceMappingURL=types.d.ts.map
|