@nexus-code/remote-protocol 0.0.0-stage → 0.2.0

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/dist/view.d.ts ADDED
@@ -0,0 +1,1560 @@
1
+ /**
2
+ * A chat as another device draws it: the conversation the serving device's
3
+ * app already made of its program's log, trimmed of what only that app
4
+ * uses. The shapes follow the desktop app's chat model, so its chat view can
5
+ * draw a remote one as it draws its own; Claude Code's and Codex's own
6
+ * formats stay on the serving device, which keeps up with their versions.
7
+ *
8
+ * An item or call of a kind this version does not know stays parseable
9
+ * (UnknownItemSchema): a newer device may send more, and an older one skips it.
10
+ */
11
+ import { z } from "zod";
12
+ /** An image a message or a tool result holds. Its bytes stay on the serving device in v1. */
13
+ export declare const ImageRefSchema: z.ZodObject<{
14
+ mediaType: z.ZodString;
15
+ /** How many bytes the image takes. */
16
+ bytes: z.ZodNumber;
17
+ }, "strip", z.ZodTypeAny, {
18
+ mediaType: string;
19
+ bytes: number;
20
+ }, {
21
+ mediaType: string;
22
+ bytes: number;
23
+ }>;
24
+ export type ImageRef = z.infer<typeof ImageRefSchema>;
25
+ export declare const UserItemSchema: z.ZodObject<{
26
+ kind: z.ZodLiteral<"user">;
27
+ key: z.ZodString;
28
+ text: z.ZodString;
29
+ images: z.ZodArray<z.ZodObject<{
30
+ mediaType: z.ZodString;
31
+ /** How many bytes the image takes. */
32
+ bytes: z.ZodNumber;
33
+ }, "strip", z.ZodTypeAny, {
34
+ mediaType: string;
35
+ bytes: number;
36
+ }, {
37
+ mediaType: string;
38
+ bytes: number;
39
+ }>, "many">;
40
+ /** sent: written to the program; taken: the program read it. */
41
+ state: z.ZodEnum<["sent", "taken"]>;
42
+ /** Written during a turn and not read yet: it waits above the composer. */
43
+ queued: z.ZodOptional<z.ZodBoolean>;
44
+ at: z.ZodOptional<z.ZodNumber>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ kind: "user";
47
+ key: string;
48
+ text: string;
49
+ images: {
50
+ mediaType: string;
51
+ bytes: number;
52
+ }[];
53
+ state: "sent" | "taken";
54
+ at?: number | undefined;
55
+ queued?: boolean | undefined;
56
+ }, {
57
+ kind: "user";
58
+ key: string;
59
+ text: string;
60
+ images: {
61
+ mediaType: string;
62
+ bytes: number;
63
+ }[];
64
+ state: "sent" | "taken";
65
+ at?: number | undefined;
66
+ queued?: boolean | undefined;
67
+ }>;
68
+ export declare const AssistantBlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
69
+ type: z.ZodLiteral<"text">;
70
+ text: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ type: "text";
73
+ text: string;
74
+ }, {
75
+ type: "text";
76
+ text: string;
77
+ }>, z.ZodObject<{
78
+ type: z.ZodLiteral<"thinking">;
79
+ text: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ type: "thinking";
82
+ text: string;
83
+ }, {
84
+ type: "thinking";
85
+ text: string;
86
+ }>, z.ZodObject<{
87
+ type: z.ZodLiteral<"tool">;
88
+ toolUseId: z.ZodString;
89
+ }, "strip", z.ZodTypeAny, {
90
+ type: "tool";
91
+ toolUseId: string;
92
+ }, {
93
+ type: "tool";
94
+ toolUseId: string;
95
+ }>]>;
96
+ export declare const AssistantItemSchema: z.ZodObject<{
97
+ kind: z.ZodLiteral<"assistant">;
98
+ key: z.ZodString;
99
+ messageId: z.ZodString;
100
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
101
+ type: z.ZodLiteral<"text">;
102
+ text: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ type: "text";
105
+ text: string;
106
+ }, {
107
+ type: "text";
108
+ text: string;
109
+ }>, z.ZodObject<{
110
+ type: z.ZodLiteral<"thinking">;
111
+ text: z.ZodString;
112
+ }, "strip", z.ZodTypeAny, {
113
+ type: "thinking";
114
+ text: string;
115
+ }, {
116
+ type: "thinking";
117
+ text: string;
118
+ }>, z.ZodObject<{
119
+ type: z.ZodLiteral<"tool">;
120
+ toolUseId: z.ZodString;
121
+ }, "strip", z.ZodTypeAny, {
122
+ type: "tool";
123
+ toolUseId: string;
124
+ }, {
125
+ type: "tool";
126
+ toolUseId: string;
127
+ }>]>, "many">;
128
+ at: z.ZodOptional<z.ZodNumber>;
129
+ }, "strip", z.ZodTypeAny, {
130
+ kind: "assistant";
131
+ key: string;
132
+ messageId: string;
133
+ blocks: ({
134
+ type: "text";
135
+ text: string;
136
+ } | {
137
+ type: "thinking";
138
+ text: string;
139
+ } | {
140
+ type: "tool";
141
+ toolUseId: string;
142
+ })[];
143
+ at?: number | undefined;
144
+ }, {
145
+ kind: "assistant";
146
+ key: string;
147
+ messageId: string;
148
+ blocks: ({
149
+ type: "text";
150
+ text: string;
151
+ } | {
152
+ type: "thinking";
153
+ text: string;
154
+ } | {
155
+ type: "tool";
156
+ toolUseId: string;
157
+ })[];
158
+ at?: number | undefined;
159
+ }>;
160
+ export type ViewAssistantItem = z.infer<typeof AssistantItemSchema>;
161
+ export declare const NoticeItemSchema: z.ZodObject<{
162
+ kind: z.ZodLiteral<"notice">;
163
+ key: z.ZodString;
164
+ /** interrupted, exited, restarted, compacted, cleared, error…: a code the app names. */
165
+ code: z.ZodString;
166
+ detail: z.ZodOptional<z.ZodString>;
167
+ at: z.ZodOptional<z.ZodNumber>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ code: string;
170
+ kind: "notice";
171
+ key: string;
172
+ at?: number | undefined;
173
+ detail?: string | undefined;
174
+ }, {
175
+ code: string;
176
+ kind: "notice";
177
+ key: string;
178
+ at?: number | undefined;
179
+ detail?: string | undefined;
180
+ }>;
181
+ /**
182
+ * Where an agent that sent a message can be answered: its tab, on the
183
+ * device `deviceId` (absent: the device this chat runs on). `nexus chat
184
+ * send` takes it as it is.
185
+ */
186
+ export declare const ReplyAddressSchema: z.ZodObject<{
187
+ deviceId: z.ZodOptional<z.ZodString>;
188
+ workspaceId: z.ZodString;
189
+ tabId: z.ZodString;
190
+ }, "strip", z.ZodTypeAny, {
191
+ workspaceId: string;
192
+ tabId: string;
193
+ deviceId?: string | undefined;
194
+ }, {
195
+ workspaceId: string;
196
+ tabId: string;
197
+ deviceId?: string | undefined;
198
+ }>;
199
+ export type ReplyAddress = z.infer<typeof ReplyAddressSchema>;
200
+ /** A message the program took that the user did not write: another session's, a channel's. */
201
+ export declare const ReceivedItemSchema: z.ZodObject<{
202
+ kind: z.ZodLiteral<"received">;
203
+ key: z.ZodString;
204
+ from: z.ZodObject<{
205
+ kind: z.ZodString;
206
+ name: z.ZodOptional<z.ZodString>;
207
+ agent: z.ZodOptional<z.ZodString>;
208
+ /** Sent from another device of the account: which one, as it names itself. */
209
+ device: z.ZodOptional<z.ZodObject<{
210
+ id: z.ZodString;
211
+ name: z.ZodString;
212
+ }, "strip", z.ZodTypeAny, {
213
+ id: string;
214
+ name: string;
215
+ }, {
216
+ id: string;
217
+ name: string;
218
+ }>>;
219
+ /** Where the sender takes an answer. */
220
+ replyTo: z.ZodOptional<z.ZodObject<{
221
+ deviceId: z.ZodOptional<z.ZodString>;
222
+ workspaceId: z.ZodString;
223
+ tabId: z.ZodString;
224
+ }, "strip", z.ZodTypeAny, {
225
+ workspaceId: string;
226
+ tabId: string;
227
+ deviceId?: string | undefined;
228
+ }, {
229
+ workspaceId: string;
230
+ tabId: string;
231
+ deviceId?: string | undefined;
232
+ }>>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ kind: string;
235
+ name?: string | undefined;
236
+ agent?: string | undefined;
237
+ device?: {
238
+ id: string;
239
+ name: string;
240
+ } | undefined;
241
+ replyTo?: {
242
+ workspaceId: string;
243
+ tabId: string;
244
+ deviceId?: string | undefined;
245
+ } | undefined;
246
+ }, {
247
+ kind: string;
248
+ name?: string | undefined;
249
+ agent?: string | undefined;
250
+ device?: {
251
+ id: string;
252
+ name: string;
253
+ } | undefined;
254
+ replyTo?: {
255
+ workspaceId: string;
256
+ tabId: string;
257
+ deviceId?: string | undefined;
258
+ } | undefined;
259
+ }>;
260
+ text: z.ZodString;
261
+ at: z.ZodOptional<z.ZodNumber>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ from: {
264
+ kind: string;
265
+ name?: string | undefined;
266
+ agent?: string | undefined;
267
+ device?: {
268
+ id: string;
269
+ name: string;
270
+ } | undefined;
271
+ replyTo?: {
272
+ workspaceId: string;
273
+ tabId: string;
274
+ deviceId?: string | undefined;
275
+ } | undefined;
276
+ };
277
+ kind: "received";
278
+ key: string;
279
+ text: string;
280
+ at?: number | undefined;
281
+ }, {
282
+ from: {
283
+ kind: string;
284
+ name?: string | undefined;
285
+ agent?: string | undefined;
286
+ device?: {
287
+ id: string;
288
+ name: string;
289
+ } | undefined;
290
+ replyTo?: {
291
+ workspaceId: string;
292
+ tabId: string;
293
+ deviceId?: string | undefined;
294
+ } | undefined;
295
+ };
296
+ kind: "received";
297
+ key: string;
298
+ text: string;
299
+ at?: number | undefined;
300
+ }>;
301
+ export declare const TaskEndItemSchema: z.ZodObject<{
302
+ kind: z.ZodLiteral<"task_end">;
303
+ key: z.ZodString;
304
+ taskId: z.ZodString;
305
+ status: z.ZodString;
306
+ description: z.ZodOptional<z.ZodString>;
307
+ taskType: z.ZodOptional<z.ZodString>;
308
+ summary: z.ZodOptional<z.ZodString>;
309
+ toolUseId: z.ZodOptional<z.ZodString>;
310
+ wakes: z.ZodOptional<z.ZodBoolean>;
311
+ at: z.ZodOptional<z.ZodNumber>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ status: string;
314
+ kind: "task_end";
315
+ key: string;
316
+ taskId: string;
317
+ at?: number | undefined;
318
+ toolUseId?: string | undefined;
319
+ description?: string | undefined;
320
+ taskType?: string | undefined;
321
+ summary?: string | undefined;
322
+ wakes?: boolean | undefined;
323
+ }, {
324
+ status: string;
325
+ kind: "task_end";
326
+ key: string;
327
+ taskId: string;
328
+ at?: number | undefined;
329
+ toolUseId?: string | undefined;
330
+ description?: string | undefined;
331
+ taskType?: string | undefined;
332
+ summary?: string | undefined;
333
+ wakes?: boolean | undefined;
334
+ }>;
335
+ export declare const ShellItemSchema: z.ZodObject<{
336
+ kind: z.ZodLiteral<"shell">;
337
+ key: z.ZodString;
338
+ command: z.ZodString;
339
+ stdout: z.ZodOptional<z.ZodString>;
340
+ stderr: z.ZodOptional<z.ZodString>;
341
+ at: z.ZodOptional<z.ZodNumber>;
342
+ }, "strip", z.ZodTypeAny, {
343
+ kind: "shell";
344
+ key: string;
345
+ command: string;
346
+ at?: number | undefined;
347
+ stdout?: string | undefined;
348
+ stderr?: string | undefined;
349
+ }, {
350
+ kind: "shell";
351
+ key: string;
352
+ command: string;
353
+ at?: number | undefined;
354
+ stdout?: string | undefined;
355
+ stderr?: string | undefined;
356
+ }>;
357
+ /** The item kinds this version knows. */
358
+ export declare const ITEM_KINDS: ReadonlySet<string>;
359
+ /**
360
+ * An item of a kind this version does not know: kept so the list stays
361
+ * whole, and not drawn. A known kind that does not fit its shape is no such item.
362
+ */
363
+ export declare const UnknownItemSchema: z.ZodObject<{
364
+ kind: z.ZodEffects<z.ZodString, string, string>;
365
+ key: z.ZodString;
366
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
367
+ kind: z.ZodEffects<z.ZodString, string, string>;
368
+ key: z.ZodString;
369
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
370
+ kind: z.ZodEffects<z.ZodString, string, string>;
371
+ key: z.ZodString;
372
+ }, z.ZodTypeAny, "passthrough">>;
373
+ export declare const ViewItemSchema: z.ZodUnion<[z.ZodObject<{
374
+ kind: z.ZodLiteral<"user">;
375
+ key: z.ZodString;
376
+ text: z.ZodString;
377
+ images: z.ZodArray<z.ZodObject<{
378
+ mediaType: z.ZodString;
379
+ /** How many bytes the image takes. */
380
+ bytes: z.ZodNumber;
381
+ }, "strip", z.ZodTypeAny, {
382
+ mediaType: string;
383
+ bytes: number;
384
+ }, {
385
+ mediaType: string;
386
+ bytes: number;
387
+ }>, "many">;
388
+ /** sent: written to the program; taken: the program read it. */
389
+ state: z.ZodEnum<["sent", "taken"]>;
390
+ /** Written during a turn and not read yet: it waits above the composer. */
391
+ queued: z.ZodOptional<z.ZodBoolean>;
392
+ at: z.ZodOptional<z.ZodNumber>;
393
+ }, "strip", z.ZodTypeAny, {
394
+ kind: "user";
395
+ key: string;
396
+ text: string;
397
+ images: {
398
+ mediaType: string;
399
+ bytes: number;
400
+ }[];
401
+ state: "sent" | "taken";
402
+ at?: number | undefined;
403
+ queued?: boolean | undefined;
404
+ }, {
405
+ kind: "user";
406
+ key: string;
407
+ text: string;
408
+ images: {
409
+ mediaType: string;
410
+ bytes: number;
411
+ }[];
412
+ state: "sent" | "taken";
413
+ at?: number | undefined;
414
+ queued?: boolean | undefined;
415
+ }>, z.ZodObject<{
416
+ kind: z.ZodLiteral<"assistant">;
417
+ key: z.ZodString;
418
+ messageId: z.ZodString;
419
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
420
+ type: z.ZodLiteral<"text">;
421
+ text: z.ZodString;
422
+ }, "strip", z.ZodTypeAny, {
423
+ type: "text";
424
+ text: string;
425
+ }, {
426
+ type: "text";
427
+ text: string;
428
+ }>, z.ZodObject<{
429
+ type: z.ZodLiteral<"thinking">;
430
+ text: z.ZodString;
431
+ }, "strip", z.ZodTypeAny, {
432
+ type: "thinking";
433
+ text: string;
434
+ }, {
435
+ type: "thinking";
436
+ text: string;
437
+ }>, z.ZodObject<{
438
+ type: z.ZodLiteral<"tool">;
439
+ toolUseId: z.ZodString;
440
+ }, "strip", z.ZodTypeAny, {
441
+ type: "tool";
442
+ toolUseId: string;
443
+ }, {
444
+ type: "tool";
445
+ toolUseId: string;
446
+ }>]>, "many">;
447
+ at: z.ZodOptional<z.ZodNumber>;
448
+ }, "strip", z.ZodTypeAny, {
449
+ kind: "assistant";
450
+ key: string;
451
+ messageId: string;
452
+ blocks: ({
453
+ type: "text";
454
+ text: string;
455
+ } | {
456
+ type: "thinking";
457
+ text: string;
458
+ } | {
459
+ type: "tool";
460
+ toolUseId: string;
461
+ })[];
462
+ at?: number | undefined;
463
+ }, {
464
+ kind: "assistant";
465
+ key: string;
466
+ messageId: string;
467
+ blocks: ({
468
+ type: "text";
469
+ text: string;
470
+ } | {
471
+ type: "thinking";
472
+ text: string;
473
+ } | {
474
+ type: "tool";
475
+ toolUseId: string;
476
+ })[];
477
+ at?: number | undefined;
478
+ }>, z.ZodObject<{
479
+ kind: z.ZodLiteral<"notice">;
480
+ key: z.ZodString;
481
+ /** interrupted, exited, restarted, compacted, cleared, error…: a code the app names. */
482
+ code: z.ZodString;
483
+ detail: z.ZodOptional<z.ZodString>;
484
+ at: z.ZodOptional<z.ZodNumber>;
485
+ }, "strip", z.ZodTypeAny, {
486
+ code: string;
487
+ kind: "notice";
488
+ key: string;
489
+ at?: number | undefined;
490
+ detail?: string | undefined;
491
+ }, {
492
+ code: string;
493
+ kind: "notice";
494
+ key: string;
495
+ at?: number | undefined;
496
+ detail?: string | undefined;
497
+ }>, z.ZodObject<{
498
+ kind: z.ZodLiteral<"received">;
499
+ key: z.ZodString;
500
+ from: z.ZodObject<{
501
+ kind: z.ZodString;
502
+ name: z.ZodOptional<z.ZodString>;
503
+ agent: z.ZodOptional<z.ZodString>;
504
+ /** Sent from another device of the account: which one, as it names itself. */
505
+ device: z.ZodOptional<z.ZodObject<{
506
+ id: z.ZodString;
507
+ name: z.ZodString;
508
+ }, "strip", z.ZodTypeAny, {
509
+ id: string;
510
+ name: string;
511
+ }, {
512
+ id: string;
513
+ name: string;
514
+ }>>;
515
+ /** Where the sender takes an answer. */
516
+ replyTo: z.ZodOptional<z.ZodObject<{
517
+ deviceId: z.ZodOptional<z.ZodString>;
518
+ workspaceId: z.ZodString;
519
+ tabId: z.ZodString;
520
+ }, "strip", z.ZodTypeAny, {
521
+ workspaceId: string;
522
+ tabId: string;
523
+ deviceId?: string | undefined;
524
+ }, {
525
+ workspaceId: string;
526
+ tabId: string;
527
+ deviceId?: string | undefined;
528
+ }>>;
529
+ }, "strip", z.ZodTypeAny, {
530
+ kind: string;
531
+ name?: string | undefined;
532
+ agent?: string | undefined;
533
+ device?: {
534
+ id: string;
535
+ name: string;
536
+ } | undefined;
537
+ replyTo?: {
538
+ workspaceId: string;
539
+ tabId: string;
540
+ deviceId?: string | undefined;
541
+ } | undefined;
542
+ }, {
543
+ kind: string;
544
+ name?: string | undefined;
545
+ agent?: string | undefined;
546
+ device?: {
547
+ id: string;
548
+ name: string;
549
+ } | undefined;
550
+ replyTo?: {
551
+ workspaceId: string;
552
+ tabId: string;
553
+ deviceId?: string | undefined;
554
+ } | undefined;
555
+ }>;
556
+ text: z.ZodString;
557
+ at: z.ZodOptional<z.ZodNumber>;
558
+ }, "strip", z.ZodTypeAny, {
559
+ from: {
560
+ kind: string;
561
+ name?: string | undefined;
562
+ agent?: string | undefined;
563
+ device?: {
564
+ id: string;
565
+ name: string;
566
+ } | undefined;
567
+ replyTo?: {
568
+ workspaceId: string;
569
+ tabId: string;
570
+ deviceId?: string | undefined;
571
+ } | undefined;
572
+ };
573
+ kind: "received";
574
+ key: string;
575
+ text: string;
576
+ at?: number | undefined;
577
+ }, {
578
+ from: {
579
+ kind: string;
580
+ name?: string | undefined;
581
+ agent?: string | undefined;
582
+ device?: {
583
+ id: string;
584
+ name: string;
585
+ } | undefined;
586
+ replyTo?: {
587
+ workspaceId: string;
588
+ tabId: string;
589
+ deviceId?: string | undefined;
590
+ } | undefined;
591
+ };
592
+ kind: "received";
593
+ key: string;
594
+ text: string;
595
+ at?: number | undefined;
596
+ }>, z.ZodObject<{
597
+ kind: z.ZodLiteral<"task_end">;
598
+ key: z.ZodString;
599
+ taskId: z.ZodString;
600
+ status: z.ZodString;
601
+ description: z.ZodOptional<z.ZodString>;
602
+ taskType: z.ZodOptional<z.ZodString>;
603
+ summary: z.ZodOptional<z.ZodString>;
604
+ toolUseId: z.ZodOptional<z.ZodString>;
605
+ wakes: z.ZodOptional<z.ZodBoolean>;
606
+ at: z.ZodOptional<z.ZodNumber>;
607
+ }, "strip", z.ZodTypeAny, {
608
+ status: string;
609
+ kind: "task_end";
610
+ key: string;
611
+ taskId: string;
612
+ at?: number | undefined;
613
+ toolUseId?: string | undefined;
614
+ description?: string | undefined;
615
+ taskType?: string | undefined;
616
+ summary?: string | undefined;
617
+ wakes?: boolean | undefined;
618
+ }, {
619
+ status: string;
620
+ kind: "task_end";
621
+ key: string;
622
+ taskId: string;
623
+ at?: number | undefined;
624
+ toolUseId?: string | undefined;
625
+ description?: string | undefined;
626
+ taskType?: string | undefined;
627
+ summary?: string | undefined;
628
+ wakes?: boolean | undefined;
629
+ }>, z.ZodObject<{
630
+ kind: z.ZodLiteral<"shell">;
631
+ key: z.ZodString;
632
+ command: z.ZodString;
633
+ stdout: z.ZodOptional<z.ZodString>;
634
+ stderr: z.ZodOptional<z.ZodString>;
635
+ at: z.ZodOptional<z.ZodNumber>;
636
+ }, "strip", z.ZodTypeAny, {
637
+ kind: "shell";
638
+ key: string;
639
+ command: string;
640
+ at?: number | undefined;
641
+ stdout?: string | undefined;
642
+ stderr?: string | undefined;
643
+ }, {
644
+ kind: "shell";
645
+ key: string;
646
+ command: string;
647
+ at?: number | undefined;
648
+ stdout?: string | undefined;
649
+ stderr?: string | undefined;
650
+ }>, z.ZodObject<{
651
+ kind: z.ZodEffects<z.ZodString, string, string>;
652
+ key: z.ZodString;
653
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
654
+ kind: z.ZodEffects<z.ZodString, string, string>;
655
+ key: z.ZodString;
656
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
657
+ kind: z.ZodEffects<z.ZodString, string, string>;
658
+ key: z.ZodString;
659
+ }, z.ZodTypeAny, "passthrough">>]>;
660
+ export type ViewItem = z.infer<typeof ViewItemSchema>;
661
+ /** Most characters of a tool's result text sent; the rest is cut (`truncated`). */
662
+ export declare const MAX_RESULT_TEXT: number;
663
+ export declare const ViewToolCallSchema: z.ZodObject<{
664
+ id: z.ZodString;
665
+ name: z.ZodString;
666
+ displayName: z.ZodOptional<z.ZodString>;
667
+ input: z.ZodUnknown;
668
+ /** streaming, running, done, error, denied, stopped. */
669
+ status: z.ZodString;
670
+ result: z.ZodOptional<z.ZodObject<{
671
+ text: z.ZodString;
672
+ isError: z.ZodBoolean;
673
+ /** The program's structured result: a run's stdout, an edit's patch. */
674
+ structured: z.ZodOptional<z.ZodUnknown>;
675
+ images: z.ZodArray<z.ZodObject<{
676
+ mediaType: z.ZodString;
677
+ /** How many bytes the image takes. */
678
+ bytes: z.ZodNumber;
679
+ }, "strip", z.ZodTypeAny, {
680
+ mediaType: string;
681
+ bytes: number;
682
+ }, {
683
+ mediaType: string;
684
+ bytes: number;
685
+ }>, "many">;
686
+ /** The text was longer than MAX_RESULT_TEXT and is cut there. */
687
+ truncated: z.ZodOptional<z.ZodBoolean>;
688
+ }, "strip", z.ZodTypeAny, {
689
+ text: string;
690
+ images: {
691
+ mediaType: string;
692
+ bytes: number;
693
+ }[];
694
+ isError: boolean;
695
+ structured?: unknown;
696
+ truncated?: boolean | undefined;
697
+ }, {
698
+ text: string;
699
+ images: {
700
+ mediaType: string;
701
+ bytes: number;
702
+ }[];
703
+ isError: boolean;
704
+ structured?: unknown;
705
+ truncated?: boolean | undefined;
706
+ }>>;
707
+ /** The agent call it runs under; null on the main thread. */
708
+ parentToolUseId: z.ZodNullable<z.ZodString>;
709
+ }, "strip", z.ZodTypeAny, {
710
+ status: string;
711
+ id: string;
712
+ name: string;
713
+ parentToolUseId: string | null;
714
+ displayName?: string | undefined;
715
+ input?: unknown;
716
+ result?: {
717
+ text: string;
718
+ images: {
719
+ mediaType: string;
720
+ bytes: number;
721
+ }[];
722
+ isError: boolean;
723
+ structured?: unknown;
724
+ truncated?: boolean | undefined;
725
+ } | undefined;
726
+ }, {
727
+ status: string;
728
+ id: string;
729
+ name: string;
730
+ parentToolUseId: string | null;
731
+ displayName?: string | undefined;
732
+ input?: unknown;
733
+ result?: {
734
+ text: string;
735
+ images: {
736
+ mediaType: string;
737
+ bytes: number;
738
+ }[];
739
+ isError: boolean;
740
+ structured?: unknown;
741
+ truncated?: boolean | undefined;
742
+ } | undefined;
743
+ }>;
744
+ export type ViewToolCall = z.infer<typeof ViewToolCallSchema>;
745
+ /** A tool the program asks to run, which the user allows or denies. */
746
+ export declare const ViewPermissionSchema: z.ZodObject<{
747
+ requestId: z.ZodString;
748
+ toolName: z.ZodString;
749
+ displayName: z.ZodOptional<z.ZodString>;
750
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
751
+ description: z.ZodOptional<z.ZodString>;
752
+ decisionReason: z.ZodOptional<z.ZodString>;
753
+ toolUseId: z.ZodOptional<z.ZodString>;
754
+ /** A subagent's request. */
755
+ agentId: z.ZodOptional<z.ZodString>;
756
+ /** The call as the card previews it, when the input alone does not tell it. */
757
+ preview: z.ZodOptional<z.ZodObject<{
758
+ id: z.ZodString;
759
+ name: z.ZodString;
760
+ displayName: z.ZodOptional<z.ZodString>;
761
+ input: z.ZodUnknown;
762
+ /** streaming, running, done, error, denied, stopped. */
763
+ status: z.ZodString;
764
+ result: z.ZodOptional<z.ZodObject<{
765
+ text: z.ZodString;
766
+ isError: z.ZodBoolean;
767
+ /** The program's structured result: a run's stdout, an edit's patch. */
768
+ structured: z.ZodOptional<z.ZodUnknown>;
769
+ images: z.ZodArray<z.ZodObject<{
770
+ mediaType: z.ZodString;
771
+ /** How many bytes the image takes. */
772
+ bytes: z.ZodNumber;
773
+ }, "strip", z.ZodTypeAny, {
774
+ mediaType: string;
775
+ bytes: number;
776
+ }, {
777
+ mediaType: string;
778
+ bytes: number;
779
+ }>, "many">;
780
+ /** The text was longer than MAX_RESULT_TEXT and is cut there. */
781
+ truncated: z.ZodOptional<z.ZodBoolean>;
782
+ }, "strip", z.ZodTypeAny, {
783
+ text: string;
784
+ images: {
785
+ mediaType: string;
786
+ bytes: number;
787
+ }[];
788
+ isError: boolean;
789
+ structured?: unknown;
790
+ truncated?: boolean | undefined;
791
+ }, {
792
+ text: string;
793
+ images: {
794
+ mediaType: string;
795
+ bytes: number;
796
+ }[];
797
+ isError: boolean;
798
+ structured?: unknown;
799
+ truncated?: boolean | undefined;
800
+ }>>;
801
+ /** The agent call it runs under; null on the main thread. */
802
+ parentToolUseId: z.ZodNullable<z.ZodString>;
803
+ }, "strip", z.ZodTypeAny, {
804
+ status: string;
805
+ id: string;
806
+ name: string;
807
+ parentToolUseId: string | null;
808
+ displayName?: string | undefined;
809
+ input?: unknown;
810
+ result?: {
811
+ text: string;
812
+ images: {
813
+ mediaType: string;
814
+ bytes: number;
815
+ }[];
816
+ isError: boolean;
817
+ structured?: unknown;
818
+ truncated?: boolean | undefined;
819
+ } | undefined;
820
+ }, {
821
+ status: string;
822
+ id: string;
823
+ name: string;
824
+ parentToolUseId: string | null;
825
+ displayName?: string | undefined;
826
+ input?: unknown;
827
+ result?: {
828
+ text: string;
829
+ images: {
830
+ mediaType: string;
831
+ bytes: number;
832
+ }[];
833
+ isError: boolean;
834
+ structured?: unknown;
835
+ truncated?: boolean | undefined;
836
+ } | undefined;
837
+ }>>;
838
+ /**
839
+ * What "always allow" would add, one choice each, in the serving
840
+ * device's words ("Allow Bash(npm test:*) in this folder"): chat.answer
841
+ * picks them by index.
842
+ */
843
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
844
+ label: z.ZodString;
845
+ }, "strip", z.ZodTypeAny, {
846
+ label: string;
847
+ }, {
848
+ label: string;
849
+ }>, "many">>;
850
+ }, "strip", z.ZodTypeAny, {
851
+ input: Record<string, unknown>;
852
+ requestId: string;
853
+ toolName: string;
854
+ toolUseId?: string | undefined;
855
+ description?: string | undefined;
856
+ displayName?: string | undefined;
857
+ decisionReason?: string | undefined;
858
+ agentId?: string | undefined;
859
+ preview?: {
860
+ status: string;
861
+ id: string;
862
+ name: string;
863
+ parentToolUseId: string | null;
864
+ displayName?: string | undefined;
865
+ input?: unknown;
866
+ result?: {
867
+ text: string;
868
+ images: {
869
+ mediaType: string;
870
+ bytes: number;
871
+ }[];
872
+ isError: boolean;
873
+ structured?: unknown;
874
+ truncated?: boolean | undefined;
875
+ } | undefined;
876
+ } | undefined;
877
+ suggestions?: {
878
+ label: string;
879
+ }[] | undefined;
880
+ }, {
881
+ input: Record<string, unknown>;
882
+ requestId: string;
883
+ toolName: string;
884
+ toolUseId?: string | undefined;
885
+ description?: string | undefined;
886
+ displayName?: string | undefined;
887
+ decisionReason?: string | undefined;
888
+ agentId?: string | undefined;
889
+ preview?: {
890
+ status: string;
891
+ id: string;
892
+ name: string;
893
+ parentToolUseId: string | null;
894
+ displayName?: string | undefined;
895
+ input?: unknown;
896
+ result?: {
897
+ text: string;
898
+ images: {
899
+ mediaType: string;
900
+ bytes: number;
901
+ }[];
902
+ isError: boolean;
903
+ structured?: unknown;
904
+ truncated?: boolean | undefined;
905
+ } | undefined;
906
+ } | undefined;
907
+ suggestions?: {
908
+ label: string;
909
+ }[] | undefined;
910
+ }>;
911
+ export type ViewPermission = z.infer<typeof ViewPermissionSchema>;
912
+ /** A task the program runs beside the turn: a background run, a subagent. */
913
+ export declare const ViewTaskSchema: z.ZodObject<{
914
+ taskId: z.ZodString;
915
+ type: z.ZodString;
916
+ description: z.ZodString;
917
+ status: z.ZodString;
918
+ toolUseId: z.ZodOptional<z.ZodString>;
919
+ startedAt: z.ZodOptional<z.ZodNumber>;
920
+ endedAt: z.ZodOptional<z.ZodNumber>;
921
+ summary: z.ZodOptional<z.ZodString>;
922
+ activity: z.ZodOptional<z.ZodString>;
923
+ }, "strip", z.ZodTypeAny, {
924
+ type: string;
925
+ status: string;
926
+ taskId: string;
927
+ description: string;
928
+ toolUseId?: string | undefined;
929
+ summary?: string | undefined;
930
+ startedAt?: number | undefined;
931
+ endedAt?: number | undefined;
932
+ activity?: string | undefined;
933
+ }, {
934
+ type: string;
935
+ status: string;
936
+ taskId: string;
937
+ description: string;
938
+ toolUseId?: string | undefined;
939
+ summary?: string | undefined;
940
+ startedAt?: number | undefined;
941
+ endedAt?: number | undefined;
942
+ activity?: string | undefined;
943
+ }>;
944
+ export type ViewTask = z.infer<typeof ViewTaskSchema>;
945
+ /** The reply being written: what the program streamed of its next message so far. */
946
+ export declare const ViewStreamingSchema: z.ZodObject<{
947
+ messageId: z.ZodString;
948
+ blocks: z.ZodArray<z.ZodObject<{
949
+ type: z.ZodEnum<["text", "thinking", "tool_use"]>;
950
+ text: z.ZodString;
951
+ toolUseId: z.ZodOptional<z.ZodString>;
952
+ }, "strip", z.ZodTypeAny, {
953
+ type: "text" | "thinking" | "tool_use";
954
+ text: string;
955
+ toolUseId?: string | undefined;
956
+ }, {
957
+ type: "text" | "thinking" | "tool_use";
958
+ text: string;
959
+ toolUseId?: string | undefined;
960
+ }>, "many">;
961
+ }, "strip", z.ZodTypeAny, {
962
+ messageId: string;
963
+ blocks: {
964
+ type: "text" | "thinking" | "tool_use";
965
+ text: string;
966
+ toolUseId?: string | undefined;
967
+ }[];
968
+ }, {
969
+ messageId: string;
970
+ blocks: {
971
+ type: "text" | "thinking" | "tool_use";
972
+ text: string;
973
+ toolUseId?: string | undefined;
974
+ }[];
975
+ }>;
976
+ export type ViewStreaming = z.infer<typeof ViewStreamingSchema>;
977
+ /** Where a chat stands, apart from its messages. */
978
+ export declare const ChatStatusSchema: z.ZodObject<{
979
+ agent: z.ZodEnum<["claude", "codex"]>;
980
+ title: z.ZodString;
981
+ /** The model it runs, as its program names it. */
982
+ model: z.ZodOptional<z.ZodString>;
983
+ effort: z.ZodOptional<z.ZodString>;
984
+ permissionMode: z.ZodOptional<z.ZodString>;
985
+ /** A turn is under way. */
986
+ running: z.ZodBoolean;
987
+ process: z.ZodEnum<["none", "running", "exited"]>;
988
+ turn: z.ZodNullable<z.ZodObject<{
989
+ startedAt: z.ZodOptional<z.ZodNumber>;
990
+ outputTokens: z.ZodNumber;
991
+ /** requesting, compacting… */
992
+ status: z.ZodOptional<z.ZodString>;
993
+ }, "strip", z.ZodTypeAny, {
994
+ outputTokens: number;
995
+ status?: string | undefined;
996
+ startedAt?: number | undefined;
997
+ }, {
998
+ outputTokens: number;
999
+ status?: string | undefined;
1000
+ startedAt?: number | undefined;
1001
+ }>>;
1002
+ streaming: z.ZodNullable<z.ZodObject<{
1003
+ messageId: z.ZodString;
1004
+ blocks: z.ZodArray<z.ZodObject<{
1005
+ type: z.ZodEnum<["text", "thinking", "tool_use"]>;
1006
+ text: z.ZodString;
1007
+ toolUseId: z.ZodOptional<z.ZodString>;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ type: "text" | "thinking" | "tool_use";
1010
+ text: string;
1011
+ toolUseId?: string | undefined;
1012
+ }, {
1013
+ type: "text" | "thinking" | "tool_use";
1014
+ text: string;
1015
+ toolUseId?: string | undefined;
1016
+ }>, "many">;
1017
+ }, "strip", z.ZodTypeAny, {
1018
+ messageId: string;
1019
+ blocks: {
1020
+ type: "text" | "thinking" | "tool_use";
1021
+ text: string;
1022
+ toolUseId?: string | undefined;
1023
+ }[];
1024
+ }, {
1025
+ messageId: string;
1026
+ blocks: {
1027
+ type: "text" | "thinking" | "tool_use";
1028
+ text: string;
1029
+ toolUseId?: string | undefined;
1030
+ }[];
1031
+ }>>;
1032
+ permissions: z.ZodArray<z.ZodObject<{
1033
+ requestId: z.ZodString;
1034
+ toolName: z.ZodString;
1035
+ displayName: z.ZodOptional<z.ZodString>;
1036
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1037
+ description: z.ZodOptional<z.ZodString>;
1038
+ decisionReason: z.ZodOptional<z.ZodString>;
1039
+ toolUseId: z.ZodOptional<z.ZodString>;
1040
+ /** A subagent's request. */
1041
+ agentId: z.ZodOptional<z.ZodString>;
1042
+ /** The call as the card previews it, when the input alone does not tell it. */
1043
+ preview: z.ZodOptional<z.ZodObject<{
1044
+ id: z.ZodString;
1045
+ name: z.ZodString;
1046
+ displayName: z.ZodOptional<z.ZodString>;
1047
+ input: z.ZodUnknown;
1048
+ /** streaming, running, done, error, denied, stopped. */
1049
+ status: z.ZodString;
1050
+ result: z.ZodOptional<z.ZodObject<{
1051
+ text: z.ZodString;
1052
+ isError: z.ZodBoolean;
1053
+ /** The program's structured result: a run's stdout, an edit's patch. */
1054
+ structured: z.ZodOptional<z.ZodUnknown>;
1055
+ images: z.ZodArray<z.ZodObject<{
1056
+ mediaType: z.ZodString;
1057
+ /** How many bytes the image takes. */
1058
+ bytes: z.ZodNumber;
1059
+ }, "strip", z.ZodTypeAny, {
1060
+ mediaType: string;
1061
+ bytes: number;
1062
+ }, {
1063
+ mediaType: string;
1064
+ bytes: number;
1065
+ }>, "many">;
1066
+ /** The text was longer than MAX_RESULT_TEXT and is cut there. */
1067
+ truncated: z.ZodOptional<z.ZodBoolean>;
1068
+ }, "strip", z.ZodTypeAny, {
1069
+ text: string;
1070
+ images: {
1071
+ mediaType: string;
1072
+ bytes: number;
1073
+ }[];
1074
+ isError: boolean;
1075
+ structured?: unknown;
1076
+ truncated?: boolean | undefined;
1077
+ }, {
1078
+ text: string;
1079
+ images: {
1080
+ mediaType: string;
1081
+ bytes: number;
1082
+ }[];
1083
+ isError: boolean;
1084
+ structured?: unknown;
1085
+ truncated?: boolean | undefined;
1086
+ }>>;
1087
+ /** The agent call it runs under; null on the main thread. */
1088
+ parentToolUseId: z.ZodNullable<z.ZodString>;
1089
+ }, "strip", z.ZodTypeAny, {
1090
+ status: string;
1091
+ id: string;
1092
+ name: string;
1093
+ parentToolUseId: string | null;
1094
+ displayName?: string | undefined;
1095
+ input?: unknown;
1096
+ result?: {
1097
+ text: string;
1098
+ images: {
1099
+ mediaType: string;
1100
+ bytes: number;
1101
+ }[];
1102
+ isError: boolean;
1103
+ structured?: unknown;
1104
+ truncated?: boolean | undefined;
1105
+ } | undefined;
1106
+ }, {
1107
+ status: string;
1108
+ id: string;
1109
+ name: string;
1110
+ parentToolUseId: string | null;
1111
+ displayName?: string | undefined;
1112
+ input?: unknown;
1113
+ result?: {
1114
+ text: string;
1115
+ images: {
1116
+ mediaType: string;
1117
+ bytes: number;
1118
+ }[];
1119
+ isError: boolean;
1120
+ structured?: unknown;
1121
+ truncated?: boolean | undefined;
1122
+ } | undefined;
1123
+ }>>;
1124
+ /**
1125
+ * What "always allow" would add, one choice each, in the serving
1126
+ * device's words ("Allow Bash(npm test:*) in this folder"): chat.answer
1127
+ * picks them by index.
1128
+ */
1129
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1130
+ label: z.ZodString;
1131
+ }, "strip", z.ZodTypeAny, {
1132
+ label: string;
1133
+ }, {
1134
+ label: string;
1135
+ }>, "many">>;
1136
+ }, "strip", z.ZodTypeAny, {
1137
+ input: Record<string, unknown>;
1138
+ requestId: string;
1139
+ toolName: string;
1140
+ toolUseId?: string | undefined;
1141
+ description?: string | undefined;
1142
+ displayName?: string | undefined;
1143
+ decisionReason?: string | undefined;
1144
+ agentId?: string | undefined;
1145
+ preview?: {
1146
+ status: string;
1147
+ id: string;
1148
+ name: string;
1149
+ parentToolUseId: string | null;
1150
+ displayName?: string | undefined;
1151
+ input?: unknown;
1152
+ result?: {
1153
+ text: string;
1154
+ images: {
1155
+ mediaType: string;
1156
+ bytes: number;
1157
+ }[];
1158
+ isError: boolean;
1159
+ structured?: unknown;
1160
+ truncated?: boolean | undefined;
1161
+ } | undefined;
1162
+ } | undefined;
1163
+ suggestions?: {
1164
+ label: string;
1165
+ }[] | undefined;
1166
+ }, {
1167
+ input: Record<string, unknown>;
1168
+ requestId: string;
1169
+ toolName: string;
1170
+ toolUseId?: string | undefined;
1171
+ description?: string | undefined;
1172
+ displayName?: string | undefined;
1173
+ decisionReason?: string | undefined;
1174
+ agentId?: string | undefined;
1175
+ preview?: {
1176
+ status: string;
1177
+ id: string;
1178
+ name: string;
1179
+ parentToolUseId: string | null;
1180
+ displayName?: string | undefined;
1181
+ input?: unknown;
1182
+ result?: {
1183
+ text: string;
1184
+ images: {
1185
+ mediaType: string;
1186
+ bytes: number;
1187
+ }[];
1188
+ isError: boolean;
1189
+ structured?: unknown;
1190
+ truncated?: boolean | undefined;
1191
+ } | undefined;
1192
+ } | undefined;
1193
+ suggestions?: {
1194
+ label: string;
1195
+ }[] | undefined;
1196
+ }>, "many">;
1197
+ }, "strip", z.ZodTypeAny, {
1198
+ agent: "claude" | "codex";
1199
+ title: string;
1200
+ running: boolean;
1201
+ process: "running" | "none" | "exited";
1202
+ turn: {
1203
+ outputTokens: number;
1204
+ status?: string | undefined;
1205
+ startedAt?: number | undefined;
1206
+ } | null;
1207
+ streaming: {
1208
+ messageId: string;
1209
+ blocks: {
1210
+ type: "text" | "thinking" | "tool_use";
1211
+ text: string;
1212
+ toolUseId?: string | undefined;
1213
+ }[];
1214
+ } | null;
1215
+ permissions: {
1216
+ input: Record<string, unknown>;
1217
+ requestId: string;
1218
+ toolName: string;
1219
+ toolUseId?: string | undefined;
1220
+ description?: string | undefined;
1221
+ displayName?: string | undefined;
1222
+ decisionReason?: string | undefined;
1223
+ agentId?: string | undefined;
1224
+ preview?: {
1225
+ status: string;
1226
+ id: string;
1227
+ name: string;
1228
+ parentToolUseId: string | null;
1229
+ displayName?: string | undefined;
1230
+ input?: unknown;
1231
+ result?: {
1232
+ text: string;
1233
+ images: {
1234
+ mediaType: string;
1235
+ bytes: number;
1236
+ }[];
1237
+ isError: boolean;
1238
+ structured?: unknown;
1239
+ truncated?: boolean | undefined;
1240
+ } | undefined;
1241
+ } | undefined;
1242
+ suggestions?: {
1243
+ label: string;
1244
+ }[] | undefined;
1245
+ }[];
1246
+ model?: string | undefined;
1247
+ effort?: string | undefined;
1248
+ permissionMode?: string | undefined;
1249
+ }, {
1250
+ agent: "claude" | "codex";
1251
+ title: string;
1252
+ running: boolean;
1253
+ process: "running" | "none" | "exited";
1254
+ turn: {
1255
+ outputTokens: number;
1256
+ status?: string | undefined;
1257
+ startedAt?: number | undefined;
1258
+ } | null;
1259
+ streaming: {
1260
+ messageId: string;
1261
+ blocks: {
1262
+ type: "text" | "thinking" | "tool_use";
1263
+ text: string;
1264
+ toolUseId?: string | undefined;
1265
+ }[];
1266
+ } | null;
1267
+ permissions: {
1268
+ input: Record<string, unknown>;
1269
+ requestId: string;
1270
+ toolName: string;
1271
+ toolUseId?: string | undefined;
1272
+ description?: string | undefined;
1273
+ displayName?: string | undefined;
1274
+ decisionReason?: string | undefined;
1275
+ agentId?: string | undefined;
1276
+ preview?: {
1277
+ status: string;
1278
+ id: string;
1279
+ name: string;
1280
+ parentToolUseId: string | null;
1281
+ displayName?: string | undefined;
1282
+ input?: unknown;
1283
+ result?: {
1284
+ text: string;
1285
+ images: {
1286
+ mediaType: string;
1287
+ bytes: number;
1288
+ }[];
1289
+ isError: boolean;
1290
+ structured?: unknown;
1291
+ truncated?: boolean | undefined;
1292
+ } | undefined;
1293
+ } | undefined;
1294
+ suggestions?: {
1295
+ label: string;
1296
+ }[] | undefined;
1297
+ }[];
1298
+ model?: string | undefined;
1299
+ effort?: string | undefined;
1300
+ permissionMode?: string | undefined;
1301
+ }>;
1302
+ export type ChatStatus = z.infer<typeof ChatStatusSchema>;
1303
+ /** One step of the agent's to-do list. */
1304
+ export declare const ViewTodoSchema: z.ZodObject<{
1305
+ content: z.ZodString;
1306
+ /** pending, in_progress or completed. */
1307
+ status: z.ZodString;
1308
+ }, "strip", z.ZodTypeAny, {
1309
+ status: string;
1310
+ content: string;
1311
+ }, {
1312
+ status: string;
1313
+ content: string;
1314
+ }>;
1315
+ /** A subagent the turn called (an Agent tool call). */
1316
+ export declare const ViewAgentRowSchema: z.ZodObject<{
1317
+ toolUseId: z.ZodString;
1318
+ description: z.ZodString;
1319
+ /** running, completed, failed or stopped. */
1320
+ status: z.ZodString;
1321
+ startedAt: z.ZodOptional<z.ZodNumber>;
1322
+ endedAt: z.ZodOptional<z.ZodNumber>;
1323
+ }, "strip", z.ZodTypeAny, {
1324
+ status: string;
1325
+ toolUseId: string;
1326
+ description: string;
1327
+ startedAt?: number | undefined;
1328
+ endedAt?: number | undefined;
1329
+ }, {
1330
+ status: string;
1331
+ toolUseId: string;
1332
+ description: string;
1333
+ startedAt?: number | undefined;
1334
+ endedAt?: number | undefined;
1335
+ }>;
1336
+ /** A goal the chat works toward (/goal), and where it stands. */
1337
+ export declare const ViewGoalSchema: z.ZodObject<{
1338
+ condition: z.ZodString;
1339
+ /** active, paused, met or failed. */
1340
+ status: z.ZodString;
1341
+ setAt: z.ZodOptional<z.ZodNumber>;
1342
+ /** How many checks found it unmet so far. */
1343
+ checks: z.ZodNumber;
1344
+ /** Once it ended: why. */
1345
+ reason: z.ZodOptional<z.ZodString>;
1346
+ }, "strip", z.ZodTypeAny, {
1347
+ status: string;
1348
+ condition: string;
1349
+ checks: number;
1350
+ setAt?: number | undefined;
1351
+ reason?: string | undefined;
1352
+ }, {
1353
+ status: string;
1354
+ condition: string;
1355
+ checks: number;
1356
+ setAt?: number | undefined;
1357
+ reason?: string | undefined;
1358
+ }>;
1359
+ export type ViewGoal = z.infer<typeof ViewGoalSchema>;
1360
+ /**
1361
+ * What the chat's side panel shows beside the conversation: the to-do
1362
+ * list, the tasks and subagents, the files it changed, the context it
1363
+ * fills, what it cost, and its goal.
1364
+ */
1365
+ export declare const ChatPanelSchema: z.ZodObject<{
1366
+ todos: z.ZodArray<z.ZodObject<{
1367
+ content: z.ZodString;
1368
+ /** pending, in_progress or completed. */
1369
+ status: z.ZodString;
1370
+ }, "strip", z.ZodTypeAny, {
1371
+ status: string;
1372
+ content: string;
1373
+ }, {
1374
+ status: string;
1375
+ content: string;
1376
+ }>, "many">;
1377
+ /** Background runs and the like, by the program's task ids (chat.stopTask stops one). */
1378
+ tasks: z.ZodArray<z.ZodObject<{
1379
+ taskId: z.ZodString;
1380
+ type: z.ZodString;
1381
+ description: z.ZodString;
1382
+ status: z.ZodString;
1383
+ toolUseId: z.ZodOptional<z.ZodString>;
1384
+ startedAt: z.ZodOptional<z.ZodNumber>;
1385
+ endedAt: z.ZodOptional<z.ZodNumber>;
1386
+ summary: z.ZodOptional<z.ZodString>;
1387
+ activity: z.ZodOptional<z.ZodString>;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ type: string;
1390
+ status: string;
1391
+ taskId: string;
1392
+ description: string;
1393
+ toolUseId?: string | undefined;
1394
+ summary?: string | undefined;
1395
+ startedAt?: number | undefined;
1396
+ endedAt?: number | undefined;
1397
+ activity?: string | undefined;
1398
+ }, {
1399
+ type: string;
1400
+ status: string;
1401
+ taskId: string;
1402
+ description: string;
1403
+ toolUseId?: string | undefined;
1404
+ summary?: string | undefined;
1405
+ startedAt?: number | undefined;
1406
+ endedAt?: number | undefined;
1407
+ activity?: string | undefined;
1408
+ }>, "many">;
1409
+ agents: z.ZodArray<z.ZodObject<{
1410
+ toolUseId: z.ZodString;
1411
+ description: z.ZodString;
1412
+ /** running, completed, failed or stopped. */
1413
+ status: z.ZodString;
1414
+ startedAt: z.ZodOptional<z.ZodNumber>;
1415
+ endedAt: z.ZodOptional<z.ZodNumber>;
1416
+ }, "strip", z.ZodTypeAny, {
1417
+ status: string;
1418
+ toolUseId: string;
1419
+ description: string;
1420
+ startedAt?: number | undefined;
1421
+ endedAt?: number | undefined;
1422
+ }, {
1423
+ status: string;
1424
+ toolUseId: string;
1425
+ description: string;
1426
+ startedAt?: number | undefined;
1427
+ endedAt?: number | undefined;
1428
+ }>, "many">;
1429
+ changedFiles: z.ZodArray<z.ZodObject<{
1430
+ /** Absolute, on the serving device, as the chat's tool calls name it. */
1431
+ path: z.ZodString;
1432
+ added: z.ZodOptional<z.ZodNumber>;
1433
+ removed: z.ZodOptional<z.ZodNumber>;
1434
+ }, "strip", z.ZodTypeAny, {
1435
+ path: string;
1436
+ added?: number | undefined;
1437
+ removed?: number | undefined;
1438
+ }, {
1439
+ path: string;
1440
+ added?: number | undefined;
1441
+ removed?: number | undefined;
1442
+ }>, "many">;
1443
+ /** The context window: tokens in it, and how many it takes; null before the program said. */
1444
+ context: z.ZodNullable<z.ZodObject<{
1445
+ usedTokens: z.ZodNumber;
1446
+ maxTokens: z.ZodNumber;
1447
+ }, "strip", z.ZodTypeAny, {
1448
+ usedTokens: number;
1449
+ maxTokens: number;
1450
+ }, {
1451
+ usedTokens: number;
1452
+ maxTokens: number;
1453
+ }>>;
1454
+ /** What the conversation cost so far, in US dollars, when the program tells it. */
1455
+ costUsd: z.ZodOptional<z.ZodNumber>;
1456
+ goal: z.ZodNullable<z.ZodObject<{
1457
+ condition: z.ZodString;
1458
+ /** active, paused, met or failed. */
1459
+ status: z.ZodString;
1460
+ setAt: z.ZodOptional<z.ZodNumber>;
1461
+ /** How many checks found it unmet so far. */
1462
+ checks: z.ZodNumber;
1463
+ /** Once it ended: why. */
1464
+ reason: z.ZodOptional<z.ZodString>;
1465
+ }, "strip", z.ZodTypeAny, {
1466
+ status: string;
1467
+ condition: string;
1468
+ checks: number;
1469
+ setAt?: number | undefined;
1470
+ reason?: string | undefined;
1471
+ }, {
1472
+ status: string;
1473
+ condition: string;
1474
+ checks: number;
1475
+ setAt?: number | undefined;
1476
+ reason?: string | undefined;
1477
+ }>>;
1478
+ }, "strip", z.ZodTypeAny, {
1479
+ todos: {
1480
+ status: string;
1481
+ content: string;
1482
+ }[];
1483
+ tasks: {
1484
+ type: string;
1485
+ status: string;
1486
+ taskId: string;
1487
+ description: string;
1488
+ toolUseId?: string | undefined;
1489
+ summary?: string | undefined;
1490
+ startedAt?: number | undefined;
1491
+ endedAt?: number | undefined;
1492
+ activity?: string | undefined;
1493
+ }[];
1494
+ agents: {
1495
+ status: string;
1496
+ toolUseId: string;
1497
+ description: string;
1498
+ startedAt?: number | undefined;
1499
+ endedAt?: number | undefined;
1500
+ }[];
1501
+ changedFiles: {
1502
+ path: string;
1503
+ added?: number | undefined;
1504
+ removed?: number | undefined;
1505
+ }[];
1506
+ context: {
1507
+ usedTokens: number;
1508
+ maxTokens: number;
1509
+ } | null;
1510
+ goal: {
1511
+ status: string;
1512
+ condition: string;
1513
+ checks: number;
1514
+ setAt?: number | undefined;
1515
+ reason?: string | undefined;
1516
+ } | null;
1517
+ costUsd?: number | undefined;
1518
+ }, {
1519
+ todos: {
1520
+ status: string;
1521
+ content: string;
1522
+ }[];
1523
+ tasks: {
1524
+ type: string;
1525
+ status: string;
1526
+ taskId: string;
1527
+ description: string;
1528
+ toolUseId?: string | undefined;
1529
+ summary?: string | undefined;
1530
+ startedAt?: number | undefined;
1531
+ endedAt?: number | undefined;
1532
+ activity?: string | undefined;
1533
+ }[];
1534
+ agents: {
1535
+ status: string;
1536
+ toolUseId: string;
1537
+ description: string;
1538
+ startedAt?: number | undefined;
1539
+ endedAt?: number | undefined;
1540
+ }[];
1541
+ changedFiles: {
1542
+ path: string;
1543
+ added?: number | undefined;
1544
+ removed?: number | undefined;
1545
+ }[];
1546
+ context: {
1547
+ usedTokens: number;
1548
+ maxTokens: number;
1549
+ } | null;
1550
+ goal: {
1551
+ status: string;
1552
+ condition: string;
1553
+ checks: number;
1554
+ setAt?: number | undefined;
1555
+ reason?: string | undefined;
1556
+ } | null;
1557
+ costUsd?: number | undefined;
1558
+ }>;
1559
+ export type ChatPanel = z.infer<typeof ChatPanelSchema>;
1560
+ //# sourceMappingURL=view.d.ts.map