@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/dist/constants.js CHANGED
@@ -2,58 +2,233 @@
2
2
  export const API_BASE = '/api/v1';
3
3
  // Wiki-service base path (served by wiki-service, routed via LB path rules)
4
4
  export const WIKI_BASE = '/wiki/v1';
5
+ // Clip-service base path (served by clip-service, routed via LB path rules)
6
+ export const CLIP_BASE = '/clip/v1';
5
7
  // LLM model catalog — mirrors server/pkg/llmproxy/models.go DefaultModels.
6
8
  // SSOT is the Go side; keep this list in sync when models change. `provider`
7
9
  // is used by clients to filter runtime-specific pickers. `runtime_names` is
8
10
  // included for catalog completeness and agent runtime delivery; product UI
9
11
  // should continue to display canonical model IDs/names.
10
12
  export const PLATFORM_MODELS = [
11
- { 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' } },
12
- { 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' } },
13
- { 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' } },
14
- { id: 'anthropic/claude-sonnet-4.5', name: 'Claude Sonnet 4.5', provider: 'anthropic', effortLevels: [], runtime_names: { 'claude-code': 'claude-sonnet-4-5' } },
15
- { id: 'anthropic/claude-haiku-4.5', name: 'Claude Haiku 4.5', provider: 'anthropic', effortLevels: [], runtime_names: { 'claude-code': 'claude-haiku-4-5' } },
16
- { id: 'openai/gpt-5.5', name: 'GPT-5.5', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.5' } },
13
+ {
14
+ id: 'anthropic/claude-opus-4.7',
15
+ name: 'Claude Opus 4.7',
16
+ provider: 'anthropic',
17
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
18
+ runtime_names: { 'claude-code': 'claude-opus-4-7' },
19
+ },
20
+ {
21
+ id: 'anthropic/claude-opus-4.6',
22
+ name: 'Claude Opus 4.6',
23
+ provider: 'anthropic',
24
+ effortLevels: ['low', 'medium', 'high', 'max'],
25
+ runtime_names: { 'claude-code': 'claude-opus-4-6' },
26
+ },
27
+ {
28
+ id: 'anthropic/claude-sonnet-4.6',
29
+ name: 'Claude Sonnet 4.6',
30
+ provider: 'anthropic',
31
+ effortLevels: ['low', 'medium', 'high', 'max'],
32
+ runtime_names: { 'claude-code': 'claude-sonnet-4-6' },
33
+ },
34
+ {
35
+ id: 'anthropic/claude-sonnet-4.5',
36
+ name: 'Claude Sonnet 4.5',
37
+ provider: 'anthropic',
38
+ effortLevels: [],
39
+ runtime_names: { 'claude-code': 'claude-sonnet-4-5' },
40
+ },
41
+ {
42
+ id: 'anthropic/claude-haiku-4.5',
43
+ name: 'Claude Haiku 4.5',
44
+ provider: 'anthropic',
45
+ effortLevels: [],
46
+ runtime_names: { 'claude-code': 'claude-haiku-4-5' },
47
+ },
48
+ {
49
+ id: 'openai/gpt-5.5',
50
+ name: 'GPT-5.5',
51
+ provider: 'openai',
52
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
53
+ runtime_names: { codex: 'gpt-5.5' },
54
+ },
17
55
  // GPT-5.5 Pro has no documented API-key effort control surface yet.
18
- { id: 'openai/gpt-5.5-pro', name: 'GPT-5.5 Pro', provider: 'openai', effortLevels: [], runtime_names: { codex: 'gpt-5.5-pro' } },
19
- { id: 'openai/gpt-5.4', name: 'GPT-5.4', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.4' } },
20
- { id: 'openai/gpt-5.4-pro', name: 'GPT-5.4 Pro', provider: 'openai', effortLevels: ['medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5.4-pro' } },
21
- { id: 'google/gemini-3.1-pro-preview', name: 'Gemini 3.1 Pro Preview', provider: 'google', effortLevels: [] },
22
- { id: 'google/gemini-3.1-pro-preview-customtools', name: 'Gemini 3.1 Pro Preview Custom Tools', provider: 'google', effortLevels: [] },
23
- { id: 'google/gemini-3-pro-preview', name: 'Gemini 3 Pro Preview', provider: 'google', effortLevels: [] },
24
- { id: 'google/gemini-3-flash-preview', name: 'Gemini 3 Flash Preview', provider: 'google', effortLevels: [] },
56
+ {
57
+ id: 'openai/gpt-5.5-pro',
58
+ name: 'GPT-5.5 Pro',
59
+ provider: 'openai',
60
+ effortLevels: [],
61
+ runtime_names: { codex: 'gpt-5.5-pro' },
62
+ },
63
+ {
64
+ id: 'openai/gpt-5.4',
65
+ name: 'GPT-5.4',
66
+ provider: 'openai',
67
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
68
+ runtime_names: { codex: 'gpt-5.4' },
69
+ },
70
+ {
71
+ id: 'openai/gpt-5.4-pro',
72
+ name: 'GPT-5.4 Pro',
73
+ provider: 'openai',
74
+ effortLevels: ['medium', 'high', 'xhigh'],
75
+ runtime_names: { codex: 'gpt-5.4-pro' },
76
+ },
77
+ {
78
+ id: 'google/gemini-3.1-pro-preview',
79
+ name: 'Gemini 3.1 Pro Preview',
80
+ provider: 'google',
81
+ effortLevels: [],
82
+ },
83
+ {
84
+ id: 'google/gemini-3.1-pro-preview-customtools',
85
+ name: 'Gemini 3.1 Pro Preview Custom Tools',
86
+ provider: 'google',
87
+ effortLevels: [],
88
+ },
89
+ {
90
+ id: 'google/gemini-3-pro-preview',
91
+ name: 'Gemini 3 Pro Preview',
92
+ provider: 'google',
93
+ effortLevels: [],
94
+ },
95
+ {
96
+ id: 'google/gemini-3-flash-preview',
97
+ name: 'Gemini 3 Flash Preview',
98
+ provider: 'google',
99
+ effortLevels: [],
100
+ },
25
101
  { id: 'google/gemini-2.5-flash', name: 'Gemini 2.5 Flash', provider: 'google', effortLevels: [] },
26
- { id: 'google/gemini-3.1-flash-lite', name: 'Gemini 3.1 Flash-Lite', provider: 'google', effortLevels: [] },
27
- { id: 'google/gemini-2.5-flash-lite', name: 'Gemini 2.5 Flash-Lite', provider: 'google', effortLevels: [] },
102
+ {
103
+ id: 'google/gemini-3.1-flash-lite',
104
+ name: 'Gemini 3.1 Flash-Lite',
105
+ provider: 'google',
106
+ effortLevels: [],
107
+ },
108
+ {
109
+ id: 'google/gemini-2.5-flash-lite',
110
+ name: 'Gemini 2.5 Flash-Lite',
111
+ provider: 'google',
112
+ effortLevels: [],
113
+ },
28
114
  { id: 'moonshotai/kimi-k2.6', name: 'Kimi K2.6', provider: 'moonshotai', effortLevels: [] },
29
115
  { id: 'moonshotai/kimi-k2.5', name: 'Kimi K2.5', provider: 'moonshotai', effortLevels: [] },
30
116
  { id: 'z-ai/glm-5.1', name: 'GLM 5.1', provider: 'z-ai', effortLevels: [] },
31
117
  { id: 'z-ai/glm-5', name: 'GLM 5', provider: 'z-ai', effortLevels: [] },
32
- { id: 'deepseek/deepseek-v4-pro', name: 'DeepSeek V4 Pro', provider: 'deepseek', effortLevels: [] },
33
- { id: 'deepseek/deepseek-v4-flash', name: 'DeepSeek V4 Flash', provider: 'deepseek', effortLevels: [] },
34
- { id: 'qwen/qwen3.6-max-preview', name: 'Qwen3.6 Max Preview', provider: 'qwen', effortLevels: [] },
118
+ {
119
+ id: 'deepseek/deepseek-v4-pro',
120
+ name: 'DeepSeek V4 Pro',
121
+ provider: 'deepseek',
122
+ effortLevels: [],
123
+ },
124
+ {
125
+ id: 'deepseek/deepseek-v4-flash',
126
+ name: 'DeepSeek V4 Flash',
127
+ provider: 'deepseek',
128
+ effortLevels: [],
129
+ },
130
+ {
131
+ id: 'qwen/qwen3.6-max-preview',
132
+ name: 'Qwen3.6 Max Preview',
133
+ provider: 'qwen',
134
+ effortLevels: [],
135
+ },
35
136
  { id: 'qwen/qwen3.6-plus', name: 'Qwen3.6 Plus', provider: 'qwen', effortLevels: [] },
36
- { id: 'qwen/qwen3.6-plus-2026-04-02', name: 'Qwen3.6 Plus 2026-04-02', provider: 'qwen', effortLevels: [] },
137
+ {
138
+ id: 'qwen/qwen3.6-plus-2026-04-02',
139
+ name: 'Qwen3.6 Plus 2026-04-02',
140
+ provider: 'qwen',
141
+ effortLevels: [],
142
+ },
37
143
  { id: 'qwen/qwen3.5-plus', name: 'Qwen3.5 Plus', provider: 'qwen', effortLevels: [] },
38
- { id: 'qwen/qwen3.5-plus-2026-02-15', name: 'Qwen3.5 Plus 2026-02-15', provider: 'qwen', effortLevels: [] },
144
+ {
145
+ id: 'qwen/qwen3.5-plus-2026-02-15',
146
+ name: 'Qwen3.5 Plus 2026-02-15',
147
+ provider: 'qwen',
148
+ effortLevels: [],
149
+ },
39
150
  { id: 'qwen/qwen3.6-flash', name: 'Qwen3.6 Flash', provider: 'qwen', effortLevels: [] },
40
- { id: 'qwen/qwen3.6-flash-2026-04-16', name: 'Qwen3.6 Flash 2026-04-16', provider: 'qwen', effortLevels: [] },
151
+ {
152
+ id: 'qwen/qwen3.6-flash-2026-04-16',
153
+ name: 'Qwen3.6 Flash 2026-04-16',
154
+ provider: 'qwen',
155
+ effortLevels: [],
156
+ },
41
157
  { id: 'qwen/qwen3-coder-plus', name: 'Qwen3 Coder Plus', provider: 'qwen', effortLevels: [] },
42
158
  ];
43
159
  // Hidden from new-agent pickers, but available to editors so persisted Beta
44
160
  // agent defaults remain representable.
45
161
  export const PLATFORM_LEGACY_MODELS = [
46
- { 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' } },
47
- { id: 'openai/gpt-5-mini', name: 'GPT-5 Mini', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5-mini' } },
48
- { 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' } },
49
- { id: 'openai/gpt-5-nano', name: 'GPT-5 Nano', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5-nano' } },
50
- { 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' } },
51
- { 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' } },
52
- { id: 'openai/gpt-5-codex', name: 'GPT-5 Codex', provider: 'openai', effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'], runtime_names: { codex: 'gpt-5-codex' } },
53
- { id: 'openai/o4-mini', name: 'o4 Mini', provider: 'openai', effortLevels: ['low', 'medium', 'high'], runtime_names: { codex: 'o4-mini' } },
54
- { id: 'openai/gpt-4.1', name: 'GPT-4.1', provider: 'openai', effortLevels: [], runtime_names: { codex: 'gpt-4.1' } },
162
+ {
163
+ id: 'openai/gpt-5.4-mini',
164
+ name: 'GPT-5.4 Mini',
165
+ provider: 'openai',
166
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
167
+ runtime_names: { codex: 'gpt-5.4-mini' },
168
+ },
169
+ {
170
+ id: 'openai/gpt-5-mini',
171
+ name: 'GPT-5 Mini',
172
+ provider: 'openai',
173
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
174
+ runtime_names: { codex: 'gpt-5-mini' },
175
+ },
176
+ {
177
+ id: 'openai/gpt-5.4-nano',
178
+ name: 'GPT-5.4 Nano',
179
+ provider: 'openai',
180
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
181
+ runtime_names: { codex: 'gpt-5.4-nano' },
182
+ },
183
+ {
184
+ id: 'openai/gpt-5-nano',
185
+ name: 'GPT-5 Nano',
186
+ provider: 'openai',
187
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
188
+ runtime_names: { codex: 'gpt-5-nano' },
189
+ },
190
+ {
191
+ id: 'openai/gpt-5.3-codex',
192
+ name: 'GPT-5.3 Codex',
193
+ provider: 'openai',
194
+ effortLevels: ['low', 'medium', 'high', 'xhigh'],
195
+ runtime_names: { codex: 'gpt-5.3-codex' },
196
+ },
197
+ {
198
+ id: 'openai/gpt-5.2-codex',
199
+ name: 'GPT-5.2 Codex',
200
+ provider: 'openai',
201
+ effortLevels: ['low', 'medium', 'high', 'xhigh'],
202
+ runtime_names: { codex: 'gpt-5.2-codex' },
203
+ },
204
+ {
205
+ id: 'openai/gpt-5-codex',
206
+ name: 'GPT-5 Codex',
207
+ provider: 'openai',
208
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
209
+ runtime_names: { codex: 'gpt-5-codex' },
210
+ },
211
+ {
212
+ id: 'openai/o4-mini',
213
+ name: 'o4 Mini',
214
+ provider: 'openai',
215
+ effortLevels: ['low', 'medium', 'high'],
216
+ runtime_names: { codex: 'o4-mini' },
217
+ },
218
+ {
219
+ id: 'openai/gpt-4.1',
220
+ name: 'GPT-4.1',
221
+ provider: 'openai',
222
+ effortLevels: [],
223
+ runtime_names: { codex: 'gpt-4.1' },
224
+ },
55
225
  { id: 'google/gemini-2.5-pro', name: 'Gemini 2.5 Pro', provider: 'google', effortLevels: [] },
56
- { id: 'qwen/qwen3.5-plus-02-15', name: 'Qwen3.5 Plus 02-15 Legacy', provider: 'qwen', effortLevels: [] },
226
+ {
227
+ id: 'qwen/qwen3.5-plus-02-15',
228
+ name: 'Qwen3.5 Plus 02-15 Legacy',
229
+ provider: 'qwen',
230
+ effortLevels: [],
231
+ },
57
232
  ];
58
233
  // Mirrors server/pkg/llmproxy/models.go DefaultModelIDForRuntime. Go remains
59
234
  // the SSOT; keep this client-side fallback in sync until the catalog is codegen
@@ -195,6 +370,8 @@ export const ENDPOINTS = {
195
370
  MACHINES_ME: `${API_BASE}/machines/me`,
196
371
  MACHINES_ME_AGENTS: `${API_BASE}/machines/me/agents`,
197
372
  MACHINES_ME_HEALTH: `${API_BASE}/machines/me/health`,
373
+ MACHINES_ME_CLIP_INSTALLS: `${API_BASE}/machines/me/clip-installs`,
374
+ MACHINES_ME_CLIP_INSTALL_DONE: (clipId) => `${API_BASE}/machines/me/clip-installs/${clipId}/installed`,
198
375
  MACHINES_ME_AGENT_LAUNCH_CREDENTIAL: (agentId) => `${API_BASE}/machines/me/agents/${agentId}/launch-credential`,
199
376
  MACHINES_ME_AGENT_WORKSPACE_STATE: (agentId) => `${API_BASE}/machines/me/agents/${agentId}/workspace-state`,
200
377
  MACHINES_ME_WS_TICKET: `${API_BASE}/machines/me/ws/ticket`,
@@ -206,6 +383,7 @@ export const ENDPOINTS = {
206
383
  TASK_RESTORE: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/restore`,
207
384
  TASK_WATCH: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/watch`,
208
385
  TASK_WATCHERS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/watchers`,
386
+ TASK_SUBSCRIBER: (orgId, taskId, userId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/subscribers/${userId}`,
209
387
  TASK_SUBTASKS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/subtasks`,
210
388
  TASK_RELATIONS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/relations`,
211
389
  TASK_RELATION: (orgId, taskId, relId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/relations/${relId}`,
@@ -289,12 +467,15 @@ export const ENDPOINTS = {
289
467
  // Dispatch (agent event delivery)
290
468
  DISPATCH: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch`,
291
469
  DISPATCH_PENDING_COUNT: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/pending-count`,
470
+ DISPATCH_RECEIVED: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/received`,
292
471
  DISPATCH_ACK: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/ack`,
293
472
  DISPATCH_ACK_BY_ID: (orgId, id) => `${API_BASE}/orgs/${orgId}/dispatch/${id}/ack`,
473
+ DISPATCH_BY_MESSAGES: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/by-messages`,
294
474
  // Unread
295
475
  UNREAD: `${API_BASE}/me/unread`,
296
476
  ORG_UNREAD: (orgId) => `${API_BASE}/orgs/${orgId}/unread`,
297
477
  CHAT_READ: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read`,
478
+ THREAD_UNREAD: (orgId, chatId, threadRootId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/threads/${threadRootId}/unread`,
298
479
  // References (org-scoped)
299
480
  REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
300
481
  REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
@@ -319,6 +500,16 @@ export const ENDPOINTS = {
319
500
  // ADMIN_GRANTS intentionally NOT exported here — it sits under the
320
501
  // unauthenticated `/internal/admin/*` surface and must not bleed into the
321
502
  // public SDK. Admin dashboard hits the URL directly from its own client.
503
+ // Clips (org-scoped, served by clip-service)
504
+ CLIPS: (orgId) => `${CLIP_BASE}/orgs/${orgId}/clips`,
505
+ CLIP: (orgId, clipId) => `${CLIP_BASE}/orgs/${orgId}/clips/${clipId}`,
506
+ CLIP_AGENTS: (orgId, clipId) => `${CLIP_BASE}/orgs/${orgId}/clips/${clipId}/agents`,
507
+ AGENT_CLIPS: (orgId, agentId) => `${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips`,
508
+ AGENT_CLIP: (orgId, agentId, clipId) => `${CLIP_BASE}/orgs/${orgId}/agents/${agentId}/clips/${clipId}`,
509
+ CLIP_INVOKE: (orgId) => `${CLIP_BASE}/orgs/${orgId}/invoke`,
510
+ CLIP_ONLINE: (orgId) => `${CLIP_BASE}/orgs/${orgId}/online`,
511
+ // Clip registry (global, served by clip-service → Pinix Hub proxy)
512
+ CLIP_REGISTRY: () => `${CLIP_BASE}/registry/clips`,
322
513
  };
323
514
  // WebSocket event types
324
515
  export const WS_EVENTS = {
@@ -373,6 +564,7 @@ export const WS_EVENTS = {
373
564
  INBOX_BULK_UPDATE: 'inbox.bulk_update',
374
565
  READ_POSITION_UPDATED: 'read_position.updated',
375
566
  DISPATCH_NEW: 'dispatch.new',
567
+ DISPATCH_RECEIVED: 'dispatch.received',
376
568
  SCHEDULE_CREATED: 'schedule.created',
377
569
  SCHEDULE_UPDATED: 'schedule.updated',
378
570
  SCHEDULE_DELETED: 'schedule.deleted',
@@ -390,7 +582,11 @@ export const WS_EVENTS = {
390
582
  MACHINE_FILESYSTEM_BROWSE: 'machine.filesystem.browse',
391
583
  MACHINE_UPDATE: 'machine.update',
392
584
  MACHINE_CONFIG_UPDATED: 'machine.config.updated',
585
+ MACHINE_CLIP_INSTALL: 'machine.clip.install',
393
586
  AGENT_NEW_SESSION: 'agent.new_session',
587
+ CLIP_INSTALLED: 'clip.installed',
588
+ CLIP_REMOVED: 'clip.removed',
589
+ CLIP_UPDATED: 'clip.updated',
394
590
  };
395
591
  // Canonical target URI builders for unified comments.
396
592
  //
@@ -425,7 +621,7 @@ function encodeHeadingSegment(seg) {
425
621
  // produce byte-identical target_uri across Go and TS SDKs for any legal
426
622
  // filename (including ones with ', (, ), !, *, space, #, ?, %, etc.).
427
623
  function encodePathSegment(seg) {
428
- return encodeURIComponent(seg)
624
+ return (encodeURIComponent(seg)
429
625
  // Un-escape what Go's encodePath passes through
430
626
  .replace(/%24/g, '$')
431
627
  .replace(/%26/g, '&')
@@ -440,14 +636,10 @@ function encodePathSegment(seg) {
440
636
  .replace(/'/g, '%27')
441
637
  .replace(/\(/g, '%28')
442
638
  .replace(/\)/g, '%29')
443
- .replace(/\*/g, '%2A');
639
+ .replace(/\*/g, '%2A'));
444
640
  }
445
641
  function encodeWikiPath(path) {
446
- return path
447
- .replace(/^\//, '')
448
- .split('/')
449
- .map(encodePathSegment)
450
- .join('/');
642
+ return path.replace(/^\//, '').split('/').map(encodePathSegment).join('/');
451
643
  }
452
644
  export const COMMENT_TARGET = {
453
645
  task: (taskId) => `prll://${taskId}`,
package/dist/index.d.ts CHANGED
@@ -3,5 +3,5 @@ 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 { ParallWsOptions, WsConnectionState, WsEventType, WsEventHandler, WsClientEventMap, } from './ws.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
package/dist/types.d.ts CHANGED
@@ -86,6 +86,12 @@ export interface TransferChatOwnershipRequest {
86
86
  export interface UnreadEntry {
87
87
  count: number;
88
88
  mentions: number;
89
+ since?: string;
90
+ }
91
+ export interface ThreadUnreadEntry {
92
+ unread: number;
93
+ total: number;
94
+ since: string | null;
89
95
  }
90
96
  export type MessageType = 'text' | 'file' | 'tool_call' | 'tool_result' | 'approval_card' | 'state_delta' | 'card' | 'system';
91
97
  export declare const MENTION_ALL_USER_ID = "all";
@@ -255,6 +261,9 @@ export interface Organization {
255
261
  created_at: string;
256
262
  /** Per-member flag: true when the user has dismissed the onboarding popup for this org. */
257
263
  onboarding_dismissed: boolean;
264
+ /** Caller's membership role in this org (owner/admin/member). Present on the
265
+ * GET /orgs list response; omitted on single-org fetches that don't join membership. */
266
+ role?: OrgMemberRole;
258
267
  }
259
268
  export interface OrgInviteCode {
260
269
  id: string;
@@ -303,6 +312,7 @@ export interface OrgInviteLink {
303
312
  org_id: string;
304
313
  token: string;
305
314
  require_approval: boolean;
315
+ expires_at: string;
306
316
  created_at: string;
307
317
  regenerated_at: string;
308
318
  }
@@ -704,6 +714,12 @@ export interface MachineUpdateData {
704
714
  mandatory: boolean;
705
715
  reason?: string;
706
716
  }
717
+ export interface MachineClipInstallData {
718
+ clip_id: string;
719
+ alias: string;
720
+ source_ref: string;
721
+ version?: string;
722
+ }
707
723
  export interface AgentNewSessionData {
708
724
  previous_session_id?: string;
709
725
  }
@@ -899,6 +915,8 @@ export interface Schedule {
899
915
  attached_to_uri: string | null;
900
916
  name: string;
901
917
  description: string;
918
+ attachment_ids: string[];
919
+ attachments?: Attachment[];
902
920
  spec_type: ScheduleSpecType;
903
921
  cron_expr: string | null;
904
922
  interval_seconds: number | null;
@@ -926,6 +944,8 @@ export interface ScheduleRun {
926
944
  status: ScheduleRunStatus;
927
945
  fired_description: string | null;
928
946
  fired_attached_uri: string | null;
947
+ fired_attachment_ids: string[];
948
+ fired_attachments?: Attachment[];
929
949
  error: string | null;
930
950
  created_at: string;
931
951
  }
@@ -934,6 +954,7 @@ export interface CreateScheduleInput {
934
954
  description: string;
935
955
  target_ids: string[];
936
956
  attached_to_uri?: string;
957
+ attachment_ids?: string[];
937
958
  spec_type: ScheduleSpecType;
938
959
  cron_expr?: string;
939
960
  interval_seconds?: number;
@@ -952,6 +973,9 @@ export interface UpdateScheduleInput {
952
973
  attached_to_uri?: string;
953
974
  /** Explicitly clear attached_to_uri. Server honors this over `attached_to_uri`. */
954
975
  attached_to_uri_clear?: boolean;
976
+ attachment_ids?: string[];
977
+ /** Explicitly clear attachment_ids. Server honors this over `attachment_ids`. */
978
+ attachment_ids_clear?: boolean;
955
979
  cron_expr?: string;
956
980
  interval_seconds?: number;
957
981
  run_at?: string;
@@ -1508,6 +1532,7 @@ export interface Comment {
1508
1532
  export interface CreateCommentRequest {
1509
1533
  target_uri: string;
1510
1534
  body: string;
1535
+ parent_id?: string;
1511
1536
  }
1512
1537
  export interface UpdateCommentRequest {
1513
1538
  body: string;
@@ -1544,8 +1569,8 @@ export interface InboxItem {
1544
1569
  created_at: string;
1545
1570
  updated_at: string;
1546
1571
  }
1547
- export type DispatchEventType = 'message' | 'task_assign' | 'task_update' | 'task_comment' | 'schedule.fire' | 'approval_decided';
1548
- export type DispatchStatus = 'pending' | 'acked';
1572
+ export type DispatchEventType = 'message' | 'task_assign' | 'task_update' | 'task_comment' | 'wiki_comment' | 'schedule.fire' | 'approval_decided';
1573
+ export type DispatchStatus = 'pending' | 'received' | 'acked';
1549
1574
  export type DispatchDeliveryReason = 'mention' | 'watcher' | 'assignee' | 'creator';
1550
1575
  export interface DispatchEvent {
1551
1576
  id: string;
@@ -1575,6 +1600,15 @@ export interface DispatchEvent {
1575
1600
  created_at: string;
1576
1601
  }
1577
1602
  export type DispatchNewData = DispatchEvent;
1603
+ export interface DispatchReceivedData {
1604
+ agent_id: string;
1605
+ event_type: string;
1606
+ source_type: string;
1607
+ source_id: string;
1608
+ chat_id?: string | null;
1609
+ task_id?: string | null;
1610
+ org_id: string;
1611
+ }
1578
1612
  export type InboxNewData = InboxItem;
1579
1613
  export interface InboxUpdateData {
1580
1614
  id: string;
@@ -1600,7 +1634,7 @@ export interface NotificationAlertData {
1600
1634
  data: Record<string, string> | null;
1601
1635
  }
1602
1636
  export type WsEventMap = {
1603
- 'hello': HelloData;
1637
+ hello: HelloData;
1604
1638
  'message.new': MessageNewData;
1605
1639
  'message.patch': MessagePatchData;
1606
1640
  'message.edit': MessageEditData;
@@ -1612,8 +1646,8 @@ export type WsEventMap = {
1612
1646
  'approval.update': ApprovalUpdateData;
1613
1647
  'card.update': CardUpdateData;
1614
1648
  'recovery.overflow': RecoveryOverflowData;
1615
- 'watching': WatchingData;
1616
- 'pong': {
1649
+ watching: WatchingData;
1650
+ pong: {
1617
1651
  ts: number;
1618
1652
  };
1619
1653
  'membership.changed': MembershipChangedData;
@@ -1649,6 +1683,7 @@ export type WsEventMap = {
1649
1683
  'inbox.bulk_update': InboxBulkUpdateData;
1650
1684
  'read_position.updated': ReadPositionUpdateData;
1651
1685
  'dispatch.new': DispatchNewData;
1686
+ 'dispatch.received': DispatchReceivedData;
1652
1687
  'schedule.created': ScheduleCreatedData;
1653
1688
  'schedule.updated': ScheduleUpdatedData;
1654
1689
  'schedule.deleted': ScheduleDeletedData;
@@ -1666,6 +1701,10 @@ export type WsEventMap = {
1666
1701
  'machine.stop': MachineStopData;
1667
1702
  'machine.filesystem.browse': MachineFilesystemBrowseData;
1668
1703
  'machine.update': MachineUpdateData;
1704
+ 'machine.clip.install': MachineClipInstallData;
1705
+ 'clip.installed': ClipInstalledData;
1706
+ 'clip.removed': ClipRemovedData;
1707
+ 'clip.updated': ClipUpdatedData;
1669
1708
  'agent.new_session': AgentNewSessionData;
1670
1709
  };
1671
1710
  export interface InvitationNewEventData {
@@ -1993,4 +2032,113 @@ export interface BillingMachineStoppedEvent {
1993
2032
  export interface BillingInsufficientEvent {
1994
2033
  org_id: string;
1995
2034
  }
2035
+ export type ClipSourceType = 'registry' | 'custom' | 'builtin';
2036
+ export type ClipStatus = 'active' | 'disabled';
2037
+ export interface Clip {
2038
+ id: string;
2039
+ org_id: string;
2040
+ alias: string;
2041
+ name: string;
2042
+ description: string | null;
2043
+ manifest: Record<string, unknown>;
2044
+ source_type: ClipSourceType;
2045
+ source_ref: string | null;
2046
+ version: string | null;
2047
+ status: ClipStatus;
2048
+ 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
+ created_at: string;
2054
+ updated_at: string;
2055
+ }
2056
+ export interface AgentClip {
2057
+ agent_id: string;
2058
+ clip_id: string;
2059
+ config: Record<string, unknown> | null;
2060
+ created_at: string;
2061
+ }
2062
+ export interface CreateClipRequest {
2063
+ alias: string;
2064
+ name: string;
2065
+ description?: string;
2066
+ manifest: Record<string, unknown>;
2067
+ source_type?: ClipSourceType;
2068
+ source_ref?: string;
2069
+ version?: string;
2070
+ target_machine_ids?: string[];
2071
+ }
2072
+ export interface UpdateClipRequest {
2073
+ name?: string;
2074
+ description?: string;
2075
+ manifest?: Record<string, unknown>;
2076
+ status?: ClipStatus;
2077
+ version?: string;
2078
+ }
2079
+ export interface BindAgentClipRequest {
2080
+ clip_id: string;
2081
+ config?: Record<string, unknown>;
2082
+ }
2083
+ export interface InvokeClipRequest {
2084
+ alias: string;
2085
+ command: string;
2086
+ input?: unknown;
2087
+ timeout_ms?: number;
2088
+ }
2089
+ export interface InvokeClipResponse {
2090
+ output: unknown;
2091
+ error: string | null;
2092
+ }
2093
+ export type ClipInstanceStatus = 'pending' | 'installed' | 'running' | 'stopped' | 'error';
2094
+ export interface ClipInstance {
2095
+ id: string;
2096
+ clip_id: string;
2097
+ machine_id: string | null;
2098
+ status: ClipInstanceStatus;
2099
+ version: string | null;
2100
+ error_msg: string | null;
2101
+ last_seen: string | null;
2102
+ created_at: string;
2103
+ updated_at: string;
2104
+ }
2105
+ export interface OnlineClipInfo {
2106
+ alias: string;
2107
+ name: string;
2108
+ version: string;
2109
+ commands: Array<{
2110
+ name: string;
2111
+ description: string;
2112
+ }>;
2113
+ provider_name: string;
2114
+ }
2115
+ export interface MachineClipInstall {
2116
+ clip_id: string;
2117
+ alias: string;
2118
+ source_ref?: string;
2119
+ version?: string;
2120
+ }
2121
+ export interface RegistryCommandInfo {
2122
+ name: string;
2123
+ description: string;
2124
+ input?: string;
2125
+ output?: string;
2126
+ }
2127
+ export interface RegistryClipInfo {
2128
+ name: string;
2129
+ package: string;
2130
+ version: string;
2131
+ type: string;
2132
+ description?: string;
2133
+ domain?: string;
2134
+ author?: string;
2135
+ commands: RegistryCommandInfo[];
2136
+ dependencies: string[];
2137
+ }
2138
+ export type ClipInstalledData = Clip;
2139
+ export type ClipUpdatedData = Clip;
2140
+ export interface ClipRemovedData {
2141
+ clip_id: string;
2142
+ org_id: string;
2143
+ }
1996
2144
  //# sourceMappingURL=types.d.ts.map