@linkshell/host 0.4.39 → 0.4.42

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.
@@ -0,0 +1,1482 @@
1
+ import { z } from "zod";
2
+ import { type LiveActivityAction } from "./live-activity.js";
3
+ import type { PendingPermissionSummary, SessionSummary, TerminalInfo } from "./model.js";
4
+ export declare const watchComputerSchema: z.ZodObject<{
5
+ key: z.ZodString;
6
+ name: z.ZodString;
7
+ online: z.ZodBoolean;
8
+ selected: z.ZodBoolean;
9
+ platform: z.ZodOptional<z.ZodEnum<["darwin", "win32", "linux", "unknown"]>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ name: string;
12
+ online: boolean;
13
+ key: string;
14
+ selected: boolean;
15
+ platform?: "unknown" | "darwin" | "win32" | "linux" | undefined;
16
+ }, {
17
+ name: string;
18
+ online: boolean;
19
+ key: string;
20
+ selected: boolean;
21
+ platform?: "unknown" | "darwin" | "win32" | "linux" | undefined;
22
+ }>;
23
+ export type WatchComputer = z.infer<typeof watchComputerSchema>;
24
+ export declare const watchWorkspaceSchema: z.ZodObject<{
25
+ path: z.ZodString;
26
+ name: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ path: string;
29
+ name: string;
30
+ }, {
31
+ path: string;
32
+ name: string;
33
+ }>;
34
+ export type WatchWorkspace = z.infer<typeof watchWorkspaceSchema>;
35
+ export declare const watchConfigOptionValueSchema: z.ZodObject<{
36
+ value: z.ZodString;
37
+ name: z.ZodString;
38
+ description: z.ZodOptional<z.ZodString>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ value: string;
41
+ name: string;
42
+ description?: string | undefined;
43
+ }, {
44
+ value: string;
45
+ name: string;
46
+ description?: string | undefined;
47
+ }>;
48
+ export type WatchConfigOptionValue = z.infer<typeof watchConfigOptionValueSchema>;
49
+ export declare const watchConfigOptionSchema: z.ZodObject<{
50
+ id: z.ZodString;
51
+ name: z.ZodString;
52
+ category: z.ZodDefault<z.ZodEnum<["model", "model_config", "mode", "effort", "other"]>>;
53
+ current: z.ZodString;
54
+ currentLabel: z.ZodOptional<z.ZodString>;
55
+ values: z.ZodArray<z.ZodObject<{
56
+ value: z.ZodString;
57
+ name: z.ZodString;
58
+ description: z.ZodOptional<z.ZodString>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ value: string;
61
+ name: string;
62
+ description?: string | undefined;
63
+ }, {
64
+ value: string;
65
+ name: string;
66
+ description?: string | undefined;
67
+ }>, "many">;
68
+ }, "strip", z.ZodTypeAny, {
69
+ values: {
70
+ value: string;
71
+ name: string;
72
+ description?: string | undefined;
73
+ }[];
74
+ name: string;
75
+ id: string;
76
+ category: "model" | "model_config" | "mode" | "effort" | "other";
77
+ current: string;
78
+ currentLabel?: string | undefined;
79
+ }, {
80
+ values: {
81
+ value: string;
82
+ name: string;
83
+ description?: string | undefined;
84
+ }[];
85
+ name: string;
86
+ id: string;
87
+ current: string;
88
+ category?: "model" | "model_config" | "mode" | "effort" | "other" | undefined;
89
+ currentLabel?: string | undefined;
90
+ }>;
91
+ export type WatchConfigOption = z.infer<typeof watchConfigOptionSchema>;
92
+ export declare const watchActionSchema: z.ZodObject<{
93
+ id: z.ZodString;
94
+ label: z.ZodString;
95
+ role: z.ZodEnum<["allow", "reject", "always", "stop", "choice"]>;
96
+ kind: z.ZodEnum<["permission", "answer", "async-answer"]>;
97
+ computerKey: z.ZodString;
98
+ sessionId: z.ZodString;
99
+ requestId: z.ZodString;
100
+ optionId: z.ZodString;
101
+ questionId: z.ZodOptional<z.ZodString>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ kind: "answer" | "permission" | "async-answer";
104
+ id: string;
105
+ role: "stop" | "choice" | "reject" | "allow" | "always";
106
+ requestId: string;
107
+ optionId: string;
108
+ label: string;
109
+ sessionId: string;
110
+ computerKey: string;
111
+ questionId?: string | undefined;
112
+ }, {
113
+ kind: "answer" | "permission" | "async-answer";
114
+ id: string;
115
+ role: "stop" | "choice" | "reject" | "allow" | "always";
116
+ requestId: string;
117
+ optionId: string;
118
+ label: string;
119
+ sessionId: string;
120
+ computerKey: string;
121
+ questionId?: string | undefined;
122
+ }>;
123
+ export type WatchAction = LiveActivityAction;
124
+ export declare const watchPlanProgressSchema: z.ZodObject<{
125
+ completed: z.ZodNumber;
126
+ total: z.ZodNumber;
127
+ currentStep: z.ZodOptional<z.ZodString>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ completed: number;
130
+ total: number;
131
+ currentStep?: string | undefined;
132
+ }, {
133
+ completed: number;
134
+ total: number;
135
+ currentStep?: string | undefined;
136
+ }>;
137
+ export type WatchPlanProgress = z.infer<typeof watchPlanProgressSchema>;
138
+ export declare const watchTimelineItemSchema: z.ZodObject<{
139
+ id: z.ZodString;
140
+ kind: z.ZodEnum<["user", "assistant", "thought", "tool", "diff", "subagent", "image", "plan", "permission", "question", "error"]>;
141
+ title: z.ZodOptional<z.ZodString>;
142
+ text: z.ZodString;
143
+ detail: z.ZodOptional<z.ZodString>;
144
+ status: z.ZodOptional<z.ZodEnum<["running", "completed", "failed", "waiting"]>>;
145
+ filePath: z.ZodOptional<z.ZodString>;
146
+ diffAdded: z.ZodOptional<z.ZodNumber>;
147
+ diffRemoved: z.ZodOptional<z.ZodNumber>;
148
+ subagentType: z.ZodOptional<z.ZodString>;
149
+ subagentName: z.ZodOptional<z.ZodString>;
150
+ subagentModel: z.ZodOptional<z.ZodString>;
151
+ imageBase64: z.ZodOptional<z.ZodString>;
152
+ imageMimeType: z.ZodOptional<z.ZodString>;
153
+ }, "strip", z.ZodTypeAny, {
154
+ text: string;
155
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
156
+ id: string;
157
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
158
+ title?: string | undefined;
159
+ detail?: string | undefined;
160
+ filePath?: string | undefined;
161
+ diffAdded?: number | undefined;
162
+ diffRemoved?: number | undefined;
163
+ subagentType?: string | undefined;
164
+ subagentName?: string | undefined;
165
+ subagentModel?: string | undefined;
166
+ imageBase64?: string | undefined;
167
+ imageMimeType?: string | undefined;
168
+ }, {
169
+ text: string;
170
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
171
+ id: string;
172
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
173
+ title?: string | undefined;
174
+ detail?: string | undefined;
175
+ filePath?: string | undefined;
176
+ diffAdded?: number | undefined;
177
+ diffRemoved?: number | undefined;
178
+ subagentType?: string | undefined;
179
+ subagentName?: string | undefined;
180
+ subagentModel?: string | undefined;
181
+ imageBase64?: string | undefined;
182
+ imageMimeType?: string | undefined;
183
+ }>;
184
+ export type WatchTimelineItem = z.infer<typeof watchTimelineItemSchema>;
185
+ export declare const watchSessionSchema: z.ZodObject<{
186
+ id: z.ZodString;
187
+ title: z.ZodString;
188
+ subtitle: z.ZodString;
189
+ project: z.ZodString;
190
+ cwd: z.ZodOptional<z.ZodString>;
191
+ branch: z.ZodOptional<z.ZodString>;
192
+ agent: z.ZodString;
193
+ model: z.ZodOptional<z.ZodString>;
194
+ mode: z.ZodOptional<z.ZodString>;
195
+ subagents: z.ZodOptional<z.ZodObject<{
196
+ total: z.ZodNumber;
197
+ running: z.ZodNumber;
198
+ }, "strip", z.ZodTypeAny, {
199
+ running: number;
200
+ total: number;
201
+ }, {
202
+ running: number;
203
+ total: number;
204
+ }>>;
205
+ configOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
206
+ id: z.ZodString;
207
+ name: z.ZodString;
208
+ category: z.ZodDefault<z.ZodEnum<["model", "model_config", "mode", "effort", "other"]>>;
209
+ current: z.ZodString;
210
+ currentLabel: z.ZodOptional<z.ZodString>;
211
+ values: z.ZodArray<z.ZodObject<{
212
+ value: z.ZodString;
213
+ name: z.ZodString;
214
+ description: z.ZodOptional<z.ZodString>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ value: string;
217
+ name: string;
218
+ description?: string | undefined;
219
+ }, {
220
+ value: string;
221
+ name: string;
222
+ description?: string | undefined;
223
+ }>, "many">;
224
+ }, "strip", z.ZodTypeAny, {
225
+ values: {
226
+ value: string;
227
+ name: string;
228
+ description?: string | undefined;
229
+ }[];
230
+ name: string;
231
+ id: string;
232
+ category: "model" | "model_config" | "mode" | "effort" | "other";
233
+ current: string;
234
+ currentLabel?: string | undefined;
235
+ }, {
236
+ values: {
237
+ value: string;
238
+ name: string;
239
+ description?: string | undefined;
240
+ }[];
241
+ name: string;
242
+ id: string;
243
+ current: string;
244
+ category?: "model" | "model_config" | "mode" | "effort" | "other" | undefined;
245
+ currentLabel?: string | undefined;
246
+ }>, "many">>;
247
+ phase: z.ZodEnum<["waiting_for_approval", "waiting_for_input", "failed", "running", "starting", "completed", "stale"]>;
248
+ updatedAt: z.ZodNumber;
249
+ pinned: z.ZodOptional<z.ZodBoolean>;
250
+ promptTitle: z.ZodOptional<z.ZodString>;
251
+ commandPreview: z.ZodOptional<z.ZodString>;
252
+ detailPreview: z.ZodOptional<z.ZodString>;
253
+ goal: z.ZodOptional<z.ZodString>;
254
+ planProgress: z.ZodOptional<z.ZodObject<{
255
+ completed: z.ZodNumber;
256
+ total: z.ZodNumber;
257
+ currentStep: z.ZodOptional<z.ZodString>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ completed: number;
260
+ total: number;
261
+ currentStep?: string | undefined;
262
+ }, {
263
+ completed: number;
264
+ total: number;
265
+ currentStep?: string | undefined;
266
+ }>>;
267
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
268
+ id: z.ZodString;
269
+ label: z.ZodString;
270
+ role: z.ZodEnum<["allow", "reject", "always", "stop", "choice"]>;
271
+ kind: z.ZodEnum<["permission", "answer", "async-answer"]>;
272
+ computerKey: z.ZodString;
273
+ sessionId: z.ZodString;
274
+ requestId: z.ZodString;
275
+ optionId: z.ZodString;
276
+ questionId: z.ZodOptional<z.ZodString>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ kind: "answer" | "permission" | "async-answer";
279
+ id: string;
280
+ role: "stop" | "choice" | "reject" | "allow" | "always";
281
+ requestId: string;
282
+ optionId: string;
283
+ label: string;
284
+ sessionId: string;
285
+ computerKey: string;
286
+ questionId?: string | undefined;
287
+ }, {
288
+ kind: "answer" | "permission" | "async-answer";
289
+ id: string;
290
+ role: "stop" | "choice" | "reject" | "allow" | "always";
291
+ requestId: string;
292
+ optionId: string;
293
+ label: string;
294
+ sessionId: string;
295
+ computerKey: string;
296
+ questionId?: string | undefined;
297
+ }>, "many">>;
298
+ hasMoreActions: z.ZodOptional<z.ZodBoolean>;
299
+ hasEarlier: z.ZodOptional<z.ZodBoolean>;
300
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
301
+ id: z.ZodString;
302
+ kind: z.ZodEnum<["user", "assistant", "thought", "tool", "diff", "subagent", "image", "plan", "permission", "question", "error"]>;
303
+ title: z.ZodOptional<z.ZodString>;
304
+ text: z.ZodString;
305
+ detail: z.ZodOptional<z.ZodString>;
306
+ status: z.ZodOptional<z.ZodEnum<["running", "completed", "failed", "waiting"]>>;
307
+ filePath: z.ZodOptional<z.ZodString>;
308
+ diffAdded: z.ZodOptional<z.ZodNumber>;
309
+ diffRemoved: z.ZodOptional<z.ZodNumber>;
310
+ subagentType: z.ZodOptional<z.ZodString>;
311
+ subagentName: z.ZodOptional<z.ZodString>;
312
+ subagentModel: z.ZodOptional<z.ZodString>;
313
+ imageBase64: z.ZodOptional<z.ZodString>;
314
+ imageMimeType: z.ZodOptional<z.ZodString>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ text: string;
317
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
318
+ id: string;
319
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
320
+ title?: string | undefined;
321
+ detail?: string | undefined;
322
+ filePath?: string | undefined;
323
+ diffAdded?: number | undefined;
324
+ diffRemoved?: number | undefined;
325
+ subagentType?: string | undefined;
326
+ subagentName?: string | undefined;
327
+ subagentModel?: string | undefined;
328
+ imageBase64?: string | undefined;
329
+ imageMimeType?: string | undefined;
330
+ }, {
331
+ text: string;
332
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
333
+ id: string;
334
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
335
+ title?: string | undefined;
336
+ detail?: string | undefined;
337
+ filePath?: string | undefined;
338
+ diffAdded?: number | undefined;
339
+ diffRemoved?: number | undefined;
340
+ subagentType?: string | undefined;
341
+ subagentName?: string | undefined;
342
+ subagentModel?: string | undefined;
343
+ imageBase64?: string | undefined;
344
+ imageMimeType?: string | undefined;
345
+ }>, "many">>;
346
+ canCancel: z.ZodBoolean;
347
+ canSend: z.ZodBoolean;
348
+ handoff: z.ZodEnum<["none", "can_takeover", "can_release"]>;
349
+ deepLink: z.ZodString;
350
+ }, "strip", z.ZodTypeAny, {
351
+ title: string;
352
+ agent: string;
353
+ id: string;
354
+ canCancel: boolean;
355
+ phase: "completed" | "failed" | "running" | "waiting_for_approval" | "waiting_for_input" | "starting" | "stale";
356
+ updatedAt: number;
357
+ handoff: "none" | "can_takeover" | "can_release";
358
+ subtitle: string;
359
+ project: string;
360
+ deepLink: string;
361
+ canSend: boolean;
362
+ model?: string | undefined;
363
+ mode?: string | undefined;
364
+ goal?: string | undefined;
365
+ cwd?: string | undefined;
366
+ branch?: string | undefined;
367
+ subagents?: {
368
+ running: number;
369
+ total: number;
370
+ } | undefined;
371
+ actions?: {
372
+ kind: "answer" | "permission" | "async-answer";
373
+ id: string;
374
+ role: "stop" | "choice" | "reject" | "allow" | "always";
375
+ requestId: string;
376
+ optionId: string;
377
+ label: string;
378
+ sessionId: string;
379
+ computerKey: string;
380
+ questionId?: string | undefined;
381
+ }[] | undefined;
382
+ hasMoreActions?: boolean | undefined;
383
+ configOptions?: {
384
+ values: {
385
+ value: string;
386
+ name: string;
387
+ description?: string | undefined;
388
+ }[];
389
+ name: string;
390
+ id: string;
391
+ category: "model" | "model_config" | "mode" | "effort" | "other";
392
+ current: string;
393
+ currentLabel?: string | undefined;
394
+ }[] | undefined;
395
+ pinned?: boolean | undefined;
396
+ promptTitle?: string | undefined;
397
+ commandPreview?: string | undefined;
398
+ detailPreview?: string | undefined;
399
+ planProgress?: {
400
+ completed: number;
401
+ total: number;
402
+ currentStep?: string | undefined;
403
+ } | undefined;
404
+ hasEarlier?: boolean | undefined;
405
+ items?: {
406
+ text: string;
407
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
408
+ id: string;
409
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
410
+ title?: string | undefined;
411
+ detail?: string | undefined;
412
+ filePath?: string | undefined;
413
+ diffAdded?: number | undefined;
414
+ diffRemoved?: number | undefined;
415
+ subagentType?: string | undefined;
416
+ subagentName?: string | undefined;
417
+ subagentModel?: string | undefined;
418
+ imageBase64?: string | undefined;
419
+ imageMimeType?: string | undefined;
420
+ }[] | undefined;
421
+ }, {
422
+ title: string;
423
+ agent: string;
424
+ id: string;
425
+ canCancel: boolean;
426
+ phase: "completed" | "failed" | "running" | "waiting_for_approval" | "waiting_for_input" | "starting" | "stale";
427
+ updatedAt: number;
428
+ handoff: "none" | "can_takeover" | "can_release";
429
+ subtitle: string;
430
+ project: string;
431
+ deepLink: string;
432
+ canSend: boolean;
433
+ model?: string | undefined;
434
+ mode?: string | undefined;
435
+ goal?: string | undefined;
436
+ cwd?: string | undefined;
437
+ branch?: string | undefined;
438
+ subagents?: {
439
+ running: number;
440
+ total: number;
441
+ } | undefined;
442
+ actions?: {
443
+ kind: "answer" | "permission" | "async-answer";
444
+ id: string;
445
+ role: "stop" | "choice" | "reject" | "allow" | "always";
446
+ requestId: string;
447
+ optionId: string;
448
+ label: string;
449
+ sessionId: string;
450
+ computerKey: string;
451
+ questionId?: string | undefined;
452
+ }[] | undefined;
453
+ hasMoreActions?: boolean | undefined;
454
+ configOptions?: {
455
+ values: {
456
+ value: string;
457
+ name: string;
458
+ description?: string | undefined;
459
+ }[];
460
+ name: string;
461
+ id: string;
462
+ current: string;
463
+ category?: "model" | "model_config" | "mode" | "effort" | "other" | undefined;
464
+ currentLabel?: string | undefined;
465
+ }[] | undefined;
466
+ pinned?: boolean | undefined;
467
+ promptTitle?: string | undefined;
468
+ commandPreview?: string | undefined;
469
+ detailPreview?: string | undefined;
470
+ planProgress?: {
471
+ completed: number;
472
+ total: number;
473
+ currentStep?: string | undefined;
474
+ } | undefined;
475
+ hasEarlier?: boolean | undefined;
476
+ items?: {
477
+ text: string;
478
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
479
+ id: string;
480
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
481
+ title?: string | undefined;
482
+ detail?: string | undefined;
483
+ filePath?: string | undefined;
484
+ diffAdded?: number | undefined;
485
+ diffRemoved?: number | undefined;
486
+ subagentType?: string | undefined;
487
+ subagentName?: string | undefined;
488
+ subagentModel?: string | undefined;
489
+ imageBase64?: string | undefined;
490
+ imageMimeType?: string | undefined;
491
+ }[] | undefined;
492
+ }>;
493
+ export type WatchSession = z.infer<typeof watchSessionSchema>;
494
+ export declare const watchTerminalSchema: z.ZodObject<{
495
+ id: z.ZodString;
496
+ title: z.ZodString;
497
+ subtitle: z.ZodString;
498
+ project: z.ZodString;
499
+ cwd: z.ZodOptional<z.ZodString>;
500
+ command: z.ZodOptional<z.ZodString>;
501
+ outputPreview: z.ZodOptional<z.ZodString>;
502
+ phase: z.ZodEnum<["running", "failed", "completed", "stale"]>;
503
+ activeAt: z.ZodNumber;
504
+ exitCode: z.ZodOptional<z.ZodNumber>;
505
+ deepLink: z.ZodString;
506
+ }, "strip", z.ZodTypeAny, {
507
+ title: string;
508
+ id: string;
509
+ phase: "completed" | "failed" | "running" | "stale";
510
+ activeAt: number;
511
+ subtitle: string;
512
+ project: string;
513
+ deepLink: string;
514
+ command?: string | undefined;
515
+ exitCode?: number | undefined;
516
+ cwd?: string | undefined;
517
+ outputPreview?: string | undefined;
518
+ }, {
519
+ title: string;
520
+ id: string;
521
+ phase: "completed" | "failed" | "running" | "stale";
522
+ activeAt: number;
523
+ subtitle: string;
524
+ project: string;
525
+ deepLink: string;
526
+ command?: string | undefined;
527
+ exitCode?: number | undefined;
528
+ cwd?: string | undefined;
529
+ outputPreview?: string | undefined;
530
+ }>;
531
+ export type WatchTerminal = z.infer<typeof watchTerminalSchema>;
532
+ export declare const watchSnapshotSchema: z.ZodObject<{
533
+ version: z.ZodLiteral<1>;
534
+ generatedAt: z.ZodNumber;
535
+ computerKey: z.ZodString;
536
+ computerName: z.ZodString;
537
+ online: z.ZodBoolean;
538
+ statusLabel: z.ZodString;
539
+ waitingCount: z.ZodNumber;
540
+ runningCount: z.ZodNumber;
541
+ failedCount: z.ZodNumber;
542
+ completedCount: z.ZodNumber;
543
+ availableAgents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
544
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
545
+ path: z.ZodString;
546
+ name: z.ZodString;
547
+ }, "strip", z.ZodTypeAny, {
548
+ path: string;
549
+ name: string;
550
+ }, {
551
+ path: string;
552
+ name: string;
553
+ }>, "many">>;
554
+ computers: z.ZodArray<z.ZodObject<{
555
+ key: z.ZodString;
556
+ name: z.ZodString;
557
+ online: z.ZodBoolean;
558
+ selected: z.ZodBoolean;
559
+ platform: z.ZodOptional<z.ZodEnum<["darwin", "win32", "linux", "unknown"]>>;
560
+ }, "strip", z.ZodTypeAny, {
561
+ name: string;
562
+ online: boolean;
563
+ key: string;
564
+ selected: boolean;
565
+ platform?: "unknown" | "darwin" | "win32" | "linux" | undefined;
566
+ }, {
567
+ name: string;
568
+ online: boolean;
569
+ key: string;
570
+ selected: boolean;
571
+ platform?: "unknown" | "darwin" | "win32" | "linux" | undefined;
572
+ }>, "many">;
573
+ sessions: z.ZodArray<z.ZodObject<{
574
+ id: z.ZodString;
575
+ title: z.ZodString;
576
+ subtitle: z.ZodString;
577
+ project: z.ZodString;
578
+ cwd: z.ZodOptional<z.ZodString>;
579
+ branch: z.ZodOptional<z.ZodString>;
580
+ agent: z.ZodString;
581
+ model: z.ZodOptional<z.ZodString>;
582
+ mode: z.ZodOptional<z.ZodString>;
583
+ subagents: z.ZodOptional<z.ZodObject<{
584
+ total: z.ZodNumber;
585
+ running: z.ZodNumber;
586
+ }, "strip", z.ZodTypeAny, {
587
+ running: number;
588
+ total: number;
589
+ }, {
590
+ running: number;
591
+ total: number;
592
+ }>>;
593
+ configOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
594
+ id: z.ZodString;
595
+ name: z.ZodString;
596
+ category: z.ZodDefault<z.ZodEnum<["model", "model_config", "mode", "effort", "other"]>>;
597
+ current: z.ZodString;
598
+ currentLabel: z.ZodOptional<z.ZodString>;
599
+ values: z.ZodArray<z.ZodObject<{
600
+ value: z.ZodString;
601
+ name: z.ZodString;
602
+ description: z.ZodOptional<z.ZodString>;
603
+ }, "strip", z.ZodTypeAny, {
604
+ value: string;
605
+ name: string;
606
+ description?: string | undefined;
607
+ }, {
608
+ value: string;
609
+ name: string;
610
+ description?: string | undefined;
611
+ }>, "many">;
612
+ }, "strip", z.ZodTypeAny, {
613
+ values: {
614
+ value: string;
615
+ name: string;
616
+ description?: string | undefined;
617
+ }[];
618
+ name: string;
619
+ id: string;
620
+ category: "model" | "model_config" | "mode" | "effort" | "other";
621
+ current: string;
622
+ currentLabel?: string | undefined;
623
+ }, {
624
+ values: {
625
+ value: string;
626
+ name: string;
627
+ description?: string | undefined;
628
+ }[];
629
+ name: string;
630
+ id: string;
631
+ current: string;
632
+ category?: "model" | "model_config" | "mode" | "effort" | "other" | undefined;
633
+ currentLabel?: string | undefined;
634
+ }>, "many">>;
635
+ phase: z.ZodEnum<["waiting_for_approval", "waiting_for_input", "failed", "running", "starting", "completed", "stale"]>;
636
+ updatedAt: z.ZodNumber;
637
+ pinned: z.ZodOptional<z.ZodBoolean>;
638
+ promptTitle: z.ZodOptional<z.ZodString>;
639
+ commandPreview: z.ZodOptional<z.ZodString>;
640
+ detailPreview: z.ZodOptional<z.ZodString>;
641
+ goal: z.ZodOptional<z.ZodString>;
642
+ planProgress: z.ZodOptional<z.ZodObject<{
643
+ completed: z.ZodNumber;
644
+ total: z.ZodNumber;
645
+ currentStep: z.ZodOptional<z.ZodString>;
646
+ }, "strip", z.ZodTypeAny, {
647
+ completed: number;
648
+ total: number;
649
+ currentStep?: string | undefined;
650
+ }, {
651
+ completed: number;
652
+ total: number;
653
+ currentStep?: string | undefined;
654
+ }>>;
655
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
656
+ id: z.ZodString;
657
+ label: z.ZodString;
658
+ role: z.ZodEnum<["allow", "reject", "always", "stop", "choice"]>;
659
+ kind: z.ZodEnum<["permission", "answer", "async-answer"]>;
660
+ computerKey: z.ZodString;
661
+ sessionId: z.ZodString;
662
+ requestId: z.ZodString;
663
+ optionId: z.ZodString;
664
+ questionId: z.ZodOptional<z.ZodString>;
665
+ }, "strip", z.ZodTypeAny, {
666
+ kind: "answer" | "permission" | "async-answer";
667
+ id: string;
668
+ role: "stop" | "choice" | "reject" | "allow" | "always";
669
+ requestId: string;
670
+ optionId: string;
671
+ label: string;
672
+ sessionId: string;
673
+ computerKey: string;
674
+ questionId?: string | undefined;
675
+ }, {
676
+ kind: "answer" | "permission" | "async-answer";
677
+ id: string;
678
+ role: "stop" | "choice" | "reject" | "allow" | "always";
679
+ requestId: string;
680
+ optionId: string;
681
+ label: string;
682
+ sessionId: string;
683
+ computerKey: string;
684
+ questionId?: string | undefined;
685
+ }>, "many">>;
686
+ hasMoreActions: z.ZodOptional<z.ZodBoolean>;
687
+ hasEarlier: z.ZodOptional<z.ZodBoolean>;
688
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
689
+ id: z.ZodString;
690
+ kind: z.ZodEnum<["user", "assistant", "thought", "tool", "diff", "subagent", "image", "plan", "permission", "question", "error"]>;
691
+ title: z.ZodOptional<z.ZodString>;
692
+ text: z.ZodString;
693
+ detail: z.ZodOptional<z.ZodString>;
694
+ status: z.ZodOptional<z.ZodEnum<["running", "completed", "failed", "waiting"]>>;
695
+ filePath: z.ZodOptional<z.ZodString>;
696
+ diffAdded: z.ZodOptional<z.ZodNumber>;
697
+ diffRemoved: z.ZodOptional<z.ZodNumber>;
698
+ subagentType: z.ZodOptional<z.ZodString>;
699
+ subagentName: z.ZodOptional<z.ZodString>;
700
+ subagentModel: z.ZodOptional<z.ZodString>;
701
+ imageBase64: z.ZodOptional<z.ZodString>;
702
+ imageMimeType: z.ZodOptional<z.ZodString>;
703
+ }, "strip", z.ZodTypeAny, {
704
+ text: string;
705
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
706
+ id: string;
707
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
708
+ title?: string | undefined;
709
+ detail?: string | undefined;
710
+ filePath?: string | undefined;
711
+ diffAdded?: number | undefined;
712
+ diffRemoved?: number | undefined;
713
+ subagentType?: string | undefined;
714
+ subagentName?: string | undefined;
715
+ subagentModel?: string | undefined;
716
+ imageBase64?: string | undefined;
717
+ imageMimeType?: string | undefined;
718
+ }, {
719
+ text: string;
720
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
721
+ id: string;
722
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
723
+ title?: string | undefined;
724
+ detail?: string | undefined;
725
+ filePath?: string | undefined;
726
+ diffAdded?: number | undefined;
727
+ diffRemoved?: number | undefined;
728
+ subagentType?: string | undefined;
729
+ subagentName?: string | undefined;
730
+ subagentModel?: string | undefined;
731
+ imageBase64?: string | undefined;
732
+ imageMimeType?: string | undefined;
733
+ }>, "many">>;
734
+ canCancel: z.ZodBoolean;
735
+ canSend: z.ZodBoolean;
736
+ handoff: z.ZodEnum<["none", "can_takeover", "can_release"]>;
737
+ deepLink: z.ZodString;
738
+ }, "strip", z.ZodTypeAny, {
739
+ title: string;
740
+ agent: string;
741
+ id: string;
742
+ canCancel: boolean;
743
+ phase: "completed" | "failed" | "running" | "waiting_for_approval" | "waiting_for_input" | "starting" | "stale";
744
+ updatedAt: number;
745
+ handoff: "none" | "can_takeover" | "can_release";
746
+ subtitle: string;
747
+ project: string;
748
+ deepLink: string;
749
+ canSend: boolean;
750
+ model?: string | undefined;
751
+ mode?: string | undefined;
752
+ goal?: string | undefined;
753
+ cwd?: string | undefined;
754
+ branch?: string | undefined;
755
+ subagents?: {
756
+ running: number;
757
+ total: number;
758
+ } | undefined;
759
+ actions?: {
760
+ kind: "answer" | "permission" | "async-answer";
761
+ id: string;
762
+ role: "stop" | "choice" | "reject" | "allow" | "always";
763
+ requestId: string;
764
+ optionId: string;
765
+ label: string;
766
+ sessionId: string;
767
+ computerKey: string;
768
+ questionId?: string | undefined;
769
+ }[] | undefined;
770
+ hasMoreActions?: boolean | undefined;
771
+ configOptions?: {
772
+ values: {
773
+ value: string;
774
+ name: string;
775
+ description?: string | undefined;
776
+ }[];
777
+ name: string;
778
+ id: string;
779
+ category: "model" | "model_config" | "mode" | "effort" | "other";
780
+ current: string;
781
+ currentLabel?: string | undefined;
782
+ }[] | undefined;
783
+ pinned?: boolean | undefined;
784
+ promptTitle?: string | undefined;
785
+ commandPreview?: string | undefined;
786
+ detailPreview?: string | undefined;
787
+ planProgress?: {
788
+ completed: number;
789
+ total: number;
790
+ currentStep?: string | undefined;
791
+ } | undefined;
792
+ hasEarlier?: boolean | undefined;
793
+ items?: {
794
+ text: string;
795
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
796
+ id: string;
797
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
798
+ title?: string | undefined;
799
+ detail?: string | undefined;
800
+ filePath?: string | undefined;
801
+ diffAdded?: number | undefined;
802
+ diffRemoved?: number | undefined;
803
+ subagentType?: string | undefined;
804
+ subagentName?: string | undefined;
805
+ subagentModel?: string | undefined;
806
+ imageBase64?: string | undefined;
807
+ imageMimeType?: string | undefined;
808
+ }[] | undefined;
809
+ }, {
810
+ title: string;
811
+ agent: string;
812
+ id: string;
813
+ canCancel: boolean;
814
+ phase: "completed" | "failed" | "running" | "waiting_for_approval" | "waiting_for_input" | "starting" | "stale";
815
+ updatedAt: number;
816
+ handoff: "none" | "can_takeover" | "can_release";
817
+ subtitle: string;
818
+ project: string;
819
+ deepLink: string;
820
+ canSend: boolean;
821
+ model?: string | undefined;
822
+ mode?: string | undefined;
823
+ goal?: string | undefined;
824
+ cwd?: string | undefined;
825
+ branch?: string | undefined;
826
+ subagents?: {
827
+ running: number;
828
+ total: number;
829
+ } | undefined;
830
+ actions?: {
831
+ kind: "answer" | "permission" | "async-answer";
832
+ id: string;
833
+ role: "stop" | "choice" | "reject" | "allow" | "always";
834
+ requestId: string;
835
+ optionId: string;
836
+ label: string;
837
+ sessionId: string;
838
+ computerKey: string;
839
+ questionId?: string | undefined;
840
+ }[] | undefined;
841
+ hasMoreActions?: boolean | undefined;
842
+ configOptions?: {
843
+ values: {
844
+ value: string;
845
+ name: string;
846
+ description?: string | undefined;
847
+ }[];
848
+ name: string;
849
+ id: string;
850
+ current: string;
851
+ category?: "model" | "model_config" | "mode" | "effort" | "other" | undefined;
852
+ currentLabel?: string | undefined;
853
+ }[] | undefined;
854
+ pinned?: boolean | undefined;
855
+ promptTitle?: string | undefined;
856
+ commandPreview?: string | undefined;
857
+ detailPreview?: string | undefined;
858
+ planProgress?: {
859
+ completed: number;
860
+ total: number;
861
+ currentStep?: string | undefined;
862
+ } | undefined;
863
+ hasEarlier?: boolean | undefined;
864
+ items?: {
865
+ text: string;
866
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
867
+ id: string;
868
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
869
+ title?: string | undefined;
870
+ detail?: string | undefined;
871
+ filePath?: string | undefined;
872
+ diffAdded?: number | undefined;
873
+ diffRemoved?: number | undefined;
874
+ subagentType?: string | undefined;
875
+ subagentName?: string | undefined;
876
+ subagentModel?: string | undefined;
877
+ imageBase64?: string | undefined;
878
+ imageMimeType?: string | undefined;
879
+ }[] | undefined;
880
+ }>, "many">;
881
+ terminals: z.ZodArray<z.ZodObject<{
882
+ id: z.ZodString;
883
+ title: z.ZodString;
884
+ subtitle: z.ZodString;
885
+ project: z.ZodString;
886
+ cwd: z.ZodOptional<z.ZodString>;
887
+ command: z.ZodOptional<z.ZodString>;
888
+ outputPreview: z.ZodOptional<z.ZodString>;
889
+ phase: z.ZodEnum<["running", "failed", "completed", "stale"]>;
890
+ activeAt: z.ZodNumber;
891
+ exitCode: z.ZodOptional<z.ZodNumber>;
892
+ deepLink: z.ZodString;
893
+ }, "strip", z.ZodTypeAny, {
894
+ title: string;
895
+ id: string;
896
+ phase: "completed" | "failed" | "running" | "stale";
897
+ activeAt: number;
898
+ subtitle: string;
899
+ project: string;
900
+ deepLink: string;
901
+ command?: string | undefined;
902
+ exitCode?: number | undefined;
903
+ cwd?: string | undefined;
904
+ outputPreview?: string | undefined;
905
+ }, {
906
+ title: string;
907
+ id: string;
908
+ phase: "completed" | "failed" | "running" | "stale";
909
+ activeAt: number;
910
+ subtitle: string;
911
+ project: string;
912
+ deepLink: string;
913
+ command?: string | undefined;
914
+ exitCode?: number | undefined;
915
+ cwd?: string | undefined;
916
+ outputPreview?: string | undefined;
917
+ }>, "many">;
918
+ }, "strip", z.ZodTypeAny, {
919
+ version: 1;
920
+ sessions: {
921
+ title: string;
922
+ agent: string;
923
+ id: string;
924
+ canCancel: boolean;
925
+ phase: "completed" | "failed" | "running" | "waiting_for_approval" | "waiting_for_input" | "starting" | "stale";
926
+ updatedAt: number;
927
+ handoff: "none" | "can_takeover" | "can_release";
928
+ subtitle: string;
929
+ project: string;
930
+ deepLink: string;
931
+ canSend: boolean;
932
+ model?: string | undefined;
933
+ mode?: string | undefined;
934
+ goal?: string | undefined;
935
+ cwd?: string | undefined;
936
+ branch?: string | undefined;
937
+ subagents?: {
938
+ running: number;
939
+ total: number;
940
+ } | undefined;
941
+ actions?: {
942
+ kind: "answer" | "permission" | "async-answer";
943
+ id: string;
944
+ role: "stop" | "choice" | "reject" | "allow" | "always";
945
+ requestId: string;
946
+ optionId: string;
947
+ label: string;
948
+ sessionId: string;
949
+ computerKey: string;
950
+ questionId?: string | undefined;
951
+ }[] | undefined;
952
+ hasMoreActions?: boolean | undefined;
953
+ configOptions?: {
954
+ values: {
955
+ value: string;
956
+ name: string;
957
+ description?: string | undefined;
958
+ }[];
959
+ name: string;
960
+ id: string;
961
+ category: "model" | "model_config" | "mode" | "effort" | "other";
962
+ current: string;
963
+ currentLabel?: string | undefined;
964
+ }[] | undefined;
965
+ pinned?: boolean | undefined;
966
+ promptTitle?: string | undefined;
967
+ commandPreview?: string | undefined;
968
+ detailPreview?: string | undefined;
969
+ planProgress?: {
970
+ completed: number;
971
+ total: number;
972
+ currentStep?: string | undefined;
973
+ } | undefined;
974
+ hasEarlier?: boolean | undefined;
975
+ items?: {
976
+ text: string;
977
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
978
+ id: string;
979
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
980
+ title?: string | undefined;
981
+ detail?: string | undefined;
982
+ filePath?: string | undefined;
983
+ diffAdded?: number | undefined;
984
+ diffRemoved?: number | undefined;
985
+ subagentType?: string | undefined;
986
+ subagentName?: string | undefined;
987
+ subagentModel?: string | undefined;
988
+ imageBase64?: string | undefined;
989
+ imageMimeType?: string | undefined;
990
+ }[] | undefined;
991
+ }[];
992
+ online: boolean;
993
+ generatedAt: number;
994
+ computerKey: string;
995
+ waitingCount: number;
996
+ runningCount: number;
997
+ failedCount: number;
998
+ computerName: string;
999
+ terminals: {
1000
+ title: string;
1001
+ id: string;
1002
+ phase: "completed" | "failed" | "running" | "stale";
1003
+ activeAt: number;
1004
+ subtitle: string;
1005
+ project: string;
1006
+ deepLink: string;
1007
+ command?: string | undefined;
1008
+ exitCode?: number | undefined;
1009
+ cwd?: string | undefined;
1010
+ outputPreview?: string | undefined;
1011
+ }[];
1012
+ statusLabel: string;
1013
+ completedCount: number;
1014
+ computers: {
1015
+ name: string;
1016
+ online: boolean;
1017
+ key: string;
1018
+ selected: boolean;
1019
+ platform?: "unknown" | "darwin" | "win32" | "linux" | undefined;
1020
+ }[];
1021
+ availableAgents?: string[] | undefined;
1022
+ workspaces?: {
1023
+ path: string;
1024
+ name: string;
1025
+ }[] | undefined;
1026
+ }, {
1027
+ version: 1;
1028
+ sessions: {
1029
+ title: string;
1030
+ agent: string;
1031
+ id: string;
1032
+ canCancel: boolean;
1033
+ phase: "completed" | "failed" | "running" | "waiting_for_approval" | "waiting_for_input" | "starting" | "stale";
1034
+ updatedAt: number;
1035
+ handoff: "none" | "can_takeover" | "can_release";
1036
+ subtitle: string;
1037
+ project: string;
1038
+ deepLink: string;
1039
+ canSend: boolean;
1040
+ model?: string | undefined;
1041
+ mode?: string | undefined;
1042
+ goal?: string | undefined;
1043
+ cwd?: string | undefined;
1044
+ branch?: string | undefined;
1045
+ subagents?: {
1046
+ running: number;
1047
+ total: number;
1048
+ } | undefined;
1049
+ actions?: {
1050
+ kind: "answer" | "permission" | "async-answer";
1051
+ id: string;
1052
+ role: "stop" | "choice" | "reject" | "allow" | "always";
1053
+ requestId: string;
1054
+ optionId: string;
1055
+ label: string;
1056
+ sessionId: string;
1057
+ computerKey: string;
1058
+ questionId?: string | undefined;
1059
+ }[] | undefined;
1060
+ hasMoreActions?: boolean | undefined;
1061
+ configOptions?: {
1062
+ values: {
1063
+ value: string;
1064
+ name: string;
1065
+ description?: string | undefined;
1066
+ }[];
1067
+ name: string;
1068
+ id: string;
1069
+ current: string;
1070
+ category?: "model" | "model_config" | "mode" | "effort" | "other" | undefined;
1071
+ currentLabel?: string | undefined;
1072
+ }[] | undefined;
1073
+ pinned?: boolean | undefined;
1074
+ promptTitle?: string | undefined;
1075
+ commandPreview?: string | undefined;
1076
+ detailPreview?: string | undefined;
1077
+ planProgress?: {
1078
+ completed: number;
1079
+ total: number;
1080
+ currentStep?: string | undefined;
1081
+ } | undefined;
1082
+ hasEarlier?: boolean | undefined;
1083
+ items?: {
1084
+ text: string;
1085
+ kind: "user" | "assistant" | "image" | "diff" | "tool" | "subagent" | "question" | "error" | "thought" | "plan" | "permission";
1086
+ id: string;
1087
+ status?: "completed" | "failed" | "running" | "waiting" | undefined;
1088
+ title?: string | undefined;
1089
+ detail?: string | undefined;
1090
+ filePath?: string | undefined;
1091
+ diffAdded?: number | undefined;
1092
+ diffRemoved?: number | undefined;
1093
+ subagentType?: string | undefined;
1094
+ subagentName?: string | undefined;
1095
+ subagentModel?: string | undefined;
1096
+ imageBase64?: string | undefined;
1097
+ imageMimeType?: string | undefined;
1098
+ }[] | undefined;
1099
+ }[];
1100
+ online: boolean;
1101
+ generatedAt: number;
1102
+ computerKey: string;
1103
+ waitingCount: number;
1104
+ runningCount: number;
1105
+ failedCount: number;
1106
+ computerName: string;
1107
+ terminals: {
1108
+ title: string;
1109
+ id: string;
1110
+ phase: "completed" | "failed" | "running" | "stale";
1111
+ activeAt: number;
1112
+ subtitle: string;
1113
+ project: string;
1114
+ deepLink: string;
1115
+ command?: string | undefined;
1116
+ exitCode?: number | undefined;
1117
+ cwd?: string | undefined;
1118
+ outputPreview?: string | undefined;
1119
+ }[];
1120
+ statusLabel: string;
1121
+ completedCount: number;
1122
+ computers: {
1123
+ name: string;
1124
+ online: boolean;
1125
+ key: string;
1126
+ selected: boolean;
1127
+ platform?: "unknown" | "darwin" | "win32" | "linux" | undefined;
1128
+ }[];
1129
+ availableAgents?: string[] | undefined;
1130
+ workspaces?: {
1131
+ path: string;
1132
+ name: string;
1133
+ }[] | undefined;
1134
+ }>;
1135
+ export type WatchSnapshot = z.infer<typeof watchSnapshotSchema>;
1136
+ export declare const watchCommandSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1137
+ id: z.ZodString;
1138
+ kind: z.ZodLiteral<"action">;
1139
+ action: z.ZodObject<{
1140
+ id: z.ZodString;
1141
+ label: z.ZodString;
1142
+ role: z.ZodEnum<["allow", "reject", "always", "stop", "choice"]>;
1143
+ kind: z.ZodEnum<["permission", "answer", "async-answer"]>;
1144
+ computerKey: z.ZodString;
1145
+ sessionId: z.ZodString;
1146
+ requestId: z.ZodString;
1147
+ optionId: z.ZodString;
1148
+ questionId: z.ZodOptional<z.ZodString>;
1149
+ }, "strip", z.ZodTypeAny, {
1150
+ kind: "answer" | "permission" | "async-answer";
1151
+ id: string;
1152
+ role: "stop" | "choice" | "reject" | "allow" | "always";
1153
+ requestId: string;
1154
+ optionId: string;
1155
+ label: string;
1156
+ sessionId: string;
1157
+ computerKey: string;
1158
+ questionId?: string | undefined;
1159
+ }, {
1160
+ kind: "answer" | "permission" | "async-answer";
1161
+ id: string;
1162
+ role: "stop" | "choice" | "reject" | "allow" | "always";
1163
+ requestId: string;
1164
+ optionId: string;
1165
+ label: string;
1166
+ sessionId: string;
1167
+ computerKey: string;
1168
+ questionId?: string | undefined;
1169
+ }>;
1170
+ }, "strip", z.ZodTypeAny, {
1171
+ action: {
1172
+ kind: "answer" | "permission" | "async-answer";
1173
+ id: string;
1174
+ role: "stop" | "choice" | "reject" | "allow" | "always";
1175
+ requestId: string;
1176
+ optionId: string;
1177
+ label: string;
1178
+ sessionId: string;
1179
+ computerKey: string;
1180
+ questionId?: string | undefined;
1181
+ };
1182
+ kind: "action";
1183
+ id: string;
1184
+ }, {
1185
+ action: {
1186
+ kind: "answer" | "permission" | "async-answer";
1187
+ id: string;
1188
+ role: "stop" | "choice" | "reject" | "allow" | "always";
1189
+ requestId: string;
1190
+ optionId: string;
1191
+ label: string;
1192
+ sessionId: string;
1193
+ computerKey: string;
1194
+ questionId?: string | undefined;
1195
+ };
1196
+ kind: "action";
1197
+ id: string;
1198
+ }>, z.ZodObject<{
1199
+ id: z.ZodString;
1200
+ kind: z.ZodLiteral<"prompt">;
1201
+ computerKey: z.ZodString;
1202
+ sessionId: z.ZodString;
1203
+ text: z.ZodString;
1204
+ now: z.ZodOptional<z.ZodBoolean>;
1205
+ }, "strip", z.ZodTypeAny, {
1206
+ text: string;
1207
+ kind: "prompt";
1208
+ id: string;
1209
+ sessionId: string;
1210
+ computerKey: string;
1211
+ now?: boolean | undefined;
1212
+ }, {
1213
+ text: string;
1214
+ kind: "prompt";
1215
+ id: string;
1216
+ sessionId: string;
1217
+ computerKey: string;
1218
+ now?: boolean | undefined;
1219
+ }>, z.ZodObject<{
1220
+ id: z.ZodString;
1221
+ kind: z.ZodLiteral<"cancel">;
1222
+ computerKey: z.ZodString;
1223
+ sessionId: z.ZodString;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ kind: "cancel";
1226
+ id: string;
1227
+ sessionId: string;
1228
+ computerKey: string;
1229
+ }, {
1230
+ kind: "cancel";
1231
+ id: string;
1232
+ sessionId: string;
1233
+ computerKey: string;
1234
+ }>, z.ZodObject<{
1235
+ id: z.ZodString;
1236
+ kind: z.ZodLiteral<"takeover">;
1237
+ computerKey: z.ZodString;
1238
+ sessionId: z.ZodString;
1239
+ }, "strip", z.ZodTypeAny, {
1240
+ kind: "takeover";
1241
+ id: string;
1242
+ sessionId: string;
1243
+ computerKey: string;
1244
+ }, {
1245
+ kind: "takeover";
1246
+ id: string;
1247
+ sessionId: string;
1248
+ computerKey: string;
1249
+ }>, z.ZodObject<{
1250
+ id: z.ZodString;
1251
+ kind: z.ZodLiteral<"release">;
1252
+ computerKey: z.ZodString;
1253
+ sessionId: z.ZodString;
1254
+ }, "strip", z.ZodTypeAny, {
1255
+ kind: "release";
1256
+ id: string;
1257
+ sessionId: string;
1258
+ computerKey: string;
1259
+ }, {
1260
+ kind: "release";
1261
+ id: string;
1262
+ sessionId: string;
1263
+ computerKey: string;
1264
+ }>, z.ZodObject<{
1265
+ id: z.ZodString;
1266
+ kind: z.ZodLiteral<"set-config">;
1267
+ computerKey: z.ZodString;
1268
+ sessionId: z.ZodString;
1269
+ optionId: z.ZodString;
1270
+ value: z.ZodString;
1271
+ }, "strip", z.ZodTypeAny, {
1272
+ value: string;
1273
+ kind: "set-config";
1274
+ id: string;
1275
+ optionId: string;
1276
+ sessionId: string;
1277
+ computerKey: string;
1278
+ }, {
1279
+ value: string;
1280
+ kind: "set-config";
1281
+ id: string;
1282
+ optionId: string;
1283
+ sessionId: string;
1284
+ computerKey: string;
1285
+ }>, z.ZodObject<{
1286
+ id: z.ZodString;
1287
+ kind: z.ZodLiteral<"open-session">;
1288
+ computerKey: z.ZodString;
1289
+ sessionId: z.ZodString;
1290
+ }, "strip", z.ZodTypeAny, {
1291
+ kind: "open-session";
1292
+ id: string;
1293
+ sessionId: string;
1294
+ computerKey: string;
1295
+ }, {
1296
+ kind: "open-session";
1297
+ id: string;
1298
+ sessionId: string;
1299
+ computerKey: string;
1300
+ }>, z.ZodObject<{
1301
+ id: z.ZodString;
1302
+ kind: z.ZodLiteral<"load-earlier">;
1303
+ computerKey: z.ZodString;
1304
+ sessionId: z.ZodString;
1305
+ }, "strip", z.ZodTypeAny, {
1306
+ kind: "load-earlier";
1307
+ id: string;
1308
+ sessionId: string;
1309
+ computerKey: string;
1310
+ }, {
1311
+ kind: "load-earlier";
1312
+ id: string;
1313
+ sessionId: string;
1314
+ computerKey: string;
1315
+ }>, z.ZodObject<{
1316
+ id: z.ZodString;
1317
+ kind: z.ZodLiteral<"create-session">;
1318
+ computerKey: z.ZodString;
1319
+ agent: z.ZodString;
1320
+ cwd: z.ZodString;
1321
+ prompt: z.ZodOptional<z.ZodString>;
1322
+ }, "strip", z.ZodTypeAny, {
1323
+ agent: string;
1324
+ kind: "create-session";
1325
+ id: string;
1326
+ cwd: string;
1327
+ computerKey: string;
1328
+ prompt?: string | undefined;
1329
+ }, {
1330
+ agent: string;
1331
+ kind: "create-session";
1332
+ id: string;
1333
+ cwd: string;
1334
+ computerKey: string;
1335
+ prompt?: string | undefined;
1336
+ }>, z.ZodObject<{
1337
+ id: z.ZodString;
1338
+ kind: z.ZodLiteral<"create-terminal">;
1339
+ computerKey: z.ZodString;
1340
+ cwd: z.ZodOptional<z.ZodString>;
1341
+ command: z.ZodOptional<z.ZodString>;
1342
+ }, "strip", z.ZodTypeAny, {
1343
+ kind: "create-terminal";
1344
+ id: string;
1345
+ computerKey: string;
1346
+ command?: string | undefined;
1347
+ cwd?: string | undefined;
1348
+ }, {
1349
+ kind: "create-terminal";
1350
+ id: string;
1351
+ computerKey: string;
1352
+ command?: string | undefined;
1353
+ cwd?: string | undefined;
1354
+ }>, z.ZodObject<{
1355
+ id: z.ZodString;
1356
+ kind: z.ZodLiteral<"open-terminal">;
1357
+ computerKey: z.ZodString;
1358
+ terminalId: z.ZodString;
1359
+ }, "strip", z.ZodTypeAny, {
1360
+ kind: "open-terminal";
1361
+ terminalId: string;
1362
+ id: string;
1363
+ computerKey: string;
1364
+ }, {
1365
+ kind: "open-terminal";
1366
+ terminalId: string;
1367
+ id: string;
1368
+ computerKey: string;
1369
+ }>, z.ZodObject<{
1370
+ id: z.ZodString;
1371
+ kind: z.ZodLiteral<"terminal-input">;
1372
+ computerKey: z.ZodString;
1373
+ terminalId: z.ZodString;
1374
+ data: z.ZodString;
1375
+ }, "strip", z.ZodTypeAny, {
1376
+ data: string;
1377
+ kind: "terminal-input";
1378
+ terminalId: string;
1379
+ id: string;
1380
+ computerKey: string;
1381
+ }, {
1382
+ data: string;
1383
+ kind: "terminal-input";
1384
+ terminalId: string;
1385
+ id: string;
1386
+ computerKey: string;
1387
+ }>, z.ZodObject<{
1388
+ id: z.ZodString;
1389
+ kind: z.ZodLiteral<"close-terminal">;
1390
+ computerKey: z.ZodString;
1391
+ terminalId: z.ZodString;
1392
+ }, "strip", z.ZodTypeAny, {
1393
+ kind: "close-terminal";
1394
+ terminalId: string;
1395
+ id: string;
1396
+ computerKey: string;
1397
+ }, {
1398
+ kind: "close-terminal";
1399
+ terminalId: string;
1400
+ id: string;
1401
+ computerKey: string;
1402
+ }>, z.ZodObject<{
1403
+ id: z.ZodString;
1404
+ kind: z.ZodLiteral<"select-computer">;
1405
+ computerKey: z.ZodString;
1406
+ }, "strip", z.ZodTypeAny, {
1407
+ kind: "select-computer";
1408
+ id: string;
1409
+ computerKey: string;
1410
+ }, {
1411
+ kind: "select-computer";
1412
+ id: string;
1413
+ computerKey: string;
1414
+ }>, z.ZodObject<{
1415
+ id: z.ZodString;
1416
+ kind: z.ZodLiteral<"refresh">;
1417
+ computerKey: z.ZodOptional<z.ZodString>;
1418
+ }, "strip", z.ZodTypeAny, {
1419
+ kind: "refresh";
1420
+ id: string;
1421
+ computerKey?: string | undefined;
1422
+ }, {
1423
+ kind: "refresh";
1424
+ id: string;
1425
+ computerKey?: string | undefined;
1426
+ }>]>;
1427
+ export type WatchCommand = z.infer<typeof watchCommandSchema>;
1428
+ export interface WatchQuickPrompt {
1429
+ id: string;
1430
+ label: string;
1431
+ icon: string;
1432
+ prompt: string;
1433
+ }
1434
+ export declare const DEFAULT_WATCH_QUICK_PROMPTS: readonly WatchQuickPrompt[];
1435
+ export declare function sliceTimelinePreservingUsers(items: WatchTimelineItem[], maxItems: number): WatchTimelineItem[];
1436
+ export declare function buildWatchSession(session: SessionSummary, online: boolean, computerKey?: string, options?: {
1437
+ pinned?: boolean;
1438
+ goal?: string;
1439
+ planProgress?: WatchPlanProgress;
1440
+ tier?: string;
1441
+ items?: WatchTimelineItem[];
1442
+ hasEarlier?: boolean;
1443
+ maxItems?: number;
1444
+ mode?: string;
1445
+ configOptions?: WatchConfigOption[];
1446
+ }): WatchSession;
1447
+ export declare function buildWatchTerminal(terminal: TerminalInfo, online: boolean, computerKey?: string, outputPreview?: string): WatchTerminal;
1448
+ export interface BuildWatchSnapshotOptions {
1449
+ computerKey?: string;
1450
+ computers?: WatchComputer[];
1451
+ pinnedSessionIds?: string[];
1452
+ goals?: Record<string, {
1453
+ status: string;
1454
+ objective: string;
1455
+ }>;
1456
+ plans?: Record<string, WatchPlanProgress>;
1457
+ timelines?: Record<string, WatchTimelineItem[]>;
1458
+ hasEarlier?: Record<string, boolean>;
1459
+ itemLimits?: Record<string, number>;
1460
+ modes?: Record<string, string>;
1461
+ configs?: Record<string, WatchConfigOption[]>;
1462
+ terminalOutputs?: Record<string, string>;
1463
+ availableAgents?: string[];
1464
+ workspaces?: WatchWorkspace[];
1465
+ agentTiers?: Record<string, string>;
1466
+ now?: number;
1467
+ }
1468
+ /**
1469
+ * Builds the structured Apple Watch companion snapshot for the selected computer.
1470
+ * Prioritizes sessions needing approval/input, then errors, then running, then pinned/recent.
1471
+ */
1472
+ export declare function buildWatchSnapshot(computerName: string, sessions: SessionSummary[], terminals: TerminalInfo[], online: boolean, options?: BuildWatchSnapshotOptions): WatchSnapshot;
1473
+ /**
1474
+ * Bounds a WatchSnapshot so it fits comfortably within WatchConnectivity's
1475
+ * applicationContext / message budget (<= 24 KB), never truncating action IDs.
1476
+ */
1477
+ export declare function watchSnapshotContent(snapshot: WatchSnapshot): WatchSnapshot;
1478
+ /**
1479
+ * Validates a command originating from Apple Watch against the connected computer
1480
+ * and live session state before executing any RPC on the host.
1481
+ */
1482
+ export declare function isWatchCommandCurrent(command: WatchCommand, computerKey: string, session: SessionSummary | undefined, permissions?: PendingPermissionSummary[]): boolean;