@parall/sdk 1.26.2 → 1.27.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 +40 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +64 -13
- package/dist/constants.d.ts +190 -17
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +53 -9
- package/dist/types.d.ts +69 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +77 -12
- package/src/constants.ts +59 -9
- package/src/types.ts +86 -6
package/src/constants.ts
CHANGED
|
@@ -14,17 +14,49 @@ export const PLATFORM_MODELS = [
|
|
|
14
14
|
{ id: 'anthropic/claude-opus-4.6', name: 'Claude Opus 4.6', provider: 'anthropic', effortLevels: ['low', 'medium', 'high', 'max'], runtime_names: { 'claude-code': 'claude-opus-4-6' } },
|
|
15
15
|
{ id: 'anthropic/claude-sonnet-4.6', name: 'Claude Sonnet 4.6', provider: 'anthropic', effortLevels: ['low', 'medium', 'high', 'max'], runtime_names: { 'claude-code': 'claude-sonnet-4-6' } },
|
|
16
16
|
{ id: 'anthropic/claude-sonnet-4.5', name: 'Claude Sonnet 4.5', provider: 'anthropic', effortLevels: [], runtime_names: { 'claude-code': 'claude-sonnet-4-5' } },
|
|
17
|
-
{ id: '
|
|
17
|
+
{ id: 'anthropic/claude-haiku-4.5', name: 'Claude Haiku 4.5', provider: 'anthropic', effortLevels: [], runtime_names: { 'claude-code': 'claude-haiku-4-5' } },
|
|
18
|
+
{ id: 'openai/gpt-5.5', name: 'GPT-5.5', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.5' } },
|
|
19
|
+
// GPT-5.5 Pro has no documented API-key effort control surface yet.
|
|
20
|
+
{ id: 'openai/gpt-5.5-pro', name: 'GPT-5.5 Pro', provider: 'openai', effortLevels: [], runtime_names: { codex: 'gpt-5.5-pro' } },
|
|
18
21
|
{ id: 'openai/gpt-5.4', name: 'GPT-5.4', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.4' } },
|
|
19
|
-
{ id: 'openai/
|
|
20
|
-
{ id: '
|
|
21
|
-
{ id: 'google/gemini-
|
|
22
|
+
{ id: 'openai/gpt-5.4-pro', name: 'GPT-5.4 Pro', provider: 'openai', effortLevels: ['medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.4-pro' } },
|
|
23
|
+
{ id: 'google/gemini-3.1-pro-preview', name: 'Gemini 3.1 Pro Preview', provider: 'google', effortLevels: [] },
|
|
24
|
+
{ id: 'google/gemini-3.1-pro-preview-customtools', name: 'Gemini 3.1 Pro Preview Custom Tools', provider: 'google', effortLevels: [] },
|
|
25
|
+
{ id: 'google/gemini-3-pro-preview', name: 'Gemini 3 Pro Preview', provider: 'google', effortLevels: [] },
|
|
26
|
+
{ id: 'google/gemini-3-flash-preview', name: 'Gemini 3 Flash Preview', provider: 'google', effortLevels: [] },
|
|
22
27
|
{ id: 'google/gemini-2.5-flash', name: 'Gemini 2.5 Flash', provider: 'google', effortLevels: [] },
|
|
28
|
+
{ id: 'google/gemini-3.1-flash-lite', name: 'Gemini 3.1 Flash-Lite', provider: 'google', effortLevels: [] },
|
|
29
|
+
{ id: 'google/gemini-2.5-flash-lite', name: 'Gemini 2.5 Flash-Lite', provider: 'google', effortLevels: [] },
|
|
30
|
+
{ id: 'moonshotai/kimi-k2.6', name: 'Kimi K2.6', provider: 'moonshotai', effortLevels: [] },
|
|
23
31
|
{ id: 'moonshotai/kimi-k2.5', name: 'Kimi K2.5', provider: 'moonshotai', effortLevels: [] },
|
|
32
|
+
{ id: 'z-ai/glm-5.1', name: 'GLM 5.1', provider: 'z-ai', effortLevels: [] },
|
|
24
33
|
{ id: 'z-ai/glm-5', name: 'GLM 5', provider: 'z-ai', effortLevels: [] },
|
|
25
34
|
{ id: 'deepseek/deepseek-v4-pro', name: 'DeepSeek V4 Pro', provider: 'deepseek', effortLevels: [] },
|
|
26
35
|
{ id: 'deepseek/deepseek-v4-flash', name: 'DeepSeek V4 Flash', provider: 'deepseek', effortLevels: [] },
|
|
27
|
-
{ id: 'qwen/qwen3.
|
|
36
|
+
{ id: 'qwen/qwen3.6-max-preview', name: 'Qwen3.6 Max Preview', provider: 'qwen', effortLevels: [] },
|
|
37
|
+
{ id: 'qwen/qwen3.6-plus', name: 'Qwen3.6 Plus', provider: 'qwen', effortLevels: [] },
|
|
38
|
+
{ id: 'qwen/qwen3.6-plus-2026-04-02', name: 'Qwen3.6 Plus 2026-04-02', provider: 'qwen', effortLevels: [] },
|
|
39
|
+
{ id: 'qwen/qwen3.5-plus', name: 'Qwen3.5 Plus', provider: 'qwen', effortLevels: [] },
|
|
40
|
+
{ id: 'qwen/qwen3.5-plus-2026-02-15', name: 'Qwen3.5 Plus 2026-02-15', provider: 'qwen', effortLevels: [] },
|
|
41
|
+
{ id: 'qwen/qwen3.6-flash', name: 'Qwen3.6 Flash', provider: 'qwen', effortLevels: [] },
|
|
42
|
+
{ id: 'qwen/qwen3.6-flash-2026-04-16', name: 'Qwen3.6 Flash 2026-04-16', provider: 'qwen', effortLevels: [] },
|
|
43
|
+
{ id: 'qwen/qwen3-coder-plus', name: 'Qwen3 Coder Plus', provider: 'qwen', effortLevels: [] },
|
|
44
|
+
] as const;
|
|
45
|
+
|
|
46
|
+
// Hidden from new-agent pickers, but available to editors so persisted Beta
|
|
47
|
+
// agent defaults remain representable.
|
|
48
|
+
export const PLATFORM_LEGACY_MODELS = [
|
|
49
|
+
{ id: 'openai/gpt-5.4-mini', name: 'GPT-5.4 Mini', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.4-mini' } },
|
|
50
|
+
{ id: 'openai/gpt-5-mini', name: 'GPT-5 Mini', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5-mini' } },
|
|
51
|
+
{ id: 'openai/gpt-5.4-nano', name: 'GPT-5.4 Nano', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.4-nano' } },
|
|
52
|
+
{ id: 'openai/gpt-5-nano', name: 'GPT-5 Nano', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5-nano' } },
|
|
53
|
+
{ id: 'openai/gpt-5.3-codex', name: 'GPT-5.3 Codex', provider: 'openai', effortLevels: ['low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.3-codex' } },
|
|
54
|
+
{ id: 'openai/gpt-5.2-codex', name: 'GPT-5.2 Codex', provider: 'openai', effortLevels: ['low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.2-codex' } },
|
|
55
|
+
{ id: 'openai/gpt-5-codex', name: 'GPT-5 Codex', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5-codex' } },
|
|
56
|
+
{ id: 'openai/o4-mini', name: 'o4 Mini', provider: 'openai', effortLevels: ['low', 'medium', 'high'], runtime_names: { codex: 'o4-mini' } },
|
|
57
|
+
{ id: 'openai/gpt-4.1', name: 'GPT-4.1', provider: 'openai', effortLevels: [], runtime_names: { codex: 'gpt-4.1' } },
|
|
58
|
+
{ id: 'google/gemini-2.5-pro', name: 'Gemini 2.5 Pro', provider: 'google', effortLevels: [] },
|
|
59
|
+
{ id: 'qwen/qwen3.5-plus-02-15', name: 'Qwen3.5 Plus 02-15 Legacy', provider: 'qwen', effortLevels: [] },
|
|
28
60
|
] as const;
|
|
29
61
|
|
|
30
62
|
// Mirrors server/pkg/llmproxy/models.go DefaultModelIDForRuntime. Go remains
|
|
@@ -33,7 +65,7 @@ export const PLATFORM_MODELS = [
|
|
|
33
65
|
export const PLATFORM_DEFAULT_MODEL_BY_RUNTIME = {
|
|
34
66
|
openclaw: 'anthropic/claude-sonnet-4.6',
|
|
35
67
|
'claude-code': 'anthropic/claude-sonnet-4.6',
|
|
36
|
-
codex: 'openai/gpt-5
|
|
68
|
+
codex: 'openai/gpt-5.4',
|
|
37
69
|
} as const;
|
|
38
70
|
|
|
39
71
|
export function platformDefaultModelForRuntime(runtime: string | null | undefined): string | null {
|
|
@@ -86,6 +118,10 @@ export const ENDPOINTS = {
|
|
|
86
118
|
// Direct messages (org-scoped, atomic find-or-create + send)
|
|
87
119
|
DM: (orgId: string) => `${API_BASE}/orgs/${orgId}/dm`,
|
|
88
120
|
|
|
121
|
+
// Onboarding
|
|
122
|
+
SEED_ONBOARDING_DM: (orgId: string) => `${API_BASE}/orgs/${orgId}/seed-onboarding-dm`,
|
|
123
|
+
DISMISS_ONBOARDING: (orgId: string) => `${API_BASE}/orgs/${orgId}/dismiss-onboarding`,
|
|
124
|
+
|
|
89
125
|
// Chats (org-scoped)
|
|
90
126
|
CHATS: (orgId: string) => `${API_BASE}/orgs/${orgId}/chats`,
|
|
91
127
|
CHATS_DISCOVERABLE: (orgId: string) => `${API_BASE}/orgs/${orgId}/chats/discoverable`,
|
|
@@ -179,10 +215,23 @@ export const ENDPOINTS = {
|
|
|
179
215
|
`${API_BASE}/orgs/${orgId}/machines/${machineId}/status`,
|
|
180
216
|
MACHINE_LOGS: (orgId: string, machineId: string) =>
|
|
181
217
|
`${API_BASE}/orgs/${orgId}/machines/${machineId}/logs`,
|
|
218
|
+
MACHINE_SPEC: (orgId: string, machineId: string) =>
|
|
219
|
+
`${API_BASE}/orgs/${orgId}/machines/${machineId}/spec`,
|
|
182
220
|
MACHINE_RESTART: (orgId: string, machineId: string) =>
|
|
183
221
|
`${API_BASE}/orgs/${orgId}/machines/${machineId}/restart`,
|
|
184
222
|
MACHINE_RESTART_ALL: (orgId: string) =>
|
|
185
223
|
`${API_BASE}/orgs/${orgId}/machines/restart-all`,
|
|
224
|
+
|
|
225
|
+
// Machine self-control-plane (mck_-scoped). The bearer token implicitly
|
|
226
|
+
// identifies the Machine, so there is no `:mid` URL parameter — these are
|
|
227
|
+
// "self" routes called by the daemon for its own host.
|
|
228
|
+
MACHINES_ME: `${API_BASE}/machines/me`,
|
|
229
|
+
MACHINES_ME_AGENTS: `${API_BASE}/machines/me/agents`,
|
|
230
|
+
MACHINES_ME_HEALTH: `${API_BASE}/machines/me/health`,
|
|
231
|
+
MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId: string) =>
|
|
232
|
+
`${API_BASE}/machines/me/agents/${agentId}/launch-credential`,
|
|
233
|
+
MACHINES_ME_WS_TICKET: `${API_BASE}/machines/me/ws/ticket`,
|
|
234
|
+
|
|
186
235
|
// Tasks (org-scoped)
|
|
187
236
|
TASKS: (orgId: string) => `${API_BASE}/orgs/${orgId}/tasks`,
|
|
188
237
|
TASK: (orgId: string, taskId: string) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}`,
|
|
@@ -342,9 +391,6 @@ export const ENDPOINTS = {
|
|
|
342
391
|
BILLING_CHECKOUT: (orgId: string) => `${API_BASE}/orgs/${orgId}/billing/checkout`,
|
|
343
392
|
BILLING_AUTO_RELOAD: (orgId: string) => `${API_BASE}/orgs/${orgId}/billing/auto-reload`,
|
|
344
393
|
BILLING_SETUP_INTENT: (orgId: string) => `${API_BASE}/orgs/${orgId}/billing/setup-intent`,
|
|
345
|
-
// MACHINE_SPEC is intentionally absent until the server registers
|
|
346
|
-
// `PATCH /machines/{machineId}/spec`. Reintroduce with ParallClient.resizeMachine
|
|
347
|
-
// once the in-place resize endpoint lands.
|
|
348
394
|
COMPUTE_PRICING: () => `${API_BASE}/billing/compute-pricing`,
|
|
349
395
|
|
|
350
396
|
// ADMIN_GRANTS intentionally NOT exported here — it sits under the
|
|
@@ -414,6 +460,10 @@ export const WS_EVENTS = {
|
|
|
414
460
|
BILLING_MACHINE_STOPPED: 'billing.machine_stopped',
|
|
415
461
|
BILLING_INSUFFICIENT: 'billing.insufficient',
|
|
416
462
|
USER_UPDATED: 'user.updated',
|
|
463
|
+
MACHINE_HELLO: 'machine.hello',
|
|
464
|
+
MACHINE_AGENT_ATTACHED: 'machine.agent.attached',
|
|
465
|
+
MACHINE_AGENT_DETACHED: 'machine.agent.detached',
|
|
466
|
+
MACHINE_STOP: 'machine.stop',
|
|
417
467
|
} as const;
|
|
418
468
|
|
|
419
469
|
// Canonical target URI builders for unified comments.
|
package/src/types.ts
CHANGED
|
@@ -307,6 +307,8 @@ export interface Organization {
|
|
|
307
307
|
smart_routing_agent_id: string | null;
|
|
308
308
|
onboarding_agent_id: string | null;
|
|
309
309
|
created_at: string;
|
|
310
|
+
/** Per-member flag: true when the user has dismissed the onboarding popup for this org. */
|
|
311
|
+
onboarding_dismissed: boolean;
|
|
310
312
|
}
|
|
311
313
|
|
|
312
314
|
export interface OrgInviteCode {
|
|
@@ -524,6 +526,11 @@ export interface CreateAgentRequest {
|
|
|
524
526
|
description?: string;
|
|
525
527
|
machine_type?: string;
|
|
526
528
|
machine_label?: string; // preset: "lite" | "standard" | "pro" | "custom"
|
|
529
|
+
/**
|
|
530
|
+
* Bind the new agent to an existing daemon-mode Machine in the same org.
|
|
531
|
+
* When set, machine_label / cpu_cores / memory_mb / storage_gb are ignored.
|
|
532
|
+
*/
|
|
533
|
+
machine_id?: string;
|
|
527
534
|
// Required when machine_label === "custom". Validated server-side.
|
|
528
535
|
cpu_cores?: number;
|
|
529
536
|
memory_mb?: number;
|
|
@@ -633,6 +640,7 @@ export interface Machine {
|
|
|
633
640
|
status: MachineStatus;
|
|
634
641
|
compute_provider: string;
|
|
635
642
|
runtime_type: string;
|
|
643
|
+
daemon_mode: boolean;
|
|
636
644
|
region: string | null;
|
|
637
645
|
created_by: string;
|
|
638
646
|
created_at: string;
|
|
@@ -678,6 +686,65 @@ export interface AgentWithRuntime extends User {
|
|
|
678
686
|
presence?: AgentPresence | null;
|
|
679
687
|
}
|
|
680
688
|
|
|
689
|
+
// ---- Daemon self-control-plane (mck_-scoped) ----
|
|
690
|
+
//
|
|
691
|
+
// These mirror the response shapes from the server's `/machines/me/...`
|
|
692
|
+
// routes. They are consumed by `ts/daemon` running on a daemon-mode
|
|
693
|
+
// Machine; ordinary product clients have no reason to import them.
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* One element of `GET /machines/me/agents`. Pairs the agent User row with
|
|
697
|
+
* its AgentProfile so the daemon can derive runtime_type / endpoint /
|
|
698
|
+
* model in one round-trip. Mirrors `handler.AttachedAgent` on the server.
|
|
699
|
+
*
|
|
700
|
+
* `user` may be null in the unlikely case the User row was deleted
|
|
701
|
+
* out from under an AgentProfile — the server still returns the
|
|
702
|
+
* profile so the daemon can log + skip.
|
|
703
|
+
*/
|
|
704
|
+
export interface AttachedAgent {
|
|
705
|
+
user: User | null;
|
|
706
|
+
profile: AgentProfile;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// ---- Machine WS event data (daemon control plane) ----
|
|
710
|
+
|
|
711
|
+
export interface MachineHelloData {
|
|
712
|
+
conn_id: string;
|
|
713
|
+
machine_id: string;
|
|
714
|
+
server_time: string;
|
|
715
|
+
heartbeat_interval: number;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
export interface MachineAgentAttachedData {
|
|
719
|
+
machine_id: string;
|
|
720
|
+
agent_id: string;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
export interface MachineAgentDetachedData {
|
|
724
|
+
machine_id: string;
|
|
725
|
+
agent_id: string;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export interface MachineStopData {
|
|
729
|
+
machine_id: string;
|
|
730
|
+
reason?: string;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/** Wrapper for `GET /machines/me/agents`. */
|
|
734
|
+
export interface AttachedAgentsResponse {
|
|
735
|
+
data: AttachedAgent[];
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Body of `POST /machines/me/agents/{agentId}/launch-credential`. Keys
|
|
740
|
+
* have no expiry; the daemon revokes previous keys on re-mint.
|
|
741
|
+
*/
|
|
742
|
+
export interface LaunchCredentialResponse {
|
|
743
|
+
api_key: string;
|
|
744
|
+
id: string;
|
|
745
|
+
agent_id: string;
|
|
746
|
+
}
|
|
747
|
+
|
|
681
748
|
export interface PresignUploadRequest {
|
|
682
749
|
file_name: string;
|
|
683
750
|
file_size: number;
|
|
@@ -1486,9 +1553,12 @@ export interface AgentSessionDB {
|
|
|
1486
1553
|
id: string;
|
|
1487
1554
|
agent_id: string;
|
|
1488
1555
|
org_id: string;
|
|
1489
|
-
status: string; //
|
|
1556
|
+
status: string; // open | closed | failed | cancelled | superseded
|
|
1490
1557
|
runtime_type: string;
|
|
1491
1558
|
runtime_key: string | null;
|
|
1559
|
+
runtime_lane_key: string;
|
|
1560
|
+
runtime_session_id: string;
|
|
1561
|
+
parent_session_id: string | null;
|
|
1492
1562
|
runtime_ref: Record<string, unknown> | null;
|
|
1493
1563
|
trigger_message_id: string | null;
|
|
1494
1564
|
started_at: string;
|
|
@@ -1512,6 +1582,9 @@ export interface AgentStep {
|
|
|
1512
1582
|
export interface CreateAgentSessionRequest {
|
|
1513
1583
|
runtime_type?: string;
|
|
1514
1584
|
runtime_key?: string;
|
|
1585
|
+
runtime_lane_key?: string;
|
|
1586
|
+
runtime_session_id?: string;
|
|
1587
|
+
parent_session_id?: string;
|
|
1515
1588
|
runtime_ref?: Record<string, unknown>;
|
|
1516
1589
|
}
|
|
1517
1590
|
|
|
@@ -1590,7 +1663,8 @@ export interface CommentDeletedData {
|
|
|
1590
1663
|
export type InboxItemType =
|
|
1591
1664
|
| 'mention' | 'task_assign' | 'task_update'
|
|
1592
1665
|
| 'task_comment' | 'approval_request'
|
|
1593
|
-
| 'agent_alert' | 'invitation' | 'schedule_fire'
|
|
1666
|
+
| 'agent_alert' | 'invitation' | 'schedule_fire'
|
|
1667
|
+
| 'thread_reply';
|
|
1594
1668
|
|
|
1595
1669
|
export interface InboxItem {
|
|
1596
1670
|
id: string;
|
|
@@ -1737,6 +1811,10 @@ export type WsEventMap = {
|
|
|
1737
1811
|
'billing.machine_stopped': BillingMachineStoppedEvent;
|
|
1738
1812
|
'billing.insufficient': BillingInsufficientEvent;
|
|
1739
1813
|
'user.updated': User;
|
|
1814
|
+
'machine.hello': MachineHelloData;
|
|
1815
|
+
'machine.agent.attached': MachineAgentAttachedData;
|
|
1816
|
+
'machine.agent.detached': MachineAgentDetachedData;
|
|
1817
|
+
'machine.stop': MachineStopData;
|
|
1740
1818
|
};
|
|
1741
1819
|
|
|
1742
1820
|
// Invitation WS event data
|
|
@@ -1900,7 +1978,7 @@ export type RuntimeAuthStatus = 'pending' | 'completed' | 'failed' | 'expired';
|
|
|
1900
1978
|
|
|
1901
1979
|
export interface RuntimeAuthSession {
|
|
1902
1980
|
id: string;
|
|
1903
|
-
agent_id: string;
|
|
1981
|
+
agent_id: string | null;
|
|
1904
1982
|
machine_id: string;
|
|
1905
1983
|
runtime_type: string;
|
|
1906
1984
|
method: RuntimeAuthMethod;
|
|
@@ -2092,9 +2170,11 @@ export interface CreateSetupIntentResponse {
|
|
|
2092
2170
|
client_secret?: string;
|
|
2093
2171
|
}
|
|
2094
2172
|
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2173
|
+
export interface ResizeMachineRequest {
|
|
2174
|
+
cpu_cores?: number;
|
|
2175
|
+
memory_mb?: number;
|
|
2176
|
+
storage_gb?: number;
|
|
2177
|
+
}
|
|
2098
2178
|
|
|
2099
2179
|
// Invalidation signal: server publishes only { org_id } on any wallet
|
|
2100
2180
|
// change; clients refetch `getBilling` / `listBillingTransactions` to get
|