@linkshell/gateway 0.5.0 → 0.5.2
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/Dockerfile +6 -2
- package/dist/gateway/src/embedded.d.ts +5 -0
- package/dist/gateway/src/embedded.js +23 -1
- package/dist/gateway/src/embedded.js.map +1 -1
- package/dist/gateway/src/index.js +2 -1
- package/dist/gateway/src/index.js.map +1 -1
- package/dist/gateway/tsconfig.tsbuildinfo +1 -1
- package/dist/gateway-v2/src/server.d.ts +15 -0
- package/dist/gateway-v2/src/server.js +39 -0
- package/dist/gateway-v2/src/server.js.map +1 -1
- package/dist/wire/src/model.d.ts +208 -113
- package/dist/wire/src/model.js +27 -0
- package/dist/wire/src/model.js.map +1 -1
- package/dist/wire/src/relay-client.d.ts +2 -0
- package/dist/wire/src/relay-client.js +12 -0
- package/dist/wire/src/relay-client.js.map +1 -1
- package/dist/wire/src/rpc.d.ts +6587 -792
- package/dist/wire/src/rpc.js +126 -6
- package/dist/wire/src/rpc.js.map +1 -1
- package/dist/wire/src/updates.d.ts +388 -388
- package/package.json +3 -3
- package/src/embedded.ts +31 -1
- package/src/index.ts +2 -1
package/dist/wire/src/model.d.ts
CHANGED
|
@@ -21,21 +21,21 @@ export declare const agentCapabilitiesSchema: z.ZodObject<{
|
|
|
21
21
|
models: z.ZodBoolean;
|
|
22
22
|
modes: z.ZodBoolean;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
models: boolean;
|
|
25
|
-
modes: boolean;
|
|
26
|
-
steer: boolean;
|
|
27
24
|
interrupt: boolean;
|
|
25
|
+
steer: boolean;
|
|
28
26
|
permissions: boolean;
|
|
29
27
|
images: boolean;
|
|
30
28
|
fork: boolean;
|
|
31
|
-
}, {
|
|
32
29
|
models: boolean;
|
|
33
30
|
modes: boolean;
|
|
34
|
-
|
|
31
|
+
}, {
|
|
35
32
|
interrupt: boolean;
|
|
33
|
+
steer: boolean;
|
|
36
34
|
permissions: boolean;
|
|
37
35
|
images: boolean;
|
|
38
36
|
fork: boolean;
|
|
37
|
+
models: boolean;
|
|
38
|
+
modes: boolean;
|
|
39
39
|
}>;
|
|
40
40
|
export type AgentCapabilities = z.infer<typeof agentCapabilitiesSchema>;
|
|
41
41
|
/**
|
|
@@ -92,36 +92,36 @@ export declare const agentInfoSchema: z.ZodObject<{
|
|
|
92
92
|
models: z.ZodBoolean;
|
|
93
93
|
modes: z.ZodBoolean;
|
|
94
94
|
}, "strip", z.ZodTypeAny, {
|
|
95
|
-
models: boolean;
|
|
96
|
-
modes: boolean;
|
|
97
|
-
steer: boolean;
|
|
98
95
|
interrupt: boolean;
|
|
96
|
+
steer: boolean;
|
|
99
97
|
permissions: boolean;
|
|
100
98
|
images: boolean;
|
|
101
99
|
fork: boolean;
|
|
102
|
-
}, {
|
|
103
100
|
models: boolean;
|
|
104
101
|
modes: boolean;
|
|
105
|
-
|
|
102
|
+
}, {
|
|
106
103
|
interrupt: boolean;
|
|
104
|
+
steer: boolean;
|
|
107
105
|
permissions: boolean;
|
|
108
106
|
images: boolean;
|
|
109
107
|
fork: boolean;
|
|
108
|
+
models: boolean;
|
|
109
|
+
modes: boolean;
|
|
110
110
|
}>;
|
|
111
111
|
}, "strip", z.ZodTypeAny, {
|
|
112
112
|
id: string;
|
|
113
113
|
label: string;
|
|
114
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
115
|
+
installed: boolean;
|
|
114
116
|
capabilities: {
|
|
115
|
-
models: boolean;
|
|
116
|
-
modes: boolean;
|
|
117
|
-
steer: boolean;
|
|
118
117
|
interrupt: boolean;
|
|
118
|
+
steer: boolean;
|
|
119
119
|
permissions: boolean;
|
|
120
120
|
images: boolean;
|
|
121
121
|
fork: boolean;
|
|
122
|
+
models: boolean;
|
|
123
|
+
modes: boolean;
|
|
122
124
|
};
|
|
123
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
124
|
-
installed: boolean;
|
|
125
125
|
version?: string | undefined;
|
|
126
126
|
problem?: string | undefined;
|
|
127
127
|
auth?: {
|
|
@@ -132,17 +132,17 @@ export declare const agentInfoSchema: z.ZodObject<{
|
|
|
132
132
|
}, {
|
|
133
133
|
id: string;
|
|
134
134
|
label: string;
|
|
135
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
136
|
+
installed: boolean;
|
|
135
137
|
capabilities: {
|
|
136
|
-
models: boolean;
|
|
137
|
-
modes: boolean;
|
|
138
|
-
steer: boolean;
|
|
139
138
|
interrupt: boolean;
|
|
139
|
+
steer: boolean;
|
|
140
140
|
permissions: boolean;
|
|
141
141
|
images: boolean;
|
|
142
142
|
fork: boolean;
|
|
143
|
+
models: boolean;
|
|
144
|
+
modes: boolean;
|
|
143
145
|
};
|
|
144
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
145
|
-
installed: boolean;
|
|
146
146
|
version?: string | undefined;
|
|
147
147
|
problem?: string | undefined;
|
|
148
148
|
auth?: {
|
|
@@ -167,13 +167,13 @@ export declare const permissionOptionSchema: z.ZodObject<{
|
|
|
167
167
|
name: z.ZodString;
|
|
168
168
|
kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
|
|
169
169
|
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
optionId: string;
|
|
170
171
|
name: string;
|
|
171
172
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
172
|
-
optionId: string;
|
|
173
173
|
}, {
|
|
174
|
+
optionId: string;
|
|
174
175
|
name: string;
|
|
175
176
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
176
|
-
optionId: string;
|
|
177
177
|
}>;
|
|
178
178
|
export type PermissionOption = z.infer<typeof permissionOptionSchema>;
|
|
179
179
|
/** What a running session is doing right now, for list rows. Live only. */
|
|
@@ -182,13 +182,13 @@ export declare const sessionActivitySchema: z.ZodObject<{
|
|
|
182
182
|
title: z.ZodOptional<z.ZodString>;
|
|
183
183
|
toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
|
|
184
184
|
}, "strip", z.ZodTypeAny, {
|
|
185
|
-
kind: "thinking" | "
|
|
185
|
+
kind: "thinking" | "responding" | "tool";
|
|
186
186
|
title?: string | undefined;
|
|
187
|
-
toolKind?: "
|
|
187
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
188
188
|
}, {
|
|
189
|
-
kind: "thinking" | "
|
|
189
|
+
kind: "thinking" | "responding" | "tool";
|
|
190
190
|
title?: string | undefined;
|
|
191
|
-
toolKind?: "
|
|
191
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
192
192
|
}>;
|
|
193
193
|
export type SessionActivity = z.infer<typeof sessionActivitySchema>;
|
|
194
194
|
/** The oldest unanswered permission request, so lists can offer approval inline. Live only. */
|
|
@@ -202,36 +202,80 @@ export declare const pendingPermissionSchema: z.ZodObject<{
|
|
|
202
202
|
name: z.ZodString;
|
|
203
203
|
kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
|
|
204
204
|
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
optionId: string;
|
|
205
206
|
name: string;
|
|
206
207
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
207
|
-
optionId: string;
|
|
208
208
|
}, {
|
|
209
|
+
optionId: string;
|
|
209
210
|
name: string;
|
|
210
211
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
211
|
-
optionId: string;
|
|
212
212
|
}>, "many">;
|
|
213
213
|
}, "strip", z.ZodTypeAny, {
|
|
214
214
|
options: {
|
|
215
|
+
optionId: string;
|
|
215
216
|
name: string;
|
|
216
217
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
217
|
-
optionId: string;
|
|
218
218
|
}[];
|
|
219
|
-
requestId: string;
|
|
220
219
|
title: string;
|
|
221
|
-
|
|
220
|
+
requestId: string;
|
|
222
221
|
toolCallId?: string | undefined;
|
|
222
|
+
detail?: string | undefined;
|
|
223
223
|
}, {
|
|
224
224
|
options: {
|
|
225
|
+
optionId: string;
|
|
225
226
|
name: string;
|
|
226
227
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
227
|
-
optionId: string;
|
|
228
228
|
}[];
|
|
229
|
-
requestId: string;
|
|
230
229
|
title: string;
|
|
231
|
-
|
|
230
|
+
requestId: string;
|
|
232
231
|
toolCallId?: string | undefined;
|
|
232
|
+
detail?: string | undefined;
|
|
233
233
|
}>;
|
|
234
234
|
export type PendingPermissionSummary = z.infer<typeof pendingPermissionSchema>;
|
|
235
|
+
export declare const queuedMessageSchema: z.ZodObject<{
|
|
236
|
+
clientMessageId: z.ZodString;
|
|
237
|
+
/** The message's text (images are counted, not sent). */
|
|
238
|
+
text: z.ZodString;
|
|
239
|
+
images: z.ZodNumber;
|
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
|
241
|
+
images: number;
|
|
242
|
+
clientMessageId: string;
|
|
243
|
+
text: string;
|
|
244
|
+
}, {
|
|
245
|
+
images: number;
|
|
246
|
+
clientMessageId: string;
|
|
247
|
+
text: string;
|
|
248
|
+
}>;
|
|
249
|
+
export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
|
|
250
|
+
/** A sub-agent a session started: the tool call it runs under, and how it is doing. */
|
|
251
|
+
export declare const subagentInfoSchema: z.ZodObject<{
|
|
252
|
+
toolCallId: z.ZodString;
|
|
253
|
+
/** What it was asked to do. */
|
|
254
|
+
task: z.ZodString;
|
|
255
|
+
/** Its role or type, e.g. "Explore". */
|
|
256
|
+
agentType: z.ZodOptional<z.ZodString>;
|
|
257
|
+
running: z.ZodBoolean;
|
|
258
|
+
failed: z.ZodOptional<z.ZodBoolean>;
|
|
259
|
+
startedAt: z.ZodNumber;
|
|
260
|
+
endedAt: z.ZodOptional<z.ZodNumber>;
|
|
261
|
+
}, "strip", z.ZodTypeAny, {
|
|
262
|
+
running: boolean;
|
|
263
|
+
toolCallId: string;
|
|
264
|
+
task: string;
|
|
265
|
+
startedAt: number;
|
|
266
|
+
agentType?: string | undefined;
|
|
267
|
+
failed?: boolean | undefined;
|
|
268
|
+
endedAt?: number | undefined;
|
|
269
|
+
}, {
|
|
270
|
+
running: boolean;
|
|
271
|
+
toolCallId: string;
|
|
272
|
+
task: string;
|
|
273
|
+
startedAt: number;
|
|
274
|
+
agentType?: string | undefined;
|
|
275
|
+
failed?: boolean | undefined;
|
|
276
|
+
endedAt?: number | undefined;
|
|
277
|
+
}>;
|
|
278
|
+
export type SubagentInfo = z.infer<typeof subagentInfoSchema>;
|
|
235
279
|
export declare const sessionSummarySchema: z.ZodObject<{
|
|
236
280
|
/** `${agent}:${nativeId}` — stable across daemon restarts and rediscovery. */
|
|
237
281
|
id: z.ZodString;
|
|
@@ -253,13 +297,13 @@ export declare const sessionSummarySchema: z.ZodObject<{
|
|
|
253
297
|
title: z.ZodOptional<z.ZodString>;
|
|
254
298
|
toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
|
|
255
299
|
}, "strip", z.ZodTypeAny, {
|
|
256
|
-
kind: "thinking" | "
|
|
300
|
+
kind: "thinking" | "responding" | "tool";
|
|
257
301
|
title?: string | undefined;
|
|
258
|
-
toolKind?: "
|
|
302
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
259
303
|
}, {
|
|
260
|
-
kind: "thinking" | "
|
|
304
|
+
kind: "thinking" | "responding" | "tool";
|
|
261
305
|
title?: string | undefined;
|
|
262
|
-
toolKind?: "
|
|
306
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
263
307
|
}>>;
|
|
264
308
|
permission: z.ZodOptional<z.ZodObject<{
|
|
265
309
|
requestId: z.ZodString;
|
|
@@ -271,96 +315,143 @@ export declare const sessionSummarySchema: z.ZodObject<{
|
|
|
271
315
|
name: z.ZodString;
|
|
272
316
|
kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
|
|
273
317
|
}, "strip", z.ZodTypeAny, {
|
|
318
|
+
optionId: string;
|
|
274
319
|
name: string;
|
|
275
320
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
276
|
-
optionId: string;
|
|
277
321
|
}, {
|
|
322
|
+
optionId: string;
|
|
278
323
|
name: string;
|
|
279
324
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
280
|
-
optionId: string;
|
|
281
325
|
}>, "many">;
|
|
282
326
|
}, "strip", z.ZodTypeAny, {
|
|
283
327
|
options: {
|
|
328
|
+
optionId: string;
|
|
284
329
|
name: string;
|
|
285
330
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
286
|
-
optionId: string;
|
|
287
331
|
}[];
|
|
288
|
-
requestId: string;
|
|
289
332
|
title: string;
|
|
290
|
-
|
|
333
|
+
requestId: string;
|
|
291
334
|
toolCallId?: string | undefined;
|
|
335
|
+
detail?: string | undefined;
|
|
292
336
|
}, {
|
|
293
337
|
options: {
|
|
338
|
+
optionId: string;
|
|
294
339
|
name: string;
|
|
295
340
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
296
|
-
optionId: string;
|
|
297
341
|
}[];
|
|
298
|
-
requestId: string;
|
|
299
342
|
title: string;
|
|
300
|
-
|
|
343
|
+
requestId: string;
|
|
301
344
|
toolCallId?: string | undefined;
|
|
345
|
+
detail?: string | undefined;
|
|
346
|
+
}>>;
|
|
347
|
+
/**
|
|
348
|
+
* Live only: messages waiting for the current turn to end, when the host
|
|
349
|
+
* holds them (agents that can't take input mid-turn). Oldest first.
|
|
350
|
+
*/
|
|
351
|
+
queue: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
352
|
+
clientMessageId: z.ZodString;
|
|
353
|
+
/** The message's text (images are counted, not sent). */
|
|
354
|
+
text: z.ZodString;
|
|
355
|
+
images: z.ZodNumber;
|
|
356
|
+
}, "strip", z.ZodTypeAny, {
|
|
357
|
+
images: number;
|
|
358
|
+
clientMessageId: string;
|
|
359
|
+
text: string;
|
|
360
|
+
}, {
|
|
361
|
+
images: number;
|
|
362
|
+
clientMessageId: string;
|
|
363
|
+
text: string;
|
|
364
|
+
}>, "many">>;
|
|
365
|
+
/** Live only, for sessions that started sub-agents: how many, and how many are working now (`sessions.subagents` lists them). */
|
|
366
|
+
subagents: z.ZodOptional<z.ZodObject<{
|
|
367
|
+
total: z.ZodNumber;
|
|
368
|
+
running: z.ZodNumber;
|
|
369
|
+
}, "strip", z.ZodTypeAny, {
|
|
370
|
+
running: number;
|
|
371
|
+
total: number;
|
|
372
|
+
}, {
|
|
373
|
+
running: number;
|
|
374
|
+
total: number;
|
|
302
375
|
}>>;
|
|
303
376
|
}, "strip", z.ZodTypeAny, {
|
|
377
|
+
state: "idle" | "running" | "waiting" | "error" | "offline";
|
|
304
378
|
id: string;
|
|
379
|
+
agent: string;
|
|
380
|
+
nativeId: string;
|
|
305
381
|
cwd: string;
|
|
306
|
-
createdAt: number;
|
|
307
382
|
pendingPermissions: number;
|
|
383
|
+
createdAt: number;
|
|
308
384
|
updatedAt: number;
|
|
309
|
-
archived: boolean;
|
|
310
|
-
state: "idle" | "error" | "running" | "waiting" | "offline";
|
|
311
|
-
agent: string;
|
|
312
|
-
nativeId: string;
|
|
313
385
|
lastSeq: number;
|
|
386
|
+
archived: boolean;
|
|
314
387
|
title?: string | undefined;
|
|
388
|
+
preview?: string | undefined;
|
|
389
|
+
driver?: "remote" | "desktop" | "none" | undefined;
|
|
315
390
|
model?: string | undefined;
|
|
391
|
+
activity?: {
|
|
392
|
+
kind: "thinking" | "responding" | "tool";
|
|
393
|
+
title?: string | undefined;
|
|
394
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
395
|
+
} | undefined;
|
|
316
396
|
permission?: {
|
|
317
397
|
options: {
|
|
398
|
+
optionId: string;
|
|
318
399
|
name: string;
|
|
319
400
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
320
|
-
optionId: string;
|
|
321
401
|
}[];
|
|
322
|
-
requestId: string;
|
|
323
402
|
title: string;
|
|
324
|
-
|
|
403
|
+
requestId: string;
|
|
325
404
|
toolCallId?: string | undefined;
|
|
405
|
+
detail?: string | undefined;
|
|
326
406
|
} | undefined;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
407
|
+
queue?: {
|
|
408
|
+
images: number;
|
|
409
|
+
clientMessageId: string;
|
|
410
|
+
text: string;
|
|
411
|
+
}[] | undefined;
|
|
412
|
+
subagents?: {
|
|
413
|
+
running: number;
|
|
414
|
+
total: number;
|
|
333
415
|
} | undefined;
|
|
334
416
|
}, {
|
|
417
|
+
state: "idle" | "running" | "waiting" | "error" | "offline";
|
|
335
418
|
id: string;
|
|
419
|
+
agent: string;
|
|
420
|
+
nativeId: string;
|
|
336
421
|
cwd: string;
|
|
337
|
-
createdAt: number;
|
|
338
422
|
pendingPermissions: number;
|
|
423
|
+
createdAt: number;
|
|
339
424
|
updatedAt: number;
|
|
340
|
-
archived: boolean;
|
|
341
|
-
state: "idle" | "error" | "running" | "waiting" | "offline";
|
|
342
|
-
agent: string;
|
|
343
|
-
nativeId: string;
|
|
344
425
|
lastSeq: number;
|
|
426
|
+
archived: boolean;
|
|
345
427
|
title?: string | undefined;
|
|
428
|
+
preview?: string | undefined;
|
|
429
|
+
driver?: "remote" | "desktop" | "none" | undefined;
|
|
346
430
|
model?: string | undefined;
|
|
431
|
+
activity?: {
|
|
432
|
+
kind: "thinking" | "responding" | "tool";
|
|
433
|
+
title?: string | undefined;
|
|
434
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
435
|
+
} | undefined;
|
|
347
436
|
permission?: {
|
|
348
437
|
options: {
|
|
438
|
+
optionId: string;
|
|
349
439
|
name: string;
|
|
350
440
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
351
|
-
optionId: string;
|
|
352
441
|
}[];
|
|
353
|
-
requestId: string;
|
|
354
442
|
title: string;
|
|
355
|
-
|
|
443
|
+
requestId: string;
|
|
356
444
|
toolCallId?: string | undefined;
|
|
445
|
+
detail?: string | undefined;
|
|
357
446
|
} | undefined;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
447
|
+
queue?: {
|
|
448
|
+
images: number;
|
|
449
|
+
clientMessageId: string;
|
|
450
|
+
text: string;
|
|
451
|
+
}[] | undefined;
|
|
452
|
+
subagents?: {
|
|
453
|
+
running: number;
|
|
454
|
+
total: number;
|
|
364
455
|
} | undefined;
|
|
365
456
|
}>;
|
|
366
457
|
export type SessionSummary = z.infer<typeof sessionSummarySchema>;
|
|
@@ -375,13 +466,13 @@ export declare const projectSummarySchema: z.ZodObject<{
|
|
|
375
466
|
lastActiveAt: z.ZodNumber;
|
|
376
467
|
sessionCount: z.ZodNumber;
|
|
377
468
|
}, "strip", z.ZodTypeAny, {
|
|
378
|
-
cwd: string;
|
|
379
469
|
name: string;
|
|
470
|
+
cwd: string;
|
|
380
471
|
lastActiveAt: number;
|
|
381
472
|
sessionCount: number;
|
|
382
473
|
}, {
|
|
383
|
-
cwd: string;
|
|
384
474
|
name: string;
|
|
475
|
+
cwd: string;
|
|
385
476
|
lastActiveAt: number;
|
|
386
477
|
sessionCount: number;
|
|
387
478
|
}>;
|
|
@@ -391,6 +482,8 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
391
482
|
hostname: z.ZodString;
|
|
392
483
|
platform: z.ZodString;
|
|
393
484
|
hostVersion: z.ZodString;
|
|
485
|
+
/** The host user's home directory, so apps can show paths as `~/…`. */
|
|
486
|
+
home: z.ZodOptional<z.ZodString>;
|
|
394
487
|
agents: z.ZodArray<z.ZodObject<{
|
|
395
488
|
id: z.ZodString;
|
|
396
489
|
label: z.ZodString;
|
|
@@ -424,36 +517,36 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
424
517
|
models: z.ZodBoolean;
|
|
425
518
|
modes: z.ZodBoolean;
|
|
426
519
|
}, "strip", z.ZodTypeAny, {
|
|
427
|
-
models: boolean;
|
|
428
|
-
modes: boolean;
|
|
429
|
-
steer: boolean;
|
|
430
520
|
interrupt: boolean;
|
|
521
|
+
steer: boolean;
|
|
431
522
|
permissions: boolean;
|
|
432
523
|
images: boolean;
|
|
433
524
|
fork: boolean;
|
|
434
|
-
}, {
|
|
435
525
|
models: boolean;
|
|
436
526
|
modes: boolean;
|
|
437
|
-
|
|
527
|
+
}, {
|
|
438
528
|
interrupt: boolean;
|
|
529
|
+
steer: boolean;
|
|
439
530
|
permissions: boolean;
|
|
440
531
|
images: boolean;
|
|
441
532
|
fork: boolean;
|
|
533
|
+
models: boolean;
|
|
534
|
+
modes: boolean;
|
|
442
535
|
}>;
|
|
443
536
|
}, "strip", z.ZodTypeAny, {
|
|
444
537
|
id: string;
|
|
445
538
|
label: string;
|
|
539
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
540
|
+
installed: boolean;
|
|
446
541
|
capabilities: {
|
|
447
|
-
models: boolean;
|
|
448
|
-
modes: boolean;
|
|
449
|
-
steer: boolean;
|
|
450
542
|
interrupt: boolean;
|
|
543
|
+
steer: boolean;
|
|
451
544
|
permissions: boolean;
|
|
452
545
|
images: boolean;
|
|
453
546
|
fork: boolean;
|
|
547
|
+
models: boolean;
|
|
548
|
+
modes: boolean;
|
|
454
549
|
};
|
|
455
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
456
|
-
installed: boolean;
|
|
457
550
|
version?: string | undefined;
|
|
458
551
|
problem?: string | undefined;
|
|
459
552
|
auth?: {
|
|
@@ -464,17 +557,17 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
464
557
|
}, {
|
|
465
558
|
id: string;
|
|
466
559
|
label: string;
|
|
560
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
561
|
+
installed: boolean;
|
|
467
562
|
capabilities: {
|
|
468
|
-
models: boolean;
|
|
469
|
-
modes: boolean;
|
|
470
|
-
steer: boolean;
|
|
471
563
|
interrupt: boolean;
|
|
564
|
+
steer: boolean;
|
|
472
565
|
permissions: boolean;
|
|
473
566
|
images: boolean;
|
|
474
567
|
fork: boolean;
|
|
568
|
+
models: boolean;
|
|
569
|
+
modes: boolean;
|
|
475
570
|
};
|
|
476
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
477
|
-
installed: boolean;
|
|
478
571
|
version?: string | undefined;
|
|
479
572
|
problem?: string | undefined;
|
|
480
573
|
auth?: {
|
|
@@ -491,17 +584,17 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
491
584
|
agents: {
|
|
492
585
|
id: string;
|
|
493
586
|
label: string;
|
|
587
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
588
|
+
installed: boolean;
|
|
494
589
|
capabilities: {
|
|
495
|
-
models: boolean;
|
|
496
|
-
modes: boolean;
|
|
497
|
-
steer: boolean;
|
|
498
590
|
interrupt: boolean;
|
|
591
|
+
steer: boolean;
|
|
499
592
|
permissions: boolean;
|
|
500
593
|
images: boolean;
|
|
501
594
|
fork: boolean;
|
|
595
|
+
models: boolean;
|
|
596
|
+
modes: boolean;
|
|
502
597
|
};
|
|
503
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
504
|
-
installed: boolean;
|
|
505
598
|
version?: string | undefined;
|
|
506
599
|
problem?: string | undefined;
|
|
507
600
|
auth?: {
|
|
@@ -510,6 +603,7 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
510
603
|
hint?: string | undefined;
|
|
511
604
|
} | undefined;
|
|
512
605
|
}[];
|
|
606
|
+
home?: string | undefined;
|
|
513
607
|
}, {
|
|
514
608
|
machineId: string;
|
|
515
609
|
hostname: string;
|
|
@@ -518,17 +612,17 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
518
612
|
agents: {
|
|
519
613
|
id: string;
|
|
520
614
|
label: string;
|
|
615
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
616
|
+
installed: boolean;
|
|
521
617
|
capabilities: {
|
|
522
|
-
models: boolean;
|
|
523
|
-
modes: boolean;
|
|
524
|
-
steer: boolean;
|
|
525
618
|
interrupt: boolean;
|
|
619
|
+
steer: boolean;
|
|
526
620
|
permissions: boolean;
|
|
527
621
|
images: boolean;
|
|
528
622
|
fork: boolean;
|
|
623
|
+
models: boolean;
|
|
624
|
+
modes: boolean;
|
|
529
625
|
};
|
|
530
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
531
|
-
installed: boolean;
|
|
532
626
|
version?: string | undefined;
|
|
533
627
|
problem?: string | undefined;
|
|
534
628
|
auth?: {
|
|
@@ -537,6 +631,7 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
537
631
|
hint?: string | undefined;
|
|
538
632
|
} | undefined;
|
|
539
633
|
}[];
|
|
634
|
+
home?: string | undefined;
|
|
540
635
|
}>;
|
|
541
636
|
export type MachineInfo = z.infer<typeof machineInfoSchema>;
|
|
542
637
|
/** A server listening on the host, which a device can preview through the encrypted channel. */
|
|
@@ -555,15 +650,15 @@ export declare const portInfoSchema: z.ZodObject<{
|
|
|
555
650
|
port: number;
|
|
556
651
|
process: string;
|
|
557
652
|
http: boolean;
|
|
558
|
-
cwd?: string | undefined;
|
|
559
653
|
title?: string | undefined;
|
|
654
|
+
cwd?: string | undefined;
|
|
560
655
|
pid?: number | undefined;
|
|
561
656
|
}, {
|
|
562
657
|
port: number;
|
|
563
658
|
process: string;
|
|
564
659
|
http: boolean;
|
|
565
|
-
cwd?: string | undefined;
|
|
566
660
|
title?: string | undefined;
|
|
661
|
+
cwd?: string | undefined;
|
|
567
662
|
pid?: number | undefined;
|
|
568
663
|
}>;
|
|
569
664
|
export type PortInfo = z.infer<typeof portInfoSchema>;
|
|
@@ -586,25 +681,25 @@ export declare const terminalInfoSchema: z.ZodObject<{
|
|
|
586
681
|
interrupted: z.ZodOptional<z.ZodBoolean>;
|
|
587
682
|
}, "strip", z.ZodTypeAny, {
|
|
588
683
|
id: string;
|
|
589
|
-
|
|
590
|
-
rows: number;
|
|
684
|
+
title: string;
|
|
591
685
|
cwd: string;
|
|
592
686
|
createdAt: number;
|
|
593
|
-
|
|
687
|
+
cols: number;
|
|
688
|
+
rows: number;
|
|
594
689
|
activeAt: number;
|
|
595
|
-
exitCode?: number | null | undefined;
|
|
596
690
|
command?: string | undefined;
|
|
691
|
+
exitCode?: number | null | undefined;
|
|
597
692
|
interrupted?: boolean | undefined;
|
|
598
693
|
}, {
|
|
599
694
|
id: string;
|
|
600
|
-
|
|
601
|
-
rows: number;
|
|
695
|
+
title: string;
|
|
602
696
|
cwd: string;
|
|
603
697
|
createdAt: number;
|
|
604
|
-
|
|
698
|
+
cols: number;
|
|
699
|
+
rows: number;
|
|
605
700
|
activeAt: number;
|
|
606
|
-
exitCode?: number | null | undefined;
|
|
607
701
|
command?: string | undefined;
|
|
702
|
+
exitCode?: number | null | undefined;
|
|
608
703
|
interrupted?: boolean | undefined;
|
|
609
704
|
}>;
|
|
610
705
|
export type TerminalInfo = z.infer<typeof terminalInfoSchema>;
|
|
@@ -659,7 +754,7 @@ export declare const gatewayStatusSchema: z.ZodObject<{
|
|
|
659
754
|
pairedAt: number;
|
|
660
755
|
}>, "many">;
|
|
661
756
|
}, "strip", z.ZodTypeAny, {
|
|
662
|
-
status: "
|
|
757
|
+
status: "offline" | "off" | "connecting" | "online";
|
|
663
758
|
devices: {
|
|
664
759
|
id: string;
|
|
665
760
|
name: string;
|
|
@@ -680,7 +775,7 @@ export declare const gatewayStatusSchema: z.ZodObject<{
|
|
|
680
775
|
email?: string | undefined;
|
|
681
776
|
} | undefined;
|
|
682
777
|
}, {
|
|
683
|
-
status: "
|
|
778
|
+
status: "offline" | "off" | "connecting" | "online";
|
|
684
779
|
devices: {
|
|
685
780
|
id: string;
|
|
686
781
|
name: string;
|
package/dist/wire/src/model.js
CHANGED
|
@@ -79,6 +79,24 @@ export const pendingPermissionSchema = z.object({
|
|
|
79
79
|
detail: z.string().optional(),
|
|
80
80
|
options: z.array(permissionOptionSchema).min(1),
|
|
81
81
|
});
|
|
82
|
+
export const queuedMessageSchema = z.object({
|
|
83
|
+
clientMessageId: z.string(),
|
|
84
|
+
/** The message's text (images are counted, not sent). */
|
|
85
|
+
text: z.string(),
|
|
86
|
+
images: z.number().int().nonnegative(),
|
|
87
|
+
});
|
|
88
|
+
/** A sub-agent a session started: the tool call it runs under, and how it is doing. */
|
|
89
|
+
export const subagentInfoSchema = z.object({
|
|
90
|
+
toolCallId: z.string(),
|
|
91
|
+
/** What it was asked to do. */
|
|
92
|
+
task: z.string(),
|
|
93
|
+
/** Its role or type, e.g. "Explore". */
|
|
94
|
+
agentType: z.string().optional(),
|
|
95
|
+
running: z.boolean(),
|
|
96
|
+
failed: z.boolean().optional(),
|
|
97
|
+
startedAt: z.number(),
|
|
98
|
+
endedAt: z.number().optional(),
|
|
99
|
+
});
|
|
82
100
|
export const sessionSummarySchema = z.object({
|
|
83
101
|
/** `${agent}:${nativeId}` — stable across daemon restarts and rediscovery. */
|
|
84
102
|
id: z.string().min(1),
|
|
@@ -97,6 +115,13 @@ export const sessionSummarySchema = z.object({
|
|
|
97
115
|
archived: z.boolean(),
|
|
98
116
|
activity: sessionActivitySchema.optional(),
|
|
99
117
|
permission: pendingPermissionSchema.optional(),
|
|
118
|
+
/**
|
|
119
|
+
* Live only: messages waiting for the current turn to end, when the host
|
|
120
|
+
* holds them (agents that can't take input mid-turn). Oldest first.
|
|
121
|
+
*/
|
|
122
|
+
queue: z.array(queuedMessageSchema).optional(),
|
|
123
|
+
/** Live only, for sessions that started sub-agents: how many, and how many are working now (`sessions.subagents` lists them). */
|
|
124
|
+
subagents: z.object({ total: z.number().int(), running: z.number().int() }).optional(),
|
|
100
125
|
});
|
|
101
126
|
export function sessionIdFor(agent, nativeId) {
|
|
102
127
|
return `${agent}:${nativeId}`;
|
|
@@ -118,6 +143,8 @@ export const machineInfoSchema = z.object({
|
|
|
118
143
|
hostname: z.string(),
|
|
119
144
|
platform: z.string(),
|
|
120
145
|
hostVersion: z.string(),
|
|
146
|
+
/** The host user's home directory, so apps can show paths as `~/…`. */
|
|
147
|
+
home: z.string().optional(),
|
|
121
148
|
agents: z.array(agentInfoSchema),
|
|
122
149
|
});
|
|
123
150
|
/** A server listening on the host, which a device can preview through the encrypted channel. */
|