@parall/sdk 1.31.0 → 1.32.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/src/constants.ts CHANGED
@@ -4,59 +4,235 @@ export const API_BASE = '/api/v1';
4
4
  // Wiki-service base path (served by wiki-service, routed via LB path rules)
5
5
  export const WIKI_BASE = '/wiki/v1';
6
6
 
7
+ // Clip-service base path (served by clip-service, routed via LB path rules)
8
+ export const CLIP_BASE = '/clip/v1';
9
+
7
10
  // LLM model catalog — mirrors server/pkg/llmproxy/models.go DefaultModels.
8
11
  // SSOT is the Go side; keep this list in sync when models change. `provider`
9
12
  // is used by clients to filter runtime-specific pickers. `runtime_names` is
10
13
  // included for catalog completeness and agent runtime delivery; product UI
11
14
  // should continue to display canonical model IDs/names.
12
15
  export const PLATFORM_MODELS = [
13
- { id: 'anthropic/claude-opus-4.7', name: 'Claude Opus 4.7', provider: 'anthropic', effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'], runtime_names: { 'claude-code': 'claude-opus-4-7' } },
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
- { 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
- { id: 'anthropic/claude-sonnet-4.5', name: 'Claude Sonnet 4.5', provider: 'anthropic', effortLevels: [], runtime_names: { 'claude-code': 'claude-sonnet-4-5' } },
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' } },
16
+ {
17
+ id: 'anthropic/claude-opus-4.7',
18
+ name: 'Claude Opus 4.7',
19
+ provider: 'anthropic',
20
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
21
+ runtime_names: { 'claude-code': 'claude-opus-4-7' },
22
+ },
23
+ {
24
+ id: 'anthropic/claude-opus-4.6',
25
+ name: 'Claude Opus 4.6',
26
+ provider: 'anthropic',
27
+ effortLevels: ['low', 'medium', 'high', 'max'],
28
+ runtime_names: { 'claude-code': 'claude-opus-4-6' },
29
+ },
30
+ {
31
+ id: 'anthropic/claude-sonnet-4.6',
32
+ name: 'Claude Sonnet 4.6',
33
+ provider: 'anthropic',
34
+ effortLevels: ['low', 'medium', 'high', 'max'],
35
+ runtime_names: { 'claude-code': 'claude-sonnet-4-6' },
36
+ },
37
+ {
38
+ id: 'anthropic/claude-sonnet-4.5',
39
+ name: 'Claude Sonnet 4.5',
40
+ provider: 'anthropic',
41
+ effortLevels: [],
42
+ runtime_names: { 'claude-code': 'claude-sonnet-4-5' },
43
+ },
44
+ {
45
+ id: 'anthropic/claude-haiku-4.5',
46
+ name: 'Claude Haiku 4.5',
47
+ provider: 'anthropic',
48
+ effortLevels: [],
49
+ runtime_names: { 'claude-code': 'claude-haiku-4-5' },
50
+ },
51
+ {
52
+ id: 'openai/gpt-5.5',
53
+ name: 'GPT-5.5',
54
+ provider: 'openai',
55
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
56
+ runtime_names: { codex: 'gpt-5.5' },
57
+ },
19
58
  // 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' } },
21
- { id: 'openai/gpt-5.4', name: 'GPT-5.4', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.4' } },
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: [] },
59
+ {
60
+ id: 'openai/gpt-5.5-pro',
61
+ name: 'GPT-5.5 Pro',
62
+ provider: 'openai',
63
+ effortLevels: [],
64
+ runtime_names: { codex: 'gpt-5.5-pro' },
65
+ },
66
+ {
67
+ id: 'openai/gpt-5.4',
68
+ name: 'GPT-5.4',
69
+ provider: 'openai',
70
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
71
+ runtime_names: { codex: 'gpt-5.4' },
72
+ },
73
+ {
74
+ id: 'openai/gpt-5.4-pro',
75
+ name: 'GPT-5.4 Pro',
76
+ provider: 'openai',
77
+ effortLevels: ['medium', 'high', 'xhigh'],
78
+ runtime_names: { codex: 'gpt-5.4-pro' },
79
+ },
80
+ {
81
+ id: 'google/gemini-3.1-pro-preview',
82
+ name: 'Gemini 3.1 Pro Preview',
83
+ provider: 'google',
84
+ effortLevels: [],
85
+ },
86
+ {
87
+ id: 'google/gemini-3.1-pro-preview-customtools',
88
+ name: 'Gemini 3.1 Pro Preview Custom Tools',
89
+ provider: 'google',
90
+ effortLevels: [],
91
+ },
92
+ {
93
+ id: 'google/gemini-3-pro-preview',
94
+ name: 'Gemini 3 Pro Preview',
95
+ provider: 'google',
96
+ effortLevels: [],
97
+ },
98
+ {
99
+ id: 'google/gemini-3-flash-preview',
100
+ name: 'Gemini 3 Flash Preview',
101
+ provider: 'google',
102
+ effortLevels: [],
103
+ },
27
104
  { 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: [] },
105
+ {
106
+ id: 'google/gemini-3.1-flash-lite',
107
+ name: 'Gemini 3.1 Flash-Lite',
108
+ provider: 'google',
109
+ effortLevels: [],
110
+ },
111
+ {
112
+ id: 'google/gemini-2.5-flash-lite',
113
+ name: 'Gemini 2.5 Flash-Lite',
114
+ provider: 'google',
115
+ effortLevels: [],
116
+ },
30
117
  { id: 'moonshotai/kimi-k2.6', name: 'Kimi K2.6', provider: 'moonshotai', effortLevels: [] },
31
118
  { id: 'moonshotai/kimi-k2.5', name: 'Kimi K2.5', provider: 'moonshotai', effortLevels: [] },
32
119
  { id: 'z-ai/glm-5.1', name: 'GLM 5.1', provider: 'z-ai', effortLevels: [] },
33
120
  { id: 'z-ai/glm-5', name: 'GLM 5', provider: 'z-ai', effortLevels: [] },
34
- { id: 'deepseek/deepseek-v4-pro', name: 'DeepSeek V4 Pro', provider: 'deepseek', effortLevels: [] },
35
- { id: 'deepseek/deepseek-v4-flash', name: 'DeepSeek V4 Flash', provider: 'deepseek', effortLevels: [] },
36
- { id: 'qwen/qwen3.6-max-preview', name: 'Qwen3.6 Max Preview', provider: 'qwen', effortLevels: [] },
121
+ {
122
+ id: 'deepseek/deepseek-v4-pro',
123
+ name: 'DeepSeek V4 Pro',
124
+ provider: 'deepseek',
125
+ effortLevels: [],
126
+ },
127
+ {
128
+ id: 'deepseek/deepseek-v4-flash',
129
+ name: 'DeepSeek V4 Flash',
130
+ provider: 'deepseek',
131
+ effortLevels: [],
132
+ },
133
+ {
134
+ id: 'qwen/qwen3.6-max-preview',
135
+ name: 'Qwen3.6 Max Preview',
136
+ provider: 'qwen',
137
+ effortLevels: [],
138
+ },
37
139
  { 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: [] },
140
+ {
141
+ id: 'qwen/qwen3.6-plus-2026-04-02',
142
+ name: 'Qwen3.6 Plus 2026-04-02',
143
+ provider: 'qwen',
144
+ effortLevels: [],
145
+ },
39
146
  { 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: [] },
147
+ {
148
+ id: 'qwen/qwen3.5-plus-2026-02-15',
149
+ name: 'Qwen3.5 Plus 2026-02-15',
150
+ provider: 'qwen',
151
+ effortLevels: [],
152
+ },
41
153
  { 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: [] },
154
+ {
155
+ id: 'qwen/qwen3.6-flash-2026-04-16',
156
+ name: 'Qwen3.6 Flash 2026-04-16',
157
+ provider: 'qwen',
158
+ effortLevels: [],
159
+ },
43
160
  { id: 'qwen/qwen3-coder-plus', name: 'Qwen3 Coder Plus', provider: 'qwen', effortLevels: [] },
44
161
  ] as const;
45
162
 
46
163
  // Hidden from new-agent pickers, but available to editors so persisted Beta
47
164
  // agent defaults remain representable.
48
165
  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' } },
166
+ {
167
+ id: 'openai/gpt-5.4-mini',
168
+ name: 'GPT-5.4 Mini',
169
+ provider: 'openai',
170
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
171
+ runtime_names: { codex: 'gpt-5.4-mini' },
172
+ },
173
+ {
174
+ id: 'openai/gpt-5-mini',
175
+ name: 'GPT-5 Mini',
176
+ provider: 'openai',
177
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
178
+ runtime_names: { codex: 'gpt-5-mini' },
179
+ },
180
+ {
181
+ id: 'openai/gpt-5.4-nano',
182
+ name: 'GPT-5.4 Nano',
183
+ provider: 'openai',
184
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
185
+ runtime_names: { codex: 'gpt-5.4-nano' },
186
+ },
187
+ {
188
+ id: 'openai/gpt-5-nano',
189
+ name: 'GPT-5 Nano',
190
+ provider: 'openai',
191
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
192
+ runtime_names: { codex: 'gpt-5-nano' },
193
+ },
194
+ {
195
+ id: 'openai/gpt-5.3-codex',
196
+ name: 'GPT-5.3 Codex',
197
+ provider: 'openai',
198
+ effortLevels: ['low', 'medium', 'high', 'xhigh'],
199
+ runtime_names: { codex: 'gpt-5.3-codex' },
200
+ },
201
+ {
202
+ id: 'openai/gpt-5.2-codex',
203
+ name: 'GPT-5.2 Codex',
204
+ provider: 'openai',
205
+ effortLevels: ['low', 'medium', 'high', 'xhigh'],
206
+ runtime_names: { codex: 'gpt-5.2-codex' },
207
+ },
208
+ {
209
+ id: 'openai/gpt-5-codex',
210
+ name: 'GPT-5 Codex',
211
+ provider: 'openai',
212
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
213
+ runtime_names: { codex: 'gpt-5-codex' },
214
+ },
215
+ {
216
+ id: 'openai/o4-mini',
217
+ name: 'o4 Mini',
218
+ provider: 'openai',
219
+ effortLevels: ['low', 'medium', 'high'],
220
+ runtime_names: { codex: 'o4-mini' },
221
+ },
222
+ {
223
+ id: 'openai/gpt-4.1',
224
+ name: 'GPT-4.1',
225
+ provider: 'openai',
226
+ effortLevels: [],
227
+ runtime_names: { codex: 'gpt-4.1' },
228
+ },
58
229
  { 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: [] },
230
+ {
231
+ id: 'qwen/qwen3.5-plus-02-15',
232
+ name: 'Qwen3.5 Plus 02-15 Legacy',
233
+ provider: 'qwen',
234
+ effortLevels: [],
235
+ },
60
236
  ] as const;
61
237
 
62
238
  // Mirrors server/pkg/llmproxy/models.go DefaultModelIDForRuntime. Go remains
@@ -110,8 +286,7 @@ export const ENDPOINTS = {
110
286
  ORG: (orgId: string) => `${API_BASE}/orgs/${orgId}`,
111
287
  ORG_MEMBERS: (orgId: string) => `${API_BASE}/orgs/${orgId}/members`,
112
288
  ORG_MEMBERS_ONLINE: (orgId: string) => `${API_BASE}/orgs/${orgId}/members/online`,
113
- ORG_MEMBER: (orgId: string, userId: string) =>
114
- `${API_BASE}/orgs/${orgId}/members/${userId}`,
289
+ ORG_MEMBER: (orgId: string, userId: string) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
115
290
  ORG_MEMBER_CHATS: (orgId: string, memberId: string) =>
116
291
  `${API_BASE}/orgs/${orgId}/members/${memberId}/chats`,
117
292
  ORG_MEMBER_TASKS: (orgId: string, memberId: string) =>
@@ -178,8 +353,7 @@ export const ENDPOINTS = {
178
353
  `${API_BASE}/orgs/${orgId}/agents/${agentId}/activity`,
179
354
  AGENT_MONITOR: (orgId: string, agentId: string) =>
180
355
  `${API_BASE}/orgs/${orgId}/agents/${agentId}/monitor`,
181
- AGENT_ME: (orgId: string) =>
182
- `${API_BASE}/orgs/${orgId}/agents/me`,
356
+ AGENT_ME: (orgId: string) => `${API_BASE}/orgs/${orgId}/agents/me`,
183
357
  AGENT_NEW_SESSION: (orgId: string, agentId: string) =>
184
358
  `${API_BASE}/orgs/${orgId}/agents/${agentId}/new-session`,
185
359
  AGENT_SESSIONS: (orgId: string, agentId: string) =>
@@ -198,11 +372,7 @@ export const ENDPOINTS = {
198
372
  `${API_BASE}/orgs/${orgId}/agents/${agentId}/runtime-auth`,
199
373
  AGENT_RUNTIME_AUTH_SESSIONS: (orgId: string, agentId: string) =>
200
374
  `${API_BASE}/orgs/${orgId}/agents/${agentId}/runtime-auth-sessions`,
201
- AGENT_RUNTIME_AUTH_SESSION_COMPLETE: (
202
- orgId: string,
203
- agentId: string,
204
- sessionId: string,
205
- ) =>
375
+ AGENT_RUNTIME_AUTH_SESSION_COMPLETE: (orgId: string, agentId: string, sessionId: string) =>
206
376
  `${API_BASE}/orgs/${orgId}/agents/${agentId}/runtime-auth-sessions/${sessionId}/complete`,
207
377
  AGENT_RUNTIME: (orgId: string, agentId: string) =>
208
378
  `${API_BASE}/orgs/${orgId}/agents/${agentId}/runtime`,
@@ -216,8 +386,7 @@ export const ENDPOINTS = {
216
386
  `${API_BASE}/orgs/${orgId}/agents/${agentId}/provider-config`,
217
387
  // Machines (org-scoped)
218
388
  MACHINES: (orgId: string) => `${API_BASE}/orgs/${orgId}/machines`,
219
- MACHINE: (orgId: string, machineId: string) =>
220
- `${API_BASE}/orgs/${orgId}/machines/${machineId}`,
389
+ MACHINE: (orgId: string, machineId: string) => `${API_BASE}/orgs/${orgId}/machines/${machineId}`,
221
390
  MACHINE_START: (orgId: string, machineId: string) =>
222
391
  `${API_BASE}/orgs/${orgId}/machines/${machineId}/start`,
223
392
  MACHINE_STOP: (orgId: string, machineId: string) =>
@@ -230,8 +399,7 @@ export const ENDPOINTS = {
230
399
  `${API_BASE}/orgs/${orgId}/machines/${machineId}/spec`,
231
400
  MACHINE_RESTART: (orgId: string, machineId: string) =>
232
401
  `${API_BASE}/orgs/${orgId}/machines/${machineId}/restart`,
233
- MACHINE_RESTART_ALL: (orgId: string) =>
234
- `${API_BASE}/orgs/${orgId}/machines/restart-all`,
402
+ MACHINE_RESTART_ALL: (orgId: string) => `${API_BASE}/orgs/${orgId}/machines/restart-all`,
235
403
  // Daemon-mode Machine management (org-scoped, user auth).
236
404
  // POST creates a new daemon-mode Machine (daemon_mode=true always).
237
405
  // Attach/Detach bind an agent to/from a daemon Machine.
@@ -268,6 +436,9 @@ export const ENDPOINTS = {
268
436
  MACHINES_ME: `${API_BASE}/machines/me`,
269
437
  MACHINES_ME_AGENTS: `${API_BASE}/machines/me/agents`,
270
438
  MACHINES_ME_HEALTH: `${API_BASE}/machines/me/health`,
439
+ MACHINES_ME_CLIP_INSTALLS: `${API_BASE}/machines/me/clip-installs`,
440
+ MACHINES_ME_CLIP_INSTALL_DONE: (clipId: string) =>
441
+ `${API_BASE}/machines/me/clip-installs/${clipId}/installed`,
271
442
  MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId: string) =>
272
443
  `${API_BASE}/machines/me/agents/${agentId}/launch-credential`,
273
444
  MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId: string) =>
@@ -283,18 +454,18 @@ export const ENDPOINTS = {
283
454
  `${API_BASE}/orgs/${orgId}/tasks/${taskId}/archive`,
284
455
  TASK_RESTORE: (orgId: string, taskId: string) =>
285
456
  `${API_BASE}/orgs/${orgId}/tasks/${taskId}/restore`,
286
- TASK_WATCH: (orgId: string, taskId: string) =>
287
- `${API_BASE}/orgs/${orgId}/tasks/${taskId}/watch`,
457
+ TASK_WATCH: (orgId: string, taskId: string) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/watch`,
288
458
  TASK_WATCHERS: (orgId: string, taskId: string) =>
289
459
  `${API_BASE}/orgs/${orgId}/tasks/${taskId}/watchers`,
460
+ TASK_SUBSCRIBER: (orgId: string, taskId: string, userId: string) =>
461
+ `${API_BASE}/orgs/${orgId}/tasks/${taskId}/subscribers/${userId}`,
290
462
  TASK_SUBTASKS: (orgId: string, taskId: string) =>
291
463
  `${API_BASE}/orgs/${orgId}/tasks/${taskId}/subtasks`,
292
464
  TASK_RELATIONS: (orgId: string, taskId: string) =>
293
465
  `${API_BASE}/orgs/${orgId}/tasks/${taskId}/relations`,
294
466
  TASK_RELATION: (orgId: string, taskId: string, relId: string) =>
295
467
  `${API_BASE}/orgs/${orgId}/tasks/${taskId}/relations/${relId}`,
296
- TASK_RELATIONS_BY_TARGET: (orgId: string) =>
297
- `${API_BASE}/orgs/${orgId}/task-relations`,
468
+ TASK_RELATIONS_BY_TARGET: (orgId: string) => `${API_BASE}/orgs/${orgId}/task-relations`,
298
469
  TASK_COMMENTS: (orgId: string, taskId: string) =>
299
470
  `${API_BASE}/orgs/${orgId}/tasks/${taskId}/comments`,
300
471
  TASK_COMMENT: (orgId: string, taskId: string, commentId: string) =>
@@ -310,10 +481,13 @@ export const ENDPOINTS = {
310
481
  SCHEDULES: (orgId: string) => `${API_BASE}/orgs/${orgId}/schedules`,
311
482
  SCHEDULE: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/schedules/${id}`,
312
483
  SCHEDULE_PAUSE: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/schedules/${id}/pause`,
313
- SCHEDULE_RESUME: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/schedules/${id}/resume`,
314
- SCHEDULE_CANCEL: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/schedules/${id}/cancel`,
484
+ SCHEDULE_RESUME: (orgId: string, id: string) =>
485
+ `${API_BASE}/orgs/${orgId}/schedules/${id}/resume`,
486
+ SCHEDULE_CANCEL: (orgId: string, id: string) =>
487
+ `${API_BASE}/orgs/${orgId}/schedules/${id}/cancel`,
315
488
  SCHEDULE_RUNS: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/schedules/${id}/runs`,
316
- SCHEDULE_RUN: (orgId: string, runId: string) => `${API_BASE}/orgs/${orgId}/schedule_runs/${runId}`,
489
+ SCHEDULE_RUN: (orgId: string, runId: string) =>
490
+ `${API_BASE}/orgs/${orgId}/schedule_runs/${runId}`,
317
491
 
318
492
  // Invitations (org-scoped, admin)
319
493
  ORG_INVITATIONS: (orgId: string) => `${API_BASE}/orgs/${orgId}/invitations`,
@@ -330,8 +504,7 @@ export const ENDPOINTS = {
330
504
 
331
505
  // Org-level shareable invite link
332
506
  ORG_INVITE_LINK: (orgId: string) => `${API_BASE}/orgs/${orgId}/invite-link`,
333
- ORG_INVITE_LINK_REGENERATE: (orgId: string) =>
334
- `${API_BASE}/orgs/${orgId}/invite-link/regenerate`,
507
+ ORG_INVITE_LINK_REGENERATE: (orgId: string) => `${API_BASE}/orgs/${orgId}/invite-link/regenerate`,
335
508
  ORG_INVITE_LINK_JOIN_REQUESTS: (orgId: string) =>
336
509
  `${API_BASE}/orgs/${orgId}/invite-link/join-requests`,
337
510
  ORG_INVITE_LINK_JOIN_REQUEST_DECIDE: (orgId: string, jrId: string) =>
@@ -343,13 +516,19 @@ export const ENDPOINTS = {
343
516
  WIKI: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}`,
344
517
  WIKI_TREE: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/tree`,
345
518
  WIKI_BLOB: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/blob`,
346
- WIKI_NODE_SECTIONS: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/node-sections`,
347
- WIKI_SEARCH: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/search`,
348
- WIKI_PAGE_INDEX: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/page-index`,
519
+ WIKI_NODE_SECTIONS: (orgId: string, wikiId: string) =>
520
+ `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/node-sections`,
521
+ WIKI_SEARCH: (orgId: string, wikiId: string) =>
522
+ `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/search`,
523
+ WIKI_PAGE_INDEX: (orgId: string, wikiId: string) =>
524
+ `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/page-index`,
349
525
  WIKI_REFS: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/refs`,
350
- WIKI_REFS_CHECK: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/refs/check`,
351
- WIKI_ANCHOR_STATUS: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/anchor-status`,
352
- WIKI_CHANGESETS: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/changesets`,
526
+ WIKI_REFS_CHECK: (orgId: string, wikiId: string) =>
527
+ `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/refs/check`,
528
+ WIKI_ANCHOR_STATUS: (orgId: string, wikiId: string) =>
529
+ `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/anchor-status`,
530
+ WIKI_CHANGESETS: (orgId: string, wikiId: string) =>
531
+ `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/changesets`,
353
532
  WIKI_CHANGESET: (orgId: string, wikiId: string, changesetId: string) =>
354
533
  `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/changesets/${changesetId}`,
355
534
  WIKI_CHANGESET_DIFF: (orgId: string, wikiId: string, changesetId: string) =>
@@ -364,8 +543,7 @@ export const ENDPOINTS = {
364
543
  // Wiki Binary Upload / Delete (Phase 2 of wiki-file-storage-design)
365
544
  WIKI_UPLOADS: (orgId: string, wikiId: string) =>
366
545
  `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/uploads`,
367
- WIKI_FILES: (orgId: string, wikiId: string) =>
368
- `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/files`,
546
+ WIKI_FILES: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/files`,
369
547
  WIKI_FILE_PREVIEW_URL: (orgId: string, wikiId: string) =>
370
548
  `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/files/preview-url`,
371
549
 
@@ -384,8 +562,7 @@ export const ENDPOINTS = {
384
562
  `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/commits`,
385
563
  WIKI_FILE_COMMITS: (orgId: string, wikiId: string) =>
386
564
  `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/file-commits`,
387
- WIKI_BLAME: (orgId: string, wikiId: string) =>
388
- `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/blame`,
565
+ WIKI_BLAME: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/blame`,
389
566
 
390
567
  // Wiki Operations (audit log)
391
568
  WIKI_OPERATIONS: (orgId: string, wikiId: string) =>
@@ -402,7 +579,8 @@ export const ENDPOINTS = {
402
579
  INBOX_UNREAD_COUNT: (orgId: string) => `${API_BASE}/orgs/${orgId}/inbox/unread-count`,
403
580
  INBOX_ITEM_READ: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/inbox/${id}/read`,
404
581
  INBOX_ITEM_UNREAD: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/inbox/${id}/unread`,
405
- INBOX_ITEM_ARCHIVE: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/inbox/${id}/archive`,
582
+ INBOX_ITEM_ARCHIVE: (orgId: string, id: string) =>
583
+ `${API_BASE}/orgs/${orgId}/inbox/${id}/archive`,
406
584
  // Snooze/Unsnooze deferred until un-snooze cron worker is implemented
407
585
  INBOX_MARK_ALL_READ: (orgId: string) => `${API_BASE}/orgs/${orgId}/inbox/mark-all-read`,
408
586
  INBOX_ARCHIVE_ALL: (orgId: string) => `${API_BASE}/orgs/${orgId}/inbox/archive-all`,
@@ -412,14 +590,17 @@ export const ENDPOINTS = {
412
590
  // Dispatch (agent event delivery)
413
591
  DISPATCH: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch`,
414
592
  DISPATCH_PENDING_COUNT: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch/pending-count`,
593
+ DISPATCH_RECEIVED: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch/received`,
415
594
  DISPATCH_ACK: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch/ack`,
416
595
  DISPATCH_ACK_BY_ID: (orgId: string, id: string) => `${API_BASE}/orgs/${orgId}/dispatch/${id}/ack`,
596
+ DISPATCH_BY_MESSAGES: (orgId: string) => `${API_BASE}/orgs/${orgId}/dispatch/by-messages`,
417
597
 
418
598
  // Unread
419
599
  UNREAD: `${API_BASE}/me/unread`,
420
600
  ORG_UNREAD: (orgId: string) => `${API_BASE}/orgs/${orgId}/unread`,
421
- CHAT_READ: (orgId: string, chatId: string) =>
422
- `${API_BASE}/orgs/${orgId}/chats/${chatId}/read`,
601
+ CHAT_READ: (orgId: string, chatId: string) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read`,
602
+ THREAD_UNREAD: (orgId: string, chatId: string, threadRootId: string) =>
603
+ `${API_BASE}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/unread`,
423
604
 
424
605
  // References (org-scoped)
425
606
  REFS_RESOLVE: (orgId: string) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
@@ -452,6 +633,20 @@ export const ENDPOINTS = {
452
633
  // unauthenticated `/internal/admin/*` surface and must not bleed into the
453
634
  // public SDK. Admin dashboard hits the URL directly from its own client.
454
635
 
636
+ // Clips (org-scoped, served by clip-service)
637
+ CLIPS: (orgId: string) => `${CLIP_BASE}/orgs/${orgId}/clips`,
638
+ CLIP: (orgId: string, clipId: string) => `${CLIP_BASE}/orgs/${orgId}/clips/${clipId}`,
639
+ CLIP_AGENTS: (orgId: string, clipId: string) =>
640
+ `${CLIP_BASE}/orgs/${orgId}/clips/${clipId}/agents`,
641
+ AGENT_CLIPS: (orgId: string, agentId: string) =>
642
+ `${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips`,
643
+ AGENT_CLIP: (orgId: string, agentId: string, clipId: string) =>
644
+ `${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips/${clipId}`,
645
+ CLIP_INVOKE: (orgId: string) => `${CLIP_BASE}/orgs/${orgId}/invoke`,
646
+ CLIP_ONLINE: (orgId: string) => `${CLIP_BASE}/orgs/${orgId}/online`,
647
+
648
+ // Clip registry (global, served by clip-service → Pinix Hub proxy)
649
+ CLIP_REGISTRY: () => `${CLIP_BASE}/registry/clips`,
455
650
  } as const;
456
651
 
457
652
  // WebSocket event types
@@ -508,6 +703,7 @@ export const WS_EVENTS = {
508
703
  INBOX_BULK_UPDATE: 'inbox.bulk_update',
509
704
  READ_POSITION_UPDATED: 'read_position.updated',
510
705
  DISPATCH_NEW: 'dispatch.new',
706
+ DISPATCH_RECEIVED: 'dispatch.received',
511
707
  SCHEDULE_CREATED: 'schedule.created',
512
708
  SCHEDULE_UPDATED: 'schedule.updated',
513
709
  SCHEDULE_DELETED: 'schedule.deleted',
@@ -525,7 +721,11 @@ export const WS_EVENTS = {
525
721
  MACHINE_FILESYSTEM_BROWSE: 'machine.filesystem.browse',
526
722
  MACHINE_UPDATE: 'machine.update',
527
723
  MACHINE_CONFIG_UPDATED: 'machine.config.updated',
724
+ MACHINE_CLIP_INSTALL: 'machine.clip.install',
528
725
  AGENT_NEW_SESSION: 'agent.new_session',
726
+ CLIP_INSTALLED: 'clip.installed',
727
+ CLIP_REMOVED: 'clip.removed',
728
+ CLIP_UPDATED: 'clip.updated',
529
729
  } as const;
530
730
 
531
731
  // Canonical target URI builders for unified comments.
@@ -563,30 +763,28 @@ function encodeHeadingSegment(seg: string): string {
563
763
  // produce byte-identical target_uri across Go and TS SDKs for any legal
564
764
  // filename (including ones with ', (, ), !, *, space, #, ?, %, etc.).
565
765
  function encodePathSegment(seg: string): string {
566
- return encodeURIComponent(seg)
567
- // Un-escape what Go's encodePath passes through
568
- .replace(/%24/g, '$')
569
- .replace(/%26/g, '&')
570
- .replace(/%2B/g, '+')
571
- .replace(/%2C/g, ',')
572
- .replace(/%3A/g, ':')
573
- .replace(/%3B/g, ';')
574
- .replace(/%3D/g, '=')
575
- .replace(/%40/g, '@')
576
- // Encode what Go escapes but encodeURIComponent leaves raw
577
- .replace(/!/g, '%21')
578
- .replace(/'/g, '%27')
579
- .replace(/\(/g, '%28')
580
- .replace(/\)/g, '%29')
581
- .replace(/\*/g, '%2A');
766
+ return (
767
+ encodeURIComponent(seg)
768
+ // Un-escape what Go's encodePath passes through
769
+ .replace(/%24/g, '$')
770
+ .replace(/%26/g, '&')
771
+ .replace(/%2B/g, '+')
772
+ .replace(/%2C/g, ',')
773
+ .replace(/%3A/g, ':')
774
+ .replace(/%3B/g, ';')
775
+ .replace(/%3D/g, '=')
776
+ .replace(/%40/g, '@')
777
+ // Encode what Go escapes but encodeURIComponent leaves raw
778
+ .replace(/!/g, '%21')
779
+ .replace(/'/g, '%27')
780
+ .replace(/\(/g, '%28')
781
+ .replace(/\)/g, '%29')
782
+ .replace(/\*/g, '%2A')
783
+ );
582
784
  }
583
785
 
584
786
  function encodeWikiPath(path: string): string {
585
- return path
586
- .replace(/^\//, '')
587
- .split('/')
588
- .map(encodePathSegment)
589
- .join('/');
787
+ return path.replace(/^\//, '').split('/').map(encodePathSegment).join('/');
590
788
  }
591
789
 
592
790
  export const COMMENT_TARGET = {
@@ -599,7 +797,13 @@ export const COMMENT_TARGET = {
599
797
  const encoded = headingSegments.map(encodeHeadingSegment).join('::');
600
798
  return `prll://${wikiId}/${encodeWikiPath(path)}?rev=${rev}#h=${encoded}`;
601
799
  },
602
- wikiLineRange: (wikiId: string, path: string, rev: string, lineStart: number, lineEnd: number) => {
800
+ wikiLineRange: (
801
+ wikiId: string,
802
+ path: string,
803
+ rev: string,
804
+ lineStart: number,
805
+ lineEnd: number,
806
+ ) => {
603
807
  const frag = lineStart === lineEnd ? `l=${lineStart}` : `l=${lineStart}-${lineEnd}`;
604
808
  return `prll://${wikiId}/${encodeWikiPath(path)}?rev=${rev}#${frag}`;
605
809
  },
package/src/index.ts CHANGED
@@ -3,4 +3,10 @@ export * from './constants.js';
3
3
  export { ParallClient, ApiError } from './client.js';
4
4
  export type { ParallClientOptions } from './client.js';
5
5
  export { ParallWs } from './ws.js';
6
- export type { ParallWsOptions, WsConnectionState, WsEventType, WsEventHandler, WsClientEventMap } from './ws.js';
6
+ export type {
7
+ ParallWsOptions,
8
+ WsConnectionState,
9
+ WsEventType,
10
+ WsEventHandler,
11
+ WsClientEventMap,
12
+ } from './ws.js';