@lace-cloud/canvas 0.18.0 → 0.20.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.
@@ -0,0 +1,4049 @@
1
+ import { Diagnostic as Diagnostic$1, CanvasArrangement, CanvasView, EngineMethod, EngineStreamMethod, BridgeMethod, MessageBridge } from '@lace-cloud/proto';
2
+ import { z } from 'zod';
3
+ import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
4
+
5
+ declare const COMMANDS: {
6
+ readonly "chaos get": {
7
+ readonly path: "chaos get";
8
+ readonly positionals: readonly [{
9
+ readonly name: "run";
10
+ readonly kind: "required";
11
+ }];
12
+ readonly flags: {
13
+ readonly org: {
14
+ readonly type: "string";
15
+ };
16
+ readonly output: {
17
+ readonly type: "string";
18
+ readonly values: readonly ["table", "json"];
19
+ };
20
+ readonly team: {
21
+ readonly type: "string";
22
+ };
23
+ };
24
+ readonly hidden: false;
25
+ readonly yes: false;
26
+ };
27
+ readonly "chaos list": {
28
+ readonly path: "chaos list";
29
+ readonly positionals: readonly [];
30
+ readonly flags: {
31
+ readonly org: {
32
+ readonly type: "string";
33
+ };
34
+ readonly output: {
35
+ readonly type: "string";
36
+ readonly values: readonly ["table", "json"];
37
+ };
38
+ readonly stack: {
39
+ readonly type: "string";
40
+ readonly required: true;
41
+ };
42
+ readonly team: {
43
+ readonly type: "string";
44
+ };
45
+ };
46
+ readonly hidden: false;
47
+ readonly yes: false;
48
+ };
49
+ readonly "chaos run": {
50
+ readonly path: "chaos run";
51
+ readonly positionals: readonly [];
52
+ readonly flags: {
53
+ readonly chaosBinding: {
54
+ readonly type: "string";
55
+ readonly required: true;
56
+ };
57
+ readonly org: {
58
+ readonly type: "string";
59
+ };
60
+ readonly output: {
61
+ readonly type: "string";
62
+ readonly values: readonly ["table", "json"];
63
+ };
64
+ readonly stack: {
65
+ readonly type: "string";
66
+ readonly required: true;
67
+ };
68
+ readonly team: {
69
+ readonly type: "string";
70
+ };
71
+ };
72
+ readonly hidden: false;
73
+ readonly yes: false;
74
+ };
75
+ readonly "connection get": {
76
+ readonly path: "connection get";
77
+ readonly positionals: readonly [{
78
+ readonly name: "connection";
79
+ readonly kind: "required";
80
+ }];
81
+ readonly flags: {
82
+ readonly org: {
83
+ readonly type: "string";
84
+ };
85
+ readonly output: {
86
+ readonly type: "string";
87
+ readonly values: readonly ["table", "json"];
88
+ };
89
+ readonly team: {
90
+ readonly type: "string";
91
+ };
92
+ };
93
+ readonly hidden: false;
94
+ readonly yes: false;
95
+ };
96
+ readonly "connection list": {
97
+ readonly path: "connection list";
98
+ readonly positionals: readonly [];
99
+ readonly flags: {
100
+ readonly org: {
101
+ readonly type: "string";
102
+ };
103
+ readonly output: {
104
+ readonly type: "string";
105
+ readonly values: readonly ["table", "json"];
106
+ };
107
+ readonly provider: {
108
+ readonly type: "string";
109
+ };
110
+ readonly team: {
111
+ readonly type: "string";
112
+ };
113
+ };
114
+ readonly hidden: false;
115
+ readonly yes: false;
116
+ };
117
+ readonly "hooks install": {
118
+ readonly path: "hooks install";
119
+ readonly positionals: readonly [];
120
+ readonly flags: {
121
+ readonly force: {
122
+ readonly type: "bool";
123
+ };
124
+ readonly path: {
125
+ readonly type: "string";
126
+ };
127
+ };
128
+ readonly hidden: false;
129
+ readonly yes: false;
130
+ };
131
+ readonly "hooks uninstall": {
132
+ readonly path: "hooks uninstall";
133
+ readonly positionals: readonly [];
134
+ readonly flags: {
135
+ readonly path: {
136
+ readonly type: "string";
137
+ };
138
+ };
139
+ readonly hidden: false;
140
+ readonly yes: false;
141
+ };
142
+ readonly license: {
143
+ readonly path: "license";
144
+ readonly positionals: readonly [];
145
+ readonly flags: {
146
+ readonly thirdParty: {
147
+ readonly type: "bool";
148
+ };
149
+ };
150
+ readonly hidden: false;
151
+ readonly yes: false;
152
+ };
153
+ readonly login: {
154
+ readonly path: "login";
155
+ readonly positionals: readonly [];
156
+ readonly flags: {
157
+ readonly email: {
158
+ readonly type: "string";
159
+ };
160
+ readonly org: {
161
+ readonly type: "string";
162
+ };
163
+ readonly output: {
164
+ readonly type: "string";
165
+ readonly values: readonly ["table", "json"];
166
+ };
167
+ readonly provider: {
168
+ readonly type: "string";
169
+ };
170
+ readonly token: {
171
+ readonly type: "string";
172
+ };
173
+ };
174
+ readonly hidden: false;
175
+ readonly yes: false;
176
+ };
177
+ readonly logout: {
178
+ readonly path: "logout";
179
+ readonly positionals: readonly [];
180
+ readonly flags: {
181
+ readonly output: {
182
+ readonly type: "string";
183
+ readonly values: readonly ["table", "json"];
184
+ };
185
+ };
186
+ readonly hidden: false;
187
+ readonly yes: false;
188
+ };
189
+ readonly "module convert": {
190
+ readonly path: "module convert";
191
+ readonly positionals: readonly [];
192
+ readonly flags: {
193
+ readonly output: {
194
+ readonly type: "string";
195
+ readonly values: readonly ["table", "json"];
196
+ };
197
+ readonly path: {
198
+ readonly type: "string";
199
+ };
200
+ };
201
+ readonly hidden: false;
202
+ readonly yes: false;
203
+ };
204
+ readonly "module docs": {
205
+ readonly path: "module docs";
206
+ readonly positionals: readonly [];
207
+ readonly flags: {
208
+ readonly file: {
209
+ readonly type: "string";
210
+ };
211
+ readonly output: {
212
+ readonly type: "string";
213
+ readonly values: readonly ["markdown", "json", "terraform-docs-json", "terraform-docs-yaml"];
214
+ };
215
+ readonly path: {
216
+ readonly type: "string";
217
+ };
218
+ };
219
+ readonly hidden: false;
220
+ readonly yes: false;
221
+ };
222
+ readonly "module fmt": {
223
+ readonly path: "module fmt";
224
+ readonly positionals: readonly [];
225
+ readonly flags: {
226
+ readonly check: {
227
+ readonly type: "bool";
228
+ };
229
+ readonly diff: {
230
+ readonly type: "bool";
231
+ };
232
+ readonly output: {
233
+ readonly type: "string";
234
+ readonly values: readonly ["table", "json"];
235
+ };
236
+ readonly path: {
237
+ readonly type: "string";
238
+ };
239
+ readonly recursive: {
240
+ readonly type: "bool";
241
+ };
242
+ };
243
+ readonly hidden: false;
244
+ readonly yes: false;
245
+ };
246
+ readonly "module scan": {
247
+ readonly path: "module scan";
248
+ readonly positionals: readonly [];
249
+ readonly flags: {
250
+ readonly output: {
251
+ readonly type: "string";
252
+ readonly values: readonly ["table", "json", "tfsec-json", "sarif", "junit", "checkstyle"];
253
+ };
254
+ readonly path: {
255
+ readonly type: "string";
256
+ };
257
+ readonly severity: {
258
+ readonly type: "string";
259
+ readonly values: readonly ["LOW", "MEDIUM", "HIGH", "CRITICAL"];
260
+ };
261
+ readonly softFail: {
262
+ readonly type: "bool";
263
+ };
264
+ };
265
+ readonly hidden: false;
266
+ readonly yes: false;
267
+ };
268
+ readonly "module validate": {
269
+ readonly path: "module validate";
270
+ readonly positionals: readonly [];
271
+ readonly flags: {
272
+ readonly org: {
273
+ readonly type: "string";
274
+ };
275
+ readonly output: {
276
+ readonly type: "string";
277
+ readonly values: readonly ["table", "json"];
278
+ };
279
+ readonly path: {
280
+ readonly type: "string";
281
+ };
282
+ readonly view: {
283
+ readonly type: "string";
284
+ readonly values: readonly ["public", "publication"];
285
+ };
286
+ };
287
+ readonly hidden: false;
288
+ readonly yes: false;
289
+ };
290
+ readonly "org current": {
291
+ readonly path: "org current";
292
+ readonly positionals: readonly [];
293
+ readonly flags: {
294
+ readonly output: {
295
+ readonly type: "string";
296
+ readonly values: readonly ["table", "json"];
297
+ };
298
+ };
299
+ readonly hidden: false;
300
+ readonly yes: false;
301
+ };
302
+ readonly "org list": {
303
+ readonly path: "org list";
304
+ readonly positionals: readonly [];
305
+ readonly flags: {
306
+ readonly output: {
307
+ readonly type: "string";
308
+ readonly values: readonly ["table", "json"];
309
+ };
310
+ };
311
+ readonly hidden: false;
312
+ readonly yes: false;
313
+ };
314
+ readonly "org use": {
315
+ readonly path: "org use";
316
+ readonly positionals: readonly [{
317
+ readonly name: "org";
318
+ readonly kind: "required";
319
+ }];
320
+ readonly flags: {
321
+ readonly output: {
322
+ readonly type: "string";
323
+ readonly values: readonly ["table", "json"];
324
+ };
325
+ };
326
+ readonly hidden: false;
327
+ readonly yes: false;
328
+ };
329
+ readonly "policy get": {
330
+ readonly path: "policy get";
331
+ readonly positionals: readonly [{
332
+ readonly name: "policy";
333
+ readonly kind: "required";
334
+ }];
335
+ readonly flags: {
336
+ readonly org: {
337
+ readonly type: "string";
338
+ };
339
+ readonly output: {
340
+ readonly type: "string";
341
+ readonly values: readonly ["table", "json"];
342
+ };
343
+ readonly team: {
344
+ readonly type: "string";
345
+ };
346
+ };
347
+ readonly hidden: false;
348
+ readonly yes: false;
349
+ };
350
+ readonly "policy list": {
351
+ readonly path: "policy list";
352
+ readonly positionals: readonly [];
353
+ readonly flags: {
354
+ readonly org: {
355
+ readonly type: "string";
356
+ };
357
+ readonly output: {
358
+ readonly type: "string";
359
+ readonly values: readonly ["table", "json"];
360
+ };
361
+ readonly stack: {
362
+ readonly type: "string";
363
+ };
364
+ readonly team: {
365
+ readonly type: "string";
366
+ };
367
+ };
368
+ readonly hidden: false;
369
+ readonly yes: false;
370
+ };
371
+ readonly "registry describe": {
372
+ readonly path: "registry describe";
373
+ readonly positionals: readonly [{
374
+ readonly name: "artifact";
375
+ readonly kind: "required";
376
+ }];
377
+ readonly flags: {
378
+ readonly org: {
379
+ readonly type: "string";
380
+ };
381
+ readonly output: {
382
+ readonly type: "string";
383
+ readonly values: readonly ["table", "json"];
384
+ };
385
+ readonly version: {
386
+ readonly type: "string";
387
+ };
388
+ };
389
+ readonly hidden: false;
390
+ readonly yes: false;
391
+ };
392
+ readonly "registry get": {
393
+ readonly path: "registry get";
394
+ readonly positionals: readonly [{
395
+ readonly name: "artifact";
396
+ readonly kind: "required";
397
+ }];
398
+ readonly flags: {
399
+ readonly org: {
400
+ readonly type: "string";
401
+ };
402
+ readonly output: {
403
+ readonly type: "string";
404
+ readonly values: readonly ["table", "json"];
405
+ };
406
+ readonly view: {
407
+ readonly type: "string";
408
+ readonly values: readonly ["public"];
409
+ };
410
+ };
411
+ readonly hidden: false;
412
+ readonly yes: false;
413
+ };
414
+ readonly "registry list": {
415
+ readonly path: "registry list";
416
+ readonly positionals: readonly [];
417
+ readonly flags: {
418
+ readonly author: {
419
+ readonly type: "string";
420
+ };
421
+ readonly axis: {
422
+ readonly type: "string";
423
+ readonly values: readonly ["module", "scanner", "handler", "agent"];
424
+ };
425
+ readonly category: {
426
+ readonly type: "string";
427
+ };
428
+ readonly limit: {
429
+ readonly type: "int";
430
+ };
431
+ readonly org: {
432
+ readonly type: "string";
433
+ };
434
+ readonly output: {
435
+ readonly type: "string";
436
+ readonly values: readonly ["table", "json"];
437
+ };
438
+ readonly query: {
439
+ readonly type: "string";
440
+ };
441
+ readonly system: {
442
+ readonly type: "string";
443
+ };
444
+ };
445
+ readonly hidden: false;
446
+ readonly yes: false;
447
+ };
448
+ readonly "registry validate": {
449
+ readonly path: "registry validate";
450
+ readonly positionals: readonly [];
451
+ readonly flags: {
452
+ readonly axis: {
453
+ readonly type: "string";
454
+ readonly values: readonly ["module", "scanner", "handler", "agent"];
455
+ readonly required: true;
456
+ };
457
+ readonly manifest: {
458
+ readonly type: "string";
459
+ readonly required: true;
460
+ };
461
+ readonly output: {
462
+ readonly type: "string";
463
+ readonly values: readonly ["table", "json"];
464
+ };
465
+ readonly readme: {
466
+ readonly type: "string";
467
+ };
468
+ };
469
+ readonly hidden: false;
470
+ readonly yes: false;
471
+ };
472
+ readonly "run bundle": {
473
+ readonly path: "run bundle";
474
+ readonly positionals: readonly [{
475
+ readonly name: "run";
476
+ readonly kind: "required";
477
+ }];
478
+ readonly flags: {
479
+ readonly org: {
480
+ readonly type: "string";
481
+ };
482
+ readonly output: {
483
+ readonly type: "string";
484
+ readonly values: readonly ["json"];
485
+ };
486
+ readonly team: {
487
+ readonly type: "string";
488
+ };
489
+ };
490
+ readonly hidden: false;
491
+ readonly yes: false;
492
+ };
493
+ readonly "run cancel": {
494
+ readonly path: "run cancel";
495
+ readonly positionals: readonly [{
496
+ readonly name: "run";
497
+ readonly kind: "required";
498
+ }];
499
+ readonly flags: {
500
+ readonly org: {
501
+ readonly type: "string";
502
+ };
503
+ readonly output: {
504
+ readonly type: "string";
505
+ readonly values: readonly ["table", "json"];
506
+ };
507
+ readonly reason: {
508
+ readonly type: "string";
509
+ };
510
+ readonly team: {
511
+ readonly type: "string";
512
+ };
513
+ };
514
+ readonly hidden: false;
515
+ readonly yes: false;
516
+ };
517
+ readonly "run get": {
518
+ readonly path: "run get";
519
+ readonly positionals: readonly [{
520
+ readonly name: "run";
521
+ readonly kind: "optional";
522
+ }];
523
+ readonly flags: {
524
+ readonly change: {
525
+ readonly type: "string";
526
+ };
527
+ readonly org: {
528
+ readonly type: "string";
529
+ };
530
+ readonly output: {
531
+ readonly type: "string";
532
+ readonly values: readonly ["table", "json"];
533
+ };
534
+ readonly team: {
535
+ readonly type: "string";
536
+ };
537
+ };
538
+ readonly hidden: false;
539
+ readonly yes: false;
540
+ };
541
+ readonly "run list": {
542
+ readonly path: "run list";
543
+ readonly positionals: readonly [];
544
+ readonly flags: {
545
+ readonly change: {
546
+ readonly type: "string";
547
+ };
548
+ readonly cursor: {
549
+ readonly type: "string";
550
+ };
551
+ readonly kind: {
552
+ readonly type: "string";
553
+ };
554
+ readonly limit: {
555
+ readonly type: "int";
556
+ };
557
+ readonly org: {
558
+ readonly type: "string";
559
+ };
560
+ readonly output: {
561
+ readonly type: "string";
562
+ readonly values: readonly ["table", "json"];
563
+ };
564
+ readonly stack: {
565
+ readonly type: "string";
566
+ };
567
+ readonly startedAfter: {
568
+ readonly type: "string";
569
+ };
570
+ readonly status: {
571
+ readonly type: "string";
572
+ };
573
+ readonly team: {
574
+ readonly type: "string";
575
+ };
576
+ };
577
+ readonly hidden: false;
578
+ readonly yes: false;
579
+ };
580
+ readonly "run logs": {
581
+ readonly path: "run logs";
582
+ readonly positionals: readonly [{
583
+ readonly name: "run";
584
+ readonly kind: "required";
585
+ }];
586
+ readonly flags: {
587
+ readonly follow: {
588
+ readonly type: "bool";
589
+ };
590
+ readonly org: {
591
+ readonly type: "string";
592
+ };
593
+ readonly output: {
594
+ readonly type: "string";
595
+ readonly values: readonly ["table", "json"];
596
+ };
597
+ readonly team: {
598
+ readonly type: "string";
599
+ };
600
+ };
601
+ readonly hidden: false;
602
+ readonly yes: false;
603
+ };
604
+ readonly "run plan": {
605
+ readonly path: "run plan";
606
+ readonly positionals: readonly [{
607
+ readonly name: "run";
608
+ readonly kind: "required";
609
+ }];
610
+ readonly flags: {
611
+ readonly org: {
612
+ readonly type: "string";
613
+ };
614
+ readonly output: {
615
+ readonly type: "string";
616
+ readonly values: readonly ["table", "json"];
617
+ };
618
+ readonly team: {
619
+ readonly type: "string";
620
+ };
621
+ };
622
+ readonly hidden: false;
623
+ readonly yes: false;
624
+ };
625
+ readonly "stack apply": {
626
+ readonly path: "stack apply";
627
+ readonly positionals: readonly [{
628
+ readonly name: "stack";
629
+ readonly kind: "required";
630
+ }];
631
+ readonly flags: {
632
+ readonly allowSourceMismatch: {
633
+ readonly type: "bool";
634
+ };
635
+ readonly commit: {
636
+ readonly type: "string";
637
+ };
638
+ readonly org: {
639
+ readonly type: "string";
640
+ };
641
+ readonly output: {
642
+ readonly type: "string";
643
+ readonly values: readonly ["table", "json"];
644
+ };
645
+ readonly prUrl: {
646
+ readonly type: "string";
647
+ };
648
+ readonly ref: {
649
+ readonly type: "string";
650
+ };
651
+ readonly team: {
652
+ readonly type: "string";
653
+ };
654
+ readonly var: {
655
+ readonly type: "stringArray";
656
+ readonly repeated: true;
657
+ };
658
+ readonly varFile: {
659
+ readonly type: "stringArray";
660
+ readonly repeated: true;
661
+ };
662
+ };
663
+ readonly hidden: false;
664
+ readonly yes: false;
665
+ };
666
+ readonly "stack create": {
667
+ readonly path: "stack create";
668
+ readonly positionals: readonly [{
669
+ readonly name: "slug";
670
+ readonly kind: "required";
671
+ }];
672
+ readonly flags: {
673
+ readonly connection: {
674
+ readonly type: "string";
675
+ readonly required: true;
676
+ };
677
+ readonly description: {
678
+ readonly type: "string";
679
+ };
680
+ readonly name: {
681
+ readonly type: "string";
682
+ };
683
+ readonly org: {
684
+ readonly type: "string";
685
+ };
686
+ readonly output: {
687
+ readonly type: "string";
688
+ readonly values: readonly ["table", "json"];
689
+ };
690
+ readonly source: {
691
+ readonly type: "string";
692
+ };
693
+ readonly sourcePath: {
694
+ readonly type: "string";
695
+ };
696
+ readonly sourceRef: {
697
+ readonly type: "string";
698
+ };
699
+ readonly sourceRepo: {
700
+ readonly type: "string";
701
+ };
702
+ readonly team: {
703
+ readonly type: "string";
704
+ };
705
+ };
706
+ readonly hidden: false;
707
+ readonly yes: false;
708
+ };
709
+ readonly "stack delete": {
710
+ readonly path: "stack delete";
711
+ readonly positionals: readonly [{
712
+ readonly name: "stack";
713
+ readonly kind: "required";
714
+ }];
715
+ readonly flags: {
716
+ readonly org: {
717
+ readonly type: "string";
718
+ };
719
+ readonly output: {
720
+ readonly type: "string";
721
+ readonly values: readonly ["table", "json"];
722
+ };
723
+ readonly team: {
724
+ readonly type: "string";
725
+ };
726
+ readonly yes: {
727
+ readonly type: "bool";
728
+ };
729
+ };
730
+ readonly hidden: false;
731
+ readonly yes: true;
732
+ };
733
+ readonly "stack describe": {
734
+ readonly path: "stack describe";
735
+ readonly positionals: readonly [{
736
+ readonly name: "stack";
737
+ readonly kind: "required";
738
+ }];
739
+ readonly flags: {
740
+ readonly full: {
741
+ readonly type: "bool";
742
+ };
743
+ readonly includeArchived: {
744
+ readonly type: "bool";
745
+ };
746
+ readonly org: {
747
+ readonly type: "string";
748
+ };
749
+ readonly output: {
750
+ readonly type: "string";
751
+ readonly values: readonly ["table", "json"];
752
+ };
753
+ readonly team: {
754
+ readonly type: "string";
755
+ };
756
+ };
757
+ readonly hidden: false;
758
+ readonly yes: false;
759
+ };
760
+ readonly "stack destroy": {
761
+ readonly path: "stack destroy";
762
+ readonly positionals: readonly [{
763
+ readonly name: "stack";
764
+ readonly kind: "required";
765
+ }];
766
+ readonly flags: {
767
+ readonly allowSourceMismatch: {
768
+ readonly type: "bool";
769
+ };
770
+ readonly archive: {
771
+ readonly type: "bool";
772
+ };
773
+ readonly commit: {
774
+ readonly type: "string";
775
+ };
776
+ readonly org: {
777
+ readonly type: "string";
778
+ };
779
+ readonly output: {
780
+ readonly type: "string";
781
+ readonly values: readonly ["table", "json"];
782
+ };
783
+ readonly prUrl: {
784
+ readonly type: "string";
785
+ };
786
+ readonly ref: {
787
+ readonly type: "string";
788
+ };
789
+ readonly team: {
790
+ readonly type: "string";
791
+ };
792
+ readonly var: {
793
+ readonly type: "stringArray";
794
+ readonly repeated: true;
795
+ };
796
+ readonly varFile: {
797
+ readonly type: "stringArray";
798
+ readonly repeated: true;
799
+ };
800
+ readonly yes: {
801
+ readonly type: "bool";
802
+ };
803
+ };
804
+ readonly hidden: false;
805
+ readonly yes: true;
806
+ };
807
+ readonly "stack get": {
808
+ readonly path: "stack get";
809
+ readonly positionals: readonly [{
810
+ readonly name: "stack";
811
+ readonly kind: "required";
812
+ }];
813
+ readonly flags: {
814
+ readonly includeArchived: {
815
+ readonly type: "bool";
816
+ };
817
+ readonly org: {
818
+ readonly type: "string";
819
+ };
820
+ readonly output: {
821
+ readonly type: "string";
822
+ readonly values: readonly ["table", "json"];
823
+ };
824
+ readonly team: {
825
+ readonly type: "string";
826
+ };
827
+ };
828
+ readonly hidden: false;
829
+ readonly yes: false;
830
+ };
831
+ readonly "stack import": {
832
+ readonly path: "stack import";
833
+ readonly positionals: readonly [{
834
+ readonly name: "stack";
835
+ readonly kind: "required";
836
+ }];
837
+ readonly flags: {
838
+ readonly allowPartial: {
839
+ readonly type: "bool";
840
+ };
841
+ readonly org: {
842
+ readonly type: "string";
843
+ };
844
+ readonly output: {
845
+ readonly type: "string";
846
+ readonly values: readonly ["table", "json"];
847
+ };
848
+ readonly path: {
849
+ readonly type: "string";
850
+ };
851
+ readonly state: {
852
+ readonly type: "string";
853
+ readonly required: true;
854
+ };
855
+ readonly team: {
856
+ readonly type: "string";
857
+ };
858
+ };
859
+ readonly hidden: false;
860
+ readonly yes: false;
861
+ };
862
+ readonly "stack list": {
863
+ readonly path: "stack list";
864
+ readonly positionals: readonly [];
865
+ readonly flags: {
866
+ readonly cursor: {
867
+ readonly type: "string";
868
+ };
869
+ readonly includeArchived: {
870
+ readonly type: "bool";
871
+ };
872
+ readonly limit: {
873
+ readonly type: "int";
874
+ };
875
+ readonly org: {
876
+ readonly type: "string";
877
+ };
878
+ readonly output: {
879
+ readonly type: "string";
880
+ readonly values: readonly ["table", "json"];
881
+ };
882
+ readonly source: {
883
+ readonly type: "string";
884
+ };
885
+ readonly team: {
886
+ readonly type: "string";
887
+ };
888
+ };
889
+ readonly hidden: false;
890
+ readonly yes: false;
891
+ };
892
+ readonly "stack preview": {
893
+ readonly path: "stack preview";
894
+ readonly positionals: readonly [{
895
+ readonly name: "stack";
896
+ readonly kind: "required";
897
+ }];
898
+ readonly flags: {
899
+ readonly org: {
900
+ readonly type: "string";
901
+ };
902
+ readonly output: {
903
+ readonly type: "string";
904
+ readonly values: readonly ["table", "json"];
905
+ };
906
+ readonly team: {
907
+ readonly type: "string";
908
+ };
909
+ readonly var: {
910
+ readonly type: "stringArray";
911
+ readonly repeated: true;
912
+ };
913
+ readonly varFile: {
914
+ readonly type: "stringArray";
915
+ readonly repeated: true;
916
+ };
917
+ };
918
+ readonly hidden: false;
919
+ readonly yes: false;
920
+ };
921
+ readonly "stack scan": {
922
+ readonly path: "stack scan";
923
+ readonly positionals: readonly [{
924
+ readonly name: "stack";
925
+ readonly kind: "required";
926
+ }];
927
+ readonly flags: {
928
+ readonly full: {
929
+ readonly type: "bool";
930
+ };
931
+ readonly org: {
932
+ readonly type: "string";
933
+ };
934
+ readonly output: {
935
+ readonly type: "string";
936
+ readonly values: readonly ["table", "json"];
937
+ };
938
+ readonly team: {
939
+ readonly type: "string";
940
+ };
941
+ readonly wait: {
942
+ readonly type: "bool";
943
+ };
944
+ readonly waitTimeout: {
945
+ readonly type: "duration";
946
+ };
947
+ };
948
+ readonly hidden: false;
949
+ readonly yes: false;
950
+ };
951
+ readonly "stack update": {
952
+ readonly path: "stack update";
953
+ readonly positionals: readonly [{
954
+ readonly name: "stack";
955
+ readonly kind: "required";
956
+ }];
957
+ readonly flags: {
958
+ readonly description: {
959
+ readonly type: "string";
960
+ };
961
+ readonly name: {
962
+ readonly type: "string";
963
+ };
964
+ readonly org: {
965
+ readonly type: "string";
966
+ };
967
+ readonly output: {
968
+ readonly type: "string";
969
+ readonly values: readonly ["table", "json"];
970
+ };
971
+ readonly sourcePath: {
972
+ readonly type: "string";
973
+ };
974
+ readonly sourceRef: {
975
+ readonly type: "string";
976
+ };
977
+ readonly sourceRepo: {
978
+ readonly type: "string";
979
+ };
980
+ readonly team: {
981
+ readonly type: "string";
982
+ };
983
+ };
984
+ readonly hidden: false;
985
+ readonly yes: false;
986
+ };
987
+ readonly "team current": {
988
+ readonly path: "team current";
989
+ readonly positionals: readonly [];
990
+ readonly flags: {
991
+ readonly org: {
992
+ readonly type: "string";
993
+ };
994
+ readonly output: {
995
+ readonly type: "string";
996
+ readonly values: readonly ["table", "json"];
997
+ };
998
+ };
999
+ readonly hidden: false;
1000
+ readonly yes: false;
1001
+ };
1002
+ readonly "team list": {
1003
+ readonly path: "team list";
1004
+ readonly positionals: readonly [];
1005
+ readonly flags: {
1006
+ readonly cursor: {
1007
+ readonly type: "string";
1008
+ };
1009
+ readonly limit: {
1010
+ readonly type: "int";
1011
+ };
1012
+ readonly org: {
1013
+ readonly type: "string";
1014
+ };
1015
+ readonly output: {
1016
+ readonly type: "string";
1017
+ readonly values: readonly ["table", "json"];
1018
+ };
1019
+ };
1020
+ readonly hidden: false;
1021
+ readonly yes: false;
1022
+ };
1023
+ readonly "team use": {
1024
+ readonly path: "team use";
1025
+ readonly positionals: readonly [{
1026
+ readonly name: "team";
1027
+ readonly kind: "required";
1028
+ }];
1029
+ readonly flags: {
1030
+ readonly org: {
1031
+ readonly type: "string";
1032
+ };
1033
+ readonly output: {
1034
+ readonly type: "string";
1035
+ readonly values: readonly ["table", "json"];
1036
+ };
1037
+ };
1038
+ readonly hidden: false;
1039
+ readonly yes: false;
1040
+ };
1041
+ readonly version: {
1042
+ readonly path: "version";
1043
+ readonly positionals: readonly [];
1044
+ readonly flags: {
1045
+ readonly output: {
1046
+ readonly type: "string";
1047
+ readonly values: readonly ["table", "json"];
1048
+ };
1049
+ };
1050
+ readonly hidden: false;
1051
+ readonly yes: false;
1052
+ };
1053
+ readonly whoami: {
1054
+ readonly path: "whoami";
1055
+ readonly positionals: readonly [];
1056
+ readonly flags: {
1057
+ readonly output: {
1058
+ readonly type: "string";
1059
+ readonly values: readonly ["table", "json"];
1060
+ };
1061
+ };
1062
+ readonly hidden: false;
1063
+ readonly yes: false;
1064
+ };
1065
+ };
1066
+ /** Every non-hidden command path, minus `lace ` and minus `lace engine`. */
1067
+ type CommandPath = keyof typeof COMMANDS;
1068
+ type FlagTypeOf<F> = F extends {
1069
+ type: "bool";
1070
+ } ? boolean : F extends {
1071
+ type: "int";
1072
+ } ? number : F extends {
1073
+ type: "stringArray";
1074
+ } ? string[] : F extends {
1075
+ values: readonly (infer V)[];
1076
+ } ? V : string;
1077
+ type PositionalOf<P extends CommandPath> = (typeof COMMANDS)[P]["positionals"][number];
1078
+ type PositionalNameOf<P extends CommandPath, Kind extends "required" | "optional" | "variadic"> = Extract<PositionalOf<P>, {
1079
+ kind: Kind;
1080
+ }>["name"];
1081
+ /** `output` is excluded: Invoke owns it, never the command binding. */
1082
+ type FlagKeys<P extends CommandPath> = Exclude<keyof (typeof COMMANDS)[P]["flags"], "output">;
1083
+ type RequiredFlagKeys<P extends CommandPath> = {
1084
+ [K in FlagKeys<P>]: (typeof COMMANDS)[P]["flags"][K] extends {
1085
+ required: true;
1086
+ } ? K : never;
1087
+ }[FlagKeys<P>];
1088
+ type OptionalFlagKeys<P extends CommandPath> = Exclude<FlagKeys<P>, RequiredFlagKeys<P>>;
1089
+ /** Required positionals/flags are non-optional; enum flags become unions. */
1090
+ type ArgsOf<P extends CommandPath> = {
1091
+ [K in PositionalNameOf<P, "required">]: string;
1092
+ } & {
1093
+ [K in PositionalNameOf<P, "optional">]?: string;
1094
+ } & {
1095
+ [K in PositionalNameOf<P, "variadic">]?: string[];
1096
+ } & {
1097
+ [K in RequiredFlagKeys<P>]: FlagTypeOf<(typeof COMMANDS)[P]["flags"][K]>;
1098
+ } & {
1099
+ [K in OptionalFlagKeys<P>]?: FlagTypeOf<(typeof COMMANDS)[P]["flags"][K]>;
1100
+ };
1101
+ /**
1102
+ * flags (`--flag=value`, sorted by flag name) then `--` then positionals in
1103
+ * golden order, so a positional value that starts with `-` always parses
1104
+ * as a positional, never as a flag. A bool `true` emits a bare `--flag`;
1105
+ * `false`/absent is omitted. A repeated flag emits one `--flag=v` per
1106
+ * element.
1107
+ */
1108
+ declare function toArgv<P extends CommandPath>(path: P, args: ArgsOf<P>): string[];
1109
+
1110
+ /**
1111
+ * A generic empty message that you can re-use to avoid defining duplicated
1112
+ * empty messages in your APIs. A typical example is to use it as the request
1113
+ * or the response type of an API method. For instance:
1114
+ *
1115
+ * service Foo {
1116
+ * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1117
+ * }
1118
+ */
1119
+ interface Empty {
1120
+ }
1121
+ declare const Empty: MessageFns$2<Empty>;
1122
+ type Builtin$2 = Date | Function | Uint8Array | string | number | boolean | undefined;
1123
+ type DeepPartial$2<T> = T extends Builtin$2 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$2<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$2<U>> : T extends {} ? {
1124
+ [K in keyof T]?: DeepPartial$2<T[K]>;
1125
+ } : Partial<T>;
1126
+ type KeysOfUnion$2<T> = T extends T ? keyof T : never;
1127
+ type Exact$2<P, I extends P> = P extends Builtin$2 ? P : P & {
1128
+ [K in keyof P]: Exact$2<P[K], I[K]>;
1129
+ } & {
1130
+ [K in Exclude<keyof I, KeysOfUnion$2<P>>]: never;
1131
+ };
1132
+ interface MessageFns$2<T> {
1133
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1134
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1135
+ fromJSON(object: any): T;
1136
+ toJSON(message: T): unknown;
1137
+ create<I extends Exact$2<DeepPartial$2<T>, I>>(base?: I): T;
1138
+ fromPartial<I extends Exact$2<DeepPartial$2<T>, I>>(object: I): T;
1139
+ }
1140
+
1141
+ interface Bundle {
1142
+ /**
1143
+ * The format of this encoding: "2.0", at which every Expression carries
1144
+ * the module references the engine read from it. The engine writes every
1145
+ * Bundle at it; an encoding of an earlier version carries none.
1146
+ */
1147
+ schema_version: string;
1148
+ kind: string;
1149
+ entry: string;
1150
+ modules: {
1151
+ [key: string]: Module;
1152
+ };
1153
+ }
1154
+ declare const Bundle: MessageFns$1<Bundle>;
1155
+ interface Module {
1156
+ id: string;
1157
+ version: string;
1158
+ source: Source | undefined;
1159
+ interface: Interface | undefined;
1160
+ modules: Use[];
1161
+ resources: Resource[];
1162
+ locals: Local[];
1163
+ exports: Exports | undefined;
1164
+ terraform: TerraformBlock | undefined;
1165
+ providers: ProviderConfig[];
1166
+ /** top-level directives: moved {}, import {} */
1167
+ top_level_blocks: Block[];
1168
+ }
1169
+ declare const Module: MessageFns$1<Module>;
1170
+ interface Interface {
1171
+ inputs: InputDef$1[];
1172
+ outputs: OutputDef$1[];
1173
+ }
1174
+ declare const Interface: MessageFns$1<Interface>;
1175
+ interface InputDef$1 {
1176
+ name: string;
1177
+ type: string;
1178
+ required: boolean;
1179
+ description: string;
1180
+ default_value: any | undefined;
1181
+ validation: ValidationBlock$1[];
1182
+ sensitive: boolean;
1183
+ /** unset = default (true); explicit false is meaningful */
1184
+ nullable?: boolean | undefined;
1185
+ /** unset = default (false); explicit true is meaningful */
1186
+ ephemeral?: boolean | undefined;
1187
+ }
1188
+ declare const InputDef$1: MessageFns$1<InputDef$1>;
1189
+ interface ValidationBlock$1 {
1190
+ condition: string;
1191
+ error_message: string;
1192
+ }
1193
+ declare const ValidationBlock$1: MessageFns$1<ValidationBlock$1>;
1194
+ interface OutputDef$1 {
1195
+ name: string;
1196
+ type: string;
1197
+ description: string;
1198
+ sensitive: boolean;
1199
+ depends_on: string[];
1200
+ }
1201
+ declare const OutputDef$1: MessageFns$1<OutputDef$1>;
1202
+ interface Source {
1203
+ kind: string;
1204
+ repo: string;
1205
+ subdir: string;
1206
+ ref: string;
1207
+ }
1208
+ declare const Source: MessageFns$1<Source>;
1209
+ interface Local {
1210
+ name: string;
1211
+ value: Binding | undefined;
1212
+ }
1213
+ declare const Local: MessageFns$1<Local>;
1214
+ interface Use {
1215
+ id: string;
1216
+ module: string;
1217
+ inputs: {
1218
+ [key: string]: Binding;
1219
+ };
1220
+ depends_on: string[];
1221
+ /** count meta-argument */
1222
+ count: Binding | undefined;
1223
+ /** for_each meta-argument */
1224
+ for_each: Binding | undefined;
1225
+ /**
1226
+ * A module call's `providers = {}` map (child-local name → root ref).
1227
+ * Each entry targets the child's default provider slot for that name;
1228
+ * this map has no way to target an aliased child slot.
1229
+ */
1230
+ providers: {
1231
+ [key: string]: string;
1232
+ };
1233
+ }
1234
+ declare const Use: MessageFns$1<Use>;
1235
+ interface Resource {
1236
+ id: string;
1237
+ kind: string;
1238
+ type: string;
1239
+ inputs: {
1240
+ [key: string]: Binding;
1241
+ };
1242
+ depends_on: string[];
1243
+ /** nested blocks (ingress, lifecycle, dynamic, …) */
1244
+ blocks: Block[];
1245
+ /** count meta-argument */
1246
+ count: Binding | undefined;
1247
+ /** for_each meta-argument */
1248
+ for_each: Binding | undefined;
1249
+ /** provider meta-argument, e.g. "aws.west" */
1250
+ provider_ref: string;
1251
+ }
1252
+ declare const Resource: MessageFns$1<Resource>;
1253
+ /**
1254
+ * Block is a recursive nested block (within a resource, or top-level moved/
1255
+ * import). Attributes are ordered (declaration order) so regenerated HCL is
1256
+ * byte-deterministic.
1257
+ */
1258
+ interface Block {
1259
+ type: string;
1260
+ labels: string[];
1261
+ attributes: NamedBinding[];
1262
+ blocks: Block[];
1263
+ }
1264
+ declare const Block: MessageFns$1<Block>;
1265
+ /** NamedBinding is an ordered (name, value) attribute within a Block. */
1266
+ interface NamedBinding {
1267
+ name: string;
1268
+ value: Binding | undefined;
1269
+ }
1270
+ declare const NamedBinding: MessageFns$1<NamedBinding>;
1271
+ interface Exports {
1272
+ outputs: {
1273
+ [key: string]: OutputExport;
1274
+ };
1275
+ }
1276
+ declare const Exports: MessageFns$1<Exports>;
1277
+ interface OutputExport {
1278
+ out: OutputRef | undefined;
1279
+ lit: any | undefined;
1280
+ var: string;
1281
+ expr: Expression | undefined;
1282
+ }
1283
+ declare const OutputExport: MessageFns$1<OutputExport>;
1284
+ interface Binding {
1285
+ lit?: any | undefined;
1286
+ var?: string | undefined;
1287
+ out?: OutputRef | undefined;
1288
+ expr?: Expression | undefined;
1289
+ }
1290
+ declare const Binding: MessageFns$1<Binding>;
1291
+ interface OutputRef {
1292
+ module: string;
1293
+ name: string;
1294
+ }
1295
+ declare const OutputRef: MessageFns$1<OutputRef>;
1296
+ interface Expression {
1297
+ lang: string;
1298
+ value: string;
1299
+ /**
1300
+ * The module calls `value` reads, in source order: what the engine's
1301
+ * one reader of references reads from the parse of `value`. The engine
1302
+ * fills them each time it encodes an Expression and reads none back, so
1303
+ * a consumer takes a reference from here and never from `value`.
1304
+ */
1305
+ module_references: ModuleReference[];
1306
+ }
1307
+ declare const Expression: MessageFns$1<Expression>;
1308
+ /** ModuleReference is one module.<call> an expression reads. */
1309
+ interface ModuleReference {
1310
+ /** The call read: module.<call>. */
1311
+ call: string;
1312
+ /**
1313
+ * The output read off the call: the first attribute after the call and
1314
+ * any instance key in the text, module.<call>.<output> or
1315
+ * module.<call>[0].<output>. Unset when the reference reads the whole
1316
+ * call: module.<call> alone, through a splat, or by a key an expression
1317
+ * computes.
1318
+ */
1319
+ output?: string | undefined;
1320
+ /** An instance key follows the call: [0], ["k"] or [<expression>]. */
1321
+ instance_key: boolean;
1322
+ /** A splat follows the call or its instance key: [*] or .*. */
1323
+ splat: boolean;
1324
+ }
1325
+ declare const ModuleReference: MessageFns$1<ModuleReference>;
1326
+ interface TerraformBlock {
1327
+ required_version: string;
1328
+ required_providers: {
1329
+ [key: string]: ProviderRequirement;
1330
+ };
1331
+ backend: BackendConfig | undefined;
1332
+ }
1333
+ declare const TerraformBlock: MessageFns$1<TerraformBlock>;
1334
+ interface ProviderRequirement {
1335
+ source: string;
1336
+ version: string;
1337
+ configuration_aliases: string[];
1338
+ }
1339
+ declare const ProviderRequirement: MessageFns$1<ProviderRequirement>;
1340
+ interface BackendConfig {
1341
+ type: string;
1342
+ config: {
1343
+ [key: string]: any | undefined;
1344
+ };
1345
+ }
1346
+ declare const BackendConfig: MessageFns$1<BackendConfig>;
1347
+ interface ProviderConfig {
1348
+ name: string;
1349
+ alias: string;
1350
+ config: {
1351
+ [key: string]: Binding;
1352
+ };
1353
+ /** nested config blocks (default_tags, assume_role, …) */
1354
+ blocks: Block[];
1355
+ }
1356
+ declare const ProviderConfig: MessageFns$1<ProviderConfig>;
1357
+ type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined;
1358
+ type DeepPartial$1<T> = T extends Builtin$1 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$1<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$1<U>> : T extends {} ? {
1359
+ [K in keyof T]?: DeepPartial$1<T[K]>;
1360
+ } : Partial<T>;
1361
+ type KeysOfUnion$1<T> = T extends T ? keyof T : never;
1362
+ type Exact$1<P, I extends P> = P extends Builtin$1 ? P : P & {
1363
+ [K in keyof P]: Exact$1<P[K], I[K]>;
1364
+ } & {
1365
+ [K in Exclude<keyof I, KeysOfUnion$1<P>>]: never;
1366
+ };
1367
+ interface MessageFns$1<T> {
1368
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1369
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1370
+ fromJSON(object: any): T;
1371
+ toJSON(message: T): unknown;
1372
+ create<I extends Exact$1<DeepPartial$1<T>, I>>(base?: I): T;
1373
+ fromPartial<I extends Exact$1<DeepPartial$1<T>, I>>(object: I): T;
1374
+ }
1375
+
1376
+ declare enum InputMode {
1377
+ INPUT_MODE_UNSPECIFIED = 0,
1378
+ INPUT_MODE_EMPTY = 1,
1379
+ INPUT_MODE_LITERAL = 2,
1380
+ INPUT_MODE_VARIABLE = 3,
1381
+ INPUT_MODE_EXPRESSION = 4,
1382
+ INPUT_MODE_WIRED = 5,
1383
+ UNRECOGNIZED = -1
1384
+ }
1385
+ declare enum DiagnosticSeverity {
1386
+ DIAGNOSTIC_SEVERITY_UNSPECIFIED = 0,
1387
+ DIAGNOSTIC_SEVERITY_ERROR = 1,
1388
+ DIAGNOSTIC_SEVERITY_WARNING = 2,
1389
+ DIAGNOSTIC_SEVERITY_INFO = 3,
1390
+ UNRECOGNIZED = -1
1391
+ }
1392
+ /**
1393
+ * Reason is the one vocabulary of what a failure asks of the developer.
1394
+ * The engine attaches it to a refused RPC as a `ReasonDetail` in the
1395
+ * status' error details, and a command's failure document names it; a
1396
+ * client branches on it, never on the message's text. A failure the API
1397
+ * decided carries the API's own code (`ReasonDetail.api_code`), and a
1398
+ * reason only where that code has one: every code that asks the developer
1399
+ * to sign in again is `REASON_UNAUTHENTICATED`.
1400
+ */
1401
+ declare enum Reason {
1402
+ REASON_UNSPECIFIED = 0,
1403
+ /** REASON_NOT_LACE_FORM - Placement: the resolved tree's own certification verdict is not Lace-form. */
1404
+ REASON_NOT_LACE_FORM = 1,
1405
+ /** REASON_HASH_MISMATCH - Placement: the downloaded tree does not hash to what the registry vouched for. */
1406
+ REASON_HASH_MISMATCH = 2,
1407
+ /** REASON_REGISTRY_UNAVAILABLE - Placement: the registry could not be reached or answered with no verdict. */
1408
+ REASON_REGISTRY_UNAVAILABLE = 3,
1409
+ /** REASON_ROOT_LOCKED - SessionOpen: the root's canvas is open in another window. */
1410
+ REASON_ROOT_LOCKED = 4,
1411
+ /** REASON_UNSAVED - Generate: the session has unsaved edits; save first. */
1412
+ REASON_UNSAVED = 5,
1413
+ /** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
1414
+ REASON_CONFLICT = 6,
1415
+ /**
1416
+ * REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused.
1417
+ * module convert and stack import: the tree's tf does not parse, has a
1418
+ * non-empty residual report, or its Bundle fails its own validation.
1419
+ * stack apply / stack destroy / registry register: a source in the stack
1420
+ * does not read, checked before the certification.
1421
+ */
1422
+ REASON_SOURCE_REFUSED = 7,
1423
+ /**
1424
+ * REASON_NOT_GIT_REPOSITORY - Generate, module convert, stack import and module fmt: the authoring
1425
+ * root is not inside a git working tree.
1426
+ */
1427
+ REASON_NOT_GIT_REPOSITORY = 8,
1428
+ /** REASON_GENERATE_IN_PROGRESS - Generate: a Generate is already running on the session. */
1429
+ REASON_GENERATE_IN_PROGRESS = 9,
1430
+ /** REASON_NO_ORGANIZATION - A scoped command: no organization is selected. */
1431
+ REASON_NO_ORGANIZATION = 10,
1432
+ /** REASON_NO_TEAM - A team-scoped command: no team is selected in the organization. */
1433
+ REASON_NO_TEAM = 11,
1434
+ /**
1435
+ * REASON_NO_CERTIFICATION - stack apply / stack destroy / registry register: the root has no
1436
+ * certification.
1437
+ */
1438
+ REASON_NO_CERTIFICATION = 12,
1439
+ /**
1440
+ * REASON_STALE_CERTIFICATION - stack apply / stack destroy / registry register: the certification
1441
+ * does not certify the tree on disk — the tree changed since validate,
1442
+ * another lace version wrote it, or its files are torn or mixed from two
1443
+ * validates. Running validate again replaces it.
1444
+ */
1445
+ REASON_STALE_CERTIFICATION = 13,
1446
+ /**
1447
+ * REASON_TOOL_MISSING - module scan / module docs / module fmt / module validate / module
1448
+ * convert / stack import / stack preview: the tool the command runs
1449
+ * (tfsec, terraform-docs, the pinned terraform) is not available. convert
1450
+ * and stack import run the pinned terraform through the validate each
1451
+ * closes on.
1452
+ */
1453
+ REASON_TOOL_MISSING = 14,
1454
+ /**
1455
+ * REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
1456
+ * modules crosses a group's boundary, which no single-scope edit makes.
1457
+ * It is a refusal of the batch's content, carried on its GraphError.
1458
+ */
1459
+ REASON_CROSS_SCOPE = 15,
1460
+ /**
1461
+ * REASON_UNAUTHENTICATED - The developer must sign in: a command or a placement that needs
1462
+ * credentials finds none (no `lace login`, no LACE_TOKEN), decided
1463
+ * before any request; or the API refuses the ones sent with its code
1464
+ * `unauthenticated`, which `ReasonDetail.api_code` then names.
1465
+ */
1466
+ REASON_UNAUTHENTICATED = 16,
1467
+ UNRECOGNIZED = -1
1468
+ }
1469
+ declare enum ConflictChoice {
1470
+ CONFLICT_CHOICE_UNSPECIFIED = 0,
1471
+ CONFLICT_CHOICE_KEEP = 1,
1472
+ CONFLICT_CHOICE_RELOAD = 2,
1473
+ UNRECOGNIZED = -1
1474
+ }
1475
+ /**
1476
+ * ReasonDetail rides a refused RPC's status as its one error detail:
1477
+ * `grpc-status-details-bin` over gRPC, `details[]` over Connect. A
1478
+ * failure Lace decided sets `reason`; one the API decided sets `api_code`
1479
+ * to the API's own closed code, passed through unchanged, with the status
1480
+ * code that HTTP status maps to, and `reason` where that code has one
1481
+ * (`REASON_UNAUTHENTICATED` for the API's `unauthenticated`).
1482
+ */
1483
+ interface ReasonDetail {
1484
+ reason: Reason;
1485
+ api_code: string;
1486
+ }
1487
+ declare const ReasonDetail: MessageFns<ReasonDetail>;
1488
+ interface InitializeRequest {
1489
+ client_version: string;
1490
+ /**
1491
+ * The protocol version the client speaks: the decimal of
1492
+ * PROTOCOL_VERSION_CURRENT as the client was built with it. The engine
1493
+ * refuses any other value than its own with FAILED_PRECONDITION, naming
1494
+ * both.
1495
+ */
1496
+ protocol_version: string;
1497
+ }
1498
+ declare const InitializeRequest: MessageFns<InitializeRequest>;
1499
+ interface InitializeResponse {
1500
+ server_version: string;
1501
+ /** the decimal of PROTOCOL_VERSION_CURRENT as the engine was built with it */
1502
+ protocol_version: string;
1503
+ supported_protocols: string[];
1504
+ /** space-joined paths of the non-hidden command tree */
1505
+ command_paths: string[];
1506
+ }
1507
+ declare const InitializeResponse: MessageFns<InitializeResponse>;
1508
+ interface ShutdownResponse {
1509
+ status: string;
1510
+ }
1511
+ declare const ShutdownResponse: MessageFns<ShutdownResponse>;
1512
+ interface ReadCredentialResponse {
1513
+ /**
1514
+ * Present exactly when the developer is signed in. A present key is never
1515
+ * empty, so the bytes are those of a plain string field: field 1 is
1516
+ * omitted while signed out and carries the key otherwise.
1517
+ */
1518
+ api_key?: string | undefined;
1519
+ /** the API the engine's own commands call */
1520
+ api_base_url: string;
1521
+ }
1522
+ declare const ReadCredentialResponse: MessageFns<ReadCredentialResponse>;
1523
+ interface SessionOpenRequest {
1524
+ ephemeral?: EphemeralSession | undefined;
1525
+ root?: RootSession | undefined;
1526
+ /** ephemeral only */
1527
+ workspace_name: string;
1528
+ }
1529
+ declare const SessionOpenRequest: MessageFns<SessionOpenRequest>;
1530
+ interface EphemeralSession {
1531
+ }
1532
+ declare const EphemeralSession: MessageFns<EphemeralSession>;
1533
+ interface RootSession {
1534
+ /** absolute authoring root */
1535
+ path: string;
1536
+ }
1537
+ declare const RootSession: MessageFns<RootSession>;
1538
+ interface SessionOpenResponse {
1539
+ session_id: string;
1540
+ state: BundleState | undefined;
1541
+ }
1542
+ declare const SessionOpenResponse: MessageFns<SessionOpenResponse>;
1543
+ interface TestSessionOpenRequest {
1544
+ fixture_name: string;
1545
+ workspace_name: string;
1546
+ }
1547
+ declare const TestSessionOpenRequest: MessageFns<TestSessionOpenRequest>;
1548
+ interface SessionSaveRequest {
1549
+ session_id: string;
1550
+ }
1551
+ declare const SessionSaveRequest: MessageFns<SessionSaveRequest>;
1552
+ interface SessionSaveResponse {
1553
+ /**
1554
+ * The revision of the state the save left: the `BundleState.revision`
1555
+ * of the frame that carries it, or the session's current revision when
1556
+ * nothing was unsaved. A subscriber holds the save once it has received
1557
+ * a frame at this revision or a later one.
1558
+ */
1559
+ revision: number;
1560
+ }
1561
+ declare const SessionSaveResponse: MessageFns<SessionSaveResponse>;
1562
+ interface SessionCloseRequest {
1563
+ session_id: string;
1564
+ }
1565
+ declare const SessionCloseRequest: MessageFns<SessionCloseRequest>;
1566
+ interface SessionCloseResponse {
1567
+ status: string;
1568
+ }
1569
+ declare const SessionCloseResponse: MessageFns<SessionCloseResponse>;
1570
+ interface SessionGenerateRequest {
1571
+ session_id: string;
1572
+ /**
1573
+ * Client-chosen, unique per engine connection, as `invoke_id` is:
1574
+ * required, and an id still live is AlreadyExists. Every generate event
1575
+ * this call publishes carries it.
1576
+ */
1577
+ generate_id: string;
1578
+ }
1579
+ declare const SessionGenerateRequest: MessageFns<SessionGenerateRequest>;
1580
+ interface SessionGenerateResponse {
1581
+ files_written: string[];
1582
+ /** the `module validate -o json` document for the written tree */
1583
+ validate_json: string;
1584
+ /**
1585
+ * The revision of the state the Generate left: the
1586
+ * `BundleState.revision` of the frame that carries it, or the session's
1587
+ * current revision when it changed nothing. A subscriber holds the
1588
+ * Generate once it has received a frame at this revision or a later one.
1589
+ */
1590
+ revision: number;
1591
+ }
1592
+ declare const SessionGenerateResponse: MessageFns<SessionGenerateResponse>;
1593
+ interface SessionResolveConflictRequest {
1594
+ session_id: string;
1595
+ choice: ConflictChoice;
1596
+ tree_hash: string;
1597
+ }
1598
+ declare const SessionResolveConflictRequest: MessageFns<SessionResolveConflictRequest>;
1599
+ interface SessionResolveConflictResponse {
1600
+ }
1601
+ declare const SessionResolveConflictResponse: MessageFns<SessionResolveConflictResponse>;
1602
+ interface Diagnostic {
1603
+ severity: DiagnosticSeverity;
1604
+ message: string;
1605
+ file: string;
1606
+ line: number;
1607
+ column: number;
1608
+ /**
1609
+ * Locates an engine-validator finding within the graph. Empty when
1610
+ * the diagnostic has no graph location (file/line/column instead).
1611
+ */
1612
+ module_key: string;
1613
+ instance_id: string;
1614
+ input_name: string;
1615
+ /**
1616
+ * The rule the finding breaks, when its source names one: a workspace
1617
+ * rule's code, a scan's rule id. Empty for a finding with no rule.
1618
+ */
1619
+ code: string;
1620
+ }
1621
+ declare const Diagnostic: MessageFns<Diagnostic>;
1622
+ /**
1623
+ * ConnectAction wires `source`'s output to `target`'s input. A wire is an
1624
+ * edit of one module: `scope` owns the target and `source_scope` owns the
1625
+ * source, both required, and a wire whose two scopes differ crosses a
1626
+ * group's boundary: the batch is refused (`success=false`) with a
1627
+ * GraphError carrying `REASON_CROSS_SCOPE`.
1628
+ */
1629
+ interface ConnectAction {
1630
+ source: string;
1631
+ target: string;
1632
+ source_output: string;
1633
+ target_input: string;
1634
+ scope: string;
1635
+ source_scope: string;
1636
+ }
1637
+ declare const ConnectAction: MessageFns<ConnectAction>;
1638
+ /**
1639
+ * AutoConnectAction wires `source` to `target` by the engine's matching
1640
+ * rules, as one batch entry: every output of `source` is scored against
1641
+ * every required input of `target` that has no binding
1642
+ * (`WiringCandidate.score`), and the pairs are taken from the highest
1643
+ * score down, each output and each input wired at most once. Pairs that
1644
+ * tie at one score for an input or an output they share are not wired,
1645
+ * nor is any port they name: they come back in `BundleApplyResult.ties`
1646
+ * for the caller to choose between. A pair of instances with no scored
1647
+ * pair at all is refused. Its two scopes are a ConnectAction's.
1648
+ */
1649
+ interface AutoConnectAction {
1650
+ source: string;
1651
+ target: string;
1652
+ scope: string;
1653
+ source_scope: string;
1654
+ }
1655
+ declare const AutoConnectAction: MessageFns<AutoConnectAction>;
1656
+ interface DisconnectAction {
1657
+ target: string;
1658
+ input_name: string;
1659
+ scope: string;
1660
+ }
1661
+ declare const DisconnectAction: MessageFns<DisconnectAction>;
1662
+ interface UpdateInputAction {
1663
+ instance_id: string;
1664
+ input_name: string;
1665
+ mode: InputMode;
1666
+ value: any | undefined;
1667
+ variable: string;
1668
+ expression: string;
1669
+ scope: string;
1670
+ }
1671
+ declare const UpdateInputAction: MessageFns<UpdateInputAction>;
1672
+ interface UpdateAllInputsAction {
1673
+ instance_id: string;
1674
+ inputs: InputEntry[];
1675
+ scope: string;
1676
+ }
1677
+ declare const UpdateAllInputsAction: MessageFns<UpdateAllInputsAction>;
1678
+ interface InputEntry {
1679
+ name: string;
1680
+ mode: InputMode;
1681
+ value: any | undefined;
1682
+ variable: string;
1683
+ expression: string;
1684
+ }
1685
+ declare const InputEntry: MessageFns<InputEntry>;
1686
+ interface RenameInstanceAction {
1687
+ old_id: string;
1688
+ new_id: string;
1689
+ scope: string;
1690
+ }
1691
+ declare const RenameInstanceAction: MessageFns<RenameInstanceAction>;
1692
+ interface DeleteInstanceAction {
1693
+ instance_id: string;
1694
+ scope: string;
1695
+ }
1696
+ declare const DeleteInstanceAction: MessageFns<DeleteInstanceAction>;
1697
+ interface CopyInstancesAction {
1698
+ instance_ids: string[];
1699
+ scope: string;
1700
+ }
1701
+ declare const CopyInstancesAction: MessageFns<CopyInstancesAction>;
1702
+ /**
1703
+ * CreateGroupAction creates a new visual group from selected nodes. The
1704
+ * group's display label is consumer-owned arrangement state (written from
1705
+ * `BundleApplyResult.created` after this action lands); the wire payload
1706
+ * carries only membership.
1707
+ */
1708
+ interface CreateGroupAction {
1709
+ node_ids: string[];
1710
+ scope: string;
1711
+ }
1712
+ declare const CreateGroupAction: MessageFns<CreateGroupAction>;
1713
+ /**
1714
+ * UngroupAction dissolves the group `group_id` in `scope`: its Use is
1715
+ * removed and the module it pointed at has its children promoted into
1716
+ * the parent. Mirrors workspace.UngroupAction.
1717
+ */
1718
+ interface UngroupAction {
1719
+ group_id: string;
1720
+ scope: string;
1721
+ }
1722
+ declare const UngroupAction: MessageFns<UngroupAction>;
1723
+ interface SetVariablesAction {
1724
+ variables: InputDef[];
1725
+ }
1726
+ declare const SetVariablesAction: MessageFns<SetVariablesAction>;
1727
+ interface SetExportsAction {
1728
+ outputs: OutputExportEntry[];
1729
+ output_defs: OutputDef[];
1730
+ }
1731
+ declare const SetExportsAction: MessageFns<SetExportsAction>;
1732
+ interface OutputExportEntry {
1733
+ name: string;
1734
+ source_instance: string;
1735
+ source_output: string;
1736
+ }
1737
+ declare const OutputExportEntry: MessageFns<OutputExportEntry>;
1738
+ interface SetTerraformAction {
1739
+ required_version: string;
1740
+ required_providers: ProviderReqView[];
1741
+ backend: BackendView | undefined;
1742
+ }
1743
+ declare const SetTerraformAction: MessageFns<SetTerraformAction>;
1744
+ interface SetProvidersAction {
1745
+ providers: ProviderView[];
1746
+ }
1747
+ declare const SetProvidersAction: MessageFns<SetProvidersAction>;
1748
+ interface SetLocalsAction {
1749
+ locals: LocalEntry[];
1750
+ }
1751
+ declare const SetLocalsAction: MessageFns<SetLocalsAction>;
1752
+ interface LocalEntry {
1753
+ name: string;
1754
+ mode: string;
1755
+ value: any | undefined;
1756
+ variable: string;
1757
+ expression: string;
1758
+ }
1759
+ declare const LocalEntry: MessageFns<LocalEntry>;
1760
+ interface SetDependsOnAction {
1761
+ instance_id: string;
1762
+ depends_on: string[];
1763
+ scope: string;
1764
+ }
1765
+ declare const SetDependsOnAction: MessageFns<SetDependsOnAction>;
1766
+ /**
1767
+ * SetUseProvidersAction sets a module call's `providers = {}` map. Keys are
1768
+ * the child module's local provider names, values the root's provider
1769
+ * references passed down (`name` or `name.alias`). A node-tier edit of the
1770
+ * existing Use, mirroring SetDependsOnAction.
1771
+ */
1772
+ interface SetUseProvidersAction {
1773
+ instance_id: string;
1774
+ providers: {
1775
+ [key: string]: string;
1776
+ };
1777
+ scope: string;
1778
+ }
1779
+ declare const SetUseProvidersAction: MessageFns<SetUseProvidersAction>;
1780
+ /**
1781
+ * Undo / Redo are zero-payload actions — the session's history stack
1782
+ * carries the state. Modeled as Action oneof cases (empty messages) so
1783
+ * the single ApplyAction RPC covers the full mutation surface.
1784
+ */
1785
+ interface UndoAction {
1786
+ }
1787
+ declare const UndoAction: MessageFns<UndoAction>;
1788
+ interface RedoAction {
1789
+ }
1790
+ declare const RedoAction: MessageFns<RedoAction>;
1791
+ /**
1792
+ * PlaceModuleAction drops a registry module onto the canvas. Distinct from
1793
+ * Connect/UpdateInput/etc. in that it names a *source* module (registry
1794
+ * coordinates) rather than a sibling instance; the server orchestrates the
1795
+ * registry fetch + module-key resolution before producing the Bundle
1796
+ * mutation. Placement position is consumer-owned arrangement state, written
1797
+ * client-side from `BundleApplyResult.created` after this action lands.
1798
+ */
1799
+ interface PlaceModuleAction {
1800
+ author: string;
1801
+ name: string;
1802
+ version: string;
1803
+ }
1804
+ declare const PlaceModuleAction: MessageFns<PlaceModuleAction>;
1805
+ /** The canonical Action type used inside ApplyActionRequest. */
1806
+ interface Action {
1807
+ connect?: ConnectAction | undefined;
1808
+ auto_connect?: AutoConnectAction | undefined;
1809
+ disconnect?: DisconnectAction | undefined;
1810
+ update_input?: UpdateInputAction | undefined;
1811
+ update_all_inputs?: UpdateAllInputsAction | undefined;
1812
+ rename_instance?: RenameInstanceAction | undefined;
1813
+ delete_instance?: DeleteInstanceAction | undefined;
1814
+ copy_instances?: CopyInstancesAction | undefined;
1815
+ create_group?: CreateGroupAction | undefined;
1816
+ set_variables?: SetVariablesAction | undefined;
1817
+ set_exports?: SetExportsAction | undefined;
1818
+ set_terraform?: SetTerraformAction | undefined;
1819
+ set_providers?: SetProvidersAction | undefined;
1820
+ set_locals?: SetLocalsAction | undefined;
1821
+ set_depends_on?: SetDependsOnAction | undefined;
1822
+ undo?: UndoAction | undefined;
1823
+ redo?: RedoAction | undefined;
1824
+ place_module?: PlaceModuleAction | undefined;
1825
+ set_use_providers?: SetUseProvidersAction | undefined;
1826
+ ungroup?: UngroupAction | undefined;
1827
+ }
1828
+ declare const Action: MessageFns<Action>;
1829
+ interface ApplyActionRequest {
1830
+ session_id: string;
1831
+ actions: Action[];
1832
+ }
1833
+ declare const ApplyActionRequest: MessageFns<ApplyActionRequest>;
1834
+ /**
1835
+ * WiringCandidate is one output → input pair the matcher scores between
1836
+ * two instances of one module: `source_instance`'s `output` could feed
1837
+ * `target_instance`'s `input`, a required input with no binding. `score`
1838
+ * is the matcher's: 100 for the same name, 90 for the same last
1839
+ * `_`-separated word, 50 when one name contains the other, 30 for the
1840
+ * same type alone; a pair that scores nothing is no candidate.
1841
+ */
1842
+ interface WiringCandidate$1 {
1843
+ source_instance: string;
1844
+ output: string;
1845
+ target_instance: string;
1846
+ input: string;
1847
+ score: number;
1848
+ }
1849
+ declare const WiringCandidate$1: MessageFns<WiringCandidate$1>;
1850
+ interface ReadWiringCandidatesRequest {
1851
+ session_id: string;
1852
+ /** The key of the module whose instances are matched (an action's `scope`). */
1853
+ scope: string;
1854
+ /**
1855
+ * Narrows the pairs to those reading this instance's outputs; unset,
1856
+ * every instance of the scope is a source.
1857
+ */
1858
+ source_instance?: string | undefined;
1859
+ /**
1860
+ * Narrows the pairs to those feeding this instance's inputs; unset,
1861
+ * every instance of the scope is a target.
1862
+ */
1863
+ target_instance?: string | undefined;
1864
+ }
1865
+ declare const ReadWiringCandidatesRequest: MessageFns<ReadWiringCandidatesRequest>;
1866
+ interface ReadWiringCandidatesResponse {
1867
+ /**
1868
+ * Highest score first; equal scores in source instance, output, target
1869
+ * instance, input order.
1870
+ */
1871
+ candidates: WiringCandidate$1[];
1872
+ }
1873
+ declare const ReadWiringCandidatesResponse: MessageFns<ReadWiringCandidatesResponse>;
1874
+ interface InvokeRequest {
1875
+ /** client-chosen, unique per engine connection */
1876
+ invoke_id: string;
1877
+ /** e.g. ["stack","preview"] */
1878
+ path: string[];
1879
+ /** positionals + flags from toArgv; never -o/--output */
1880
+ argv: string[];
1881
+ /**
1882
+ * The absolute directory the command runs in, as a terminal invocation
1883
+ * has one: every relative path argument resolves against it. Required,
1884
+ * and it must name an existing directory. The engine picks the
1885
+ * Workspace: the session's own when its pool holds a root session open
1886
+ * on this directory, whatever spelling names it, else the disk
1887
+ * Workspace a terminal invocation builds. A command that reads no
1888
+ * directory is sent with the developer's home.
1889
+ */
1890
+ working_directory: string;
1891
+ }
1892
+ declare const InvokeRequest: MessageFns<InvokeRequest>;
1893
+ interface InvokeEvent {
1894
+ json?: string | undefined;
1895
+ exit?: InvokeExit | undefined;
1896
+ }
1897
+ declare const InvokeEvent: MessageFns<InvokeEvent>;
1898
+ interface InvokeExit {
1899
+ code: number;
1900
+ /** tail ≤ 8 KiB */
1901
+ stderr_tail: string;
1902
+ /**
1903
+ * The command's final document, as its `CommandResult` carries it: the
1904
+ * last JSON document the command wrote to stdout, compact. A failed
1905
+ * command's is its failure document, `{reason, message}` plus the
1906
+ * fields its reason carries; a client tells a failure from a result by
1907
+ * the document's own shape and never reads `stderr_tail` for why. Empty
1908
+ * when the command wrote none.
1909
+ */
1910
+ document: string;
1911
+ }
1912
+ declare const InvokeExit: MessageFns<InvokeExit>;
1913
+ interface CancelInvokeRequest {
1914
+ invoke_id: string;
1915
+ }
1916
+ declare const CancelInvokeRequest: MessageFns<CancelInvokeRequest>;
1917
+ interface CancelInvokeResponse {
1918
+ found: boolean;
1919
+ }
1920
+ declare const CancelInvokeResponse: MessageFns<CancelInvokeResponse>;
1921
+ interface SubscribeRequest {
1922
+ session_id: string;
1923
+ }
1924
+ declare const SubscribeRequest: MessageFns<SubscribeRequest>;
1925
+ interface GenerateProgress {
1926
+ stage: string;
1927
+ message: string;
1928
+ /** the Generate this event belongs to */
1929
+ generate_id: string;
1930
+ }
1931
+ declare const GenerateProgress: MessageFns<GenerateProgress>;
1932
+ interface GenerateSuccess {
1933
+ files_written: string[];
1934
+ /** the `module validate -o json` document for the written tree */
1935
+ validate_json: string;
1936
+ /** the Generate this event belongs to */
1937
+ generate_id: string;
1938
+ }
1939
+ declare const GenerateSuccess: MessageFns<GenerateSuccess>;
1940
+ interface GenerateError {
1941
+ message: string;
1942
+ diagnostics: Diagnostic[];
1943
+ /**
1944
+ * Set when Generate refused because a conflict opened during its
1945
+ * precondition check or its pre-write re-walk.
1946
+ */
1947
+ conflict: Conflict | undefined;
1948
+ /** the Generate this event belongs to */
1949
+ generate_id: string;
1950
+ /**
1951
+ * Why the Generate was refused, the same reason its failed call carries
1952
+ * in its status' error details; unspecified for a failure with no entry
1953
+ * in the vocabulary.
1954
+ */
1955
+ reason: Reason;
1956
+ }
1957
+ declare const GenerateError: MessageFns<GenerateError>;
1958
+ interface Conflict {
1959
+ base_tree_hash: string;
1960
+ tree_hash: string;
1961
+ }
1962
+ declare const Conflict: MessageFns<Conflict>;
1963
+ /**
1964
+ * CommandResult is the result of one command that ran in a session's
1965
+ * root: every `Invoke` whose working directory resolved to a session
1966
+ * publishes exactly one to that session's subscribers when the command
1967
+ * exits, and one whose working directory resolved to no session publishes
1968
+ * nothing. The engine has no knowledge of which command it was: the event
1969
+ * is the path, the exit code and the final document, whatever the
1970
+ * command. The session keeps the last one per path, and a subscriber that
1971
+ * joins later receives the kept set after its first state.
1972
+ */
1973
+ interface CommandResult$1 {
1974
+ /** space-joined, as `command_paths` names it, e.g. "module validate" */
1975
+ path: string;
1976
+ exit_code: number;
1977
+ /**
1978
+ * The last JSON document the command wrote to stdout, compact: a
1979
+ * command that streams NDJSON publishes its closing document and none
1980
+ * of the lines before it. Empty when the command wrote none.
1981
+ */
1982
+ document: string;
1983
+ }
1984
+ declare const CommandResult$1: MessageFns<CommandResult$1>;
1985
+ /**
1986
+ * BundleStateEvent is the element yielded by the Subscribe stream. Every
1987
+ * session-state change publishes a full BundleState; generate events and
1988
+ * command results pass through as their own cases. Conflict, unsaved,
1989
+ * ungenerated and the tree hash ride on BundleState.
1990
+ */
1991
+ interface BundleStateEvent {
1992
+ state?: BundleState | undefined;
1993
+ generate_progress?: GenerateProgress | undefined;
1994
+ generate_success?: GenerateSuccess | undefined;
1995
+ generate_error?: GenerateError | undefined;
1996
+ command_result?: CommandResult$1 | undefined;
1997
+ }
1998
+ declare const BundleStateEvent: MessageFns<BundleStateEvent>;
1999
+ /**
2000
+ * BundleState is the authoritative session state over the wire: the
2001
+ * Bundle IR + session-undo metadata + the engine validator's findings
2002
+ * for that Bundle, plus the session's standing against its source tf
2003
+ * tree. Consumers (VS Code extension, portal, tests) project this
2004
+ * locally via the proto package's `projectCanvasView(bundle,
2005
+ * arrangement?, meta)` to produce a renderable CanvasView —
2006
+ * `arrangement` (node positions, group collapse/label) is
2007
+ * consumer-owned view state and never travels here.
2008
+ *
2009
+ * Not to be confused with the `bundle_snapshot` API entity, which is
2010
+ * the content-addressed immutable archival form in D1 + R2. BundleState
2011
+ * is a live, per-session wire shape.
2012
+ */
2013
+ interface BundleState {
2014
+ /** Unset when the session is source-refused with no accepted tree. */
2015
+ bundle: Bundle | undefined;
2016
+ can_undo: boolean;
2017
+ can_redo: boolean;
2018
+ /** True when the working IR differs from the saved IR in `state.lace`. */
2019
+ unsaved: boolean;
2020
+ /**
2021
+ * The engine validator's findings for this state, in the validator's
2022
+ * order. Empty when the state has none, so a subscriber sees errors
2023
+ * clear.
2024
+ */
2025
+ diagnostics: Diagnostic[];
2026
+ /**
2027
+ * Set when a tf change diverges from the session's base tree hash and
2028
+ * needs Keep or Reload. Unset when there is no open conflict.
2029
+ */
2030
+ conflict: Conflict | undefined;
2031
+ /**
2032
+ * True when the saved IR in `state.lace` carries edits no Generate
2033
+ * has written to the source tf.
2034
+ */
2035
+ ungenerated: boolean;
2036
+ /**
2037
+ * True when the source tf this session opened, or last observed live,
2038
+ * is refused (unparsable or lossy). The engine refuses
2039
+ * every mutation while this holds — edit, undo, redo, save, generate,
2040
+ * and SessionResolveConflict's Keep/Reload alike — until a live tf
2041
+ * change parses and clears it.
2042
+ */
2043
+ source_refused: boolean;
2044
+ /**
2045
+ * The hash of the root's tree as the session last observed it: the
2046
+ * same hash `module validate` reports as `treeHash`, so a client tells
2047
+ * whether the tree moved since a report by comparing the two. Empty
2048
+ * for an ephemeral session, and for a tree that cannot be hashed.
2049
+ */
2050
+ tree_hash: string;
2051
+ /**
2052
+ * The session's state revision: a per-session counter that advances by
2053
+ * one with every state frame the session publishes, and frames reach a
2054
+ * subscriber in revision order. The state a SessionOpen or a Subscribe
2055
+ * starts with carries the session's current revision. A client compares
2056
+ * it with `BundleApplyResult.revision` to tell whether the frame it
2057
+ * holds already shows a batch it applied.
2058
+ */
2059
+ revision: number;
2060
+ }
2061
+ declare const BundleState: MessageFns<BundleState>;
2062
+ /**
2063
+ * BundleApplyResult is returned by action RPCs (Connect, UpdateInput,
2064
+ * CreateGroup, ...) after an action is applied to the session. On
2065
+ * success, the corresponding `BundleState` is delivered via Subscribe
2066
+ * to all connected subscribers (including the action's caller).
2067
+ * On failure, `errors` carries the reasons the mutation was rejected
2068
+ * at the IR-validation boundary.
2069
+ *
2070
+ * `created` is the action-result attribution contract: the server
2071
+ * already knows which child/module IDs an action minted (placement,
2072
+ * group creation, copy), so it reports them here instead of clients
2073
+ * diffing successive BundleState frames to guess.
2074
+ */
2075
+ interface BundleApplyResult {
2076
+ success: boolean;
2077
+ errors: GraphError$1[];
2078
+ created: CreatedRef$1[];
2079
+ /**
2080
+ * The revision of the state the batch produced: the
2081
+ * `BundleState.revision` of the frame that carries it. For a batch
2082
+ * that changed nothing or was refused, the session's current revision.
2083
+ * A subscriber holds the batch's own write once it has received a
2084
+ * frame at this revision or a later one.
2085
+ */
2086
+ revision: number;
2087
+ /**
2088
+ * The pairs an `auto_connect` of the batch did not wire because they
2089
+ * tie: two or more pairs at one score sharing an input or an output.
2090
+ * No port a tied pair names was wired.
2091
+ */
2092
+ ties: WiringCandidate$1[];
2093
+ }
2094
+ declare const BundleApplyResult: MessageFns<BundleApplyResult>;
2095
+ /**
2096
+ * CreatedRef names one child created by an action (PlaceModule,
2097
+ * CreateGroup, CopyInstances, ...). Clients key pending arrangement
2098
+ * writes (position, group label/collapse) off these IDs instead of
2099
+ * diffing BundleState frames.
2100
+ */
2101
+ interface CreatedRef$1 {
2102
+ /** The scope key (module key) the child was created in. */
2103
+ scope: string;
2104
+ /** The created child/Use ID. */
2105
+ id: string;
2106
+ /**
2107
+ * Set when the action minted a new module (e.g. group create): the
2108
+ * new module's key. Empty otherwise.
2109
+ */
2110
+ module_key: string;
2111
+ /**
2112
+ * Set when the child was cloned from an existing one (e.g. copy):
2113
+ * the source child ID. Empty otherwise.
2114
+ */
2115
+ source_id: string;
2116
+ }
2117
+ declare const CreatedRef$1: MessageFns<CreatedRef$1>;
2118
+ /**
2119
+ * GraphError is a refusal of a batch's content: one action the working IR
2120
+ * would not take, located at the module, instance and input it addressed,
2121
+ * with its sentence and, where the refusal has an entry in the one
2122
+ * vocabulary, its reason (`REASON_CROSS_SCOPE` for a wire across a
2123
+ * group's boundary; `REASON_UNSPECIFIED` otherwise). A client branches on
2124
+ * the reason, never on the message. Mutation-boundary errors never reach
2125
+ * the canvas; they are returned synchronously to the action RPC caller.
2126
+ * The canvas renders no validator of its own — it surfaces
2127
+ * BundleState.diagnostics.
2128
+ */
2129
+ interface GraphError$1 {
2130
+ module_key: string;
2131
+ instance_id: string;
2132
+ input_name: string;
2133
+ message: string;
2134
+ reason: Reason;
2135
+ }
2136
+ declare const GraphError$1: MessageFns<GraphError$1>;
2137
+ interface ProviderReqView {
2138
+ name: string;
2139
+ source: string;
2140
+ version: string;
2141
+ /**
2142
+ * Provider references the module declares it accepts from its caller
2143
+ * (`configuration_aliases = [aws.src, aws.dst]`). Each entry is a `name` or
2144
+ * `name.alias` reference, re-emitted unquoted; carried so the panel neither
2145
+ * drops nor corrupts the construct.
2146
+ */
2147
+ configuration_aliases: string[];
2148
+ }
2149
+ declare const ProviderReqView: MessageFns<ProviderReqView>;
2150
+ interface BackendView {
2151
+ type: string;
2152
+ config: {
2153
+ [key: string]: any | undefined;
2154
+ };
2155
+ }
2156
+ declare const BackendView: MessageFns<BackendView>;
2157
+ interface ProviderView {
2158
+ name: string;
2159
+ alias: string;
2160
+ config: {
2161
+ [key: string]: string;
2162
+ };
2163
+ /**
2164
+ * Nested config blocks (default_tags, assume_role, …). Full-fidelity,
2165
+ * read-only echo: the panel renders and round-trips these verbatim but does
2166
+ * not structurally edit them, deliberately mixing tiers with the flattened,
2167
+ * editable `config` map above (see ProvidersPanel). Reuses state.proto's
2168
+ * recursive Block so no HCL is re-serialized on the wire.
2169
+ */
2170
+ blocks: Block[];
2171
+ }
2172
+ declare const ProviderView: MessageFns<ProviderView>;
2173
+ interface InputDef {
2174
+ name: string;
2175
+ type: string;
2176
+ required: boolean;
2177
+ description: string;
2178
+ default_value: any | undefined;
2179
+ validation: ValidationBlock[];
2180
+ /** unset = default (false); explicit true is meaningful */
2181
+ ephemeral?: boolean | undefined;
2182
+ /** unset = default (true); explicit false is meaningful */
2183
+ nullable?: boolean | undefined;
2184
+ sensitive: boolean;
2185
+ }
2186
+ declare const InputDef: MessageFns<InputDef>;
2187
+ interface ValidationBlock {
2188
+ condition: string;
2189
+ error_message: string;
2190
+ }
2191
+ declare const ValidationBlock: MessageFns<ValidationBlock>;
2192
+ interface OutputDef {
2193
+ name: string;
2194
+ type: string;
2195
+ description: string;
2196
+ sensitive: boolean;
2197
+ depends_on: string[];
2198
+ }
2199
+ declare const OutputDef: MessageFns<OutputDef>;
2200
+ type LaceEngineDefinition = typeof LaceEngineDefinition;
2201
+ declare const LaceEngineDefinition: {
2202
+ readonly name: "LaceEngine";
2203
+ readonly fullName: "lace.engine.LaceEngine";
2204
+ readonly methods: {
2205
+ /** Lifecycle (global; no session_id) */
2206
+ readonly initialize: {
2207
+ readonly name: "Initialize";
2208
+ readonly requestType: typeof InitializeRequest;
2209
+ readonly requestStream: false;
2210
+ readonly responseType: typeof InitializeResponse;
2211
+ readonly responseStream: false;
2212
+ readonly options: {};
2213
+ };
2214
+ readonly shutdown: {
2215
+ readonly name: "Shutdown";
2216
+ readonly requestType: typeof Empty;
2217
+ readonly requestStream: false;
2218
+ readonly responseType: typeof ShutdownResponse;
2219
+ readonly responseStream: false;
2220
+ readonly options: {};
2221
+ };
2222
+ /**
2223
+ * Answers the credential this engine holds: the API key `lace login`
2224
+ * saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
2225
+ * login` or `lace logout` takes effect at once (absent when signed out),
2226
+ * beside the base URL of the API that key is for, the one the engine's
2227
+ * own commands call (the CLI's `config.ResolveBaseURL`). The host
2228
+ * that spawned the engine builds its own authenticated transport to
2229
+ * Lace's API from the two, for the chat package, and never restates
2230
+ * which API; the engine knows nothing of what the host does with them. Served, like every RPC,
2231
+ * only to the bearer of the handshake's session token, and never
2232
+ * forwarded across the webview bridge (`BRIDGE_METHODS`,
2233
+ * @lace-cloud/proto's engine-bridge.ts).
2234
+ */
2235
+ readonly readCredential: {
2236
+ readonly name: "ReadCredential";
2237
+ readonly requestType: typeof Empty;
2238
+ readonly requestStream: false;
2239
+ readonly responseType: typeof ReadCredentialResponse;
2240
+ readonly responseStream: false;
2241
+ readonly options: {};
2242
+ };
2243
+ /**
2244
+ * Session lifecycle. Never fails on a refused source tf — a refused tf
2245
+ * opens the session source-refused (`BundleState.source_refused`) with
2246
+ * its diagnostics, rather than returning an RPC error.
2247
+ */
2248
+ readonly sessionOpen: {
2249
+ readonly name: "SessionOpen";
2250
+ readonly requestType: typeof SessionOpenRequest;
2251
+ readonly requestStream: false;
2252
+ readonly responseType: typeof SessionOpenResponse;
2253
+ readonly responseStream: false;
2254
+ readonly options: {};
2255
+ };
2256
+ readonly testSessionOpen: {
2257
+ readonly name: "TestSessionOpen";
2258
+ readonly requestType: typeof TestSessionOpenRequest;
2259
+ readonly requestStream: false;
2260
+ readonly responseType: typeof SessionOpenResponse;
2261
+ readonly responseStream: false;
2262
+ readonly options: {};
2263
+ };
2264
+ /**
2265
+ * Writes the session's working IR to `state.lace`. The one RPC that
2266
+ * writes `state.lace`; never writes the source tf.
2267
+ */
2268
+ readonly sessionSave: {
2269
+ readonly name: "SessionSave";
2270
+ readonly requestType: typeof SessionSaveRequest;
2271
+ readonly requestStream: false;
2272
+ readonly responseType: typeof SessionSaveResponse;
2273
+ readonly responseStream: false;
2274
+ readonly options: {};
2275
+ };
2276
+ readonly sessionClose: {
2277
+ readonly name: "SessionClose";
2278
+ readonly requestType: typeof SessionCloseRequest;
2279
+ readonly requestStream: false;
2280
+ readonly responseType: typeof SessionCloseResponse;
2281
+ readonly responseStream: false;
2282
+ readonly options: {};
2283
+ };
2284
+ /**
2285
+ * Writes the session's saved Bundle to HCL and re-bases the session
2286
+ * onto the written tree's hash. Refuses (FailedPrecondition) while the
2287
+ * session is ephemeral, holds the git guard, is source-refused, has an
2288
+ * open conflict, has unsaved edits, or is already running a Generate
2289
+ * (one at a time per session). Every Generate that reaches a session
2290
+ * publishes its events to that session's subscribers under its own
2291
+ * `generate_id`: its progress, and exactly one closing `generate_success`
2292
+ * or `generate_error` — a refusal included, which also fails the call.
2293
+ */
2294
+ readonly sessionGenerate: {
2295
+ readonly name: "SessionGenerate";
2296
+ readonly requestType: typeof SessionGenerateRequest;
2297
+ readonly requestStream: false;
2298
+ readonly responseType: typeof SessionGenerateResponse;
2299
+ readonly responseStream: false;
2300
+ readonly options: {};
2301
+ };
2302
+ /**
2303
+ * Resolves an open conflict: keep the session's IR for this tree hash,
2304
+ * or reload the session from the tree.
2305
+ */
2306
+ readonly sessionResolveConflict: {
2307
+ readonly name: "SessionResolveConflict";
2308
+ readonly requestType: typeof SessionResolveConflictRequest;
2309
+ readonly requestStream: false;
2310
+ readonly responseType: typeof SessionResolveConflictResponse;
2311
+ readonly responseStream: false;
2312
+ readonly options: {};
2313
+ };
2314
+ /**
2315
+ * Single unified mutation RPC. Every canvas mutation (connect, update
2316
+ * input, create group, undo, redo, place module from registry, ...)
2317
+ * travels through ApplyAction carrying one or more `Action` oneof
2318
+ * cases. Returns `BundleApplyResult { success, errors, created,
2319
+ * revision }`. A batch is applied whole or not at all: a batch any
2320
+ * action of which is refused is refused whole and publishes nothing; a
2321
+ * batch that changes nothing publishes nothing and adds no undo entry;
2322
+ * an applied batch is one undo entry and one `BundleState` frame,
2323
+ * published to every Subscribe stream on this session (including the
2324
+ * caller's) at the revision the result names. Refused
2325
+ * (FailedPrecondition) while the session is source-refused.
2326
+ */
2327
+ readonly applyAction: {
2328
+ readonly name: "ApplyAction";
2329
+ readonly requestType: typeof ApplyActionRequest;
2330
+ readonly requestStream: false;
2331
+ readonly responseType: typeof BundleApplyResult;
2332
+ readonly responseStream: false;
2333
+ readonly options: {};
2334
+ };
2335
+ /**
2336
+ * Reads the output → input pairs the engine's matcher scores between the
2337
+ * instances of one module of a session's working IR: the pairs an
2338
+ * `auto_connect` chooses among, with the scores it chooses by. The
2339
+ * matching rules have this one home; a client that picks a wire for a
2340
+ * request in words ranks these and sends the pair as a `connect`.
2341
+ */
2342
+ readonly readWiringCandidates: {
2343
+ readonly name: "ReadWiringCandidates";
2344
+ readonly requestType: typeof ReadWiringCandidatesRequest;
2345
+ readonly requestStream: false;
2346
+ readonly responseType: typeof ReadWiringCandidatesResponse;
2347
+ readonly responseStream: false;
2348
+ readonly options: {};
2349
+ };
2350
+ /**
2351
+ * Runs one CLI command in-process against a fresh command tree. The command's `-o json` output is the stream:
2352
+ * each top-level JSON value on stdout is one `json` event; `exit` is always last.
2353
+ */
2354
+ readonly invoke: {
2355
+ readonly name: "Invoke";
2356
+ readonly requestType: typeof InvokeRequest;
2357
+ readonly requestStream: false;
2358
+ readonly responseType: typeof InvokeEvent;
2359
+ readonly responseStream: true;
2360
+ readonly options: {};
2361
+ };
2362
+ /** Cancels a live Invoke as an explicit user cancel (errUserCancel). A stream closed without this detaches. */
2363
+ readonly cancelInvoke: {
2364
+ readonly name: "CancelInvoke";
2365
+ readonly requestType: typeof CancelInvokeRequest;
2366
+ readonly requestStream: false;
2367
+ readonly responseType: typeof CancelInvokeResponse;
2368
+ readonly responseStream: false;
2369
+ readonly options: {};
2370
+ };
2371
+ /**
2372
+ * Server-push events scoped to one session. Yields `BundleStateEvent`
2373
+ * — full `BundleState` snapshots per session-state change, generate-phase
2374
+ * pass-throughs, and the result of every command that ran in the
2375
+ * session's root (`CommandResult`). Initial emission is the current
2376
+ * BundleState, which acts as the "subscribed" ready signal, followed by
2377
+ * the last `CommandResult` the session keeps per command path.
2378
+ *
2379
+ * Consumers (portal + extension canvas engines) project locally via
2380
+ * `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
2381
+ * `arrangement` (node positions, group collapse/label) is consumer-owned
2382
+ * view state — it never travels over this RPC.
2383
+ */
2384
+ readonly subscribe: {
2385
+ readonly name: "Subscribe";
2386
+ readonly requestType: typeof SubscribeRequest;
2387
+ readonly requestStream: false;
2388
+ readonly responseType: typeof BundleStateEvent;
2389
+ readonly responseStream: true;
2390
+ readonly options: {};
2391
+ };
2392
+ };
2393
+ };
2394
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
2395
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
2396
+ [K in keyof T]?: DeepPartial<T[K]>;
2397
+ } : Partial<T>;
2398
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
2399
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
2400
+ [K in keyof P]: Exact<P[K], I[K]>;
2401
+ } & {
2402
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
2403
+ };
2404
+ interface MessageFns<T> {
2405
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
2406
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
2407
+ fromJSON(object: any): T;
2408
+ toJSON(message: T): unknown;
2409
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
2410
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
2411
+ }
2412
+
2413
+ /**
2414
+ * Every path an overlay, panel or action binds — a bound path with no
2415
+ * golden is a failing test, not a silent gap.
2416
+ */
2417
+ declare const SCHEMAS: {
2418
+ 'module validate': z.ZodObject<{
2419
+ root: z.ZodOptional<z.ZodString>;
2420
+ treeHash: z.ZodOptional<z.ZodString>;
2421
+ verdict: z.ZodOptional<z.ZodEnum<{
2422
+ "already-lace-style": "already-lace-style";
2423
+ "representable-but-transpilable": "representable-but-transpilable";
2424
+ lossy: "lossy";
2425
+ }>>;
2426
+ residuals: z.ZodOptional<z.ZodArray<z.ZodObject<{
2427
+ construct: z.ZodString;
2428
+ subject: z.ZodString;
2429
+ file: z.ZodString;
2430
+ line: z.ZodNumber;
2431
+ code: z.ZodString;
2432
+ guidance: z.ZodString;
2433
+ }, z.core.$strip>>>;
2434
+ deviation: z.ZodOptional<z.ZodObject<{
2435
+ notCompositional: z.ZodBoolean;
2436
+ clusters: z.ZodArray<z.ZodUnknown>;
2437
+ residuals: z.ZodArray<z.ZodUnknown>;
2438
+ hasManagedBackend: z.ZodBoolean;
2439
+ backendFindings: z.ZodArray<z.ZodObject<{
2440
+ file: z.ZodString;
2441
+ line: z.ZodNumber;
2442
+ kind: z.ZodString;
2443
+ }, z.core.$strip>>;
2444
+ sharedLocalSource: z.ZodBoolean;
2445
+ sharedLocalFindings: z.ZodArray<z.ZodUnknown>;
2446
+ uncomposable: z.ZodBoolean;
2447
+ uncomposableReason: z.ZodString;
2448
+ registryVersionNotExact: z.ZodArray<z.ZodUnknown>;
2449
+ childNotLaceForm: z.ZodArray<z.ZodUnknown>;
2450
+ }, z.core.$strip>>;
2451
+ terraform: z.ZodOptional<z.ZodObject<{
2452
+ valid: z.ZodBoolean;
2453
+ diagnostics: z.ZodArray<z.ZodObject<{
2454
+ path: z.ZodString;
2455
+ line: z.ZodNumber;
2456
+ column: z.ZodNumber;
2457
+ severity: z.ZodString;
2458
+ message: z.ZodString;
2459
+ }, z.core.$strip>>;
2460
+ }, z.core.$strip>>;
2461
+ modules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2462
+ address: z.ZodString;
2463
+ version: z.ZodString;
2464
+ treeHash: z.ZodString;
2465
+ }, z.core.$strip>>>;
2466
+ exitClass: z.ZodString;
2467
+ diagnostics: z.ZodArray<z.ZodObject<{
2468
+ severity: z.ZodEnum<{
2469
+ error: "error";
2470
+ warning: "warning";
2471
+ info: "info";
2472
+ }>;
2473
+ code: z.ZodOptional<z.ZodString>;
2474
+ message: z.ZodString;
2475
+ moduleKey: z.ZodOptional<z.ZodString>;
2476
+ instanceId: z.ZodOptional<z.ZodString>;
2477
+ inputName: z.ZodOptional<z.ZodString>;
2478
+ file: z.ZodOptional<z.ZodString>;
2479
+ line: z.ZodOptional<z.ZodNumber>;
2480
+ column: z.ZodOptional<z.ZodNumber>;
2481
+ }, z.core.$strip>>;
2482
+ }, z.core.$strip>;
2483
+ 'module convert': z.ZodObject<{
2484
+ changed: z.ZodBoolean;
2485
+ written: z.ZodArray<z.ZodString>;
2486
+ removed: z.ZodArray<z.ZodString>;
2487
+ validate: z.ZodObject<{
2488
+ root: z.ZodOptional<z.ZodString>;
2489
+ treeHash: z.ZodOptional<z.ZodString>;
2490
+ verdict: z.ZodOptional<z.ZodEnum<{
2491
+ "already-lace-style": "already-lace-style";
2492
+ "representable-but-transpilable": "representable-but-transpilable";
2493
+ lossy: "lossy";
2494
+ }>>;
2495
+ residuals: z.ZodOptional<z.ZodArray<z.ZodObject<{
2496
+ construct: z.ZodString;
2497
+ subject: z.ZodString;
2498
+ file: z.ZodString;
2499
+ line: z.ZodNumber;
2500
+ code: z.ZodString;
2501
+ guidance: z.ZodString;
2502
+ }, z.core.$strip>>>;
2503
+ deviation: z.ZodOptional<z.ZodObject<{
2504
+ notCompositional: z.ZodBoolean;
2505
+ clusters: z.ZodArray<z.ZodUnknown>;
2506
+ residuals: z.ZodArray<z.ZodUnknown>;
2507
+ hasManagedBackend: z.ZodBoolean;
2508
+ backendFindings: z.ZodArray<z.ZodObject<{
2509
+ file: z.ZodString;
2510
+ line: z.ZodNumber;
2511
+ kind: z.ZodString;
2512
+ }, z.core.$strip>>;
2513
+ sharedLocalSource: z.ZodBoolean;
2514
+ sharedLocalFindings: z.ZodArray<z.ZodUnknown>;
2515
+ uncomposable: z.ZodBoolean;
2516
+ uncomposableReason: z.ZodString;
2517
+ registryVersionNotExact: z.ZodArray<z.ZodUnknown>;
2518
+ childNotLaceForm: z.ZodArray<z.ZodUnknown>;
2519
+ }, z.core.$strip>>;
2520
+ terraform: z.ZodOptional<z.ZodObject<{
2521
+ valid: z.ZodBoolean;
2522
+ diagnostics: z.ZodArray<z.ZodObject<{
2523
+ path: z.ZodString;
2524
+ line: z.ZodNumber;
2525
+ column: z.ZodNumber;
2526
+ severity: z.ZodString;
2527
+ message: z.ZodString;
2528
+ }, z.core.$strip>>;
2529
+ }, z.core.$strip>>;
2530
+ modules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2531
+ address: z.ZodString;
2532
+ version: z.ZodString;
2533
+ treeHash: z.ZodString;
2534
+ }, z.core.$strip>>>;
2535
+ exitClass: z.ZodString;
2536
+ diagnostics: z.ZodArray<z.ZodObject<{
2537
+ severity: z.ZodEnum<{
2538
+ error: "error";
2539
+ warning: "warning";
2540
+ info: "info";
2541
+ }>;
2542
+ code: z.ZodOptional<z.ZodString>;
2543
+ message: z.ZodString;
2544
+ moduleKey: z.ZodOptional<z.ZodString>;
2545
+ instanceId: z.ZodOptional<z.ZodString>;
2546
+ inputName: z.ZodOptional<z.ZodString>;
2547
+ file: z.ZodOptional<z.ZodString>;
2548
+ line: z.ZodOptional<z.ZodNumber>;
2549
+ column: z.ZodOptional<z.ZodNumber>;
2550
+ }, z.core.$strip>>;
2551
+ }, z.core.$strip>;
2552
+ diagnostics: z.ZodArray<z.ZodObject<{
2553
+ severity: z.ZodEnum<{
2554
+ error: "error";
2555
+ warning: "warning";
2556
+ info: "info";
2557
+ }>;
2558
+ code: z.ZodOptional<z.ZodString>;
2559
+ message: z.ZodString;
2560
+ moduleKey: z.ZodOptional<z.ZodString>;
2561
+ instanceId: z.ZodOptional<z.ZodString>;
2562
+ inputName: z.ZodOptional<z.ZodString>;
2563
+ file: z.ZodOptional<z.ZodString>;
2564
+ line: z.ZodOptional<z.ZodNumber>;
2565
+ column: z.ZodOptional<z.ZodNumber>;
2566
+ }, z.core.$strip>>;
2567
+ }, z.core.$strip>;
2568
+ 'module fmt': z.ZodObject<{
2569
+ changed: z.ZodArray<z.ZodString>;
2570
+ }, z.core.$strip>;
2571
+ 'module docs': z.ZodObject<{
2572
+ markdown: z.ZodString;
2573
+ }, z.core.$strip>;
2574
+ 'module scan': z.ZodObject<{
2575
+ treeHash: z.ZodString;
2576
+ diagnostics: z.ZodArray<z.ZodObject<{
2577
+ severity: z.ZodEnum<{
2578
+ error: "error";
2579
+ warning: "warning";
2580
+ info: "info";
2581
+ }>;
2582
+ code: z.ZodOptional<z.ZodString>;
2583
+ message: z.ZodString;
2584
+ moduleKey: z.ZodOptional<z.ZodString>;
2585
+ instanceId: z.ZodOptional<z.ZodString>;
2586
+ inputName: z.ZodOptional<z.ZodString>;
2587
+ file: z.ZodOptional<z.ZodString>;
2588
+ line: z.ZodOptional<z.ZodNumber>;
2589
+ column: z.ZodOptional<z.ZodNumber>;
2590
+ }, z.core.$strip>>;
2591
+ }, z.core.$strip>;
2592
+ 'registry list': z.ZodObject<{
2593
+ items: z.ZodArray<z.ZodObject<{
2594
+ id: z.ZodString;
2595
+ axis: z.ZodString;
2596
+ author: z.ZodString;
2597
+ name: z.ZodString;
2598
+ displayName: z.ZodString;
2599
+ version: z.ZodString;
2600
+ status: z.ZodString;
2601
+ visibility: z.ZodString;
2602
+ description: z.ZodString;
2603
+ categories: z.ZodArray<z.ZodString>;
2604
+ vendor: z.ZodNullable<z.ZodObject<{
2605
+ author: z.ZodString;
2606
+ displayName: z.ZodString;
2607
+ logoUrl: z.ZodNullable<z.ZodString>;
2608
+ description: z.ZodNullable<z.ZodString>;
2609
+ homepageUrl: z.ZodNullable<z.ZodString>;
2610
+ supportEmail: z.ZodNullable<z.ZodString>;
2611
+ verified: z.ZodBoolean;
2612
+ }, z.core.$strip>>;
2613
+ system: z.ZodString;
2614
+ sourceAddress: z.ZodString;
2615
+ publisherVerdict: z.ZodString;
2616
+ }, z.core.$strip>>;
2617
+ truncated: z.ZodBoolean;
2618
+ publishingGuideUrl: z.ZodString;
2619
+ }, z.core.$strip>;
2620
+ 'registry get': z.ZodObject<{
2621
+ axis: z.ZodString;
2622
+ author: z.ZodString;
2623
+ name: z.ZodString;
2624
+ treeHash: z.ZodString;
2625
+ repo: z.ZodString;
2626
+ commit: z.ZodString;
2627
+ latest: z.ZodObject<{
2628
+ id: z.ZodString;
2629
+ axis: z.ZodString;
2630
+ provider: z.ZodNullable<z.ZodString>;
2631
+ author: z.ZodString;
2632
+ name: z.ZodString;
2633
+ version: z.ZodString;
2634
+ orgId: z.ZodNullable<z.ZodString>;
2635
+ visibility: z.ZodString;
2636
+ ownership: z.ZodString;
2637
+ displayName: z.ZodString;
2638
+ description: z.ZodString;
2639
+ categories: z.ZodArray<z.ZodString>;
2640
+ readme: z.ZodNullable<z.ZodString>;
2641
+ vendor: z.ZodNullable<z.ZodObject<{
2642
+ author: z.ZodString;
2643
+ displayName: z.ZodString;
2644
+ logoUrl: z.ZodNullable<z.ZodString>;
2645
+ description: z.ZodNullable<z.ZodString>;
2646
+ homepageUrl: z.ZodNullable<z.ZodString>;
2647
+ supportEmail: z.ZodNullable<z.ZodString>;
2648
+ verified: z.ZodBoolean;
2649
+ }, z.core.$strip>>;
2650
+ status: z.ZodString;
2651
+ installCount: z.ZodNumber;
2652
+ publishedAt: z.ZodNullable<z.ZodString>;
2653
+ publishedBy: z.ZodNullable<z.ZodString>;
2654
+ createdAt: z.ZodString;
2655
+ updatedAt: z.ZodString;
2656
+ system: z.ZodNullable<z.ZodString>;
2657
+ sourceAddress: z.ZodNullable<z.ZodString>;
2658
+ sourceVersion: z.ZodNullable<z.ZodString>;
2659
+ treeHash: z.ZodNullable<z.ZodString>;
2660
+ publisherVerdict: z.ZodNullable<z.ZodString>;
2661
+ publisherModules: z.ZodNullable<z.ZodArray<z.ZodUnknown>>;
2662
+ attestedAt: z.ZodNullable<z.ZodString>;
2663
+ repository: z.ZodNullable<z.ZodString>;
2664
+ commit: z.ZodNullable<z.ZodString>;
2665
+ }, z.core.$strip>;
2666
+ versions: z.ZodArray<z.ZodObject<{
2667
+ version: z.ZodString;
2668
+ status: z.ZodString;
2669
+ publishedAt: z.ZodString;
2670
+ }, z.core.$strip>>;
2671
+ }, z.core.$strip>;
2672
+ 'registry describe': z.ZodObject<{
2673
+ author: z.ZodString;
2674
+ name: z.ZodString;
2675
+ version: z.ZodString;
2676
+ source: z.ZodString;
2677
+ treeHash: z.ZodString;
2678
+ verdict: z.ZodString;
2679
+ interface: z.ZodObject<{
2680
+ inputs: z.ZodArray<z.ZodObject<{
2681
+ name: z.ZodString;
2682
+ type: z.ZodString;
2683
+ required: z.ZodBoolean;
2684
+ description: z.ZodString;
2685
+ default: z.ZodNullable<z.ZodUnknown>;
2686
+ sensitive: z.ZodBoolean;
2687
+ }, z.core.$strip>>;
2688
+ outputs: z.ZodArray<z.ZodObject<{
2689
+ name: z.ZodString;
2690
+ description: z.ZodString;
2691
+ sensitive: z.ZodBoolean;
2692
+ }, z.core.$strip>>;
2693
+ }, z.core.$strip>;
2694
+ }, z.core.$strip>;
2695
+ 'stack list': z.ZodObject<{
2696
+ items: z.ZodArray<z.ZodObject<{
2697
+ id: z.ZodString;
2698
+ orgId: z.ZodString;
2699
+ teamId: z.ZodString;
2700
+ connectionId: z.ZodString;
2701
+ slug: z.ZodString;
2702
+ name: z.ZodString;
2703
+ description: z.ZodNullable<z.ZodString>;
2704
+ source: z.ZodNullable<z.ZodObject<{
2705
+ kind: z.ZodLiteral<"git">;
2706
+ repoUrl: z.ZodString;
2707
+ ref: z.ZodOptional<z.ZodString>;
2708
+ path: z.ZodOptional<z.ZodString>;
2709
+ }, z.core.$strip>>;
2710
+ stateSerial: z.ZodNumber;
2711
+ stateLineage: z.ZodNullable<z.ZodString>;
2712
+ stateVersion: z.ZodNullable<z.ZodNumber>;
2713
+ stateLastWrittenAt: z.ZodNullable<z.ZodString>;
2714
+ lastAppliedRunId: z.ZodNullable<z.ZodString>;
2715
+ lastDriftScanAt: z.ZodNullable<z.ZodString>;
2716
+ lastDriftStatus: z.ZodNullable<z.ZodString>;
2717
+ lastDriftCount: z.ZodNumber;
2718
+ lastDriftStale: z.ZodBoolean;
2719
+ lastDriftConfirmedAt: z.ZodNullable<z.ZodString>;
2720
+ lastDriftUndeterminedReason: z.ZodNullable<z.ZodString>;
2721
+ chaosLockedByRunId: z.ZodNullable<z.ZodString>;
2722
+ chaosLockedAt: z.ZodNullable<z.ZodString>;
2723
+ createdBy: z.ZodString;
2724
+ createdAt: z.ZodString;
2725
+ updatedAt: z.ZodString;
2726
+ archivedAt: z.ZodNullable<z.ZodString>;
2727
+ connection: z.ZodNullable<z.ZodObject<{
2728
+ name: z.ZodString;
2729
+ provider: z.ZodString;
2730
+ awsAccountId: z.ZodNullable<z.ZodString>;
2731
+ }, z.core.$strip>>;
2732
+ createdByName: z.ZodNullable<z.ZodString>;
2733
+ lastApply: z.ZodNullable<z.ZodObject<{
2734
+ runId: z.ZodString;
2735
+ bundleSnapshotId: z.ZodString;
2736
+ completedAt: z.ZodNullable<z.ZodString>;
2737
+ initiatedByName: z.ZodNullable<z.ZodString>;
2738
+ }, z.core.$strip>>;
2739
+ }, z.core.$strip>>;
2740
+ nextCursor: z.ZodNullable<z.ZodString>;
2741
+ hasMore: z.ZodBoolean;
2742
+ }, z.core.$strip>;
2743
+ 'stack describe': z.ZodObject<{
2744
+ stack: z.ZodNullable<z.ZodObject<{
2745
+ id: z.ZodString;
2746
+ orgId: z.ZodString;
2747
+ teamId: z.ZodString;
2748
+ connectionId: z.ZodString;
2749
+ slug: z.ZodString;
2750
+ name: z.ZodString;
2751
+ description: z.ZodNullable<z.ZodString>;
2752
+ source: z.ZodNullable<z.ZodObject<{
2753
+ kind: z.ZodLiteral<"git">;
2754
+ repoUrl: z.ZodString;
2755
+ ref: z.ZodOptional<z.ZodString>;
2756
+ path: z.ZodOptional<z.ZodString>;
2757
+ }, z.core.$strip>>;
2758
+ stateSerial: z.ZodNumber;
2759
+ stateLineage: z.ZodNullable<z.ZodString>;
2760
+ stateVersion: z.ZodNullable<z.ZodNumber>;
2761
+ stateLastWrittenAt: z.ZodNullable<z.ZodString>;
2762
+ lastAppliedRunId: z.ZodNullable<z.ZodString>;
2763
+ lastDriftScanAt: z.ZodNullable<z.ZodString>;
2764
+ lastDriftStatus: z.ZodNullable<z.ZodString>;
2765
+ lastDriftCount: z.ZodNumber;
2766
+ lastDriftStale: z.ZodBoolean;
2767
+ lastDriftConfirmedAt: z.ZodNullable<z.ZodString>;
2768
+ lastDriftUndeterminedReason: z.ZodNullable<z.ZodString>;
2769
+ chaosLockedByRunId: z.ZodNullable<z.ZodString>;
2770
+ chaosLockedAt: z.ZodNullable<z.ZodString>;
2771
+ createdBy: z.ZodString;
2772
+ createdAt: z.ZodString;
2773
+ updatedAt: z.ZodString;
2774
+ archivedAt: z.ZodNullable<z.ZodString>;
2775
+ connection: z.ZodNullable<z.ZodObject<{
2776
+ name: z.ZodString;
2777
+ provider: z.ZodString;
2778
+ awsAccountId: z.ZodNullable<z.ZodString>;
2779
+ }, z.core.$strip>>;
2780
+ createdByName: z.ZodNullable<z.ZodString>;
2781
+ lastApply: z.ZodNullable<z.ZodObject<{
2782
+ runId: z.ZodString;
2783
+ bundleSnapshotId: z.ZodString;
2784
+ completedAt: z.ZodNullable<z.ZodString>;
2785
+ initiatedByName: z.ZodNullable<z.ZodString>;
2786
+ }, z.core.$strip>>;
2787
+ }, z.core.$strip>>;
2788
+ state: z.ZodNullable<z.ZodObject<{
2789
+ serial: z.ZodNumber;
2790
+ lineage: z.ZodString;
2791
+ terraformVersion: z.ZodString;
2792
+ resourceCount: z.ZodNumber;
2793
+ resourcesByType: z.ZodRecord<z.ZodString, z.ZodNumber>;
2794
+ resources: z.ZodArray<z.ZodObject<{
2795
+ address: z.ZodString;
2796
+ type: z.ZodString;
2797
+ }, z.core.$strip>>;
2798
+ }, z.core.$strip>>;
2799
+ drift: z.ZodNullable<z.ZodObject<{
2800
+ stackId: z.ZodString;
2801
+ scannedAt: z.ZodString;
2802
+ driftStatus: z.ZodLiteral<"DRIFTED">;
2803
+ totalResources: z.ZodNumber;
2804
+ stateSerial: z.ZodNumber;
2805
+ driftedResources: z.ZodArray<z.ZodObject<{
2806
+ address: z.ZodString;
2807
+ type: z.ZodString;
2808
+ status: z.ZodString;
2809
+ details: z.ZodOptional<z.ZodString>;
2810
+ goldenAttributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2811
+ liveProperties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2812
+ diff: z.ZodArray<z.ZodObject<{
2813
+ path: z.ZodString;
2814
+ declared: z.ZodUnknown;
2815
+ detected: z.ZodUnknown;
2816
+ }, z.core.$strip>>;
2817
+ findingId: z.ZodNullable<z.ZodString>;
2818
+ }, z.core.$strip>>;
2819
+ }, z.core.$strip>>;
2820
+ }, z.core.$strip>;
2821
+ 'policy list': z.ZodObject<{
2822
+ stack: z.ZodNullable<z.ZodString>;
2823
+ policies: z.ZodArray<z.ZodObject<{
2824
+ policyId: z.ZodString;
2825
+ name: z.ZodString;
2826
+ mode: z.ZodString;
2827
+ approvalMode: z.ZodNullable<z.ZodString>;
2828
+ ruleIds: z.ZodArray<z.ZodString>;
2829
+ }, z.core.$strip>>;
2830
+ }, z.core.$strip>;
2831
+ 'run list': z.ZodObject<{
2832
+ items: z.ZodArray<z.ZodObject<{
2833
+ id: z.ZodString;
2834
+ stackId: z.ZodString;
2835
+ orgId: z.ZodString;
2836
+ teamId: z.ZodString;
2837
+ kind: z.ZodString;
2838
+ status: z.ZodString;
2839
+ initiatedByUserId: z.ZodNullable<z.ZodString>;
2840
+ initiatedVia: z.ZodString;
2841
+ runnerIdentity: z.ZodNullable<z.ZodString>;
2842
+ runnerLocation: z.ZodNullable<z.ZodString>;
2843
+ bundleSnapshotId: z.ZodNullable<z.ZodString>;
2844
+ sourceCommitSha: z.ZodNullable<z.ZodString>;
2845
+ sourceRef: z.ZodNullable<z.ZodString>;
2846
+ sourcePrUrl: z.ZodNullable<z.ZodString>;
2847
+ sourceOverride: z.ZodBoolean;
2848
+ planResourceAdd: z.ZodNullable<z.ZodNumber>;
2849
+ planResourceChange: z.ZodNullable<z.ZodNumber>;
2850
+ planResourceDestroy: z.ZodNullable<z.ZodNumber>;
2851
+ planLocation: z.ZodNullable<z.ZodString>;
2852
+ planHumanLocation: z.ZodNullable<z.ZodString>;
2853
+ applyLogLocation: z.ZodNullable<z.ZodString>;
2854
+ policyResultsLocation: z.ZodNullable<z.ZodString>;
2855
+ policyPassed: z.ZodNullable<z.ZodBoolean>;
2856
+ policyResolution: z.ZodNullable<z.ZodUnknown>;
2857
+ changeRequestId: z.ZodNullable<z.ZodString>;
2858
+ cancelReason: z.ZodNullable<z.ZodString>;
2859
+ startedAt: z.ZodNullable<z.ZodString>;
2860
+ completedAt: z.ZodNullable<z.ZodString>;
2861
+ errorMessage: z.ZodNullable<z.ZodString>;
2862
+ sourceTreeHash: z.ZodNullable<z.ZodString>;
2863
+ attestationStatus: z.ZodNullable<z.ZodString>;
2864
+ attestedAt: z.ZodNullable<z.ZodString>;
2865
+ attestation: z.ZodNullable<z.ZodString>;
2866
+ createdAt: z.ZodString;
2867
+ updatedAt: z.ZodString;
2868
+ url: z.ZodOptional<z.ZodString>;
2869
+ keepStack: z.ZodOptional<z.ZodBoolean>;
2870
+ version: z.ZodOptional<z.ZodNumber>;
2871
+ lastHeartbeatAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2872
+ initiatedByName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2873
+ stackName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2874
+ }, z.core.$strip>>;
2875
+ nextCursor: z.ZodNullable<z.ZodString>;
2876
+ hasMore: z.ZodBoolean;
2877
+ }, z.core.$strip>;
2878
+ 'chaos list': z.ZodObject<{
2879
+ stackId: z.ZodString;
2880
+ connectionBlock: z.ZodNullable<z.ZodUnknown>;
2881
+ experiments: z.ZodArray<z.ZodObject<{
2882
+ bindingId: z.ZodString;
2883
+ name: z.ZodString;
2884
+ assertionCount: z.ZodNumber;
2885
+ engine: z.ZodString;
2886
+ }, z.core.$strip>>;
2887
+ }, z.core.$strip>;
2888
+ 'stack preview': z.ZodObject<{
2889
+ stack: z.ZodObject<{
2890
+ id: z.ZodString;
2891
+ slug: z.ZodString;
2892
+ }, z.core.$strip>;
2893
+ treeHash: z.ZodString;
2894
+ plan: z.ZodObject<{
2895
+ summary: z.ZodObject<{
2896
+ resourceAdd: z.ZodNumber;
2897
+ resourceChange: z.ZodNumber;
2898
+ resourceDestroy: z.ZodNumber;
2899
+ }, z.core.$strip>;
2900
+ human: z.ZodString;
2901
+ }, z.core.$strip>;
2902
+ policy: z.ZodNullable<z.ZodObject<{
2903
+ mode: z.ZodString;
2904
+ policyId: z.ZodString;
2905
+ ruleId: z.ZodString;
2906
+ rulesFired: z.ZodArray<z.ZodString>;
2907
+ reason: z.ZodString;
2908
+ approvalMode: z.ZodNullable<z.ZodString>;
2909
+ isAuthoringTimePreview: z.ZodBoolean;
2910
+ }, z.core.$strip>>;
2911
+ }, z.core.$strip>;
2912
+ 'stack apply': z.ZodDiscriminatedUnion<[z.ZodObject<{
2913
+ type: z.ZodLiteral<"log">;
2914
+ text: z.ZodString;
2915
+ }, z.core.$strip>, z.ZodObject<{
2916
+ type: z.ZodLiteral<"phase">;
2917
+ name: z.ZodString;
2918
+ }, z.core.$strip>, z.ZodObject<{
2919
+ type: z.ZodLiteral<"gate">;
2920
+ resolution: z.ZodObject<{
2921
+ mode: z.ZodString;
2922
+ reason: z.ZodOptional<z.ZodString>;
2923
+ }, z.core.$strip>;
2924
+ changeRequest: z.ZodNullable<z.ZodObject<{
2925
+ id: z.ZodString;
2926
+ orgId: z.ZodString;
2927
+ teamId: z.ZodString;
2928
+ runId: z.ZodString;
2929
+ bindingId: z.ZodNullable<z.ZodString>;
2930
+ invocationId: z.ZodNullable<z.ZodString>;
2931
+ state: z.ZodString;
2932
+ approverUserId: z.ZodNullable<z.ZodString>;
2933
+ approvalChain: z.ZodUnknown;
2934
+ emergencyApproval: z.ZodBoolean;
2935
+ narrativeArtifactId: z.ZodNullable<z.ZodString>;
2936
+ policyResolution: z.ZodUnknown;
2937
+ externalSystemId: z.ZodNullable<z.ZodString>;
2938
+ externalRef: z.ZodNullable<z.ZodString>;
2939
+ idempotencyKey: z.ZodNullable<z.ZodString>;
2940
+ lastReconciledAt: z.ZodNullable<z.ZodString>;
2941
+ submittedByUserId: z.ZodNullable<z.ZodString>;
2942
+ submittedAt: z.ZodNullable<z.ZodString>;
2943
+ createdAt: z.ZodString;
2944
+ updatedAt: z.ZodString;
2945
+ }, z.core.$strip>>;
2946
+ }, z.core.$strip>, z.ZodObject<{
2947
+ type: z.ZodLiteral<"result">;
2948
+ run: z.ZodObject<{
2949
+ id: z.ZodString;
2950
+ stackId: z.ZodString;
2951
+ orgId: z.ZodString;
2952
+ teamId: z.ZodString;
2953
+ kind: z.ZodString;
2954
+ status: z.ZodString;
2955
+ initiatedByUserId: z.ZodNullable<z.ZodString>;
2956
+ initiatedVia: z.ZodString;
2957
+ runnerIdentity: z.ZodNullable<z.ZodString>;
2958
+ runnerLocation: z.ZodNullable<z.ZodString>;
2959
+ bundleSnapshotId: z.ZodNullable<z.ZodString>;
2960
+ sourceCommitSha: z.ZodNullable<z.ZodString>;
2961
+ sourceRef: z.ZodNullable<z.ZodString>;
2962
+ sourcePrUrl: z.ZodNullable<z.ZodString>;
2963
+ sourceOverride: z.ZodBoolean;
2964
+ planResourceAdd: z.ZodNullable<z.ZodNumber>;
2965
+ planResourceChange: z.ZodNullable<z.ZodNumber>;
2966
+ planResourceDestroy: z.ZodNullable<z.ZodNumber>;
2967
+ planLocation: z.ZodNullable<z.ZodString>;
2968
+ planHumanLocation: z.ZodNullable<z.ZodString>;
2969
+ applyLogLocation: z.ZodNullable<z.ZodString>;
2970
+ policyResultsLocation: z.ZodNullable<z.ZodString>;
2971
+ policyPassed: z.ZodNullable<z.ZodBoolean>;
2972
+ policyResolution: z.ZodNullable<z.ZodUnknown>;
2973
+ changeRequestId: z.ZodNullable<z.ZodString>;
2974
+ cancelReason: z.ZodNullable<z.ZodString>;
2975
+ startedAt: z.ZodNullable<z.ZodString>;
2976
+ completedAt: z.ZodNullable<z.ZodString>;
2977
+ errorMessage: z.ZodNullable<z.ZodString>;
2978
+ sourceTreeHash: z.ZodNullable<z.ZodString>;
2979
+ attestationStatus: z.ZodNullable<z.ZodString>;
2980
+ attestedAt: z.ZodNullable<z.ZodString>;
2981
+ attestation: z.ZodNullable<z.ZodString>;
2982
+ createdAt: z.ZodString;
2983
+ updatedAt: z.ZodString;
2984
+ url: z.ZodOptional<z.ZodString>;
2985
+ keepStack: z.ZodOptional<z.ZodBoolean>;
2986
+ version: z.ZodOptional<z.ZodNumber>;
2987
+ lastHeartbeatAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2988
+ initiatedByName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2989
+ stackName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2990
+ }, z.core.$strip>;
2991
+ summary: z.ZodObject<{
2992
+ resourceAdd: z.ZodNumber;
2993
+ resourceChange: z.ZodNumber;
2994
+ resourceDestroy: z.ZodNumber;
2995
+ }, z.core.$strip>;
2996
+ workspaceDir: z.ZodString;
2997
+ error: z.ZodNullable<z.ZodString>;
2998
+ }, z.core.$strip>], "type">;
2999
+ 'stack destroy': z.ZodDiscriminatedUnion<[z.ZodObject<{
3000
+ type: z.ZodLiteral<"log">;
3001
+ text: z.ZodString;
3002
+ }, z.core.$strip>, z.ZodObject<{
3003
+ type: z.ZodLiteral<"phase">;
3004
+ name: z.ZodString;
3005
+ }, z.core.$strip>, z.ZodObject<{
3006
+ type: z.ZodLiteral<"gate">;
3007
+ resolution: z.ZodObject<{
3008
+ mode: z.ZodString;
3009
+ reason: z.ZodOptional<z.ZodString>;
3010
+ }, z.core.$strip>;
3011
+ changeRequest: z.ZodNullable<z.ZodObject<{
3012
+ id: z.ZodString;
3013
+ orgId: z.ZodString;
3014
+ teamId: z.ZodString;
3015
+ runId: z.ZodString;
3016
+ bindingId: z.ZodNullable<z.ZodString>;
3017
+ invocationId: z.ZodNullable<z.ZodString>;
3018
+ state: z.ZodString;
3019
+ approverUserId: z.ZodNullable<z.ZodString>;
3020
+ approvalChain: z.ZodUnknown;
3021
+ emergencyApproval: z.ZodBoolean;
3022
+ narrativeArtifactId: z.ZodNullable<z.ZodString>;
3023
+ policyResolution: z.ZodUnknown;
3024
+ externalSystemId: z.ZodNullable<z.ZodString>;
3025
+ externalRef: z.ZodNullable<z.ZodString>;
3026
+ idempotencyKey: z.ZodNullable<z.ZodString>;
3027
+ lastReconciledAt: z.ZodNullable<z.ZodString>;
3028
+ submittedByUserId: z.ZodNullable<z.ZodString>;
3029
+ submittedAt: z.ZodNullable<z.ZodString>;
3030
+ createdAt: z.ZodString;
3031
+ updatedAt: z.ZodString;
3032
+ }, z.core.$strip>>;
3033
+ }, z.core.$strip>, z.ZodObject<{
3034
+ type: z.ZodLiteral<"result">;
3035
+ run: z.ZodObject<{
3036
+ id: z.ZodString;
3037
+ stackId: z.ZodString;
3038
+ orgId: z.ZodString;
3039
+ teamId: z.ZodString;
3040
+ kind: z.ZodString;
3041
+ status: z.ZodString;
3042
+ initiatedByUserId: z.ZodNullable<z.ZodString>;
3043
+ initiatedVia: z.ZodString;
3044
+ runnerIdentity: z.ZodNullable<z.ZodString>;
3045
+ runnerLocation: z.ZodNullable<z.ZodString>;
3046
+ bundleSnapshotId: z.ZodNullable<z.ZodString>;
3047
+ sourceCommitSha: z.ZodNullable<z.ZodString>;
3048
+ sourceRef: z.ZodNullable<z.ZodString>;
3049
+ sourcePrUrl: z.ZodNullable<z.ZodString>;
3050
+ sourceOverride: z.ZodBoolean;
3051
+ planResourceAdd: z.ZodNullable<z.ZodNumber>;
3052
+ planResourceChange: z.ZodNullable<z.ZodNumber>;
3053
+ planResourceDestroy: z.ZodNullable<z.ZodNumber>;
3054
+ planLocation: z.ZodNullable<z.ZodString>;
3055
+ planHumanLocation: z.ZodNullable<z.ZodString>;
3056
+ applyLogLocation: z.ZodNullable<z.ZodString>;
3057
+ policyResultsLocation: z.ZodNullable<z.ZodString>;
3058
+ policyPassed: z.ZodNullable<z.ZodBoolean>;
3059
+ policyResolution: z.ZodNullable<z.ZodUnknown>;
3060
+ changeRequestId: z.ZodNullable<z.ZodString>;
3061
+ cancelReason: z.ZodNullable<z.ZodString>;
3062
+ startedAt: z.ZodNullable<z.ZodString>;
3063
+ completedAt: z.ZodNullable<z.ZodString>;
3064
+ errorMessage: z.ZodNullable<z.ZodString>;
3065
+ sourceTreeHash: z.ZodNullable<z.ZodString>;
3066
+ attestationStatus: z.ZodNullable<z.ZodString>;
3067
+ attestedAt: z.ZodNullable<z.ZodString>;
3068
+ attestation: z.ZodNullable<z.ZodString>;
3069
+ createdAt: z.ZodString;
3070
+ updatedAt: z.ZodString;
3071
+ url: z.ZodOptional<z.ZodString>;
3072
+ keepStack: z.ZodOptional<z.ZodBoolean>;
3073
+ version: z.ZodOptional<z.ZodNumber>;
3074
+ lastHeartbeatAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3075
+ initiatedByName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3076
+ stackName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3077
+ }, z.core.$strip>;
3078
+ summary: z.ZodObject<{
3079
+ resourceAdd: z.ZodNumber;
3080
+ resourceChange: z.ZodNumber;
3081
+ resourceDestroy: z.ZodNumber;
3082
+ }, z.core.$strip>;
3083
+ workspaceDir: z.ZodString;
3084
+ error: z.ZodNullable<z.ZodString>;
3085
+ }, z.core.$strip>], "type">;
3086
+ 'stack scan': z.ZodObject<{
3087
+ triggered: z.ZodBoolean;
3088
+ reason: z.ZodNullable<z.ZodString>;
3089
+ settled: z.ZodNullable<z.ZodObject<{
3090
+ driftStatus: z.ZodString;
3091
+ driftCount: z.ZodNumber;
3092
+ scannedAt: z.ZodString;
3093
+ undeterminedReason: z.ZodNullable<z.ZodString>;
3094
+ drift: z.ZodNullable<z.ZodObject<{
3095
+ stackId: z.ZodString;
3096
+ scannedAt: z.ZodString;
3097
+ driftStatus: z.ZodLiteral<"DRIFTED">;
3098
+ totalResources: z.ZodNumber;
3099
+ stateSerial: z.ZodNumber;
3100
+ driftedResources: z.ZodArray<z.ZodObject<{
3101
+ address: z.ZodString;
3102
+ type: z.ZodString;
3103
+ status: z.ZodString;
3104
+ details: z.ZodOptional<z.ZodString>;
3105
+ goldenAttributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3106
+ liveProperties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3107
+ diff: z.ZodArray<z.ZodObject<{
3108
+ path: z.ZodString;
3109
+ declared: z.ZodUnknown;
3110
+ detected: z.ZodUnknown;
3111
+ }, z.core.$strip>>;
3112
+ findingId: z.ZodNullable<z.ZodString>;
3113
+ }, z.core.$strip>>;
3114
+ }, z.core.$strip>>;
3115
+ }, z.core.$strip>>;
3116
+ }, z.core.$strip>;
3117
+ 'stack create': z.ZodObject<{
3118
+ id: z.ZodString;
3119
+ orgId: z.ZodString;
3120
+ teamId: z.ZodString;
3121
+ connectionId: z.ZodString;
3122
+ slug: z.ZodString;
3123
+ name: z.ZodString;
3124
+ description: z.ZodNullable<z.ZodString>;
3125
+ source: z.ZodNullable<z.ZodObject<{
3126
+ kind: z.ZodLiteral<"git">;
3127
+ repoUrl: z.ZodString;
3128
+ ref: z.ZodOptional<z.ZodString>;
3129
+ path: z.ZodOptional<z.ZodString>;
3130
+ }, z.core.$strip>>;
3131
+ stateSerial: z.ZodNumber;
3132
+ stateLineage: z.ZodNullable<z.ZodString>;
3133
+ stateVersion: z.ZodNullable<z.ZodNumber>;
3134
+ stateLastWrittenAt: z.ZodNullable<z.ZodString>;
3135
+ lastAppliedRunId: z.ZodNullable<z.ZodString>;
3136
+ lastDriftScanAt: z.ZodNullable<z.ZodString>;
3137
+ lastDriftStatus: z.ZodNullable<z.ZodString>;
3138
+ lastDriftCount: z.ZodNumber;
3139
+ lastDriftStale: z.ZodBoolean;
3140
+ lastDriftConfirmedAt: z.ZodNullable<z.ZodString>;
3141
+ lastDriftUndeterminedReason: z.ZodNullable<z.ZodString>;
3142
+ chaosLockedByRunId: z.ZodNullable<z.ZodString>;
3143
+ chaosLockedAt: z.ZodNullable<z.ZodString>;
3144
+ createdBy: z.ZodString;
3145
+ createdAt: z.ZodString;
3146
+ updatedAt: z.ZodString;
3147
+ archivedAt: z.ZodNullable<z.ZodString>;
3148
+ connection: z.ZodNullable<z.ZodObject<{
3149
+ name: z.ZodString;
3150
+ provider: z.ZodString;
3151
+ awsAccountId: z.ZodNullable<z.ZodString>;
3152
+ }, z.core.$strip>>;
3153
+ createdByName: z.ZodNullable<z.ZodString>;
3154
+ lastApply: z.ZodNullable<z.ZodObject<{
3155
+ runId: z.ZodString;
3156
+ bundleSnapshotId: z.ZodString;
3157
+ completedAt: z.ZodNullable<z.ZodString>;
3158
+ initiatedByName: z.ZodNullable<z.ZodString>;
3159
+ }, z.core.$strip>>;
3160
+ }, z.core.$strip>;
3161
+ 'stack import': z.ZodObject<{
3162
+ stack: z.ZodObject<{
3163
+ id: z.ZodString;
3164
+ slug: z.ZodString;
3165
+ }, z.core.$strip>;
3166
+ written: z.ZodArray<z.ZodString>;
3167
+ importBlocks: z.ZodNumber;
3168
+ importResiduals: z.ZodArray<z.ZodUnknown>;
3169
+ validate: z.ZodObject<{
3170
+ root: z.ZodOptional<z.ZodString>;
3171
+ treeHash: z.ZodOptional<z.ZodString>;
3172
+ verdict: z.ZodOptional<z.ZodEnum<{
3173
+ "already-lace-style": "already-lace-style";
3174
+ "representable-but-transpilable": "representable-but-transpilable";
3175
+ lossy: "lossy";
3176
+ }>>;
3177
+ residuals: z.ZodOptional<z.ZodArray<z.ZodObject<{
3178
+ construct: z.ZodString;
3179
+ subject: z.ZodString;
3180
+ file: z.ZodString;
3181
+ line: z.ZodNumber;
3182
+ code: z.ZodString;
3183
+ guidance: z.ZodString;
3184
+ }, z.core.$strip>>>;
3185
+ deviation: z.ZodOptional<z.ZodObject<{
3186
+ notCompositional: z.ZodBoolean;
3187
+ clusters: z.ZodArray<z.ZodUnknown>;
3188
+ residuals: z.ZodArray<z.ZodUnknown>;
3189
+ hasManagedBackend: z.ZodBoolean;
3190
+ backendFindings: z.ZodArray<z.ZodObject<{
3191
+ file: z.ZodString;
3192
+ line: z.ZodNumber;
3193
+ kind: z.ZodString;
3194
+ }, z.core.$strip>>;
3195
+ sharedLocalSource: z.ZodBoolean;
3196
+ sharedLocalFindings: z.ZodArray<z.ZodUnknown>;
3197
+ uncomposable: z.ZodBoolean;
3198
+ uncomposableReason: z.ZodString;
3199
+ registryVersionNotExact: z.ZodArray<z.ZodUnknown>;
3200
+ childNotLaceForm: z.ZodArray<z.ZodUnknown>;
3201
+ }, z.core.$strip>>;
3202
+ terraform: z.ZodOptional<z.ZodObject<{
3203
+ valid: z.ZodBoolean;
3204
+ diagnostics: z.ZodArray<z.ZodObject<{
3205
+ path: z.ZodString;
3206
+ line: z.ZodNumber;
3207
+ column: z.ZodNumber;
3208
+ severity: z.ZodString;
3209
+ message: z.ZodString;
3210
+ }, z.core.$strip>>;
3211
+ }, z.core.$strip>>;
3212
+ modules: z.ZodOptional<z.ZodArray<z.ZodObject<{
3213
+ address: z.ZodString;
3214
+ version: z.ZodString;
3215
+ treeHash: z.ZodString;
3216
+ }, z.core.$strip>>>;
3217
+ exitClass: z.ZodString;
3218
+ diagnostics: z.ZodArray<z.ZodObject<{
3219
+ severity: z.ZodEnum<{
3220
+ error: "error";
3221
+ warning: "warning";
3222
+ info: "info";
3223
+ }>;
3224
+ code: z.ZodOptional<z.ZodString>;
3225
+ message: z.ZodString;
3226
+ moduleKey: z.ZodOptional<z.ZodString>;
3227
+ instanceId: z.ZodOptional<z.ZodString>;
3228
+ inputName: z.ZodOptional<z.ZodString>;
3229
+ file: z.ZodOptional<z.ZodString>;
3230
+ line: z.ZodOptional<z.ZodNumber>;
3231
+ column: z.ZodOptional<z.ZodNumber>;
3232
+ }, z.core.$strip>>;
3233
+ }, z.core.$strip>;
3234
+ }, z.core.$strip>;
3235
+ 'run get': z.ZodObject<{
3236
+ id: z.ZodString;
3237
+ stackId: z.ZodString;
3238
+ orgId: z.ZodString;
3239
+ teamId: z.ZodString;
3240
+ kind: z.ZodString;
3241
+ status: z.ZodString;
3242
+ initiatedByUserId: z.ZodNullable<z.ZodString>;
3243
+ initiatedVia: z.ZodString;
3244
+ runnerIdentity: z.ZodNullable<z.ZodString>;
3245
+ runnerLocation: z.ZodNullable<z.ZodString>;
3246
+ bundleSnapshotId: z.ZodNullable<z.ZodString>;
3247
+ sourceCommitSha: z.ZodNullable<z.ZodString>;
3248
+ sourceRef: z.ZodNullable<z.ZodString>;
3249
+ sourcePrUrl: z.ZodNullable<z.ZodString>;
3250
+ sourceOverride: z.ZodBoolean;
3251
+ planResourceAdd: z.ZodNullable<z.ZodNumber>;
3252
+ planResourceChange: z.ZodNullable<z.ZodNumber>;
3253
+ planResourceDestroy: z.ZodNullable<z.ZodNumber>;
3254
+ planLocation: z.ZodNullable<z.ZodString>;
3255
+ planHumanLocation: z.ZodNullable<z.ZodString>;
3256
+ applyLogLocation: z.ZodNullable<z.ZodString>;
3257
+ policyResultsLocation: z.ZodNullable<z.ZodString>;
3258
+ policyPassed: z.ZodNullable<z.ZodBoolean>;
3259
+ policyResolution: z.ZodNullable<z.ZodUnknown>;
3260
+ changeRequestId: z.ZodNullable<z.ZodString>;
3261
+ cancelReason: z.ZodNullable<z.ZodString>;
3262
+ startedAt: z.ZodNullable<z.ZodString>;
3263
+ completedAt: z.ZodNullable<z.ZodString>;
3264
+ errorMessage: z.ZodNullable<z.ZodString>;
3265
+ sourceTreeHash: z.ZodNullable<z.ZodString>;
3266
+ attestationStatus: z.ZodNullable<z.ZodString>;
3267
+ attestedAt: z.ZodNullable<z.ZodString>;
3268
+ attestation: z.ZodNullable<z.ZodString>;
3269
+ createdAt: z.ZodString;
3270
+ updatedAt: z.ZodString;
3271
+ url: z.ZodOptional<z.ZodString>;
3272
+ keepStack: z.ZodOptional<z.ZodBoolean>;
3273
+ version: z.ZodOptional<z.ZodNumber>;
3274
+ lastHeartbeatAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3275
+ initiatedByName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3276
+ stackName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3277
+ }, z.core.$strip>;
3278
+ 'run plan': z.ZodObject<{
3279
+ runId: z.ZodString;
3280
+ status: z.ZodNullable<z.ZodString>;
3281
+ summary: z.ZodNullable<z.ZodObject<{
3282
+ resourceAdd: z.ZodNumber;
3283
+ resourceChange: z.ZodNumber;
3284
+ resourceDestroy: z.ZodNumber;
3285
+ }, z.core.$strip>>;
3286
+ planHuman: z.ZodNullable<z.ZodObject<{
3287
+ url: z.ZodString;
3288
+ key: z.ZodString;
3289
+ }, z.core.$strip>>;
3290
+ }, z.core.$strip>;
3291
+ 'run cancel': z.ZodObject<{
3292
+ id: z.ZodString;
3293
+ stackId: z.ZodString;
3294
+ orgId: z.ZodString;
3295
+ teamId: z.ZodString;
3296
+ kind: z.ZodString;
3297
+ status: z.ZodString;
3298
+ initiatedByUserId: z.ZodNullable<z.ZodString>;
3299
+ initiatedVia: z.ZodString;
3300
+ runnerIdentity: z.ZodNullable<z.ZodString>;
3301
+ runnerLocation: z.ZodNullable<z.ZodString>;
3302
+ bundleSnapshotId: z.ZodNullable<z.ZodString>;
3303
+ sourceCommitSha: z.ZodNullable<z.ZodString>;
3304
+ sourceRef: z.ZodNullable<z.ZodString>;
3305
+ sourcePrUrl: z.ZodNullable<z.ZodString>;
3306
+ sourceOverride: z.ZodBoolean;
3307
+ planResourceAdd: z.ZodNullable<z.ZodNumber>;
3308
+ planResourceChange: z.ZodNullable<z.ZodNumber>;
3309
+ planResourceDestroy: z.ZodNullable<z.ZodNumber>;
3310
+ planLocation: z.ZodNullable<z.ZodString>;
3311
+ planHumanLocation: z.ZodNullable<z.ZodString>;
3312
+ applyLogLocation: z.ZodNullable<z.ZodString>;
3313
+ policyResultsLocation: z.ZodNullable<z.ZodString>;
3314
+ policyPassed: z.ZodNullable<z.ZodBoolean>;
3315
+ policyResolution: z.ZodNullable<z.ZodUnknown>;
3316
+ changeRequestId: z.ZodNullable<z.ZodString>;
3317
+ cancelReason: z.ZodNullable<z.ZodString>;
3318
+ startedAt: z.ZodNullable<z.ZodString>;
3319
+ completedAt: z.ZodNullable<z.ZodString>;
3320
+ errorMessage: z.ZodNullable<z.ZodString>;
3321
+ sourceTreeHash: z.ZodNullable<z.ZodString>;
3322
+ attestationStatus: z.ZodNullable<z.ZodString>;
3323
+ attestedAt: z.ZodNullable<z.ZodString>;
3324
+ attestation: z.ZodNullable<z.ZodString>;
3325
+ createdAt: z.ZodString;
3326
+ updatedAt: z.ZodString;
3327
+ url: z.ZodOptional<z.ZodString>;
3328
+ keepStack: z.ZodOptional<z.ZodBoolean>;
3329
+ version: z.ZodOptional<z.ZodNumber>;
3330
+ lastHeartbeatAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3331
+ initiatedByName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3332
+ stackName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3333
+ }, z.core.$strip>;
3334
+ 'run logs': z.ZodDiscriminatedUnion<[z.ZodObject<{
3335
+ type: z.ZodLiteral<"log">;
3336
+ text: z.ZodString;
3337
+ }, z.core.$strip>, z.ZodObject<{
3338
+ type: z.ZodLiteral<"result">;
3339
+ status: z.ZodNullable<z.ZodString>;
3340
+ }, z.core.$strip>], "type">;
3341
+ whoami: z.ZodObject<{
3342
+ organization: z.ZodNullable<z.ZodString>;
3343
+ user: z.ZodObject<{
3344
+ email: z.ZodString;
3345
+ id: z.ZodString;
3346
+ name: z.ZodString;
3347
+ }, z.core.$strip>;
3348
+ }, z.core.$strip>;
3349
+ 'org list': z.ZodObject<{
3350
+ items: z.ZodArray<z.ZodObject<{
3351
+ slug: z.ZodString;
3352
+ name: z.ZodString;
3353
+ role: z.ZodString;
3354
+ }, z.core.$strip>>;
3355
+ }, z.core.$strip>;
3356
+ 'org current': z.ZodUnion<readonly [z.ZodObject<{
3357
+ slug: z.ZodString;
3358
+ source: z.ZodEnum<{
3359
+ config: "config";
3360
+ flag: "flag";
3361
+ env: "env";
3362
+ }>;
3363
+ }, z.core.$strip>, z.ZodObject<{
3364
+ slug: z.ZodNull;
3365
+ source: z.ZodNull;
3366
+ }, z.core.$strip>]>;
3367
+ 'org use': z.ZodObject<{
3368
+ organization: z.ZodString;
3369
+ team: z.ZodNullable<z.ZodString>;
3370
+ }, z.core.$strip>;
3371
+ 'team list': z.ZodObject<{
3372
+ items: z.ZodArray<z.ZodObject<{
3373
+ id: z.ZodString;
3374
+ orgId: z.ZodString;
3375
+ name: z.ZodString;
3376
+ slug: z.ZodString;
3377
+ description: z.ZodString;
3378
+ createdBy: z.ZodString;
3379
+ createdAt: z.ZodString;
3380
+ updatedAt: z.ZodString;
3381
+ role: z.ZodString;
3382
+ memberCount: z.ZodNumber;
3383
+ }, z.core.$strip>>;
3384
+ nextCursor: z.ZodNullable<z.ZodString>;
3385
+ hasMore: z.ZodBoolean;
3386
+ createUrl: z.ZodString;
3387
+ }, z.core.$strip>;
3388
+ 'team current': z.ZodUnion<readonly [z.ZodObject<{
3389
+ slug: z.ZodString;
3390
+ source: z.ZodEnum<{
3391
+ config: "config";
3392
+ flag: "flag";
3393
+ env: "env";
3394
+ }>;
3395
+ }, z.core.$strip>, z.ZodObject<{
3396
+ slug: z.ZodNull;
3397
+ source: z.ZodNull;
3398
+ }, z.core.$strip>]>;
3399
+ 'team use': z.ZodObject<{
3400
+ organization: z.ZodString;
3401
+ team: z.ZodNullable<z.ZodString>;
3402
+ }, z.core.$strip>;
3403
+ 'connection list': z.ZodObject<{
3404
+ items: z.ZodArray<z.ZodObject<{
3405
+ id: z.ZodString;
3406
+ name: z.ZodString;
3407
+ provider_type: z.ZodString;
3408
+ status: z.ZodString;
3409
+ status_reason: z.ZodNullable<z.ZodString>;
3410
+ created_at: z.ZodString;
3411
+ updated_at: z.ZodString;
3412
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3413
+ }, z.core.$strip>>;
3414
+ createUrl: z.ZodString;
3415
+ }, z.core.$strip>;
3416
+ login: z.ZodDiscriminatedUnion<[z.ZodObject<{
3417
+ type: z.ZodLiteral<"code">;
3418
+ code: z.ZodString;
3419
+ verificationUrl: z.ZodOptional<z.ZodString>;
3420
+ }, z.core.$strip>, z.ZodObject<{
3421
+ type: z.ZodLiteral<"url">;
3422
+ url: z.ZodString;
3423
+ }, z.core.$strip>, z.ZodObject<{
3424
+ type: z.ZodLiteral<"email_sent">;
3425
+ email: z.ZodString;
3426
+ }, z.core.$strip>, z.ZodObject<{
3427
+ type: z.ZodLiteral<"result">;
3428
+ user: z.ZodObject<{
3429
+ id: z.ZodString;
3430
+ email: z.ZodString;
3431
+ name: z.ZodString;
3432
+ }, z.core.$strip>;
3433
+ }, z.core.$strip>], "type">;
3434
+ logout: z.ZodObject<{
3435
+ loggedOut: z.ZodBoolean;
3436
+ }, z.core.$strip>;
3437
+ };
3438
+ type BoundPath = keyof typeof SCHEMAS;
3439
+ declare function isBoundPath(path: string): path is BoundPath;
3440
+ type JsonOf<P> = P extends BoundPath ? z.infer<(typeof SCHEMAS)[P]> : unknown;
3441
+ declare function parseBound<P extends BoundPath>(path: P, data: unknown): JsonOf<P>;
3442
+ declare const REASON_PREFIX = "REASON_";
3443
+ type WireSpelling<Name> = Name extends `${typeof REASON_PREFIX}${infer Rest}` ? Lowercase<Rest> : never;
3444
+ type LaceReason = WireSpelling<keyof typeof Reason>;
3445
+ declare function reasonWire(reason: Reason): string;
3446
+ declare const commandFailureSchema: z.ZodObject<{
3447
+ reason: z.ZodCustom<LaceReason, LaceReason>;
3448
+ message: z.ZodString;
3449
+ url: z.ZodOptional<z.ZodString>;
3450
+ tool: z.ZodOptional<z.ZodString>;
3451
+ apiCode: z.ZodOptional<z.ZodString>;
3452
+ }, z.core.$strict>;
3453
+ type CommandFailure = z.infer<typeof commandFailureSchema>;
3454
+ declare function carriesFailure(data: unknown): boolean;
3455
+ declare function parseCommandFailure(data: unknown): CommandFailure;
3456
+
3457
+ type SourceConflict = {
3458
+ baseTreeHash: string;
3459
+ treeHash: string;
3460
+ };
3461
+ type CanvasSource = {
3462
+ bundle: Bundle;
3463
+ canUndo: boolean;
3464
+ canRedo: boolean;
3465
+ unsaved: boolean;
3466
+ ungenerated: boolean;
3467
+ conflict: SourceConflict | null;
3468
+ sourceRefused: boolean;
3469
+ diagnostics: readonly Diagnostic$1[];
3470
+ treeHash: string;
3471
+ revision: number;
3472
+ };
3473
+ type CommandResult = {
3474
+ path: string;
3475
+ exitCode: number;
3476
+ document: string;
3477
+ };
3478
+ type SourceEnd = {
3479
+ kind: 'closed';
3480
+ } | {
3481
+ kind: 'failed';
3482
+ error: Error;
3483
+ };
3484
+ type SourcePort = {
3485
+ subscribe: (on: (s: CanvasSource) => void, onEnd: (end: SourceEnd) => void, onCommandResult?: (result: CommandResult) => void) => () => void;
3486
+ };
3487
+ type GenerateEvent = {
3488
+ type: 'progress';
3489
+ stage: 'generating' | 'validating';
3490
+ } | {
3491
+ type: 'success';
3492
+ written: string[];
3493
+ validate: JsonOf<'module validate'>;
3494
+ } | {
3495
+ type: 'error';
3496
+ message: string;
3497
+ reason: Reason;
3498
+ };
3499
+ /**
3500
+ * A refusal of a batch's content reported by `ApplyAction`. Mirrors the wire
3501
+ * `GraphError` — a failing `ApplyResult` carries one or more of these, and
3502
+ * consumers surface them as a toast, leaving canvas state unchanged.
3503
+ * `reason` is the refusal's entry in the one vocabulary
3504
+ * (`REASON_CROSS_SCOPE` for a wire across a group's boundary,
3505
+ * `REASON_UNSPECIFIED` for one with no entry), so a host branches on it and
3506
+ * never on `message`.
3507
+ */
3508
+ type GraphError = {
3509
+ moduleKey: string;
3510
+ instanceId: string;
3511
+ inputName: string;
3512
+ message: string;
3513
+ reason: Reason;
3514
+ };
3515
+ /**
3516
+ * Names one child created by a mutation (placement, group creation, copy).
3517
+ * Mirrors the wire `CreatedRef` — clients key pending arrangement writes
3518
+ * (position, group label/collapse) off these ids instead of diffing
3519
+ * successive CanvasView frames to guess what changed.
3520
+ */
3521
+ type CreatedRef = {
3522
+ scope: string;
3523
+ id: string;
3524
+ moduleKey: string;
3525
+ sourceId: string;
3526
+ };
3527
+ /**
3528
+ * One output → input pair the engine's matcher scores between two instances
3529
+ * of one module: `sourceInstance`'s `output` could feed `targetInstance`'s
3530
+ * `input`. Mirrors the wire `WiringCandidate`. The matching rules exist only
3531
+ * in the engine; a client ranks or shows these and never rescores them.
3532
+ */
3533
+ type WiringCandidate = {
3534
+ sourceInstance: string;
3535
+ output: string;
3536
+ targetInstance: string;
3537
+ input: string;
3538
+ score: number;
3539
+ };
3540
+ type WiringQuery = {
3541
+ scope: string;
3542
+ source?: string;
3543
+ target?: string;
3544
+ };
3545
+ type ApplyResult = {
3546
+ success: boolean;
3547
+ errors: GraphError[];
3548
+ created: CreatedRef[];
3549
+ ties: WiringCandidate[];
3550
+ revision?: number;
3551
+ };
3552
+ type EditorPort = {
3553
+ apply: (actions: readonly Action[]) => Promise<ApplyResult>;
3554
+ wiringCandidates: (query: WiringQuery) => Promise<WiringCandidate[]>;
3555
+ save: () => Promise<void>;
3556
+ generate: () => AsyncIterable<GenerateEvent>;
3557
+ resolveConflict: (choice: 'keep' | 'reload', treeHash: string) => Promise<void>;
3558
+ };
3559
+ declare class ApplyUnobservedError extends Error {
3560
+ readonly end: SourceEnd | {
3561
+ kind: 'detached';
3562
+ };
3563
+ constructor(end: SourceEnd | {
3564
+ kind: 'detached';
3565
+ });
3566
+ }
3567
+ declare class CommandExitError extends Error {
3568
+ readonly code: number;
3569
+ readonly stderrTail: string;
3570
+ readonly failure?: CommandFailure | undefined;
3571
+ constructor(code: number, stderrTail: string, failure?: CommandFailure | undefined);
3572
+ }
3573
+ declare class ConnectError extends Error {
3574
+ readonly code: string;
3575
+ readonly reason: Reason;
3576
+ readonly apiCode: string | undefined;
3577
+ constructor(code: string, message: string, detail?: ReasonDetail);
3578
+ }
3579
+ declare class CommandDetachedError extends Error {
3580
+ constructor();
3581
+ }
3582
+ type Invocation<P extends BoundPath> = {
3583
+ events: AsyncIterable<JsonOf<P>>;
3584
+ cancel: () => Promise<void>;
3585
+ };
3586
+ type CommandsPort = {
3587
+ available: () => ReadonlySet<BoundPath>;
3588
+ invoke: <P extends BoundPath>(path: P, args: ArgsOf<P>, signal: AbortSignal, cwd?: string) => Invocation<P>;
3589
+ };
3590
+ type StackRef = {
3591
+ id: string;
3592
+ slug: string;
3593
+ };
3594
+ type ContextPort = {
3595
+ root?: string;
3596
+ sessionId?: string;
3597
+ stack?: StackRef;
3598
+ };
3599
+ type ViewStatePort = {
3600
+ load: () => CanvasArrangement;
3601
+ save: (a: CanvasArrangement) => void;
3602
+ };
3603
+ type ConfirmSpec = {
3604
+ text: string;
3605
+ typed?: string;
3606
+ };
3607
+ type PresenterPort = {
3608
+ notify: (level: 'info' | 'warn' | 'error', text: string, failure?: CommandFailure) => void;
3609
+ confirm?: (o: ConfirmSpec) => Promise<boolean>;
3610
+ };
3611
+ type RunnerPorts = {
3612
+ presenter: PresenterPort;
3613
+ commands?: CommandsPort;
3614
+ editor?: EditorPort;
3615
+ };
3616
+ type CanvasPorts = RunnerPorts & {
3617
+ source: SourcePort;
3618
+ context: ContextPort;
3619
+ viewState: ViewStatePort;
3620
+ };
3621
+ type PortName = keyof CanvasPorts;
3622
+
3623
+ type EdgeRef = {
3624
+ id: string;
3625
+ source: string;
3626
+ target: string;
3627
+ sourceOutput: string;
3628
+ targetInput: string;
3629
+ };
3630
+ type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'resolved' | 'selection.node' | 'selection.edge' | 'diagnostics';
3631
+ type RunCtx = {
3632
+ root?: string;
3633
+ sessionId?: string;
3634
+ stack?: StackRef;
3635
+ };
3636
+ type CanvasCtx = RunCtx & {
3637
+ ports: CanvasPorts;
3638
+ editable: boolean;
3639
+ view: CanvasView;
3640
+ selection: {
3641
+ nodes: readonly string[];
3642
+ edge: EdgeRef | null;
3643
+ };
3644
+ diagnostics: readonly Diagnostic$1[];
3645
+ contributions: ContributionSet;
3646
+ };
3647
+ type Badge = {
3648
+ id: string;
3649
+ label: string;
3650
+ tone: 'neutral' | 'warn' | 'error';
3651
+ title?: string;
3652
+ };
3653
+ type NodeDecoration = {
3654
+ badges: readonly Badge[];
3655
+ };
3656
+ type Decorations = {
3657
+ nodes: Readonly<Record<string, NodeDecoration>>;
3658
+ };
3659
+ type OverlayContribution = {
3660
+ id: string;
3661
+ paths: readonly BoundPath[];
3662
+ useDecorations: (ctx: CanvasCtx) => Decorations;
3663
+ };
3664
+ type CommandRead<P extends BoundPath> = {
3665
+ path: P;
3666
+ args: (ctx: CanvasCtx, target: ActionTarget) => ArgsOf<P> | null;
3667
+ };
3668
+ type PanelSpec = {
3669
+ id: string;
3670
+ title: string;
3671
+ slot: 'banner' | 'toolbar' | 'sidebar' | 'bottom' | 'inspector';
3672
+ requiredPorts: readonly PortName[];
3673
+ reads?: readonly {
3674
+ path: BoundPath;
3675
+ }[];
3676
+ requiredContext?: readonly ContextKey[];
3677
+ };
3678
+ type ActionTarget = {
3679
+ nodeId?: string;
3680
+ diagnostic?: Diagnostic$1;
3681
+ runId?: string;
3682
+ };
3683
+ type Placement = 'toolbar' | 'node-menu' | {
3684
+ row: string;
3685
+ };
3686
+ type ResultKind = 'run' | 'preview' | 'report' | 'notify' | 'follow';
3687
+ type SlotKind = Exclude<ResultKind, 'notify'>;
3688
+ type SinkInput = {
3689
+ run: JsonOf<'stack apply'>;
3690
+ preview: JsonOf<'stack preview'>;
3691
+ report: CommandResult;
3692
+ notify: unknown;
3693
+ follow: JsonOf<'run logs'>;
3694
+ };
3695
+ type ResultFor<P extends BoundPath> = {
3696
+ [K in ResultKind]: JsonOf<P> extends SinkInput[K] ? K : never;
3697
+ }[ResultKind];
3698
+ type BindingRuntime = {
3699
+ ports: RunnerPorts;
3700
+ token: object;
3701
+ cwd?: string;
3702
+ write: <K extends SlotKind>(kind: K, token: object, value: SinkInput[K]) => void;
3703
+ detach: <K extends ResultKind>(kind: K, token: object) => void;
3704
+ begin: () => void;
3705
+ fail: (error: unknown) => boolean;
3706
+ tick: () => void;
3707
+ settled?: () => void;
3708
+ };
3709
+ type Sink<T> = {
3710
+ kind: ResultKind;
3711
+ consume: (rt: BindingRuntime, e: T) => void;
3712
+ };
3713
+ type CommandBinding<P extends BoundPath> = {
3714
+ kind: 'command';
3715
+ path: P;
3716
+ args: (ctx: RunCtx, target: ActionTarget) => Partial<ArgsOf<P>>;
3717
+ confirm?: (ctx: RunCtx, args: ArgsOf<P>) => ConfirmSpec;
3718
+ result: Sink<JsonOf<P>> & {
3719
+ kind: ResultFor<P>;
3720
+ };
3721
+ invalidates?: true | 'start+settle';
3722
+ };
3723
+ type ClipboardStore = {
3724
+ get: () => {
3725
+ ids: readonly string[];
3726
+ cut: boolean;
3727
+ } | null;
3728
+ set: (ids: readonly string[], cut: boolean) => void;
3729
+ clear: () => void;
3730
+ };
3731
+ type LayoutHandle = {
3732
+ forcePositions: () => void;
3733
+ panIntoView: (rect: {
3734
+ x: number;
3735
+ y: number;
3736
+ width: number;
3737
+ height: number;
3738
+ }) => void;
3739
+ };
3740
+ type EditorEnv = {
3741
+ editor: EditorPort;
3742
+ apply: (actions: readonly Action[]) => Promise<ApplyResult>;
3743
+ ctx: CanvasCtx;
3744
+ target: ActionTarget;
3745
+ bundle: Bundle;
3746
+ clipboard: ClipboardStore;
3747
+ arrangement: {
3748
+ get: () => CanvasArrangement;
3749
+ update: (a: CanvasArrangement) => void;
3750
+ };
3751
+ layout: LayoutHandle;
3752
+ };
3753
+ type EditorBinding = {
3754
+ kind: 'editor';
3755
+ confirm?: (ctx: CanvasCtx) => ConfirmSpec;
3756
+ } & ({
3757
+ result: 'apply';
3758
+ run: (env: EditorEnv) => Promise<ApplyResult>;
3759
+ } | {
3760
+ result: 'generate';
3761
+ run: (env: EditorEnv) => AsyncIterable<GenerateEvent>;
3762
+ } | {
3763
+ result: 'none';
3764
+ run: (env: EditorEnv) => Promise<void>;
3765
+ });
3766
+ type HostBinding = {
3767
+ kind: 'host';
3768
+ confirm?: (ctx: RunCtx) => ConfirmSpec;
3769
+ invalidates?: true;
3770
+ run: (rt: BindingRuntime, ctx: RunCtx, target: ActionTarget) => Promise<void>;
3771
+ };
3772
+ type ErasedCommand = {
3773
+ kind: 'command';
3774
+ path: BoundPath;
3775
+ confirms: boolean;
3776
+ resultKind: ResultKind;
3777
+ invalidates?: true | 'start+settle';
3778
+ partialArgs: (ctx: RunCtx, target: ActionTarget) => Record<string, unknown>;
3779
+ confirmSpec: (ctx: RunCtx, target: ActionTarget, formArgs: Record<string, unknown>) => ConfirmSpec | undefined;
3780
+ start: (rt: BindingRuntime, ctx: RunCtx, target: ActionTarget, formArgs: Record<string, unknown>, signal: AbortSignal) => Promise<{
3781
+ cancel: () => Promise<void>;
3782
+ } | null>;
3783
+ };
3784
+ declare const KEY_SCOPES: readonly ["surface", "app"];
3785
+ type KeyScope = (typeof KEY_SCOPES)[number];
3786
+ type ActionContribution = {
3787
+ id: string;
3788
+ label: string;
3789
+ icon?: string;
3790
+ keys?: readonly string[];
3791
+ /** Defaults to `surface`. */
3792
+ keyScope?: KeyScope;
3793
+ placement: Placement;
3794
+ requiredPorts: readonly PortName[];
3795
+ requiredContext?: readonly ContextKey[];
3796
+ requiredTarget?: readonly (keyof ActionTarget)[];
3797
+ enabledWhen?: readonly {
3798
+ key: ContextKey;
3799
+ reason: string;
3800
+ }[];
3801
+ binding: ErasedCommand | EditorBinding | HostBinding;
3802
+ };
3803
+ type ContributionSet<P extends PanelSpec = PanelSpec> = {
3804
+ overlays: readonly OverlayContribution[];
3805
+ panels: readonly P[];
3806
+ actions: readonly ActionContribution[];
3807
+ };
3808
+
3809
+ type ReportPath = 'module validate' | 'module convert' | 'module scan';
3810
+ type ReportEntry = {
3811
+ kind: 'result';
3812
+ path: 'module validate';
3813
+ exitCode: number;
3814
+ document: JsonOf<'module validate'>;
3815
+ } | {
3816
+ kind: 'result';
3817
+ path: 'module convert';
3818
+ exitCode: number;
3819
+ document: JsonOf<'module convert'>;
3820
+ } | {
3821
+ kind: 'result';
3822
+ path: 'module scan';
3823
+ exitCode: number;
3824
+ document: JsonOf<'module scan'>;
3825
+ } | {
3826
+ kind: 'failure';
3827
+ path: ReportPath;
3828
+ exitCode: number;
3829
+ failure: CommandFailure;
3830
+ };
3831
+ type ReportFold = ReadonlyMap<ReportPath, ReportEntry>;
3832
+ declare const EMPTY_REPORT_FOLD: ReportFold;
3833
+ declare function foldReport(prev: ReportFold, result: CommandResult): ReportFold;
3834
+ declare function currentReport(fold: ReportFold, treeHash: string): ReportFold;
3835
+ declare function diagnosticsOfDocument(document: JsonOf<'module validate'> | JsonOf<'module convert'> | JsonOf<'module scan'>): readonly Diagnostic$1[];
3836
+ declare function reportDiagnostics(fold: ReportFold): readonly Diagnostic$1[];
3837
+
3838
+ type SlotContext = {
3839
+ stack: string | undefined;
3840
+ };
3841
+ type OnScreen = SlotContext & {
3842
+ session: object;
3843
+ treeHash: string;
3844
+ };
3845
+ type RunOutcome = {
3846
+ kind: 'running';
3847
+ } | {
3848
+ kind: 'succeeded';
3849
+ } | {
3850
+ kind: 'awaiting-approval';
3851
+ changeRequestId: string;
3852
+ } | {
3853
+ kind: 'blocked';
3854
+ message: string;
3855
+ failure?: CommandFailure;
3856
+ } | {
3857
+ kind: 'cancelled';
3858
+ } | {
3859
+ kind: 'detached';
3860
+ submitted: boolean;
3861
+ } | {
3862
+ kind: 'failed';
3863
+ message: string;
3864
+ failure?: CommandFailure;
3865
+ };
3866
+ type RunPhaseStatus = 'current' | 'done';
3867
+ type RunPhase = {
3868
+ name: string;
3869
+ status: RunPhaseStatus;
3870
+ };
3871
+ type RunSlot = {
3872
+ token: object;
3873
+ outcome: RunOutcome;
3874
+ lastLog: string | null;
3875
+ submitted: boolean;
3876
+ phases: readonly RunPhase[];
3877
+ } | null;
3878
+ type PreviewSlot = {
3879
+ token: object;
3880
+ data: JsonOf<'stack preview'>;
3881
+ } | null;
3882
+ type ReportSlot = {
3883
+ sessions: ReadonlyMap<object, ReportFold>;
3884
+ } | null;
3885
+ type FollowSlot = {
3886
+ token: object;
3887
+ runId: string;
3888
+ lines: readonly string[];
3889
+ done: boolean;
3890
+ } | null;
3891
+ type SlotValues = {
3892
+ run: RunSlot;
3893
+ preview: PreviewSlot;
3894
+ report: ReportSlot;
3895
+ follow: FollowSlot;
3896
+ };
3897
+ type ReadOver<S> = (NonNullable<S> & {
3898
+ readOver: SlotContext;
3899
+ }) | null;
3900
+ type ResultSlots = {
3901
+ [K in SlotKind]: ReadOver<SlotValues[K]>;
3902
+ };
3903
+ type LiveSlots = Omit<ResultSlots, 'report'> & {
3904
+ report: ReportFold | null;
3905
+ };
3906
+
3907
+ declare function liveSlots(slots: ResultSlots, current: OnScreen): LiveSlots;
3908
+ declare function reduceRun(prev: RunSlot, token: object, event: JsonOf<'stack apply'>): RunSlot;
3909
+ declare function settleRun(prev: RunSlot, token: object, error: unknown): RunSlot;
3910
+ declare function reducePreview(_prev: PreviewSlot, token: object, event: JsonOf<'stack preview'>): PreviewSlot;
3911
+ declare function reduceReport(prev: ReportSlot, session: object, result: CommandResult): ReportSlot;
3912
+ declare function reduceFollow(prev: FollowSlot, token: object, event: JsonOf<'run logs'>): FollowSlot;
3913
+ type ResultStore = {
3914
+ getSnapshot(): ResultSlots;
3915
+ getTick(): number;
3916
+ subscribe(listener: () => void): () => void;
3917
+ write<K extends SlotKind>(kind: K, token: object, value: SinkInput[K], readOver: SlotContext): void;
3918
+ fail(kind: ResultKind, token: object, error: unknown): boolean;
3919
+ begin(kind: ResultKind, token: object, readOver: SlotContext, target: ActionTarget): void;
3920
+ detach<K extends ResultKind>(kind: K, token: object): void;
3921
+ isBusy(kind: ResultKind): boolean;
3922
+ bumpTick(): void;
3923
+ };
3924
+ declare function createResultStore(): ResultStore;
3925
+
3926
+ type PendingForm = {
3927
+ path: string;
3928
+ missing: readonly string[];
3929
+ submit(values: Record<string, unknown>): void;
3930
+ cancel(): void;
3931
+ } | null;
3932
+ type EditorEnvExtras = {
3933
+ bundle: Bundle;
3934
+ arrangement: {
3935
+ get(): CanvasArrangement;
3936
+ update(a: CanvasArrangement): void;
3937
+ };
3938
+ layout: LayoutHandle;
3939
+ };
3940
+ type ActionRunner = {
3941
+ run(action: ActionContribution, ctx: CanvasCtx, target: ActionTarget, envExtras: EditorEnvExtras): Promise<ApplyResult | undefined>;
3942
+ run(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Promise<ApplyResult | undefined>;
3943
+ apply(actions: readonly Action[]): Promise<ApplyResult | undefined>;
3944
+ cancel(kind: ResultKind): Promise<void>;
3945
+ detach(kind: ResultKind): void;
3946
+ dispose(): void;
3947
+ };
3948
+ type CommandRun = {
3949
+ token: object;
3950
+ path: BoundPath;
3951
+ resultKind: ResultKind;
3952
+ ctx: RunCtx;
3953
+ target: ActionTarget;
3954
+ };
3955
+ type ActionRunnerOptions = {
3956
+ onPendingFormChange?(form: PendingForm): void;
3957
+ onRunLog?(line: string, run: CommandRun): void;
3958
+ };
3959
+ declare function createActionRunner(ports: RunnerPorts, store: ResultStore, options?: ActionRunnerOptions): ActionRunner;
3960
+
3961
+ declare function defineCommand<P extends BoundPath>(binding: CommandBinding<P>): ErasedCommand;
3962
+
3963
+ declare function uniqueDiagnostics(diagnostics: readonly Diagnostic$1[]): readonly Diagnostic$1[];
3964
+ declare function diagnosticsOf(sourceDiagnostics: readonly Diagnostic$1[], reportFindings: readonly Diagnostic$1[]): readonly Diagnostic$1[];
3965
+
3966
+ type MsgOf<M> = M extends {
3967
+ fromJSON(object: unknown): infer T;
3968
+ } ? T : never;
3969
+ type EngineMethodResponse = {
3970
+ [K in keyof typeof LaceEngineDefinition.methods as (typeof LaceEngineDefinition.methods)[K]['name']]: MsgOf<(typeof LaceEngineDefinition.methods)[K]['responseType']>;
3971
+ };
3972
+ type EngineCaller<UnaryMethod extends EngineMethod = EngineMethod> = {
3973
+ kind: 'bridge' | 'direct';
3974
+ unary<M extends UnaryMethod>(method: M, request: unknown): Promise<EngineMethodResponse[M]>;
3975
+ stream<M extends EngineStreamMethod>(method: M, request: unknown, signal: AbortSignal): AsyncIterable<EngineMethodResponse[M]>;
3976
+ };
3977
+ /** The `kind: 'direct'` narrowing of `EngineCaller` — a caller that talks
3978
+ * straight to the engine and can serve every `EngineMethod`, `TestSessionOpen`
3979
+ * included. `openEngineSession`'s fixture-target overload requires one. */
3980
+ type DirectEngineCaller = EngineCaller<EngineMethod> & {
3981
+ kind: 'direct';
3982
+ };
3983
+ /** The `kind: 'bridge'` narrowing of `EngineCaller<BridgeMethod>` —
3984
+ * `bridgeCaller`'s return type. `openEngineSession`'s fixture-target overload
3985
+ * excludes it: a bridge caller can't serve `TestSessionOpen`. */
3986
+ type BridgeEngineCaller = EngineCaller<BridgeMethod> & {
3987
+ kind: 'bridge';
3988
+ };
3989
+ type ConnectCallerOptions = {
3990
+ baseUrl: string;
3991
+ token: string;
3992
+ /** Fetch impl override — used by tests. Defaults to globalThis.fetch. */
3993
+ fetch?: typeof fetch;
3994
+ };
3995
+ /**
3996
+ * Reaches a running `lace engine` process directly over Connect-JSON
3997
+ * (HTTP POST, fetch). Used by Storybook flow stories and the canvas-flow
3998
+ * Playwright suite, which run against a real engine process.
3999
+ */
4000
+ declare function connectCaller(options: ConnectCallerOptions): DirectEngineCaller;
4001
+ /**
4002
+ * Forwards every call over a `MessageBridge` to the host process that holds
4003
+ * the engine connection (VS Code / JetBrains webview). `@lace-cloud/host`'s
4004
+ * `serveEngineBridge` is the other end. Each request is posted as its
4005
+ * method's proto-JSON, the body `connectCaller` sends, which the host reads
4006
+ * back through the message's `fromJSON` (`rpc.serialize`): a `bytes` field
4007
+ * crosses as base64 text, whatever the bridge does to a typed array. The
4008
+ * wire response arrives as the proto-JSON `serveEngineBridge` posted
4009
+ * (`rpc.deserialize`'s `toJSON`), so this caller decodes it back through
4010
+ * `RESPONSE_CODECS` before resolving/pushing it. `unary`'s own `M extends BridgeMethod` plus the
4011
+ * `kind: 'bridge'` tag are what make `BridgeEngineCaller` a type distinct
4012
+ * from `DirectEngineCaller`: `openEngineSession`'s fixture-target overload
4013
+ * requires `kind: 'direct'`, so a caller from here can't reach it.
4014
+ */
4015
+ declare function bridgeCaller(bridge: MessageBridge): BridgeEngineCaller;
4016
+
4017
+ type EngineTarget = {
4018
+ root: string;
4019
+ } | {
4020
+ ephemeral: {
4021
+ name: string;
4022
+ };
4023
+ cwd: string;
4024
+ } | {
4025
+ fixture: string;
4026
+ cwd: string;
4027
+ };
4028
+ type NonFixtureTarget = Exclude<EngineTarget, {
4029
+ fixture: string;
4030
+ }>;
4031
+ type EngineSessionOptions = {
4032
+ onListenerError?: (error: unknown) => void;
4033
+ };
4034
+ type EngineSession = {
4035
+ ports: Required<Pick<CanvasPorts, 'source' | 'editor' | 'commands' | 'context'>>;
4036
+ close(): void;
4037
+ };
4038
+ /**
4039
+ * The commands mapping: one engine connection → the `commands` port alone.
4040
+ * Sends `Initialize` once and `Invoke` per command, each run in the
4041
+ * directory the call names, else in `cwd`; no `SessionOpen`, no `Subscribe`.
4042
+ */
4043
+ declare function openEngineCommands(caller: EngineCaller, { cwd }: {
4044
+ cwd: string;
4045
+ }): Promise<CommandsPort>;
4046
+ declare function openEngineSession(caller: DirectEngineCaller, target: EngineTarget, options?: EngineSessionOptions): Promise<EngineSession>;
4047
+ declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
4048
+
4049
+ export { type EngineSessionOptions as $, type ActionContribution as A, type Badge as B, type ContributionSet as C, type Decorations as D, type EdgeRef as E, type CommandsPort as F, type ConfirmSpec as G, type ConnectCallerOptions as H, ConnectError as I, type JsonOf as J, type ContextKey as K, type LayoutHandle as L, type ContextPort as M, type CreatedRef as N, type OverlayContribution as O, type PanelSpec as P, type DirectEngineCaller as Q, type ResultStore as R, type SourcePort as S, EMPTY_REPORT_FOLD as T, type EditorBinding as U, type EditorEnv as V, type EditorEnvExtras as W, type EditorPort as X, type EngineCaller as Y, type EngineMethodResponse as Z, type EngineSession as _, type CanvasCtx as a, settleRun as a$, type EngineTarget as a0, type ErasedCommand as a1, type FollowSlot as a2, type GenerateEvent as a3, type GraphError as a4, type HostBinding as a5, type Invocation as a6, type NodeDecoration as a7, type Placement as a8, type PortName as a9, createResultStore as aA, currentReport as aB, defineCommand as aC, diagnosticsOf as aD, foldReport as aE, isBoundPath as aF, openEngineCommands as aG, openEngineSession as aH, parseBound as aI, parseCommandFailure as aJ, reportDiagnostics as aK, toArgv as aL, uniqueDiagnostics as aM, Action as aN, InputMode as aO, type LaceReason as aP, type LiveSlots as aQ, type OnScreen as aR, type RunPhase as aS, type RunPhaseStatus as aT, diagnosticsOfDocument as aU, liveSlots as aV, reasonWire as aW, reduceFollow as aX, reducePreview as aY, reduceReport as aZ, reduceRun as a_, type PresenterPort as aa, type PreviewSlot as ab, Reason as ac, type ReportEntry as ad, type ReportFold as ae, type ReportPath as af, type ReportSlot as ag, type ResultKind as ah, type ResultSlots as ai, type RunOutcome as aj, type RunSlot as ak, type RunnerPorts as al, SCHEMAS as am, type Sink as an, type SinkInput as ao, type SlotContext as ap, type SlotKind as aq, type SourceConflict as ar, type StackRef as as, type ViewStatePort as at, type WiringCandidate as au, type WiringQuery as av, bridgeCaller as aw, carriesFailure as ax, connectCaller as ay, createActionRunner as az, type CanvasPorts as b, type PendingForm as c, type BoundPath as d, type CommandRead as e, type ActionTarget as f, type CommandResult as g, type CanvasSource as h, type SourceEnd as i, type RunCtx as j, Bundle as k, type ActionRunner as l, type ActionRunnerOptions as m, type ApplyResult as n, ApplyUnobservedError as o, type ArgsOf as p, type BindingRuntime as q, type BridgeEngineCaller as r, COMMANDS as s, type ClipboardStore as t, type CommandBinding as u, CommandDetachedError as v, CommandExitError as w, type CommandFailure as x, type CommandPath as y, type CommandRun as z };