linkshell-cli 0.6.2 → 0.6.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/README.md +47 -132
- package/dist/cli/src/auth.js +1 -1
- package/dist/cli/src/auth.js.map +1 -1
- package/dist/cli/src/commands/doctor.d.ts +1 -1
- package/dist/cli/src/commands/doctor.js +76 -36
- package/dist/cli/src/commands/doctor.js.map +1 -1
- package/dist/cli/src/commands/host.d.ts +14 -0
- package/dist/cli/src/commands/host.js +94 -15
- package/dist/cli/src/commands/host.js.map +1 -1
- package/dist/cli/src/commands/logout.d.ts +1 -1
- package/dist/cli/src/commands/logout.js +10 -2
- package/dist/cli/src/commands/logout.js.map +1 -1
- package/dist/cli/src/commands/upgrade.js +11 -0
- package/dist/cli/src/commands/upgrade.js.map +1 -1
- package/dist/cli/src/config.js +1 -1
- package/dist/cli/src/config.js.map +1 -1
- package/dist/cli/src/index.js +94 -114
- package/dist/cli/src/index.js.map +1 -1
- package/dist/cli/tsconfig.tsbuildinfo +1 -1
- package/dist/host/src/carry.d.ts +15 -0
- package/dist/host/src/carry.js +83 -0
- package/dist/host/src/carry.js.map +1 -0
- package/dist/host/src/drivers/acp/driver.d.ts +13 -3
- package/dist/host/src/drivers/acp/driver.js +43 -8
- package/dist/host/src/drivers/acp/driver.js.map +1 -1
- package/dist/host/src/drivers/acp/mapper.d.ts +5 -1
- package/dist/host/src/drivers/acp/mapper.js +53 -5
- package/dist/host/src/drivers/acp/mapper.js.map +1 -1
- package/dist/host/src/drivers/claude/driver.d.ts +53 -8
- package/dist/host/src/drivers/claude/driver.js +357 -40
- package/dist/host/src/drivers/claude/driver.js.map +1 -1
- package/dist/host/src/drivers/claude/holders.d.ts +9 -0
- package/dist/host/src/drivers/claude/holders.js +61 -0
- package/dist/host/src/drivers/claude/holders.js.map +1 -0
- package/dist/host/src/drivers/claude/transcript.d.ts +100 -62
- package/dist/host/src/drivers/claude/transcript.js +246 -26
- package/dist/host/src/drivers/claude/transcript.js.map +1 -1
- package/dist/host/src/drivers/codex/commands.d.ts +27 -0
- package/dist/host/src/drivers/codex/commands.js +23 -0
- package/dist/host/src/drivers/codex/commands.js.map +1 -0
- package/dist/host/src/drivers/codex/driver.d.ts +15 -1
- package/dist/host/src/drivers/codex/driver.js +110 -1
- package/dist/host/src/drivers/codex/driver.js.map +1 -1
- package/dist/host/src/drivers/codex/mapper.d.ts +4 -0
- package/dist/host/src/drivers/codex/mapper.js +29 -5
- package/dist/host/src/drivers/codex/mapper.js.map +1 -1
- package/dist/host/src/drivers/types.d.ts +34 -3
- package/dist/host/src/fs.d.ts +26 -4
- package/dist/host/src/fs.js +71 -17
- package/dist/host/src/fs.js.map +1 -1
- package/dist/host/src/gateway.d.ts +3 -0
- package/dist/host/src/gateway.js +9 -0
- package/dist/host/src/gateway.js.map +1 -1
- package/dist/host/src/host.d.ts +7 -3
- package/dist/host/src/host.js +42 -18
- package/dist/host/src/host.js.map +1 -1
- package/dist/host/src/hub.d.ts +91 -15
- package/dist/host/src/hub.js +556 -33
- package/dist/host/src/hub.js.map +1 -1
- package/dist/host/src/rpc/server.d.ts +4 -2
- package/dist/host/src/rpc/server.js +51 -6
- package/dist/host/src/rpc/server.js.map +1 -1
- package/dist/host/src/screen.d.ts +11 -0
- package/dist/host/src/screen.js +54 -2
- package/dist/host/src/screen.js.map +1 -1
- package/dist/host/src/slim.d.ts +17 -0
- package/dist/host/src/slim.js +66 -0
- package/dist/host/src/slim.js.map +1 -0
- package/dist/host/src/store.d.ts +75 -3
- package/dist/host/src/store.js +216 -16
- package/dist/host/src/store.js.map +1 -1
- package/dist/host/src/terminals.d.ts +4 -4
- package/dist/host/src/worktrees.d.ts +36 -0
- package/dist/host/src/worktrees.js +96 -0
- package/dist/host/src/worktrees.js.map +1 -0
- package/dist/wire/src/model.d.ts +301 -153
- 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 +6740 -1022
- package/dist/wire/src/rpc.js +130 -7
- package/dist/wire/src/rpc.js.map +1 -1
- package/dist/wire/src/updates.d.ts +498 -498
- package/package.json +5 -5
- package/src/auth.ts +1 -1
- package/src/commands/doctor.ts +76 -34
- package/src/commands/host.ts +98 -14
- package/src/commands/logout.ts +10 -2
- package/src/commands/upgrade.ts +11 -0
- package/src/config.ts +1 -1
- package/src/index.ts +93 -131
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
|
-
|
|
25
|
-
modes: boolean;
|
|
30
|
+
interrupt: boolean;
|
|
26
31
|
steer: boolean;
|
|
32
|
+
permissions: boolean;
|
|
27
33
|
images: boolean;
|
|
28
34
|
fork: boolean;
|
|
29
|
-
permissions: boolean;
|
|
30
|
-
interrupt: boolean;
|
|
31
|
-
}, {
|
|
32
35
|
models: boolean;
|
|
33
36
|
modes: boolean;
|
|
37
|
+
}, {
|
|
38
|
+
interrupt: boolean;
|
|
34
39
|
steer: boolean;
|
|
40
|
+
permissions: boolean;
|
|
35
41
|
images: boolean;
|
|
36
42
|
fork: boolean;
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
models: boolean;
|
|
44
|
+
modes: boolean;
|
|
39
45
|
}>;
|
|
40
46
|
export type AgentCapabilities = z.infer<typeof agentCapabilitiesSchema>;
|
|
41
47
|
/**
|
|
@@ -88,68 +94,74 @@ 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
|
-
|
|
96
|
-
modes: boolean;
|
|
107
|
+
interrupt: boolean;
|
|
97
108
|
steer: boolean;
|
|
109
|
+
permissions: boolean;
|
|
98
110
|
images: boolean;
|
|
99
111
|
fork: boolean;
|
|
100
|
-
permissions: boolean;
|
|
101
|
-
interrupt: boolean;
|
|
102
|
-
}, {
|
|
103
112
|
models: boolean;
|
|
104
113
|
modes: boolean;
|
|
114
|
+
}, {
|
|
115
|
+
interrupt: boolean;
|
|
105
116
|
steer: boolean;
|
|
117
|
+
permissions: boolean;
|
|
106
118
|
images: boolean;
|
|
107
119
|
fork: boolean;
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
116
|
-
modes: boolean;
|
|
129
|
+
interrupt: boolean;
|
|
117
130
|
steer: boolean;
|
|
131
|
+
permissions: boolean;
|
|
118
132
|
images: boolean;
|
|
119
133
|
fork: boolean;
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
models: boolean;
|
|
135
|
+
modes: boolean;
|
|
122
136
|
};
|
|
123
|
-
|
|
124
|
-
|
|
137
|
+
version?: string | undefined;
|
|
138
|
+
problem?: string | undefined;
|
|
125
139
|
auth?: {
|
|
126
140
|
state: "unknown" | "ok" | "missing";
|
|
127
141
|
method?: string | undefined;
|
|
128
142
|
hint?: string | undefined;
|
|
129
143
|
} | undefined;
|
|
130
|
-
version?: string | undefined;
|
|
131
|
-
problem?: string | undefined;
|
|
132
144
|
}, {
|
|
133
145
|
id: string;
|
|
134
146
|
label: string;
|
|
147
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
148
|
+
installed: boolean;
|
|
135
149
|
capabilities: {
|
|
136
|
-
|
|
137
|
-
modes: boolean;
|
|
150
|
+
interrupt: boolean;
|
|
138
151
|
steer: boolean;
|
|
152
|
+
permissions: boolean;
|
|
139
153
|
images: boolean;
|
|
140
154
|
fork: boolean;
|
|
141
|
-
|
|
142
|
-
|
|
155
|
+
models: boolean;
|
|
156
|
+
modes: boolean;
|
|
143
157
|
};
|
|
144
|
-
|
|
145
|
-
|
|
158
|
+
version?: string | undefined;
|
|
159
|
+
problem?: string | undefined;
|
|
146
160
|
auth?: {
|
|
147
161
|
state: "unknown" | "ok" | "missing";
|
|
148
162
|
method?: string | undefined;
|
|
149
163
|
hint?: string | undefined;
|
|
150
164
|
} | undefined;
|
|
151
|
-
version?: string | undefined;
|
|
152
|
-
problem?: string | undefined;
|
|
153
165
|
}>;
|
|
154
166
|
export type AgentInfo = z.infer<typeof agentInfoSchema>;
|
|
155
167
|
/**
|
|
@@ -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" | "desktop" | "remote" | undefined;
|
|
362
|
-
activity?: {
|
|
363
|
-
kind: "thinking" | "tool" | "responding";
|
|
364
|
-
title?: string | undefined;
|
|
365
|
-
toolKind?: "search" | "other" | "read" | "edit" | "delete" | "move" | "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" | "desktop" | "remote" | undefined;
|
|
398
|
-
activity?: {
|
|
399
|
-
kind: "thinking" | "tool" | "responding";
|
|
400
|
-
title?: string | undefined;
|
|
401
|
-
toolKind?: "search" | "other" | "read" | "edit" | "delete" | "move" | "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,124 +607,130 @@ 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
|
-
|
|
473
|
-
modes: boolean;
|
|
620
|
+
interrupt: boolean;
|
|
474
621
|
steer: boolean;
|
|
622
|
+
permissions: boolean;
|
|
475
623
|
images: boolean;
|
|
476
624
|
fork: boolean;
|
|
477
|
-
permissions: boolean;
|
|
478
|
-
interrupt: boolean;
|
|
479
|
-
}, {
|
|
480
625
|
models: boolean;
|
|
481
626
|
modes: boolean;
|
|
627
|
+
}, {
|
|
628
|
+
interrupt: boolean;
|
|
482
629
|
steer: boolean;
|
|
630
|
+
permissions: boolean;
|
|
483
631
|
images: boolean;
|
|
484
632
|
fork: boolean;
|
|
485
|
-
|
|
486
|
-
|
|
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
|
-
|
|
493
|
-
modes: boolean;
|
|
642
|
+
interrupt: boolean;
|
|
494
643
|
steer: boolean;
|
|
644
|
+
permissions: boolean;
|
|
495
645
|
images: boolean;
|
|
496
646
|
fork: boolean;
|
|
497
|
-
|
|
498
|
-
|
|
647
|
+
models: boolean;
|
|
648
|
+
modes: boolean;
|
|
499
649
|
};
|
|
500
|
-
|
|
501
|
-
|
|
650
|
+
version?: string | undefined;
|
|
651
|
+
problem?: string | undefined;
|
|
502
652
|
auth?: {
|
|
503
653
|
state: "unknown" | "ok" | "missing";
|
|
504
654
|
method?: string | undefined;
|
|
505
655
|
hint?: string | undefined;
|
|
506
656
|
} | undefined;
|
|
507
|
-
version?: string | undefined;
|
|
508
|
-
problem?: string | undefined;
|
|
509
657
|
}, {
|
|
510
658
|
id: string;
|
|
511
659
|
label: string;
|
|
660
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
661
|
+
installed: boolean;
|
|
512
662
|
capabilities: {
|
|
513
|
-
|
|
514
|
-
modes: boolean;
|
|
663
|
+
interrupt: boolean;
|
|
515
664
|
steer: boolean;
|
|
665
|
+
permissions: boolean;
|
|
516
666
|
images: boolean;
|
|
517
667
|
fork: boolean;
|
|
518
|
-
|
|
519
|
-
|
|
668
|
+
models: boolean;
|
|
669
|
+
modes: boolean;
|
|
520
670
|
};
|
|
521
|
-
|
|
522
|
-
|
|
671
|
+
version?: string | undefined;
|
|
672
|
+
problem?: string | undefined;
|
|
523
673
|
auth?: {
|
|
524
674
|
state: "unknown" | "ok" | "missing";
|
|
525
675
|
method?: string | undefined;
|
|
526
676
|
hint?: string | undefined;
|
|
527
677
|
} | undefined;
|
|
528
|
-
version?: string | undefined;
|
|
529
|
-
problem?: string | undefined;
|
|
530
678
|
}>, "many">;
|
|
531
679
|
}, "strip", z.ZodTypeAny, {
|
|
532
680
|
machineId: string;
|
|
533
681
|
hostname: string;
|
|
534
682
|
platform: string;
|
|
683
|
+
hostVersion: string;
|
|
535
684
|
agents: {
|
|
536
685
|
id: string;
|
|
537
686
|
label: string;
|
|
687
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
688
|
+
installed: boolean;
|
|
538
689
|
capabilities: {
|
|
539
|
-
|
|
540
|
-
modes: boolean;
|
|
690
|
+
interrupt: boolean;
|
|
541
691
|
steer: boolean;
|
|
692
|
+
permissions: boolean;
|
|
542
693
|
images: boolean;
|
|
543
694
|
fork: boolean;
|
|
544
|
-
|
|
545
|
-
|
|
695
|
+
models: boolean;
|
|
696
|
+
modes: boolean;
|
|
546
697
|
};
|
|
547
|
-
|
|
548
|
-
|
|
698
|
+
version?: string | undefined;
|
|
699
|
+
problem?: string | undefined;
|
|
549
700
|
auth?: {
|
|
550
701
|
state: "unknown" | "ok" | "missing";
|
|
551
702
|
method?: string | undefined;
|
|
552
703
|
hint?: string | undefined;
|
|
553
704
|
} | undefined;
|
|
554
|
-
version?: string | undefined;
|
|
555
|
-
problem?: string | undefined;
|
|
556
705
|
}[];
|
|
557
|
-
hostVersion: string;
|
|
558
706
|
home?: string | undefined;
|
|
559
707
|
}, {
|
|
560
708
|
machineId: string;
|
|
561
709
|
hostname: string;
|
|
562
710
|
platform: string;
|
|
711
|
+
hostVersion: string;
|
|
563
712
|
agents: {
|
|
564
713
|
id: string;
|
|
565
714
|
label: string;
|
|
715
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
716
|
+
installed: boolean;
|
|
566
717
|
capabilities: {
|
|
567
|
-
|
|
568
|
-
modes: boolean;
|
|
718
|
+
interrupt: boolean;
|
|
569
719
|
steer: boolean;
|
|
720
|
+
permissions: boolean;
|
|
570
721
|
images: boolean;
|
|
571
722
|
fork: boolean;
|
|
572
|
-
|
|
573
|
-
|
|
723
|
+
models: boolean;
|
|
724
|
+
modes: boolean;
|
|
574
725
|
};
|
|
575
|
-
|
|
576
|
-
|
|
726
|
+
version?: string | undefined;
|
|
727
|
+
problem?: string | undefined;
|
|
577
728
|
auth?: {
|
|
578
729
|
state: "unknown" | "ok" | "missing";
|
|
579
730
|
method?: string | undefined;
|
|
580
731
|
hint?: string | undefined;
|
|
581
732
|
} | undefined;
|
|
582
|
-
version?: string | undefined;
|
|
583
|
-
problem?: string | undefined;
|
|
584
733
|
}[];
|
|
585
|
-
hostVersion: string;
|
|
586
734
|
home?: string | undefined;
|
|
587
735
|
}>;
|
|
588
736
|
export type MachineInfo = z.infer<typeof machineInfoSchema>;
|
|
@@ -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;
|