@linkshell/gateway 0.5.1 → 0.5.3
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/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 +275 -127
- package/dist/wire/src/model.js +55 -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 +6636 -918
- package/dist/wire/src/rpc.js +130 -7
- package/dist/wire/src/rpc.js.map +1 -1
- package/dist/wire/src/updates.d.ts +352 -352
- package/package.json +3 -3
- package/src/index.ts +2 -1
package/dist/wire/src/model.d.ts
CHANGED
|
@@ -17,25 +17,31 @@ export declare const agentCapabilitiesSchema: z.ZodObject<{
|
|
|
17
17
|
steer: z.ZodBoolean;
|
|
18
18
|
permissions: z.ZodBoolean;
|
|
19
19
|
images: z.ZodBoolean;
|
|
20
|
+
/**
|
|
21
|
+
* The agent forks sessions itself, keeping everything it knew. Every agent's
|
|
22
|
+
* sessions can be forked: without this (or from a single reply, where the
|
|
23
|
+
* agent only forks whole sessions) LinkShell makes the fork — the new session
|
|
24
|
+
* shows the conversation and its agent is told it as text.
|
|
25
|
+
*/
|
|
20
26
|
fork: z.ZodBoolean;
|
|
21
27
|
models: z.ZodBoolean;
|
|
22
28
|
modes: z.ZodBoolean;
|
|
23
29
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
models: boolean;
|
|
25
|
-
modes: boolean;
|
|
26
|
-
steer: boolean;
|
|
27
30
|
interrupt: boolean;
|
|
31
|
+
steer: boolean;
|
|
28
32
|
permissions: boolean;
|
|
29
33
|
images: boolean;
|
|
30
34
|
fork: boolean;
|
|
31
|
-
}, {
|
|
32
35
|
models: boolean;
|
|
33
36
|
modes: boolean;
|
|
34
|
-
|
|
37
|
+
}, {
|
|
35
38
|
interrupt: boolean;
|
|
39
|
+
steer: boolean;
|
|
36
40
|
permissions: boolean;
|
|
37
41
|
images: boolean;
|
|
38
42
|
fork: boolean;
|
|
43
|
+
models: boolean;
|
|
44
|
+
modes: boolean;
|
|
39
45
|
}>;
|
|
40
46
|
export type AgentCapabilities = z.infer<typeof agentCapabilitiesSchema>;
|
|
41
47
|
/**
|
|
@@ -88,40 +94,46 @@ export declare const agentInfoSchema: z.ZodObject<{
|
|
|
88
94
|
steer: z.ZodBoolean;
|
|
89
95
|
permissions: z.ZodBoolean;
|
|
90
96
|
images: z.ZodBoolean;
|
|
97
|
+
/**
|
|
98
|
+
* The agent forks sessions itself, keeping everything it knew. Every agent's
|
|
99
|
+
* sessions can be forked: without this (or from a single reply, where the
|
|
100
|
+
* agent only forks whole sessions) LinkShell makes the fork — the new session
|
|
101
|
+
* shows the conversation and its agent is told it as text.
|
|
102
|
+
*/
|
|
91
103
|
fork: z.ZodBoolean;
|
|
92
104
|
models: z.ZodBoolean;
|
|
93
105
|
modes: z.ZodBoolean;
|
|
94
106
|
}, "strip", z.ZodTypeAny, {
|
|
95
|
-
models: boolean;
|
|
96
|
-
modes: boolean;
|
|
97
|
-
steer: boolean;
|
|
98
107
|
interrupt: boolean;
|
|
108
|
+
steer: boolean;
|
|
99
109
|
permissions: boolean;
|
|
100
110
|
images: boolean;
|
|
101
111
|
fork: boolean;
|
|
102
|
-
}, {
|
|
103
112
|
models: boolean;
|
|
104
113
|
modes: boolean;
|
|
105
|
-
|
|
114
|
+
}, {
|
|
106
115
|
interrupt: boolean;
|
|
116
|
+
steer: boolean;
|
|
107
117
|
permissions: boolean;
|
|
108
118
|
images: boolean;
|
|
109
119
|
fork: boolean;
|
|
120
|
+
models: boolean;
|
|
121
|
+
modes: boolean;
|
|
110
122
|
}>;
|
|
111
123
|
}, "strip", z.ZodTypeAny, {
|
|
112
124
|
id: string;
|
|
113
125
|
label: string;
|
|
126
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
127
|
+
installed: boolean;
|
|
114
128
|
capabilities: {
|
|
115
|
-
models: boolean;
|
|
116
|
-
modes: boolean;
|
|
117
|
-
steer: boolean;
|
|
118
129
|
interrupt: boolean;
|
|
130
|
+
steer: boolean;
|
|
119
131
|
permissions: boolean;
|
|
120
132
|
images: boolean;
|
|
121
133
|
fork: boolean;
|
|
134
|
+
models: boolean;
|
|
135
|
+
modes: boolean;
|
|
122
136
|
};
|
|
123
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
124
|
-
installed: boolean;
|
|
125
137
|
version?: string | undefined;
|
|
126
138
|
problem?: string | undefined;
|
|
127
139
|
auth?: {
|
|
@@ -132,17 +144,17 @@ export declare const agentInfoSchema: z.ZodObject<{
|
|
|
132
144
|
}, {
|
|
133
145
|
id: string;
|
|
134
146
|
label: string;
|
|
147
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
148
|
+
installed: boolean;
|
|
135
149
|
capabilities: {
|
|
136
|
-
models: boolean;
|
|
137
|
-
modes: boolean;
|
|
138
|
-
steer: boolean;
|
|
139
150
|
interrupt: boolean;
|
|
151
|
+
steer: boolean;
|
|
140
152
|
permissions: boolean;
|
|
141
153
|
images: boolean;
|
|
142
154
|
fork: boolean;
|
|
155
|
+
models: boolean;
|
|
156
|
+
modes: boolean;
|
|
143
157
|
};
|
|
144
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
145
|
-
installed: boolean;
|
|
146
158
|
version?: string | undefined;
|
|
147
159
|
problem?: string | undefined;
|
|
148
160
|
auth?: {
|
|
@@ -167,13 +179,13 @@ export declare const permissionOptionSchema: z.ZodObject<{
|
|
|
167
179
|
name: z.ZodString;
|
|
168
180
|
kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
|
|
169
181
|
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
optionId: string;
|
|
170
183
|
name: string;
|
|
171
184
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
172
|
-
optionId: string;
|
|
173
185
|
}, {
|
|
186
|
+
optionId: string;
|
|
174
187
|
name: string;
|
|
175
188
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
176
|
-
optionId: string;
|
|
177
189
|
}>;
|
|
178
190
|
export type PermissionOption = z.infer<typeof permissionOptionSchema>;
|
|
179
191
|
/** What a running session is doing right now, for list rows. Live only. */
|
|
@@ -182,13 +194,13 @@ export declare const sessionActivitySchema: z.ZodObject<{
|
|
|
182
194
|
title: z.ZodOptional<z.ZodString>;
|
|
183
195
|
toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
|
|
184
196
|
}, "strip", z.ZodTypeAny, {
|
|
185
|
-
kind: "thinking" | "
|
|
197
|
+
kind: "thinking" | "responding" | "tool";
|
|
186
198
|
title?: string | undefined;
|
|
187
|
-
toolKind?: "
|
|
199
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
188
200
|
}, {
|
|
189
|
-
kind: "thinking" | "
|
|
201
|
+
kind: "thinking" | "responding" | "tool";
|
|
190
202
|
title?: string | undefined;
|
|
191
|
-
toolKind?: "
|
|
203
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
192
204
|
}>;
|
|
193
205
|
export type SessionActivity = z.infer<typeof sessionActivitySchema>;
|
|
194
206
|
/** The oldest unanswered permission request, so lists can offer approval inline. Live only. */
|
|
@@ -202,34 +214,34 @@ export declare const pendingPermissionSchema: z.ZodObject<{
|
|
|
202
214
|
name: z.ZodString;
|
|
203
215
|
kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
|
|
204
216
|
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
optionId: string;
|
|
205
218
|
name: string;
|
|
206
219
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
207
|
-
optionId: string;
|
|
208
220
|
}, {
|
|
221
|
+
optionId: string;
|
|
209
222
|
name: string;
|
|
210
223
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
211
|
-
optionId: string;
|
|
212
224
|
}>, "many">;
|
|
213
225
|
}, "strip", z.ZodTypeAny, {
|
|
214
226
|
options: {
|
|
227
|
+
optionId: string;
|
|
215
228
|
name: string;
|
|
216
229
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
217
|
-
optionId: string;
|
|
218
230
|
}[];
|
|
219
|
-
requestId: string;
|
|
220
231
|
title: string;
|
|
221
|
-
|
|
232
|
+
requestId: string;
|
|
222
233
|
toolCallId?: string | undefined;
|
|
234
|
+
detail?: string | undefined;
|
|
223
235
|
}, {
|
|
224
236
|
options: {
|
|
237
|
+
optionId: string;
|
|
225
238
|
name: string;
|
|
226
239
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
227
|
-
optionId: string;
|
|
228
240
|
}[];
|
|
229
|
-
requestId: string;
|
|
230
241
|
title: string;
|
|
231
|
-
|
|
242
|
+
requestId: string;
|
|
232
243
|
toolCallId?: string | undefined;
|
|
244
|
+
detail?: string | undefined;
|
|
233
245
|
}>;
|
|
234
246
|
export type PendingPermissionSummary = z.infer<typeof pendingPermissionSchema>;
|
|
235
247
|
export declare const queuedMessageSchema: z.ZodObject<{
|
|
@@ -238,15 +250,44 @@ export declare const queuedMessageSchema: z.ZodObject<{
|
|
|
238
250
|
text: z.ZodString;
|
|
239
251
|
images: z.ZodNumber;
|
|
240
252
|
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
text: string;
|
|
242
|
-
clientMessageId: string;
|
|
243
253
|
images: number;
|
|
244
|
-
}, {
|
|
245
|
-
text: string;
|
|
246
254
|
clientMessageId: string;
|
|
255
|
+
text: string;
|
|
256
|
+
}, {
|
|
247
257
|
images: number;
|
|
258
|
+
clientMessageId: string;
|
|
259
|
+
text: string;
|
|
248
260
|
}>;
|
|
249
261
|
export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
|
|
262
|
+
/** A sub-agent a session started: the tool call it runs under, and how it is doing. */
|
|
263
|
+
export declare const subagentInfoSchema: z.ZodObject<{
|
|
264
|
+
toolCallId: z.ZodString;
|
|
265
|
+
/** What it was asked to do. */
|
|
266
|
+
task: z.ZodString;
|
|
267
|
+
/** Its role or type, e.g. "Explore". */
|
|
268
|
+
agentType: z.ZodOptional<z.ZodString>;
|
|
269
|
+
running: z.ZodBoolean;
|
|
270
|
+
failed: z.ZodOptional<z.ZodBoolean>;
|
|
271
|
+
startedAt: z.ZodNumber;
|
|
272
|
+
endedAt: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
running: boolean;
|
|
275
|
+
toolCallId: string;
|
|
276
|
+
task: string;
|
|
277
|
+
startedAt: number;
|
|
278
|
+
agentType?: string | undefined;
|
|
279
|
+
failed?: boolean | undefined;
|
|
280
|
+
endedAt?: number | undefined;
|
|
281
|
+
}, {
|
|
282
|
+
running: boolean;
|
|
283
|
+
toolCallId: string;
|
|
284
|
+
task: string;
|
|
285
|
+
startedAt: number;
|
|
286
|
+
agentType?: string | undefined;
|
|
287
|
+
failed?: boolean | undefined;
|
|
288
|
+
endedAt?: number | undefined;
|
|
289
|
+
}>;
|
|
290
|
+
export type SubagentInfo = z.infer<typeof subagentInfoSchema>;
|
|
250
291
|
export declare const sessionSummarySchema: z.ZodObject<{
|
|
251
292
|
/** `${agent}:${nativeId}` — stable across daemon restarts and rediscovery. */
|
|
252
293
|
id: z.ZodString;
|
|
@@ -268,13 +309,13 @@ export declare const sessionSummarySchema: z.ZodObject<{
|
|
|
268
309
|
title: z.ZodOptional<z.ZodString>;
|
|
269
310
|
toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
|
|
270
311
|
}, "strip", z.ZodTypeAny, {
|
|
271
|
-
kind: "thinking" | "
|
|
312
|
+
kind: "thinking" | "responding" | "tool";
|
|
272
313
|
title?: string | undefined;
|
|
273
|
-
toolKind?: "
|
|
314
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
274
315
|
}, {
|
|
275
|
-
kind: "thinking" | "
|
|
316
|
+
kind: "thinking" | "responding" | "tool";
|
|
276
317
|
title?: string | undefined;
|
|
277
|
-
toolKind?: "
|
|
318
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
278
319
|
}>>;
|
|
279
320
|
permission: z.ZodOptional<z.ZodObject<{
|
|
280
321
|
requestId: z.ZodString;
|
|
@@ -286,34 +327,34 @@ export declare const sessionSummarySchema: z.ZodObject<{
|
|
|
286
327
|
name: z.ZodString;
|
|
287
328
|
kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
|
|
288
329
|
}, "strip", z.ZodTypeAny, {
|
|
330
|
+
optionId: string;
|
|
289
331
|
name: string;
|
|
290
332
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
291
|
-
optionId: string;
|
|
292
333
|
}, {
|
|
334
|
+
optionId: string;
|
|
293
335
|
name: string;
|
|
294
336
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
295
|
-
optionId: string;
|
|
296
337
|
}>, "many">;
|
|
297
338
|
}, "strip", z.ZodTypeAny, {
|
|
298
339
|
options: {
|
|
340
|
+
optionId: string;
|
|
299
341
|
name: string;
|
|
300
342
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
301
|
-
optionId: string;
|
|
302
343
|
}[];
|
|
303
|
-
requestId: string;
|
|
304
344
|
title: string;
|
|
305
|
-
|
|
345
|
+
requestId: string;
|
|
306
346
|
toolCallId?: string | undefined;
|
|
347
|
+
detail?: string | undefined;
|
|
307
348
|
}, {
|
|
308
349
|
options: {
|
|
350
|
+
optionId: string;
|
|
309
351
|
name: string;
|
|
310
352
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
311
|
-
optionId: string;
|
|
312
353
|
}[];
|
|
313
|
-
requestId: string;
|
|
314
354
|
title: string;
|
|
315
|
-
|
|
355
|
+
requestId: string;
|
|
316
356
|
toolCallId?: string | undefined;
|
|
357
|
+
detail?: string | undefined;
|
|
317
358
|
}>>;
|
|
318
359
|
/**
|
|
319
360
|
* Live only: messages waiting for the current turn to end, when the host
|
|
@@ -325,86 +366,129 @@ export declare const sessionSummarySchema: z.ZodObject<{
|
|
|
325
366
|
text: z.ZodString;
|
|
326
367
|
images: z.ZodNumber;
|
|
327
368
|
}, "strip", z.ZodTypeAny, {
|
|
328
|
-
text: string;
|
|
329
|
-
clientMessageId: string;
|
|
330
369
|
images: number;
|
|
331
|
-
}, {
|
|
332
|
-
text: string;
|
|
333
370
|
clientMessageId: string;
|
|
371
|
+
text: string;
|
|
372
|
+
}, {
|
|
334
373
|
images: number;
|
|
374
|
+
clientMessageId: string;
|
|
375
|
+
text: string;
|
|
335
376
|
}>, "many">>;
|
|
377
|
+
/**
|
|
378
|
+
* The session works in a git worktree LinkShell made for it: its own
|
|
379
|
+
* checkout and branch, so it can't disturb the project's working directory.
|
|
380
|
+
* `cwd` is inside the worktree; `source` is the directory it was made from
|
|
381
|
+
* (the project the session belongs to).
|
|
382
|
+
*/
|
|
383
|
+
worktree: z.ZodOptional<z.ZodObject<{
|
|
384
|
+
branch: z.ZodString;
|
|
385
|
+
source: z.ZodString;
|
|
386
|
+
}, "strip", z.ZodTypeAny, {
|
|
387
|
+
branch: string;
|
|
388
|
+
source: string;
|
|
389
|
+
}, {
|
|
390
|
+
branch: string;
|
|
391
|
+
source: string;
|
|
392
|
+
}>>;
|
|
393
|
+
/** Live only, for sessions that started sub-agents: how many, and how many are working now (`sessions.subagents` lists them). */
|
|
394
|
+
subagents: z.ZodOptional<z.ZodObject<{
|
|
395
|
+
total: z.ZodNumber;
|
|
396
|
+
running: z.ZodNumber;
|
|
397
|
+
}, "strip", z.ZodTypeAny, {
|
|
398
|
+
running: number;
|
|
399
|
+
total: number;
|
|
400
|
+
}, {
|
|
401
|
+
running: number;
|
|
402
|
+
total: number;
|
|
403
|
+
}>>;
|
|
336
404
|
}, "strip", z.ZodTypeAny, {
|
|
405
|
+
state: "idle" | "running" | "waiting" | "error" | "offline";
|
|
337
406
|
id: string;
|
|
407
|
+
agent: string;
|
|
408
|
+
nativeId: string;
|
|
338
409
|
cwd: string;
|
|
339
|
-
createdAt: number;
|
|
340
410
|
pendingPermissions: number;
|
|
411
|
+
createdAt: number;
|
|
341
412
|
updatedAt: number;
|
|
342
|
-
archived: boolean;
|
|
343
|
-
state: "idle" | "error" | "running" | "waiting" | "offline";
|
|
344
|
-
agent: string;
|
|
345
|
-
nativeId: string;
|
|
346
413
|
lastSeq: number;
|
|
414
|
+
archived: boolean;
|
|
347
415
|
title?: string | undefined;
|
|
416
|
+
preview?: string | undefined;
|
|
417
|
+
driver?: "remote" | "desktop" | "none" | undefined;
|
|
348
418
|
model?: string | undefined;
|
|
419
|
+
activity?: {
|
|
420
|
+
kind: "thinking" | "responding" | "tool";
|
|
421
|
+
title?: string | undefined;
|
|
422
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
423
|
+
} | undefined;
|
|
349
424
|
permission?: {
|
|
350
425
|
options: {
|
|
426
|
+
optionId: string;
|
|
351
427
|
name: string;
|
|
352
428
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
353
|
-
optionId: string;
|
|
354
429
|
}[];
|
|
355
|
-
requestId: string;
|
|
356
430
|
title: string;
|
|
357
|
-
|
|
431
|
+
requestId: string;
|
|
358
432
|
toolCallId?: string | undefined;
|
|
359
|
-
|
|
360
|
-
preview?: string | undefined;
|
|
361
|
-
driver?: "none" | "remote" | "desktop" | undefined;
|
|
362
|
-
activity?: {
|
|
363
|
-
kind: "thinking" | "tool" | "responding";
|
|
364
|
-
title?: string | undefined;
|
|
365
|
-
toolKind?: "other" | "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | undefined;
|
|
433
|
+
detail?: string | undefined;
|
|
366
434
|
} | undefined;
|
|
367
435
|
queue?: {
|
|
368
|
-
text: string;
|
|
369
|
-
clientMessageId: string;
|
|
370
436
|
images: number;
|
|
437
|
+
clientMessageId: string;
|
|
438
|
+
text: string;
|
|
371
439
|
}[] | undefined;
|
|
440
|
+
worktree?: {
|
|
441
|
+
branch: string;
|
|
442
|
+
source: string;
|
|
443
|
+
} | undefined;
|
|
444
|
+
subagents?: {
|
|
445
|
+
running: number;
|
|
446
|
+
total: number;
|
|
447
|
+
} | undefined;
|
|
372
448
|
}, {
|
|
449
|
+
state: "idle" | "running" | "waiting" | "error" | "offline";
|
|
373
450
|
id: string;
|
|
451
|
+
agent: string;
|
|
452
|
+
nativeId: string;
|
|
374
453
|
cwd: string;
|
|
375
|
-
createdAt: number;
|
|
376
454
|
pendingPermissions: number;
|
|
455
|
+
createdAt: number;
|
|
377
456
|
updatedAt: number;
|
|
378
|
-
archived: boolean;
|
|
379
|
-
state: "idle" | "error" | "running" | "waiting" | "offline";
|
|
380
|
-
agent: string;
|
|
381
|
-
nativeId: string;
|
|
382
457
|
lastSeq: number;
|
|
458
|
+
archived: boolean;
|
|
383
459
|
title?: string | undefined;
|
|
460
|
+
preview?: string | undefined;
|
|
461
|
+
driver?: "remote" | "desktop" | "none" | undefined;
|
|
384
462
|
model?: string | undefined;
|
|
463
|
+
activity?: {
|
|
464
|
+
kind: "thinking" | "responding" | "tool";
|
|
465
|
+
title?: string | undefined;
|
|
466
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
467
|
+
} | undefined;
|
|
385
468
|
permission?: {
|
|
386
469
|
options: {
|
|
470
|
+
optionId: string;
|
|
387
471
|
name: string;
|
|
388
472
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
389
|
-
optionId: string;
|
|
390
473
|
}[];
|
|
391
|
-
requestId: string;
|
|
392
474
|
title: string;
|
|
393
|
-
|
|
475
|
+
requestId: string;
|
|
394
476
|
toolCallId?: string | undefined;
|
|
395
|
-
|
|
396
|
-
preview?: string | undefined;
|
|
397
|
-
driver?: "none" | "remote" | "desktop" | undefined;
|
|
398
|
-
activity?: {
|
|
399
|
-
kind: "thinking" | "tool" | "responding";
|
|
400
|
-
title?: string | undefined;
|
|
401
|
-
toolKind?: "other" | "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | undefined;
|
|
477
|
+
detail?: string | undefined;
|
|
402
478
|
} | undefined;
|
|
403
479
|
queue?: {
|
|
404
|
-
text: string;
|
|
405
|
-
clientMessageId: string;
|
|
406
480
|
images: number;
|
|
481
|
+
clientMessageId: string;
|
|
482
|
+
text: string;
|
|
407
483
|
}[] | undefined;
|
|
484
|
+
worktree?: {
|
|
485
|
+
branch: string;
|
|
486
|
+
source: string;
|
|
487
|
+
} | undefined;
|
|
488
|
+
subagents?: {
|
|
489
|
+
running: number;
|
|
490
|
+
total: number;
|
|
491
|
+
} | undefined;
|
|
408
492
|
}>;
|
|
409
493
|
export type SessionSummary = z.infer<typeof sessionSummarySchema>;
|
|
410
494
|
export declare function sessionIdFor(agent: string, nativeId: string): string;
|
|
@@ -412,21 +496,79 @@ export declare function parseSessionId(id: string): {
|
|
|
412
496
|
agent: string;
|
|
413
497
|
nativeId: string;
|
|
414
498
|
} | null;
|
|
499
|
+
/** What git says about a directory, to offer starting a session in a worktree of it. */
|
|
500
|
+
export declare const gitInfoSchema: z.ZodObject<{
|
|
501
|
+
/** The repository's top directory. */
|
|
502
|
+
root: z.ZodString;
|
|
503
|
+
/** The branch checked out; absent on a detached HEAD. */
|
|
504
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
505
|
+
/** The commit checked out, abbreviated; absent before the first commit. */
|
|
506
|
+
head: z.ZodOptional<z.ZodString>;
|
|
507
|
+
/** Uncommitted changes in the working directory (a new worktree starts from the last commit, without them). */
|
|
508
|
+
dirty: z.ZodBoolean;
|
|
509
|
+
}, "strip", z.ZodTypeAny, {
|
|
510
|
+
dirty: boolean;
|
|
511
|
+
root: string;
|
|
512
|
+
branch?: string | undefined;
|
|
513
|
+
head?: string | undefined;
|
|
514
|
+
}, {
|
|
515
|
+
dirty: boolean;
|
|
516
|
+
root: string;
|
|
517
|
+
branch?: string | undefined;
|
|
518
|
+
head?: string | undefined;
|
|
519
|
+
}>;
|
|
520
|
+
export type GitInfo = z.infer<typeof gitInfoSchema>;
|
|
521
|
+
/** A worktree LinkShell made for sessions. */
|
|
522
|
+
export declare const worktreeEntrySchema: z.ZodObject<{
|
|
523
|
+
/** The worktree's top directory. */
|
|
524
|
+
path: z.ZodString;
|
|
525
|
+
branch: z.ZodString;
|
|
526
|
+
/** The repository it belongs to. */
|
|
527
|
+
source: z.ZodString;
|
|
528
|
+
createdAt: z.ZodNumber;
|
|
529
|
+
/** Sessions working in it. */
|
|
530
|
+
sessions: z.ZodArray<z.ZodString, "many">;
|
|
531
|
+
/** Uncommitted changes in it. */
|
|
532
|
+
dirty: z.ZodBoolean;
|
|
533
|
+
/** Commits made in it since it was created. */
|
|
534
|
+
ahead: z.ZodNumber;
|
|
535
|
+
}, "strip", z.ZodTypeAny, {
|
|
536
|
+
dirty: boolean;
|
|
537
|
+
path: string;
|
|
538
|
+
createdAt: number;
|
|
539
|
+
branch: string;
|
|
540
|
+
source: string;
|
|
541
|
+
sessions: string[];
|
|
542
|
+
ahead: number;
|
|
543
|
+
}, {
|
|
544
|
+
dirty: boolean;
|
|
545
|
+
path: string;
|
|
546
|
+
createdAt: number;
|
|
547
|
+
branch: string;
|
|
548
|
+
source: string;
|
|
549
|
+
sessions: string[];
|
|
550
|
+
ahead: number;
|
|
551
|
+
}>;
|
|
552
|
+
export type WorktreeEntry = z.infer<typeof worktreeEntrySchema>;
|
|
415
553
|
export declare const projectSummarySchema: z.ZodObject<{
|
|
416
554
|
cwd: z.ZodString;
|
|
417
555
|
name: z.ZodString;
|
|
418
556
|
lastActiveAt: z.ZodNumber;
|
|
419
557
|
sessionCount: z.ZodNumber;
|
|
558
|
+
/** For a git repository: the branch checked out there now (or the abbreviated commit, on a detached HEAD). */
|
|
559
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
420
560
|
}, "strip", z.ZodTypeAny, {
|
|
421
|
-
cwd: string;
|
|
422
561
|
name: string;
|
|
562
|
+
cwd: string;
|
|
423
563
|
lastActiveAt: number;
|
|
424
564
|
sessionCount: number;
|
|
565
|
+
branch?: string | undefined;
|
|
425
566
|
}, {
|
|
426
|
-
cwd: string;
|
|
427
567
|
name: string;
|
|
568
|
+
cwd: string;
|
|
428
569
|
lastActiveAt: number;
|
|
429
570
|
sessionCount: number;
|
|
571
|
+
branch?: string | undefined;
|
|
430
572
|
}>;
|
|
431
573
|
export type ProjectSummary = z.infer<typeof projectSummarySchema>;
|
|
432
574
|
export declare const machineInfoSchema: z.ZodObject<{
|
|
@@ -465,40 +607,46 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
465
607
|
steer: z.ZodBoolean;
|
|
466
608
|
permissions: z.ZodBoolean;
|
|
467
609
|
images: z.ZodBoolean;
|
|
610
|
+
/**
|
|
611
|
+
* The agent forks sessions itself, keeping everything it knew. Every agent's
|
|
612
|
+
* sessions can be forked: without this (or from a single reply, where the
|
|
613
|
+
* agent only forks whole sessions) LinkShell makes the fork — the new session
|
|
614
|
+
* shows the conversation and its agent is told it as text.
|
|
615
|
+
*/
|
|
468
616
|
fork: z.ZodBoolean;
|
|
469
617
|
models: z.ZodBoolean;
|
|
470
618
|
modes: z.ZodBoolean;
|
|
471
619
|
}, "strip", z.ZodTypeAny, {
|
|
472
|
-
models: boolean;
|
|
473
|
-
modes: boolean;
|
|
474
|
-
steer: boolean;
|
|
475
620
|
interrupt: boolean;
|
|
621
|
+
steer: boolean;
|
|
476
622
|
permissions: boolean;
|
|
477
623
|
images: boolean;
|
|
478
624
|
fork: boolean;
|
|
479
|
-
}, {
|
|
480
625
|
models: boolean;
|
|
481
626
|
modes: boolean;
|
|
482
|
-
|
|
627
|
+
}, {
|
|
483
628
|
interrupt: boolean;
|
|
629
|
+
steer: boolean;
|
|
484
630
|
permissions: boolean;
|
|
485
631
|
images: boolean;
|
|
486
632
|
fork: boolean;
|
|
633
|
+
models: boolean;
|
|
634
|
+
modes: boolean;
|
|
487
635
|
}>;
|
|
488
636
|
}, "strip", z.ZodTypeAny, {
|
|
489
637
|
id: string;
|
|
490
638
|
label: string;
|
|
639
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
640
|
+
installed: boolean;
|
|
491
641
|
capabilities: {
|
|
492
|
-
models: boolean;
|
|
493
|
-
modes: boolean;
|
|
494
|
-
steer: boolean;
|
|
495
642
|
interrupt: boolean;
|
|
643
|
+
steer: boolean;
|
|
496
644
|
permissions: boolean;
|
|
497
645
|
images: boolean;
|
|
498
646
|
fork: boolean;
|
|
647
|
+
models: boolean;
|
|
648
|
+
modes: boolean;
|
|
499
649
|
};
|
|
500
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
501
|
-
installed: boolean;
|
|
502
650
|
version?: string | undefined;
|
|
503
651
|
problem?: string | undefined;
|
|
504
652
|
auth?: {
|
|
@@ -509,17 +657,17 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
509
657
|
}, {
|
|
510
658
|
id: string;
|
|
511
659
|
label: string;
|
|
660
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
661
|
+
installed: boolean;
|
|
512
662
|
capabilities: {
|
|
513
|
-
models: boolean;
|
|
514
|
-
modes: boolean;
|
|
515
|
-
steer: boolean;
|
|
516
663
|
interrupt: boolean;
|
|
664
|
+
steer: boolean;
|
|
517
665
|
permissions: boolean;
|
|
518
666
|
images: boolean;
|
|
519
667
|
fork: boolean;
|
|
668
|
+
models: boolean;
|
|
669
|
+
modes: boolean;
|
|
520
670
|
};
|
|
521
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
522
|
-
installed: boolean;
|
|
523
671
|
version?: string | undefined;
|
|
524
672
|
problem?: string | undefined;
|
|
525
673
|
auth?: {
|
|
@@ -536,17 +684,17 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
536
684
|
agents: {
|
|
537
685
|
id: string;
|
|
538
686
|
label: string;
|
|
687
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
688
|
+
installed: boolean;
|
|
539
689
|
capabilities: {
|
|
540
|
-
models: boolean;
|
|
541
|
-
modes: boolean;
|
|
542
|
-
steer: boolean;
|
|
543
690
|
interrupt: boolean;
|
|
691
|
+
steer: boolean;
|
|
544
692
|
permissions: boolean;
|
|
545
693
|
images: boolean;
|
|
546
694
|
fork: boolean;
|
|
695
|
+
models: boolean;
|
|
696
|
+
modes: boolean;
|
|
547
697
|
};
|
|
548
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
549
|
-
installed: boolean;
|
|
550
698
|
version?: string | undefined;
|
|
551
699
|
problem?: string | undefined;
|
|
552
700
|
auth?: {
|
|
@@ -564,17 +712,17 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
564
712
|
agents: {
|
|
565
713
|
id: string;
|
|
566
714
|
label: string;
|
|
715
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
716
|
+
installed: boolean;
|
|
567
717
|
capabilities: {
|
|
568
|
-
models: boolean;
|
|
569
|
-
modes: boolean;
|
|
570
|
-
steer: boolean;
|
|
571
718
|
interrupt: boolean;
|
|
719
|
+
steer: boolean;
|
|
572
720
|
permissions: boolean;
|
|
573
721
|
images: boolean;
|
|
574
722
|
fork: boolean;
|
|
723
|
+
models: boolean;
|
|
724
|
+
modes: boolean;
|
|
575
725
|
};
|
|
576
|
-
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
577
|
-
installed: boolean;
|
|
578
726
|
version?: string | undefined;
|
|
579
727
|
problem?: string | undefined;
|
|
580
728
|
auth?: {
|
|
@@ -602,15 +750,15 @@ export declare const portInfoSchema: z.ZodObject<{
|
|
|
602
750
|
port: number;
|
|
603
751
|
process: string;
|
|
604
752
|
http: boolean;
|
|
605
|
-
cwd?: string | undefined;
|
|
606
753
|
title?: string | undefined;
|
|
754
|
+
cwd?: string | undefined;
|
|
607
755
|
pid?: number | undefined;
|
|
608
756
|
}, {
|
|
609
757
|
port: number;
|
|
610
758
|
process: string;
|
|
611
759
|
http: boolean;
|
|
612
|
-
cwd?: string | undefined;
|
|
613
760
|
title?: string | undefined;
|
|
761
|
+
cwd?: string | undefined;
|
|
614
762
|
pid?: number | undefined;
|
|
615
763
|
}>;
|
|
616
764
|
export type PortInfo = z.infer<typeof portInfoSchema>;
|
|
@@ -633,25 +781,25 @@ export declare const terminalInfoSchema: z.ZodObject<{
|
|
|
633
781
|
interrupted: z.ZodOptional<z.ZodBoolean>;
|
|
634
782
|
}, "strip", z.ZodTypeAny, {
|
|
635
783
|
id: string;
|
|
636
|
-
|
|
637
|
-
rows: number;
|
|
784
|
+
title: string;
|
|
638
785
|
cwd: string;
|
|
639
786
|
createdAt: number;
|
|
640
|
-
|
|
787
|
+
cols: number;
|
|
788
|
+
rows: number;
|
|
641
789
|
activeAt: number;
|
|
642
|
-
exitCode?: number | null | undefined;
|
|
643
790
|
command?: string | undefined;
|
|
791
|
+
exitCode?: number | null | undefined;
|
|
644
792
|
interrupted?: boolean | undefined;
|
|
645
793
|
}, {
|
|
646
794
|
id: string;
|
|
647
|
-
|
|
648
|
-
rows: number;
|
|
795
|
+
title: string;
|
|
649
796
|
cwd: string;
|
|
650
797
|
createdAt: number;
|
|
651
|
-
|
|
798
|
+
cols: number;
|
|
799
|
+
rows: number;
|
|
652
800
|
activeAt: number;
|
|
653
|
-
exitCode?: number | null | undefined;
|
|
654
801
|
command?: string | undefined;
|
|
802
|
+
exitCode?: number | null | undefined;
|
|
655
803
|
interrupted?: boolean | undefined;
|
|
656
804
|
}>;
|
|
657
805
|
export type TerminalInfo = z.infer<typeof terminalInfoSchema>;
|
|
@@ -706,7 +854,7 @@ export declare const gatewayStatusSchema: z.ZodObject<{
|
|
|
706
854
|
pairedAt: number;
|
|
707
855
|
}>, "many">;
|
|
708
856
|
}, "strip", z.ZodTypeAny, {
|
|
709
|
-
status: "
|
|
857
|
+
status: "offline" | "off" | "connecting" | "online";
|
|
710
858
|
devices: {
|
|
711
859
|
id: string;
|
|
712
860
|
name: string;
|
|
@@ -727,7 +875,7 @@ export declare const gatewayStatusSchema: z.ZodObject<{
|
|
|
727
875
|
email?: string | undefined;
|
|
728
876
|
} | undefined;
|
|
729
877
|
}, {
|
|
730
|
-
status: "
|
|
878
|
+
status: "offline" | "off" | "connecting" | "online";
|
|
731
879
|
devices: {
|
|
732
880
|
id: string;
|
|
733
881
|
name: string;
|