@azizbekdevuz/gitguard-schema 1.0.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/api.d.ts ADDED
@@ -0,0 +1,2545 @@
1
+ import { z } from 'zod';
2
+ import { type VerificationResult } from './plan.js';
3
+ export declare const CreateSessionRequestSchema: z.ZodObject<{
4
+ snapshot: z.ZodObject<{
5
+ version: z.ZodLiteral<1>;
6
+ timestamp: z.ZodString;
7
+ platform: z.ZodEnum<["win32", "darwin", "linux"]>;
8
+ repoRoot: z.ZodString;
9
+ gitDir: z.ZodString;
10
+ branch: z.ZodObject<{
11
+ head: z.ZodString;
12
+ oid: z.ZodString;
13
+ upstream: z.ZodOptional<z.ZodString>;
14
+ aheadBehind: z.ZodOptional<z.ZodObject<{
15
+ ahead: z.ZodNumber;
16
+ behind: z.ZodNumber;
17
+ }, "strip", z.ZodTypeAny, {
18
+ ahead: number;
19
+ behind: number;
20
+ }, {
21
+ ahead: number;
22
+ behind: number;
23
+ }>>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ head: string;
26
+ oid: string;
27
+ upstream?: string | undefined;
28
+ aheadBehind?: {
29
+ ahead: number;
30
+ behind: number;
31
+ } | undefined;
32
+ }, {
33
+ head: string;
34
+ oid: string;
35
+ upstream?: string | undefined;
36
+ aheadBehind?: {
37
+ ahead: number;
38
+ behind: number;
39
+ } | undefined;
40
+ }>;
41
+ isDetachedHead: z.ZodBoolean;
42
+ rebaseState: z.ZodObject<{
43
+ inProgress: z.ZodBoolean;
44
+ type: z.ZodEnum<["merge", "apply", "none"]>;
45
+ headName: z.ZodOptional<z.ZodString>;
46
+ onto: z.ZodOptional<z.ZodString>;
47
+ currentStep: z.ZodOptional<z.ZodNumber>;
48
+ totalSteps: z.ZodOptional<z.ZodNumber>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: "merge" | "apply" | "none";
51
+ inProgress: boolean;
52
+ headName?: string | undefined;
53
+ onto?: string | undefined;
54
+ currentStep?: number | undefined;
55
+ totalSteps?: number | undefined;
56
+ }, {
57
+ type: "merge" | "apply" | "none";
58
+ inProgress: boolean;
59
+ headName?: string | undefined;
60
+ onto?: string | undefined;
61
+ currentStep?: number | undefined;
62
+ totalSteps?: number | undefined;
63
+ }>;
64
+ unmergedFiles: z.ZodArray<z.ZodObject<{
65
+ path: z.ZodString;
66
+ stageOurs: z.ZodOptional<z.ZodString>;
67
+ stageTheirs: z.ZodOptional<z.ZodString>;
68
+ stageBase: z.ZodOptional<z.ZodString>;
69
+ conflictBlocks: z.ZodArray<z.ZodObject<{
70
+ startLine: z.ZodNumber;
71
+ endLine: z.ZodNumber;
72
+ oursContent: z.ZodString;
73
+ theirsContent: z.ZodString;
74
+ context: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ startLine: number;
77
+ endLine: number;
78
+ oursContent: string;
79
+ theirsContent: string;
80
+ context: string;
81
+ }, {
82
+ startLine: number;
83
+ endLine: number;
84
+ oursContent: string;
85
+ theirsContent: string;
86
+ context: string;
87
+ }>, "many">;
88
+ }, "strip", z.ZodTypeAny, {
89
+ path: string;
90
+ conflictBlocks: {
91
+ startLine: number;
92
+ endLine: number;
93
+ oursContent: string;
94
+ theirsContent: string;
95
+ context: string;
96
+ }[];
97
+ stageOurs?: string | undefined;
98
+ stageTheirs?: string | undefined;
99
+ stageBase?: string | undefined;
100
+ }, {
101
+ path: string;
102
+ conflictBlocks: {
103
+ startLine: number;
104
+ endLine: number;
105
+ oursContent: string;
106
+ theirsContent: string;
107
+ context: string;
108
+ }[];
109
+ stageOurs?: string | undefined;
110
+ stageTheirs?: string | undefined;
111
+ stageBase?: string | undefined;
112
+ }>, "many">;
113
+ stagedFiles: z.ZodArray<z.ZodString, "many">;
114
+ modifiedFiles: z.ZodArray<z.ZodString, "many">;
115
+ untrackedFiles: z.ZodArray<z.ZodString, "many">;
116
+ recentLog: z.ZodArray<z.ZodObject<{
117
+ hash: z.ZodString;
118
+ refs: z.ZodArray<z.ZodString, "many">;
119
+ message: z.ZodString;
120
+ }, "strip", z.ZodTypeAny, {
121
+ message: string;
122
+ hash: string;
123
+ refs: string[];
124
+ }, {
125
+ message: string;
126
+ hash: string;
127
+ refs: string[];
128
+ }>, "many">;
129
+ recentReflog: z.ZodArray<z.ZodObject<{
130
+ hash: z.ZodString;
131
+ selector: z.ZodString;
132
+ action: z.ZodString;
133
+ message: z.ZodString;
134
+ }, "strip", z.ZodTypeAny, {
135
+ message: string;
136
+ hash: string;
137
+ selector: string;
138
+ action: string;
139
+ }, {
140
+ message: string;
141
+ hash: string;
142
+ selector: string;
143
+ action: string;
144
+ }>, "many">;
145
+ commitGraph: z.ZodOptional<z.ZodString>;
146
+ diffStats: z.ZodOptional<z.ZodArray<z.ZodObject<{
147
+ path: z.ZodString;
148
+ additions: z.ZodNumber;
149
+ deletions: z.ZodNumber;
150
+ binary: z.ZodOptional<z.ZodBoolean>;
151
+ }, "strip", z.ZodTypeAny, {
152
+ path: string;
153
+ additions: number;
154
+ deletions: number;
155
+ binary?: boolean | undefined;
156
+ }, {
157
+ path: string;
158
+ additions: number;
159
+ deletions: number;
160
+ binary?: boolean | undefined;
161
+ }>, "many">>;
162
+ mergeHead: z.ZodOptional<z.ZodString>;
163
+ mergeMessage: z.ZodOptional<z.ZodString>;
164
+ rawStatus: z.ZodString;
165
+ rawBranches: z.ZodString;
166
+ }, "strip", z.ZodTypeAny, {
167
+ branch: {
168
+ head: string;
169
+ oid: string;
170
+ upstream?: string | undefined;
171
+ aheadBehind?: {
172
+ ahead: number;
173
+ behind: number;
174
+ } | undefined;
175
+ };
176
+ version: 1;
177
+ timestamp: string;
178
+ platform: "win32" | "darwin" | "linux";
179
+ repoRoot: string;
180
+ gitDir: string;
181
+ isDetachedHead: boolean;
182
+ rebaseState: {
183
+ type: "merge" | "apply" | "none";
184
+ inProgress: boolean;
185
+ headName?: string | undefined;
186
+ onto?: string | undefined;
187
+ currentStep?: number | undefined;
188
+ totalSteps?: number | undefined;
189
+ };
190
+ unmergedFiles: {
191
+ path: string;
192
+ conflictBlocks: {
193
+ startLine: number;
194
+ endLine: number;
195
+ oursContent: string;
196
+ theirsContent: string;
197
+ context: string;
198
+ }[];
199
+ stageOurs?: string | undefined;
200
+ stageTheirs?: string | undefined;
201
+ stageBase?: string | undefined;
202
+ }[];
203
+ stagedFiles: string[];
204
+ modifiedFiles: string[];
205
+ untrackedFiles: string[];
206
+ recentLog: {
207
+ message: string;
208
+ hash: string;
209
+ refs: string[];
210
+ }[];
211
+ recentReflog: {
212
+ message: string;
213
+ hash: string;
214
+ selector: string;
215
+ action: string;
216
+ }[];
217
+ rawStatus: string;
218
+ rawBranches: string;
219
+ commitGraph?: string | undefined;
220
+ diffStats?: {
221
+ path: string;
222
+ additions: number;
223
+ deletions: number;
224
+ binary?: boolean | undefined;
225
+ }[] | undefined;
226
+ mergeHead?: string | undefined;
227
+ mergeMessage?: string | undefined;
228
+ }, {
229
+ branch: {
230
+ head: string;
231
+ oid: string;
232
+ upstream?: string | undefined;
233
+ aheadBehind?: {
234
+ ahead: number;
235
+ behind: number;
236
+ } | undefined;
237
+ };
238
+ version: 1;
239
+ timestamp: string;
240
+ platform: "win32" | "darwin" | "linux";
241
+ repoRoot: string;
242
+ gitDir: string;
243
+ isDetachedHead: boolean;
244
+ rebaseState: {
245
+ type: "merge" | "apply" | "none";
246
+ inProgress: boolean;
247
+ headName?: string | undefined;
248
+ onto?: string | undefined;
249
+ currentStep?: number | undefined;
250
+ totalSteps?: number | undefined;
251
+ };
252
+ unmergedFiles: {
253
+ path: string;
254
+ conflictBlocks: {
255
+ startLine: number;
256
+ endLine: number;
257
+ oursContent: string;
258
+ theirsContent: string;
259
+ context: string;
260
+ }[];
261
+ stageOurs?: string | undefined;
262
+ stageTheirs?: string | undefined;
263
+ stageBase?: string | undefined;
264
+ }[];
265
+ stagedFiles: string[];
266
+ modifiedFiles: string[];
267
+ untrackedFiles: string[];
268
+ recentLog: {
269
+ message: string;
270
+ hash: string;
271
+ refs: string[];
272
+ }[];
273
+ recentReflog: {
274
+ message: string;
275
+ hash: string;
276
+ selector: string;
277
+ action: string;
278
+ }[];
279
+ rawStatus: string;
280
+ rawBranches: string;
281
+ commitGraph?: string | undefined;
282
+ diffStats?: {
283
+ path: string;
284
+ additions: number;
285
+ deletions: number;
286
+ binary?: boolean | undefined;
287
+ }[] | undefined;
288
+ mergeHead?: string | undefined;
289
+ mergeMessage?: string | undefined;
290
+ }>;
291
+ }, "strip", z.ZodTypeAny, {
292
+ snapshot: {
293
+ branch: {
294
+ head: string;
295
+ oid: string;
296
+ upstream?: string | undefined;
297
+ aheadBehind?: {
298
+ ahead: number;
299
+ behind: number;
300
+ } | undefined;
301
+ };
302
+ version: 1;
303
+ timestamp: string;
304
+ platform: "win32" | "darwin" | "linux";
305
+ repoRoot: string;
306
+ gitDir: string;
307
+ isDetachedHead: boolean;
308
+ rebaseState: {
309
+ type: "merge" | "apply" | "none";
310
+ inProgress: boolean;
311
+ headName?: string | undefined;
312
+ onto?: string | undefined;
313
+ currentStep?: number | undefined;
314
+ totalSteps?: number | undefined;
315
+ };
316
+ unmergedFiles: {
317
+ path: string;
318
+ conflictBlocks: {
319
+ startLine: number;
320
+ endLine: number;
321
+ oursContent: string;
322
+ theirsContent: string;
323
+ context: string;
324
+ }[];
325
+ stageOurs?: string | undefined;
326
+ stageTheirs?: string | undefined;
327
+ stageBase?: string | undefined;
328
+ }[];
329
+ stagedFiles: string[];
330
+ modifiedFiles: string[];
331
+ untrackedFiles: string[];
332
+ recentLog: {
333
+ message: string;
334
+ hash: string;
335
+ refs: string[];
336
+ }[];
337
+ recentReflog: {
338
+ message: string;
339
+ hash: string;
340
+ selector: string;
341
+ action: string;
342
+ }[];
343
+ rawStatus: string;
344
+ rawBranches: string;
345
+ commitGraph?: string | undefined;
346
+ diffStats?: {
347
+ path: string;
348
+ additions: number;
349
+ deletions: number;
350
+ binary?: boolean | undefined;
351
+ }[] | undefined;
352
+ mergeHead?: string | undefined;
353
+ mergeMessage?: string | undefined;
354
+ };
355
+ }, {
356
+ snapshot: {
357
+ branch: {
358
+ head: string;
359
+ oid: string;
360
+ upstream?: string | undefined;
361
+ aheadBehind?: {
362
+ ahead: number;
363
+ behind: number;
364
+ } | undefined;
365
+ };
366
+ version: 1;
367
+ timestamp: string;
368
+ platform: "win32" | "darwin" | "linux";
369
+ repoRoot: string;
370
+ gitDir: string;
371
+ isDetachedHead: boolean;
372
+ rebaseState: {
373
+ type: "merge" | "apply" | "none";
374
+ inProgress: boolean;
375
+ headName?: string | undefined;
376
+ onto?: string | undefined;
377
+ currentStep?: number | undefined;
378
+ totalSteps?: number | undefined;
379
+ };
380
+ unmergedFiles: {
381
+ path: string;
382
+ conflictBlocks: {
383
+ startLine: number;
384
+ endLine: number;
385
+ oursContent: string;
386
+ theirsContent: string;
387
+ context: string;
388
+ }[];
389
+ stageOurs?: string | undefined;
390
+ stageTheirs?: string | undefined;
391
+ stageBase?: string | undefined;
392
+ }[];
393
+ stagedFiles: string[];
394
+ modifiedFiles: string[];
395
+ untrackedFiles: string[];
396
+ recentLog: {
397
+ message: string;
398
+ hash: string;
399
+ refs: string[];
400
+ }[];
401
+ recentReflog: {
402
+ message: string;
403
+ hash: string;
404
+ selector: string;
405
+ action: string;
406
+ }[];
407
+ rawStatus: string;
408
+ rawBranches: string;
409
+ commitGraph?: string | undefined;
410
+ diffStats?: {
411
+ path: string;
412
+ additions: number;
413
+ deletions: number;
414
+ binary?: boolean | undefined;
415
+ }[] | undefined;
416
+ mergeHead?: string | undefined;
417
+ mergeMessage?: string | undefined;
418
+ };
419
+ }>;
420
+ export type CreateSessionRequest = z.infer<typeof CreateSessionRequestSchema>;
421
+ export declare const CreateSessionResponseSchema: z.ZodObject<{
422
+ sessionId: z.ZodString;
423
+ }, "strip", z.ZodTypeAny, {
424
+ sessionId: string;
425
+ }, {
426
+ sessionId: string;
427
+ }>;
428
+ export type CreateSessionResponse = z.infer<typeof CreateSessionResponseSchema>;
429
+ export declare const TraceOutputSchema: z.ZodObject<{
430
+ stage: z.ZodString;
431
+ output: z.ZodUnknown;
432
+ createdAt: z.ZodString;
433
+ durationMs: z.ZodNullable<z.ZodNumber>;
434
+ }, "strip", z.ZodTypeAny, {
435
+ durationMs: number | null;
436
+ stage: string;
437
+ createdAt: string;
438
+ output?: unknown;
439
+ }, {
440
+ durationMs: number | null;
441
+ stage: string;
442
+ createdAt: string;
443
+ output?: unknown;
444
+ }>;
445
+ export type TraceOutput = z.infer<typeof TraceOutputSchema>;
446
+ export declare const SessionSummarySchema: z.ZodObject<{
447
+ id: z.ZodString;
448
+ title: z.ZodNullable<z.ZodString>;
449
+ createdAt: z.ZodString;
450
+ }, "strip", z.ZodTypeAny, {
451
+ id: string;
452
+ title: string | null;
453
+ createdAt: string;
454
+ }, {
455
+ id: string;
456
+ title: string | null;
457
+ createdAt: string;
458
+ }>;
459
+ export type SessionSummary = z.infer<typeof SessionSummarySchema>;
460
+ export declare const GetSessionResponseSchema: z.ZodObject<{
461
+ session: z.ZodObject<{
462
+ id: z.ZodString;
463
+ title: z.ZodNullable<z.ZodString>;
464
+ createdAt: z.ZodString;
465
+ }, "strip", z.ZodTypeAny, {
466
+ id: string;
467
+ title: string | null;
468
+ createdAt: string;
469
+ }, {
470
+ id: string;
471
+ title: string | null;
472
+ createdAt: string;
473
+ }>;
474
+ snapshot: z.ZodObject<{
475
+ version: z.ZodLiteral<1>;
476
+ timestamp: z.ZodString;
477
+ platform: z.ZodEnum<["win32", "darwin", "linux"]>;
478
+ repoRoot: z.ZodString;
479
+ gitDir: z.ZodString;
480
+ branch: z.ZodObject<{
481
+ head: z.ZodString;
482
+ oid: z.ZodString;
483
+ upstream: z.ZodOptional<z.ZodString>;
484
+ aheadBehind: z.ZodOptional<z.ZodObject<{
485
+ ahead: z.ZodNumber;
486
+ behind: z.ZodNumber;
487
+ }, "strip", z.ZodTypeAny, {
488
+ ahead: number;
489
+ behind: number;
490
+ }, {
491
+ ahead: number;
492
+ behind: number;
493
+ }>>;
494
+ }, "strip", z.ZodTypeAny, {
495
+ head: string;
496
+ oid: string;
497
+ upstream?: string | undefined;
498
+ aheadBehind?: {
499
+ ahead: number;
500
+ behind: number;
501
+ } | undefined;
502
+ }, {
503
+ head: string;
504
+ oid: string;
505
+ upstream?: string | undefined;
506
+ aheadBehind?: {
507
+ ahead: number;
508
+ behind: number;
509
+ } | undefined;
510
+ }>;
511
+ isDetachedHead: z.ZodBoolean;
512
+ rebaseState: z.ZodObject<{
513
+ inProgress: z.ZodBoolean;
514
+ type: z.ZodEnum<["merge", "apply", "none"]>;
515
+ headName: z.ZodOptional<z.ZodString>;
516
+ onto: z.ZodOptional<z.ZodString>;
517
+ currentStep: z.ZodOptional<z.ZodNumber>;
518
+ totalSteps: z.ZodOptional<z.ZodNumber>;
519
+ }, "strip", z.ZodTypeAny, {
520
+ type: "merge" | "apply" | "none";
521
+ inProgress: boolean;
522
+ headName?: string | undefined;
523
+ onto?: string | undefined;
524
+ currentStep?: number | undefined;
525
+ totalSteps?: number | undefined;
526
+ }, {
527
+ type: "merge" | "apply" | "none";
528
+ inProgress: boolean;
529
+ headName?: string | undefined;
530
+ onto?: string | undefined;
531
+ currentStep?: number | undefined;
532
+ totalSteps?: number | undefined;
533
+ }>;
534
+ unmergedFiles: z.ZodArray<z.ZodObject<{
535
+ path: z.ZodString;
536
+ stageOurs: z.ZodOptional<z.ZodString>;
537
+ stageTheirs: z.ZodOptional<z.ZodString>;
538
+ stageBase: z.ZodOptional<z.ZodString>;
539
+ conflictBlocks: z.ZodArray<z.ZodObject<{
540
+ startLine: z.ZodNumber;
541
+ endLine: z.ZodNumber;
542
+ oursContent: z.ZodString;
543
+ theirsContent: z.ZodString;
544
+ context: z.ZodString;
545
+ }, "strip", z.ZodTypeAny, {
546
+ startLine: number;
547
+ endLine: number;
548
+ oursContent: string;
549
+ theirsContent: string;
550
+ context: string;
551
+ }, {
552
+ startLine: number;
553
+ endLine: number;
554
+ oursContent: string;
555
+ theirsContent: string;
556
+ context: string;
557
+ }>, "many">;
558
+ }, "strip", z.ZodTypeAny, {
559
+ path: string;
560
+ conflictBlocks: {
561
+ startLine: number;
562
+ endLine: number;
563
+ oursContent: string;
564
+ theirsContent: string;
565
+ context: string;
566
+ }[];
567
+ stageOurs?: string | undefined;
568
+ stageTheirs?: string | undefined;
569
+ stageBase?: string | undefined;
570
+ }, {
571
+ path: string;
572
+ conflictBlocks: {
573
+ startLine: number;
574
+ endLine: number;
575
+ oursContent: string;
576
+ theirsContent: string;
577
+ context: string;
578
+ }[];
579
+ stageOurs?: string | undefined;
580
+ stageTheirs?: string | undefined;
581
+ stageBase?: string | undefined;
582
+ }>, "many">;
583
+ stagedFiles: z.ZodArray<z.ZodString, "many">;
584
+ modifiedFiles: z.ZodArray<z.ZodString, "many">;
585
+ untrackedFiles: z.ZodArray<z.ZodString, "many">;
586
+ recentLog: z.ZodArray<z.ZodObject<{
587
+ hash: z.ZodString;
588
+ refs: z.ZodArray<z.ZodString, "many">;
589
+ message: z.ZodString;
590
+ }, "strip", z.ZodTypeAny, {
591
+ message: string;
592
+ hash: string;
593
+ refs: string[];
594
+ }, {
595
+ message: string;
596
+ hash: string;
597
+ refs: string[];
598
+ }>, "many">;
599
+ recentReflog: z.ZodArray<z.ZodObject<{
600
+ hash: z.ZodString;
601
+ selector: z.ZodString;
602
+ action: z.ZodString;
603
+ message: z.ZodString;
604
+ }, "strip", z.ZodTypeAny, {
605
+ message: string;
606
+ hash: string;
607
+ selector: string;
608
+ action: string;
609
+ }, {
610
+ message: string;
611
+ hash: string;
612
+ selector: string;
613
+ action: string;
614
+ }>, "many">;
615
+ commitGraph: z.ZodOptional<z.ZodString>;
616
+ diffStats: z.ZodOptional<z.ZodArray<z.ZodObject<{
617
+ path: z.ZodString;
618
+ additions: z.ZodNumber;
619
+ deletions: z.ZodNumber;
620
+ binary: z.ZodOptional<z.ZodBoolean>;
621
+ }, "strip", z.ZodTypeAny, {
622
+ path: string;
623
+ additions: number;
624
+ deletions: number;
625
+ binary?: boolean | undefined;
626
+ }, {
627
+ path: string;
628
+ additions: number;
629
+ deletions: number;
630
+ binary?: boolean | undefined;
631
+ }>, "many">>;
632
+ mergeHead: z.ZodOptional<z.ZodString>;
633
+ mergeMessage: z.ZodOptional<z.ZodString>;
634
+ rawStatus: z.ZodString;
635
+ rawBranches: z.ZodString;
636
+ }, "strip", z.ZodTypeAny, {
637
+ branch: {
638
+ head: string;
639
+ oid: string;
640
+ upstream?: string | undefined;
641
+ aheadBehind?: {
642
+ ahead: number;
643
+ behind: number;
644
+ } | undefined;
645
+ };
646
+ version: 1;
647
+ timestamp: string;
648
+ platform: "win32" | "darwin" | "linux";
649
+ repoRoot: string;
650
+ gitDir: string;
651
+ isDetachedHead: boolean;
652
+ rebaseState: {
653
+ type: "merge" | "apply" | "none";
654
+ inProgress: boolean;
655
+ headName?: string | undefined;
656
+ onto?: string | undefined;
657
+ currentStep?: number | undefined;
658
+ totalSteps?: number | undefined;
659
+ };
660
+ unmergedFiles: {
661
+ path: string;
662
+ conflictBlocks: {
663
+ startLine: number;
664
+ endLine: number;
665
+ oursContent: string;
666
+ theirsContent: string;
667
+ context: string;
668
+ }[];
669
+ stageOurs?: string | undefined;
670
+ stageTheirs?: string | undefined;
671
+ stageBase?: string | undefined;
672
+ }[];
673
+ stagedFiles: string[];
674
+ modifiedFiles: string[];
675
+ untrackedFiles: string[];
676
+ recentLog: {
677
+ message: string;
678
+ hash: string;
679
+ refs: string[];
680
+ }[];
681
+ recentReflog: {
682
+ message: string;
683
+ hash: string;
684
+ selector: string;
685
+ action: string;
686
+ }[];
687
+ rawStatus: string;
688
+ rawBranches: string;
689
+ commitGraph?: string | undefined;
690
+ diffStats?: {
691
+ path: string;
692
+ additions: number;
693
+ deletions: number;
694
+ binary?: boolean | undefined;
695
+ }[] | undefined;
696
+ mergeHead?: string | undefined;
697
+ mergeMessage?: string | undefined;
698
+ }, {
699
+ branch: {
700
+ head: string;
701
+ oid: string;
702
+ upstream?: string | undefined;
703
+ aheadBehind?: {
704
+ ahead: number;
705
+ behind: number;
706
+ } | undefined;
707
+ };
708
+ version: 1;
709
+ timestamp: string;
710
+ platform: "win32" | "darwin" | "linux";
711
+ repoRoot: string;
712
+ gitDir: string;
713
+ isDetachedHead: boolean;
714
+ rebaseState: {
715
+ type: "merge" | "apply" | "none";
716
+ inProgress: boolean;
717
+ headName?: string | undefined;
718
+ onto?: string | undefined;
719
+ currentStep?: number | undefined;
720
+ totalSteps?: number | undefined;
721
+ };
722
+ unmergedFiles: {
723
+ path: string;
724
+ conflictBlocks: {
725
+ startLine: number;
726
+ endLine: number;
727
+ oursContent: string;
728
+ theirsContent: string;
729
+ context: string;
730
+ }[];
731
+ stageOurs?: string | undefined;
732
+ stageTheirs?: string | undefined;
733
+ stageBase?: string | undefined;
734
+ }[];
735
+ stagedFiles: string[];
736
+ modifiedFiles: string[];
737
+ untrackedFiles: string[];
738
+ recentLog: {
739
+ message: string;
740
+ hash: string;
741
+ refs: string[];
742
+ }[];
743
+ recentReflog: {
744
+ message: string;
745
+ hash: string;
746
+ selector: string;
747
+ action: string;
748
+ }[];
749
+ rawStatus: string;
750
+ rawBranches: string;
751
+ commitGraph?: string | undefined;
752
+ diffStats?: {
753
+ path: string;
754
+ additions: number;
755
+ deletions: number;
756
+ binary?: boolean | undefined;
757
+ }[] | undefined;
758
+ mergeHead?: string | undefined;
759
+ mergeMessage?: string | undefined;
760
+ }>;
761
+ signals: z.ZodNullable<z.ZodObject<{
762
+ hasConflicts: z.ZodBoolean;
763
+ conflictCount: z.ZodNumber;
764
+ conflictFiles: z.ZodArray<z.ZodString, "many">;
765
+ isDetachedHead: z.ZodBoolean;
766
+ detachedAt: z.ZodOptional<z.ZodString>;
767
+ isRebaseInProgress: z.ZodBoolean;
768
+ rebaseType: z.ZodEnum<["merge", "apply", "none"]>;
769
+ rebaseOnto: z.ZodOptional<z.ZodString>;
770
+ currentBranch: z.ZodString;
771
+ upstreamBranch: z.ZodOptional<z.ZodString>;
772
+ aheadCount: z.ZodNumber;
773
+ behindCount: z.ZodNumber;
774
+ hasStagedChanges: z.ZodBoolean;
775
+ hasUnstagedChanges: z.ZodBoolean;
776
+ hasUntrackedFiles: z.ZodBoolean;
777
+ recentCheckouts: z.ZodArray<z.ZodObject<{
778
+ from: z.ZodString;
779
+ to: z.ZodString;
780
+ reflogSelector: z.ZodString;
781
+ }, "strip", z.ZodTypeAny, {
782
+ from: string;
783
+ to: string;
784
+ reflogSelector: string;
785
+ }, {
786
+ from: string;
787
+ to: string;
788
+ reflogSelector: string;
789
+ }>, "many">;
790
+ recentResets: z.ZodArray<z.ZodObject<{
791
+ type: z.ZodString;
792
+ target: z.ZodString;
793
+ reflogSelector: z.ZodString;
794
+ }, "strip", z.ZodTypeAny, {
795
+ type: string;
796
+ reflogSelector: string;
797
+ target: string;
798
+ }, {
799
+ type: string;
800
+ reflogSelector: string;
801
+ target: string;
802
+ }>, "many">;
803
+ primaryIssue: z.ZodEnum<["merge_conflict", "detached_head", "rebase_in_progress", "clean", "unknown"]>;
804
+ secondaryIssues: z.ZodArray<z.ZodEnum<["merge_conflict", "detached_head", "rebase_in_progress", "clean", "unknown"]>, "many">;
805
+ estimatedRisk: z.ZodEnum<["low", "medium", "high"]>;
806
+ }, "strip", z.ZodTypeAny, {
807
+ isDetachedHead: boolean;
808
+ hasConflicts: boolean;
809
+ conflictCount: number;
810
+ conflictFiles: string[];
811
+ isRebaseInProgress: boolean;
812
+ rebaseType: "merge" | "apply" | "none";
813
+ currentBranch: string;
814
+ aheadCount: number;
815
+ behindCount: number;
816
+ hasStagedChanges: boolean;
817
+ hasUnstagedChanges: boolean;
818
+ hasUntrackedFiles: boolean;
819
+ recentCheckouts: {
820
+ from: string;
821
+ to: string;
822
+ reflogSelector: string;
823
+ }[];
824
+ recentResets: {
825
+ type: string;
826
+ reflogSelector: string;
827
+ target: string;
828
+ }[];
829
+ primaryIssue: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
830
+ secondaryIssues: ("merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown")[];
831
+ estimatedRisk: "low" | "medium" | "high";
832
+ detachedAt?: string | undefined;
833
+ rebaseOnto?: string | undefined;
834
+ upstreamBranch?: string | undefined;
835
+ }, {
836
+ isDetachedHead: boolean;
837
+ hasConflicts: boolean;
838
+ conflictCount: number;
839
+ conflictFiles: string[];
840
+ isRebaseInProgress: boolean;
841
+ rebaseType: "merge" | "apply" | "none";
842
+ currentBranch: string;
843
+ aheadCount: number;
844
+ behindCount: number;
845
+ hasStagedChanges: boolean;
846
+ hasUnstagedChanges: boolean;
847
+ hasUntrackedFiles: boolean;
848
+ recentCheckouts: {
849
+ from: string;
850
+ to: string;
851
+ reflogSelector: string;
852
+ }[];
853
+ recentResets: {
854
+ type: string;
855
+ reflogSelector: string;
856
+ target: string;
857
+ }[];
858
+ primaryIssue: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
859
+ secondaryIssues: ("merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown")[];
860
+ estimatedRisk: "low" | "medium" | "high";
861
+ detachedAt?: string | undefined;
862
+ rebaseOnto?: string | undefined;
863
+ upstreamBranch?: string | undefined;
864
+ }>>;
865
+ plan: z.ZodNullable<z.ZodObject<{
866
+ version: z.ZodLiteral<1>;
867
+ timestamp: z.ZodString;
868
+ issueType: z.ZodEnum<["merge_conflict", "detached_head", "rebase_in_progress", "clean", "unknown"]>;
869
+ issueSummary: z.ZodString;
870
+ risk: z.ZodEnum<["low", "medium", "high"]>;
871
+ steps: z.ZodArray<z.ZodObject<{
872
+ id: z.ZodString;
873
+ title: z.ZodString;
874
+ description: z.ZodString;
875
+ commands: z.ZodArray<z.ZodString, "many">;
876
+ expected: z.ZodString;
877
+ undo: z.ZodObject<{
878
+ possible: z.ZodBoolean;
879
+ commands: z.ZodArray<z.ZodString, "many">;
880
+ description: z.ZodString;
881
+ }, "strip", z.ZodTypeAny, {
882
+ commands: string[];
883
+ description: string;
884
+ possible: boolean;
885
+ }, {
886
+ commands: string[];
887
+ description: string;
888
+ possible: boolean;
889
+ }>;
890
+ dangerous: z.ZodBoolean;
891
+ warning: z.ZodOptional<z.ZodString>;
892
+ requiresUserInput: z.ZodDefault<z.ZodBoolean>;
893
+ userInputHint: z.ZodOptional<z.ZodString>;
894
+ }, "strip", z.ZodTypeAny, {
895
+ dangerous: boolean;
896
+ id: string;
897
+ expected: string;
898
+ title: string;
899
+ commands: string[];
900
+ undo: {
901
+ commands: string[];
902
+ description: string;
903
+ possible: boolean;
904
+ };
905
+ description: string;
906
+ requiresUserInput: boolean;
907
+ warning?: string | undefined;
908
+ userInputHint?: string | undefined;
909
+ }, {
910
+ dangerous: boolean;
911
+ id: string;
912
+ expected: string;
913
+ title: string;
914
+ commands: string[];
915
+ undo: {
916
+ commands: string[];
917
+ description: string;
918
+ possible: boolean;
919
+ };
920
+ description: string;
921
+ warning?: string | undefined;
922
+ requiresUserInput?: boolean | undefined;
923
+ userInputHint?: string | undefined;
924
+ }>, "many">;
925
+ saferAlternatives: z.ZodOptional<z.ZodArray<z.ZodObject<{
926
+ description: z.ZodString;
927
+ tradeoff: z.ZodString;
928
+ steps: z.ZodArray<z.ZodObject<{
929
+ id: z.ZodString;
930
+ title: z.ZodString;
931
+ description: z.ZodString;
932
+ commands: z.ZodArray<z.ZodString, "many">;
933
+ expected: z.ZodString;
934
+ undo: z.ZodObject<{
935
+ possible: z.ZodBoolean;
936
+ commands: z.ZodArray<z.ZodString, "many">;
937
+ description: z.ZodString;
938
+ }, "strip", z.ZodTypeAny, {
939
+ commands: string[];
940
+ description: string;
941
+ possible: boolean;
942
+ }, {
943
+ commands: string[];
944
+ description: string;
945
+ possible: boolean;
946
+ }>;
947
+ dangerous: z.ZodBoolean;
948
+ warning: z.ZodOptional<z.ZodString>;
949
+ requiresUserInput: z.ZodDefault<z.ZodBoolean>;
950
+ userInputHint: z.ZodOptional<z.ZodString>;
951
+ }, "strip", z.ZodTypeAny, {
952
+ dangerous: boolean;
953
+ id: string;
954
+ expected: string;
955
+ title: string;
956
+ commands: string[];
957
+ undo: {
958
+ commands: string[];
959
+ description: string;
960
+ possible: boolean;
961
+ };
962
+ description: string;
963
+ requiresUserInput: boolean;
964
+ warning?: string | undefined;
965
+ userInputHint?: string | undefined;
966
+ }, {
967
+ dangerous: boolean;
968
+ id: string;
969
+ expected: string;
970
+ title: string;
971
+ commands: string[];
972
+ undo: {
973
+ commands: string[];
974
+ description: string;
975
+ possible: boolean;
976
+ };
977
+ description: string;
978
+ warning?: string | undefined;
979
+ requiresUserInput?: boolean | undefined;
980
+ userInputHint?: string | undefined;
981
+ }>, "many">;
982
+ }, "strip", z.ZodTypeAny, {
983
+ description: string;
984
+ steps: {
985
+ dangerous: boolean;
986
+ id: string;
987
+ expected: string;
988
+ title: string;
989
+ commands: string[];
990
+ undo: {
991
+ commands: string[];
992
+ description: string;
993
+ possible: boolean;
994
+ };
995
+ description: string;
996
+ requiresUserInput: boolean;
997
+ warning?: string | undefined;
998
+ userInputHint?: string | undefined;
999
+ }[];
1000
+ tradeoff: string;
1001
+ }, {
1002
+ description: string;
1003
+ steps: {
1004
+ dangerous: boolean;
1005
+ id: string;
1006
+ expected: string;
1007
+ title: string;
1008
+ commands: string[];
1009
+ undo: {
1010
+ commands: string[];
1011
+ description: string;
1012
+ possible: boolean;
1013
+ };
1014
+ description: string;
1015
+ warning?: string | undefined;
1016
+ requiresUserInput?: boolean | undefined;
1017
+ userInputHint?: string | undefined;
1018
+ }[];
1019
+ tradeoff: string;
1020
+ }>, "many">>;
1021
+ reflogRecovery: z.ZodOptional<z.ZodObject<{
1022
+ description: z.ZodString;
1023
+ relevantEntries: z.ZodArray<z.ZodString, "many">;
1024
+ recoveryCommand: z.ZodString;
1025
+ }, "strip", z.ZodTypeAny, {
1026
+ description: string;
1027
+ relevantEntries: string[];
1028
+ recoveryCommand: string;
1029
+ }, {
1030
+ description: string;
1031
+ relevantEntries: string[];
1032
+ recoveryCommand: string;
1033
+ }>>;
1034
+ }, "strip", z.ZodTypeAny, {
1035
+ issueType: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1036
+ version: 1;
1037
+ timestamp: string;
1038
+ issueSummary: string;
1039
+ risk: "low" | "medium" | "high";
1040
+ steps: {
1041
+ dangerous: boolean;
1042
+ id: string;
1043
+ expected: string;
1044
+ title: string;
1045
+ commands: string[];
1046
+ undo: {
1047
+ commands: string[];
1048
+ description: string;
1049
+ possible: boolean;
1050
+ };
1051
+ description: string;
1052
+ requiresUserInput: boolean;
1053
+ warning?: string | undefined;
1054
+ userInputHint?: string | undefined;
1055
+ }[];
1056
+ saferAlternatives?: {
1057
+ description: string;
1058
+ steps: {
1059
+ dangerous: boolean;
1060
+ id: string;
1061
+ expected: string;
1062
+ title: string;
1063
+ commands: string[];
1064
+ undo: {
1065
+ commands: string[];
1066
+ description: string;
1067
+ possible: boolean;
1068
+ };
1069
+ description: string;
1070
+ requiresUserInput: boolean;
1071
+ warning?: string | undefined;
1072
+ userInputHint?: string | undefined;
1073
+ }[];
1074
+ tradeoff: string;
1075
+ }[] | undefined;
1076
+ reflogRecovery?: {
1077
+ description: string;
1078
+ relevantEntries: string[];
1079
+ recoveryCommand: string;
1080
+ } | undefined;
1081
+ }, {
1082
+ issueType: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1083
+ version: 1;
1084
+ timestamp: string;
1085
+ issueSummary: string;
1086
+ risk: "low" | "medium" | "high";
1087
+ steps: {
1088
+ dangerous: boolean;
1089
+ id: string;
1090
+ expected: string;
1091
+ title: string;
1092
+ commands: string[];
1093
+ undo: {
1094
+ commands: string[];
1095
+ description: string;
1096
+ possible: boolean;
1097
+ };
1098
+ description: string;
1099
+ warning?: string | undefined;
1100
+ requiresUserInput?: boolean | undefined;
1101
+ userInputHint?: string | undefined;
1102
+ }[];
1103
+ saferAlternatives?: {
1104
+ description: string;
1105
+ steps: {
1106
+ dangerous: boolean;
1107
+ id: string;
1108
+ expected: string;
1109
+ title: string;
1110
+ commands: string[];
1111
+ undo: {
1112
+ commands: string[];
1113
+ description: string;
1114
+ possible: boolean;
1115
+ };
1116
+ description: string;
1117
+ warning?: string | undefined;
1118
+ requiresUserInput?: boolean | undefined;
1119
+ userInputHint?: string | undefined;
1120
+ }[];
1121
+ tradeoff: string;
1122
+ }[] | undefined;
1123
+ reflogRecovery?: {
1124
+ description: string;
1125
+ relevantEntries: string[];
1126
+ recoveryCommand: string;
1127
+ } | undefined;
1128
+ }>>;
1129
+ traces: z.ZodArray<z.ZodObject<{
1130
+ stage: z.ZodString;
1131
+ output: z.ZodUnknown;
1132
+ createdAt: z.ZodString;
1133
+ durationMs: z.ZodNullable<z.ZodNumber>;
1134
+ }, "strip", z.ZodTypeAny, {
1135
+ durationMs: number | null;
1136
+ stage: string;
1137
+ createdAt: string;
1138
+ output?: unknown;
1139
+ }, {
1140
+ durationMs: number | null;
1141
+ stage: string;
1142
+ createdAt: string;
1143
+ output?: unknown;
1144
+ }>, "many">;
1145
+ }, "strip", z.ZodTypeAny, {
1146
+ plan: {
1147
+ issueType: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1148
+ version: 1;
1149
+ timestamp: string;
1150
+ issueSummary: string;
1151
+ risk: "low" | "medium" | "high";
1152
+ steps: {
1153
+ dangerous: boolean;
1154
+ id: string;
1155
+ expected: string;
1156
+ title: string;
1157
+ commands: string[];
1158
+ undo: {
1159
+ commands: string[];
1160
+ description: string;
1161
+ possible: boolean;
1162
+ };
1163
+ description: string;
1164
+ requiresUserInput: boolean;
1165
+ warning?: string | undefined;
1166
+ userInputHint?: string | undefined;
1167
+ }[];
1168
+ saferAlternatives?: {
1169
+ description: string;
1170
+ steps: {
1171
+ dangerous: boolean;
1172
+ id: string;
1173
+ expected: string;
1174
+ title: string;
1175
+ commands: string[];
1176
+ undo: {
1177
+ commands: string[];
1178
+ description: string;
1179
+ possible: boolean;
1180
+ };
1181
+ description: string;
1182
+ requiresUserInput: boolean;
1183
+ warning?: string | undefined;
1184
+ userInputHint?: string | undefined;
1185
+ }[];
1186
+ tradeoff: string;
1187
+ }[] | undefined;
1188
+ reflogRecovery?: {
1189
+ description: string;
1190
+ relevantEntries: string[];
1191
+ recoveryCommand: string;
1192
+ } | undefined;
1193
+ } | null;
1194
+ snapshot: {
1195
+ branch: {
1196
+ head: string;
1197
+ oid: string;
1198
+ upstream?: string | undefined;
1199
+ aheadBehind?: {
1200
+ ahead: number;
1201
+ behind: number;
1202
+ } | undefined;
1203
+ };
1204
+ version: 1;
1205
+ timestamp: string;
1206
+ platform: "win32" | "darwin" | "linux";
1207
+ repoRoot: string;
1208
+ gitDir: string;
1209
+ isDetachedHead: boolean;
1210
+ rebaseState: {
1211
+ type: "merge" | "apply" | "none";
1212
+ inProgress: boolean;
1213
+ headName?: string | undefined;
1214
+ onto?: string | undefined;
1215
+ currentStep?: number | undefined;
1216
+ totalSteps?: number | undefined;
1217
+ };
1218
+ unmergedFiles: {
1219
+ path: string;
1220
+ conflictBlocks: {
1221
+ startLine: number;
1222
+ endLine: number;
1223
+ oursContent: string;
1224
+ theirsContent: string;
1225
+ context: string;
1226
+ }[];
1227
+ stageOurs?: string | undefined;
1228
+ stageTheirs?: string | undefined;
1229
+ stageBase?: string | undefined;
1230
+ }[];
1231
+ stagedFiles: string[];
1232
+ modifiedFiles: string[];
1233
+ untrackedFiles: string[];
1234
+ recentLog: {
1235
+ message: string;
1236
+ hash: string;
1237
+ refs: string[];
1238
+ }[];
1239
+ recentReflog: {
1240
+ message: string;
1241
+ hash: string;
1242
+ selector: string;
1243
+ action: string;
1244
+ }[];
1245
+ rawStatus: string;
1246
+ rawBranches: string;
1247
+ commitGraph?: string | undefined;
1248
+ diffStats?: {
1249
+ path: string;
1250
+ additions: number;
1251
+ deletions: number;
1252
+ binary?: boolean | undefined;
1253
+ }[] | undefined;
1254
+ mergeHead?: string | undefined;
1255
+ mergeMessage?: string | undefined;
1256
+ };
1257
+ session: {
1258
+ id: string;
1259
+ title: string | null;
1260
+ createdAt: string;
1261
+ };
1262
+ signals: {
1263
+ isDetachedHead: boolean;
1264
+ hasConflicts: boolean;
1265
+ conflictCount: number;
1266
+ conflictFiles: string[];
1267
+ isRebaseInProgress: boolean;
1268
+ rebaseType: "merge" | "apply" | "none";
1269
+ currentBranch: string;
1270
+ aheadCount: number;
1271
+ behindCount: number;
1272
+ hasStagedChanges: boolean;
1273
+ hasUnstagedChanges: boolean;
1274
+ hasUntrackedFiles: boolean;
1275
+ recentCheckouts: {
1276
+ from: string;
1277
+ to: string;
1278
+ reflogSelector: string;
1279
+ }[];
1280
+ recentResets: {
1281
+ type: string;
1282
+ reflogSelector: string;
1283
+ target: string;
1284
+ }[];
1285
+ primaryIssue: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1286
+ secondaryIssues: ("merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown")[];
1287
+ estimatedRisk: "low" | "medium" | "high";
1288
+ detachedAt?: string | undefined;
1289
+ rebaseOnto?: string | undefined;
1290
+ upstreamBranch?: string | undefined;
1291
+ } | null;
1292
+ traces: {
1293
+ durationMs: number | null;
1294
+ stage: string;
1295
+ createdAt: string;
1296
+ output?: unknown;
1297
+ }[];
1298
+ }, {
1299
+ plan: {
1300
+ issueType: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1301
+ version: 1;
1302
+ timestamp: string;
1303
+ issueSummary: string;
1304
+ risk: "low" | "medium" | "high";
1305
+ steps: {
1306
+ dangerous: boolean;
1307
+ id: string;
1308
+ expected: string;
1309
+ title: string;
1310
+ commands: string[];
1311
+ undo: {
1312
+ commands: string[];
1313
+ description: string;
1314
+ possible: boolean;
1315
+ };
1316
+ description: string;
1317
+ warning?: string | undefined;
1318
+ requiresUserInput?: boolean | undefined;
1319
+ userInputHint?: string | undefined;
1320
+ }[];
1321
+ saferAlternatives?: {
1322
+ description: string;
1323
+ steps: {
1324
+ dangerous: boolean;
1325
+ id: string;
1326
+ expected: string;
1327
+ title: string;
1328
+ commands: string[];
1329
+ undo: {
1330
+ commands: string[];
1331
+ description: string;
1332
+ possible: boolean;
1333
+ };
1334
+ description: string;
1335
+ warning?: string | undefined;
1336
+ requiresUserInput?: boolean | undefined;
1337
+ userInputHint?: string | undefined;
1338
+ }[];
1339
+ tradeoff: string;
1340
+ }[] | undefined;
1341
+ reflogRecovery?: {
1342
+ description: string;
1343
+ relevantEntries: string[];
1344
+ recoveryCommand: string;
1345
+ } | undefined;
1346
+ } | null;
1347
+ snapshot: {
1348
+ branch: {
1349
+ head: string;
1350
+ oid: string;
1351
+ upstream?: string | undefined;
1352
+ aheadBehind?: {
1353
+ ahead: number;
1354
+ behind: number;
1355
+ } | undefined;
1356
+ };
1357
+ version: 1;
1358
+ timestamp: string;
1359
+ platform: "win32" | "darwin" | "linux";
1360
+ repoRoot: string;
1361
+ gitDir: string;
1362
+ isDetachedHead: boolean;
1363
+ rebaseState: {
1364
+ type: "merge" | "apply" | "none";
1365
+ inProgress: boolean;
1366
+ headName?: string | undefined;
1367
+ onto?: string | undefined;
1368
+ currentStep?: number | undefined;
1369
+ totalSteps?: number | undefined;
1370
+ };
1371
+ unmergedFiles: {
1372
+ path: string;
1373
+ conflictBlocks: {
1374
+ startLine: number;
1375
+ endLine: number;
1376
+ oursContent: string;
1377
+ theirsContent: string;
1378
+ context: string;
1379
+ }[];
1380
+ stageOurs?: string | undefined;
1381
+ stageTheirs?: string | undefined;
1382
+ stageBase?: string | undefined;
1383
+ }[];
1384
+ stagedFiles: string[];
1385
+ modifiedFiles: string[];
1386
+ untrackedFiles: string[];
1387
+ recentLog: {
1388
+ message: string;
1389
+ hash: string;
1390
+ refs: string[];
1391
+ }[];
1392
+ recentReflog: {
1393
+ message: string;
1394
+ hash: string;
1395
+ selector: string;
1396
+ action: string;
1397
+ }[];
1398
+ rawStatus: string;
1399
+ rawBranches: string;
1400
+ commitGraph?: string | undefined;
1401
+ diffStats?: {
1402
+ path: string;
1403
+ additions: number;
1404
+ deletions: number;
1405
+ binary?: boolean | undefined;
1406
+ }[] | undefined;
1407
+ mergeHead?: string | undefined;
1408
+ mergeMessage?: string | undefined;
1409
+ };
1410
+ session: {
1411
+ id: string;
1412
+ title: string | null;
1413
+ createdAt: string;
1414
+ };
1415
+ signals: {
1416
+ isDetachedHead: boolean;
1417
+ hasConflicts: boolean;
1418
+ conflictCount: number;
1419
+ conflictFiles: string[];
1420
+ isRebaseInProgress: boolean;
1421
+ rebaseType: "merge" | "apply" | "none";
1422
+ currentBranch: string;
1423
+ aheadCount: number;
1424
+ behindCount: number;
1425
+ hasStagedChanges: boolean;
1426
+ hasUnstagedChanges: boolean;
1427
+ hasUntrackedFiles: boolean;
1428
+ recentCheckouts: {
1429
+ from: string;
1430
+ to: string;
1431
+ reflogSelector: string;
1432
+ }[];
1433
+ recentResets: {
1434
+ type: string;
1435
+ reflogSelector: string;
1436
+ target: string;
1437
+ }[];
1438
+ primaryIssue: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1439
+ secondaryIssues: ("merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown")[];
1440
+ estimatedRisk: "low" | "medium" | "high";
1441
+ detachedAt?: string | undefined;
1442
+ rebaseOnto?: string | undefined;
1443
+ upstreamBranch?: string | undefined;
1444
+ } | null;
1445
+ traces: {
1446
+ durationMs: number | null;
1447
+ stage: string;
1448
+ createdAt: string;
1449
+ output?: unknown;
1450
+ }[];
1451
+ }>;
1452
+ export type GetSessionResponse = z.infer<typeof GetSessionResponseSchema>;
1453
+ export declare const GeneratePlanRequestSchema: z.ZodObject<{
1454
+ dangerousAllowed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1455
+ }, "strip", z.ZodTypeAny, {
1456
+ dangerousAllowed: boolean;
1457
+ }, {
1458
+ dangerousAllowed?: boolean | undefined;
1459
+ }>;
1460
+ export type GeneratePlanRequest = z.infer<typeof GeneratePlanRequestSchema>;
1461
+ export declare const GeneratePlanResponseSchema: z.ZodObject<{
1462
+ plan: z.ZodObject<{
1463
+ version: z.ZodLiteral<1>;
1464
+ timestamp: z.ZodString;
1465
+ issueType: z.ZodEnum<["merge_conflict", "detached_head", "rebase_in_progress", "clean", "unknown"]>;
1466
+ issueSummary: z.ZodString;
1467
+ risk: z.ZodEnum<["low", "medium", "high"]>;
1468
+ steps: z.ZodArray<z.ZodObject<{
1469
+ id: z.ZodString;
1470
+ title: z.ZodString;
1471
+ description: z.ZodString;
1472
+ commands: z.ZodArray<z.ZodString, "many">;
1473
+ expected: z.ZodString;
1474
+ undo: z.ZodObject<{
1475
+ possible: z.ZodBoolean;
1476
+ commands: z.ZodArray<z.ZodString, "many">;
1477
+ description: z.ZodString;
1478
+ }, "strip", z.ZodTypeAny, {
1479
+ commands: string[];
1480
+ description: string;
1481
+ possible: boolean;
1482
+ }, {
1483
+ commands: string[];
1484
+ description: string;
1485
+ possible: boolean;
1486
+ }>;
1487
+ dangerous: z.ZodBoolean;
1488
+ warning: z.ZodOptional<z.ZodString>;
1489
+ requiresUserInput: z.ZodDefault<z.ZodBoolean>;
1490
+ userInputHint: z.ZodOptional<z.ZodString>;
1491
+ }, "strip", z.ZodTypeAny, {
1492
+ dangerous: boolean;
1493
+ id: string;
1494
+ expected: string;
1495
+ title: string;
1496
+ commands: string[];
1497
+ undo: {
1498
+ commands: string[];
1499
+ description: string;
1500
+ possible: boolean;
1501
+ };
1502
+ description: string;
1503
+ requiresUserInput: boolean;
1504
+ warning?: string | undefined;
1505
+ userInputHint?: string | undefined;
1506
+ }, {
1507
+ dangerous: boolean;
1508
+ id: string;
1509
+ expected: string;
1510
+ title: string;
1511
+ commands: string[];
1512
+ undo: {
1513
+ commands: string[];
1514
+ description: string;
1515
+ possible: boolean;
1516
+ };
1517
+ description: string;
1518
+ warning?: string | undefined;
1519
+ requiresUserInput?: boolean | undefined;
1520
+ userInputHint?: string | undefined;
1521
+ }>, "many">;
1522
+ saferAlternatives: z.ZodOptional<z.ZodArray<z.ZodObject<{
1523
+ description: z.ZodString;
1524
+ tradeoff: z.ZodString;
1525
+ steps: z.ZodArray<z.ZodObject<{
1526
+ id: z.ZodString;
1527
+ title: z.ZodString;
1528
+ description: z.ZodString;
1529
+ commands: z.ZodArray<z.ZodString, "many">;
1530
+ expected: z.ZodString;
1531
+ undo: z.ZodObject<{
1532
+ possible: z.ZodBoolean;
1533
+ commands: z.ZodArray<z.ZodString, "many">;
1534
+ description: z.ZodString;
1535
+ }, "strip", z.ZodTypeAny, {
1536
+ commands: string[];
1537
+ description: string;
1538
+ possible: boolean;
1539
+ }, {
1540
+ commands: string[];
1541
+ description: string;
1542
+ possible: boolean;
1543
+ }>;
1544
+ dangerous: z.ZodBoolean;
1545
+ warning: z.ZodOptional<z.ZodString>;
1546
+ requiresUserInput: z.ZodDefault<z.ZodBoolean>;
1547
+ userInputHint: z.ZodOptional<z.ZodString>;
1548
+ }, "strip", z.ZodTypeAny, {
1549
+ dangerous: boolean;
1550
+ id: string;
1551
+ expected: string;
1552
+ title: string;
1553
+ commands: string[];
1554
+ undo: {
1555
+ commands: string[];
1556
+ description: string;
1557
+ possible: boolean;
1558
+ };
1559
+ description: string;
1560
+ requiresUserInput: boolean;
1561
+ warning?: string | undefined;
1562
+ userInputHint?: string | undefined;
1563
+ }, {
1564
+ dangerous: boolean;
1565
+ id: string;
1566
+ expected: string;
1567
+ title: string;
1568
+ commands: string[];
1569
+ undo: {
1570
+ commands: string[];
1571
+ description: string;
1572
+ possible: boolean;
1573
+ };
1574
+ description: string;
1575
+ warning?: string | undefined;
1576
+ requiresUserInput?: boolean | undefined;
1577
+ userInputHint?: string | undefined;
1578
+ }>, "many">;
1579
+ }, "strip", z.ZodTypeAny, {
1580
+ description: string;
1581
+ steps: {
1582
+ dangerous: boolean;
1583
+ id: string;
1584
+ expected: string;
1585
+ title: string;
1586
+ commands: string[];
1587
+ undo: {
1588
+ commands: string[];
1589
+ description: string;
1590
+ possible: boolean;
1591
+ };
1592
+ description: string;
1593
+ requiresUserInput: boolean;
1594
+ warning?: string | undefined;
1595
+ userInputHint?: string | undefined;
1596
+ }[];
1597
+ tradeoff: string;
1598
+ }, {
1599
+ description: string;
1600
+ steps: {
1601
+ dangerous: boolean;
1602
+ id: string;
1603
+ expected: string;
1604
+ title: string;
1605
+ commands: string[];
1606
+ undo: {
1607
+ commands: string[];
1608
+ description: string;
1609
+ possible: boolean;
1610
+ };
1611
+ description: string;
1612
+ warning?: string | undefined;
1613
+ requiresUserInput?: boolean | undefined;
1614
+ userInputHint?: string | undefined;
1615
+ }[];
1616
+ tradeoff: string;
1617
+ }>, "many">>;
1618
+ reflogRecovery: z.ZodOptional<z.ZodObject<{
1619
+ description: z.ZodString;
1620
+ relevantEntries: z.ZodArray<z.ZodString, "many">;
1621
+ recoveryCommand: z.ZodString;
1622
+ }, "strip", z.ZodTypeAny, {
1623
+ description: string;
1624
+ relevantEntries: string[];
1625
+ recoveryCommand: string;
1626
+ }, {
1627
+ description: string;
1628
+ relevantEntries: string[];
1629
+ recoveryCommand: string;
1630
+ }>>;
1631
+ }, "strip", z.ZodTypeAny, {
1632
+ issueType: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1633
+ version: 1;
1634
+ timestamp: string;
1635
+ issueSummary: string;
1636
+ risk: "low" | "medium" | "high";
1637
+ steps: {
1638
+ dangerous: boolean;
1639
+ id: string;
1640
+ expected: string;
1641
+ title: string;
1642
+ commands: string[];
1643
+ undo: {
1644
+ commands: string[];
1645
+ description: string;
1646
+ possible: boolean;
1647
+ };
1648
+ description: string;
1649
+ requiresUserInput: boolean;
1650
+ warning?: string | undefined;
1651
+ userInputHint?: string | undefined;
1652
+ }[];
1653
+ saferAlternatives?: {
1654
+ description: string;
1655
+ steps: {
1656
+ dangerous: boolean;
1657
+ id: string;
1658
+ expected: string;
1659
+ title: string;
1660
+ commands: string[];
1661
+ undo: {
1662
+ commands: string[];
1663
+ description: string;
1664
+ possible: boolean;
1665
+ };
1666
+ description: string;
1667
+ requiresUserInput: boolean;
1668
+ warning?: string | undefined;
1669
+ userInputHint?: string | undefined;
1670
+ }[];
1671
+ tradeoff: string;
1672
+ }[] | undefined;
1673
+ reflogRecovery?: {
1674
+ description: string;
1675
+ relevantEntries: string[];
1676
+ recoveryCommand: string;
1677
+ } | undefined;
1678
+ }, {
1679
+ issueType: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1680
+ version: 1;
1681
+ timestamp: string;
1682
+ issueSummary: string;
1683
+ risk: "low" | "medium" | "high";
1684
+ steps: {
1685
+ dangerous: boolean;
1686
+ id: string;
1687
+ expected: string;
1688
+ title: string;
1689
+ commands: string[];
1690
+ undo: {
1691
+ commands: string[];
1692
+ description: string;
1693
+ possible: boolean;
1694
+ };
1695
+ description: string;
1696
+ warning?: string | undefined;
1697
+ requiresUserInput?: boolean | undefined;
1698
+ userInputHint?: string | undefined;
1699
+ }[];
1700
+ saferAlternatives?: {
1701
+ description: string;
1702
+ steps: {
1703
+ dangerous: boolean;
1704
+ id: string;
1705
+ expected: string;
1706
+ title: string;
1707
+ commands: string[];
1708
+ undo: {
1709
+ commands: string[];
1710
+ description: string;
1711
+ possible: boolean;
1712
+ };
1713
+ description: string;
1714
+ warning?: string | undefined;
1715
+ requiresUserInput?: boolean | undefined;
1716
+ userInputHint?: string | undefined;
1717
+ }[];
1718
+ tradeoff: string;
1719
+ }[] | undefined;
1720
+ reflogRecovery?: {
1721
+ description: string;
1722
+ relevantEntries: string[];
1723
+ recoveryCommand: string;
1724
+ } | undefined;
1725
+ }>;
1726
+ }, "strip", z.ZodTypeAny, {
1727
+ plan: {
1728
+ issueType: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1729
+ version: 1;
1730
+ timestamp: string;
1731
+ issueSummary: string;
1732
+ risk: "low" | "medium" | "high";
1733
+ steps: {
1734
+ dangerous: boolean;
1735
+ id: string;
1736
+ expected: string;
1737
+ title: string;
1738
+ commands: string[];
1739
+ undo: {
1740
+ commands: string[];
1741
+ description: string;
1742
+ possible: boolean;
1743
+ };
1744
+ description: string;
1745
+ requiresUserInput: boolean;
1746
+ warning?: string | undefined;
1747
+ userInputHint?: string | undefined;
1748
+ }[];
1749
+ saferAlternatives?: {
1750
+ description: string;
1751
+ steps: {
1752
+ dangerous: boolean;
1753
+ id: string;
1754
+ expected: string;
1755
+ title: string;
1756
+ commands: string[];
1757
+ undo: {
1758
+ commands: string[];
1759
+ description: string;
1760
+ possible: boolean;
1761
+ };
1762
+ description: string;
1763
+ requiresUserInput: boolean;
1764
+ warning?: string | undefined;
1765
+ userInputHint?: string | undefined;
1766
+ }[];
1767
+ tradeoff: string;
1768
+ }[] | undefined;
1769
+ reflogRecovery?: {
1770
+ description: string;
1771
+ relevantEntries: string[];
1772
+ recoveryCommand: string;
1773
+ } | undefined;
1774
+ };
1775
+ }, {
1776
+ plan: {
1777
+ issueType: "merge_conflict" | "detached_head" | "rebase_in_progress" | "clean" | "unknown";
1778
+ version: 1;
1779
+ timestamp: string;
1780
+ issueSummary: string;
1781
+ risk: "low" | "medium" | "high";
1782
+ steps: {
1783
+ dangerous: boolean;
1784
+ id: string;
1785
+ expected: string;
1786
+ title: string;
1787
+ commands: string[];
1788
+ undo: {
1789
+ commands: string[];
1790
+ description: string;
1791
+ possible: boolean;
1792
+ };
1793
+ description: string;
1794
+ warning?: string | undefined;
1795
+ requiresUserInput?: boolean | undefined;
1796
+ userInputHint?: string | undefined;
1797
+ }[];
1798
+ saferAlternatives?: {
1799
+ description: string;
1800
+ steps: {
1801
+ dangerous: boolean;
1802
+ id: string;
1803
+ expected: string;
1804
+ title: string;
1805
+ commands: string[];
1806
+ undo: {
1807
+ commands: string[];
1808
+ description: string;
1809
+ possible: boolean;
1810
+ };
1811
+ description: string;
1812
+ warning?: string | undefined;
1813
+ requiresUserInput?: boolean | undefined;
1814
+ userInputHint?: string | undefined;
1815
+ }[];
1816
+ tradeoff: string;
1817
+ }[] | undefined;
1818
+ reflogRecovery?: {
1819
+ description: string;
1820
+ relevantEntries: string[];
1821
+ recoveryCommand: string;
1822
+ } | undefined;
1823
+ };
1824
+ }>;
1825
+ export type GeneratePlanResponse = z.infer<typeof GeneratePlanResponseSchema>;
1826
+ export declare const VerifyProgressRequestSchema: z.ZodObject<{
1827
+ snapshot: z.ZodObject<{
1828
+ version: z.ZodLiteral<1>;
1829
+ timestamp: z.ZodString;
1830
+ platform: z.ZodEnum<["win32", "darwin", "linux"]>;
1831
+ repoRoot: z.ZodString;
1832
+ gitDir: z.ZodString;
1833
+ branch: z.ZodObject<{
1834
+ head: z.ZodString;
1835
+ oid: z.ZodString;
1836
+ upstream: z.ZodOptional<z.ZodString>;
1837
+ aheadBehind: z.ZodOptional<z.ZodObject<{
1838
+ ahead: z.ZodNumber;
1839
+ behind: z.ZodNumber;
1840
+ }, "strip", z.ZodTypeAny, {
1841
+ ahead: number;
1842
+ behind: number;
1843
+ }, {
1844
+ ahead: number;
1845
+ behind: number;
1846
+ }>>;
1847
+ }, "strip", z.ZodTypeAny, {
1848
+ head: string;
1849
+ oid: string;
1850
+ upstream?: string | undefined;
1851
+ aheadBehind?: {
1852
+ ahead: number;
1853
+ behind: number;
1854
+ } | undefined;
1855
+ }, {
1856
+ head: string;
1857
+ oid: string;
1858
+ upstream?: string | undefined;
1859
+ aheadBehind?: {
1860
+ ahead: number;
1861
+ behind: number;
1862
+ } | undefined;
1863
+ }>;
1864
+ isDetachedHead: z.ZodBoolean;
1865
+ rebaseState: z.ZodObject<{
1866
+ inProgress: z.ZodBoolean;
1867
+ type: z.ZodEnum<["merge", "apply", "none"]>;
1868
+ headName: z.ZodOptional<z.ZodString>;
1869
+ onto: z.ZodOptional<z.ZodString>;
1870
+ currentStep: z.ZodOptional<z.ZodNumber>;
1871
+ totalSteps: z.ZodOptional<z.ZodNumber>;
1872
+ }, "strip", z.ZodTypeAny, {
1873
+ type: "merge" | "apply" | "none";
1874
+ inProgress: boolean;
1875
+ headName?: string | undefined;
1876
+ onto?: string | undefined;
1877
+ currentStep?: number | undefined;
1878
+ totalSteps?: number | undefined;
1879
+ }, {
1880
+ type: "merge" | "apply" | "none";
1881
+ inProgress: boolean;
1882
+ headName?: string | undefined;
1883
+ onto?: string | undefined;
1884
+ currentStep?: number | undefined;
1885
+ totalSteps?: number | undefined;
1886
+ }>;
1887
+ unmergedFiles: z.ZodArray<z.ZodObject<{
1888
+ path: z.ZodString;
1889
+ stageOurs: z.ZodOptional<z.ZodString>;
1890
+ stageTheirs: z.ZodOptional<z.ZodString>;
1891
+ stageBase: z.ZodOptional<z.ZodString>;
1892
+ conflictBlocks: z.ZodArray<z.ZodObject<{
1893
+ startLine: z.ZodNumber;
1894
+ endLine: z.ZodNumber;
1895
+ oursContent: z.ZodString;
1896
+ theirsContent: z.ZodString;
1897
+ context: z.ZodString;
1898
+ }, "strip", z.ZodTypeAny, {
1899
+ startLine: number;
1900
+ endLine: number;
1901
+ oursContent: string;
1902
+ theirsContent: string;
1903
+ context: string;
1904
+ }, {
1905
+ startLine: number;
1906
+ endLine: number;
1907
+ oursContent: string;
1908
+ theirsContent: string;
1909
+ context: string;
1910
+ }>, "many">;
1911
+ }, "strip", z.ZodTypeAny, {
1912
+ path: string;
1913
+ conflictBlocks: {
1914
+ startLine: number;
1915
+ endLine: number;
1916
+ oursContent: string;
1917
+ theirsContent: string;
1918
+ context: string;
1919
+ }[];
1920
+ stageOurs?: string | undefined;
1921
+ stageTheirs?: string | undefined;
1922
+ stageBase?: string | undefined;
1923
+ }, {
1924
+ path: string;
1925
+ conflictBlocks: {
1926
+ startLine: number;
1927
+ endLine: number;
1928
+ oursContent: string;
1929
+ theirsContent: string;
1930
+ context: string;
1931
+ }[];
1932
+ stageOurs?: string | undefined;
1933
+ stageTheirs?: string | undefined;
1934
+ stageBase?: string | undefined;
1935
+ }>, "many">;
1936
+ stagedFiles: z.ZodArray<z.ZodString, "many">;
1937
+ modifiedFiles: z.ZodArray<z.ZodString, "many">;
1938
+ untrackedFiles: z.ZodArray<z.ZodString, "many">;
1939
+ recentLog: z.ZodArray<z.ZodObject<{
1940
+ hash: z.ZodString;
1941
+ refs: z.ZodArray<z.ZodString, "many">;
1942
+ message: z.ZodString;
1943
+ }, "strip", z.ZodTypeAny, {
1944
+ message: string;
1945
+ hash: string;
1946
+ refs: string[];
1947
+ }, {
1948
+ message: string;
1949
+ hash: string;
1950
+ refs: string[];
1951
+ }>, "many">;
1952
+ recentReflog: z.ZodArray<z.ZodObject<{
1953
+ hash: z.ZodString;
1954
+ selector: z.ZodString;
1955
+ action: z.ZodString;
1956
+ message: z.ZodString;
1957
+ }, "strip", z.ZodTypeAny, {
1958
+ message: string;
1959
+ hash: string;
1960
+ selector: string;
1961
+ action: string;
1962
+ }, {
1963
+ message: string;
1964
+ hash: string;
1965
+ selector: string;
1966
+ action: string;
1967
+ }>, "many">;
1968
+ commitGraph: z.ZodOptional<z.ZodString>;
1969
+ diffStats: z.ZodOptional<z.ZodArray<z.ZodObject<{
1970
+ path: z.ZodString;
1971
+ additions: z.ZodNumber;
1972
+ deletions: z.ZodNumber;
1973
+ binary: z.ZodOptional<z.ZodBoolean>;
1974
+ }, "strip", z.ZodTypeAny, {
1975
+ path: string;
1976
+ additions: number;
1977
+ deletions: number;
1978
+ binary?: boolean | undefined;
1979
+ }, {
1980
+ path: string;
1981
+ additions: number;
1982
+ deletions: number;
1983
+ binary?: boolean | undefined;
1984
+ }>, "many">>;
1985
+ mergeHead: z.ZodOptional<z.ZodString>;
1986
+ mergeMessage: z.ZodOptional<z.ZodString>;
1987
+ rawStatus: z.ZodString;
1988
+ rawBranches: z.ZodString;
1989
+ }, "strip", z.ZodTypeAny, {
1990
+ branch: {
1991
+ head: string;
1992
+ oid: string;
1993
+ upstream?: string | undefined;
1994
+ aheadBehind?: {
1995
+ ahead: number;
1996
+ behind: number;
1997
+ } | undefined;
1998
+ };
1999
+ version: 1;
2000
+ timestamp: string;
2001
+ platform: "win32" | "darwin" | "linux";
2002
+ repoRoot: string;
2003
+ gitDir: string;
2004
+ isDetachedHead: boolean;
2005
+ rebaseState: {
2006
+ type: "merge" | "apply" | "none";
2007
+ inProgress: boolean;
2008
+ headName?: string | undefined;
2009
+ onto?: string | undefined;
2010
+ currentStep?: number | undefined;
2011
+ totalSteps?: number | undefined;
2012
+ };
2013
+ unmergedFiles: {
2014
+ path: string;
2015
+ conflictBlocks: {
2016
+ startLine: number;
2017
+ endLine: number;
2018
+ oursContent: string;
2019
+ theirsContent: string;
2020
+ context: string;
2021
+ }[];
2022
+ stageOurs?: string | undefined;
2023
+ stageTheirs?: string | undefined;
2024
+ stageBase?: string | undefined;
2025
+ }[];
2026
+ stagedFiles: string[];
2027
+ modifiedFiles: string[];
2028
+ untrackedFiles: string[];
2029
+ recentLog: {
2030
+ message: string;
2031
+ hash: string;
2032
+ refs: string[];
2033
+ }[];
2034
+ recentReflog: {
2035
+ message: string;
2036
+ hash: string;
2037
+ selector: string;
2038
+ action: string;
2039
+ }[];
2040
+ rawStatus: string;
2041
+ rawBranches: string;
2042
+ commitGraph?: string | undefined;
2043
+ diffStats?: {
2044
+ path: string;
2045
+ additions: number;
2046
+ deletions: number;
2047
+ binary?: boolean | undefined;
2048
+ }[] | undefined;
2049
+ mergeHead?: string | undefined;
2050
+ mergeMessage?: string | undefined;
2051
+ }, {
2052
+ branch: {
2053
+ head: string;
2054
+ oid: string;
2055
+ upstream?: string | undefined;
2056
+ aheadBehind?: {
2057
+ ahead: number;
2058
+ behind: number;
2059
+ } | undefined;
2060
+ };
2061
+ version: 1;
2062
+ timestamp: string;
2063
+ platform: "win32" | "darwin" | "linux";
2064
+ repoRoot: string;
2065
+ gitDir: string;
2066
+ isDetachedHead: boolean;
2067
+ rebaseState: {
2068
+ type: "merge" | "apply" | "none";
2069
+ inProgress: boolean;
2070
+ headName?: string | undefined;
2071
+ onto?: string | undefined;
2072
+ currentStep?: number | undefined;
2073
+ totalSteps?: number | undefined;
2074
+ };
2075
+ unmergedFiles: {
2076
+ path: string;
2077
+ conflictBlocks: {
2078
+ startLine: number;
2079
+ endLine: number;
2080
+ oursContent: string;
2081
+ theirsContent: string;
2082
+ context: string;
2083
+ }[];
2084
+ stageOurs?: string | undefined;
2085
+ stageTheirs?: string | undefined;
2086
+ stageBase?: string | undefined;
2087
+ }[];
2088
+ stagedFiles: string[];
2089
+ modifiedFiles: string[];
2090
+ untrackedFiles: string[];
2091
+ recentLog: {
2092
+ message: string;
2093
+ hash: string;
2094
+ refs: string[];
2095
+ }[];
2096
+ recentReflog: {
2097
+ message: string;
2098
+ hash: string;
2099
+ selector: string;
2100
+ action: string;
2101
+ }[];
2102
+ rawStatus: string;
2103
+ rawBranches: string;
2104
+ commitGraph?: string | undefined;
2105
+ diffStats?: {
2106
+ path: string;
2107
+ additions: number;
2108
+ deletions: number;
2109
+ binary?: boolean | undefined;
2110
+ }[] | undefined;
2111
+ mergeHead?: string | undefined;
2112
+ mergeMessage?: string | undefined;
2113
+ }>;
2114
+ }, "strip", z.ZodTypeAny, {
2115
+ snapshot: {
2116
+ branch: {
2117
+ head: string;
2118
+ oid: string;
2119
+ upstream?: string | undefined;
2120
+ aheadBehind?: {
2121
+ ahead: number;
2122
+ behind: number;
2123
+ } | undefined;
2124
+ };
2125
+ version: 1;
2126
+ timestamp: string;
2127
+ platform: "win32" | "darwin" | "linux";
2128
+ repoRoot: string;
2129
+ gitDir: string;
2130
+ isDetachedHead: boolean;
2131
+ rebaseState: {
2132
+ type: "merge" | "apply" | "none";
2133
+ inProgress: boolean;
2134
+ headName?: string | undefined;
2135
+ onto?: string | undefined;
2136
+ currentStep?: number | undefined;
2137
+ totalSteps?: number | undefined;
2138
+ };
2139
+ unmergedFiles: {
2140
+ path: string;
2141
+ conflictBlocks: {
2142
+ startLine: number;
2143
+ endLine: number;
2144
+ oursContent: string;
2145
+ theirsContent: string;
2146
+ context: string;
2147
+ }[];
2148
+ stageOurs?: string | undefined;
2149
+ stageTheirs?: string | undefined;
2150
+ stageBase?: string | undefined;
2151
+ }[];
2152
+ stagedFiles: string[];
2153
+ modifiedFiles: string[];
2154
+ untrackedFiles: string[];
2155
+ recentLog: {
2156
+ message: string;
2157
+ hash: string;
2158
+ refs: string[];
2159
+ }[];
2160
+ recentReflog: {
2161
+ message: string;
2162
+ hash: string;
2163
+ selector: string;
2164
+ action: string;
2165
+ }[];
2166
+ rawStatus: string;
2167
+ rawBranches: string;
2168
+ commitGraph?: string | undefined;
2169
+ diffStats?: {
2170
+ path: string;
2171
+ additions: number;
2172
+ deletions: number;
2173
+ binary?: boolean | undefined;
2174
+ }[] | undefined;
2175
+ mergeHead?: string | undefined;
2176
+ mergeMessage?: string | undefined;
2177
+ };
2178
+ }, {
2179
+ snapshot: {
2180
+ branch: {
2181
+ head: string;
2182
+ oid: string;
2183
+ upstream?: string | undefined;
2184
+ aheadBehind?: {
2185
+ ahead: number;
2186
+ behind: number;
2187
+ } | undefined;
2188
+ };
2189
+ version: 1;
2190
+ timestamp: string;
2191
+ platform: "win32" | "darwin" | "linux";
2192
+ repoRoot: string;
2193
+ gitDir: string;
2194
+ isDetachedHead: boolean;
2195
+ rebaseState: {
2196
+ type: "merge" | "apply" | "none";
2197
+ inProgress: boolean;
2198
+ headName?: string | undefined;
2199
+ onto?: string | undefined;
2200
+ currentStep?: number | undefined;
2201
+ totalSteps?: number | undefined;
2202
+ };
2203
+ unmergedFiles: {
2204
+ path: string;
2205
+ conflictBlocks: {
2206
+ startLine: number;
2207
+ endLine: number;
2208
+ oursContent: string;
2209
+ theirsContent: string;
2210
+ context: string;
2211
+ }[];
2212
+ stageOurs?: string | undefined;
2213
+ stageTheirs?: string | undefined;
2214
+ stageBase?: string | undefined;
2215
+ }[];
2216
+ stagedFiles: string[];
2217
+ modifiedFiles: string[];
2218
+ untrackedFiles: string[];
2219
+ recentLog: {
2220
+ message: string;
2221
+ hash: string;
2222
+ refs: string[];
2223
+ }[];
2224
+ recentReflog: {
2225
+ message: string;
2226
+ hash: string;
2227
+ selector: string;
2228
+ action: string;
2229
+ }[];
2230
+ rawStatus: string;
2231
+ rawBranches: string;
2232
+ commitGraph?: string | undefined;
2233
+ diffStats?: {
2234
+ path: string;
2235
+ additions: number;
2236
+ deletions: number;
2237
+ binary?: boolean | undefined;
2238
+ }[] | undefined;
2239
+ mergeHead?: string | undefined;
2240
+ mergeMessage?: string | undefined;
2241
+ };
2242
+ }>;
2243
+ export type VerifyProgressRequest = z.infer<typeof VerifyProgressRequestSchema>;
2244
+ export declare const VerifyProgressResponseSchema: z.ZodObject<{
2245
+ stepsCompleted: z.ZodArray<z.ZodString, "many">;
2246
+ issueResolved: z.ZodBoolean;
2247
+ remainingIssues: z.ZodArray<z.ZodString, "many">;
2248
+ nextStepId: z.ZodOptional<z.ZodString>;
2249
+ guidance: z.ZodString;
2250
+ }, "strip", z.ZodTypeAny, {
2251
+ stepsCompleted: string[];
2252
+ issueResolved: boolean;
2253
+ remainingIssues: string[];
2254
+ guidance: string;
2255
+ nextStepId?: string | undefined;
2256
+ }, {
2257
+ stepsCompleted: string[];
2258
+ issueResolved: boolean;
2259
+ remainingIssues: string[];
2260
+ guidance: string;
2261
+ nextStepId?: string | undefined;
2262
+ }>;
2263
+ export type VerifyProgressResponse = VerificationResult;
2264
+ export declare const ExplainConflictRequestSchema: z.ZodObject<{
2265
+ type: z.ZodLiteral<"conflict">;
2266
+ fileIndex: z.ZodNumber;
2267
+ blockIndex: z.ZodNumber;
2268
+ }, "strip", z.ZodTypeAny, {
2269
+ type: "conflict";
2270
+ fileIndex: number;
2271
+ blockIndex: number;
2272
+ }, {
2273
+ type: "conflict";
2274
+ fileIndex: number;
2275
+ blockIndex: number;
2276
+ }>;
2277
+ export declare const ExplainStateRequestSchema: z.ZodObject<{
2278
+ type: z.ZodLiteral<"state">;
2279
+ }, "strip", z.ZodTypeAny, {
2280
+ type: "state";
2281
+ }, {
2282
+ type: "state";
2283
+ }>;
2284
+ export declare const ExplainRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2285
+ type: z.ZodLiteral<"conflict">;
2286
+ fileIndex: z.ZodNumber;
2287
+ blockIndex: z.ZodNumber;
2288
+ }, "strip", z.ZodTypeAny, {
2289
+ type: "conflict";
2290
+ fileIndex: number;
2291
+ blockIndex: number;
2292
+ }, {
2293
+ type: "conflict";
2294
+ fileIndex: number;
2295
+ blockIndex: number;
2296
+ }>, z.ZodObject<{
2297
+ type: z.ZodLiteral<"state">;
2298
+ }, "strip", z.ZodTypeAny, {
2299
+ type: "state";
2300
+ }, {
2301
+ type: "state";
2302
+ }>]>;
2303
+ export type ExplainRequest = z.infer<typeof ExplainRequestSchema>;
2304
+ export declare const ConflictExplanationSchema: z.ZodObject<{
2305
+ summary: z.ZodString;
2306
+ oursInterpretation: z.ZodString;
2307
+ theirsInterpretation: z.ZodString;
2308
+ suggestedResolution: z.ZodString;
2309
+ riskNotes: z.ZodOptional<z.ZodString>;
2310
+ }, "strip", z.ZodTypeAny, {
2311
+ summary: string;
2312
+ oursInterpretation: string;
2313
+ theirsInterpretation: string;
2314
+ suggestedResolution: string;
2315
+ riskNotes?: string | undefined;
2316
+ }, {
2317
+ summary: string;
2318
+ oursInterpretation: string;
2319
+ theirsInterpretation: string;
2320
+ suggestedResolution: string;
2321
+ riskNotes?: string | undefined;
2322
+ }>;
2323
+ export type ConflictExplanation = z.infer<typeof ConflictExplanationSchema>;
2324
+ export declare const StateExplanationSchema: z.ZodObject<{
2325
+ summary: z.ZodString;
2326
+ howItHappened: z.ZodString;
2327
+ currentPosition: z.ZodString;
2328
+ safeNextSteps: z.ZodArray<z.ZodString, "many">;
2329
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2330
+ }, "strip", z.ZodTypeAny, {
2331
+ summary: string;
2332
+ howItHappened: string;
2333
+ currentPosition: string;
2334
+ safeNextSteps: string[];
2335
+ warnings?: string[] | undefined;
2336
+ }, {
2337
+ summary: string;
2338
+ howItHappened: string;
2339
+ currentPosition: string;
2340
+ safeNextSteps: string[];
2341
+ warnings?: string[] | undefined;
2342
+ }>;
2343
+ export type StateExplanation = z.infer<typeof StateExplanationSchema>;
2344
+ export declare const ExplainResponseSchema: z.ZodObject<{
2345
+ explanation: z.ZodUnion<[z.ZodObject<{
2346
+ summary: z.ZodString;
2347
+ oursInterpretation: z.ZodString;
2348
+ theirsInterpretation: z.ZodString;
2349
+ suggestedResolution: z.ZodString;
2350
+ riskNotes: z.ZodOptional<z.ZodString>;
2351
+ }, "strip", z.ZodTypeAny, {
2352
+ summary: string;
2353
+ oursInterpretation: string;
2354
+ theirsInterpretation: string;
2355
+ suggestedResolution: string;
2356
+ riskNotes?: string | undefined;
2357
+ }, {
2358
+ summary: string;
2359
+ oursInterpretation: string;
2360
+ theirsInterpretation: string;
2361
+ suggestedResolution: string;
2362
+ riskNotes?: string | undefined;
2363
+ }>, z.ZodObject<{
2364
+ summary: z.ZodString;
2365
+ howItHappened: z.ZodString;
2366
+ currentPosition: z.ZodString;
2367
+ safeNextSteps: z.ZodArray<z.ZodString, "many">;
2368
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2369
+ }, "strip", z.ZodTypeAny, {
2370
+ summary: string;
2371
+ howItHappened: string;
2372
+ currentPosition: string;
2373
+ safeNextSteps: string[];
2374
+ warnings?: string[] | undefined;
2375
+ }, {
2376
+ summary: string;
2377
+ howItHappened: string;
2378
+ currentPosition: string;
2379
+ safeNextSteps: string[];
2380
+ warnings?: string[] | undefined;
2381
+ }>]>;
2382
+ }, "strip", z.ZodTypeAny, {
2383
+ explanation: {
2384
+ summary: string;
2385
+ oursInterpretation: string;
2386
+ theirsInterpretation: string;
2387
+ suggestedResolution: string;
2388
+ riskNotes?: string | undefined;
2389
+ } | {
2390
+ summary: string;
2391
+ howItHappened: string;
2392
+ currentPosition: string;
2393
+ safeNextSteps: string[];
2394
+ warnings?: string[] | undefined;
2395
+ };
2396
+ }, {
2397
+ explanation: {
2398
+ summary: string;
2399
+ oursInterpretation: string;
2400
+ theirsInterpretation: string;
2401
+ suggestedResolution: string;
2402
+ riskNotes?: string | undefined;
2403
+ } | {
2404
+ summary: string;
2405
+ howItHappened: string;
2406
+ currentPosition: string;
2407
+ safeNextSteps: string[];
2408
+ warnings?: string[] | undefined;
2409
+ };
2410
+ }>;
2411
+ export type ExplainResponse = z.infer<typeof ExplainResponseSchema>;
2412
+ export declare const RegisterRequestSchema: z.ZodObject<{
2413
+ name: z.ZodOptional<z.ZodString>;
2414
+ email: z.ZodString;
2415
+ password: z.ZodString;
2416
+ }, "strip", z.ZodTypeAny, {
2417
+ email: string;
2418
+ password: string;
2419
+ name?: string | undefined;
2420
+ }, {
2421
+ email: string;
2422
+ password: string;
2423
+ name?: string | undefined;
2424
+ }>;
2425
+ export type RegisterRequest = z.infer<typeof RegisterRequestSchema>;
2426
+ export declare const RegisterResponseSchema: z.ZodObject<{
2427
+ user: z.ZodObject<{
2428
+ id: z.ZodString;
2429
+ name: z.ZodNullable<z.ZodString>;
2430
+ email: z.ZodString;
2431
+ }, "strip", z.ZodTypeAny, {
2432
+ id: string;
2433
+ name: string | null;
2434
+ email: string;
2435
+ }, {
2436
+ id: string;
2437
+ name: string | null;
2438
+ email: string;
2439
+ }>;
2440
+ }, "strip", z.ZodTypeAny, {
2441
+ user: {
2442
+ id: string;
2443
+ name: string | null;
2444
+ email: string;
2445
+ };
2446
+ }, {
2447
+ user: {
2448
+ id: string;
2449
+ name: string | null;
2450
+ email: string;
2451
+ };
2452
+ }>;
2453
+ export type RegisterResponse = z.infer<typeof RegisterResponseSchema>;
2454
+ export declare const ApiErrorSchema: z.ZodObject<{
2455
+ error: z.ZodString;
2456
+ }, "strip", z.ZodTypeAny, {
2457
+ error: string;
2458
+ }, {
2459
+ error: string;
2460
+ }>;
2461
+ export type ApiError = z.infer<typeof ApiErrorSchema>;
2462
+ export declare const SessionListItemSchema: z.ZodObject<{
2463
+ id: z.ZodString;
2464
+ title: z.ZodNullable<z.ZodString>;
2465
+ createdAt: z.ZodString;
2466
+ os: z.ZodNullable<z.ZodString>;
2467
+ hasPlan: z.ZodBoolean;
2468
+ issueType: z.ZodNullable<z.ZodString>;
2469
+ risk: z.ZodNullable<z.ZodString>;
2470
+ }, "strip", z.ZodTypeAny, {
2471
+ id: string;
2472
+ title: string | null;
2473
+ issueType: string | null;
2474
+ risk: string | null;
2475
+ createdAt: string;
2476
+ os: string | null;
2477
+ hasPlan: boolean;
2478
+ }, {
2479
+ id: string;
2480
+ title: string | null;
2481
+ issueType: string | null;
2482
+ risk: string | null;
2483
+ createdAt: string;
2484
+ os: string | null;
2485
+ hasPlan: boolean;
2486
+ }>;
2487
+ export type SessionListItem = z.infer<typeof SessionListItemSchema>;
2488
+ export declare const SessionListResponseSchema: z.ZodObject<{
2489
+ sessions: z.ZodArray<z.ZodObject<{
2490
+ id: z.ZodString;
2491
+ title: z.ZodNullable<z.ZodString>;
2492
+ createdAt: z.ZodString;
2493
+ os: z.ZodNullable<z.ZodString>;
2494
+ hasPlan: z.ZodBoolean;
2495
+ issueType: z.ZodNullable<z.ZodString>;
2496
+ risk: z.ZodNullable<z.ZodString>;
2497
+ }, "strip", z.ZodTypeAny, {
2498
+ id: string;
2499
+ title: string | null;
2500
+ issueType: string | null;
2501
+ risk: string | null;
2502
+ createdAt: string;
2503
+ os: string | null;
2504
+ hasPlan: boolean;
2505
+ }, {
2506
+ id: string;
2507
+ title: string | null;
2508
+ issueType: string | null;
2509
+ risk: string | null;
2510
+ createdAt: string;
2511
+ os: string | null;
2512
+ hasPlan: boolean;
2513
+ }>, "many">;
2514
+ total: z.ZodNumber;
2515
+ page: z.ZodNumber;
2516
+ pageSize: z.ZodNumber;
2517
+ }, "strip", z.ZodTypeAny, {
2518
+ sessions: {
2519
+ id: string;
2520
+ title: string | null;
2521
+ issueType: string | null;
2522
+ risk: string | null;
2523
+ createdAt: string;
2524
+ os: string | null;
2525
+ hasPlan: boolean;
2526
+ }[];
2527
+ total: number;
2528
+ page: number;
2529
+ pageSize: number;
2530
+ }, {
2531
+ sessions: {
2532
+ id: string;
2533
+ title: string | null;
2534
+ issueType: string | null;
2535
+ risk: string | null;
2536
+ createdAt: string;
2537
+ os: string | null;
2538
+ hasPlan: boolean;
2539
+ }[];
2540
+ total: number;
2541
+ page: number;
2542
+ pageSize: number;
2543
+ }>;
2544
+ export type SessionListResponse = z.infer<typeof SessionListResponseSchema>;
2545
+ //# sourceMappingURL=api.d.ts.map