linkshell-cli 0.6.1 → 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 +15 -0
- package/dist/cli/src/commands/host.js +101 -20
- 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 +105 -120
- package/dist/cli/src/index.js.map +1 -1
- package/dist/cli/src/utils/daemon.d.ts +2 -0
- package/dist/cli/src/utils/daemon.js +4 -0
- package/dist/cli/src/utils/daemon.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 +21 -3
- package/dist/host/src/drivers/acp/driver.js +99 -13
- 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 +58 -6
- package/dist/host/src/drivers/acp/mapper.js.map +1 -1
- package/dist/host/src/drivers/claude/driver.d.ts +76 -8
- package/dist/host/src/drivers/claude/driver.js +510 -29
- 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 +105 -61
- package/dist/host/src/drivers/claude/transcript.js +260 -22
- 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 +21 -1
- package/dist/host/src/drivers/codex/driver.js +140 -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 +45 -4
- 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 +10 -1
- package/dist/host/src/gateway.js.map +1 -1
- package/dist/host/src/host.d.ts +7 -3
- package/dist/host/src/host.js +53 -21
- package/dist/host/src/host.js.map +1 -1
- package/dist/host/src/hub.d.ts +98 -14
- package/dist/host/src/hub.js +639 -27
- package/dist/host/src/hub.js.map +1 -1
- package/dist/host/src/index.d.ts +1 -1
- package/dist/host/src/index.js +1 -1
- package/dist/host/src/index.js.map +1 -1
- package/dist/host/src/legacy.d.ts +7 -0
- package/dist/host/src/legacy.js +36 -0
- package/dist/host/src/legacy.js.map +1 -0
- package/dist/host/src/rpc/server.d.ts +4 -2
- package/dist/host/src/rpc/server.js +62 -5
- 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/shell-env.d.ts +6 -0
- package/dist/host/src/shell-env.js +48 -0
- package/dist/host/src/shell-env.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 +81 -3
- package/dist/host/src/store.js +249 -16
- package/dist/host/src/store.js.map +1 -1
- package/dist/host/src/terminals.d.ts +4 -4
- package/dist/host/src/terminals.js +19 -4
- package/dist/host/src/terminals.js.map +1 -1
- 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 +334 -139
- package/dist/wire/src/model.js +68 -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 +7273 -890
- package/dist/wire/src/rpc.js +154 -6
- 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 +109 -19
- package/src/commands/logout.ts +10 -2
- package/src/commands/upgrade.ts +11 -0
- package/src/config.ts +1 -1
- package/src/index.ts +104 -137
- package/src/utils/daemon.ts +5 -0
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,36 +214,80 @@ 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>;
|
|
247
|
+
export declare const queuedMessageSchema: z.ZodObject<{
|
|
248
|
+
clientMessageId: z.ZodString;
|
|
249
|
+
/** The message's text (images are counted, not sent). */
|
|
250
|
+
text: z.ZodString;
|
|
251
|
+
images: z.ZodNumber;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
images: number;
|
|
254
|
+
clientMessageId: string;
|
|
255
|
+
text: string;
|
|
256
|
+
}, {
|
|
257
|
+
images: number;
|
|
258
|
+
clientMessageId: string;
|
|
259
|
+
text: string;
|
|
260
|
+
}>;
|
|
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>;
|
|
235
291
|
export declare const sessionSummarySchema: z.ZodObject<{
|
|
236
292
|
/** `${agent}:${nativeId}` — stable across daemon restarts and rediscovery. */
|
|
237
293
|
id: z.ZodString;
|
|
@@ -253,13 +309,13 @@ export declare const sessionSummarySchema: z.ZodObject<{
|
|
|
253
309
|
title: z.ZodOptional<z.ZodString>;
|
|
254
310
|
toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
|
|
255
311
|
}, "strip", z.ZodTypeAny, {
|
|
256
|
-
kind: "thinking" | "
|
|
312
|
+
kind: "thinking" | "responding" | "tool";
|
|
257
313
|
title?: string | undefined;
|
|
258
|
-
toolKind?: "
|
|
314
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
259
315
|
}, {
|
|
260
|
-
kind: "thinking" | "
|
|
316
|
+
kind: "thinking" | "responding" | "tool";
|
|
261
317
|
title?: string | undefined;
|
|
262
|
-
toolKind?: "
|
|
318
|
+
toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
|
|
263
319
|
}>>;
|
|
264
320
|
permission: z.ZodOptional<z.ZodObject<{
|
|
265
321
|
requestId: z.ZodString;
|
|
@@ -271,96 +327,167 @@ export declare const sessionSummarySchema: z.ZodObject<{
|
|
|
271
327
|
name: z.ZodString;
|
|
272
328
|
kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
|
|
273
329
|
}, "strip", z.ZodTypeAny, {
|
|
330
|
+
optionId: string;
|
|
274
331
|
name: string;
|
|
275
332
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
276
|
-
optionId: string;
|
|
277
333
|
}, {
|
|
334
|
+
optionId: string;
|
|
278
335
|
name: string;
|
|
279
336
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
280
|
-
optionId: string;
|
|
281
337
|
}>, "many">;
|
|
282
338
|
}, "strip", z.ZodTypeAny, {
|
|
283
339
|
options: {
|
|
340
|
+
optionId: string;
|
|
284
341
|
name: string;
|
|
285
342
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
286
|
-
optionId: string;
|
|
287
343
|
}[];
|
|
288
|
-
requestId: string;
|
|
289
344
|
title: string;
|
|
290
|
-
|
|
345
|
+
requestId: string;
|
|
291
346
|
toolCallId?: string | undefined;
|
|
347
|
+
detail?: string | undefined;
|
|
292
348
|
}, {
|
|
293
349
|
options: {
|
|
350
|
+
optionId: string;
|
|
294
351
|
name: string;
|
|
295
352
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
296
|
-
optionId: string;
|
|
297
353
|
}[];
|
|
298
|
-
requestId: string;
|
|
299
354
|
title: string;
|
|
300
|
-
|
|
355
|
+
requestId: string;
|
|
301
356
|
toolCallId?: string | undefined;
|
|
357
|
+
detail?: string | undefined;
|
|
358
|
+
}>>;
|
|
359
|
+
/**
|
|
360
|
+
* Live only: messages waiting for the current turn to end, when the host
|
|
361
|
+
* holds them (agents that can't take input mid-turn). Oldest first.
|
|
362
|
+
*/
|
|
363
|
+
queue: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
364
|
+
clientMessageId: z.ZodString;
|
|
365
|
+
/** The message's text (images are counted, not sent). */
|
|
366
|
+
text: z.ZodString;
|
|
367
|
+
images: z.ZodNumber;
|
|
368
|
+
}, "strip", z.ZodTypeAny, {
|
|
369
|
+
images: number;
|
|
370
|
+
clientMessageId: string;
|
|
371
|
+
text: string;
|
|
372
|
+
}, {
|
|
373
|
+
images: number;
|
|
374
|
+
clientMessageId: string;
|
|
375
|
+
text: string;
|
|
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;
|
|
302
403
|
}>>;
|
|
303
404
|
}, "strip", z.ZodTypeAny, {
|
|
405
|
+
state: "idle" | "running" | "waiting" | "error" | "offline";
|
|
304
406
|
id: string;
|
|
407
|
+
agent: string;
|
|
408
|
+
nativeId: string;
|
|
305
409
|
cwd: string;
|
|
306
|
-
createdAt: number;
|
|
307
410
|
pendingPermissions: number;
|
|
411
|
+
createdAt: number;
|
|
308
412
|
updatedAt: number;
|
|
309
|
-
archived: boolean;
|
|
310
|
-
state: "idle" | "error" | "running" | "waiting" | "offline";
|
|
311
|
-
agent: string;
|
|
312
|
-
nativeId: string;
|
|
313
413
|
lastSeq: number;
|
|
414
|
+
archived: boolean;
|
|
314
415
|
title?: string | undefined;
|
|
416
|
+
preview?: string | undefined;
|
|
417
|
+
driver?: "remote" | "desktop" | "none" | undefined;
|
|
315
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;
|
|
316
424
|
permission?: {
|
|
317
425
|
options: {
|
|
426
|
+
optionId: string;
|
|
318
427
|
name: string;
|
|
319
428
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
320
|
-
optionId: string;
|
|
321
429
|
}[];
|
|
322
|
-
requestId: string;
|
|
323
430
|
title: string;
|
|
324
|
-
|
|
431
|
+
requestId: string;
|
|
325
432
|
toolCallId?: string | undefined;
|
|
433
|
+
detail?: string | undefined;
|
|
326
434
|
} | undefined;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
435
|
+
queue?: {
|
|
436
|
+
images: number;
|
|
437
|
+
clientMessageId: string;
|
|
438
|
+
text: string;
|
|
439
|
+
}[] | undefined;
|
|
440
|
+
worktree?: {
|
|
441
|
+
branch: string;
|
|
442
|
+
source: string;
|
|
443
|
+
} | undefined;
|
|
444
|
+
subagents?: {
|
|
445
|
+
running: number;
|
|
446
|
+
total: number;
|
|
333
447
|
} | undefined;
|
|
334
448
|
}, {
|
|
449
|
+
state: "idle" | "running" | "waiting" | "error" | "offline";
|
|
335
450
|
id: string;
|
|
451
|
+
agent: string;
|
|
452
|
+
nativeId: string;
|
|
336
453
|
cwd: string;
|
|
337
|
-
createdAt: number;
|
|
338
454
|
pendingPermissions: number;
|
|
455
|
+
createdAt: number;
|
|
339
456
|
updatedAt: number;
|
|
340
|
-
archived: boolean;
|
|
341
|
-
state: "idle" | "error" | "running" | "waiting" | "offline";
|
|
342
|
-
agent: string;
|
|
343
|
-
nativeId: string;
|
|
344
457
|
lastSeq: number;
|
|
458
|
+
archived: boolean;
|
|
345
459
|
title?: string | undefined;
|
|
460
|
+
preview?: string | undefined;
|
|
461
|
+
driver?: "remote" | "desktop" | "none" | undefined;
|
|
346
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;
|
|
347
468
|
permission?: {
|
|
348
469
|
options: {
|
|
470
|
+
optionId: string;
|
|
349
471
|
name: string;
|
|
350
472
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
351
|
-
optionId: string;
|
|
352
473
|
}[];
|
|
353
|
-
requestId: string;
|
|
354
474
|
title: string;
|
|
355
|
-
|
|
475
|
+
requestId: string;
|
|
356
476
|
toolCallId?: string | undefined;
|
|
477
|
+
detail?: string | undefined;
|
|
357
478
|
} | undefined;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
479
|
+
queue?: {
|
|
480
|
+
images: number;
|
|
481
|
+
clientMessageId: string;
|
|
482
|
+
text: string;
|
|
483
|
+
}[] | undefined;
|
|
484
|
+
worktree?: {
|
|
485
|
+
branch: string;
|
|
486
|
+
source: string;
|
|
487
|
+
} | undefined;
|
|
488
|
+
subagents?: {
|
|
489
|
+
running: number;
|
|
490
|
+
total: number;
|
|
364
491
|
} | undefined;
|
|
365
492
|
}>;
|
|
366
493
|
export type SessionSummary = z.infer<typeof sessionSummarySchema>;
|
|
@@ -369,21 +496,79 @@ export declare function parseSessionId(id: string): {
|
|
|
369
496
|
agent: string;
|
|
370
497
|
nativeId: string;
|
|
371
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>;
|
|
372
553
|
export declare const projectSummarySchema: z.ZodObject<{
|
|
373
554
|
cwd: z.ZodString;
|
|
374
555
|
name: z.ZodString;
|
|
375
556
|
lastActiveAt: z.ZodNumber;
|
|
376
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>;
|
|
377
560
|
}, "strip", z.ZodTypeAny, {
|
|
378
|
-
cwd: string;
|
|
379
561
|
name: string;
|
|
562
|
+
cwd: string;
|
|
380
563
|
lastActiveAt: number;
|
|
381
564
|
sessionCount: number;
|
|
565
|
+
branch?: string | undefined;
|
|
382
566
|
}, {
|
|
383
|
-
cwd: string;
|
|
384
567
|
name: string;
|
|
568
|
+
cwd: string;
|
|
385
569
|
lastActiveAt: number;
|
|
386
570
|
sessionCount: number;
|
|
571
|
+
branch?: string | undefined;
|
|
387
572
|
}>;
|
|
388
573
|
export type ProjectSummary = z.infer<typeof projectSummarySchema>;
|
|
389
574
|
export declare const machineInfoSchema: z.ZodObject<{
|
|
@@ -391,6 +576,8 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
391
576
|
hostname: z.ZodString;
|
|
392
577
|
platform: z.ZodString;
|
|
393
578
|
hostVersion: z.ZodString;
|
|
579
|
+
/** The host user's home directory, so apps can show paths as `~/…`. */
|
|
580
|
+
home: z.ZodOptional<z.ZodString>;
|
|
394
581
|
agents: z.ZodArray<z.ZodObject<{
|
|
395
582
|
id: z.ZodString;
|
|
396
583
|
label: z.ZodString;
|
|
@@ -420,123 +607,131 @@ export declare const machineInfoSchema: z.ZodObject<{
|
|
|
420
607
|
steer: z.ZodBoolean;
|
|
421
608
|
permissions: z.ZodBoolean;
|
|
422
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
|
+
*/
|
|
423
616
|
fork: z.ZodBoolean;
|
|
424
617
|
models: z.ZodBoolean;
|
|
425
618
|
modes: z.ZodBoolean;
|
|
426
619
|
}, "strip", z.ZodTypeAny, {
|
|
427
|
-
|
|
428
|
-
modes: boolean;
|
|
620
|
+
interrupt: boolean;
|
|
429
621
|
steer: boolean;
|
|
622
|
+
permissions: boolean;
|
|
430
623
|
images: boolean;
|
|
431
624
|
fork: boolean;
|
|
432
|
-
permissions: boolean;
|
|
433
|
-
interrupt: boolean;
|
|
434
|
-
}, {
|
|
435
625
|
models: boolean;
|
|
436
626
|
modes: boolean;
|
|
627
|
+
}, {
|
|
628
|
+
interrupt: boolean;
|
|
437
629
|
steer: boolean;
|
|
630
|
+
permissions: boolean;
|
|
438
631
|
images: boolean;
|
|
439
632
|
fork: boolean;
|
|
440
|
-
|
|
441
|
-
|
|
633
|
+
models: boolean;
|
|
634
|
+
modes: boolean;
|
|
442
635
|
}>;
|
|
443
636
|
}, "strip", z.ZodTypeAny, {
|
|
444
637
|
id: string;
|
|
445
638
|
label: string;
|
|
639
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
640
|
+
installed: boolean;
|
|
446
641
|
capabilities: {
|
|
447
|
-
|
|
448
|
-
modes: boolean;
|
|
642
|
+
interrupt: boolean;
|
|
449
643
|
steer: boolean;
|
|
644
|
+
permissions: boolean;
|
|
450
645
|
images: boolean;
|
|
451
646
|
fork: boolean;
|
|
452
|
-
|
|
453
|
-
|
|
647
|
+
models: boolean;
|
|
648
|
+
modes: boolean;
|
|
454
649
|
};
|
|
455
|
-
|
|
456
|
-
|
|
650
|
+
version?: string | undefined;
|
|
651
|
+
problem?: string | undefined;
|
|
457
652
|
auth?: {
|
|
458
653
|
state: "unknown" | "ok" | "missing";
|
|
459
654
|
method?: string | undefined;
|
|
460
655
|
hint?: string | undefined;
|
|
461
656
|
} | undefined;
|
|
462
|
-
version?: string | undefined;
|
|
463
|
-
problem?: string | undefined;
|
|
464
657
|
}, {
|
|
465
658
|
id: string;
|
|
466
659
|
label: string;
|
|
660
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
661
|
+
installed: boolean;
|
|
467
662
|
capabilities: {
|
|
468
|
-
|
|
469
|
-
modes: boolean;
|
|
663
|
+
interrupt: boolean;
|
|
470
664
|
steer: boolean;
|
|
665
|
+
permissions: boolean;
|
|
471
666
|
images: boolean;
|
|
472
667
|
fork: boolean;
|
|
473
|
-
|
|
474
|
-
|
|
668
|
+
models: boolean;
|
|
669
|
+
modes: boolean;
|
|
475
670
|
};
|
|
476
|
-
|
|
477
|
-
|
|
671
|
+
version?: string | undefined;
|
|
672
|
+
problem?: string | undefined;
|
|
478
673
|
auth?: {
|
|
479
674
|
state: "unknown" | "ok" | "missing";
|
|
480
675
|
method?: string | undefined;
|
|
481
676
|
hint?: string | undefined;
|
|
482
677
|
} | undefined;
|
|
483
|
-
version?: string | undefined;
|
|
484
|
-
problem?: string | undefined;
|
|
485
678
|
}>, "many">;
|
|
486
679
|
}, "strip", z.ZodTypeAny, {
|
|
487
680
|
machineId: string;
|
|
488
681
|
hostname: string;
|
|
489
682
|
platform: string;
|
|
683
|
+
hostVersion: string;
|
|
490
684
|
agents: {
|
|
491
685
|
id: string;
|
|
492
686
|
label: string;
|
|
687
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
688
|
+
installed: boolean;
|
|
493
689
|
capabilities: {
|
|
494
|
-
|
|
495
|
-
modes: boolean;
|
|
690
|
+
interrupt: boolean;
|
|
496
691
|
steer: boolean;
|
|
692
|
+
permissions: boolean;
|
|
497
693
|
images: boolean;
|
|
498
694
|
fork: boolean;
|
|
499
|
-
|
|
500
|
-
|
|
695
|
+
models: boolean;
|
|
696
|
+
modes: boolean;
|
|
501
697
|
};
|
|
502
|
-
|
|
503
|
-
|
|
698
|
+
version?: string | undefined;
|
|
699
|
+
problem?: string | undefined;
|
|
504
700
|
auth?: {
|
|
505
701
|
state: "unknown" | "ok" | "missing";
|
|
506
702
|
method?: string | undefined;
|
|
507
703
|
hint?: string | undefined;
|
|
508
704
|
} | undefined;
|
|
509
|
-
version?: string | undefined;
|
|
510
|
-
problem?: string | undefined;
|
|
511
705
|
}[];
|
|
512
|
-
|
|
706
|
+
home?: string | undefined;
|
|
513
707
|
}, {
|
|
514
708
|
machineId: string;
|
|
515
709
|
hostname: string;
|
|
516
710
|
platform: string;
|
|
711
|
+
hostVersion: string;
|
|
517
712
|
agents: {
|
|
518
713
|
id: string;
|
|
519
714
|
label: string;
|
|
715
|
+
tier: "multi_client" | "handoff" | "remote" | "terminal";
|
|
716
|
+
installed: boolean;
|
|
520
717
|
capabilities: {
|
|
521
|
-
|
|
522
|
-
modes: boolean;
|
|
718
|
+
interrupt: boolean;
|
|
523
719
|
steer: boolean;
|
|
720
|
+
permissions: boolean;
|
|
524
721
|
images: boolean;
|
|
525
722
|
fork: boolean;
|
|
526
|
-
|
|
527
|
-
|
|
723
|
+
models: boolean;
|
|
724
|
+
modes: boolean;
|
|
528
725
|
};
|
|
529
|
-
|
|
530
|
-
|
|
726
|
+
version?: string | undefined;
|
|
727
|
+
problem?: string | undefined;
|
|
531
728
|
auth?: {
|
|
532
729
|
state: "unknown" | "ok" | "missing";
|
|
533
730
|
method?: string | undefined;
|
|
534
731
|
hint?: string | undefined;
|
|
535
732
|
} | undefined;
|
|
536
|
-
version?: string | undefined;
|
|
537
|
-
problem?: string | undefined;
|
|
538
733
|
}[];
|
|
539
|
-
|
|
734
|
+
home?: string | undefined;
|
|
540
735
|
}>;
|
|
541
736
|
export type MachineInfo = z.infer<typeof machineInfoSchema>;
|
|
542
737
|
/** A server listening on the host, which a device can preview through the encrypted channel. */
|
|
@@ -555,15 +750,15 @@ export declare const portInfoSchema: z.ZodObject<{
|
|
|
555
750
|
port: number;
|
|
556
751
|
process: string;
|
|
557
752
|
http: boolean;
|
|
558
|
-
cwd?: string | undefined;
|
|
559
753
|
title?: string | undefined;
|
|
754
|
+
cwd?: string | undefined;
|
|
560
755
|
pid?: number | undefined;
|
|
561
756
|
}, {
|
|
562
757
|
port: number;
|
|
563
758
|
process: string;
|
|
564
759
|
http: boolean;
|
|
565
|
-
cwd?: string | undefined;
|
|
566
760
|
title?: string | undefined;
|
|
761
|
+
cwd?: string | undefined;
|
|
567
762
|
pid?: number | undefined;
|
|
568
763
|
}>;
|
|
569
764
|
export type PortInfo = z.infer<typeof portInfoSchema>;
|
|
@@ -586,25 +781,25 @@ export declare const terminalInfoSchema: z.ZodObject<{
|
|
|
586
781
|
interrupted: z.ZodOptional<z.ZodBoolean>;
|
|
587
782
|
}, "strip", z.ZodTypeAny, {
|
|
588
783
|
id: string;
|
|
589
|
-
|
|
590
|
-
rows: number;
|
|
784
|
+
title: string;
|
|
591
785
|
cwd: string;
|
|
592
786
|
createdAt: number;
|
|
593
|
-
|
|
787
|
+
cols: number;
|
|
788
|
+
rows: number;
|
|
594
789
|
activeAt: number;
|
|
595
|
-
exitCode?: number | null | undefined;
|
|
596
790
|
command?: string | undefined;
|
|
791
|
+
exitCode?: number | null | undefined;
|
|
597
792
|
interrupted?: boolean | undefined;
|
|
598
793
|
}, {
|
|
599
794
|
id: string;
|
|
600
|
-
|
|
601
|
-
rows: number;
|
|
795
|
+
title: string;
|
|
602
796
|
cwd: string;
|
|
603
797
|
createdAt: number;
|
|
604
|
-
|
|
798
|
+
cols: number;
|
|
799
|
+
rows: number;
|
|
605
800
|
activeAt: number;
|
|
606
|
-
exitCode?: number | null | undefined;
|
|
607
801
|
command?: string | undefined;
|
|
802
|
+
exitCode?: number | null | undefined;
|
|
608
803
|
interrupted?: boolean | undefined;
|
|
609
804
|
}>;
|
|
610
805
|
export type TerminalInfo = z.infer<typeof terminalInfoSchema>;
|
|
@@ -659,7 +854,7 @@ export declare const gatewayStatusSchema: z.ZodObject<{
|
|
|
659
854
|
pairedAt: number;
|
|
660
855
|
}>, "many">;
|
|
661
856
|
}, "strip", z.ZodTypeAny, {
|
|
662
|
-
status: "
|
|
857
|
+
status: "offline" | "off" | "connecting" | "online";
|
|
663
858
|
devices: {
|
|
664
859
|
id: string;
|
|
665
860
|
name: string;
|
|
@@ -680,7 +875,7 @@ export declare const gatewayStatusSchema: z.ZodObject<{
|
|
|
680
875
|
email?: string | undefined;
|
|
681
876
|
} | undefined;
|
|
682
877
|
}, {
|
|
683
|
-
status: "
|
|
878
|
+
status: "offline" | "off" | "connecting" | "online";
|
|
684
879
|
devices: {
|
|
685
880
|
id: string;
|
|
686
881
|
name: string;
|